@parameter1/base-cms-marko-web 3.17.3 → 4.0.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/browser/.eslintrc.js +1 -21
- package/browser/components/element-id.js +1 -1
- package/browser/components/image-slider.vue +1 -1
- package/browser/components/index.js +0 -2
- package/browser/index.js +1 -2
- package/components/browser-component.marko.js +2 -2
- package/components/document/components/body-wrapper.marko.js +2 -2
- package/components/document/components/error.marko.js +2 -2
- package/components/document/components/live-reload.marko.js +2 -2
- package/components/document/components/polyfill.marko.js +2 -2
- package/components/document/container.marko.js +2 -2
- package/components/document/index.marko +28 -23
- package/components/document/index.marko.js +50 -24
- package/components/element/array.marko.js +2 -2
- package/components/element/audio.marko.js +2 -2
- package/components/element/block.marko.js +2 -2
- package/components/element/clear.marko.js +2 -2
- package/components/element/components/image.marko.js +2 -2
- package/components/element/components/text.marko.js +2 -2
- package/components/element/content/address1.marko.js +2 -2
- package/components/element/content/address2.marko.js +2 -2
- package/components/element/content/audio.marko.js +3 -4
- package/components/element/content/authors.marko.js +2 -2
- package/components/element/content/body.marko.js +2 -2
- package/components/element/content/byline.marko.js +2 -2
- package/components/element/content/city-state-zip.marko.js +2 -2
- package/components/element/content/contributors.marko.js +2 -2
- package/components/element/content/country.marko.js +2 -2
- package/components/element/content/embed-code.marko.js +2 -2
- package/components/element/content/end-date.marko.js +2 -2
- package/components/element/content/ends.marko.js +3 -4
- package/components/element/content/fax.marko.js +2 -2
- package/components/element/content/images.marko.js +3 -4
- package/components/element/content/mobile.marko.js +2 -2
- package/components/element/content/name.marko.js +2 -2
- package/components/element/content/phone.marko.js +2 -2
- package/components/element/content/photographers.marko.js +2 -2
- package/components/element/content/public-email.marko.js +2 -2
- package/components/element/content/published.marko.js +2 -2
- package/components/element/content/short-name.marko.js +2 -2
- package/components/element/content/sidebar-stubs.marko.js +3 -4
- package/components/element/content/sidebars.marko.js +2 -2
- package/components/element/content/source.marko.js +2 -2
- package/components/element/content/sponsors.marko.js +2 -2
- package/components/element/content/start-date.marko.js +2 -2
- package/components/element/content/starts.marko.js +3 -4
- package/components/element/content/teaser.marko.js +2 -2
- package/components/element/content/title.marko.js +2 -2
- package/components/element/content/tollfree.marko.js +2 -2
- package/components/element/content/transcript.marko.js +53 -0
- package/components/element/content/website.marko.js +2 -2
- package/components/element/date.marko.js +2 -2
- package/components/element/extract-render.js +1 -1
- package/components/element/image/caption.marko.js +2 -2
- package/components/element/image/credit.marko.js +2 -2
- package/components/element/image/display-name.marko.js +2 -2
- package/components/element/image/slider.marko.js +3 -4
- package/components/element/img.marko.js +2 -2
- package/components/element/index.marko.js +2 -2
- package/components/element/link.marko.js +2 -2
- package/components/element/magazine-issue/description.marko.js +3 -4
- package/components/element/magazine-issue/digital-edition-url.marko.js +3 -4
- package/components/element/magazine-issue/name.marko.js +3 -4
- package/components/element/magazine-issue/pdf-url.marko.js +3 -4
- package/components/element/magazine-publication/cancel-url.marko.js +3 -4
- package/components/element/magazine-publication/change-address-url.marko.js +3 -4
- package/components/element/magazine-publication/description.marko.js +3 -4
- package/components/element/magazine-publication/einquiry-url.marko.js +3 -4
- package/components/element/magazine-publication/name.marko.js +3 -4
- package/components/element/magazine-publication/renewal-url.marko.js +3 -4
- package/components/element/magazine-publication/reprints-url.marko.js +3 -4
- package/components/element/magazine-publication/subscribe-url.marko.js +3 -4
- package/components/element/obj-array.marko.js +2 -2
- package/components/element/obj-audio.marko.js +4 -5
- package/components/element/obj-date.marko.js +2 -2
- package/components/element/obj-nodes.marko.js +2 -2
- package/components/element/obj-text.marko.js +2 -2
- package/components/element/obj.marko.js +2 -2
- package/components/element/object-link.js +1 -1
- package/components/element/picture.marko.js +2 -2
- package/components/element/text.marko.js +2 -2
- package/components/element/website-section/description.marko.js +3 -4
- package/components/element/website-section/hierarchy.marko.js +4 -5
- package/components/element/website-section/name.marko.js +2 -2
- package/components/load-more/index.marko.js +3 -3
- package/components/load-more/trigger.marko.js +2 -2
- package/components/node/body.marko.js +2 -2
- package/components/node/element.marko.js +4 -4
- package/components/node/footer.marko.js +2 -2
- package/components/node/header.marko.js +2 -2
- package/components/node/image-inner-wrapper.marko.js +2 -2
- package/components/node/image-wrapper.marko.js +2 -2
- package/components/node/image.marko.js +2 -2
- package/components/node/index.marko.js +2 -2
- package/components/node-list/body.marko.js +2 -2
- package/components/node-list/element.marko.js +4 -4
- package/components/node-list/footer.marko.js +2 -2
- package/components/node-list/header.marko.js +2 -2
- package/components/node-list/index.marko.js +2 -2
- package/components/node-list/node.marko.js +2 -2
- package/components/node-list/nodes.marko.js +2 -2
- package/components/page/container.marko.js +2 -2
- package/components/page/description.marko.js +2 -2
- package/components/page/image.marko.js +2 -2
- package/components/page/layouts/content.marko.js +2 -2
- package/components/page/layouts/default.marko.js +2 -2
- package/components/page/layouts/dynamic-page.marko.js +3 -4
- package/components/page/layouts/magazine-issue.marko.js +3 -4
- package/components/page/layouts/magazine-publication.marko.js +3 -4
- package/components/page/layouts/website-section.marko.js +2 -2
- package/components/page/metadata/components/common.marko.js +2 -2
- package/components/page/metadata/content.marko.js +2 -2
- package/components/page/metadata/default.marko.js +2 -2
- package/components/page/metadata/dynamic-page.marko.js +4 -5
- package/components/page/metadata/google-structured-data/content.js +2 -2
- package/components/page/metadata/magazine-issue.marko.js +4 -5
- package/components/page/metadata/magazine-publication.marko.js +4 -5
- package/components/page/metadata/website-section.marko.js +2 -2
- package/components/page/rel-canonical.marko.js +2 -2
- package/components/page/title.marko.js +2 -2
- package/components/page/wrapper.marko.js +4 -4
- package/components/resolve/page.marko.js +2 -2
- package/components/rss/website-section.marko.js +2 -2
- package/config/asset-manifest.js +1 -1
- package/express/index.js +2 -3
- package/express/load-document.js +1 -1
- package/express/load-object.js +1 -1
- package/express/marko.js +36 -0
- package/express/website-context.js +1 -1
- package/index.js +5 -0
- package/middleware/page-node/index.js +1 -1
- package/middleware/page-node/resolved.js +1 -1
- package/package.json +40 -31
- package/start-server.js +5 -3
- package/utils/embedded-media/facebook-oembed.js +1 -2
- package/utils/embedded-media/image.js +3 -3
- package/utils/embedded-media/instagram-oembed.js +1 -1
- package/utils/hierarchy-aliases.js +1 -1
- package/utils/hierarchy-ids.js +1 -1
- package/utils/render-ssr-component.js +1 -1
- package/base-cms-marko-web-0.7.4.tgz +0 -0
- package/base-cms-marko-web-0.9.37.tgz +0 -0
- package/base-cms-marko-web-0.9.55.tgz +0 -0
- package/browser/components/gated-download/form-dot-com.vue +0 -71
- package/components/document/components/assets.marko.js +0 -43
- package/components/queries/all-author-content.marko.js +0 -38
- package/components/queries/all-company-content.marko.js +0 -38
- package/components/queries/all-published-content.marko.js +0 -38
- package/components/queries/components/loader.marko.js +0 -45
- package/components/queries/content.marko.js +0 -38
- package/components/queries/dynamic-page.marko.js +0 -38
- package/components/queries/index.marko.js +0 -108
- package/components/queries/magazine-active-issues.marko.js +0 -38
- package/components/queries/magazine-issue.marko.js +0 -38
- package/components/queries/magazine-latest-issue.marko.js +0 -38
- package/components/queries/magazine-publication.marko.js +0 -38
- package/components/queries/magazine-publications.marko.js +0 -38
- package/components/queries/magazine-scheduled-content.marko.js +0 -38
- package/components/queries/related-published-content.marko.js +0 -38
- package/components/queries/website-optioned-content.marko.js +0 -38
- package/components/queries/website-scheduled-content.marko.js +0 -38
- package/components/queries/website-section.marko.js +0 -38
- package/components/resolve/index.marko.js +0 -86
- package/node-require.js +0 -6
- package/refactor-notes.md +0 -80
- package/src/components/ads/gam/define-display.marko.js +0 -63
- package/src/components/ads/gam/display.marko.js +0 -41
- package/src/components/ads/gam/head.marko.js +0 -48
- package/src/components/ads/gam/init.marko.js +0 -31
- package/src/components/ads/gam/out-of-page.marko.js +0 -47
- package/src/components/ads/placeholder.marko.js +0 -35
- package/src/components/browser/component.marko.js +0 -38
- package/src/components/document/components/assets.marko.js +0 -52
- package/src/components/document/components/error.marko.js +0 -54
- package/src/components/document/components/load-more-result.marko.js +0 -27
- package/src/components/document/index.marko.js +0 -73
- package/src/components/document/live-reload.marko.js +0 -35
- package/src/components/elements/content/authors.marko.js +0 -38
- package/src/components/elements/content/body.marko.js +0 -38
- package/src/components/elements/content/byline.marko.js +0 -38
- package/src/components/elements/content/components/contacts.marko.js +0 -68
- package/src/components/elements/content/contributors.marko.js +0 -38
- package/src/components/elements/content/embed-code.marko.js +0 -38
- package/src/components/elements/content/name.marko.js +0 -38
- package/src/components/elements/content/photographers.marko.js +0 -38
- package/src/components/elements/content/published.marko.js +0 -38
- package/src/components/elements/content/short-name.marko.js +0 -38
- package/src/components/elements/content/source.marko.js +0 -38
- package/src/components/elements/content/sponsors.marko.js +0 -38
- package/src/components/elements/content/teaser.marko.js +0 -38
- package/src/components/elements/core/components/imgix.marko.js +0 -58
- package/src/components/elements/core/components/tag-content.marko.js +0 -37
- package/src/components/elements/core/date.marko.js +0 -56
- package/src/components/elements/core/html.marko.js +0 -38
- package/src/components/elements/core/image.marko.js +0 -91
- package/src/components/elements/core/link.marko.js +0 -61
- package/src/components/elements/core/load-more.marko.js +0 -49
- package/src/components/elements/core/text.marko.js +0 -125
- package/src/components/elements/website-section/hierarchy.marko.js +0 -65
- package/src/components/elements/website-section/name.marko.js +0 -42
- package/src/components/gtm/container-init.marko.js +0 -49
- package/src/components/gtm/container-push.marko.js +0 -41
- package/src/components/gtm/container-start.marko.js +0 -55
- package/src/components/gtm/container.marko.js +0 -72
- package/src/components/gtm/track-event.marko.js +0 -36
- package/src/components/gtm/track-inview-event.marko.js +0 -36
- package/src/components/page/container/components/content.marko.js +0 -48
- package/src/components/page/container/components/default.marko.js +0 -39
- package/src/components/page/container/components/dynamic-page.marko.js +0 -45
- package/src/components/page/container/components/home.marko.js +0 -39
- package/src/components/page/container/components/website-section.marko.js +0 -45
- package/src/components/page/container/index.marko.js +0 -63
- package/src/components/page/description.marko.js +0 -31
- package/src/components/page/metadata/components/content.marko.js +0 -111
- package/src/components/page/metadata/components/dynamic-page.marko.js +0 -51
- package/src/components/page/metadata/components/magazine-issue.marko.js +0 -51
- package/src/components/page/metadata/components/magazine-publication.marko.js +0 -51
- package/src/components/page/metadata/components/website-section.marko.js +0 -51
- package/src/components/page/metadata/index.marko.js +0 -87
- package/src/components/page/rel-canonical.marko.js +0 -43
- package/src/components/page/title.marko.js +0 -50
- package/src/components/queries/all-author-content.marko.js +0 -39
- package/src/components/queries/all-company-content.marko.js +0 -39
- package/src/components/queries/all-published-content.marko.js +0 -39
- package/src/components/queries/components/loader-multi.marko.js +0 -66
- package/src/components/queries/components/loader-raw.marko.js +0 -64
- package/src/components/queries/components/loader-single.marko.js +0 -66
- package/src/components/queries/components/loader.marko.js +0 -65
- package/src/components/queries/magazine-active-issues.marko.js +0 -39
- package/src/components/queries/magazine-issues.marko.js +0 -39
- package/src/components/queries/magazine-latest-issue.marko.js +0 -39
- package/src/components/queries/magazine-publications.marko.js +0 -39
- package/src/components/queries/magazine-scheduled-content.marko.js +0 -39
- package/src/components/queries/published-content.marko.js +0 -39
- package/src/components/queries/published-startable-content.marko.js +0 -39
- package/src/components/queries/related-published-content.marko.js +0 -39
- package/src/components/queries/website-scheduled-content-by-year.marko.js +0 -39
- package/src/components/queries/website-scheduled-content.marko.js +0 -39
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/content.marko",
|
6
6
|
marko_component = require("./content.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -197,7 +197,7 @@ marko_template._ = marko_renderer(render, {
|
|
197
197
|
}, marko_component);
|
198
198
|
|
199
199
|
marko_template.meta = {
|
200
|
-
id: "/@parameter1/base-cms-marko-web$
|
200
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/content.marko",
|
201
201
|
component: "./content.marko",
|
202
202
|
tags: [
|
203
203
|
"./components/common.marko",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/default.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
common_template = require("./components/common.marko"),
|
8
8
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
@@ -22,7 +22,7 @@ marko_template._ = marko_renderer(render, {
|
|
22
22
|
});
|
23
23
|
|
24
24
|
marko_template.meta = {
|
25
|
-
id: "/@parameter1/base-cms-marko-web$
|
25
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/default.marko",
|
26
26
|
tags: [
|
27
27
|
"./components/common.marko"
|
28
28
|
]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/dynamic-page.marko",
|
6
6
|
marko_component = require("./dynamic-page.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -13,11 +13,10 @@ var marko_template = module.exports = require("marko/src/html").t(__filename),
|
|
13
13
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
14
14
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
15
15
|
warn = module_baseCmsUtils_module.warn,
|
16
|
-
|
17
|
-
common_template = marko_loadTemplate(require.resolve("./components/common.marko")),
|
16
|
+
common_template = require("./components/common.marko"),
|
18
17
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
19
18
|
common_tag = marko_loadTag(common_template),
|
20
|
-
marko_web_query_template =
|
19
|
+
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
21
20
|
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
22
21
|
|
23
22
|
function render(input, out, __component, component, state) {
|
@@ -76,7 +75,7 @@ marko_template._ = marko_renderer(render, {
|
|
76
75
|
}, marko_component);
|
77
76
|
|
78
77
|
marko_template.meta = {
|
79
|
-
id: "/@parameter1/base-cms-marko-web$
|
78
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/dynamic-page.marko",
|
80
79
|
component: "./dynamic-page.marko",
|
81
80
|
tags: [
|
82
81
|
"./components/common.marko",
|
@@ -15,12 +15,12 @@ const get = (o, path) => {
|
|
15
15
|
};
|
16
16
|
|
17
17
|
const getAuthor = (node) => {
|
18
|
-
const authors = getAsArray(node, 'authors.edges').map(e => get(e, 'node.name'));
|
18
|
+
const authors = getAsArray(node, 'authors.edges').map((e) => get(e, 'node.name'));
|
19
19
|
return authors.length ? { '@type': 'Person', name: authors.join(', ') } : undefined;
|
20
20
|
};
|
21
21
|
|
22
22
|
const getImages = (node) => {
|
23
|
-
const images = getAsArray(node, 'images.edges').map(e => get(e, 'node.src'));
|
23
|
+
const images = getAsArray(node, 'images.edges').map((e) => get(e, 'node.src'));
|
24
24
|
return images.length ? images : undefined;
|
25
25
|
};
|
26
26
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-issue.marko",
|
6
6
|
marko_component = require("./magazine-issue.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -13,11 +13,10 @@ var marko_template = module.exports = require("marko/src/html").t(__filename),
|
|
13
13
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
14
14
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
15
15
|
warn = module_baseCmsUtils_module.warn,
|
16
|
-
|
17
|
-
common_template = marko_loadTemplate(require.resolve("./components/common.marko")),
|
16
|
+
common_template = require("./components/common.marko"),
|
18
17
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
19
18
|
common_tag = marko_loadTag(common_template),
|
20
|
-
marko_web_query_template =
|
19
|
+
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
21
20
|
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
22
21
|
|
23
22
|
function render(input, out, __component, component, state) {
|
@@ -75,7 +74,7 @@ marko_template._ = marko_renderer(render, {
|
|
75
74
|
}, marko_component);
|
76
75
|
|
77
76
|
marko_template.meta = {
|
78
|
-
id: "/@parameter1/base-cms-marko-web$
|
77
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-issue.marko",
|
79
78
|
component: "./magazine-issue.marko",
|
80
79
|
tags: [
|
81
80
|
"./components/common.marko",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-publication.marko",
|
6
6
|
marko_component = require("./magazine-publication.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -13,11 +13,10 @@ var marko_template = module.exports = require("marko/src/html").t(__filename),
|
|
13
13
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
14
14
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
15
15
|
warn = module_baseCmsUtils_module.warn,
|
16
|
-
|
17
|
-
common_template = marko_loadTemplate(require.resolve("./components/common.marko")),
|
16
|
+
common_template = require("./components/common.marko"),
|
18
17
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
19
18
|
common_tag = marko_loadTag(common_template),
|
20
|
-
marko_web_query_template =
|
19
|
+
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
21
20
|
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
22
21
|
|
23
22
|
function render(input, out, __component, component, state) {
|
@@ -71,7 +70,7 @@ marko_template._ = marko_renderer(render, {
|
|
71
70
|
}, marko_component);
|
72
71
|
|
73
72
|
marko_template.meta = {
|
74
|
-
id: "/@parameter1/base-cms-marko-web$
|
73
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-publication.marko",
|
75
74
|
component: "./magazine-publication.marko",
|
76
75
|
tags: [
|
77
76
|
"./components/common.marko",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/website-section.marko",
|
6
6
|
marko_component = require("./website-section.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -70,7 +70,7 @@ marko_template._ = marko_renderer(render, {
|
|
70
70
|
}, marko_component);
|
71
71
|
|
72
72
|
marko_template.meta = {
|
73
|
-
id: "/@parameter1/base-cms-marko-web$
|
73
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/website-section.marko",
|
74
74
|
component: "./website-section.marko",
|
75
75
|
tags: [
|
76
76
|
"./components/common.marko",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/rel-canonical.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
8
8
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
@@ -38,5 +38,5 @@ marko_template._ = marko_renderer(render, {
|
|
38
38
|
});
|
39
39
|
|
40
40
|
marko_template.meta = {
|
41
|
-
id: "/@parameter1/base-cms-marko-web$
|
41
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/rel-canonical.marko"
|
42
42
|
};
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/title.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
8
8
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
|
|
42
42
|
});
|
43
43
|
|
44
44
|
marko_template.meta = {
|
45
|
-
id: "/@parameter1/base-cms-marko-web$
|
45
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/title.marko"
|
46
46
|
};
|
@@ -2,14 +2,14 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/wrapper.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
8
|
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
9
|
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
10
|
marko_forOf = require("marko/src/runtime/helpers/for-of"),
|
11
11
|
marko_assign = require("marko/src/runtime/helpers/assign"),
|
12
|
-
marko_web_element_template = require("../element"),
|
12
|
+
marko_web_element_template = require("../element/index.marko"),
|
13
13
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
14
14
|
marko_web_element_tag = marko_loadTag(marko_web_element_template),
|
15
15
|
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag");
|
@@ -56,8 +56,8 @@ marko_template._ = marko_renderer(render, {
|
|
56
56
|
});
|
57
57
|
|
58
58
|
marko_template.meta = {
|
59
|
-
id: "/@parameter1/base-cms-marko-web$
|
59
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/wrapper.marko",
|
60
60
|
tags: [
|
61
|
-
"../element"
|
61
|
+
"../element/index.marko"
|
62
62
|
]
|
63
63
|
};
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/resolve/page.marko",
|
6
6
|
marko_component = require("./page.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
@@ -41,7 +41,7 @@ marko_template._ = marko_renderer(render, {
|
|
41
41
|
}, marko_component);
|
42
42
|
|
43
43
|
marko_template.meta = {
|
44
|
-
id: "/@parameter1/base-cms-marko-web$
|
44
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/resolve/page.marko",
|
45
45
|
component: "./page.marko",
|
46
46
|
tags: [
|
47
47
|
"@parameter1/base-cms-marko-core/components/resolve.marko"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/rss/website-section.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_url_module = require("url"),
|
8
8
|
url_module = module_url_module.default || module_url_module,
|
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
|
|
42
42
|
});
|
43
43
|
|
44
44
|
marko_template.meta = {
|
45
|
-
id: "/@parameter1/base-cms-marko-web$
|
45
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/rss/website-section.marko"
|
46
46
|
};
|
package/config/asset-manifest.js
CHANGED
package/express/index.js
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
const { buildRequestHeaders } = require('@parameter1/base-cms-tenant-context');
|
2
2
|
const createApolloClient = require('@parameter1/base-cms-apollo-ssr');
|
3
|
+
const { cleanMarkoResponse, markoMiddleware } = require('@parameter1/base-cms-marko-express/middleware');
|
3
4
|
const cookieParser = require('cookie-parser');
|
4
5
|
const express = require('express');
|
5
|
-
const marko = require('marko/express');
|
6
6
|
const path = require('path');
|
7
7
|
const helmet = require('helmet');
|
8
|
-
const cleanMarkoResponse = require('@parameter1/base-cms-marko-core/middleware/clean-marko-response');
|
9
8
|
const apollo = require('./apollo');
|
10
9
|
const graphqlProxy = require('./graphql-proxy');
|
11
10
|
const embeddedMedia = require('./embedded-media');
|
@@ -111,7 +110,7 @@ module.exports = (config = {}) => {
|
|
111
110
|
app.use(websiteContext(app.locals.config));
|
112
111
|
|
113
112
|
// Register the Marko middleware.
|
114
|
-
app.use(
|
113
|
+
app.use(markoMiddleware());
|
115
114
|
app.use(cleanMarkoResponse());
|
116
115
|
|
117
116
|
// Serve static assets
|
package/express/load-document.js
CHANGED
package/express/load-object.js
CHANGED
@@ -6,5 +6,5 @@ const { keys } = Object;
|
|
6
6
|
module.exports = (value) => {
|
7
7
|
const v = getAsObject(value);
|
8
8
|
const obj = keys(v).reduce((o, k) => ({ ...o, [dasherize(k)]: v[k] }), {});
|
9
|
-
return { get: name => get(obj, dasherize(name)) };
|
9
|
+
return { get: (name) => get(obj, dasherize(name)) };
|
10
10
|
};
|
package/express/marko.js
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
/* eslint-disable no-underscore-dangle */
|
2
|
+
require('marko');
|
3
|
+
const buildGlobal = require('@parameter1/base-cms-marko-core/utils/build-marko-global');
|
4
|
+
|
5
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
6
|
+
const express = module.main ? module.main.require('express') : require('express');
|
7
|
+
|
8
|
+
if (!express) throw new Error('Unable to load Express.');
|
9
|
+
|
10
|
+
const patch = (response) => {
|
11
|
+
response.marko = response.marko || function markoResponse(template, data) {
|
12
|
+
if (typeof template === 'string') throw new Error('res.marko does not accept a string or path as a template.');
|
13
|
+
|
14
|
+
const res = this;
|
15
|
+
const { req } = res;
|
16
|
+
res.set({ 'content-type': 'text/html; charset=utf-8' });
|
17
|
+
const $global = buildGlobal(res, data);
|
18
|
+
return template.render({ ...(data || {}), $global }, res).on('error', req.next);
|
19
|
+
};
|
20
|
+
};
|
21
|
+
|
22
|
+
patch(express.response);
|
23
|
+
delete require.cache[__filename];
|
24
|
+
|
25
|
+
module.exports = () => {
|
26
|
+
const app = express();
|
27
|
+
app.once('mount', (parent) => {
|
28
|
+
patch(parent.response);
|
29
|
+
if (parent._router) {
|
30
|
+
parent._router.stack.pop(); // express <= 4.x
|
31
|
+
} else {
|
32
|
+
parent.router.stack.pop(); // express 5.x
|
33
|
+
}
|
34
|
+
});
|
35
|
+
return app;
|
36
|
+
};
|
@@ -2,7 +2,7 @@ const loadWebsite = require('@parameter1/base-cms-web-common/website-context');
|
|
2
2
|
const { asyncRoute } = require('@parameter1/base-cms-utils');
|
3
3
|
const { setDayjsLocale } = require('@parameter1/base-cms-dayjs/utils');
|
4
4
|
|
5
|
-
module.exports = coreConfig => asyncRoute(async (req, res, next) => {
|
5
|
+
module.exports = (coreConfig) => asyncRoute(async (req, res, next) => {
|
6
6
|
const { apollo } = res.locals;
|
7
7
|
const websiteContext = await loadWebsite(apollo);
|
8
8
|
coreConfig.setWebsiteContext(websiteContext);
|
package/index.js
CHANGED
@@ -2,7 +2,7 @@ const { isFunction: isFn } = require('@parameter1/base-cms-utils');
|
|
2
2
|
const { getAsObject } = require('@parameter1/base-cms-object-path');
|
3
3
|
const ResolvedNode = require('./resolved');
|
4
4
|
|
5
|
-
const createNode = data => new ResolvedNode(data);
|
5
|
+
const createNode = (data) => new ResolvedNode(data);
|
6
6
|
|
7
7
|
class PageNode {
|
8
8
|
constructor(apolloClient, {
|
package/package.json
CHANGED
@@ -1,51 +1,60 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parameter1/base-cms-marko-web",
|
3
|
-
"version": "
|
3
|
+
"version": "4.0.0-beta.0",
|
4
4
|
"description": "Core Marko+Express components for BaseCMS websites",
|
5
5
|
"author": "Jacob Bare <jacob@parameter1.com>",
|
6
6
|
"main": "index.js",
|
7
7
|
"license": "MIT",
|
8
8
|
"repository": "https://github.com/parameter1/base-cms/tree/master/packages/marko-web",
|
9
|
+
"engines": {
|
10
|
+
"node": ">=14.15"
|
11
|
+
},
|
12
|
+
"os": [
|
13
|
+
"darwin",
|
14
|
+
"linux",
|
15
|
+
"win32"
|
16
|
+
],
|
9
17
|
"scripts": {
|
10
|
-
"lint": "yarn lint
|
11
|
-
"lint
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"test": "yarn compile && yarn lint"
|
18
|
+
"lint:fix": "yarn lint --fix",
|
19
|
+
"lint": "eslint --ext .js --ext .vue --max-warnings 5 ./",
|
20
|
+
"compile": "basecms-marko-compile compile",
|
21
|
+
"prepublish": "yarn compile --silent",
|
22
|
+
"test": "yarn compile --no-clean && yarn lint"
|
15
23
|
},
|
16
24
|
"dependencies": {
|
17
|
-
"@godaddy/terminus": "^4.
|
18
|
-
"@parameter1/base-cms-apollo-ssr": "^
|
19
|
-
"@parameter1/base-cms-dayjs": "^
|
20
|
-
"@parameter1/base-cms-embedded-media": "^
|
21
|
-
"@parameter1/base-cms-express-apollo": "^
|
22
|
-
"@parameter1/base-cms-graphql-fragment-types": "^
|
23
|
-
"@parameter1/base-cms-image": "^
|
24
|
-
"@parameter1/base-cms-inflector": "^
|
25
|
-
"@parameter1/base-cms-marko-
|
26
|
-
"@parameter1/base-cms-
|
27
|
-
"@parameter1/base-cms-
|
28
|
-
"@parameter1/base-cms-
|
29
|
-
"@parameter1/base-cms-
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
25
|
+
"@godaddy/terminus": "^4.11.2",
|
26
|
+
"@parameter1/base-cms-apollo-ssr": "^4.0.0-beta.0",
|
27
|
+
"@parameter1/base-cms-dayjs": "^4.0.0-beta.0",
|
28
|
+
"@parameter1/base-cms-embedded-media": "^4.0.0-beta.0",
|
29
|
+
"@parameter1/base-cms-express-apollo": "^4.0.0-beta.0",
|
30
|
+
"@parameter1/base-cms-graphql-fragment-types": "^4.0.0-beta.0",
|
31
|
+
"@parameter1/base-cms-image": "^4.0.0-beta.0",
|
32
|
+
"@parameter1/base-cms-inflector": "^4.0.0-beta.0",
|
33
|
+
"@parameter1/base-cms-marko-express": "^4.0.0-beta.0",
|
34
|
+
"@parameter1/base-cms-marko-node-require": "^4.0.0-beta.0",
|
35
|
+
"@parameter1/base-cms-marko-web-deferred-script-loader": "^4.0.0-beta.0",
|
36
|
+
"@parameter1/base-cms-object-path": "^4.0.0-beta.0",
|
37
|
+
"@parameter1/base-cms-tenant-context": "^4.0.0-beta.0",
|
38
|
+
"@parameter1/base-cms-utils": "^4.0.0-beta.0",
|
39
|
+
"@parameter1/base-cms-web-common": "^4.0.0-beta.0",
|
40
|
+
"cheerio": "^1.0.0-rc.12",
|
41
|
+
"cookie-parser": "^1.4.6",
|
42
|
+
"express": "^4.18.2",
|
43
|
+
"express-http-proxy": "^1.6.3",
|
34
44
|
"graphql": "^14.7.0",
|
35
|
-
"graphql-tag": "^2.12.
|
45
|
+
"graphql-tag": "^2.12.6",
|
36
46
|
"helmet": "^3.23.3",
|
37
|
-
"http-errors": "^1.8.
|
38
|
-
"jquery": "^3.6.
|
47
|
+
"http-errors": "^1.8.1",
|
48
|
+
"jquery": "^3.6.3",
|
39
49
|
"marko": "~4.20.0",
|
40
|
-
"vue": "^2.
|
41
|
-
"vue-server-renderer": "^2.
|
42
|
-
"whatwg-fetch": "^3.6.1"
|
50
|
+
"vue": "^2.7.14",
|
51
|
+
"vue-server-renderer": "^2.7.14"
|
43
52
|
},
|
44
53
|
"peerDependencies": {
|
45
|
-
"@parameter1/base-cms-marko-core": "^
|
54
|
+
"@parameter1/base-cms-marko-core": "^4.0.0"
|
46
55
|
},
|
47
56
|
"publishConfig": {
|
48
57
|
"access": "public"
|
49
58
|
},
|
50
|
-
"gitHead": "
|
59
|
+
"gitHead": "6b1c5270b9b3031b27d36ec109348efbd80f7933"
|
51
60
|
}
|
package/start-server.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require('
|
1
|
+
require('@parameter1/base-cms-marko-node-require');
|
2
2
|
const http = require('http');
|
3
3
|
const path = require('path');
|
4
4
|
const { createTerminus } = require('@godaddy/terminus');
|
@@ -14,7 +14,9 @@ if (!process.env.EXPOSED_HOST) process.env.EXPOSED_HOST = env.HOST || 'localhost
|
|
14
14
|
|
15
15
|
process.on('unhandledRejection', (e) => { throw e; });
|
16
16
|
|
17
|
-
const wait = ms => new Promise(resolve =>
|
17
|
+
const wait = (ms) => new Promise((resolve) => {
|
18
|
+
setTimeout(resolve, ms);
|
19
|
+
});
|
18
20
|
|
19
21
|
module.exports = async ({
|
20
22
|
rootDir,
|
@@ -148,5 +150,5 @@ module.exports = async ({
|
|
148
150
|
}
|
149
151
|
}
|
150
152
|
});
|
151
|
-
}).catch(e => setImmediate(() => { throw e; }));
|
153
|
+
}).catch((e) => setImmediate(() => { throw e; }));
|
152
154
|
};
|
@@ -12,7 +12,7 @@ const buildFacebookElement = ({
|
|
12
12
|
...(width && { width }),
|
13
13
|
...(showText && { 'show-text': true }),
|
14
14
|
};
|
15
|
-
const data = Object.keys(params).map(key => `data-${key}="${params[key]}"`);
|
15
|
+
const data = Object.keys(params).map((key) => `data-${key}="${params[key]}"`);
|
16
16
|
return `<div class="fb-post" ${data.join(' ')}></div><script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script>`;
|
17
17
|
};
|
18
18
|
|
@@ -39,7 +39,6 @@ const facebook = (url) => {
|
|
39
39
|
return buildFacebookElement({ href, showText: true });
|
40
40
|
};
|
41
41
|
|
42
|
-
|
43
42
|
/**
|
44
43
|
*
|
45
44
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
const { buildImgixUrl } = require('@parameter1/base-cms-image');
|
2
2
|
|
3
|
-
const stringifyAttrs = attrs => Object.keys(attrs).reduce((arr, key) => {
|
3
|
+
const stringifyAttrs = (attrs) => Object.keys(attrs).reduce((arr, key) => {
|
4
4
|
const value = attrs[key];
|
5
5
|
if (value) arr.push(`${key}="${value}"`);
|
6
6
|
return arr;
|
@@ -44,7 +44,7 @@ module.exports = (tag, { config } = {}, { lazyloadImages } = {}) => {
|
|
44
44
|
'data-srcset': lazyload ? maxSrcset : null,
|
45
45
|
media: '(min-width: 576px)',
|
46
46
|
},
|
47
|
-
].map(source => `<source ${stringifyAttrs(source)}>`).join('');
|
47
|
+
].map((source) => `<source ${stringifyAttrs(source)}>`).join('');
|
48
48
|
|
49
49
|
const minSrc = buildImgixUrl(src, { w: minWidth });
|
50
50
|
const minSrcset = `${buildImgixUrl(src, { w: minWidth, dpr: 2 })} 2x`;
|
@@ -59,7 +59,7 @@ module.exports = (tag, { config } = {}, { lazyloadImages } = {}) => {
|
|
59
59
|
'data-image-id': tag.id,
|
60
60
|
alt,
|
61
61
|
width: (width && height) ? minWidth : null,
|
62
|
-
height: (height && height) ? Math.round(height / width * minWidth) : null,
|
62
|
+
height: (height && height) ? Math.round((height / width) * minWidth) : null,
|
63
63
|
};
|
64
64
|
|
65
65
|
const captionElement = caption ? `<span class="caption">${caption}</span>` : '';
|
@@ -11,7 +11,7 @@ const buildInstagramElement = ({
|
|
11
11
|
...(lazy && { lazy: true }),
|
12
12
|
...(width && { width }),
|
13
13
|
};
|
14
|
-
const data = Object.keys(params).map(key => `${key}="${params[key]}"`);
|
14
|
+
const data = Object.keys(params).map((key) => `${key}="${params[key]}"`);
|
15
15
|
if (data.lazy) {
|
16
16
|
data.loading = 'lazy';
|
17
17
|
}
|
package/utils/hierarchy-ids.js
CHANGED
@@ -9,7 +9,7 @@ module.exports = async (Component, { id, props } = {}) => {
|
|
9
9
|
if (get(Component, 'props.id')) throw new Error('The provided component has an `id` prop which is incompatible with SSR rendering.');
|
10
10
|
const app = new Vue({
|
11
11
|
provide: { EventBus },
|
12
|
-
render: h => h(Component, { attrs: { id }, props }),
|
12
|
+
render: (h) => h(Component, { attrs: { id }, props }),
|
13
13
|
});
|
14
14
|
return renderer.renderToString(app);
|
15
15
|
};
|
Binary file
|
Binary file
|
Binary file
|