gatsby-theme-q3 4.5.17 → 4.5.21
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/.eslintrc.js +12 -12
- package/CHANGELOG.md +1216 -1200
- package/LICENSE +21 -21
- package/__fixtures__/en/titles.json +2 -2
- package/__fixtures__/fr/titles.json +2 -2
- package/gatsby-browser.js +38 -38
- package/gatsby-config.js +62 -62
- package/gatsby-node.js +77 -77
- package/gatsby-ssr.js +11 -11
- package/index.js +1 -1
- package/lib/components/AccountPublicGateway.js +2 -3
- package/lib/components/AdminLoader.js +2 -3
- package/lib/components/AdminPrivateGateway.js +3 -4
- package/lib/components/AdminPublicGateway.js +3 -4
- package/lib/components/AdminRouter.js +3 -4
- package/lib/components/BlogArchiveTemplate.js +2 -3
- package/lib/components/BlogTemplate.js +2 -3
- package/lib/components/FormBox.js +2 -3
- package/lib/components/FormBoxContent.js +2 -3
- package/lib/components/FormBoxNotice.js +2 -3
- package/lib/components/IsBrowserReady.js +2 -3
- package/lib/components/PageWrapper.js +2 -3
- package/lib/components/PublicTemplate.js +2 -3
- package/lib/components/Redirect.js +2 -3
- package/lib/components/RedirectToIndex.js +2 -3
- package/lib/components/RichText.js +2 -3
- package/lib/components/SearchEngine.js +4 -7
- package/lib/components/ShareButton.js +2 -3
- package/lib/components/Wrapper.js +2 -3
- package/lib/components/__tests__/useSiteMetaData.test.js +44 -44
- package/lib/components/__tests__/withAuthenticate.test.js +2 -2
- package/lib/components/__tests__/withSuccessOp.test.js +4 -4
- package/lib/components/index.js +2 -3
- package/lib/components/useSiteMetaData.js +1 -1
- package/lib/components/utils.js +2 -3
- package/lib/components/withAuthenticate.js +2 -2
- package/lib/components/withPublicTemplate.js +2 -3
- package/lib/components/withSuccessOp.js +3 -4
- package/lib/pages/404.js +2 -3
- package/lib/pages/login.js +2 -3
- package/lib/pages/password-change.js +2 -3
- package/lib/pages/password-reset.js +2 -3
- package/lib/pages/reverify.js +2 -3
- package/lib/pages/verify.js +2 -3
- package/package.json +5 -5
- package/src/components/AccountPublicGateway.jsx +18 -18
- package/src/components/AdminLoader.jsx +16 -16
- package/src/components/AdminPrivateGateway.jsx +37 -37
- package/src/components/AdminPublicGateway.jsx +34 -34
- package/src/components/AdminRouter.jsx +44 -44
- package/src/components/BlogArchiveTemplate.jsx +55 -55
- package/src/components/BlogTemplate.jsx +104 -104
- package/src/components/FormBox.jsx +22 -22
- package/src/components/FormBoxContent.jsx +26 -26
- package/src/components/FormBoxNotice.jsx +21 -21
- package/src/components/IsBrowserReady.jsx +13 -13
- package/src/components/PageWrapper.jsx +20 -20
- package/src/components/PublicTemplate.jsx +198 -198
- package/src/components/Redirect.jsx +13 -13
- package/src/components/RedirectToIndex.jsx +9 -9
- package/src/components/RichText.jsx +196 -196
- package/src/components/SearchEngine.jsx +124 -124
- package/src/components/ShareButton.jsx +80 -80
- package/src/components/Wrapper.jsx +14 -14
- package/src/components/__tests__/SearchEngine.test.jsx +58 -58
- package/src/components/__tests__/useSiteMetaData.test.js +44 -44
- package/src/components/__tests__/withAuthenticate.test.jsx +52 -52
- package/src/components/__tests__/withSuccessOp.test.jsx +57 -57
- package/src/components/index.js +16 -16
- package/src/components/useSiteMetaData.js +35 -35
- package/src/components/utils.js +23 -23
- package/src/components/withAuthenticate.jsx +20 -20
- package/src/components/withPublicTemplate.jsx +11 -11
- package/src/components/withSuccessOp.jsx +43 -43
- package/src/pages/404.jsx +31 -31
- package/src/pages/login.jsx +71 -71
- package/src/pages/password-change.jsx +72 -72
- package/src/pages/password-reset.jsx +47 -47
- package/src/pages/reverify.jsx +72 -72
- package/src/pages/verify.jsx +70 -70
@@ -14,7 +14,7 @@ var _lodash = require("lodash");
|
|
14
14
|
var _BackgroundStyle = _interopRequireDefault(require("q3-admin/lib/components/BackgroundStyle"));
|
15
15
|
var _AdminPublicGateway = _interopRequireDefault(require("./AdminPublicGateway"));
|
16
16
|
var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
|
17
|
-
function _interopRequireDefault(
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
18
18
|
const useStyle = (0, _core.makeStyles)(theme => ({
|
19
19
|
logo: ({
|
20
20
|
invertLogo = false
|
@@ -179,5 +179,4 @@ PublicTemplate.defaultProps = {
|
|
179
179
|
PublicTemplate.propTypes = {
|
180
180
|
children: _propTypes.default.node
|
181
181
|
};
|
182
|
-
var _default = PublicTemplate;
|
183
|
-
exports.default = _default;
|
182
|
+
var _default = exports.default = PublicTemplate;
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.default = void 0;
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
8
8
|
var _gatsby = require("gatsby");
|
9
|
-
function _interopRequireDefault(
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
10
10
|
// eslint-disable-next-line
|
11
11
|
const Redirect = ({
|
12
12
|
to
|
@@ -16,5 +16,4 @@ const Redirect = ({
|
|
16
16
|
}, []);
|
17
17
|
return null;
|
18
18
|
};
|
19
|
-
var _default = Redirect;
|
20
|
-
exports.default = _default;
|
19
|
+
var _default = exports.default = Redirect;
|
@@ -7,9 +7,8 @@ exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
8
8
|
var _Redirect = _interopRequireDefault(require("./Redirect"));
|
9
9
|
var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
|
10
|
-
function _interopRequireDefault(
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
11
|
const IndexPage = () => /*#__PURE__*/_react.default.createElement(_Redirect.default, {
|
12
12
|
to: (0, _useSiteMetaData.default)().appDirectory
|
13
13
|
});
|
14
|
-
var _default = IndexPage;
|
15
|
-
exports.default = _default;
|
14
|
+
var _default = exports.default = IndexPage;
|
@@ -20,7 +20,7 @@ var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
|
|
20
20
|
var _CheckCircle = _interopRequireDefault(require("@material-ui/icons/CheckCircle"));
|
21
21
|
var _richTextReactRenderer = require("@contentful/rich-text-react-renderer");
|
22
22
|
var _richTextTypes = require("@contentful/rich-text-types");
|
23
|
-
function _interopRequireDefault(
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
24
24
|
const isImage = v => v === 'image';
|
25
25
|
const getGroup = v => typeof v === 'string' ? v.split('/')[0] : '';
|
26
26
|
const imageRender = (node, locale) => {
|
@@ -137,5 +137,4 @@ RichText.propTypes = {
|
|
137
137
|
RichText.defaultProps = {
|
138
138
|
locale: 'en-CA'
|
139
139
|
};
|
140
|
-
var _default = RichText;
|
141
|
-
exports.default = _default;
|
140
|
+
var _default = exports.default = RichText;
|
@@ -10,11 +10,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _reactHelmet = require("react-helmet");
|
11
11
|
var _q3UiHelpers = require("q3-ui-helpers");
|
12
12
|
var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
|
13
|
-
function _interopRequireDefault(
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
14
14
|
const withContent = output => content => content && (0, _lodash.isFunction)(output) ? output(content) : [];
|
15
15
|
const getStartUrl = () => _q3UiHelpers.browser.isBrowserReady() ? (0, _lodash.get)(window, 'location.host') : '';
|
16
16
|
exports.getStartUrl = getStartUrl;
|
17
|
-
const generateMetaDescriptionOptions = withContent(content => [{
|
17
|
+
const generateMetaDescriptionOptions = exports.generateMetaDescriptionOptions = withContent(content => [{
|
18
18
|
name: 'description',
|
19
19
|
content
|
20
20
|
}, {
|
@@ -24,15 +24,13 @@ const generateMetaDescriptionOptions = withContent(content => [{
|
|
24
24
|
name: 'twitter:description',
|
25
25
|
content
|
26
26
|
}]);
|
27
|
-
exports.
|
28
|
-
const generateMetaTitleOptions = withContent(content => [{
|
27
|
+
const generateMetaTitleOptions = exports.generateMetaTitleOptions = withContent(content => [{
|
29
28
|
property: 'og:title',
|
30
29
|
content
|
31
30
|
}, {
|
32
31
|
name: 'twitter:title',
|
33
32
|
content
|
34
33
|
}]);
|
35
|
-
exports.generateMetaTitleOptions = generateMetaTitleOptions;
|
36
34
|
const generateBrand = xs => xs ? `%s | ${xs}` : undefined;
|
37
35
|
exports.generateBrand = generateBrand;
|
38
36
|
const generateIcons = (site = {}) => site !== null && site !== void 0 && site.favicon ? [{
|
@@ -95,5 +93,4 @@ SEO.propTypes = {
|
|
95
93
|
meta: _propTypes.default.arrayOf(_propTypes.default.object),
|
96
94
|
title: _propTypes.default.string
|
97
95
|
};
|
98
|
-
var _default = SEO;
|
99
|
-
exports.default = _default;
|
96
|
+
var _default = exports.default = SEO;
|
@@ -9,7 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
|
10
10
|
var _q3UiHelpers = require("q3-ui-helpers");
|
11
11
|
var _reactShare = require("react-share");
|
12
|
-
function _interopRequireDefault(
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
13
13
|
const EMAIL = 'Email';
|
14
14
|
const FACEBOOK = 'Facebook';
|
15
15
|
const LINKEDIN = 'LinkedIn';
|
@@ -72,5 +72,4 @@ const ShareButton = ({
|
|
72
72
|
ShareButton.propTypes = {
|
73
73
|
platform: _propTypes.default.oneOf([FACEBOOK, TWITTER, LINKEDIN, EMAIL]).isRequired
|
74
74
|
};
|
75
|
-
var _default = ShareButton;
|
76
|
-
exports.default = _default;
|
75
|
+
var _default = exports.default = ShareButton;
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
9
9
|
var _q3UiPermissions = _interopRequireDefault(require("q3-ui-permissions"));
|
10
|
-
function _interopRequireDefault(
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
11
|
/* eslint-disable import/no-extraneous-dependencies */
|
12
12
|
|
13
13
|
const Wrapper = ({
|
@@ -16,5 +16,4 @@ const Wrapper = ({
|
|
16
16
|
Wrapper.propTypes = {
|
17
17
|
children: _propTypes.default.node.isRequired
|
18
18
|
};
|
19
|
-
var _default = Wrapper;
|
20
|
-
exports.default = _default;
|
19
|
+
var _default = exports.default = Wrapper;
|
@@ -1,44 +1,44 @@
|
|
1
|
-
import useSiteMetaData from '../useSiteMetaData';
|
2
|
-
|
3
|
-
jest.mock('gatsby', () => ({
|
4
|
-
graphql: jest.fn(),
|
5
|
-
useStaticQuery: jest.fn(),
|
6
|
-
}));
|
7
|
-
|
8
|
-
jest.mock(
|
9
|
-
'gatsby-theme-q3-mui/src/components/useRunTime',
|
10
|
-
() =>
|
11
|
-
jest.fn().mockReturnValue({
|
12
|
-
foo: 1,
|
13
|
-
bar: null,
|
14
|
-
quuz: 'string',
|
15
|
-
thunk: undefined,
|
16
|
-
}),
|
17
|
-
);
|
18
|
-
|
19
|
-
describe('useSiteMetaData', () => {
|
20
|
-
it('should overwrite only the nullish and undefined', () => {
|
21
|
-
expect(
|
22
|
-
useSiteMetaData({
|
23
|
-
foo: 2,
|
24
|
-
bar: 2,
|
25
|
-
quuz: 2,
|
26
|
-
thunk: 2,
|
27
|
-
}),
|
28
|
-
).toEqual({
|
29
|
-
foo: 1,
|
30
|
-
bar: 2,
|
31
|
-
quuz: 'string',
|
32
|
-
thunk: 2,
|
33
|
-
});
|
34
|
-
});
|
35
|
-
|
36
|
-
it('should return without defaults', () => {
|
37
|
-
expect(useSiteMetaData()).toEqual({
|
38
|
-
foo: 1,
|
39
|
-
bar: null,
|
40
|
-
quuz: 'string',
|
41
|
-
thunk: undefined,
|
42
|
-
});
|
43
|
-
});
|
44
|
-
});
|
1
|
+
import useSiteMetaData from '../useSiteMetaData';
|
2
|
+
|
3
|
+
jest.mock('gatsby', () => ({
|
4
|
+
graphql: jest.fn(),
|
5
|
+
useStaticQuery: jest.fn(),
|
6
|
+
}));
|
7
|
+
|
8
|
+
jest.mock(
|
9
|
+
'gatsby-theme-q3-mui/src/components/useRunTime',
|
10
|
+
() =>
|
11
|
+
jest.fn().mockReturnValue({
|
12
|
+
foo: 1,
|
13
|
+
bar: null,
|
14
|
+
quuz: 'string',
|
15
|
+
thunk: undefined,
|
16
|
+
}),
|
17
|
+
);
|
18
|
+
|
19
|
+
describe('useSiteMetaData', () => {
|
20
|
+
it('should overwrite only the nullish and undefined', () => {
|
21
|
+
expect(
|
22
|
+
useSiteMetaData({
|
23
|
+
foo: 2,
|
24
|
+
bar: 2,
|
25
|
+
quuz: 2,
|
26
|
+
thunk: 2,
|
27
|
+
}),
|
28
|
+
).toEqual({
|
29
|
+
foo: 1,
|
30
|
+
bar: 2,
|
31
|
+
quuz: 'string',
|
32
|
+
thunk: 2,
|
33
|
+
});
|
34
|
+
});
|
35
|
+
|
36
|
+
it('should return without defaults', () => {
|
37
|
+
expect(useSiteMetaData()).toEqual({
|
38
|
+
foo: 1,
|
39
|
+
bar: null,
|
40
|
+
quuz: 'string',
|
41
|
+
thunk: undefined,
|
42
|
+
});
|
43
|
+
});
|
44
|
+
});
|
@@ -5,7 +5,7 @@ var _router = require("@reach/router");
|
|
5
5
|
var _withAuthenticate = _interopRequireDefault(require("../withAuthenticate"));
|
6
6
|
var _utils = require("../utils");
|
7
7
|
var _useSiteMetaData = _interopRequireDefault(require("../useSiteMetaData"));
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
jest.mock('@reach/router', () => ({
|
10
10
|
useLocation: jest.fn()
|
11
11
|
}));
|
@@ -16,7 +16,7 @@ jest.mock('../utils', () => ({
|
|
16
16
|
const runAuthenticate = () => {
|
17
17
|
const Component = () => /*#__PURE__*/_react.default.createElement("div", null);
|
18
18
|
const Instance = (0, _withAuthenticate.default)(Component);
|
19
|
-
global.shallow(
|
19
|
+
global.shallow(/*#__PURE__*/_react.default.createElement(Instance, null)).props().authenticate();
|
20
20
|
};
|
21
21
|
describe('withAuthenticate', () => {
|
22
22
|
it('should redirect to default directory', () => {
|
@@ -4,7 +4,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _gatsby = require("gatsby");
|
5
5
|
var _FormBoxNotice = _interopRequireDefault(require("../FormBoxNotice"));
|
6
6
|
var _withSuccessOp = _interopRequireDefault(require("../withSuccessOp"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
8
|
jest.mock('gatsby', () => ({
|
9
9
|
navigate: jest.fn(),
|
10
10
|
Link: () => /*#__PURE__*/_react.default.createElement("div", null)
|
@@ -13,7 +13,7 @@ const Box = () => /*#__PURE__*/_react.default.createElement("div", null);
|
|
13
13
|
const Component = (0, _withSuccessOp.default)(Box, 'testing');
|
14
14
|
describe('withSuccessOp', () => {
|
15
15
|
it('should not render notice', () => {
|
16
|
-
const el = global.shallow(
|
16
|
+
const el = global.shallow(/*#__PURE__*/_react.default.createElement(Component, {
|
17
17
|
location: {
|
18
18
|
search: '?foo=bar'
|
19
19
|
}
|
@@ -21,7 +21,7 @@ describe('withSuccessOp', () => {
|
|
21
21
|
expect(el.find(_FormBoxNotice.default).exists()).toBeFalsy();
|
22
22
|
});
|
23
23
|
it('should render notice with message', () => {
|
24
|
-
const notice = global.shallow(
|
24
|
+
const notice = global.shallow(/*#__PURE__*/_react.default.createElement(Component, {
|
25
25
|
location: {
|
26
26
|
search: '?op=success'
|
27
27
|
}
|
@@ -30,7 +30,7 @@ describe('withSuccessOp', () => {
|
|
30
30
|
expect(notice.prop('title')).toMatch('testing');
|
31
31
|
});
|
32
32
|
it('should navigate', () => {
|
33
|
-
global.shallow(
|
33
|
+
global.shallow(/*#__PURE__*/_react.default.createElement(Component, {
|
34
34
|
location: {
|
35
35
|
pathname: 'foo'
|
36
36
|
}
|
package/lib/components/index.js
CHANGED
@@ -100,6 +100,5 @@ var _RedirectToIndex = _interopRequireDefault(require("./RedirectToIndex"));
|
|
100
100
|
var _RichText = _interopRequireWildcard(require("./RichText"));
|
101
101
|
var _SearchEngine = _interopRequireDefault(require("./SearchEngine"));
|
102
102
|
var _Wrapper = _interopRequireDefault(require("./Wrapper"));
|
103
|
-
function
|
104
|
-
function
|
105
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
103
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
104
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
7
7
|
var _lodash = require("lodash");
|
8
8
|
var _gatsby = require("gatsby");
|
9
9
|
var _useRunTime = _interopRequireDefault(require("gatsby-theme-q3-mui/src/components/useRunTime"));
|
10
|
-
function _interopRequireDefault(
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
11
|
var _default = (defaultValues = {}) => {
|
12
12
|
const output = (0, _lodash.merge)((0, _lodash.get)((0, _gatsby.useStaticQuery)((0, _gatsby.graphql)`
|
13
13
|
query {
|
package/lib/components/utils.js
CHANGED
@@ -7,9 +7,8 @@ exports.toOp = exports.hasOp = exports.authenticate = exports.OP = void 0;
|
|
7
7
|
var _axios = _interopRequireDefault(require("axios"));
|
8
8
|
var _gatsby = require("gatsby");
|
9
9
|
var _q3UiPermissions = require("q3-ui-permissions");
|
10
|
-
function _interopRequireDefault(
|
11
|
-
const OP = '?op=success';
|
12
|
-
exports.OP = OP;
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
|
+
const OP = exports.OP = '?op=success';
|
13
12
|
const authenticate = (credentials, redirectPath = '/') => _axios.default.post('/authenticate', credentials).then(({
|
14
13
|
data
|
15
14
|
}) => {
|
@@ -8,8 +8,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _router = require("@reach/router");
|
9
9
|
var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
|
10
10
|
var _utils = require("./utils");
|
11
|
-
function _interopRequireDefault(
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
13
13
|
var _default = Component => props => {
|
14
14
|
var _useLocation, _useLocation$state;
|
15
15
|
const {
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.default = void 0;
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
8
8
|
var _PublicTemplate = _interopRequireDefault(require("./PublicTemplate"));
|
9
|
-
function _interopRequireDefault(
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
10
10
|
const withPublicTemplate = Component => props => /*#__PURE__*/_react.default.createElement(_PublicTemplate.default, props, /*#__PURE__*/_react.default.createElement(Component, props));
|
11
|
-
var _default = withPublicTemplate;
|
12
|
-
exports.default = _default;
|
11
|
+
var _default = exports.default = withPublicTemplate;
|
@@ -11,8 +11,8 @@ var _gatsby = require("gatsby");
|
|
11
11
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
12
12
|
var _FormBoxNotice = _interopRequireDefault(require("./FormBoxNotice"));
|
13
13
|
var _utils = require("./utils");
|
14
|
-
function _interopRequireDefault(
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
16
16
|
const withSuccessOp = (Component, msg) => {
|
17
17
|
const SuccessOpMessage = props => {
|
18
18
|
const {
|
@@ -44,5 +44,4 @@ const withSuccessOp = (Component, msg) => {
|
|
44
44
|
};
|
45
45
|
return SuccessOpMessage;
|
46
46
|
};
|
47
|
-
var _default = withSuccessOp;
|
48
|
-
exports.default = _default;
|
47
|
+
var _default = exports.default = withSuccessOp;
|
package/lib/pages/404.js
CHANGED
@@ -10,7 +10,7 @@ var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
|
|
10
10
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
11
11
|
var _wrapper = _interopRequireDefault(require("q3-ui/lib/wrapper"));
|
12
12
|
var _gatsby = require("gatsby");
|
13
|
-
function _interopRequireDefault(
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
14
14
|
const NotFound = () => /*#__PURE__*/_react.default.createElement(_wrapper.default, {
|
15
15
|
backgroundColor: "transparent"
|
16
16
|
}, /*#__PURE__*/_react.default.createElement(_q3UiAssets.default, {
|
@@ -27,5 +27,4 @@ const NotFound = () => /*#__PURE__*/_react.default.createElement(_wrapper.defaul
|
|
27
27
|
size: "large"
|
28
28
|
}, "Go home"))
|
29
29
|
}));
|
30
|
-
var _default = NotFound;
|
31
|
-
exports.default = _default;
|
30
|
+
var _default = exports.default = NotFound;
|
package/lib/pages/login.js
CHANGED
@@ -16,7 +16,7 @@ var _builders = require("q3-ui-forms/lib/builders");
|
|
16
16
|
var _FormBox = _interopRequireDefault(require("../components/FormBox"));
|
17
17
|
var _withAuthenticate = _interopRequireDefault(require("../components/withAuthenticate"));
|
18
18
|
var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
|
19
|
-
function _interopRequireDefault(
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
20
20
|
const Login = (0, _withPublicTemplate.default)((0, _withAuthenticate.default)(({
|
21
21
|
authenticate
|
22
22
|
}) => {
|
@@ -59,5 +59,4 @@ const Login = (0, _withPublicTemplate.default)((0, _withAuthenticate.default)(({
|
|
59
59
|
}, t('titles:login'))
|
60
60
|
});
|
61
61
|
}));
|
62
|
-
var _default = Login;
|
63
|
-
exports.default = _default;
|
62
|
+
var _default = exports.default = Login;
|
@@ -15,7 +15,7 @@ var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxConte
|
|
15
15
|
var _FormBox = _interopRequireDefault(require("../components/FormBox"));
|
16
16
|
var _withSuccessOp = _interopRequireDefault(require("../components/withSuccessOp"));
|
17
17
|
var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
|
18
|
-
function _interopRequireDefault(
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
19
19
|
const PasswordChange = ({
|
20
20
|
onSuccess,
|
21
21
|
location
|
@@ -53,5 +53,4 @@ PasswordChange.propTypes = {
|
|
53
53
|
}).isRequired
|
54
54
|
};
|
55
55
|
const PasswordChangeWithTemplate = (0, _withPublicTemplate.default)((0, _withSuccessOp.default)(PasswordChange, 'passwordChangeNotice'));
|
56
|
-
var _default = PasswordChangeWithTemplate;
|
57
|
-
exports.default = _default;
|
56
|
+
var _default = exports.default = PasswordChangeWithTemplate;
|
@@ -12,7 +12,7 @@ var _FormBox = _interopRequireDefault(require("../components/FormBox"));
|
|
12
12
|
var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxContent"));
|
13
13
|
var _withSuccessOp = _interopRequireDefault(require("../components/withSuccessOp"));
|
14
14
|
var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
|
15
|
-
function _interopRequireDefault(
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
16
16
|
const PasswordReset = ({
|
17
17
|
onSuccess
|
18
18
|
}) => /*#__PURE__*/_react.default.createElement(_FormBox.default, {
|
@@ -35,5 +35,4 @@ PasswordReset.propTypes = {
|
|
35
35
|
onSuccess: _propTypes.default.func.isRequired
|
36
36
|
};
|
37
37
|
const PasswordResetWithTemplate = (0, _withPublicTemplate.default)((0, _withSuccessOp.default)(PasswordReset, 'passwordResetNotice'));
|
38
|
-
var _default = PasswordResetWithTemplate;
|
39
|
-
exports.default = _default;
|
38
|
+
var _default = exports.default = PasswordResetWithTemplate;
|
package/lib/pages/reverify.js
CHANGED
@@ -16,7 +16,7 @@ var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxConte
|
|
16
16
|
var _FormBoxNotice = _interopRequireDefault(require("../components/FormBoxNotice"));
|
17
17
|
var _utils = require("../components/utils");
|
18
18
|
var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
|
19
|
-
function _interopRequireDefault(
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
20
20
|
const Reverify = ({
|
21
21
|
location: {
|
22
22
|
search,
|
@@ -59,5 +59,4 @@ Reverify.propTypes = {
|
|
59
59
|
}).isRequired
|
60
60
|
};
|
61
61
|
const ReverifyWithTemplate = (0, _withPublicTemplate.default)(Reverify);
|
62
|
-
var _default = ReverifyWithTemplate;
|
63
|
-
exports.default = _default;
|
62
|
+
var _default = exports.default = ReverifyWithTemplate;
|
package/lib/pages/verify.js
CHANGED
@@ -15,7 +15,7 @@ var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxConte
|
|
15
15
|
var _FormBox = _interopRequireDefault(require("../components/FormBox"));
|
16
16
|
var _withAuthenticate = _interopRequireDefault(require("../components/withAuthenticate"));
|
17
17
|
var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
|
18
|
-
function _interopRequireDefault(
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
19
19
|
const Verify = (0, _withPublicTemplate.default)((0, _withAuthenticate.default)(({
|
20
20
|
authenticate,
|
21
21
|
...props
|
@@ -59,5 +59,4 @@ const Verify = (0, _withPublicTemplate.default)((0, _withAuthenticate.default)((
|
|
59
59
|
})
|
60
60
|
});
|
61
61
|
}));
|
62
|
-
var _default = Verify;
|
63
|
-
exports.default = _default;
|
62
|
+
var _default = exports.default = Verify;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "gatsby-theme-q3",
|
3
|
-
"version": "4.5.
|
3
|
+
"version": "4.5.21",
|
4
4
|
"main": "index.js",
|
5
5
|
"license": "MIT",
|
6
6
|
"peerDependencies": {
|
@@ -28,13 +28,13 @@
|
|
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.
|
31
|
+
"gatsby-theme-q3-mui": "^4.5.21",
|
32
32
|
"gatsby-transformer-sharp": "^4.2.0",
|
33
33
|
"lodash": "^4.17.20",
|
34
34
|
"process": "^0.11.10",
|
35
35
|
"prop-types": "^15.7.2",
|
36
|
-
"q3-ui-helpers": "^4.5.
|
37
|
-
"q3-ui-locale": "^4.5.
|
36
|
+
"q3-ui-helpers": "^4.5.21",
|
37
|
+
"q3-ui-locale": "^4.5.21",
|
38
38
|
"query-string": "^7.0.1",
|
39
39
|
"react-helmet": "^6.1.0",
|
40
40
|
"react-share": "^4.3.1",
|
@@ -42,5 +42,5 @@
|
|
42
42
|
"transform-loader": "^0.2.4",
|
43
43
|
"yarn": "^1.22.17"
|
44
44
|
},
|
45
|
-
"gitHead": "
|
45
|
+
"gitHead": "34928eb983bfa046671fc97e60581d01094cd1e1"
|
46
46
|
}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { navigate } from 'gatsby';
|
3
|
-
import { Gatekeeper } from 'q3-admin/lib/containers';
|
4
|
-
import IsBrowserReady from './IsBrowserReady';
|
5
|
-
|
6
|
-
// eslint-disable-next-line
|
7
|
-
const AccountPublicGateway = ({ children }) => (
|
8
|
-
<IsBrowserReady>
|
9
|
-
<Gatekeeper
|
10
|
-
navigate={navigate}
|
11
|
-
redirectPathOnSession="/account"
|
12
|
-
>
|
13
|
-
{children}
|
14
|
-
</Gatekeeper>
|
15
|
-
</IsBrowserReady>
|
16
|
-
);
|
17
|
-
|
18
|
-
export default AccountPublicGateway;
|
1
|
+
import React from 'react';
|
2
|
+
import { navigate } from 'gatsby';
|
3
|
+
import { Gatekeeper } from 'q3-admin/lib/containers';
|
4
|
+
import IsBrowserReady from './IsBrowserReady';
|
5
|
+
|
6
|
+
// eslint-disable-next-line
|
7
|
+
const AccountPublicGateway = ({ children }) => (
|
8
|
+
<IsBrowserReady>
|
9
|
+
<Gatekeeper
|
10
|
+
navigate={navigate}
|
11
|
+
redirectPathOnSession="/account"
|
12
|
+
>
|
13
|
+
{children}
|
14
|
+
</Gatekeeper>
|
15
|
+
</IsBrowserReady>
|
16
|
+
);
|
17
|
+
|
18
|
+
export default AccountPublicGateway;
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
|
-
import { Loader } from 'q3-admin/lib/components';
|
4
|
-
|
5
|
-
const AdminLoader = ({ children }) => (
|
6
|
-
<>
|
7
|
-
<Loader />
|
8
|
-
{children}
|
9
|
-
</>
|
10
|
-
);
|
11
|
-
|
12
|
-
AdminLoader.propTypes = {
|
13
|
-
children: PropTypes.node.isRequired,
|
14
|
-
};
|
15
|
-
|
16
|
-
export default AdminLoader;
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { Loader } from 'q3-admin/lib/components';
|
4
|
+
|
5
|
+
const AdminLoader = ({ children }) => (
|
6
|
+
<>
|
7
|
+
<Loader />
|
8
|
+
{children}
|
9
|
+
</>
|
10
|
+
);
|
11
|
+
|
12
|
+
AdminLoader.propTypes = {
|
13
|
+
children: PropTypes.node.isRequired,
|
14
|
+
};
|
15
|
+
|
16
|
+
export default AdminLoader;
|
@@ -1,37 +1,37 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
|
-
import { navigate } from 'gatsby';
|
4
|
-
import { Gatekeeper } from 'q3-admin/lib/containers';
|
5
|
-
import IsBrowserReady from './IsBrowserReady';
|
6
|
-
|
7
|
-
const AdminPrivateGateway = ({
|
8
|
-
children,
|
9
|
-
GatekeepProps,
|
10
|
-
// for legacy purposes (for now)
|
11
|
-
...rest
|
12
|
-
}) => (
|
13
|
-
<IsBrowserReady>
|
14
|
-
<Gatekeeper
|
15
|
-
navigate={navigate}
|
16
|
-
redirectPathOnPublic="/login"
|
17
|
-
{...rest}
|
18
|
-
{...GatekeepProps}
|
19
|
-
>
|
20
|
-
{children}
|
21
|
-
</Gatekeeper>
|
22
|
-
</IsBrowserReady>
|
23
|
-
);
|
24
|
-
|
25
|
-
AdminPrivateGateway.defaultProps = {
|
26
|
-
GatekeepProps: {},
|
27
|
-
children: null,
|
28
|
-
};
|
29
|
-
|
30
|
-
AdminPrivateGateway.propTypes = {
|
31
|
-
GatekeepProps: PropTypes.shape({
|
32
|
-
redirectCheck: PropTypes.func,
|
33
|
-
}),
|
34
|
-
children: PropTypes.node,
|
35
|
-
};
|
36
|
-
|
37
|
-
export default AdminPrivateGateway;
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { navigate } from 'gatsby';
|
4
|
+
import { Gatekeeper } from 'q3-admin/lib/containers';
|
5
|
+
import IsBrowserReady from './IsBrowserReady';
|
6
|
+
|
7
|
+
const AdminPrivateGateway = ({
|
8
|
+
children,
|
9
|
+
GatekeepProps,
|
10
|
+
// for legacy purposes (for now)
|
11
|
+
...rest
|
12
|
+
}) => (
|
13
|
+
<IsBrowserReady>
|
14
|
+
<Gatekeeper
|
15
|
+
navigate={navigate}
|
16
|
+
redirectPathOnPublic="/login"
|
17
|
+
{...rest}
|
18
|
+
{...GatekeepProps}
|
19
|
+
>
|
20
|
+
{children}
|
21
|
+
</Gatekeeper>
|
22
|
+
</IsBrowserReady>
|
23
|
+
);
|
24
|
+
|
25
|
+
AdminPrivateGateway.defaultProps = {
|
26
|
+
GatekeepProps: {},
|
27
|
+
children: null,
|
28
|
+
};
|
29
|
+
|
30
|
+
AdminPrivateGateway.propTypes = {
|
31
|
+
GatekeepProps: PropTypes.shape({
|
32
|
+
redirectCheck: PropTypes.func,
|
33
|
+
}),
|
34
|
+
children: PropTypes.node,
|
35
|
+
};
|
36
|
+
|
37
|
+
export default AdminPrivateGateway;
|