@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.
- package/CHANGELOG.md +17 -0
- package/lib/blaze.config.js +2 -0
- package/lib/blaze.config.js.map +1 -1
- package/lib/pages/document/_document.js +12 -3
- package/lib/pages/document/_document.js.map +1 -1
- package/package.json +11 -10
- package/src/blaze.config.js +3 -1
- package/src/pages/document/_document.js +10 -3
- package/tests/unit/src/application/query/__snapshots__/index.test.js.snap +6 -0
- package/tests/unit/src/helpers/static-route-handlers/__snapshots__/generic-file-handler.test.js.snap +2 -0
- package/tests/unit/src/helpers/static-route-handlers/__snapshots__/llms.test.js.snap +1 -0
- package/tests/unit/src/helpers/static-route-handlers/__snapshots__/robots-txt.test.js.snap +1 -0
- package/tests/unit/src/helpers/static-route-handlers/__snapshots__/sitemap-file.test.js.snap +2 -0
- package/tests/unit/src/helpers/static-route-handlers/__snapshots__/sitemap.test.js.snap +1 -0
- package/lib-es/application/query/index.js +0 -71
- package/lib-es/application/query/index.js.map +0 -1
- package/lib-es/blaze.config.js +0 -26
- package/lib-es/blaze.config.js.map +0 -1
- package/lib-es/components/DebugSidebar/DebugSidebar.js +0 -107
- package/lib-es/components/DebugSidebar/DebugSidebar.js.map +0 -1
- package/lib-es/components/DebugSidebar/DebugSidebarRender.js +0 -57
- package/lib-es/components/DebugSidebar/DebugSidebarRender.js.map +0 -1
- package/lib-es/components/DebugSidebar/index.js +0 -3
- package/lib-es/components/DebugSidebar/index.js.map +0 -1
- package/lib-es/components/HashObserver.js +0 -7
- package/lib-es/components/HashObserver.js.map +0 -1
- package/lib-es/components/index.js +0 -4
- package/lib-es/components/index.js.map +0 -1
- package/lib-es/constants.js +0 -102
- package/lib-es/constants.js.map +0 -1
- package/lib-es/containers/ContentContainer.js +0 -94
- package/lib-es/containers/ContentContainer.js.map +0 -1
- package/lib-es/containers/index.js +0 -3
- package/lib-es/containers/index.js.map +0 -1
- package/lib-es/helpers/build-admin-href.js +0 -11
- package/lib-es/helpers/build-admin-href.js.map +0 -1
- package/lib-es/helpers/check-for-gtm.js +0 -11
- package/lib-es/helpers/check-for-gtm.js.map +0 -1
- package/lib-es/helpers/check-parent.js +0 -8
- package/lib-es/helpers/check-parent.js.map +0 -1
- package/lib-es/helpers/check-preview-url.js +0 -9
- package/lib-es/helpers/check-preview-url.js.map +0 -1
- package/lib-es/helpers/check-url.js +0 -245
- package/lib-es/helpers/check-url.js.map +0 -1
- package/lib-es/helpers/get-entitys-actions.js +0 -16
- package/lib-es/helpers/get-entitys-actions.js.map +0 -1
- package/lib-es/helpers/get-error-message.js +0 -13
- package/lib-es/helpers/get-error-message.js.map +0 -1
- package/lib-es/helpers/get-from-local.js +0 -11
- package/lib-es/helpers/get-from-local.js.map +0 -1
- package/lib-es/helpers/get-page-data.js +0 -39
- package/lib-es/helpers/get-page-data.js.map +0 -1
- package/lib-es/helpers/get-root-selector-classes.js +0 -14
- package/lib-es/helpers/get-root-selector-classes.js.map +0 -1
- package/lib-es/helpers/get-search-filter.js +0 -14
- package/lib-es/helpers/get-search-filter.js.map +0 -1
- package/lib-es/helpers/handle-static-routes.js +0 -12
- package/lib-es/helpers/handle-static-routes.js.map +0 -1
- package/lib-es/helpers/index.js +0 -14
- package/lib-es/helpers/index.js.map +0 -1
- package/lib-es/helpers/render-apple-tags.js +0 -13
- package/lib-es/helpers/render-apple-tags.js.map +0 -1
- package/lib-es/helpers/set-blaze-debug.js +0 -31
- package/lib-es/helpers/set-blaze-debug.js.map +0 -1
- package/lib-es/helpers/static-route-handlers/generic-file-handler.js +0 -43
- package/lib-es/helpers/static-route-handlers/generic-file-handler.js.map +0 -1
- package/lib-es/helpers/static-route-handlers/index.js +0 -27
- package/lib-es/helpers/static-route-handlers/index.js.map +0 -1
- package/lib-es/helpers/static-route-handlers/llms.js +0 -19
- package/lib-es/helpers/static-route-handlers/llms.js.map +0 -1
- package/lib-es/helpers/static-route-handlers/robots-txt.js +0 -19
- package/lib-es/helpers/static-route-handlers/robots-txt.js.map +0 -1
- package/lib-es/helpers/static-route-handlers/sitemap-file.js +0 -27
- package/lib-es/helpers/static-route-handlers/sitemap-file.js.map +0 -1
- package/lib-es/helpers/static-route-handlers/sitemap.js +0 -19
- package/lib-es/helpers/static-route-handlers/sitemap.js.map +0 -1
- package/lib-es/hoc/withBlaze.js +0 -153
- package/lib-es/hoc/withBlaze.js.map +0 -1
- package/lib-es/hooks/use-get-page.js +0 -19
- package/lib-es/hooks/use-get-page.js.map +0 -1
- package/lib-es/hooks/use-hash-observer.js +0 -94
- package/lib-es/hooks/use-hash-observer.js.map +0 -1
- package/lib-es/index.js +0 -9
- package/lib-es/index.js.map +0 -1
- package/lib-es/pages/Resolver.js +0 -88
- package/lib-es/pages/Resolver.js.map +0 -1
- package/lib-es/pages/document/DocumentBody.js +0 -11
- package/lib-es/pages/document/DocumentBody.js.map +0 -1
- package/lib-es/pages/document/_document.js +0 -21
- package/lib-es/pages/document/_document.js.map +0 -1
- package/lib-es/server/index.js +0 -16
- package/lib-es/server/index.js.map +0 -1
- package/lib-es/server/routes.js +0 -36
- package/lib-es/server/routes.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-from-local.js","names":["getFromLocal","key","window","value","localStorage","getItem","JSON","parse","error"],"sources":["../../src/helpers/get-from-local.js"],"sourcesContent":["const getFromLocal = key => {\n if (typeof window === 'undefined') return null;\n\n try {\n const value = localStorage.getItem(key);\n return value ? JSON.parse(value) : null;\n } catch (error) {\n return null;\n }\n};\n\nexport default getFromLocal;\n"],"mappings":"AAAA,MAAMA,YAAY,GAAGC,GAAG,IAAI;EAC1B,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAO,IAAI;EAE9C,IAAI;IACF,MAAMC,KAAK,GAAGC,YAAY,CAACC,OAAO,CAACJ,GAAG,CAAC;IACvC,OAAOE,KAAK,GAAGG,IAAI,CAACC,KAAK,CAACJ,KAAK,CAAC,GAAG,IAAI;EACzC,CAAC,CAAC,OAAOK,KAAK,EAAE;IACd,OAAO,IAAI;EACb;AACF,CAAC;AAED,eAAeR,YAAY","ignoreList":[]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
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; }
|
|
3
|
-
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; }
|
|
4
|
-
import { GET_ENTITY_SCHEMA, getPageQuery } from '../application/query';
|
|
5
|
-
import getErrorMessage from './get-error-message';
|
|
6
|
-
const getPageData = async ({
|
|
7
|
-
apolloClient,
|
|
8
|
-
itemId,
|
|
9
|
-
itemEntity,
|
|
10
|
-
isPreview = true
|
|
11
|
-
}) => {
|
|
12
|
-
try {
|
|
13
|
-
const {
|
|
14
|
-
data: {
|
|
15
|
-
entitySchema
|
|
16
|
-
}
|
|
17
|
-
} = await apolloClient.query({
|
|
18
|
-
query: GET_ENTITY_SCHEMA,
|
|
19
|
-
variables: {
|
|
20
|
-
id: itemEntity
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const {
|
|
24
|
-
data
|
|
25
|
-
} = await apolloClient.query({
|
|
26
|
-
query: getPageQuery(_objectSpread(_objectSpread({}, entitySchema), {}, {
|
|
27
|
-
isPreview
|
|
28
|
-
})),
|
|
29
|
-
variables: {
|
|
30
|
-
id: itemId
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
return data;
|
|
34
|
-
} catch (error) {
|
|
35
|
-
return getErrorMessage(error);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export default getPageData;
|
|
39
|
-
//# sourceMappingURL=get-page-data.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-page-data.js","names":["GET_ENTITY_SCHEMA","getPageQuery","getErrorMessage","getPageData","apolloClient","itemId","itemEntity","isPreview","data","entitySchema","query","variables","id","_objectSpread","error"],"sources":["../../src/helpers/get-page-data.js"],"sourcesContent":["import { GET_ENTITY_SCHEMA, getPageQuery } from '../application/query';\nimport getErrorMessage from './get-error-message';\n\nconst getPageData = async ({ apolloClient, itemId, itemEntity, isPreview = true }) => {\n try {\n const {\n data: { entitySchema }\n } = await apolloClient.query({\n query: GET_ENTITY_SCHEMA,\n variables: { id: itemEntity }\n });\n\n const { data } = await apolloClient.query({\n query: getPageQuery({ ...entitySchema, isPreview }),\n variables: { id: itemId }\n });\n return data;\n } catch (error) {\n return getErrorMessage(error);\n }\n};\n\nexport default getPageData;\n"],"mappings":";;;AAAA,SAASA,iBAAiB,EAAEC,YAAY,QAAQ,sBAAsB;AACtE,OAAOC,eAAe,MAAM,qBAAqB;AAEjD,MAAMC,WAAW,GAAG,MAAAA,CAAO;EAAEC,YAAY;EAAEC,MAAM;EAAEC,UAAU;EAAEC,SAAS,GAAG;AAAK,CAAC,KAAK;EACpF,IAAI;IACF,MAAM;MACJC,IAAI,EAAE;QAAEC;MAAa;IACvB,CAAC,GAAG,MAAML,YAAY,CAACM,KAAK,CAAC;MAC3BA,KAAK,EAAEV,iBAAiB;MACxBW,SAAS,EAAE;QAAEC,EAAE,EAAEN;MAAW;IAC9B,CAAC,CAAC;IAEF,MAAM;MAAEE;IAAK,CAAC,GAAG,MAAMJ,YAAY,CAACM,KAAK,CAAC;MACxCA,KAAK,EAAET,YAAY,CAAAY,aAAA,CAAAA,aAAA,KAAMJ,YAAY;QAAEF;MAAS,EAAE,CAAC;MACnDI,SAAS,EAAE;QAAEC,EAAE,EAAEP;MAAO;IAC1B,CAAC,CAAC;IACF,OAAOG,IAAI;EACb,CAAC,CAAC,OAAOM,KAAK,EAAE;IACd,OAAOZ,eAAe,CAACY,KAAK,CAAC;EAC/B;AACF,CAAC;AAED,eAAeX,WAAW","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ROOT_SELECTOR_SEPARATOR, ROOT_SELECTOR_CLASS_PREFIX, RESOLVER_CONTAINER_CLASS } from '../constants';
|
|
2
|
-
function getRootSelectorClasses(url, classesLimit = 0) {
|
|
3
|
-
if (!classesLimit || !url) return RESOLVER_CONTAINER_CLASS;
|
|
4
|
-
const urlParts = url.split('/').filter(part => part);
|
|
5
|
-
if (!urlParts.length) return `${RESOLVER_CONTAINER_CLASS} ${ROOT_SELECTOR_CLASS_PREFIX}`;
|
|
6
|
-
const classes = urlParts.slice(0, classesLimit).reduce((acc, urlSection, index) => {
|
|
7
|
-
const newClass = [!index ? ROOT_SELECTOR_CLASS_PREFIX : acc[index - 1], urlSection].join(ROOT_SELECTOR_SEPARATOR);
|
|
8
|
-
acc.push(newClass);
|
|
9
|
-
return acc;
|
|
10
|
-
}, []);
|
|
11
|
-
return `${RESOLVER_CONTAINER_CLASS} ${classes.join(' ')}`;
|
|
12
|
-
}
|
|
13
|
-
export default getRootSelectorClasses;
|
|
14
|
-
//# sourceMappingURL=get-root-selector-classes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-root-selector-classes.js","names":["ROOT_SELECTOR_SEPARATOR","ROOT_SELECTOR_CLASS_PREFIX","RESOLVER_CONTAINER_CLASS","getRootSelectorClasses","url","classesLimit","urlParts","split","filter","part","length","classes","slice","reduce","acc","urlSection","index","newClass","join","push"],"sources":["../../src/helpers/get-root-selector-classes.js"],"sourcesContent":["import {\n ROOT_SELECTOR_SEPARATOR,\n ROOT_SELECTOR_CLASS_PREFIX,\n RESOLVER_CONTAINER_CLASS\n} from '../constants';\n\nfunction getRootSelectorClasses(url, classesLimit = 0) {\n if (!classesLimit || !url) return RESOLVER_CONTAINER_CLASS;\n\n const urlParts = url.split('/').filter(part => part);\n if (!urlParts.length) return `${RESOLVER_CONTAINER_CLASS} ${ROOT_SELECTOR_CLASS_PREFIX}`;\n\n const classes = urlParts.slice(0, classesLimit).reduce((acc, urlSection, index) => {\n const newClass = [!index ? ROOT_SELECTOR_CLASS_PREFIX : acc[index - 1], urlSection].join(\n ROOT_SELECTOR_SEPARATOR\n );\n acc.push(newClass);\n return acc;\n }, []);\n\n return `${RESOLVER_CONTAINER_CLASS} ${classes.join(' ')}`;\n}\n\nexport default getRootSelectorClasses;\n"],"mappings":"AAAA,SACEA,uBAAuB,EACvBC,0BAA0B,EAC1BC,wBAAwB,QACnB,cAAc;AAErB,SAASC,sBAAsBA,CAACC,GAAG,EAAEC,YAAY,GAAG,CAAC,EAAE;EACrD,IAAI,CAACA,YAAY,IAAI,CAACD,GAAG,EAAE,OAAOF,wBAAwB;EAE1D,MAAMI,QAAQ,GAAGF,GAAG,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,MAAM,CAACC,IAAI,IAAIA,IAAI,CAAC;EACpD,IAAI,CAACH,QAAQ,CAACI,MAAM,EAAE,OAAO,GAAGR,wBAAwB,IAAID,0BAA0B,EAAE;EAExF,MAAMU,OAAO,GAAGL,QAAQ,CAACM,KAAK,CAAC,CAAC,EAAEP,YAAY,CAAC,CAACQ,MAAM,CAAC,CAACC,GAAG,EAAEC,UAAU,EAAEC,KAAK,KAAK;IACjF,MAAMC,QAAQ,GAAG,CAAC,CAACD,KAAK,GAAGf,0BAA0B,GAAGa,GAAG,CAACE,KAAK,GAAG,CAAC,CAAC,EAAED,UAAU,CAAC,CAACG,IAAI,CACtFlB,uBACF,CAAC;IACDc,GAAG,CAACK,IAAI,CAACF,QAAQ,CAAC;IAClB,OAAOH,GAAG;EACZ,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO,GAAGZ,wBAAwB,IAAIS,OAAO,CAACO,IAAI,CAAC,GAAG,CAAC,EAAE;AAC3D;AAEA,eAAef,sBAAsB","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SEARCH_FILTER } from '../constants';
|
|
2
|
-
const getSearchFilter = pageBuilder => {
|
|
3
|
-
const searchFilter = [];
|
|
4
|
-
const checkForSearchFilter = pbItems => {
|
|
5
|
-
pbItems.forEach(pbItem => {
|
|
6
|
-
if (pbItem.type === SEARCH_FILTER) searchFilter.push(pbItem);
|
|
7
|
-
if (pbItem.items && pbItem.items.length) checkForSearchFilter(pbItem.items);
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
checkForSearchFilter(pageBuilder);
|
|
11
|
-
return searchFilter;
|
|
12
|
-
};
|
|
13
|
-
export default getSearchFilter;
|
|
14
|
-
//# sourceMappingURL=get-search-filter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-search-filter.js","names":["SEARCH_FILTER","getSearchFilter","pageBuilder","searchFilter","checkForSearchFilter","pbItems","forEach","pbItem","type","push","items","length"],"sources":["../../src/helpers/get-search-filter.js"],"sourcesContent":["import { SEARCH_FILTER } from '../constants';\n\nconst getSearchFilter = pageBuilder => {\n const searchFilter = [];\n\n const checkForSearchFilter = pbItems => {\n pbItems.forEach(pbItem => {\n if (pbItem.type === SEARCH_FILTER) searchFilter.push(pbItem);\n if (pbItem.items && pbItem.items.length) checkForSearchFilter(pbItem.items);\n });\n };\n\n checkForSearchFilter(pageBuilder);\n\n return searchFilter;\n};\nexport default getSearchFilter;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAE5C,MAAMC,eAAe,GAAGC,WAAW,IAAI;EACrC,MAAMC,YAAY,GAAG,EAAE;EAEvB,MAAMC,oBAAoB,GAAGC,OAAO,IAAI;IACtCA,OAAO,CAACC,OAAO,CAACC,MAAM,IAAI;MACxB,IAAIA,MAAM,CAACC,IAAI,KAAKR,aAAa,EAAEG,YAAY,CAACM,IAAI,CAACF,MAAM,CAAC;MAC5D,IAAIA,MAAM,CAACG,KAAK,IAAIH,MAAM,CAACG,KAAK,CAACC,MAAM,EAAEP,oBAAoB,CAACG,MAAM,CAACG,KAAK,CAAC;IAC7E,CAAC,CAAC;EACJ,CAAC;EAEDN,oBAAoB,CAACF,WAAW,CAAC;EAEjC,OAAOC,YAAY;AACrB,CAAC;AACD,eAAeF,eAAe","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import staticRouteHandlers from './static-route-handlers';
|
|
2
|
-
function getHandler(path) {
|
|
3
|
-
// eslint-disable-next-line no-restricted-syntax,no-unused-vars,guard-for-in
|
|
4
|
-
for (const [staticRoutePattern, staticRouteHandler] of staticRouteHandlers.entries()) {
|
|
5
|
-
if (staticRoutePattern.test(path)) return staticRouteHandler;
|
|
6
|
-
}
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
export default {
|
|
10
|
-
getHandler
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=handle-static-routes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handle-static-routes.js","names":["staticRouteHandlers","getHandler","path","staticRoutePattern","staticRouteHandler","entries","test"],"sources":["../../src/helpers/handle-static-routes.js"],"sourcesContent":["import staticRouteHandlers from './static-route-handlers';\n\nfunction getHandler(path) {\n // eslint-disable-next-line no-restricted-syntax,no-unused-vars,guard-for-in\n for (const [staticRoutePattern, staticRouteHandler] of staticRouteHandlers.entries()) {\n if (staticRoutePattern.test(path)) return staticRouteHandler;\n }\n return false;\n}\n\nexport default {\n getHandler\n};\n"],"mappings":"AAAA,OAAOA,mBAAmB,MAAM,yBAAyB;AAEzD,SAASC,UAAUA,CAACC,IAAI,EAAE;EACxB;EACA,KAAK,MAAM,CAACC,kBAAkB,EAAEC,kBAAkB,CAAC,IAAIJ,mBAAmB,CAACK,OAAO,CAAC,CAAC,EAAE;IACpF,IAAIF,kBAAkB,CAACG,IAAI,CAACJ,IAAI,CAAC,EAAE,OAAOE,kBAAkB;EAC9D;EACA,OAAO,KAAK;AACd;AAEA,eAAe;EACbH;AACF,CAAC","ignoreList":[]}
|
package/lib-es/helpers/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import checkUrl from './check-url';
|
|
2
|
-
import getEntitysActions from './get-entitys-actions';
|
|
3
|
-
import getSearchFilter from './get-search-filter';
|
|
4
|
-
import checkParent from './check-parent';
|
|
5
|
-
import buildAdminHref from './build-admin-href';
|
|
6
|
-
import setBlazeDebug from './set-blaze-debug';
|
|
7
|
-
import checkForGtm from './check-for-gtm';
|
|
8
|
-
import renderAppleTags from './render-apple-tags';
|
|
9
|
-
import getPageData from './get-page-data';
|
|
10
|
-
import getErrorMessage from './get-error-message';
|
|
11
|
-
import getRootSelectorClasses from './get-root-selector-classes';
|
|
12
|
-
import getFromLocal from './get-from-local';
|
|
13
|
-
export { buildAdminHref, checkForGtm, checkParent, checkUrl, getEntitysActions, getFromLocal, getSearchFilter, getPageData, getErrorMessage, renderAppleTags, setBlazeDebug, getRootSelectorClasses };
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["checkUrl","getEntitysActions","getSearchFilter","checkParent","buildAdminHref","setBlazeDebug","checkForGtm","renderAppleTags","getPageData","getErrorMessage","getRootSelectorClasses","getFromLocal"],"sources":["../../src/helpers/index.js"],"sourcesContent":["import checkUrl from './check-url';\nimport getEntitysActions from './get-entitys-actions';\nimport getSearchFilter from './get-search-filter';\nimport checkParent from './check-parent';\nimport buildAdminHref from './build-admin-href';\nimport setBlazeDebug from './set-blaze-debug';\nimport checkForGtm from './check-for-gtm';\nimport renderAppleTags from './render-apple-tags';\nimport getPageData from './get-page-data';\nimport getErrorMessage from './get-error-message';\nimport getRootSelectorClasses from './get-root-selector-classes';\nimport getFromLocal from './get-from-local';\n\nexport {\n buildAdminHref,\n checkForGtm,\n checkParent,\n checkUrl,\n getEntitysActions,\n getFromLocal,\n getSearchFilter,\n getPageData,\n getErrorMessage,\n renderAppleTags,\n setBlazeDebug,\n getRootSelectorClasses\n};\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,aAAa;AAClC,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAOC,sBAAsB,MAAM,6BAA6B;AAChE,OAAOC,YAAY,MAAM,kBAAkB;AAE3C,SACEP,cAAc,EACdE,WAAW,EACXH,WAAW,EACXH,QAAQ,EACRC,iBAAiB,EACjBU,YAAY,EACZT,eAAe,EACfM,WAAW,EACXC,eAAe,EACfF,eAAe,EACfF,aAAa,EACbK,sBAAsB","ignoreList":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { APPLE_TAGS } from '../constants';
|
|
3
|
-
const renderAppleTags = () => APPLE_TAGS.map(({
|
|
4
|
-
href,
|
|
5
|
-
rel,
|
|
6
|
-
sizes
|
|
7
|
-
}) => /*#__PURE__*/React.createElement("link", {
|
|
8
|
-
href: href,
|
|
9
|
-
rel: rel,
|
|
10
|
-
sizes: sizes
|
|
11
|
-
}));
|
|
12
|
-
export default renderAppleTags;
|
|
13
|
-
//# sourceMappingURL=render-apple-tags.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-apple-tags.js","names":["React","APPLE_TAGS","renderAppleTags","map","href","rel","sizes","createElement"],"sources":["../../src/helpers/render-apple-tags.js"],"sourcesContent":["import React from 'react';\nimport { APPLE_TAGS } from '../constants';\n\nconst renderAppleTags = () =>\n APPLE_TAGS.map(({ href, rel, sizes }) => <link href={href} rel={rel} sizes={sizes} />);\n\nexport default renderAppleTags;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AAEzC,MAAMC,eAAe,GAAGA,CAAA,KACtBD,UAAU,CAACE,GAAG,CAAC,CAAC;EAAEC,IAAI;EAAEC,GAAG;EAAEC;AAAM,CAAC,kBAAKN,KAAA,CAAAO,aAAA;EAAMH,IAAI,EAAEA,IAAK;EAACC,GAAG,EAAEA,GAAI;EAACC,KAAK,EAAEA;AAAM,CAAE,CAAC,CAAC;AAExF,eAAeJ,eAAe","ignoreList":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { BLAZE_DEBUG, BLAZE_PB_EDITOR_MODE } from '../constants';
|
|
2
|
-
import getFromLocal from './get-from-local';
|
|
3
|
-
const setBlazeDebug = setIsDebugMode => {
|
|
4
|
-
if (typeof window === 'undefined') return;
|
|
5
|
-
const {
|
|
6
|
-
localStorage,
|
|
7
|
-
location
|
|
8
|
-
} = window;
|
|
9
|
-
const params = new URLSearchParams(location.search);
|
|
10
|
-
window.blaze = window.blaze || {};
|
|
11
|
-
window.blaze.debug = () => {
|
|
12
|
-
const stored = getFromLocal(BLAZE_DEBUG);
|
|
13
|
-
if (stored) {
|
|
14
|
-
localStorage.removeItem(BLAZE_DEBUG);
|
|
15
|
-
window.localStorage.removeItem(BLAZE_PB_EDITOR_MODE);
|
|
16
|
-
setIsDebugMode(false);
|
|
17
|
-
} else {
|
|
18
|
-
localStorage.setItem(BLAZE_DEBUG, 'true');
|
|
19
|
-
setIsDebugMode(true);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
if (params.get(BLAZE_DEBUG) === '1') {
|
|
23
|
-
localStorage.setItem(BLAZE_DEBUG, 'true');
|
|
24
|
-
setIsDebugMode(true);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const stored = JSON.parse(localStorage.getItem(BLAZE_DEBUG));
|
|
28
|
-
setIsDebugMode(!!stored);
|
|
29
|
-
};
|
|
30
|
-
export default setBlazeDebug;
|
|
31
|
-
//# sourceMappingURL=set-blaze-debug.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-blaze-debug.js","names":["BLAZE_DEBUG","BLAZE_PB_EDITOR_MODE","getFromLocal","setBlazeDebug","setIsDebugMode","window","localStorage","location","params","URLSearchParams","search","blaze","debug","stored","removeItem","setItem","get","JSON","parse","getItem"],"sources":["../../src/helpers/set-blaze-debug.js"],"sourcesContent":["import { BLAZE_DEBUG, BLAZE_PB_EDITOR_MODE } from '../constants';\nimport getFromLocal from './get-from-local';\n\nconst setBlazeDebug = setIsDebugMode => {\n if (typeof window === 'undefined') return;\n\n const { localStorage, location } = window;\n const params = new URLSearchParams(location.search);\n\n window.blaze = window.blaze || {};\n window.blaze.debug = () => {\n const stored = getFromLocal(BLAZE_DEBUG);\n if (stored) {\n localStorage.removeItem(BLAZE_DEBUG);\n window.localStorage.removeItem(BLAZE_PB_EDITOR_MODE);\n setIsDebugMode(false);\n } else {\n localStorage.setItem(BLAZE_DEBUG, 'true');\n setIsDebugMode(true);\n }\n };\n\n if (params.get(BLAZE_DEBUG) === '1') {\n localStorage.setItem(BLAZE_DEBUG, 'true');\n setIsDebugMode(true);\n return;\n }\n\n const stored = JSON.parse(localStorage.getItem(BLAZE_DEBUG));\n setIsDebugMode(!!stored);\n};\n\nexport default setBlazeDebug;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,oBAAoB,QAAQ,cAAc;AAChE,OAAOC,YAAY,MAAM,kBAAkB;AAE3C,MAAMC,aAAa,GAAGC,cAAc,IAAI;EACtC,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;EAEnC,MAAM;IAAEC,YAAY;IAAEC;EAAS,CAAC,GAAGF,MAAM;EACzC,MAAMG,MAAM,GAAG,IAAIC,eAAe,CAACF,QAAQ,CAACG,MAAM,CAAC;EAEnDL,MAAM,CAACM,KAAK,GAAGN,MAAM,CAACM,KAAK,IAAI,CAAC,CAAC;EACjCN,MAAM,CAACM,KAAK,CAACC,KAAK,GAAG,MAAM;IACzB,MAAMC,MAAM,GAAGX,YAAY,CAACF,WAAW,CAAC;IACxC,IAAIa,MAAM,EAAE;MACVP,YAAY,CAACQ,UAAU,CAACd,WAAW,CAAC;MACpCK,MAAM,CAACC,YAAY,CAACQ,UAAU,CAACb,oBAAoB,CAAC;MACpDG,cAAc,CAAC,KAAK,CAAC;IACvB,CAAC,MAAM;MACLE,YAAY,CAACS,OAAO,CAACf,WAAW,EAAE,MAAM,CAAC;MACzCI,cAAc,CAAC,IAAI,CAAC;IACtB;EACF,CAAC;EAED,IAAII,MAAM,CAACQ,GAAG,CAAChB,WAAW,CAAC,KAAK,GAAG,EAAE;IACnCM,YAAY,CAACS,OAAO,CAACf,WAAW,EAAE,MAAM,CAAC;IACzCI,cAAc,CAAC,IAAI,CAAC;IACpB;EACF;EAEA,MAAMS,MAAM,GAAGI,IAAI,CAACC,KAAK,CAACZ,YAAY,CAACa,OAAO,CAACnB,WAAW,CAAC,CAAC;EAC5DI,cAAc,CAAC,CAAC,CAACS,MAAM,CAAC;AAC1B,CAAC;AAED,eAAeV,aAAa","ignoreList":[]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import 'cross-fetch/polyfill';
|
|
2
|
-
import { RESPONSE_404, STATIC_FILE_FORWARD_HEADERS } from '../../constants';
|
|
3
|
-
const getHandler = (fileQuery, getVariables) => async props => {
|
|
4
|
-
const {
|
|
5
|
-
res,
|
|
6
|
-
apolloClient
|
|
7
|
-
} = props;
|
|
8
|
-
const variables = getVariables ? getVariables(props) : {};
|
|
9
|
-
const {
|
|
10
|
-
data: {
|
|
11
|
-
files = []
|
|
12
|
-
}
|
|
13
|
-
} = await apolloClient.query({
|
|
14
|
-
query: fileQuery,
|
|
15
|
-
variables
|
|
16
|
-
});
|
|
17
|
-
const [{
|
|
18
|
-
mimetype,
|
|
19
|
-
url
|
|
20
|
-
} = {}] = files;
|
|
21
|
-
if (!url) {
|
|
22
|
-
res.writeHead(404);
|
|
23
|
-
res.write(RESPONSE_404);
|
|
24
|
-
res.end();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const fileResponse = await fetch(url);
|
|
28
|
-
setHeadersFromResponse(fileResponse.headers, res);
|
|
29
|
-
res.writeHead(200, {
|
|
30
|
-
'Content-Type': mimetype
|
|
31
|
-
});
|
|
32
|
-
res.write(await fileResponse.text());
|
|
33
|
-
res.end();
|
|
34
|
-
};
|
|
35
|
-
function setHeadersFromResponse(headers, res) {
|
|
36
|
-
STATIC_FILE_FORWARD_HEADERS.forEach(headerKey => {
|
|
37
|
-
const headerValue = headers.get(headerKey);
|
|
38
|
-
if (!headerValue) return;
|
|
39
|
-
res.setHeader(headerKey, headerValue);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
export default getHandler;
|
|
43
|
-
//# sourceMappingURL=generic-file-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generic-file-handler.js","names":["RESPONSE_404","STATIC_FILE_FORWARD_HEADERS","getHandler","fileQuery","getVariables","props","res","apolloClient","variables","data","files","query","mimetype","url","writeHead","write","end","fileResponse","fetch","setHeadersFromResponse","headers","text","forEach","headerKey","headerValue","get","setHeader"],"sources":["../../../src/helpers/static-route-handlers/generic-file-handler.js"],"sourcesContent":["import 'cross-fetch/polyfill';\nimport { RESPONSE_404, STATIC_FILE_FORWARD_HEADERS } from '../../constants';\n\nconst getHandler = (fileQuery, getVariables) => async props => {\n const { res, apolloClient } = props;\n const variables = getVariables ? getVariables(props) : {};\n const {\n data: { files = [] }\n } = await apolloClient.query({ query: fileQuery, variables });\n const [{ mimetype, url } = {}] = files;\n if (!url) {\n res.writeHead(404);\n res.write(RESPONSE_404);\n res.end();\n return;\n }\n\n const fileResponse = await fetch(url);\n\n setHeadersFromResponse(fileResponse.headers, res);\n res.writeHead(200, { 'Content-Type': mimetype });\n res.write(await fileResponse.text());\n res.end();\n};\n\nfunction setHeadersFromResponse(headers, res) {\n STATIC_FILE_FORWARD_HEADERS.forEach(headerKey => {\n const headerValue = headers.get(headerKey);\n if (!headerValue) return;\n\n res.setHeader(headerKey, headerValue);\n });\n}\n\nexport default getHandler;\n"],"mappings":"AAAA,OAAO,sBAAsB;AAC7B,SAASA,YAAY,EAAEC,2BAA2B,QAAQ,iBAAiB;AAE3E,MAAMC,UAAU,GAAGA,CAACC,SAAS,EAAEC,YAAY,KAAK,MAAMC,KAAK,IAAI;EAC7D,MAAM;IAAEC,GAAG;IAAEC;EAAa,CAAC,GAAGF,KAAK;EACnC,MAAMG,SAAS,GAAGJ,YAAY,GAAGA,YAAY,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC;EACzD,MAAM;IACJI,IAAI,EAAE;MAAEC,KAAK,GAAG;IAAG;EACrB,CAAC,GAAG,MAAMH,YAAY,CAACI,KAAK,CAAC;IAAEA,KAAK,EAAER,SAAS;IAAEK;EAAU,CAAC,CAAC;EAC7D,MAAM,CAAC;IAAEI,QAAQ;IAAEC;EAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAGH,KAAK;EACtC,IAAI,CAACG,GAAG,EAAE;IACRP,GAAG,CAACQ,SAAS,CAAC,GAAG,CAAC;IAClBR,GAAG,CAACS,KAAK,CAACf,YAAY,CAAC;IACvBM,GAAG,CAACU,GAAG,CAAC,CAAC;IACT;EACF;EAEA,MAAMC,YAAY,GAAG,MAAMC,KAAK,CAACL,GAAG,CAAC;EAErCM,sBAAsB,CAACF,YAAY,CAACG,OAAO,EAAEd,GAAG,CAAC;EACjDA,GAAG,CAACQ,SAAS,CAAC,GAAG,EAAE;IAAE,cAAc,EAAEF;EAAS,CAAC,CAAC;EAChDN,GAAG,CAACS,KAAK,CAAC,MAAME,YAAY,CAACI,IAAI,CAAC,CAAC,CAAC;EACpCf,GAAG,CAACU,GAAG,CAAC,CAAC;AACX,CAAC;AAED,SAASG,sBAAsBA,CAACC,OAAO,EAAEd,GAAG,EAAE;EAC5CL,2BAA2B,CAACqB,OAAO,CAACC,SAAS,IAAI;IAC/C,MAAMC,WAAW,GAAGJ,OAAO,CAACK,GAAG,CAACF,SAAS,CAAC;IAC1C,IAAI,CAACC,WAAW,EAAE;IAElBlB,GAAG,CAACoB,SAAS,CAACH,SAAS,EAAEC,WAAW,CAAC;EACvC,CAAC,CAAC;AACJ;AAEA,eAAetB,UAAU","ignoreList":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as sitemap from './sitemap';
|
|
2
|
-
import * as sitemapFile from './sitemap-file';
|
|
3
|
-
import * as robots from './robots-txt';
|
|
4
|
-
import * as llms from './llms';
|
|
5
|
-
const {
|
|
6
|
-
pattern: sitemapPattern,
|
|
7
|
-
handler: sitemapHandler
|
|
8
|
-
} = sitemap;
|
|
9
|
-
const {
|
|
10
|
-
pattern: sitemapFilePattern,
|
|
11
|
-
handler: sitemapFileHandler
|
|
12
|
-
} = sitemapFile;
|
|
13
|
-
const {
|
|
14
|
-
pattern: robotsTxtPattern,
|
|
15
|
-
handler: robotsTxtHandler
|
|
16
|
-
} = robots;
|
|
17
|
-
const {
|
|
18
|
-
pattern: llmsPattern,
|
|
19
|
-
handler: llmsTxtHandler
|
|
20
|
-
} = llms;
|
|
21
|
-
const config = new Map();
|
|
22
|
-
config.set(sitemapPattern, sitemapHandler);
|
|
23
|
-
config.set(sitemapFilePattern, sitemapFileHandler);
|
|
24
|
-
config.set(robotsTxtPattern, robotsTxtHandler);
|
|
25
|
-
config.set(llmsPattern, llmsTxtHandler);
|
|
26
|
-
export default config;
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["sitemap","sitemapFile","robots","llms","pattern","sitemapPattern","handler","sitemapHandler","sitemapFilePattern","sitemapFileHandler","robotsTxtPattern","robotsTxtHandler","llmsPattern","llmsTxtHandler","config","Map","set"],"sources":["../../../src/helpers/static-route-handlers/index.js"],"sourcesContent":["import * as sitemap from './sitemap';\nimport * as sitemapFile from './sitemap-file';\nimport * as robots from './robots-txt';\nimport * as llms from './llms';\n\nconst { pattern: sitemapPattern, handler: sitemapHandler } = sitemap;\nconst { pattern: sitemapFilePattern, handler: sitemapFileHandler } = sitemapFile;\nconst { pattern: robotsTxtPattern, handler: robotsTxtHandler } = robots;\nconst { pattern: llmsPattern, handler: llmsTxtHandler } = llms;\n\nconst config = new Map();\nconfig.set(sitemapPattern, sitemapHandler);\nconfig.set(sitemapFilePattern, sitemapFileHandler);\nconfig.set(robotsTxtPattern, robotsTxtHandler);\nconfig.set(llmsPattern, llmsTxtHandler);\n\nexport default config;\n"],"mappings":"AAAA,OAAO,KAAKA,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,WAAW,MAAM,gBAAgB;AAC7C,OAAO,KAAKC,MAAM,MAAM,cAAc;AACtC,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAE9B,MAAM;EAAEC,OAAO,EAAEC,cAAc;EAAEC,OAAO,EAAEC;AAAe,CAAC,GAAGP,OAAO;AACpE,MAAM;EAAEI,OAAO,EAAEI,kBAAkB;EAAEF,OAAO,EAAEG;AAAmB,CAAC,GAAGR,WAAW;AAChF,MAAM;EAAEG,OAAO,EAAEM,gBAAgB;EAAEJ,OAAO,EAAEK;AAAiB,CAAC,GAAGT,MAAM;AACvE,MAAM;EAAEE,OAAO,EAAEQ,WAAW;EAAEN,OAAO,EAAEO;AAAe,CAAC,GAAGV,IAAI;AAE9D,MAAMW,MAAM,GAAG,IAAIC,GAAG,CAAC,CAAC;AACxBD,MAAM,CAACE,GAAG,CAACX,cAAc,EAAEE,cAAc,CAAC;AAC1CO,MAAM,CAACE,GAAG,CAACR,kBAAkB,EAAEC,kBAAkB,CAAC;AAClDK,MAAM,CAACE,GAAG,CAACN,gBAAgB,EAAEC,gBAAgB,CAAC;AAC9CG,MAAM,CAACE,GAAG,CAACJ,WAAW,EAAEC,cAAc,CAAC;AAEvC,eAAeC,MAAM","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client';
|
|
2
|
-
import { ROUTE_PATTERN_LLMS_TXT, BLAZE_STATIC_ROUTE_STORE_KEY } from '../../constants';
|
|
3
|
-
import getHandler from './generic-file-handler';
|
|
4
|
-
const storeKey = process.env.BLAZE_STATIC_ROUTE_STORE_KEY || BLAZE_STATIC_ROUTE_STORE_KEY;
|
|
5
|
-
export const fileQuery = gql`
|
|
6
|
-
query {
|
|
7
|
-
files: getFiles(
|
|
8
|
-
where: { storeKey: "${storeKey}", filename: "llms.txt" }
|
|
9
|
-
limit: 1
|
|
10
|
-
sort: [{ property: "created", direction: "desc" }]
|
|
11
|
-
) {
|
|
12
|
-
mimetype
|
|
13
|
-
url
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
export const pattern = new RegExp(ROUTE_PATTERN_LLMS_TXT);
|
|
18
|
-
export const handler = getHandler(fileQuery);
|
|
19
|
-
//# sourceMappingURL=llms.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"llms.js","names":["gql","ROUTE_PATTERN_LLMS_TXT","BLAZE_STATIC_ROUTE_STORE_KEY","getHandler","storeKey","process","env","fileQuery","pattern","RegExp","handler"],"sources":["../../../src/helpers/static-route-handlers/llms.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { ROUTE_PATTERN_LLMS_TXT, BLAZE_STATIC_ROUTE_STORE_KEY } from '../../constants';\nimport getHandler from './generic-file-handler';\n\nconst storeKey = process.env.BLAZE_STATIC_ROUTE_STORE_KEY || BLAZE_STATIC_ROUTE_STORE_KEY;\n\nexport const fileQuery = gql`\n query {\n files: getFiles(\n where: { storeKey: \"${storeKey}\", filename: \"llms.txt\" }\n limit: 1\n sort: [{ property: \"created\", direction: \"desc\" }]\n ) {\n mimetype\n url\n }\n }\n`;\n\nexport const pattern = new RegExp(ROUTE_PATTERN_LLMS_TXT);\n\nexport const handler = getHandler(fileQuery);\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,sBAAsB,EAAEC,4BAA4B,QAAQ,iBAAiB;AACtF,OAAOC,UAAU,MAAM,wBAAwB;AAE/C,MAAMC,QAAQ,GAAGC,OAAO,CAACC,GAAG,CAACJ,4BAA4B,IAAIA,4BAA4B;AAEzF,OAAO,MAAMK,SAAS,GAAGP,GAAG;AAC5B;AACA;AACA,4BAA4BI,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMI,OAAO,GAAG,IAAIC,MAAM,CAACR,sBAAsB,CAAC;AAEzD,OAAO,MAAMS,OAAO,GAAGP,UAAU,CAACI,SAAS,CAAC","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client';
|
|
2
|
-
import { ROUTE_PATTERN_ROBOTS_TXT, BLAZE_STATIC_ROUTE_STORE_KEY } from '../../constants';
|
|
3
|
-
import getHandler from './generic-file-handler';
|
|
4
|
-
const storeKey = process.env.BLAZE_STATIC_ROUTE_STORE_KEY || BLAZE_STATIC_ROUTE_STORE_KEY;
|
|
5
|
-
export const fileQuery = gql`
|
|
6
|
-
query {
|
|
7
|
-
files: getFiles(
|
|
8
|
-
where: { storeKey: "${storeKey}", filename: "robots.txt" }
|
|
9
|
-
limit: 1
|
|
10
|
-
sort: [{ property: "created", direction: "desc" }]
|
|
11
|
-
) {
|
|
12
|
-
mimetype
|
|
13
|
-
url
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
export const pattern = new RegExp(ROUTE_PATTERN_ROBOTS_TXT);
|
|
18
|
-
export const handler = getHandler(fileQuery);
|
|
19
|
-
//# sourceMappingURL=robots-txt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"robots-txt.js","names":["gql","ROUTE_PATTERN_ROBOTS_TXT","BLAZE_STATIC_ROUTE_STORE_KEY","getHandler","storeKey","process","env","fileQuery","pattern","RegExp","handler"],"sources":["../../../src/helpers/static-route-handlers/robots-txt.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { ROUTE_PATTERN_ROBOTS_TXT, BLAZE_STATIC_ROUTE_STORE_KEY } from '../../constants';\nimport getHandler from './generic-file-handler';\n\nconst storeKey = process.env.BLAZE_STATIC_ROUTE_STORE_KEY || BLAZE_STATIC_ROUTE_STORE_KEY;\n\nexport const fileQuery = gql`\n query {\n files: getFiles(\n where: { storeKey: \"${storeKey}\", filename: \"robots.txt\" }\n limit: 1\n sort: [{ property: \"created\", direction: \"desc\" }]\n ) {\n mimetype\n url\n }\n }\n`;\n\nexport const pattern = new RegExp(ROUTE_PATTERN_ROBOTS_TXT);\n\nexport const handler = getHandler(fileQuery);\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,wBAAwB,EAAEC,4BAA4B,QAAQ,iBAAiB;AACxF,OAAOC,UAAU,MAAM,wBAAwB;AAE/C,MAAMC,QAAQ,GAAGC,OAAO,CAACC,GAAG,CAACJ,4BAA4B,IAAIA,4BAA4B;AAEzF,OAAO,MAAMK,SAAS,GAAGP,GAAG;AAC5B;AACA;AACA,4BAA4BI,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMI,OAAO,GAAG,IAAIC,MAAM,CAACR,wBAAwB,CAAC;AAE3D,OAAO,MAAMS,OAAO,GAAGP,UAAU,CAACI,SAAS,CAAC","ignoreList":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client';
|
|
2
|
-
import 'cross-fetch/polyfill';
|
|
3
|
-
import { ROUTE_PATTERN_SITEMAP_FILE_REGEX, SITEMAP_STORE_KEY } from '../../constants';
|
|
4
|
-
import getHandler from './generic-file-handler';
|
|
5
|
-
export const fileQuery = gql`
|
|
6
|
-
query getFiles($where: JSON) {
|
|
7
|
-
files: getFiles(where: $where, limit: 1, sort: [{ property: "created", direction: "desc" }]) {
|
|
8
|
-
mimetype
|
|
9
|
-
url
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
function getVariables({
|
|
14
|
-
asPath
|
|
15
|
-
}) {
|
|
16
|
-
const filename = asPath.split('/').slice(-1)[0];
|
|
17
|
-
const where = {
|
|
18
|
-
storeKey: SITEMAP_STORE_KEY,
|
|
19
|
-
filename
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
where
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export const pattern = ROUTE_PATTERN_SITEMAP_FILE_REGEX;
|
|
26
|
-
export const handler = getHandler(fileQuery, getVariables);
|
|
27
|
-
//# sourceMappingURL=sitemap-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap-file.js","names":["gql","ROUTE_PATTERN_SITEMAP_FILE_REGEX","SITEMAP_STORE_KEY","getHandler","fileQuery","getVariables","asPath","filename","split","slice","where","storeKey","pattern","handler"],"sources":["../../../src/helpers/static-route-handlers/sitemap-file.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport 'cross-fetch/polyfill';\nimport { ROUTE_PATTERN_SITEMAP_FILE_REGEX, SITEMAP_STORE_KEY } from '../../constants';\nimport getHandler from './generic-file-handler';\n\nexport const fileQuery = gql`\n query getFiles($where: JSON) {\n files: getFiles(where: $where, limit: 1, sort: [{ property: \"created\", direction: \"desc\" }]) {\n mimetype\n url\n }\n }\n`;\n\nfunction getVariables({ asPath }) {\n const filename = asPath.split('/').slice(-1)[0];\n const where = { storeKey: SITEMAP_STORE_KEY, filename };\n return { where };\n}\n\nexport const pattern = ROUTE_PATTERN_SITEMAP_FILE_REGEX;\n\nexport const handler = getHandler(fileQuery, getVariables);\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,OAAO,sBAAsB;AAC7B,SAASC,gCAAgC,EAAEC,iBAAiB,QAAQ,iBAAiB;AACrF,OAAOC,UAAU,MAAM,wBAAwB;AAE/C,OAAO,MAAMC,SAAS,GAAGJ,GAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,SAASK,YAAYA,CAAC;EAAEC;AAAO,CAAC,EAAE;EAChC,MAAMC,QAAQ,GAAGD,MAAM,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EAC/C,MAAMC,KAAK,GAAG;IAAEC,QAAQ,EAAET,iBAAiB;IAAEK;EAAS,CAAC;EACvD,OAAO;IAAEG;EAAM,CAAC;AAClB;AAEA,OAAO,MAAME,OAAO,GAAGX,gCAAgC;AAEvD,OAAO,MAAMY,OAAO,GAAGV,UAAU,CAACC,SAAS,EAAEC,YAAY,CAAC","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client';
|
|
2
|
-
import 'cross-fetch/polyfill';
|
|
3
|
-
import { ROUTE_PATTERN_SITEMAP } from '../../constants';
|
|
4
|
-
import getHandler from './generic-file-handler';
|
|
5
|
-
export const fileQuery = gql`
|
|
6
|
-
query {
|
|
7
|
-
files: getFiles(
|
|
8
|
-
where: { storeKey: "default_sitemap", filename: "sitemap-index.xml" }
|
|
9
|
-
limit: 1
|
|
10
|
-
sort: [{ property: "created", direction: "desc" }]
|
|
11
|
-
) {
|
|
12
|
-
mimetype
|
|
13
|
-
url
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
export const pattern = new RegExp(ROUTE_PATTERN_SITEMAP);
|
|
18
|
-
export const handler = getHandler(fileQuery);
|
|
19
|
-
//# sourceMappingURL=sitemap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap.js","names":["gql","ROUTE_PATTERN_SITEMAP","getHandler","fileQuery","pattern","RegExp","handler"],"sources":["../../../src/helpers/static-route-handlers/sitemap.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport 'cross-fetch/polyfill';\nimport { ROUTE_PATTERN_SITEMAP } from '../../constants';\nimport getHandler from './generic-file-handler';\n\nexport const fileQuery = gql`\n query {\n files: getFiles(\n where: { storeKey: \"default_sitemap\", filename: \"sitemap-index.xml\" }\n limit: 1\n sort: [{ property: \"created\", direction: \"desc\" }]\n ) {\n mimetype\n url\n }\n }\n`;\n\nexport const pattern = new RegExp(ROUTE_PATTERN_SITEMAP);\n\nexport const handler = getHandler(fileQuery);\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,OAAO,sBAAsB;AAC7B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,OAAOC,UAAU,MAAM,wBAAwB;AAE/C,OAAO,MAAMC,SAAS,GAAGH,GAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMI,OAAO,GAAG,IAAIC,MAAM,CAACJ,qBAAqB,CAAC;AAExD,OAAO,MAAMK,OAAO,GAAGJ,UAAU,CAACC,SAAS,CAAC","ignoreList":[]}
|
package/lib-es/hoc/withBlaze.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
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; }
|
|
4
|
-
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; }
|
|
5
|
-
// see: https://github.com/zeit/next.js/blob/canary/examples/with-apollo-auth/lib/withApollo.js
|
|
6
|
-
import React, { Component } from 'react';
|
|
7
|
-
import { getDataFromTree } from '@apollo/client/react/ssr';
|
|
8
|
-
import getBlazeUi from '@blaze-cms/core-ui';
|
|
9
|
-
import { setupCheckAccessToken } from '@blaze-cms/core-auth-ui';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import dynamic from 'next/dynamic'; // Next.js dynamic
|
|
12
|
-
import { AppContext } from '@blaze-cms/nextjs-components';
|
|
13
|
-
import blazeConfig from '../blaze.config';
|
|
14
|
-
import { getErrorMessage } from '../helpers';
|
|
15
|
-
import HashObserver from '../components/HashObserver';
|
|
16
|
-
const ErrorBoundary = dynamic(() => import('@blaze-cms/core-errors-ui'));
|
|
17
|
-
const APP_LOG_NAMESPACE_MAIN = 'main';
|
|
18
|
-
function getWrappedApp(isSsr, config, blazeApp, App) {
|
|
19
|
-
var _Class;
|
|
20
|
-
function getApolloClient(ctx, requestApp) {
|
|
21
|
-
return ctx.apolloClient || requestApp.getClient() || requestApp.createClient();
|
|
22
|
-
}
|
|
23
|
-
function getRequestApp(requestApp) {
|
|
24
|
-
return !requestApp && isSsr ? getBlazeUi({
|
|
25
|
-
config
|
|
26
|
-
}) : blazeApp;
|
|
27
|
-
}
|
|
28
|
-
return _Class = class extends Component {
|
|
29
|
-
static async getInitialProps(context) {
|
|
30
|
-
const {
|
|
31
|
-
Component: _Component,
|
|
32
|
-
router,
|
|
33
|
-
AppTree,
|
|
34
|
-
ctx
|
|
35
|
-
} = context;
|
|
36
|
-
let appProps = {};
|
|
37
|
-
let errorProps = {};
|
|
38
|
-
let requestApp = ctx.blazeApp;
|
|
39
|
-
requestApp = getRequestApp(requestApp);
|
|
40
|
-
requestApp.ctx.router = router;
|
|
41
|
-
requestApp.ctx.req = ctx.req;
|
|
42
|
-
requestApp.ctx.res = ctx.res;
|
|
43
|
-
await blazeApp.init();
|
|
44
|
-
await requestApp.init();
|
|
45
|
-
const apolloClient = getApolloClient(ctx, requestApp);
|
|
46
|
-
ctx.apolloClient = apolloClient;
|
|
47
|
-
ctx.blazeApp = requestApp;
|
|
48
|
-
requestApp.events.emit('page-load:get-initial-props:before', {
|
|
49
|
-
ctx
|
|
50
|
-
});
|
|
51
|
-
if (App.getInitialProps) {
|
|
52
|
-
appProps = await App.getInitialProps(context);
|
|
53
|
-
}
|
|
54
|
-
const {
|
|
55
|
-
pageProps = {}
|
|
56
|
-
} = appProps;
|
|
57
|
-
const mainProps = _objectSpread(_objectSpread({}, appProps), {}, {
|
|
58
|
-
pageProps: _objectSpread(_objectSpread({}, pageProps), errorProps)
|
|
59
|
-
});
|
|
60
|
-
if (!isSsr) return mainProps;
|
|
61
|
-
try {
|
|
62
|
-
const renderAndCheckPromises = [getDataFromTree(/*#__PURE__*/React.createElement(AppTree, _extends({}, appProps, {
|
|
63
|
-
Component: _Component,
|
|
64
|
-
router: router,
|
|
65
|
-
apolloClient: apolloClient
|
|
66
|
-
}))), requestApp.openQueryChecker.checkOpenQueries()];
|
|
67
|
-
// race is so that if getDataFromTree gets stuck the checkOpenQueries will resolve when outstanding queries are done
|
|
68
|
-
await Promise.race(renderAndCheckPromises);
|
|
69
|
-
} catch (error) {
|
|
70
|
-
errorProps = getErrorMessage(error);
|
|
71
|
-
if (errorProps.errorCode) ctx.res.statusCode = errorProps.errorCode;
|
|
72
|
-
ctx.blazeApp.events.emit('monitor:log', {
|
|
73
|
-
error
|
|
74
|
-
});
|
|
75
|
-
requestApp.log.error('Error while running `getDataFromTree`', error);
|
|
76
|
-
}
|
|
77
|
-
const apolloState = apolloClient.cache.extract();
|
|
78
|
-
const sortedState = Object.keys(apolloState).sort().reduce((acc, key) => {
|
|
79
|
-
acc[key] = apolloState[key];
|
|
80
|
-
return acc;
|
|
81
|
-
}, {});
|
|
82
|
-
return _objectSpread(_objectSpread({}, mainProps), {}, {
|
|
83
|
-
pageProps: _objectSpread(_objectSpread({}, mainProps.pageProps), errorProps),
|
|
84
|
-
apolloState: sortedState,
|
|
85
|
-
processedBlazeEntities: blazeApp.getProcessedEntities()
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
constructor(props) {
|
|
89
|
-
super(props);
|
|
90
|
-
this.apolloClient = props.apolloClient;
|
|
91
|
-
this.state = {
|
|
92
|
-
appLoaded: isSsr || blazeApp.initComplete()
|
|
93
|
-
};
|
|
94
|
-
this.blazeApp = blazeApp;
|
|
95
|
-
}
|
|
96
|
-
async componentDidMount() {
|
|
97
|
-
if (blazeApp.initComplete()) return;
|
|
98
|
-
await blazeApp.init();
|
|
99
|
-
this.setState({
|
|
100
|
-
appLoaded: blazeApp.initComplete()
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
setApolloClient() {
|
|
104
|
-
if (!this.apolloClient) {
|
|
105
|
-
const {
|
|
106
|
-
apolloState,
|
|
107
|
-
processedBlazeEntities
|
|
108
|
-
} = this.props;
|
|
109
|
-
this.apolloClient = blazeApp.createClient(apolloState, processedBlazeEntities);
|
|
110
|
-
setupCheckAccessToken(this.apolloClient);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
render() {
|
|
114
|
-
const {
|
|
115
|
-
appLoaded
|
|
116
|
-
} = this.state;
|
|
117
|
-
if (!appLoaded && !isSsr) return '...loading';
|
|
118
|
-
this.setApolloClient();
|
|
119
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
120
|
-
app: this.blazeApp
|
|
121
|
-
}, /*#__PURE__*/React.createElement(HashObserver, null), /*#__PURE__*/React.createElement(AppContext.Provider, {
|
|
122
|
-
value: {
|
|
123
|
-
blazeApp: this.blazeApp
|
|
124
|
-
}
|
|
125
|
-
}, /*#__PURE__*/React.createElement(App, _extends({}, this.props, {
|
|
126
|
-
apolloClient: this.apolloClient,
|
|
127
|
-
blazeApp: this.blazeApp
|
|
128
|
-
}))));
|
|
129
|
-
}
|
|
130
|
-
}, _defineProperty(_Class, "displayName", 'withBlaze(App)'), _defineProperty(_Class, "propTypes", {
|
|
131
|
-
apolloState: PropTypes.object,
|
|
132
|
-
apolloClient: PropTypes.object,
|
|
133
|
-
processedBlazeEntities: PropTypes.object
|
|
134
|
-
}), _defineProperty(_Class, "defaultProps", {
|
|
135
|
-
apolloState: {},
|
|
136
|
-
apolloClient: null,
|
|
137
|
-
processedBlazeEntities: undefined
|
|
138
|
-
}), _Class;
|
|
139
|
-
}
|
|
140
|
-
const withBlaze = (App, buildConfig, {
|
|
141
|
-
forceSsr = false
|
|
142
|
-
} = {}) => {
|
|
143
|
-
const isSsr = forceSsr || typeof window === 'undefined';
|
|
144
|
-
const config = buildConfig ? buildConfig(blazeConfig) : blazeConfig;
|
|
145
|
-
const blazeApp = getBlazeUi({
|
|
146
|
-
config,
|
|
147
|
-
logNameSpace: APP_LOG_NAMESPACE_MAIN
|
|
148
|
-
});
|
|
149
|
-
blazeApp.init();
|
|
150
|
-
return getWrappedApp(isSsr, config, blazeApp, App);
|
|
151
|
-
};
|
|
152
|
-
export default withBlaze;
|
|
153
|
-
//# sourceMappingURL=withBlaze.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withBlaze.js","names":["React","Component","getDataFromTree","getBlazeUi","setupCheckAccessToken","PropTypes","dynamic","AppContext","blazeConfig","getErrorMessage","HashObserver","ErrorBoundary","APP_LOG_NAMESPACE_MAIN","getWrappedApp","isSsr","config","blazeApp","App","_Class","getApolloClient","ctx","requestApp","apolloClient","getClient","createClient","getRequestApp","getInitialProps","context","_Component","router","AppTree","appProps","errorProps","req","res","init","events","emit","pageProps","mainProps","_objectSpread","renderAndCheckPromises","createElement","_extends","openQueryChecker","checkOpenQueries","Promise","race","error","errorCode","statusCode","log","apolloState","cache","extract","sortedState","Object","keys","sort","reduce","acc","key","processedBlazeEntities","getProcessedEntities","constructor","props","state","appLoaded","initComplete","componentDidMount","setState","setApolloClient","render","app","Provider","value","_defineProperty","object","undefined","withBlaze","buildConfig","forceSsr","window","logNameSpace"],"sources":["../../src/hoc/withBlaze.js"],"sourcesContent":["// see: https://github.com/zeit/next.js/blob/canary/examples/with-apollo-auth/lib/withApollo.js\nimport React, { Component } from 'react';\nimport { getDataFromTree } from '@apollo/client/react/ssr';\nimport getBlazeUi from '@blaze-cms/core-ui';\nimport { setupCheckAccessToken } from '@blaze-cms/core-auth-ui';\nimport PropTypes from 'prop-types';\nimport dynamic from 'next/dynamic'; // Next.js dynamic\nimport { AppContext } from '@blaze-cms/nextjs-components';\nimport blazeConfig from '../blaze.config';\nimport { getErrorMessage } from '../helpers';\nimport HashObserver from '../components/HashObserver';\n\nconst ErrorBoundary = dynamic(() => import('@blaze-cms/core-errors-ui'));\n\nconst APP_LOG_NAMESPACE_MAIN = 'main';\n\nfunction getWrappedApp(isSsr, config, blazeApp, App) {\n function getApolloClient(ctx, requestApp) {\n return ctx.apolloClient || requestApp.getClient() || requestApp.createClient();\n }\n\n function getRequestApp(requestApp) {\n return !requestApp && isSsr ? getBlazeUi({ config }) : blazeApp;\n }\n return class extends Component {\n static displayName = 'withBlaze(App)';\n\n static propTypes = {\n apolloState: PropTypes.object,\n apolloClient: PropTypes.object,\n processedBlazeEntities: PropTypes.object\n };\n\n static defaultProps = {\n apolloState: {},\n apolloClient: null,\n processedBlazeEntities: undefined\n };\n\n static async getInitialProps(context) {\n const { Component: _Component, router, AppTree, ctx } = context;\n let appProps = {};\n let errorProps = {};\n\n let requestApp = ctx.blazeApp;\n requestApp = getRequestApp(requestApp);\n\n requestApp.ctx.router = router;\n requestApp.ctx.req = ctx.req;\n requestApp.ctx.res = ctx.res;\n\n await blazeApp.init();\n await requestApp.init();\n\n const apolloClient = getApolloClient(ctx, requestApp);\n\n ctx.apolloClient = apolloClient;\n ctx.blazeApp = requestApp;\n\n requestApp.events.emit('page-load:get-initial-props:before', { ctx });\n\n if (App.getInitialProps) {\n appProps = await App.getInitialProps(context);\n }\n\n const { pageProps = {} } = appProps;\n const mainProps = {\n ...appProps,\n pageProps: { ...pageProps, ...errorProps }\n };\n\n if (!isSsr) return mainProps;\n\n try {\n const renderAndCheckPromises = [\n getDataFromTree(\n <AppTree\n {...appProps}\n Component={_Component}\n router={router}\n apolloClient={apolloClient}\n />\n ),\n requestApp.openQueryChecker.checkOpenQueries()\n ];\n // race is so that if getDataFromTree gets stuck the checkOpenQueries will resolve when outstanding queries are done\n await Promise.race(renderAndCheckPromises);\n } catch (error) {\n errorProps = getErrorMessage(error);\n if (errorProps.errorCode) ctx.res.statusCode = errorProps.errorCode;\n ctx.blazeApp.events.emit('monitor:log', { error });\n requestApp.log.error('Error while running `getDataFromTree`', error);\n }\n\n const apolloState = apolloClient.cache.extract();\n const sortedState = Object.keys(apolloState)\n .sort()\n .reduce((acc, key) => {\n acc[key] = apolloState[key];\n return acc;\n }, {});\n\n return {\n ...mainProps,\n pageProps: { ...mainProps.pageProps, ...errorProps },\n apolloState: sortedState,\n processedBlazeEntities: blazeApp.getProcessedEntities()\n };\n }\n\n constructor(props) {\n super(props);\n this.apolloClient = props.apolloClient;\n this.state = {\n appLoaded: isSsr || blazeApp.initComplete()\n };\n this.blazeApp = blazeApp;\n }\n\n async componentDidMount() {\n if (blazeApp.initComplete()) return;\n\n await blazeApp.init();\n\n this.setState({\n appLoaded: blazeApp.initComplete()\n });\n }\n\n setApolloClient() {\n if (!this.apolloClient) {\n const { apolloState, processedBlazeEntities } = this.props;\n this.apolloClient = blazeApp.createClient(apolloState, processedBlazeEntities);\n setupCheckAccessToken(this.apolloClient);\n }\n }\n\n render() {\n const { appLoaded } = this.state;\n\n if (!appLoaded && !isSsr) return '...loading';\n\n this.setApolloClient();\n\n return (\n <ErrorBoundary app={this.blazeApp}>\n <HashObserver />\n <AppContext.Provider value={{ blazeApp: this.blazeApp }}>\n <App {...this.props} apolloClient={this.apolloClient} blazeApp={this.blazeApp} />\n </AppContext.Provider>\n </ErrorBoundary>\n );\n }\n };\n}\n\nconst withBlaze = (App, buildConfig, { forceSsr = false } = {}) => {\n const isSsr = forceSsr || typeof window === 'undefined';\n const config = buildConfig ? buildConfig(blazeConfig) : blazeConfig;\n const blazeApp = getBlazeUi({ config, logNameSpace: APP_LOG_NAMESPACE_MAIN });\n blazeApp.init();\n\n return getWrappedApp(isSsr, config, blazeApp, App);\n};\n\nexport default withBlaze;\n"],"mappings":";;;;AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,OAAO,MAAM,cAAc,CAAC,CAAC;AACpC,SAASC,UAAU,QAAQ,8BAA8B;AACzD,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAASC,eAAe,QAAQ,YAAY;AAC5C,OAAOC,YAAY,MAAM,4BAA4B;AAErD,MAAMC,aAAa,GAAGL,OAAO,CAAC,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAExE,MAAMM,sBAAsB,GAAG,MAAM;AAErC,SAASC,aAAaA,CAACC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,GAAG,EAAE;EAAA,IAAAC,MAAA;EACnD,SAASC,eAAeA,CAACC,GAAG,EAAEC,UAAU,EAAE;IACxC,OAAOD,GAAG,CAACE,YAAY,IAAID,UAAU,CAACE,SAAS,CAAC,CAAC,IAAIF,UAAU,CAACG,YAAY,CAAC,CAAC;EAChF;EAEA,SAASC,aAAaA,CAACJ,UAAU,EAAE;IACjC,OAAO,CAACA,UAAU,IAAIP,KAAK,GAAGX,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client';
|
|
2
|
-
function useGetPage(queryData, id) {
|
|
3
|
-
const {
|
|
4
|
-
data = {},
|
|
5
|
-
loading,
|
|
6
|
-
error
|
|
7
|
-
} = useQuery(queryData, {
|
|
8
|
-
variables: {
|
|
9
|
-
id
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
return {
|
|
13
|
-
data,
|
|
14
|
-
loading,
|
|
15
|
-
error
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export default useGetPage;
|
|
19
|
-
//# sourceMappingURL=use-get-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-get-page.js","names":["useQuery","useGetPage","queryData","id","data","loading","error","variables"],"sources":["../../src/hooks/use-get-page.js"],"sourcesContent":["import { useQuery } from '@apollo/client';\n\nfunction useGetPage(queryData, id) {\n const { data = {}, loading, error } = useQuery(queryData, { variables: { id } });\n\n return { data, loading, error };\n}\n\nexport default useGetPage;\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AAEzC,SAASC,UAAUA,CAACC,SAAS,EAAEC,EAAE,EAAE;EACjC,MAAM;IAAEC,IAAI,GAAG,CAAC,CAAC;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGN,QAAQ,CAACE,SAAS,EAAE;IAAEK,SAAS,EAAE;MAAEJ;IAAG;EAAE,CAAC,CAAC;EAEhF,OAAO;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAM,CAAC;AACjC;AAEA,eAAeL,UAAU","ignoreList":[]}
|