@blaze-cms/nextjs-tools 0.146.0-node18-core-styles-tooltips.44 → 0.146.0-node18-core-styles-tooltips.45

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/blaze.config.js +2 -0
  3. package/lib/blaze.config.js.map +1 -1
  4. package/lib/pages/document/_document.js +12 -3
  5. package/lib/pages/document/_document.js.map +1 -1
  6. package/package.json +11 -10
  7. package/src/blaze.config.js +3 -1
  8. package/src/pages/document/_document.js +10 -3
  9. package/tests/unit/src/application/query/__snapshots__/index.test.js.snap +6 -0
  10. package/tests/unit/src/helpers/static-route-handlers/__snapshots__/generic-file-handler.test.js.snap +2 -0
  11. package/tests/unit/src/helpers/static-route-handlers/__snapshots__/llms.test.js.snap +1 -0
  12. package/tests/unit/src/helpers/static-route-handlers/__snapshots__/robots-txt.test.js.snap +1 -0
  13. package/tests/unit/src/helpers/static-route-handlers/__snapshots__/sitemap-file.test.js.snap +2 -0
  14. package/tests/unit/src/helpers/static-route-handlers/__snapshots__/sitemap.test.js.snap +1 -0
  15. package/lib-es/application/query/index.js +0 -71
  16. package/lib-es/application/query/index.js.map +0 -1
  17. package/lib-es/blaze.config.js +0 -26
  18. package/lib-es/blaze.config.js.map +0 -1
  19. package/lib-es/components/DebugSidebar/DebugSidebar.js +0 -107
  20. package/lib-es/components/DebugSidebar/DebugSidebar.js.map +0 -1
  21. package/lib-es/components/DebugSidebar/DebugSidebarRender.js +0 -57
  22. package/lib-es/components/DebugSidebar/DebugSidebarRender.js.map +0 -1
  23. package/lib-es/components/DebugSidebar/index.js +0 -3
  24. package/lib-es/components/DebugSidebar/index.js.map +0 -1
  25. package/lib-es/components/HashObserver.js +0 -7
  26. package/lib-es/components/HashObserver.js.map +0 -1
  27. package/lib-es/components/index.js +0 -4
  28. package/lib-es/components/index.js.map +0 -1
  29. package/lib-es/constants.js +0 -102
  30. package/lib-es/constants.js.map +0 -1
  31. package/lib-es/containers/ContentContainer.js +0 -94
  32. package/lib-es/containers/ContentContainer.js.map +0 -1
  33. package/lib-es/containers/index.js +0 -3
  34. package/lib-es/containers/index.js.map +0 -1
  35. package/lib-es/helpers/build-admin-href.js +0 -11
  36. package/lib-es/helpers/build-admin-href.js.map +0 -1
  37. package/lib-es/helpers/check-for-gtm.js +0 -11
  38. package/lib-es/helpers/check-for-gtm.js.map +0 -1
  39. package/lib-es/helpers/check-parent.js +0 -8
  40. package/lib-es/helpers/check-parent.js.map +0 -1
  41. package/lib-es/helpers/check-preview-url.js +0 -9
  42. package/lib-es/helpers/check-preview-url.js.map +0 -1
  43. package/lib-es/helpers/check-url.js +0 -245
  44. package/lib-es/helpers/check-url.js.map +0 -1
  45. package/lib-es/helpers/get-entitys-actions.js +0 -16
  46. package/lib-es/helpers/get-entitys-actions.js.map +0 -1
  47. package/lib-es/helpers/get-error-message.js +0 -13
  48. package/lib-es/helpers/get-error-message.js.map +0 -1
  49. package/lib-es/helpers/get-from-local.js +0 -11
  50. package/lib-es/helpers/get-from-local.js.map +0 -1
  51. package/lib-es/helpers/get-page-data.js +0 -39
  52. package/lib-es/helpers/get-page-data.js.map +0 -1
  53. package/lib-es/helpers/get-root-selector-classes.js +0 -14
  54. package/lib-es/helpers/get-root-selector-classes.js.map +0 -1
  55. package/lib-es/helpers/get-search-filter.js +0 -14
  56. package/lib-es/helpers/get-search-filter.js.map +0 -1
  57. package/lib-es/helpers/handle-static-routes.js +0 -12
  58. package/lib-es/helpers/handle-static-routes.js.map +0 -1
  59. package/lib-es/helpers/index.js +0 -14
  60. package/lib-es/helpers/index.js.map +0 -1
  61. package/lib-es/helpers/render-apple-tags.js +0 -13
  62. package/lib-es/helpers/render-apple-tags.js.map +0 -1
  63. package/lib-es/helpers/set-blaze-debug.js +0 -31
  64. package/lib-es/helpers/set-blaze-debug.js.map +0 -1
  65. package/lib-es/helpers/static-route-handlers/generic-file-handler.js +0 -43
  66. package/lib-es/helpers/static-route-handlers/generic-file-handler.js.map +0 -1
  67. package/lib-es/helpers/static-route-handlers/index.js +0 -27
  68. package/lib-es/helpers/static-route-handlers/index.js.map +0 -1
  69. package/lib-es/helpers/static-route-handlers/llms.js +0 -19
  70. package/lib-es/helpers/static-route-handlers/llms.js.map +0 -1
  71. package/lib-es/helpers/static-route-handlers/robots-txt.js +0 -19
  72. package/lib-es/helpers/static-route-handlers/robots-txt.js.map +0 -1
  73. package/lib-es/helpers/static-route-handlers/sitemap-file.js +0 -27
  74. package/lib-es/helpers/static-route-handlers/sitemap-file.js.map +0 -1
  75. package/lib-es/helpers/static-route-handlers/sitemap.js +0 -19
  76. package/lib-es/helpers/static-route-handlers/sitemap.js.map +0 -1
  77. package/lib-es/hoc/withBlaze.js +0 -153
  78. package/lib-es/hoc/withBlaze.js.map +0 -1
  79. package/lib-es/hooks/use-get-page.js +0 -19
  80. package/lib-es/hooks/use-get-page.js.map +0 -1
  81. package/lib-es/hooks/use-hash-observer.js +0 -94
  82. package/lib-es/hooks/use-hash-observer.js.map +0 -1
  83. package/lib-es/index.js +0 -9
  84. package/lib-es/index.js.map +0 -1
  85. package/lib-es/pages/Resolver.js +0 -88
  86. package/lib-es/pages/Resolver.js.map +0 -1
  87. package/lib-es/pages/document/DocumentBody.js +0 -11
  88. package/lib-es/pages/document/DocumentBody.js.map +0 -1
  89. package/lib-es/pages/document/_document.js +0 -21
  90. package/lib-es/pages/document/_document.js.map +0 -1
  91. package/lib-es/server/index.js +0 -16
  92. package/lib-es/server/index.js.map +0 -1
  93. package/lib-es/server/routes.js +0 -36
  94. package/lib-es/server/routes.js.map +0 -1
