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

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 (82) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib-es/application/query/index.js +71 -0
  3. package/lib-es/application/query/index.js.map +1 -0
  4. package/lib-es/blaze.config.js +28 -0
  5. package/lib-es/blaze.config.js.map +1 -0
  6. package/lib-es/components/DebugSidebar/DebugSidebar.js +107 -0
  7. package/lib-es/components/DebugSidebar/DebugSidebar.js.map +1 -0
  8. package/lib-es/components/DebugSidebar/DebugSidebarRender.js +57 -0
  9. package/lib-es/components/DebugSidebar/DebugSidebarRender.js.map +1 -0
  10. package/lib-es/components/DebugSidebar/index.js +3 -0
  11. package/lib-es/components/DebugSidebar/index.js.map +1 -0
  12. package/lib-es/components/HashObserver.js +7 -0
  13. package/lib-es/components/HashObserver.js.map +1 -0
  14. package/lib-es/components/index.js +4 -0
  15. package/lib-es/components/index.js.map +1 -0
  16. package/lib-es/constants.js +102 -0
  17. package/lib-es/constants.js.map +1 -0
  18. package/lib-es/containers/ContentContainer.js +94 -0
  19. package/lib-es/containers/ContentContainer.js.map +1 -0
  20. package/lib-es/containers/index.js +3 -0
  21. package/lib-es/containers/index.js.map +1 -0
  22. package/lib-es/helpers/build-admin-href.js +11 -0
  23. package/lib-es/helpers/build-admin-href.js.map +1 -0
  24. package/lib-es/helpers/check-for-gtm.js +11 -0
  25. package/lib-es/helpers/check-for-gtm.js.map +1 -0
  26. package/lib-es/helpers/check-parent.js +8 -0
  27. package/lib-es/helpers/check-parent.js.map +1 -0
  28. package/lib-es/helpers/check-preview-url.js +9 -0
  29. package/lib-es/helpers/check-preview-url.js.map +1 -0
  30. package/lib-es/helpers/check-url.js +245 -0
  31. package/lib-es/helpers/check-url.js.map +1 -0
  32. package/lib-es/helpers/get-entitys-actions.js +16 -0
  33. package/lib-es/helpers/get-entitys-actions.js.map +1 -0
  34. package/lib-es/helpers/get-error-message.js +13 -0
  35. package/lib-es/helpers/get-error-message.js.map +1 -0
  36. package/lib-es/helpers/get-from-local.js +11 -0
  37. package/lib-es/helpers/get-from-local.js.map +1 -0
  38. package/lib-es/helpers/get-page-data.js +39 -0
  39. package/lib-es/helpers/get-page-data.js.map +1 -0
  40. package/lib-es/helpers/get-root-selector-classes.js +14 -0
  41. package/lib-es/helpers/get-root-selector-classes.js.map +1 -0
  42. package/lib-es/helpers/get-search-filter.js +14 -0
  43. package/lib-es/helpers/get-search-filter.js.map +1 -0
  44. package/lib-es/helpers/handle-static-routes.js +12 -0
  45. package/lib-es/helpers/handle-static-routes.js.map +1 -0
  46. package/lib-es/helpers/index.js +14 -0
  47. package/lib-es/helpers/index.js.map +1 -0
  48. package/lib-es/helpers/render-apple-tags.js +13 -0
  49. package/lib-es/helpers/render-apple-tags.js.map +1 -0
  50. package/lib-es/helpers/set-blaze-debug.js +31 -0
  51. package/lib-es/helpers/set-blaze-debug.js.map +1 -0
  52. package/lib-es/helpers/static-route-handlers/generic-file-handler.js +43 -0
  53. package/lib-es/helpers/static-route-handlers/generic-file-handler.js.map +1 -0
  54. package/lib-es/helpers/static-route-handlers/index.js +27 -0
  55. package/lib-es/helpers/static-route-handlers/index.js.map +1 -0
  56. package/lib-es/helpers/static-route-handlers/llms.js +19 -0
  57. package/lib-es/helpers/static-route-handlers/llms.js.map +1 -0
  58. package/lib-es/helpers/static-route-handlers/robots-txt.js +19 -0
  59. package/lib-es/helpers/static-route-handlers/robots-txt.js.map +1 -0
  60. package/lib-es/helpers/static-route-handlers/sitemap-file.js +27 -0
  61. package/lib-es/helpers/static-route-handlers/sitemap-file.js.map +1 -0
  62. package/lib-es/helpers/static-route-handlers/sitemap.js +19 -0
  63. package/lib-es/helpers/static-route-handlers/sitemap.js.map +1 -0
  64. package/lib-es/hoc/withBlaze.js +153 -0
  65. package/lib-es/hoc/withBlaze.js.map +1 -0
  66. package/lib-es/hooks/use-get-page.js +19 -0
  67. package/lib-es/hooks/use-get-page.js.map +1 -0
  68. package/lib-es/hooks/use-hash-observer.js +94 -0
  69. package/lib-es/hooks/use-hash-observer.js.map +1 -0
  70. package/lib-es/index.js +9 -0
  71. package/lib-es/index.js.map +1 -0
  72. package/lib-es/pages/Resolver.js +88 -0
  73. package/lib-es/pages/Resolver.js.map +1 -0
  74. package/lib-es/pages/document/DocumentBody.js +11 -0
  75. package/lib-es/pages/document/DocumentBody.js.map +1 -0
  76. package/lib-es/pages/document/_document.js +27 -0
  77. package/lib-es/pages/document/_document.js.map +1 -0
  78. package/lib-es/server/index.js +16 -0
  79. package/lib-es/server/index.js.map +1 -0
  80. package/lib-es/server/routes.js +36 -0
  81. package/lib-es/server/routes.js.map +1 -0
  82. package/package.json +19 -19
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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-node18-core-styles-tooltips.46](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.45...v0.146.0-node18-core-styles-tooltips.46) (2026-01-16)
7
+
8
+ **Note:** Version bump only for package @blaze-cms/nextjs-tools
9
+
10
+
11
+
12
+
13
+
6
14
  # [0.146.0-node18-core-styles-tooltips.45](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.44...v0.146.0-node18-core-styles-tooltips.45) (2026-01-15)
7
15
 
8
16
 
