@blaze-cms/nextjs-tools 0.146.0-alpha.30 → 0.146.0-alpha.32

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 CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.146.0-alpha.32](https://github.com/thebyte9/blaze/compare/v0.146.0-alpha.31...v0.146.0-alpha.32) (2025-03-17)
7
+
8
+ **Note:** Version bump only for package @blaze-cms/nextjs-tools
9
+
10
+
11
+
12
+
13
+
14
+ # [0.146.0-alpha.31](https://github.com/thebyte9/blaze/compare/v0.146.0-alpha.30...v0.146.0-alpha.31) (2025-03-05)
15
+
16
+
17
+ ### Features
18
+
19
+ * debug sidebar now shows on error if enabled ([#4667](https://github.com/thebyte9/blaze/issues/4667)) ([01d43e1](https://github.com/thebyte9/blaze/commit/01d43e19c160980cfc8259c1a951ab70ebe70eb0))
20
+
21
+
22
+
23
+
24
+
6
25
  # [0.146.0-alpha.30](https://github.com/thebyte9/blaze/compare/v0.146.0-alpha.29...v0.146.0-alpha.30) (2025-02-25)
7
26
 
8
27
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
@@ -59,10 +59,15 @@ var Resolver = function Resolver(props) {
59
59
  }
60
60
  if (redirecting) return null;
61
61
  if (isStatusPage) return 'OK';
62
- if (!pageData || !itemId || !itemEntity) return /*#__PURE__*/_react["default"].createElement(_error["default"], {
63
- statusCode: errorCode,
64
- title: errorMessage
65
- });
62
+ if (!pageData || !itemId || !itemEntity) {
63
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_error["default"], {
64
+ statusCode: errorCode,
65
+ title: errorMessage
66
+ }), /*#__PURE__*/_react["default"].createElement(_components.DebugSidebar, {
67
+ itemId: itemId,
68
+ itemEntity: itemEntity
69
+ }));
70
+ }
66
71
  return /*#__PURE__*/_react["default"].createElement("div", {
67
72
  className: rootSelectorClasses
68
73
  }, /*#__PURE__*/_react["default"].createElement(_containers.ContentContainer, {
@@ -1 +1 @@
1
- {"version":3,"file":"Resolver.js","names":["_react","_interopRequireDefault","require","_error","_router","_propTypes","_components","_helpers","_containers","_constants","Resolver","props","pageData","itemId","itemEntity","isStatusPage","fullUrl","disableSsr","_props$rootSelectorCl","rootSelectorClasses","RESOLVER_CONTAINER_CLASS","_props$isPreview","isPreview","_props$errorCode","errorCode","NOT_FOUND_STATUS_CODE","_props$errorMessage","errorMessage","_props$redirecting","redirecting","router","useRouter","window","asPath","location","hash","url","URL","href","searchParams","set","Date","now","push","createElement","statusCode","title","className","ContentContainer","DebugSidebar","getInitialProps","_ref","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","checkUrl","stop","_x","apply","arguments","propTypes","PropTypes","string","object","bool","number","defaultProps","_default","exports"],"sources":["../../src/pages/Resolver.js"],"sourcesContent":["import React from 'react';\nimport NextError from 'next/error';\nimport { useRouter } from 'next/router';\nimport PropTypes from 'prop-types';\nimport { DebugSidebar } from '../components';\nimport { checkUrl } from '../helpers';\nimport { ContentContainer } from '../containers';\nimport { NOT_FOUND_STATUS_CODE, RESOLVER_CONTAINER_CLASS } from '../constants';\n\nconst Resolver = props => {\n const {\n pageData,\n itemId,\n itemEntity,\n isStatusPage,\n fullUrl,\n disableSsr,\n rootSelectorClasses = RESOLVER_CONTAINER_CLASS,\n isPreview = false,\n errorCode = NOT_FOUND_STATUS_CODE,\n errorMessage = null,\n redirecting = false\n } = props;\n\n const router = useRouter();\n\n if (disableSsr) {\n if (typeof window !== 'undefined') {\n let { asPath } = router;\n if (window.location.hash) {\n // handle nextjs issue not calling getInitialProps if pushing a url with a hash in it\n // we add a new query string param to force calling getInitialProps\n // this should only happen if disableSsr and window.location.hash\n const url = new URL(router.asPath, window.location.href);\n if (url.hash) url.searchParams.set('_h', Date.now());\n asPath = url;\n }\n router.push('/Resolver', asPath);\n }\n return '';\n }\n\n if (redirecting) return null;\n\n if (isStatusPage) return 'OK';\n\n if (!pageData || !itemId || !itemEntity)\n return <NextError statusCode={errorCode} title={errorMessage} />;\n\n return (\n <div className={rootSelectorClasses}>\n <ContentContainer\n pageData={pageData}\n itemId={itemId}\n itemEntity={itemEntity}\n isPreview={isPreview}\n fullUrl={fullUrl}\n />\n\n <DebugSidebar itemId={itemId} itemEntity={itemEntity} />\n </div>\n );\n};\n\nResolver.getInitialProps = async props => checkUrl(props);\n\nResolver.propTypes = {\n itemId: PropTypes.string,\n itemEntity: PropTypes.string,\n pageData: PropTypes.object,\n isStatusPage: PropTypes.bool,\n fullUrl: PropTypes.string,\n isPreview: PropTypes.bool,\n errorCode: PropTypes.number,\n disableSsr: PropTypes.bool,\n errorMessage: PropTypes.string,\n rootSelectorClasses: PropTypes.string,\n redirecting: PropTypes.bool\n};\n\nResolver.defaultProps = {\n itemId: null,\n itemEntity: null,\n pageData: null,\n isStatusPage: false,\n fullUrl: '',\n isPreview: false,\n errorCode: NOT_FOUND_STATUS_CODE,\n disableSsr: false,\n errorMessage: null,\n rootSelectorClasses: RESOLVER_CONTAINER_CLASS,\n redirecting: false\n};\n\nexport default Resolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAEA,IAAMQ,QAAQ,GAAG,SAAXA,QAAQA,CAAGC,KAAK,EAAI;EACxB,IACEC,QAAQ,GAWND,KAAK,CAXPC,QAAQ;IACRC,MAAM,GAUJF,KAAK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AEsD,qBAAS,CAACC,MAAM;EAC5BzD,QAAQ,EAAEwD,qBAAS,CAACE,MAAM;EAC1BvD,YAAY,EAAEqD,qBAAS,CAACG,IAAI;EAC5BvD,OAAO,EAAEoD,qBAAS,CAACC,MAAM;EACzB/C,SAAS,EAAE8C,qBAAS,CAACG,IAAI;EACzB/C,SAAS,EAAE4C,qBAAS,CAACI,MAAM;EAC3BvD,UAAU,EAAEmD,qBAAS,CAACG,IAAI;EAC1B5C,YAAY,EAAEyC,qBAAS,CAACC,MAAM;EAC9BlD,mBAAmB,EAAEiD,qBAAS,CAACC,MAAM;EACrCxC,WAAW,EAAEuC,qBAAS,CAACG;AACzB,CAAC;AAED7D,QAAQ,CAAC+D,YAAY,GAAG;EACtB5D,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,IAAI;EAChBF,QAAQ,EAAE,IAAI;EACdG,YAAY,EAAE,KAAK;EACnBC,OAAO,EAAE,EAAE;EACXM,SAAS,EAAE,KAAK;EAChBE,SAAS,EAAEC,gCAAqB;EAChCR,UAAU,EAAE,KAAK;EACjBU,YAAY,EAAE,IAAI;EAClBR,mBAAmB,EAAEC,mCAAwB;EAC7CS,WAAW,EAAE;AACf,CAAC;AAAC,IAAA6C,QAAA,GAAAC,OAAA,cAEajE,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"Resolver.js","names":["_react","_interopRequireDefault","require","_error","_router","_propTypes","_components","_helpers","_containers","_constants","Resolver","props","pageData","itemId","itemEntity","isStatusPage","fullUrl","disableSsr","_props$rootSelectorCl","rootSelectorClasses","RESOLVER_CONTAINER_CLASS","_props$isPreview","isPreview","_props$errorCode","errorCode","NOT_FOUND_STATUS_CODE","_props$errorMessage","errorMessage","_props$redirecting","redirecting","router","useRouter","window","asPath","location","hash","url","URL","href","searchParams","set","Date","now","push","createElement","Fragment","statusCode","title","DebugSidebar","className","ContentContainer","getInitialProps","_ref","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","checkUrl","stop","_x","apply","arguments","propTypes","PropTypes","string","object","bool","number","defaultProps","_default","exports"],"sources":["../../src/pages/Resolver.js"],"sourcesContent":["import React from 'react';\nimport NextError from 'next/error';\nimport { useRouter } from 'next/router';\nimport PropTypes from 'prop-types';\nimport { DebugSidebar } from '../components';\nimport { checkUrl } from '../helpers';\nimport { ContentContainer } from '../containers';\nimport { NOT_FOUND_STATUS_CODE, RESOLVER_CONTAINER_CLASS } from '../constants';\n\nconst Resolver = props => {\n const {\n pageData,\n itemId,\n itemEntity,\n isStatusPage,\n fullUrl,\n disableSsr,\n rootSelectorClasses = RESOLVER_CONTAINER_CLASS,\n isPreview = false,\n errorCode = NOT_FOUND_STATUS_CODE,\n errorMessage = null,\n redirecting = false\n } = props;\n\n const router = useRouter();\n\n if (disableSsr) {\n if (typeof window !== 'undefined') {\n let { asPath } = router;\n if (window.location.hash) {\n // handle nextjs issue not calling getInitialProps if pushing a url with a hash in it\n // we add a new query string param to force calling getInitialProps\n // this should only happen if disableSsr and window.location.hash\n const url = new URL(router.asPath, window.location.href);\n if (url.hash) url.searchParams.set('_h', Date.now());\n asPath = url;\n }\n router.push('/Resolver', asPath);\n }\n return '';\n }\n\n if (redirecting) return null;\n\n if (isStatusPage) return 'OK';\n\n if (!pageData || !itemId || !itemEntity) {\n return (\n <>\n <NextError statusCode={errorCode} title={errorMessage} />\n <DebugSidebar itemId={itemId} itemEntity={itemEntity} />\n </>\n );\n }\n\n return (\n <div className={rootSelectorClasses}>\n <ContentContainer\n pageData={pageData}\n itemId={itemId}\n itemEntity={itemEntity}\n isPreview={isPreview}\n fullUrl={fullUrl}\n />\n\n <DebugSidebar itemId={itemId} itemEntity={itemEntity} />\n </div>\n );\n};\n\nResolver.getInitialProps = async props => checkUrl(props);\n\nResolver.propTypes = {\n itemId: PropTypes.string,\n itemEntity: PropTypes.string,\n pageData: PropTypes.object,\n isStatusPage: PropTypes.bool,\n fullUrl: PropTypes.string,\n isPreview: PropTypes.bool,\n errorCode: PropTypes.number,\n disableSsr: PropTypes.bool,\n errorMessage: PropTypes.string,\n rootSelectorClasses: PropTypes.string,\n redirecting: PropTypes.bool\n};\n\nResolver.defaultProps = {\n itemId: null,\n itemEntity: null,\n pageData: null,\n isStatusPage: false,\n fullUrl: '',\n isPreview: false,\n errorCode: NOT_FOUND_STATUS_CODE,\n disableSsr: false,\n errorMessage: null,\n rootSelectorClasses: RESOLVER_CONTAINER_CLASS,\n redirecting: false\n};\n\nexport default Resolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAEA,IAAMQ,QAAQ,GAAG,SAAXA,QAAQA,CAAGC,KAAK,EAAI;EACxB,IACEC,QAAQ,GAWND,KAAK,CAXPC,QAAQ;IACRC,MAAM,GAUJF,KAAK,CAVPE,MAAM;IACNC,UAAU,GASRH,KAAK,CATPG,UAAU;IACVC,YAAY,GAQVJ,KAAK,CARPI,YAAY;IACZC,OAAO,GAOLL,KAAK,CAPPK,OAAO;IACPC,UAAU,GAMRN,KAAK,CANPM,UAAU;IAAAC,qBAAA,GAMRP,KAAK,CALPQ,mBAAmB;IAAnBA,mBAAmB,GAAAD,qBAAA,cAAGE,mCAAwB,GAAAF,qBAAA;IAAAG,gBAAA,GAK5CV,KAAK,CAJPW,SAAS;IAATA,SAAS,GAAAD,gBAAA,cAAG,KAAK,GAAAA,gBAAA;IAAAE,gBAAA,GAIfZ,KAAK,CAHPa,SAAS;IAATA,SAAS,GAAAD,gBAAA,cAAGE,gCAAqB,GAAAF,gBAAA;IAAAG,mBAA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AI;EAC1B7C,YAAY,EAAE0C,qBAAS,CAACC,MAAM;EAC9BnD,mBAAmB,EAAEkD,qBAAS,CAACC,MAAM;EACrCzC,WAAW,EAAEwC,qBAAS,CAACG;AACzB,CAAC;AAED9D,QAAQ,CAACgE,YAAY,GAAG;EACtB7D,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,IAAI;EAChBF,QAAQ,EAAE,IAAI;EACdG,YAAY,EAAE,KAAK;EACnBC,OAAO,EAAE,EAAE;EACXM,SAAS,EAAE,KAAK;EAChBE,SAAS,EAAEC,gCAAqB;EAChCR,UAAU,EAAE,KAAK;EACjBU,YAAY,EAAE,IAAI;EAClBR,mBAAmB,EAAEC,mCAAwB;EAC7CS,WAAW,EAAE;AACf,CAAC;AAAC,IAAA8C,QAAA,GAAAC,OAAA,cAEalE,QAAQ","ignoreList":[]}
@@ -40,10 +40,15 @@ const Resolver = props => {
40
40
  }
41
41
  if (redirecting) return null;
42
42
  if (isStatusPage) return 'OK';
43
- if (!pageData || !itemId || !itemEntity) return /*#__PURE__*/React.createElement(NextError, {
44
- statusCode: errorCode,
45
- title: errorMessage
46
- });
43
+ if (!pageData || !itemId || !itemEntity) {
44
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NextError, {
45
+ statusCode: errorCode,
46
+ title: errorMessage
47
+ }), /*#__PURE__*/React.createElement(DebugSidebar, {
48
+ itemId: itemId,
49
+ itemEntity: itemEntity
50
+ }));
51
+ }
47
52
  return /*#__PURE__*/React.createElement("div", {
48
53
  className: rootSelectorClasses
49
54
  }, /*#__PURE__*/React.createElement(ContentContainer, {
@@ -1 +1 @@
1
- {"version":3,"file":"Resolver.js","names":["React","NextError","useRouter","PropTypes","DebugSidebar","checkUrl","ContentContainer","NOT_FOUND_STATUS_CODE","RESOLVER_CONTAINER_CLASS","Resolver","props","pageData","itemId","itemEntity","isStatusPage","fullUrl","disableSsr","rootSelectorClasses","isPreview","errorCode","errorMessage","redirecting","router","window","asPath","location","hash","url","URL","href","searchParams","set","Date","now","push","createElement","statusCode","title","className","getInitialProps","propTypes","string","object","bool","number","defaultProps"],"sources":["../../src/pages/Resolver.js"],"sourcesContent":["import React from 'react';\nimport NextError from 'next/error';\nimport { useRouter } from 'next/router';\nimport PropTypes from 'prop-types';\nimport { DebugSidebar } from '../components';\nimport { checkUrl } from '../helpers';\nimport { ContentContainer } from '../containers';\nimport { NOT_FOUND_STATUS_CODE, RESOLVER_CONTAINER_CLASS } from '../constants';\n\nconst Resolver = props => {\n const {\n pageData,\n itemId,\n itemEntity,\n isStatusPage,\n fullUrl,\n disableSsr,\n rootSelectorClasses = RESOLVER_CONTAINER_CLASS,\n isPreview = false,\n errorCode = NOT_FOUND_STATUS_CODE,\n errorMessage = null,\n redirecting = false\n } = props;\n\n const router = useRouter();\n\n if (disableSsr) {\n if (typeof window !== 'undefined') {\n let { asPath } = router;\n if (window.location.hash) {\n // handle nextjs issue not calling getInitialProps if pushing a url with a hash in it\n // we add a new query string param to force calling getInitialProps\n // this should only happen if disableSsr and window.location.hash\n const url = new URL(router.asPath, window.location.href);\n if (url.hash) url.searchParams.set('_h', Date.now());\n asPath = url;\n }\n router.push('/Resolver', asPath);\n }\n return '';\n }\n\n if (redirecting) return null;\n\n if (isStatusPage) return 'OK';\n\n if (!pageData || !itemId || !itemEntity)\n return <NextError statusCode={errorCode} title={errorMessage} />;\n\n return (\n <div className={rootSelectorClasses}>\n <ContentContainer\n pageData={pageData}\n itemId={itemId}\n itemEntity={itemEntity}\n isPreview={isPreview}\n fullUrl={fullUrl}\n />\n\n <DebugSidebar itemId={itemId} itemEntity={itemEntity} />\n </div>\n );\n};\n\nResolver.getInitialProps = async props => checkUrl(props);\n\nResolver.propTypes = {\n itemId: PropTypes.string,\n itemEntity: PropTypes.string,\n pageData: PropTypes.object,\n isStatusPage: PropTypes.bool,\n fullUrl: PropTypes.string,\n isPreview: PropTypes.bool,\n errorCode: PropTypes.number,\n disableSsr: PropTypes.bool,\n errorMessage: PropTypes.string,\n rootSelectorClasses: PropTypes.string,\n redirecting: PropTypes.bool\n};\n\nResolver.defaultProps = {\n itemId: null,\n itemEntity: null,\n pageData: null,\n isStatusPage: false,\n fullUrl: '',\n isPreview: false,\n errorCode: NOT_FOUND_STATUS_CODE,\n disableSsr: false,\n errorMessage: null,\n rootSelectorClasses: RESOLVER_CONTAINER_CLASS,\n redirecting: false\n};\n\nexport default Resolver;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,aAAa;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,eAAe;AAC5C,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,gBAAgB,QAAQ,eAAe;AAChD,SAASC,qBAAqB,EAAEC,wBAAwB,QAAQ,cAAc;AAE9E,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IACJC,QAAQ;IACRC,MAAM;IACNC,UAAU;IACVC,YAAY;IACZC,OAAO;IACPC,UAAU;IACVC,mBAAmB,GAAGT,wBAAwB;IAC9CU,SAAS,GAAG,KAAK;IACjBC,SAAS,GAAGZ,qBAAqB;IACjCa,YAAY,GAAG,IAAI;IACnBC,WAAW,GAAG;EAChB,CAAC,GAAGX,KAAK;EAET,MAAMY,MAAM,GAAGpB,SAAS,CAAC,CAAC;EAE1B,IAAIc,UAAU,EAAE;IACd,IAAI,OAAOO,MAAM,KAAK,WAAW,EAAE;MACjC,IAAI;QAAEC;MAAO,CAAC,GAAGF,MAAM;MACvB,IAAIC,MAAM,CAACE,QAAQ,CAACC,IAAI,EAAE;QACxB;QACA;QACA;QACA,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAACN,MAAM,CAACE,MAAM,EAAED,MAAM,CAACE,QAAQ,CAACI,IAAI,CAAC;QACxD,IAAIF,GAAG,CAACD,IAAI,EAAEC,GAAG,CAACG,YAAY,CAACC,GAAG,CAAC,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S,CAACwC,IAAI;EAC1BvB,YAAY,EAAEjB,SAAS,CAACsC,MAAM;EAC9BxB,mBAAmB,EAAEd,SAAS,CAACsC,MAAM;EACrCpB,WAAW,EAAElB,SAAS,CAACwC;AACzB,CAAC;AAEDlC,QAAQ,CAACoC,YAAY,GAAG;EACtBjC,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,IAAI;EAChBF,QAAQ,EAAE,IAAI;EACdG,YAAY,EAAE,KAAK;EACnBC,OAAO,EAAE,EAAE;EACXG,SAAS,EAAE,KAAK;EAChBC,SAAS,EAAEZ,qBAAqB;EAChCS,UAAU,EAAE,KAAK;EACjBI,YAAY,EAAE,IAAI;EAClBH,mBAAmB,EAAET,wBAAwB;EAC7Ca,WAAW,EAAE;AACf,CAAC;AAED,eAAeZ,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"Resolver.js","names":["React","NextError","useRouter","PropTypes","DebugSidebar","checkUrl","ContentContainer","NOT_FOUND_STATUS_CODE","RESOLVER_CONTAINER_CLASS","Resolver","props","pageData","itemId","itemEntity","isStatusPage","fullUrl","disableSsr","rootSelectorClasses","isPreview","errorCode","errorMessage","redirecting","router","window","asPath","location","hash","url","URL","href","searchParams","set","Date","now","push","createElement","Fragment","statusCode","title","className","getInitialProps","propTypes","string","object","bool","number","defaultProps"],"sources":["../../src/pages/Resolver.js"],"sourcesContent":["import React from 'react';\nimport NextError from 'next/error';\nimport { useRouter } from 'next/router';\nimport PropTypes from 'prop-types';\nimport { DebugSidebar } from '../components';\nimport { checkUrl } from '../helpers';\nimport { ContentContainer } from '../containers';\nimport { NOT_FOUND_STATUS_CODE, RESOLVER_CONTAINER_CLASS } from '../constants';\n\nconst Resolver = props => {\n const {\n pageData,\n itemId,\n itemEntity,\n isStatusPage,\n fullUrl,\n disableSsr,\n rootSelectorClasses = RESOLVER_CONTAINER_CLASS,\n isPreview = false,\n errorCode = NOT_FOUND_STATUS_CODE,\n errorMessage = null,\n redirecting = false\n } = props;\n\n const router = useRouter();\n\n if (disableSsr) {\n if (typeof window !== 'undefined') {\n let { asPath } = router;\n if (window.location.hash) {\n // handle nextjs issue not calling getInitialProps if pushing a url with a hash in it\n // we add a new query string param to force calling getInitialProps\n // this should only happen if disableSsr and window.location.hash\n const url = new URL(router.asPath, window.location.href);\n if (url.hash) url.searchParams.set('_h', Date.now());\n asPath = url;\n }\n router.push('/Resolver', asPath);\n }\n return '';\n }\n\n if (redirecting) return null;\n\n if (isStatusPage) return 'OK';\n\n if (!pageData || !itemId || !itemEntity) {\n return (\n <>\n <NextError statusCode={errorCode} title={errorMessage} />\n <DebugSidebar itemId={itemId} itemEntity={itemEntity} />\n </>\n );\n }\n\n return (\n <div className={rootSelectorClasses}>\n <ContentContainer\n pageData={pageData}\n itemId={itemId}\n itemEntity={itemEntity}\n isPreview={isPreview}\n fullUrl={fullUrl}\n />\n\n <DebugSidebar itemId={itemId} itemEntity={itemEntity} />\n </div>\n );\n};\n\nResolver.getInitialProps = async props => checkUrl(props);\n\nResolver.propTypes = {\n itemId: PropTypes.string,\n itemEntity: PropTypes.string,\n pageData: PropTypes.object,\n isStatusPage: PropTypes.bool,\n fullUrl: PropTypes.string,\n isPreview: PropTypes.bool,\n errorCode: PropTypes.number,\n disableSsr: PropTypes.bool,\n errorMessage: PropTypes.string,\n rootSelectorClasses: PropTypes.string,\n redirecting: PropTypes.bool\n};\n\nResolver.defaultProps = {\n itemId: null,\n itemEntity: null,\n pageData: null,\n isStatusPage: false,\n fullUrl: '',\n isPreview: false,\n errorCode: NOT_FOUND_STATUS_CODE,\n disableSsr: false,\n errorMessage: null,\n rootSelectorClasses: RESOLVER_CONTAINER_CLASS,\n redirecting: false\n};\n\nexport default Resolver;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,aAAa;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,eAAe;AAC5C,SAASC,Q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dG,YAAY,EAAE,KAAK;EACnBC,OAAO,EAAE,EAAE;EACXG,SAAS,EAAE,KAAK;EAChBC,SAAS,EAAEZ,qBAAqB;EAChCS,UAAU,EAAE,KAAK;EACjBI,YAAY,EAAE,IAAI;EAClBH,mBAAmB,EAAET,wBAAwB;EAC7Ca,WAAW,EAAE;AACf,CAAC;AAED,eAAeZ,QAAQ","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/nextjs-tools",
3
- "version": "0.146.0-alpha.30",
3
+ "version": "0.146.0-alpha.32",
4
4
  "description": "Blaze nextjs tools",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -35,13 +35,13 @@
35
35
  "@blaze-cms/nextjs-components": "0.146.0-alpha.28",
36
36
  "@blaze-cms/plugin-auth-fe": "0.146.0-alpha.28",
37
37
  "@blaze-cms/plugin-auth-local-fe": "0.146.0-alpha.26",
38
- "@blaze-cms/plugin-google-maps-fe": "0.146.0-alpha.30",
39
- "@blaze-cms/plugin-gtm-fe": "0.146.0-alpha.30",
40
- "@blaze-cms/plugin-page-builder-fe": "0.146.0-alpha.30",
38
+ "@blaze-cms/plugin-google-maps-fe": "0.146.0-alpha.32",
39
+ "@blaze-cms/plugin-gtm-fe": "0.146.0-alpha.32",
40
+ "@blaze-cms/plugin-page-builder-fe": "0.146.0-alpha.32",
41
41
  "@blaze-cms/plugin-preview-fe": "0.146.0-alpha.26",
42
42
  "@blaze-cms/plugin-search-ui": "0.146.0-alpha.30",
43
43
  "@blaze-cms/plugin-structured-data-fe": "^0.140.3",
44
- "@blaze-cms/react-page-builder": "0.146.0-alpha.30",
44
+ "@blaze-cms/react-page-builder": "0.146.0-alpha.32",
45
45
  "@blaze-cms/setup-ui": "^0.140.3",
46
46
  "autoprefixer": "^10.2.3",
47
47
  "core-js": "^3.2.1",
@@ -69,5 +69,5 @@
69
69
  "lib/*",
70
70
  "lib-es/*"
71
71
  ],
72
- "gitHead": "1bbdb1f58b5130d100a6a02b27e47193317f529e"
72
+ "gitHead": "2bb1bfa4e03f7ad0f80b4ae67bc3130956cfca71"
73
73
  }
@@ -44,8 +44,14 @@ const Resolver = props => {
44
44
 
45
45
  if (isStatusPage) return 'OK';
46
46
 
47
- if (!pageData || !itemId || !itemEntity)
48
- return <NextError statusCode={errorCode} title={errorMessage} />;
47
+ if (!pageData || !itemId || !itemEntity) {
48
+ return (
49
+ <>
50
+ <NextError statusCode={errorCode} title={errorMessage} />
51
+ <DebugSidebar itemId={itemId} itemEntity={itemEntity} />
52
+ </>
53
+ );
54
+ }
49
55
 
50
56
  return (
51
57
  <div className={rootSelectorClasses}>