@@ -1,94 +0,0 @@
1
- import { useEffect } from 'react';
2
- import Router from 'next/router';
3
- const DEFAULT_TIMEOUT = 3000;
4
- function useHashObserver(timeout = DEFAULT_TIMEOUT) {
5
- useEffect(() => {
6
- if (typeof window === 'undefined') return undefined;
7
- let observer = null;
8
- let timeoutId = null;
9
- let currentHash = null;
10
- let isObserving = false;
11
- const scrollToElement = hash => {
12
- if (!hash) return false;
13
- const id = hash.startsWith('#') ? hash.slice(1) : hash;
14
- const element = document.getElementById(id);
15
- if (element) {
16
- element.scrollIntoView();
17
- return true;
18
- }
19
- return false;
20
- };
21
- const stopObserving = () => {
22
- if (observer) {
23
- observer.disconnect();
24
- observer = null;
25
- }
26
- if (timeoutId) {
27
- clearTimeout(timeoutId);
28
- timeoutId = null;
29
- }
30
- isObserving = false;
31
- currentHash = null;
32
- };
33
- const startObserving = hash => {
34
- if (isObserving) {
35
- stopObserving();
36
- }
37
- currentHash = hash;
38
- isObserving = true;
39
- if (scrollToElement(hash)) {
40
- stopObserving();
41
- return;
42
- }
43
- observer = new MutationObserver(() => {
44
- if (scrollToElement(currentHash)) {
45
- stopObserving();
46
- }
47
- });
48
- const targetNode = document.getElementById('__next') || document.getElementById('root') || document.body;
49
- observer.observe(targetNode, {
50
- childList: true,
51
- subtree: true
52
- });
53
- timeoutId = setTimeout(() => {
54
- stopObserving();
55
- }, timeout);
56
- };
57
- const handleRouteChange = url => {
58
- const hashIndex = url.indexOf('#');
59
- if (hashIndex === -1) {
60
- stopObserving();
61
- return;
62
- }
63
- const hash = url.slice(hashIndex);
64
- if (hash) {
65
- startObserving(hash);
66
- }
67
- };
68
- const handleHashChange = url => {
69
- const hashIndex = url.indexOf('#');
70
- if (hashIndex === -1) {
71
- stopObserving();
72
- return;
73
- }
74
- const hash = url.slice(hashIndex);
75
- if (hash) {
76
- startObserving(hash);
77
- } else {
78
- stopObserving();
79
- }
80
- };
81
- Router.events.on('routeChangeComplete', handleRouteChange);
82
- Router.events.on('hashChangeComplete', handleHashChange);
83
- if (window.location.hash) {
84
- startObserving(window.location.hash);
85
- }
86
- return () => {
87
- stopObserving();
88
- Router.events.off('routeChangeComplete', handleRouteChange);
89
- Router.events.off('hashChangeComplete', handleHashChange);
90
- };
91
- }, [timeout]);
92
- }
93
- export default useHashObserver;
94
- //# sourceMappingURL=use-hash-observer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-hash-observer.js","names":["useEffect","Router","DEFAULT_TIMEOUT","useHashObserver","timeout","window","undefined","observer","timeoutId","currentHash","isObserving","scrollToElement","hash","id","startsWith","slice","element","document","getElementById","scrollIntoView","stopObserving","disconnect","clearTimeout","startObserving","MutationObserver","targetNode","body","observe","childList","subtree","setTimeout","handleRouteChange","url","hashIndex","indexOf","handleHashChange","events","on","location","off"],"sources":["../../src/hooks/use-hash-observer.js"],"sourcesContent":["import { useEffect } from 'react';\nimport Router from 'next/router';\n\nconst DEFAULT_TIMEOUT = 3000;\n\nfunction useHashObserver(timeout = DEFAULT_TIMEOUT) {\n useEffect(\n () => {\n if (typeof window === 'undefined') return undefined;\n\n let observer = null;\n let timeoutId = null;\n let currentHash = null;\n let isObserving = false;\n\n const scrollToElement = hash => {\n if (!hash) return false;\n\n const id = hash.startsWith('#') ? hash.slice(1) : hash;\n const element = document.getElementById(id);\n\n if (element) {\n element.scrollIntoView();\n return true;\n }\n\n return false;\n };\n\n const stopObserving = () => {\n if (observer) {\n observer.disconnect();\n observer = null;\n }\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n isObserving = false;\n currentHash = null;\n };\n\n const startObserving = hash => {\n if (isObserving) {\n stopObserving();\n }\n\n currentHash = hash;\n isObserving = true;\n\n if (scrollToElement(hash)) {\n stopObserving();\n return;\n }\n\n observer = new MutationObserver(() => {\n if (scrollToElement(currentHash)) {\n stopObserving();\n }\n });\n\n const targetNode =\n document.getElementById('__next') || document.getElementById('root') || document.body;\n observer.observe(targetNode, {\n childList: true,\n subtree: true\n });\n\n timeoutId = setTimeout(() => {\n stopObserving();\n }, timeout);\n };\n\n const handleRouteChange = url => {\n const hashIndex = url.indexOf('#');\n if (hashIndex === -1) {\n stopObserving();\n return;\n }\n\n const hash = url.slice(hashIndex);\n if (hash) {\n startObserving(hash);\n }\n };\n\n const handleHashChange = url => {\n const hashIndex = url.indexOf('#');\n if (hashIndex === -1) {\n stopObserving();\n return;\n }\n\n const hash = url.slice(hashIndex);\n if (hash) {\n startObserving(hash);\n } else {\n stopObserving();\n }\n };\n\n Router.events.on('routeChangeComplete', handleRouteChange);\n Router.events.on('hashChangeComplete', handleHashChange);\n\n if (window.location.hash) {\n startObserving(window.location.hash);\n }\n\n return () => {\n stopObserving();\n Router.events.off('routeChangeComplete', handleRouteChange);\n Router.events.off('hashChangeComplete', handleHashChange);\n };\n },\n [timeout]\n );\n}\n\nexport default useHashObserver;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,OAAOC,MAAM,MAAM,aAAa;AAEhC,MAAMC,eAAe,GAAG,IAAI;AAE5B,SAASC,eAAeA,CAACC,OAAO,GAAGF,eAAe,EAAE;EAClDF,SAAS,CACP,MAAM;IACJ,IAAI,OAAOK,MAAM,KAAK,WAAW,EAAE,OAAOC,SAAS;IAEnD,IAAIC,QAAQ,GAAG,IAAI;IACnB,IAAIC,SAAS,GAAG,IAAI;IACpB,IAAIC,WAAW,GAAG,IAAI;IACtB,IAAIC,WAAW,GAAG,KAAK;IAEvB,MAAMC,eAAe,GAAGC,IAAI,IAAI;MAC9B,IAAI,CAACA,IAAI,EAAE,OAAO,KAAK;MAEvB,MAAMC,EAAE,GAAGD,IAAI,CAACE,UAAU,CAAC,GAAG,CAAC,GAAGF,IAAI,CAACG,KAAK,CAAC,CAAC,CAAC,GAAGH,IAAI;MACtD,MAAMI,OAAO,GAAGC,QAAQ,CAACC,cAAc,CAACL,EAAE,CAAC;MAE3C,IAAIG,OAAO,EAAE;QACXA,OAAO,CAACG,cAAc,CAAC,CAAC;QACxB,OAAO,IAAI;MACb;MAEA,OAAO,KAAK;IACd,CAAC;IAED,MAAMC,aAAa,GAAGA,CAAA,KAAM;MAC1B,IAAIb,QAAQ,EAAE;QACZA,QAAQ,CAACc,UAAU,CAAC,CAAC;QACrBd,QAAQ,GAAG,IAAI;MACjB;MACA,IAAIC,SAAS,EAAE;QACbc,YAAY,CAACd,SAAS,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AG,CAAC;MAClC,IAAID,SAAS,KAAK,CAAC,CAAC,EAAE;QACpBb,aAAa,CAAC,CAAC;QACf;MACF;MAEA,MAAMR,IAAI,GAAGoB,GAAG,CAACjB,KAAK,CAACkB,SAAS,CAAC;MACjC,IAAIrB,IAAI,EAAE;QACRW,cAAc,CAACX,IAAI,CAAC;MACtB,CAAC,MAAM;QACLQ,aAAa,CAAC,CAAC;MACjB;IACF,CAAC;IAEDnB,MAAM,CAACmC,MAAM,CAACC,EAAE,CAAC,qBAAqB,EAAEN,iBAAiB,CAAC;IAC1D9B,MAAM,CAACmC,MAAM,CAACC,EAAE,CAAC,oBAAoB,EAAEF,gBAAgB,CAAC;IAExD,IAAI9B,MAAM,CAACiC,QAAQ,CAAC1B,IAAI,EAAE;MACxBW,cAAc,CAAClB,MAAM,CAACiC,QAAQ,CAAC1B,IAAI,CAAC;IACtC;IAEA,OAAO,MAAM;MACXQ,aAAa,CAAC,CAAC;MACfnB,MAAM,CAACmC,MAAM,CAACG,GAAG,CAAC,qBAAqB,EAAER,iBAAiB,CAAC;MAC3D9B,MAAM,CAACmC,MAAM,CAACG,GAAG,CAAC,oBAAoB,EAAEJ,gBAAgB,CAAC;IAC3D,CAAC;EACH,CAAC,EACD,CAAC/B,OAAO,CACV,CAAC;AACH;AAEA,eAAeD,eAAe","ignoreList":[]}
package/lib-es/index.js DELETED
@@ -1,9 +0,0 @@
1
- import * as reactApollo from '@apollo/client';
2
- export { reactApollo };
3
- export { SearchPublishedContent } from '@blaze-cms/plugin-search-ui';
4
- export { MainContext, MainContextProvider } from '@blaze-cms/nextjs-components';
5
- export { default as withBlaze } from './hoc/withBlaze';
6
- export { default as Resolver } from './pages/Resolver';
7
- export { default as BlazeDocument } from './pages/document/_document';
8
- // export { default as router } from './server/routes';
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["reactApollo","SearchPublishedContent","MainContext","MainContextProvider","default","withBlaze","Resolver","BlazeDocument"],"sources":["../src/index.js"],"sourcesContent":["import * as reactApollo from '@apollo/client';\n\nexport { reactApollo };\nexport { SearchPublishedContent } from '@blaze-cms/plugin-search-ui';\nexport { MainContext, MainContextProvider } from '@blaze-cms/nextjs-components';\nexport { default as withBlaze } from './hoc/withBlaze';\nexport { default as Resolver } from './pages/Resolver';\nexport { default as BlazeDocument } from './pages/document/_document';\n// export { default as router } from './server/routes';\n"],"mappings":"AAAA,OAAO,KAAKA,WAAW,MAAM,gBAAgB;AAE7C,SAASA,WAAW;AACpB,SAASC,sBAAsB,QAAQ,6BAA6B;AACpE,SAASC,WAAW,EAAEC,mBAAmB,QAAQ,8BAA8B;AAC/E,SAASC,OAAO,IAAIC,SAAS,QAAQ,iBAAiB;AACtD,SAASD,OAAO,IAAIE,QAAQ,QAAQ,kBAAkB;AACtD,SAASF,OAAO,IAAIG,aAAa,QAAQ,4BAA4B;AACrE","ignoreList":[]}
@@ -1,88 +0,0 @@
1
- import React from 'react';
2
- import NextError from 'next/error';
3
- import { useRouter } from 'next/router';
4
- import PropTypes from 'prop-types';
5
- import { checkUrl } from '../helpers';
6
- import { ContentContainer } from '../containers';
7
- import { NOT_FOUND_STATUS_CODE, RESOLVER_CONTAINER_CLASS } from '../constants';
8
- const Resolver = props => {
9
- const {
10
- pageData,
11
- itemId,
12
- itemEntity,
13
- isStatusPage,
14
- fullUrl,
15
- disableSsr,
16
- rootSelectorClasses = RESOLVER_CONTAINER_CLASS,
17
- isPreview = false,
18
- errorCode = NOT_FOUND_STATUS_CODE,
19
- errorMessage = null,
20
- redirecting = false
21
- } = props;
22
- const router = useRouter();
23
- if (disableSsr) {
24
- if (typeof window !== 'undefined') {
25
- let {
26
- asPath
27
- } = router;
28
- if (window.location.hash) {
29
- // handle nextjs issue not calling getInitialProps if pushing a url with a hash in it
30
- // we add a new query string param to force calling getInitialProps
31
- // this should only happen if disableSsr and window.location.hash
32
- const url = new URL(router.asPath, window.location.href);
33
- if (url.hash) url.searchParams.set('_h', Date.now());
34
- asPath = url;
35
- }
36
- router.push('/Resolver', asPath);
37
- }
38
- return '';
39
- }
40
- if (redirecting) return null;
41
- if (isStatusPage) return 'OK';
42
- if (!pageData || !itemId || !itemEntity) {
43
- return /*#__PURE__*/React.createElement("div", {
44
- className: "next_error"
45
- }, /*#__PURE__*/React.createElement(NextError, {
46
- statusCode: errorCode,
47
- title: errorMessage
48
- }));
49
- }
50
- return /*#__PURE__*/React.createElement("div", {
51
- className: rootSelectorClasses
52
- }, /*#__PURE__*/React.createElement(ContentContainer, {
53
- pageData: pageData,
54
- itemId: itemId,
55
- itemEntity: itemEntity,
56
- isPreview: isPreview,
57
- fullUrl: fullUrl
58
- }));
59
- };
60
- Resolver.getInitialProps = async props => checkUrl(props);
61
- Resolver.propTypes = {
62
- itemId: PropTypes.string,
63
- itemEntity: PropTypes.string,
64
- pageData: PropTypes.object,
65
- isStatusPage: PropTypes.bool,
66
- fullUrl: PropTypes.string,
67
- isPreview: PropTypes.bool,
68
- errorCode: PropTypes.number,
69
- disableSsr: PropTypes.bool,
70
- errorMessage: PropTypes.string,
71
- rootSelectorClasses: PropTypes.string,
72
- redirecting: PropTypes.bool
73
- };
74
- Resolver.defaultProps = {
75
- itemId: null,
76
- itemEntity: null,
77
- pageData: null,
78
- isStatusPage: false,
79
- fullUrl: '',
80
- isPreview: false,
81
- errorCode: NOT_FOUND_STATUS_CODE,
82
- disableSsr: false,
83
- errorMessage: null,
84
- rootSelectorClasses: RESOLVER_CONTAINER_CLASS,
85
- redirecting: false
86
- };
87
- export default Resolver;
88
- //# sourceMappingURL=Resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Resolver.js","names":["React","NextError","useRouter","PropTypes","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","className","statusCode","title","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 { 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\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 <div className=\"next_error\">\n <NextError statusCode={errorCode} title={errorMessage} />\n </div>\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 </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,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,GAAGnB,SAAS,CAAC,CAAC;EAE1B,IAAIa,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,IAAI,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAC;QACpDT,MAAM,GAAGG,GAAG;MACd;MAEAL,MA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AAS,CAACuC;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,11 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Main, NextScript } from 'next/document';
4
- const DocumentBody = ({
5
- children
6
- }) => /*#__PURE__*/React.createElement("body", null, /*#__PURE__*/React.createElement(Main, null), /*#__PURE__*/React.createElement(NextScript, null), children);
7
- DocumentBody.propTypes = {
8
- children: PropTypes.object.isRequired
9
- };
10
- export default DocumentBody;
11
- //# sourceMappingURL=DocumentBody.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentBody.js","names":["React","PropTypes","Main","NextScript","DocumentBody","children","createElement","propTypes","object","isRequired"],"sources":["../../../src/pages/document/DocumentBody.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Main, NextScript } from 'next/document';\n\nconst DocumentBody = ({ children }) => (\n <body>\n <Main />\n <NextScript />\n {children}\n </body>\n);\n\nDocumentBody.propTypes = {\n children: PropTypes.object.isRequired\n};\n\nexport default DocumentBody;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,IAAI,EAAEC,UAAU,QAAQ,eAAe;AAEhD,MAAMC,YAAY,GAAGA,CAAC;EAAEC;AAAS,CAAC,kBAChCL,KAAA,CAAAM,aAAA,4BACEN,KAAA,CAAAM,aAAA,CAACJ,IAAI,MAAE,CAAC,eACRF,KAAA,CAAAM,aAAA,CAACH,UAAU,MAAE,CAAC,EACbE,QACG,CACP;AAEDD,YAAY,CAACG,SAAS,GAAG;EACvBF,QAAQ,EAAEJ,SAAS,CAACO,MAAM,CAACC;AAC7B,CAAC;AAED,eAAeL,YAAY","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import Document, { Html, Head } from 'next/document';
4
- import DocumentBody from './DocumentBody';
5
- import { renderAppleTags } from '../../helpers';
6
- const BlazeDocument = ({
7
- children
8
- }) => /*#__PURE__*/React.createElement(Html, {
9
- lang: "en"
10
- }, /*#__PURE__*/React.createElement(Head, null, /*#__PURE__*/React.createElement("link", {
11
- rel: "icon",
12
- href: "/static/img/favicon.png",
13
- type: "image/x-icon"
14
- }), renderAppleTags()), children);
15
- BlazeDocument.Document = Document;
16
- BlazeDocument.Body = DocumentBody;
17
- BlazeDocument.propTypes = {
18
- children: PropTypes.object.isRequired
19
- };
20
- export default BlazeDocument;
21
- //# sourceMappingURL=_document.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_document.js","names":["React","PropTypes","Document","Html","Head","DocumentBody","renderAppleTags","BlazeDocument","children","createElement","lang","rel","href","type","Body","propTypes","object","isRequired"],"sources":["../../../src/pages/document/_document.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Document, { Html, Head } from 'next/document';\nimport DocumentBody from './DocumentBody';\nimport { renderAppleTags } from '../../helpers';\n\nconst BlazeDocument = ({ children }) => (\n <Html lang=\"en\">\n <Head>\n <link rel=\"icon\" href=\"/static/img/favicon.png\" type=\"image/x-icon\" />\n {renderAppleTags()}\n </Head>\n {children}\n </Html>\n);\n\nBlazeDocument.Document = Document;\nBlazeDocument.Body = DocumentBody;\n\nBlazeDocument.propTypes = {\n children: PropTypes.object.isRequired\n};\n\nexport default BlazeDocument;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,QAAQ,IAAIC,IAAI,EAAEC,IAAI,QAAQ,eAAe;AACpD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,SAASC,eAAe,QAAQ,eAAe;AAE/C,MAAMC,aAAa,GAAGA,CAAC;EAAEC;AAAS,CAAC,kBACjCR,KAAA,CAAAS,aAAA,CAACN,IAAI;EAACO,IAAI,EAAC;AAAI,gBACbV,KAAA,CAAAS,aAAA,CAACL,IAAI,qBACHJ,KAAA,CAAAS,aAAA;EAAME,GAAG,EAAC,MAAM;EAACC,IAAI,EAAC,yBAAyB;EAACC,IAAI,EAAC;AAAc,CAAE,CAAC,EACrEP,eAAe,CAAC,CACb,CAAC,EACNE,QACG,CACP;AAEDD,aAAa,CAACL,QAAQ,GAAGA,QAAQ;AACjCK,aAAa,CAACO,IAAI,GAAGT,YAAY;AAEjCE,aAAa,CAACQ,SAAS,GAAG;EACxBP,QAAQ,EAAEP,SAAS,CAACe,MAAM,CAACC;AAC7B,CAAC;AAED,eAAeV,aAAa","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- const {
2
- createServer
3
- } = require('http');
4
- const port = parseInt(process.env.PORT, 10) || 3000;
5
- async function prepareServer(app) {
6
- // eslint-disable-next-line no-console
7
- console.warn('server.js is deprecated. Run directly with "next" cli instead.');
8
- const handler = app.getRequestHandler();
9
- await app.prepare();
10
- return {
11
- run: () => createServer(handler).listen(port),
12
- handler
13
- };
14
- }
15
- module.exports = prepareServer;
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["createServer","require","port","parseInt","process","env","PORT","prepareServer","app","console","warn","handler","getRequestHandler","prepare","run","listen","module","exports"],"sources":["../../src/server/index.js"],"sourcesContent":["const { createServer } = require('http');\n\nconst port = parseInt(process.env.PORT, 10) || 3000;\n\nasync function prepareServer(app) {\n // eslint-disable-next-line no-console\n console.warn('server.js is deprecated. Run directly with \"next\" cli instead.');\n const handler = app.getRequestHandler();\n\n await app.prepare();\n\n return { run: () => createServer(handler).listen(port), handler };\n}\n\nmodule.exports = prepareServer;\n"],"mappings":"AAAA,MAAM;EAAEA;AAAa,CAAC,GAAGC,OAAO,CAAC,MAAM,CAAC;AAExC,MAAMC,IAAI,GAAGC,QAAQ,CAACC,OAAO,CAACC,GAAG,CAACC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI;AAEnD,eAAeC,aAAaA,CAACC,GAAG,EAAE;EAChC;EACAC,OAAO,CAACC,IAAI,CAAC,gEAAgE,CAAC;EAC9E,MAAMC,OAAO,GAAGH,GAAG,CAACI,iBAAiB,CAAC,CAAC;EAEvC,MAAMJ,GAAG,CAACK,OAAO,CAAC,CAAC;EAEnB,OAAO;IAAEC,GAAG,EAAEA,CAAA,KAAMd,YAAY,CAACW,OAAO,CAAC,CAACI,MAAM,CAACb,IAAI,CAAC;IAAES;EAAQ,CAAC;AACnE;AAEAK,MAAM,CAACC,OAAO,GAAGV,aAAa","ignoreList":[]}
@@ -1,36 +0,0 @@
1
- const Router = require('nextjs-dynamic-routes');
2
- const {
3
- ROUTE_REGEX,
4
- PREVIEW_REGEX,
5
- ROUTE_PATTERN_SITEMAP,
6
- ROUTE_PATTERN_SITEMAP_FILE_REGEX,
7
- ROUTE_PATTERN_ROBOTS_TXT
8
- } = require('../constants');
9
- const router = new Router();
10
- router.add({
11
- name: 'resolver',
12
- pattern: ROUTE_REGEX,
13
- page: '/Resolver'
14
- });
15
- router.add({
16
- name: 'preview',
17
- pattern: PREVIEW_REGEX,
18
- page: '/Resolver'
19
- });
20
- router.add({
21
- name: 'sitemap',
22
- pattern: ROUTE_PATTERN_SITEMAP,
23
- page: '/Resolver'
24
- });
25
- router.add({
26
- name: 'sitemap file',
27
- pattern: ROUTE_PATTERN_SITEMAP_FILE_REGEX,
28
- page: '/Resolver'
29
- });
30
- router.add({
31
- name: 'robots',
32
- pattern: ROUTE_PATTERN_ROBOTS_TXT,
33
- page: '/Resolver'
34
- });
35
- module.exports = router;
36
- //# sourceMappingURL=routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routes.js","names":["Router","require","ROUTE_REGEX","PREVIEW_REGEX","ROUTE_PATTERN_SITEMAP","ROUTE_PATTERN_SITEMAP_FILE_REGEX","ROUTE_PATTERN_ROBOTS_TXT","router","add","name","pattern","page","module","exports"],"sources":["../../src/server/routes.js"],"sourcesContent":["const Router = require('nextjs-dynamic-routes');\nconst {\n ROUTE_REGEX,\n PREVIEW_REGEX,\n ROUTE_PATTERN_SITEMAP,\n ROUTE_PATTERN_SITEMAP_FILE_REGEX,\n ROUTE_PATTERN_ROBOTS_TXT\n} = require('../constants');\n\nconst router = new Router();\n\nrouter.add({\n name: 'resolver',\n pattern: ROUTE_REGEX,\n page: '/Resolver'\n});\n\nrouter.add({\n name: 'preview',\n pattern: PREVIEW_REGEX,\n page: '/Resolver'\n});\n\nrouter.add({\n name: 'sitemap',\n pattern: ROUTE_PATTERN_SITEMAP,\n page: '/Resolver'\n});\n\nrouter.add({\n name: 'sitemap file',\n pattern: ROUTE_PATTERN_SITEMAP_FILE_REGEX,\n page: '/Resolver'\n});\n\nrouter.add({\n name: 'robots',\n pattern: ROUTE_PATTERN_ROBOTS_TXT,\n page: '/Resolver'\n});\n\nmodule.exports = router;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAGC,OAAO,CAAC,uBAAuB,CAAC;AAC/C,MAAM;EACJC,WAAW;EACXC,aAAa;EACbC,qBAAqB;EACrBC,gCAAgC;EAChCC;AACF,CAAC,GAAGL,OAAO,CAAC,cAAc,CAAC;AAE3B,MAAMM,MAAM,GAAG,IAAIP,MAAM,CAAC,CAAC;AAE3BO,MAAM,CAACC,GAAG,CAAC;EACTC,IAAI,EAAE,UAAU;EAChBC,OAAO,EAAER,WAAW;EACpBS,IAAI,EAAE;AACR,CAAC,CAAC;AAEFJ,MAAM,CAACC,GAAG,CAAC;EACTC,IAAI,EAAE,SAAS;EACfC,OAAO,EAAEP,aAAa;EACtBQ,IAAI,EAAE;AACR,CAAC,CAAC;AAEFJ,MAAM,CAACC,GAAG,CAAC;EACTC,IAAI,EAAE,SAAS;EACfC,OAAO,EAAEN,qBAAqB;EAC9BO,IAAI,EAAE;AACR,CAAC,CAAC;AAEFJ,MAAM,CAACC,GAAG,CAAC;EACTC,IAAI,EAAE,cAAc;EACpBC,OAAO,EAAEL,gCAAgC;EACzCM,IAAI,EAAE;AACR,CAAC,CAAC;AAEFJ,MAAM,CAACC,GAAG,CAAC;EACTC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAEJ,wBAAwB;EACjCK,IAAI,EAAE;AACR,CAAC,CAAC;AAEFC,MAAM,CAACC,OAAO,GAAGN,MAAM","ignoreList":[]}