@@ -0,0 +1,71 @@
1
+ import { gql } from '@apollo/client';
2
+ const pageDataFields = `
3
+ id
4
+ name
5
+ preparedPageBuilderComponents
6
+ canonicalUrl
7
+ category {
8
+ id
9
+ name
10
+ }
11
+ tags {
12
+ id
13
+ name
14
+ }
15
+ slug
16
+ image{
17
+ id
18
+ data
19
+ url
20
+ }
21
+ contentDocumentHead {
22
+ type
23
+ props
24
+ content
25
+ }
26
+ formattedMetaTitle
27
+ formattedMetaDescription
28
+ __typename
29
+ cacheControlMaxAge`;
30
+ const checkUrlQuery = gql`
31
+ query checkUrl($url: String!) {
32
+ checkUrl(url: $url) {
33
+ itemId
34
+ itemEntity
35
+ urlTo,
36
+ pageData: record {
37
+ ...on ContentContentInterface {
38
+ ${pageDataFields}
39
+ }
40
+ }
41
+ }
42
+ }
43
+ `;
44
+ const getPageQuery = ({
45
+ actions: {
46
+ get,
47
+ getPublished
48
+ } = {},
49
+ isPreview
50
+ }) => {
51
+ const getMethod = !isPreview && getPublished ? getPublished : get;
52
+ return gql`
53
+ query pageData($id: String!) {
54
+ pageData: ${getMethod}(id: $id) {
55
+ ${pageDataFields}
56
+ url
57
+ }
58
+ }
59
+ `;
60
+ };
61
+ const GET_ENTITY_SCHEMA = gql`
62
+ query getEntitySchema($id: String!) {
63
+ entitySchema: getEntitySchema(id: $id) {
64
+ id
65
+ identifier
66
+ actions
67
+ }
68
+ }
69
+ `;
70
+ export { checkUrlQuery, getPageQuery, GET_ENTITY_SCHEMA };
71
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["gql","pageDataFields","checkUrlQuery","getPageQuery","actions","get","getPublished","isPreview","getMethod","GET_ENTITY_SCHEMA"],"sources":["../../../src/application/query/index.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst pageDataFields = `\nid\nname\npreparedPageBuilderComponents\ncanonicalUrl\ncategory {\n id\n name\n}\ntags {\n id\n name\n}\nslug\nimage{\n id\n data\n url\n}\ncontentDocumentHead {\n type\n props\n content\n}\nformattedMetaTitle\nformattedMetaDescription\n__typename\ncacheControlMaxAge`;\n\nconst checkUrlQuery = gql`\n query checkUrl($url: String!) {\n checkUrl(url: $url) {\n itemId\n itemEntity\n urlTo,\n pageData: record {\n ...on ContentContentInterface {\n ${pageDataFields}\n }\n }\n }\n }\n`;\n\nconst getPageQuery = ({ actions: { get, getPublished } = {}, isPreview }) => {\n const getMethod = !isPreview && getPublished ? getPublished : get;\n\n return gql`\n query pageData($id: String!) {\n pageData: ${getMethod}(id: $id) {\n ${pageDataFields}\n url\n }\n }\n `;\n};\n\nconst GET_ENTITY_SCHEMA = gql`\n query getEntitySchema($id: String!) {\n entitySchema: getEntitySchema(id: $id) {\n id\n identifier\n actions\n }\n }\n`;\n\nexport { checkUrlQuery, getPageQuery, GET_ENTITY_SCHEMA };\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,cAAc,GAAG;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AAEnB,MAAMC,aAAa,GAAGF,GAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAYC,cAAc;AAC1B;AACA;AACA;AACA;AACA,CAAC;AAED,MAAME,YAAY,GAAGA,CAAC;EAAEC,OAAO,EAAE;IAAEC,GAAG;IAAEC;EAAa,CAAC,GAAG,CAAC,CAAC;EAAEC;AAAU,CAAC,KAAK;EAC3E,MAAMC,SAAS,GAAG,CAACD,SAAS,IAAID,YAAY,GAAGA,YAAY,GAAGD,GAAG;EAEjE,OAAOL,GAAG;AACZ;AACA,kBAAkBQ,SAAS;AAC3B,UAAUP,cAAc;AACxB;AACA;AACA;AACA,GAAG;AACH,CAAC;AAED,MAAMQ,iBAAiB,GAAGT,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,SAASE,aAAa,EAAEC,YAAY,EAAEM,iBAAiB","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ import pageBuilder from '@blaze-cms/plugin-page-builder-fe';
2
+ import gtm from '@blaze-cms/plugin-gtm-fe';
3
+ import chart from '@blaze-cms/plugin-chart';
4
+ import googleMaps from '@blaze-cms/plugin-google-maps-fe';
5
+ import previewFe from '@blaze-cms/plugin-preview-fe';
6
+ import authFe from '@blaze-cms/plugin-auth-fe';
7
+ import structuredDataFe from '@blaze-cms/plugin-structured-data-fe';
8
+ import translationFe from '@blaze-cms/plugin-translation-fe';
9
+ const plugins = new Map();
10
+ plugins.set(translationFe, {});
11
+ plugins.set(pageBuilder, {});
12
+ plugins.set(gtm, {});
13
+ plugins.set(chart, {});
14
+ plugins.set(googleMaps, {});
15
+ plugins.set(previewFe, {});
16
+ plugins.set(authFe, {});
17
+ plugins.set(structuredDataFe, {
18
+ authenticatedBotHeaders: ['x-amzn-waf-googlebot']
19
+ });
20
+ const apollo = {
21
+ uri: process.env.BLAZE_GRAPHQL_URI,
22
+ loadEntitiesInBrowser: false
23
+ };
24
+ export default {
25
+ plugins,
26
+ apollo
27
+ };
28
+ //# sourceMappingURL=blaze.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blaze.config.js","names":["pageBuilder","gtm","chart","googleMaps","previewFe","authFe","structuredDataFe","translationFe","plugins","Map","set","authenticatedBotHeaders","apollo","uri","process","env","BLAZE_GRAPHQL_URI","loadEntitiesInBrowser"],"sources":["../src/blaze.config.js"],"sourcesContent":["import pageBuilder from '@blaze-cms/plugin-page-builder-fe';\nimport gtm from '@blaze-cms/plugin-gtm-fe';\nimport chart from '@blaze-cms/plugin-chart';\nimport googleMaps from '@blaze-cms/plugin-google-maps-fe';\nimport previewFe from '@blaze-cms/plugin-preview-fe';\nimport authFe from '@blaze-cms/plugin-auth-fe';\nimport structuredDataFe from '@blaze-cms/plugin-structured-data-fe';\nimport translationFe from '@blaze-cms/plugin-translation-fe';\n\nconst plugins = new Map();\nplugins.set(translationFe, {});\nplugins.set(pageBuilder, {});\nplugins.set(gtm, {});\nplugins.set(chart, {});\nplugins.set(googleMaps, {});\nplugins.set(previewFe, {});\nplugins.set(authFe, {});\n\nplugins.set(structuredDataFe, {\n authenticatedBotHeaders: ['x-amzn-waf-googlebot']\n});\n\nconst apollo = {\n uri: process.env.BLAZE_GRAPHQL_URI,\n loadEntitiesInBrowser: false\n};\n\nexport default { plugins, apollo };\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,mCAAmC;AAC3D,OAAOC,GAAG,MAAM,0BAA0B;AAC1C,OAAOC,KAAK,MAAM,yBAAyB;AAC3C,OAAOC,UAAU,MAAM,kCAAkC;AACzD,OAAOC,SAAS,MAAM,8BAA8B;AACpD,OAAOC,MAAM,MAAM,2BAA2B;AAC9C,OAAOC,gBAAgB,MAAM,sCAAsC;AACnE,OAAOC,aAAa,MAAM,kCAAkC;AAE5D,MAAMC,OAAO,GAAG,IAAIC,GAAG,CAAC,CAAC;AACzBD,OAAO,CAACE,GAAG,CAACH,aAAa,EAAE,CAAC,CAAC,CAAC;AAC9BC,OAAO,CAACE,GAAG,CAACV,WAAW,EAAE,CAAC,CAAC,CAAC;AAC5BQ,OAAO,CAACE,GAAG,CAACT,GAAG,EAAE,CAAC,CAAC,CAAC;AACpBO,OAAO,CAACE,GAAG,CAACR,KAAK,EAAE,CAAC,CAAC,CAAC;AACtBM,OAAO,CAACE,GAAG,CAACP,UAAU,EAAE,CAAC,CAAC,CAAC;AAC3BK,OAAO,CAACE,GAAG,CAACN,SAAS,EAAE,CAAC,CAAC,CAAC;AAC1BI,OAAO,CAACE,GAAG,CAACL,MAAM,EAAE,CAAC,CAAC,CAAC;AAEvBG,OAAO,CAACE,GAAG,CAACJ,gBAAgB,EAAE;EAC5BK,uBAAuB,EAAE,CAAC,sBAAsB;AAClD,CAAC,CAAC;AAEF,MAAMC,MAAM,GAAG;EACbC,GAAG,EAAEC,OAAO,CAACC,GAAG,CAACC,iBAAiB;EAClCC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAe;EAAET,OAAO;EAAEI;AAAO,CAAC","ignoreList":[]}
@@ -0,0 +1,107 @@
1
+ import React, { useState } from 'react';
2
+ import { createPortal } from 'react-dom';
3
+ import PropTypes from 'prop-types';
4
+ import classnames from 'classnames';
5
+ import { IoCloseOutline } from 'react-icons/io5';
6
+ import { useRouter } from 'next/router';
7
+ import { MdKeyboardArrowLeft, MdEdit } from 'react-icons/md';
8
+ import { Link } from '@blaze-cms/nextjs-components';
9
+ import Switches from '@blaze-react/switches';
10
+ import { buildAdminHref, setBlazeDebug } from '../../helpers';
11
+ import { DEBUG_LOGO, BLAZE_DEBUG } from '../../constants';
12
+ const DebugSidebar = ({
13
+ itemEntity,
14
+ itemId,
15
+ updatedDebugOptions,
16
+ debugMode,
17
+ setIsDebugMode
18
+ }) => {
19
+ const router = useRouter();
20
+ const [isEditorMode, setIsEditorMode] = useState(false);
21
+ const [isOpen, setIsOpen] = useState(true);
22
+ const divClass = classnames('debug-sidebar', {
23
+ 'debug-sidebar--open': isOpen,
24
+ 'debug-sidebar--close': !isOpen
25
+ });
26
+ const toggleEditorMode = () => {
27
+ // todo: persist editor mode in local storage
28
+ // const currentEditorMode = getFromLocal(BLAZE_PB_EDITOR_MODE);
29
+ // if (currentEditorMode) {
30
+ // window.localStorage.removeItem(BLAZE_PB_EDITOR_MODE);
31
+ // } else {
32
+ // window.localStorage.setItem(BLAZE_PB_EDITOR_MODE, true);
33
+ // }
34
+ updatedDebugOptions('editorModeEnabled', !isEditorMode);
35
+ updatedDebugOptions({
36
+ editorModeEnabled: !isEditorMode,
37
+ adminHref: buildAdminHref({
38
+ itemEntity,
39
+ itemId
40
+ })
41
+ });
42
+ setIsEditorMode(!isEditorMode);
43
+ };
44
+ const href = buildAdminHref({
45
+ itemEntity,
46
+ itemId
47
+ });
48
+ const closeDebug = () => {
49
+ setBlazeDebug(setIsDebugMode);
50
+ window.blaze.debug();
51
+ const [pathname, search = ''] = router.asPath.split('?');
52
+ const params = new URLSearchParams(search);
53
+ params.delete(BLAZE_DEBUG);
54
+ const newUrl = params.toString() ? `${pathname}?${params.toString()}` : pathname;
55
+ router.push('/Resolver', newUrl, {
56
+ shallow: true
57
+ });
58
+ };
59
+ return createPortal(/*#__PURE__*/React.createElement("div", {
60
+ className: divClass,
61
+ "data-testid": "debug-sidebar"
62
+ }, /*#__PURE__*/React.createElement(Link, {
63
+ href: href,
64
+ target: "_blank"
65
+ }, /*#__PURE__*/React.createElement("img", {
66
+ src: DEBUG_LOGO.SRC,
67
+ alt: DEBUG_LOGO.ALT
68
+ })), /*#__PURE__*/React.createElement("div", {
69
+ role: "button",
70
+ className: "debug-sidebar__button debug-sidebar__button--close",
71
+ "data-testid": "debug-sidebar-close",
72
+ "aria-label": "Close debug sidebar",
73
+ onClick: closeDebug
74
+ }, /*#__PURE__*/React.createElement(IoCloseOutline, null)), /*#__PURE__*/React.createElement(Switches, {
75
+ onChange: toggleEditorMode,
76
+ name: "debug-sidebar-switch",
77
+ icon: /*#__PURE__*/React.createElement(MdEdit, null),
78
+ alignVertically: true,
79
+ returnBoolean: true,
80
+ onText: "ON",
81
+ offText: "OFF",
82
+ options: {
83
+ id: 'debug-sidebar-switch',
84
+ checked: isEditorMode
85
+ }
86
+ }), /*#__PURE__*/React.createElement("div", {
87
+ role: "button",
88
+ className: "debug-sidebar__button open",
89
+ "data-testid": "debug-sidebar-button",
90
+ id: "debug-sidebar-button",
91
+ onClick: () => setIsOpen(!isOpen)
92
+ }, /*#__PURE__*/React.createElement("i", null, /*#__PURE__*/React.createElement(MdKeyboardArrowLeft, null)))), document.body);
93
+ };
94
+ DebugSidebar.propTypes = {
95
+ updatedDebugOptions: PropTypes.func.isRequired,
96
+ itemEntity: PropTypes.string,
97
+ itemId: PropTypes.string,
98
+ debugMode: PropTypes.bool,
99
+ setIsDebugMode: PropTypes.func.isRequired
100
+ };
101
+ DebugSidebar.defaultProps = {
102
+ itemEntity: '',
103
+ itemId: '',
104
+ debugMode: false
105
+ };
106
+ export default DebugSidebar;
107
+ //# sourceMappingURL=DebugSidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugSidebar.js","names":["React","useState","createPortal","PropTypes","classnames","IoCloseOutline","useRouter","MdKeyboardArrowLeft","MdEdit","Link","Switches","buildAdminHref","setBlazeDebug","DEBUG_LOGO","BLAZE_DEBUG","DebugSidebar","itemEntity","itemId","updatedDebugOptions","debugMode","setIsDebugMode","router","isEditorMode","setIsEditorMode","isOpen","setIsOpen","divClass","toggleEditorMode","editorModeEnabled","adminHref","href","closeDebug","window","blaze","debug","pathname","search","asPath","split","params","URLSearchParams","delete","newUrl","toString","push","shallow","createElement","className","target","src","SRC","alt","ALT","role","onClick","onChange","name","icon","alignVertically","returnBoolean","onText","offText","options","id","checked","document","body","propTypes","func","isRequired","string","bool","defaultProps"],"sources":["../../../src/components/DebugSidebar/DebugSidebar.js"],"sourcesContent":["import React, { useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { IoCloseOutline } from 'react-icons/io5';\nimport { useRouter } from 'next/router';\nimport { MdKeyboardArrowLeft, MdEdit } from 'react-icons/md';\nimport { Link } from '@blaze-cms/nextjs-components';\nimport Switches from '@blaze-react/switches';\nimport { buildAdminHref, setBlazeDebug } from '../../helpers';\nimport { DEBUG_LOGO, BLAZE_DEBUG } from '../../constants';\n\nconst DebugSidebar = ({ itemEntity, itemId, updatedDebugOptions, debugMode, setIsDebugMode }) => {\n const router = useRouter();\n const [isEditorMode, setIsEditorMode] = useState(false);\n const [isOpen, setIsOpen] = useState(true);\n\n const divClass = classnames('debug-sidebar', {\n 'debug-sidebar--open': isOpen,\n 'debug-sidebar--close': !isOpen\n });\n\n const toggleEditorMode = () => {\n // todo: persist editor mode in local storage\n // const currentEditorMode = getFromLocal(BLAZE_PB_EDITOR_MODE);\n // if (currentEditorMode) {\n // window.localStorage.removeItem(BLAZE_PB_EDITOR_MODE);\n // } else {\n // window.localStorage.setItem(BLAZE_PB_EDITOR_MODE, true);\n // }\n updatedDebugOptions('editorModeEnabled', !isEditorMode);\n updatedDebugOptions({\n editorModeEnabled: !isEditorMode,\n adminHref: buildAdminHref({ itemEntity, itemId })\n });\n setIsEditorMode(!isEditorMode);\n };\n\n const href = buildAdminHref({ itemEntity, itemId });\n\n const closeDebug = () => {\n setBlazeDebug(setIsDebugMode);\n window.blaze.debug();\n\n const [pathname, search = ''] = router.asPath.split('?');\n const params = new URLSearchParams(search);\n params.delete(BLAZE_DEBUG);\n const newUrl = params.toString() ? `${pathname}?${params.toString()}` : pathname;\n\n router.push('/Resolver', newUrl, {\n shallow: true\n });\n };\n\n return createPortal(\n <div className={divClass} data-testid=\"debug-sidebar\">\n <Link href={href} target=\"_blank\">\n <img src={DEBUG_LOGO.SRC} alt={DEBUG_LOGO.ALT} />\n </Link>\n <div\n role=\"button\"\n className=\"debug-sidebar__button debug-sidebar__button--close\"\n data-testid=\"debug-sidebar-close\"\n aria-label=\"Close debug sidebar\"\n onClick={closeDebug}>\n <IoCloseOutline />\n </div>\n <Switches\n onChange={toggleEditorMode}\n name=\"debug-sidebar-switch\"\n icon={<MdEdit />}\n alignVertically\n returnBoolean\n onText=\"ON\"\n offText=\"OFF\"\n options={{\n id: 'debug-sidebar-switch',\n checked: isEditorMode\n }}\n />\n <div\n role=\"button\"\n className=\"debug-sidebar__button open\"\n data-testid=\"debug-sidebar-button\"\n id=\"debug-sidebar-button\"\n onClick={() => setIsOpen(!isOpen)}>\n <i>\n <MdKeyboardArrowLeft />\n </i>\n </div>\n </div>,\n document.body\n );\n};\n\nDebugSidebar.propTypes = {\n updatedDebugOptions: PropTypes.func.isRequired,\n itemEntity: PropTypes.string,\n itemId: PropTypes.string,\n debugMode: PropTypes.bool,\n setIsDebugMode: PropTypes.func.isRequired\n};\n\nDebugSidebar.defaultProps = {\n itemEntity: '',\n itemId: '',\n debugMode: false\n};\n\nexport default DebugSidebar;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,YAAY,QAAQ,WAAW;AACxC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,mBAAmB,EAAEC,MAAM,QAAQ,gBA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C,eACFtB,KAAA,CAAA8C,aAAA;IACEO,IAAI,EAAC,QAAQ;IACbN,SAAS,EAAC,4BAA4B;IACtC,eAAY,sBAAsB;IAClCgB,EAAE,EAAC,sBAAsB;IACzBT,OAAO,EAAEA,CAAA,KAAM7B,SAAS,CAAC,CAACD,MAAM;EAAE,gBAClCxB,KAAA,CAAA8C,aAAA,yBACE9C,KAAA,CAAA8C,aAAA,CAACvC,mBAAmB,MAAE,CACrB,CACA,CACF,CAAC,EACN0D,QAAQ,CAACC,IACX,CAAC;AACH,CAAC;AAEDnD,YAAY,CAACoD,SAAS,GAAG;EACvBjD,mBAAmB,EAAEf,SAAS,CAACiE,IAAI,CAACC,UAAU;EAC9CrD,UAAU,EAAEb,SAAS,CAACmE,MAAM;EAC5BrD,MAAM,EAAEd,SAAS,CAACmE,MAAM;EACxBnD,SAAS,EAAEhB,SAAS,CAACoE,IAAI;EACzBnD,cAAc,EAAEjB,SAAS,CAACiE,IAAI,CAACC;AACjC,CAAC;AAEDtD,YAAY,CAACyD,YAAY,GAAG;EAC1BxD,UAAU,EAAE,EAAE;EACdC,MAAM,EAAE,EAAE;EACVE,SAAS,EAAE;AACb,CAAC;AAED,eAAeJ,YAAY","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import dynamic from 'next/dynamic';
3
+ import PropTypes from 'prop-types';
4
+ import { useRouter } from 'next/router';
5
+ import { setBlazeDebug, getFromLocal } from '../../helpers';
6
+ import { BLAZE_DEBUG } from '../../constants';
7
+ const DebugSidebar = dynamic(() => import('./DebugSidebar'));
8
+ const DebugSidebarRender = ({
9
+ itemEntity,
10
+ itemId,
11
+ updatedDebugOptions,
12
+ debugMode
13
+ }) => {
14
+ const [isDebugMode, setIsDebugMode] = useState(debugMode);
15
+ const router = useRouter();
16
+ useEffect(() => {
17
+ const currentDebugValue = getFromLocal(BLAZE_DEBUG);
18
+ setIsDebugMode(currentDebugValue);
19
+ setBlazeDebug(setIsDebugMode);
20
+ }, []);
21
+ useEffect(() => {
22
+ const handleRouteChange = url => {
23
+ const hasDebug = url.includes(`${BLAZE_DEBUG}=1`);
24
+ if (hasDebug) {
25
+ setBlazeDebug(setIsDebugMode);
26
+ }
27
+ };
28
+ if (router.asPath.includes(`${BLAZE_DEBUG}=1`)) {
29
+ handleRouteChange(router.asPath);
30
+ }
31
+ router.events.on('routeChangeComplete', handleRouteChange);
32
+ return () => {
33
+ router.events.off('routeChangeComplete', handleRouteChange);
34
+ };
35
+ }, [router.events, router.asPath]);
36
+ if (!isDebugMode) return null;
37
+ return /*#__PURE__*/React.createElement(DebugSidebar, {
38
+ itemEntity: itemEntity,
39
+ itemId: itemId,
40
+ updatedDebugOptions: updatedDebugOptions,
41
+ debugMode: debugMode,
42
+ setIsDebugMode: setIsDebugMode
43
+ });
44
+ };
45
+ DebugSidebarRender.propTypes = {
46
+ updatedDebugOptions: PropTypes.func.isRequired,
47
+ itemEntity: PropTypes.string,
48
+ itemId: PropTypes.string,
49
+ debugMode: PropTypes.bool
50
+ };
51
+ DebugSidebarRender.defaultProps = {
52
+ itemEntity: '',
53
+ itemId: '',
54
+ debugMode: false
55
+ };
56
+ export default DebugSidebarRender;
57
+ //# sourceMappingURL=DebugSidebarRender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugSidebarRender.js","names":["React","useState","useEffect","dynamic","PropTypes","useRouter","setBlazeDebug","getFromLocal","BLAZE_DEBUG","DebugSidebar","DebugSidebarRender","itemEntity","itemId","updatedDebugOptions","debugMode","isDebugMode","setIsDebugMode","router","currentDebugValue","handleRouteChange","url","hasDebug","includes","asPath","events","on","off","createElement","propTypes","func","isRequired","string","bool","defaultProps"],"sources":["../../../src/components/DebugSidebar/DebugSidebarRender.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport dynamic from 'next/dynamic';\nimport PropTypes from 'prop-types';\nimport { useRouter } from 'next/router';\nimport { setBlazeDebug, getFromLocal } from '../../helpers';\nimport { BLAZE_DEBUG } from '../../constants';\n\nconst DebugSidebar = dynamic(() => import('./DebugSidebar'));\n\nconst DebugSidebarRender = ({ itemEntity, itemId, updatedDebugOptions, debugMode }) => {\n const [isDebugMode, setIsDebugMode] = useState(debugMode);\n const router = useRouter();\n\n useEffect(() => {\n const currentDebugValue = getFromLocal(BLAZE_DEBUG);\n setIsDebugMode(currentDebugValue);\n setBlazeDebug(setIsDebugMode);\n }, []);\n\n useEffect(\n () => {\n const handleRouteChange = url => {\n const hasDebug = url.includes(`${BLAZE_DEBUG}=1`);\n if (hasDebug) {\n setBlazeDebug(setIsDebugMode);\n }\n };\n\n if (router.asPath.includes(`${BLAZE_DEBUG}=1`)) {\n handleRouteChange(router.asPath);\n }\n\n router.events.on('routeChangeComplete', handleRouteChange);\n return () => {\n router.events.off('routeChangeComplete', handleRouteChange);\n };\n },\n [router.events, router.asPath]\n );\n\n if (!isDebugMode) return null;\n\n return (\n <DebugSidebar\n itemEntity={itemEntity}\n itemId={itemId}\n updatedDebugOptions={updatedDebugOptions}\n debugMode={debugMode}\n setIsDebugMode={setIsDebugMode}\n />\n );\n};\n\nDebugSidebarRender.propTypes = {\n updatedDebugOptions: PropTypes.func.isRequired,\n itemEntity: PropTypes.string,\n itemId: PropTypes.string,\n debugMode: PropTypes.bool\n};\n\nDebugSidebarRender.defaultProps = {\n itemEntity: '',\n itemId: '',\n debugMode: false\n};\n\nexport default DebugSidebarRender;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,OAAOC,OAAO,MAAM,cAAc;AAClC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,aAAa,EAAEC,YAAY,QAAQ,eAAe;AAC3D,SAASC,WAAW,QAAQ,iBAAiB;AAE7C,MAAMC,YAAY,GAAGN,OAAO,CAAC,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE5D,MAAMO,kBAAkB,GAAGA,CAA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,kBAAkB,CAACkB,SAAS,GAAG;EAC7Bf,mBAAmB,EAAET,SAAS,CAACyB,IAAI,CAACC,UAAU;EAC9CnB,UAAU,EAAEP,SAAS,CAAC2B,MAAM;EAC5BnB,MAAM,EAAER,SAAS,CAAC2B,MAAM;EACxBjB,SAAS,EAAEV,SAAS,CAAC4B;AACvB,CAAC;AAEDtB,kBAAkB,CAACuB,YAAY,GAAG;EAChCtB,UAAU,EAAE,EAAE;EACdC,MAAM,EAAE,EAAE;EACVE,SAAS,EAAE;AACb,CAAC;AAED,eAAeJ,kBAAkB","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import DebugSidebarRender from './DebugSidebarRender';
2
+ export default DebugSidebarRender;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["DebugSidebarRender"],"sources":["../../../src/components/DebugSidebar/index.js"],"sourcesContent":["import DebugSidebarRender from './DebugSidebarRender';\n\nexport default DebugSidebarRender;\n"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AAErD,eAAeA,kBAAkB","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import useHashObserver from '../hooks/use-hash-observer';
2
+ function HashObserver() {
3
+ useHashObserver();
4
+ return null;
5
+ }
6
+ export default HashObserver;
7
+ //# sourceMappingURL=HashObserver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HashObserver.js","names":["useHashObserver","HashObserver"],"sources":["../../src/components/HashObserver.js"],"sourcesContent":["import useHashObserver from '../hooks/use-hash-observer';\n\nfunction HashObserver() {\n useHashObserver();\n return null;\n}\n\nexport default HashObserver;\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,4BAA4B;AAExD,SAASC,YAAYA,CAAA,EAAG;EACtBD,eAAe,CAAC,CAAC;EACjB,OAAO,IAAI;AACb;AAEA,eAAeC,YAAY","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import DebugSidebar from './DebugSidebar';
2
+ import HashObserver from './HashObserver';
3
+ export { DebugSidebar, HashObserver };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["DebugSidebar","HashObserver"],"sources":["../../src/components/index.js"],"sourcesContent":["import DebugSidebar from './DebugSidebar';\nimport HashObserver from './HashObserver';\n\nexport { DebugSidebar, HashObserver };\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,gBAAgB;AACzC,OAAOC,YAAY,MAAM,gBAAgB;AAEzC,SAASD,YAAY,EAAEC,YAAY","ignoreList":[]}
@@ -0,0 +1,102 @@
1
+ const ACTIVE_META_TAGS = ['description', 'canonical'];
2
+ const BLAZE_X_FRAME_OPTIONS_DEFAULT = 'SAMEORIGIN';
3
+ const META_TAGS_LOOKUP = {
4
+ description: {
5
+ apiKey: 'metaDescription',
6
+ htmlTagName: 'meta',
7
+ tagKeyName: 'name',
8
+ contentDataKeyName: 'content'
9
+ },
10
+ canonical: {
11
+ apiKey: 'canonicalUrl',
12
+ htmlTagName: 'link',
13
+ tagKeyName: 'rel',
14
+ contentDataKeyName: 'href'
15
+ }
16
+ };
17
+ const PB_TYPE_IMAGE = 'image';
18
+ const PB_TYPE_TEXTBLOCK = 'textblock';
19
+ const PB_TYPE_CAROUSEL = 'carousel';
20
+ const SEARCH_FILTER = 'searchfilter';
21
+ const COLON = ':';
22
+ const DOUBLE_SLASH = '//';
23
+ const HTTPS = 'https://';
24
+ const DEFAULT_ROUTE_REGEX = /^\/[a-z0-9€_\/]+(?:[-\/\.]{1,2}[a-z0-9\/€_\/]+)*$|^\/$/i;
25
+ const ROUTE_REGEX = process.env.BLAZE_ROUTE_REGEX ? new RegExp(process.env.BLAZE_ROUTE_REGEX) : DEFAULT_ROUTE_REGEX;
26
+ const PREVIEW_REGEX = /^(\/_preview)/;
27
+ const PREVIEW_MODE = 'Preview Mode';
28
+ const GTM_STRING = 'gtm';
29
+ const BLAZE_DEBUG = 'blaze_debug';
30
+ const BLAZE_PB_EDITOR_MODE = 'blaze_pb_editor_mode';
31
+ const DEBUG_LOGO = {
32
+ SRC: 'https://images.thisisblaze.com/logo-small-27-40.png',
33
+ ALT: 'blaze-logo'
34
+ };
35
+ const PUBLISHED_ = 'published_';
36
+ const RESPONSE_404 = '404 Not Found\n';
37
+ const SITEMAP_STORE_KEY = 'default_sitemap';
38
+ const ROUTE_PATTERN_SITEMAP = process.env.BLAZE_ROUTE_PATTERN_SITEMAP || '/sitemap.xml';
39
+ const sitemapFilePrefix = process.env.BLAZE_CONTENT_SITEMAP_URL_PREFIX || 'sitemap';
40
+ const ROUTE_PATTERN_SITEMAP_FILE_REGEX = new RegExp(`/${sitemapFilePrefix}/.*\.xml`);
41
+ const ROUTE_PATTERN_ROBOTS_TXT = '/robots.txt';
42
+ const ROUTE_PATTERN_LLMS_TXT = '/llms.txt';
43
+ const BLAZE_STATIC_ROUTE_STORE_KEY = 'default';
44
+ const STATIC_FILE_FORWARD_HEADERS = ['content-length', 'last-modified', 'etag'];
45
+ const APPLE_TAGS = [{
46
+ href: '/static/icons/touch-icon-iphone.png',
47
+ rel: 'apple-touch-icon'
48
+ }, {
49
+ href: '/static/icons/touch-icon-ipad.png',
50
+ rel: 'apple-touch-icon',
51
+ sizes: '152x152'
52
+ }, {
53
+ href: '/static/icons/touch-icon-iphone-retina.png',
54
+ rel: 'apple-touch-icon',
55
+ sizes: '180x180'
56
+ }, {
57
+ href: '/static/icons/touch-icon-ipad-retina.png',
58
+ rel: 'apple-touch-icon',
59
+ sizes: '167x167'
60
+ }];
61
+ const NOT_FOUND_STATUS_CODE = 404;
62
+ const ROOT_SELECTOR_CLASS_PREFIX = 'root-selector';
63
+ const ROOT_SELECTOR_SEPARATOR = '--';
64
+ const RESOLVER_CONTAINER_CLASS = 'resolver-container';
65
+ const ERROR_URLS = {
66
+ custom404: '/custom-error-404'
67
+ };
68
+ module.exports = {
69
+ APPLE_TAGS,
70
+ ACTIVE_META_TAGS,
71
+ COLON,
72
+ DOUBLE_SLASH,
73
+ GTM_STRING,
74
+ HTTPS,
75
+ META_TAGS_LOOKUP,
76
+ SEARCH_FILTER,
77
+ PB_TYPE_IMAGE,
78
+ PB_TYPE_TEXTBLOCK,
79
+ PB_TYPE_CAROUSEL,
80
+ PREVIEW_MODE,
81
+ ROUTE_REGEX,
82
+ PREVIEW_REGEX,
83
+ BLAZE_DEBUG,
84
+ BLAZE_PB_EDITOR_MODE,
85
+ DEBUG_LOGO,
86
+ PUBLISHED_,
87
+ RESPONSE_404,
88
+ NOT_FOUND_STATUS_CODE,
89
+ SITEMAP_STORE_KEY,
90
+ ROUTE_PATTERN_SITEMAP,
91
+ ROUTE_PATTERN_SITEMAP_FILE_REGEX,
92
+ ROUTE_PATTERN_ROBOTS_TXT,
93
+ ROUTE_PATTERN_LLMS_TXT,
94
+ BLAZE_STATIC_ROUTE_STORE_KEY,
95
+ STATIC_FILE_FORWARD_HEADERS,
96
+ ROOT_SELECTOR_CLASS_PREFIX,
97
+ ROOT_SELECTOR_SEPARATOR,
98
+ RESOLVER_CONTAINER_CLASS,
99
+ BLAZE_X_FRAME_OPTIONS_DEFAULT,
100
+ ERROR_URLS
101
+ };
102
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","names":["ACTIVE_META_TAGS","BLAZE_X_FRAME_OPTIONS_DEFAULT","META_TAGS_LOOKUP","description","apiKey","htmlTagName","tagKeyName","contentDataKeyName","canonical","PB_TYPE_IMAGE","PB_TYPE_TEXTBLOCK","PB_TYPE_CAROUSEL","SEARCH_FILTER","COLON","DOUBLE_SLASH","HTTPS","DEFAULT_ROUTE_REGEX","ROUTE_REGEX","process","env","BLAZE_ROUTE_REGEX","RegExp","PREVIEW_REGEX","PREVIEW_MODE","GTM_STRING","BLAZE_DEBUG","BLAZE_PB_EDITOR_MODE","DEBUG_LOGO","SRC","ALT","PUBLISHED_","RESPONSE_404","SITEMAP_STORE_KEY","ROUTE_PATTERN_SITEMAP","BLAZE_ROUTE_PATTERN_SITEMAP","sitemapFilePrefix","BLAZE_CONTENT_SITEMAP_URL_PREFIX","ROUTE_PATTERN_SITEMAP_FILE_REGEX","ROUTE_PATTERN_ROBOTS_TXT","ROUTE_PATTERN_LLMS_TXT","BLAZE_STATIC_ROUTE_STORE_KEY","STATIC_FILE_FORWARD_HEADERS","APPLE_TAGS","href","rel","sizes","NOT_FOUND_STATUS_CODE","ROOT_SELECTOR_CLASS_PREFIX","ROOT_SELECTOR_SEPARATOR","RESOLVER_CONTAINER_CLASS","ERROR_URLS","custom404","module","exports"],"sources":["../src/constants.js"],"sourcesContent":["const ACTIVE_META_TAGS = ['description', 'canonical'];\nconst BLAZE_X_FRAME_OPTIONS_DEFAULT = 'SAMEORIGIN';\n\nconst META_TAGS_LOOKUP = {\n description: {\n apiKey: 'metaDescription',\n htmlTagName: 'meta',\n tagKeyName: 'name',\n contentDataKeyName: 'content'\n },\n canonical: {\n apiKey: 'canonicalUrl',\n htmlTagName: 'link',\n tagKeyName: 'rel',\n contentDataKeyName: 'href'\n }\n};\n\nconst PB_TYPE_IMAGE = 'image';\nconst PB_TYPE_TEXTBLOCK = 'textblock';\nconst PB_TYPE_CAROUSEL = 'carousel';\nconst SEARCH_FILTER = 'searchfilter';\nconst COLON = ':';\nconst DOUBLE_SLASH = '//';\nconst HTTPS = 'https://';\n\nconst DEFAULT_ROUTE_REGEX = /^\\/[a-z0-9€_\\/]+(?:[-\\/\\.]{1,2}[a-z0-9\\/€_\\/]+)*$|^\\/$/i;\nconst ROUTE_REGEX = process.env.BLAZE_ROUTE_REGEX\n ? new RegExp(process.env.BLAZE_ROUTE_REGEX)\n : DEFAULT_ROUTE_REGEX;\nconst PREVIEW_REGEX = /^(\\/_preview)/;\nconst PREVIEW_MODE = 'Preview Mode';\nconst GTM_STRING = 'gtm';\n\nconst BLAZE_DEBUG = 'blaze_debug';\nconst BLAZE_PB_EDITOR_MODE = 'blaze_pb_editor_mode';\nconst DEBUG_LOGO = {\n SRC: 'https://images.thisisblaze.com/logo-small-27-40.png',\n ALT: 'blaze-logo'\n};\n\nconst PUBLISHED_ = 'published_';\n\nconst RESPONSE_404 = '404 Not Found\\n';\n\nconst SITEMAP_STORE_KEY = 'default_sitemap';\nconst ROUTE_PATTERN_SITEMAP = process.env.BLAZE_ROUTE_PATTERN_SITEMAP || '/sitemap.xml';\nconst sitemapFilePrefix = process.env.BLAZE_CONTENT_SITEMAP_URL_PREFIX || 'sitemap';\nconst ROUTE_PATTERN_SITEMAP_FILE_REGEX = new RegExp(`/${sitemapFilePrefix}/.*\\.xml`);\nconst ROUTE_PATTERN_ROBOTS_TXT = '/robots.txt';\nconst ROUTE_PATTERN_LLMS_TXT = '/llms.txt';\n\nconst BLAZE_STATIC_ROUTE_STORE_KEY = 'default';\n\nconst STATIC_FILE_FORWARD_HEADERS = ['content-length', 'last-modified', 'etag'];\n\nconst APPLE_TAGS = [\n { href: '/static/icons/touch-icon-iphone.png', rel: 'apple-touch-icon' },\n { href: '/static/icons/touch-icon-ipad.png', rel: 'apple-touch-icon', sizes: '152x152' },\n { href: '/static/icons/touch-icon-iphone-retina.png', rel: 'apple-touch-icon', sizes: '180x180' },\n { href: '/static/icons/touch-icon-ipad-retina.png', rel: 'apple-touch-icon', sizes: '167x167' }\n];\n\nconst NOT_FOUND_STATUS_CODE = 404;\n\nconst ROOT_SELECTOR_CLASS_PREFIX = 'root-selector';\nconst ROOT_SELECTOR_SEPARATOR = '--';\nconst RESOLVER_CONTAINER_CLASS = 'resolver-container';\nconst ERROR_URLS = {\n custom404: '/custom-error-404'\n};\n\nmodule.exports = {\n APPLE_TAGS,\n ACTIVE_META_TAGS,\n COLON,\n DOUBLE_SLASH,\n GTM_STRING,\n HTTPS,\n META_TAGS_LOOKUP,\n SEARCH_FILTER,\n PB_TYPE_IMAGE,\n PB_TYPE_TEXTBLOCK,\n PB_TYPE_CAROUSEL,\n PREVIEW_MODE,\n ROUTE_REGEX,\n PREVIEW_REGEX,\n BLAZE_DEBUG,\n BLAZE_PB_EDITOR_MODE,\n DEBUG_LOGO,\n PUBLISHED_,\n RESPONSE_404,\n NOT_FOUND_STATUS_CODE,\n SITEMAP_STORE_KEY,\n ROUTE_PATTERN_SITEMAP,\n ROUTE_PATTERN_SITEMAP_FILE_REGEX,\n ROUTE_PATTERN_ROBOTS_TXT,\n ROUTE_PATTERN_LLMS_TXT,\n BLAZE_STATIC_ROUTE_STORE_KEY,\n STATIC_FILE_FORWARD_HEADERS,\n ROOT_SELECTOR_CLASS_PREFIX,\n ROOT_SELECTOR_SEPARATOR,\n RESOLVER_CONTAINER_CLASS,\n BLAZE_X_FRAME_OPTIONS_DEFAULT,\n ERROR_URLS\n};\n"],"mappings":"AAAA,MAAMA,gBAAgB,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC;AACrD,MAAMC,6BAA6B,GAAG,YAAY;AAElD,MAAMC,gBAAgB,GAAG;EACvBC,WAAW,EAAE;IACXC,MAAM,EAAE,iBAAiB;IACzBC,WAAW,EAAE,MAAM;IACnBC,UAAU,EAAE,MAAM;IAClBC,kBAAkB,EAAE;EACtB,CAAC;EACDC,SAAS,EAAE;IACTJ,MAAM,EAAE,cAAc;IACtBC,WAAW,EAAE,MAAM;IACnBC,UAAU,EAAE,KAAK;IACjBC,kBAAkB,EAAE;EACtB;AACF,CAAC;AAED,MAAME,aAAa,GAAG,OAAO;AAC7B,MAAMC,iBAAiB,GAAG,WAAW;AACrC,MAAMC,gBAAgB,GAAG,UAAU;AACnC,MAAMC,aAAa,GAAG,cAAc;AACpC,MAAMC,KAAK,GAAG,GAAG;AACjB,MAAMC,YAAY,GAAG,IAAI;AACzB,MAAMC,KAAK,GAAG,UAAU;AAExB,MAAMC,mBAAmB,GAAG,yDAAyD;AACrF,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACC,iBAAiB,GAC7C,IAAIC,MAAM,CAACH,OAAO,CAACC,GAAG,CAACC,iBAAiB,CAAC,GACzCJ,mBAAmB;AACvB,MAAMM,aAAa,GAAG,eAAe;AAC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rD,MAAMC,UAAU,GAAG;EACjBC,SAAS,EAAE;AACb,CAAC;AAEDC,MAAM,CAACC,OAAO,GAAG;EACfX,UAAU;EACV1C,gBAAgB;EAChBa,KAAK;EACLC,YAAY;EACZU,UAAU;EACVT,KAAK;EACLb,gBAAgB;EAChBU,aAAa;EACbH,aAAa;EACbC,iBAAiB;EACjBC,gBAAgB;EAChBY,YAAY;EACZN,WAAW;EACXK,aAAa;EACbG,WAAW;EACXC,oBAAoB;EACpBC,UAAU;EACVG,UAAU;EACVC,YAAY;EACZe,qBAAqB;EACrBd,iBAAiB;EACjBC,qBAAqB;EACrBI,gCAAgC;EAChCC,wBAAwB;EACxBC,sBAAsB;EACtBC,4BAA4B;EAC5BC,2BAA2B;EAC3BM,0BAA0B;EAC1BC,uBAAuB;EACvBC,wBAAwB;EACxBhD,6BAA6B;EAC7BiD;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ const _excluded = ["category", "tags", "preparedPageBuilderComponents"];
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ import React, { useState, useEffect } from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import { buildPBComponents, getLightboxImages } from '@blaze-cms/plugin-page-builder-fe';
9
+ import { Header, MainContextProvider } from '@blaze-cms/nextjs-components';
10
+ import { getSearchFilter, checkForGtm } from '../helpers';
11
+ import { PREVIEW_MODE } from '../constants';
12
+ import { DebugSidebar } from '../components';
13
+ const ContentContainer = ({
14
+ fullUrl,
15
+ pageData,
16
+ isPreview,
17
+ itemId,
18
+ itemEntity
19
+ }) => {
20
+ const [open, setOpen] = useState(false);
21
+ const [debugOptions, setDebugOptions] = useState({
22
+ editorModeEnabled: false
23
+ });
24
+ const [selectedImage, setSelectedImage] = useState(0);
25
+ const toggleModal = () => setOpen(!open);
26
+ useEffect(() => {
27
+ if (open) setOpen(false);
28
+ },
29
+ // eslint-disable-next-line react-hooks/exhaustive-deps
30
+ [fullUrl]);
31
+ const {
32
+ category,
33
+ tags,
34
+ preparedPageBuilderComponents
35
+ } = pageData,
36
+ metaProps = _objectWithoutProperties(pageData, _excluded);
37
+ const pageBuilder = preparedPageBuilderComponents || [];
38
+ const options = {
39
+ parent: {
40
+ itemId,
41
+ itemEntity,
42
+ category,
43
+ tags
44
+ }
45
+ };
46
+ const searchFilterItems = getSearchFilter(pageBuilder);
47
+ const defaultSearchFilter = searchFilterItems[0];
48
+ // TODO check if this can be removed
49
+ if (defaultSearchFilter && !defaultSearchFilter.settings.url) {
50
+ options.searchFilter = defaultSearchFilter;
51
+ }
52
+ options.allSearchFilters = searchFilterItems;
53
+ const lightboxImages = getLightboxImages(pageBuilder);
54
+ const hasGTM = checkForGtm(pageBuilder);
55
+ const GlobalLigthBoxProps = {
56
+ open,
57
+ setOpen,
58
+ toggleModal,
59
+ selectedImage,
60
+ lightboxImages,
61
+ setSelectedImage
62
+ };
63
+ const buildPBComponentsOptions = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, options), metaProps), GlobalLigthBoxProps), {}, {
64
+ hasGTM
65
+ });
66
+ const updatedDebugOptions = (newOptions = {}) => {
67
+ setDebugOptions(_objectSpread(_objectSpread({}, debugOptions), newOptions));
68
+ };
69
+ return /*#__PURE__*/React.createElement(MainContextProvider, {
70
+ value: {
71
+ fullUrl,
72
+ isPreview,
73
+ itemId,
74
+ itemEntity,
75
+ hasGTM,
76
+ debugOptions
77
+ }
78
+ }, /*#__PURE__*/React.createElement(Header, metaProps), /*#__PURE__*/React.createElement(DebugSidebar, {
79
+ itemId: itemId,
80
+ itemEntity: itemEntity,
81
+ updatedDebugOptions: updatedDebugOptions
82
+ }), isPreview && /*#__PURE__*/React.createElement("div", {
83
+ className: "preview-header"
84
+ }, PREVIEW_MODE), !!pageBuilder.length && buildPBComponents(pageBuilder, buildPBComponentsOptions, true));
85
+ };
86
+ ContentContainer.propTypes = {
87
+ fullUrl: PropTypes.string.isRequired,
88
+ pageData: PropTypes.object.isRequired,
89
+ isPreview: PropTypes.bool.isRequired,
90
+ itemId: PropTypes.string.isRequired,
91
+ itemEntity: PropTypes.string.isRequired
92
+ };
93
+ export default ContentContainer;
94
+ //# sourceMappingURL=ContentContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentContainer.js","names":["React","useState","useEffect","PropTypes","buildPBComponents","getLightboxImages","Header","MainContextProvider","getSearchFilter","checkForGtm","PREVIEW_MODE","DebugSidebar","ContentContainer","fullUrl","pageData","isPreview","itemId","itemEntity","open","setOpen","debugOptions","setDebugOptions","editorModeEnabled","selectedImage","setSelectedImage","toggleModal","category","tags","preparedPageBuilderComponents","metaProps","_objectWithoutProperties","_excluded","pageBuilder","options","parent","searchFilterItems","defaultSearchFilter","settings","url","searchFilter","allSearchFilters","lightboxImages","hasGTM","GlobalLigthBoxProps","buildPBComponentsOptions","_objectSpread","updatedDebugOptions","newOptions","createElement","value","className","length","propTypes","string","isRequired","object","bool"],"sources":["../../src/containers/ContentContainer.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { buildPBComponents, getLightboxImages } from '@blaze-cms/plugin-page-builder-fe';\nimport { Header, MainContextProvider } from '@blaze-cms/nextjs-components';\nimport { getSearchFilter, checkForGtm } from '../helpers';\nimport { PREVIEW_MODE } from '../constants';\nimport { DebugSidebar } from '../components';\n\nconst ContentContainer = ({ fullUrl, pageData, isPreview, itemId, itemEntity }) => {\n const [open, setOpen] = useState(false);\n const [debugOptions, setDebugOptions] = useState({ editorModeEnabled: false });\n const [selectedImage, setSelectedImage] = useState(0);\n const toggleModal = () => setOpen(!open);\n\n useEffect(\n () => {\n if (open) setOpen(false);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [fullUrl]\n );\n\n const { category, tags, preparedPageBuilderComponents, ...metaProps } = pageData;\n const pageBuilder = preparedPageBuilderComponents || [];\n const options = { parent: { itemId, itemEntity, category, tags } };\n const searchFilterItems = getSearchFilter(pageBuilder);\n const defaultSearchFilter = searchFilterItems[0];\n // TODO check if this can be removed\n if (defaultSearchFilter && !defaultSearchFilter.settings.url) {\n options.searchFilter = defaultSearchFilter;\n }\n options.allSearchFilters = searchFilterItems;\n const lightboxImages = getLightboxImages(pageBuilder);\n const hasGTM = checkForGtm(pageBuilder);\n const GlobalLigthBoxProps = {\n open,\n setOpen,\n toggleModal,\n selectedImage,\n lightboxImages,\n setSelectedImage\n };\n\n const buildPBComponentsOptions = {\n ...options,\n ...metaProps,\n ...GlobalLigthBoxProps,\n hasGTM\n };\n\n const updatedDebugOptions = (newOptions = {}) => {\n setDebugOptions({\n ...debugOptions,\n ...newOptions\n });\n };\n\n return (\n <MainContextProvider value={{ fullUrl, isPreview, itemId, itemEntity, hasGTM, debugOptions }}>\n <Header {...metaProps} />\n <DebugSidebar\n itemId={itemId}\n itemEntity={itemEntity}\n updatedDebugOptions={updatedDebugOptions}\n />\n {isPreview && <div className=\"preview-header\">{PREVIEW_MODE}</div>}\n {!!pageBuilder.length && buildPBComponents(pageBuilder, buildPBComponentsOptions, true)}\n </MainContextProvider>\n );\n};\n\nContentContainer.propTypes = {\n fullUrl: PropTypes.string.isRequired,\n pageData: PropTypes.object.isRequired,\n isPreview: PropTypes.bool.isRequired,\n itemId: PropTypes.string.isRequired,\n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CAAC,EACjE,CAAC,CAACsB,WAAW,CAACmB,MAAM,IAAI/C,iBAAiB,CAAC4B,WAAW,EAAEY,wBAAwB,EAAE,IAAI,CACnE,CAAC;AAE1B,CAAC;AAEDhC,gBAAgB,CAACwC,SAAS,GAAG;EAC3BvC,OAAO,EAAEV,SAAS,CAACkD,MAAM,CAACC,UAAU;EACpCxC,QAAQ,EAAEX,SAAS,CAACoD,MAAM,CAACD,UAAU;EACrCvC,SAAS,EAAEZ,SAAS,CAACqD,IAAI,CAACF,UAAU;EACpCtC,MAAM,EAAEb,SAAS,CAACkD,MAAM,CAACC,UAAU;EACnCrC,UAAU,EAAEd,SAAS,CAACkD,MAAM,CAACC;AAC/B,CAAC;AAED,eAAe1C,gBAAgB","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import ContentContainer from './ContentContainer';
2
+ export { ContentContainer };
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["ContentContainer"],"sources":["../../src/containers/index.js"],"sourcesContent":["import ContentContainer from './ContentContainer';\n\nexport { ContentContainer };\n"],"mappings":"AAAA,OAAOA,gBAAgB,MAAM,oBAAoB;AAEjD,SAASA,gBAAgB","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import { PUBLISHED_ } from '../constants';
2
+ const buildAdminHref = ({
3
+ itemEntity,
4
+ itemId
5
+ }) => {
6
+ if (!itemEntity || !itemId || !process.env.BLAZE_ADMIN_URL) return '/';
7
+ const updatedItemEntity = itemEntity.replace(PUBLISHED_, '');
8
+ return `${process.env.BLAZE_ADMIN_URL}/data-listing/${updatedItemEntity}/update/${itemId}`;
9
+ };
10
+ export default buildAdminHref;
11
+ //# sourceMappingURL=build-admin-href.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-admin-href.js","names":["PUBLISHED_","buildAdminHref","itemEntity","itemId","process","env","BLAZE_ADMIN_URL","updatedItemEntity","replace"],"sources":["../../src/helpers/build-admin-href.js"],"sourcesContent":["import { PUBLISHED_ } from '../constants';\n\nconst buildAdminHref = ({ itemEntity, itemId }) => {\n if (!itemEntity || !itemId || !process.env.BLAZE_ADMIN_URL) return '/';\n\n const updatedItemEntity = itemEntity.replace(PUBLISHED_, '');\n\n return `${process.env.BLAZE_ADMIN_URL}/data-listing/${updatedItemEntity}/update/${itemId}`;\n};\n\nexport default buildAdminHref;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,MAAMC,cAAc,GAAGA,CAAC;EAAEC,UAAU;EAAEC;AAAO,CAAC,KAAK;EACjD,IAAI,CAACD,UAAU,IAAI,CAACC,MAAM,IAAI,CAACC,OAAO,CAACC,GAAG,CAACC,eAAe,EAAE,OAAO,GAAG;EAEtE,MAAMC,iBAAiB,GAAGL,UAAU,CAACM,OAAO,CAACR,UAAU,EAAE,EAAE,CAAC;EAE5D,OAAO,GAAGI,OAAO,CAACC,GAAG,CAACC,eAAe,iBAAiBC,iBAAiB,WAAWJ,MAAM,EAAE;AAC5F,CAAC;AAED,eAAeF,cAAc","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import { GTM_STRING } from '../constants';
2
+ const checkForGTM = (components = []) => !!components.find(({
3
+ type,
4
+ items
5
+ }) => {
6
+ if (type && type.includes(GTM_STRING)) return true;
7
+ if (items && items.length) return checkForGTM(items);
8
+ return false;
9
+ });
10
+ export default checkForGTM;
11
+ //# sourceMappingURL=check-for-gtm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-for-gtm.js","names":["GTM_STRING","checkForGTM","components","find","type","items","includes","length"],"sources":["../../src/helpers/check-for-gtm.js"],"sourcesContent":["import { GTM_STRING } from '../constants';\n\nconst checkForGTM = (components = []) =>\n !!components.find(({ type, items }) => {\n if (type && type.includes(GTM_STRING)) return true;\n if (items && items.length) return checkForGTM(items);\n return false;\n });\n\nexport default checkForGTM;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,MAAMC,WAAW,GAAGA,CAACC,UAAU,GAAG,EAAE,KAClC,CAAC,CAACA,UAAU,CAACC,IAAI,CAAC,CAAC;EAAEC,IAAI;EAAEC;AAAM,CAAC,KAAK;EACrC,IAAID,IAAI,IAAIA,IAAI,CAACE,QAAQ,CAACN,UAAU,CAAC,EAAE,OAAO,IAAI;EAClD,IAAIK,KAAK,IAAIA,KAAK,CAACE,MAAM,EAAE,OAAON,WAAW,CAACI,KAAK,CAAC;EACpD,OAAO,KAAK;AACd,CAAC,CAAC;AAEJ,eAAeJ,WAAW","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ function checkParent(url) {
2
+ if (!url) return null;
3
+ const parentPATH = url.substring(0, url.lastIndexOf('/'));
4
+ if (parentPATH && parentPATH.length) return parentPATH;
5
+ return null;
6
+ }
7
+ export default checkParent;
8
+ //# sourceMappingURL=check-parent.js.map