@mindful-web/marko-web 1.0.0
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/.eslintignore +3 -0
- package/LICENSE +21 -0
- package/browser/.eslintrc.js +1 -0
- package/browser/components/element-id.js +1 -0
- package/browser/components/gated-download/wufoo.vue +97 -0
- package/browser/components/image-slide.vue +54 -0
- package/browser/components/image-slider.vue +87 -0
- package/browser/components/index.js +15 -0
- package/browser/components/load-more-trigger.vue +129 -0
- package/browser/components/oembed.vue +133 -0
- package/browser/components/trigger-in-view-event.vue +41 -0
- package/browser/components/trigger-screen-change-event.vue +94 -0
- package/browser/event-bus.js +5 -0
- package/browser/index.js +83 -0
- package/browser/jquery-full.js +3 -0
- package/browser/jquery.js +3 -0
- package/browser/utils/clean-path.js +4 -0
- package/browser/vue.js +3 -0
- package/components/browser-component/script.marko +10 -0
- package/components/browser-component/script.marko.js +39 -0
- package/components/browser-component.marko +25 -0
- package/components/browser-component.marko.js +75 -0
- package/components/deferred-stylesheet.marko +6 -0
- package/components/deferred-stylesheet.marko.js +28 -0
- package/components/document/components/body-wrapper.marko +8 -0
- package/components/document/components/body-wrapper.marko.js +33 -0
- package/components/document/components/error.marko +26 -0
- package/components/document/components/error.marko.js +88 -0
- package/components/document/components/live-reload.marko +7 -0
- package/components/document/components/live-reload.marko.js +30 -0
- package/components/document/components/polyfill.marko +8 -0
- package/components/document/components/polyfill.marko.js +33 -0
- package/components/document/components/styles.marko +20 -0
- package/components/document/components/styles.marko.js +61 -0
- package/components/document/container.marko +15 -0
- package/components/document/container.marko.js +54 -0
- package/components/document/index.marko +63 -0
- package/components/document/index.marko.js +139 -0
- package/components/document/marko.json +46 -0
- package/components/element/array.marko +19 -0
- package/components/element/array.marko.js +67 -0
- package/components/element/audio.marko +5 -0
- package/components/element/audio.marko.js +33 -0
- package/components/element/block.marko +11 -0
- package/components/element/block.marko.js +44 -0
- package/components/element/clear.marko +4 -0
- package/components/element/clear.marko.js +32 -0
- package/components/element/components/image.marko +32 -0
- package/components/element/components/image.marko.js +62 -0
- package/components/element/components/text.marko +11 -0
- package/components/element/components/text.marko.js +37 -0
- package/components/element/content/address1.marko +14 -0
- package/components/element/content/address1.marko.js +40 -0
- package/components/element/content/address2.marko +14 -0
- package/components/element/content/address2.marko.js +40 -0
- package/components/element/content/audio.marko +13 -0
- package/components/element/content/audio.marko.js +39 -0
- package/components/element/content/authors.marko +12 -0
- package/components/element/content/authors.marko.js +43 -0
- package/components/element/content/body.marko +28 -0
- package/components/element/content/body.marko.js +66 -0
- package/components/element/content/byline.marko +15 -0
- package/components/element/content/byline.marko.js +41 -0
- package/components/element/content/city-state-zip.marko +14 -0
- package/components/element/content/city-state-zip.marko.js +40 -0
- package/components/element/content/contributors.marko +12 -0
- package/components/element/content/contributors.marko.js +43 -0
- package/components/element/content/country.marko +14 -0
- package/components/element/content/country.marko.js +40 -0
- package/components/element/content/embed-code.marko +15 -0
- package/components/element/content/embed-code.marko.js +41 -0
- package/components/element/content/end-date.marko +17 -0
- package/components/element/content/end-date.marko.js +43 -0
- package/components/element/content/ends.marko +14 -0
- package/components/element/content/ends.marko.js +40 -0
- package/components/element/content/fax.marko +14 -0
- package/components/element/content/fax.marko.js +40 -0
- package/components/element/content/images.marko +12 -0
- package/components/element/content/images.marko.js +43 -0
- package/components/element/content/marko.json +328 -0
- package/components/element/content/mobile.marko +14 -0
- package/components/element/content/mobile.marko.js +40 -0
- package/components/element/content/name.marko +15 -0
- package/components/element/content/name.marko.js +41 -0
- package/components/element/content/phone.marko +14 -0
- package/components/element/content/phone.marko.js +40 -0
- package/components/element/content/photographers.marko +12 -0
- package/components/element/content/photographers.marko.js +43 -0
- package/components/element/content/public-email.marko +19 -0
- package/components/element/content/public-email.marko.js +47 -0
- package/components/element/content/published.marko +17 -0
- package/components/element/content/published.marko.js +43 -0
- package/components/element/content/short-name.marko +15 -0
- package/components/element/content/short-name.marko.js +41 -0
- package/components/element/content/sidebar-stubs.marko +24 -0
- package/components/element/content/sidebar-stubs.marko.js +63 -0
- package/components/element/content/sidebars.marko +27 -0
- package/components/element/content/sidebars.marko.js +63 -0
- package/components/element/content/source.marko +14 -0
- package/components/element/content/source.marko.js +40 -0
- package/components/element/content/sponsors.marko +12 -0
- package/components/element/content/sponsors.marko.js +43 -0
- package/components/element/content/start-date.marko +17 -0
- package/components/element/content/start-date.marko.js +43 -0
- package/components/element/content/starts.marko +14 -0
- package/components/element/content/starts.marko.js +40 -0
- package/components/element/content/teaser.marko +15 -0
- package/components/element/content/teaser.marko.js +41 -0
- package/components/element/content/title.marko +14 -0
- package/components/element/content/title.marko.js +40 -0
- package/components/element/content/tollfree.marko +14 -0
- package/components/element/content/tollfree.marko.js +40 -0
- package/components/element/content/transcript.marko +22 -0
- package/components/element/content/transcript.marko.js +53 -0
- package/components/element/content/website.marko +22 -0
- package/components/element/content/website.marko.js +51 -0
- package/components/element/date.marko +2 -0
- package/components/element/date.marko.js +27 -0
- package/components/element/extract-render.js +1 -0
- package/components/element/image/caption.marko +15 -0
- package/components/element/image/caption.marko.js +41 -0
- package/components/element/image/credit.marko +15 -0
- package/components/element/image/credit.marko.js +41 -0
- package/components/element/image/display-name.marko +14 -0
- package/components/element/image/display-name.marko.js +40 -0
- package/components/element/image/marko.json +38 -0
- package/components/element/image/slider.marko +18 -0
- package/components/element/image/slider.marko.js +50 -0
- package/components/element/img.marko +12 -0
- package/components/element/img.marko.js +43 -0
- package/components/element/index.marko +12 -0
- package/components/element/index.marko.js +47 -0
- package/components/element/link.marko +25 -0
- package/components/element/link.marko.js +54 -0
- package/components/element/magazine-issue/description.marko +14 -0
- package/components/element/magazine-issue/description.marko.js +40 -0
- package/components/element/magazine-issue/digital-edition-url.marko +22 -0
- package/components/element/magazine-issue/digital-edition-url.marko.js +51 -0
- package/components/element/magazine-issue/marko.json +42 -0
- package/components/element/magazine-issue/name.marko +14 -0
- package/components/element/magazine-issue/name.marko.js +40 -0
- package/components/element/magazine-issue/pdf-url.marko +22 -0
- package/components/element/magazine-issue/pdf-url.marko.js +51 -0
- package/components/element/magazine-publication/cancel-url.marko +22 -0
- package/components/element/magazine-publication/cancel-url.marko.js +51 -0
- package/components/element/magazine-publication/change-address-url.marko +22 -0
- package/components/element/magazine-publication/change-address-url.marko.js +51 -0
- package/components/element/magazine-publication/description.marko +14 -0
- package/components/element/magazine-publication/description.marko.js +40 -0
- package/components/element/magazine-publication/einquiry-url.marko +22 -0
- package/components/element/magazine-publication/einquiry-url.marko.js +51 -0
- package/components/element/magazine-publication/marko.json +82 -0
- package/components/element/magazine-publication/name.marko +14 -0
- package/components/element/magazine-publication/name.marko.js +40 -0
- package/components/element/magazine-publication/renewal-url.marko +22 -0
- package/components/element/magazine-publication/renewal-url.marko.js +51 -0
- package/components/element/magazine-publication/reprints-url.marko +22 -0
- package/components/element/magazine-publication/reprints-url.marko.js +51 -0
- package/components/element/magazine-publication/subscribe-url.marko +22 -0
- package/components/element/magazine-publication/subscribe-url.marko.js +51 -0
- package/components/element/marko.json +211 -0
- package/components/element/obj-array.marko +17 -0
- package/components/element/obj-array.marko.js +56 -0
- package/components/element/obj-audio.marko +20 -0
- package/components/element/obj-audio.marko.js +50 -0
- package/components/element/obj-date.marko +25 -0
- package/components/element/obj-date.marko.js +55 -0
- package/components/element/obj-nodes.marko +20 -0
- package/components/element/obj-nodes.marko.js +62 -0
- package/components/element/obj-text.marko +23 -0
- package/components/element/obj-text.marko.js +53 -0
- package/components/element/obj.marko +23 -0
- package/components/element/obj.marko.js +61 -0
- package/components/element/object-link.js +49 -0
- package/components/element/object-type.js +9 -0
- package/components/element/picture.marko +38 -0
- package/components/element/picture.marko.js +85 -0
- package/components/element/show-element.js +8 -0
- package/components/element/text.marko +37 -0
- package/components/element/text.marko.js +76 -0
- package/components/element/website-section/description.marko +16 -0
- package/components/element/website-section/description.marko.js +44 -0
- package/components/element/website-section/hierarchy.marko +19 -0
- package/components/element/website-section/hierarchy.marko.js +60 -0
- package/components/element/website-section/marko.json +31 -0
- package/components/element/website-section/name.marko +18 -0
- package/components/element/website-section/name.marko.js +46 -0
- package/components/font/google.marko +6 -0
- package/components/font/google.marko.js +41 -0
- package/components/font/link.marko +14 -0
- package/components/font/link.marko.js +45 -0
- package/components/font/marko.json +21 -0
- package/components/font/typekit.marko +5 -0
- package/components/font/typekit.marko.js +38 -0
- package/components/load-more/index.marko +53 -0
- package/components/load-more/index.marko.js +119 -0
- package/components/load-more/marko.json +30 -0
- package/components/load-more/trigger.marko +11 -0
- package/components/load-more/trigger.marko.js +40 -0
- package/components/marko.json +37 -0
- package/components/node/body.marko +40 -0
- package/components/node/body.marko.js +112 -0
- package/components/node/element.marko +6 -0
- package/components/node/element.marko.js +39 -0
- package/components/node/footer.marko +19 -0
- package/components/node/footer.marko.js +63 -0
- package/components/node/header.marko +19 -0
- package/components/node/header.marko.js +63 -0
- package/components/node/image-inner-wrapper.marko +61 -0
- package/components/node/image-inner-wrapper.marko.js +116 -0
- package/components/node/image-wrapper.marko +34 -0
- package/components/node/image-wrapper.marko.js +98 -0
- package/components/node/image.marko +51 -0
- package/components/node/image.marko.js +93 -0
- package/components/node/index.marko +35 -0
- package/components/node/index.marko.js +100 -0
- package/components/node/marko.json +189 -0
- package/components/node/utils/image-height.js +3 -0
- package/components/node/utils/image-values.js +17 -0
- package/components/node-list/body.marko +19 -0
- package/components/node-list/body.marko.js +50 -0
- package/components/node-list/element.marko +3 -0
- package/components/node-list/element.marko.js +35 -0
- package/components/node-list/footer.marko +19 -0
- package/components/node-list/footer.marko.js +50 -0
- package/components/node-list/header.marko +19 -0
- package/components/node-list/header.marko.js +50 -0
- package/components/node-list/index.marko +36 -0
- package/components/node-list/index.marko.js +93 -0
- package/components/node-list/marko.json +121 -0
- package/components/node-list/node.marko +15 -0
- package/components/node-list/node.marko.js +49 -0
- package/components/node-list/nodes.marko +82 -0
- package/components/node-list/nodes.marko.js +126 -0
- package/components/page/container.marko +13 -0
- package/components/page/container.marko.js +46 -0
- package/components/page/description.marko +4 -0
- package/components/page/description.marko.js +26 -0
- package/components/page/image.marko +50 -0
- package/components/page/image.marko.js +122 -0
- package/components/page/layouts/content.marko +23 -0
- package/components/page/layouts/content.marko.js +63 -0
- package/components/page/layouts/default.marko +20 -0
- package/components/page/layouts/default.marko.js +61 -0
- package/components/page/layouts/dynamic-page.marko +19 -0
- package/components/page/layouts/dynamic-page.marko.js +59 -0
- package/components/page/layouts/magazine-issue.marko +19 -0
- package/components/page/layouts/magazine-issue.marko.js +59 -0
- package/components/page/layouts/magazine-publication.marko +19 -0
- package/components/page/layouts/magazine-publication.marko.js +59 -0
- package/components/page/layouts/marko.json +86 -0
- package/components/page/layouts/website-section.marko +25 -0
- package/components/page/layouts/website-section.marko.js +78 -0
- package/components/page/marko.json +93 -0
- package/components/page/metadata/components/common.marko +54 -0
- package/components/page/metadata/components/common.marko.js +117 -0
- package/components/page/metadata/content.marko +147 -0
- package/components/page/metadata/content.marko.js +216 -0
- package/components/page/metadata/default.marko +2 -0
- package/components/page/metadata/default.marko.js +29 -0
- package/components/page/metadata/dynamic-page.marko +40 -0
- package/components/page/metadata/dynamic-page.marko.js +84 -0
- package/components/page/metadata/google-structured-data/content.js +138 -0
- package/components/page/metadata/magazine-issue.marko +39 -0
- package/components/page/metadata/magazine-issue.marko.js +83 -0
- package/components/page/metadata/magazine-publication.marko +35 -0
- package/components/page/metadata/magazine-publication.marko.js +79 -0
- package/components/page/metadata/marko.json +32 -0
- package/components/page/metadata/website-section.marko +48 -0
- package/components/page/metadata/website-section.marko.js +92 -0
- package/components/page/rel-canonical.marko +13 -0
- package/components/page/rel-canonical.marko.js +42 -0
- package/components/page/title.marko +18 -0
- package/components/page/title.marko.js +46 -0
- package/components/page/wrapper.marko +16 -0
- package/components/page/wrapper.marko.js +63 -0
- package/components/resolve/marko.json +6 -0
- package/components/resolve/page.marko +10 -0
- package/components/resolve/page.marko.js +49 -0
- package/components/rss/marko.json +10 -0
- package/components/rss/website-section.marko +17 -0
- package/components/rss/website-section.marko.js +46 -0
- package/config/abstract-config.js +42 -0
- package/config/core.js +48 -0
- package/config/site.js +6 -0
- package/express/apollo.js +34 -0
- package/express/asset-loader.js +55 -0
- package/express/cdn.js +27 -0
- package/express/css-loader.js +117 -0
- package/express/embedded-media.js +31 -0
- package/express/error-handlers.js +113 -0
- package/express/find-content-alias.js +30 -0
- package/express/get-redirect.js +44 -0
- package/express/graphql-proxy.js +17 -0
- package/express/index.js +153 -0
- package/express/json-error-handler.js +30 -0
- package/express/load-document.js +3 -0
- package/express/load-more.js +6 -0
- package/express/load-object.js +10 -0
- package/express/oembed.js +18 -0
- package/express/rss.js +19 -0
- package/express/sitemaps.js +16 -0
- package/express/website-context.js +19 -0
- package/index.js +8 -0
- package/integration/test-website-boot.js +198 -0
- package/marko.json +6 -0
- package/middleware/disabled-features.js +15 -0
- package/middleware/index.js +15 -0
- package/middleware/page-node/index.js +45 -0
- package/middleware/page-node/resolved.js +26 -0
- package/middleware/with-content.js +54 -0
- package/middleware/with-dynamic-page.js +37 -0
- package/middleware/with-load-more.js +9 -0
- package/middleware/with-magazine-issue.js +24 -0
- package/middleware/with-magazine-publication.js +24 -0
- package/middleware/with-website-section.js +47 -0
- package/package.json +64 -0
- package/scss/carousel.scss +42 -0
- package/scss/document.scss +55 -0
- package/scss/fonts/alata-fallback.scss +7 -0
- package/scss/fonts/alegreya-fallback.scss +6 -0
- package/scss/fonts/arimo-fallback.scss +7 -0
- package/scss/fonts/fira-sans-fallback.scss +7 -0
- package/scss/fonts/ibm-plex-sans-fallback.scss +7 -0
- package/scss/fonts/informapro-fallback.scss +6 -0
- package/scss/fonts/lato-fallback.scss +7 -0
- package/scss/fonts/manrope-fallback.scss +6 -0
- package/scss/fonts/merriweather-fallback.scss +7 -0
- package/scss/fonts/montserrat-fallback.scss +7 -0
- package/scss/fonts/open-sans-condensed-fallback.scss +6 -0
- package/scss/fonts/open-sans-fallback.scss +7 -0
- package/scss/fonts/oswald-fallback.scss +7 -0
- package/scss/fonts/poppins-fallback.scss +6 -0
- package/scss/fonts/pt-sans-fallback.scss +6 -0
- package/scss/fonts/pt-serif-fallback.scss +6 -0
- package/scss/fonts/public-sans-fallback.scss +7 -0
- package/scss/fonts/raleway-fallback.scss +6 -0
- package/scss/fonts/roboto-condensed-fallback.scss +7 -0
- package/scss/fonts/roboto-fallback.scss +7 -0
- package/scss/fonts/roboto-slab-fallback.scss +7 -0
- package/scss/fonts/solitaire-mvb-pro-fallback.scss +6 -0
- package/scss/fonts/source-sans-4-fallback.scss +7 -0
- package/scss/fonts/source-serif-pro-fallback.scss +7 -0
- package/scss/fonts/synthese-fallback.scss +6 -0
- package/scss/fonts/zilla-slab-fallback.scss +6 -0
- package/scss/load-more.scss +3 -0
- package/scss/node-list.scss +144 -0
- package/scss/node.scss +371 -0
- package/scss/page-image.scss +15 -0
- package/start-server.js +169 -0
- package/utils/apply-query-params.js +16 -0
- package/utils/build-content-input.js +9 -0
- package/utils/build-marko-global.js +1 -0
- package/utils/default-value.js +1 -0
- package/utils/embedded-media/facebook-oembed.js +50 -0
- package/utils/embedded-media/image.js +71 -0
- package/utils/embedded-media/index.js +8 -0
- package/utils/embedded-media/instagram-oembed.js +57 -0
- package/utils/embedded-media/oembed.js +18 -0
- package/utils/hierarchy-aliases.js +3 -0
- package/utils/hierarchy-ids.js +3 -0
- package/utils/index.js +11 -0
- package/utils/is-dev.js +1 -0
- package/utils/published-content/description.js +1 -0
- package/utils/render-ssr-component-from-marko.js +18 -0
- package/utils/render-ssr-component.js +15 -0
- package/utils/should-collapse.js +1 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
{
|
|
2
|
+
"taglib-imports": [
|
|
3
|
+
"./content/marko.json",
|
|
4
|
+
"./magazine-issue/marko.json",
|
|
5
|
+
"./magazine-publication/marko.json",
|
|
6
|
+
"./image/marko.json",
|
|
7
|
+
"./website-section/marko.json"
|
|
8
|
+
],
|
|
9
|
+
"<marko-web-block>": {
|
|
10
|
+
"template": "./block.marko",
|
|
11
|
+
"@name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"default-value": "block"
|
|
14
|
+
},
|
|
15
|
+
"@tag": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"default-value": "div"
|
|
18
|
+
},
|
|
19
|
+
"@class": "string",
|
|
20
|
+
"@modifiers": "@array",
|
|
21
|
+
"@attrs": "object"
|
|
22
|
+
},
|
|
23
|
+
"<marko-web-element>": {
|
|
24
|
+
"template": "./index.marko",
|
|
25
|
+
"@name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default-value": "default"
|
|
28
|
+
},
|
|
29
|
+
"@block-name": "string",
|
|
30
|
+
"@tag": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"default-value": "div"
|
|
33
|
+
},
|
|
34
|
+
"@class": "string",
|
|
35
|
+
"@modifiers": "array",
|
|
36
|
+
"@attrs": "object"
|
|
37
|
+
},
|
|
38
|
+
"<marko-web-clear>": {
|
|
39
|
+
"template": "./clear.marko",
|
|
40
|
+
"@value": "string"
|
|
41
|
+
},
|
|
42
|
+
"<marko-web-array>": {
|
|
43
|
+
"template": "./array.marko",
|
|
44
|
+
"@value": "array",
|
|
45
|
+
"@tag": "string",
|
|
46
|
+
"@class": "string",
|
|
47
|
+
"@attrs": "object"
|
|
48
|
+
},
|
|
49
|
+
"<marko-web-audio>": {
|
|
50
|
+
"template": "./audio.marko",
|
|
51
|
+
"@src": "string",
|
|
52
|
+
"@class": "string",
|
|
53
|
+
"@attrs": "object"
|
|
54
|
+
},
|
|
55
|
+
"<marko-web-img>": {
|
|
56
|
+
"template": "./img.marko",
|
|
57
|
+
"@src": "string",
|
|
58
|
+
"@srcset": "array",
|
|
59
|
+
"@alt": "string",
|
|
60
|
+
"@lazyload": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"default-value": true
|
|
63
|
+
},
|
|
64
|
+
"@class": "string",
|
|
65
|
+
"@attrs": "object",
|
|
66
|
+
"@link": "object",
|
|
67
|
+
"@width": "number",
|
|
68
|
+
"@height": "number",
|
|
69
|
+
"@ar": "string"
|
|
70
|
+
},
|
|
71
|
+
"<marko-web-link>": {
|
|
72
|
+
"template": "./link.marko",
|
|
73
|
+
"@href": "string",
|
|
74
|
+
"@target": "string",
|
|
75
|
+
"@title": "string",
|
|
76
|
+
"@rel": "string",
|
|
77
|
+
"@class": "string",
|
|
78
|
+
"@attrs": "object"
|
|
79
|
+
},
|
|
80
|
+
"<marko-web-date>": {
|
|
81
|
+
"template": "./date.marko",
|
|
82
|
+
"@value": "expression",
|
|
83
|
+
"@tag": "string",
|
|
84
|
+
"@format": "string",
|
|
85
|
+
"@locale": "string",
|
|
86
|
+
"@timezone": "string",
|
|
87
|
+
"@class": "string",
|
|
88
|
+
"@attrs": "object",
|
|
89
|
+
"@link": "object"
|
|
90
|
+
},
|
|
91
|
+
"<marko-web-text>": {
|
|
92
|
+
"template": "./text.marko",
|
|
93
|
+
"@value": "expression",
|
|
94
|
+
"@tag": "string",
|
|
95
|
+
"@html": "boolean",
|
|
96
|
+
"@class": "string",
|
|
97
|
+
"@attrs": "object",
|
|
98
|
+
"@link": "object"
|
|
99
|
+
},
|
|
100
|
+
"<marko-web-obj>": {
|
|
101
|
+
"template": "./obj.marko",
|
|
102
|
+
"@type": "string",
|
|
103
|
+
"@obj": "object",
|
|
104
|
+
"@field": "string",
|
|
105
|
+
"@block-name": "string",
|
|
106
|
+
"@class": "string",
|
|
107
|
+
"@modifiers": "array"
|
|
108
|
+
},
|
|
109
|
+
"<marko-web-obj-array>": {
|
|
110
|
+
"template": "./obj-array.marko",
|
|
111
|
+
"@type": "string",
|
|
112
|
+
"@block-name": "string",
|
|
113
|
+
"@obj": "object",
|
|
114
|
+
"@field": "string",
|
|
115
|
+
"@tag": "string",
|
|
116
|
+
"@class": "string",
|
|
117
|
+
"@attrs": "object",
|
|
118
|
+
"@modifiers": "array"
|
|
119
|
+
},
|
|
120
|
+
"<marko-web-obj-text>": {
|
|
121
|
+
"template": "./obj-text.marko",
|
|
122
|
+
"@type": "string",
|
|
123
|
+
"@block-name": "string",
|
|
124
|
+
"@obj": "object",
|
|
125
|
+
"@field": "string",
|
|
126
|
+
"@html": "boolean",
|
|
127
|
+
"@tag": "string",
|
|
128
|
+
"@class": "string",
|
|
129
|
+
"@modifiers": "string",
|
|
130
|
+
"@attrs": "object",
|
|
131
|
+
"@link": "expression"
|
|
132
|
+
},
|
|
133
|
+
"<marko-web-obj-date>": {
|
|
134
|
+
"template": "./obj-date.marko",
|
|
135
|
+
"@type": "string",
|
|
136
|
+
"@block-name": "string",
|
|
137
|
+
"@obj": "object",
|
|
138
|
+
"@field": "string",
|
|
139
|
+
"@format": "string",
|
|
140
|
+
"@locale": "string",
|
|
141
|
+
"@timezone": "string",
|
|
142
|
+
"@tag": "string",
|
|
143
|
+
"@class": "string",
|
|
144
|
+
"@modifiers": "string",
|
|
145
|
+
"@attrs": "object",
|
|
146
|
+
"@link": "expression"
|
|
147
|
+
},
|
|
148
|
+
"<marko-web-obj-nodes>": {
|
|
149
|
+
"template": "./obj-nodes.marko",
|
|
150
|
+
"@type": "string",
|
|
151
|
+
"@block-name": "string",
|
|
152
|
+
"@obj": "object",
|
|
153
|
+
"@field": "string",
|
|
154
|
+
"@tag": "string",
|
|
155
|
+
"@class": "string",
|
|
156
|
+
"@attrs": "object",
|
|
157
|
+
"@modifiers": "array"
|
|
158
|
+
},
|
|
159
|
+
"<marko-web-obj-audio>": {
|
|
160
|
+
"template": "./obj-audio.marko",
|
|
161
|
+
"@type": "string",
|
|
162
|
+
"@block-name": "string",
|
|
163
|
+
"@obj": "object",
|
|
164
|
+
"@field": "string",
|
|
165
|
+
"@tag": "string",
|
|
166
|
+
"@class": "string",
|
|
167
|
+
"@attrs": "object",
|
|
168
|
+
"@modifiers": "array"
|
|
169
|
+
},
|
|
170
|
+
"<marko-web-picture>": {
|
|
171
|
+
"template": "./picture.marko",
|
|
172
|
+
"<image>": {
|
|
173
|
+
"@src": "string",
|
|
174
|
+
"@srcset": "array",
|
|
175
|
+
"@alt": "string",
|
|
176
|
+
"@lazyload": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"default-value": true
|
|
179
|
+
},
|
|
180
|
+
"@class": "string",
|
|
181
|
+
"@attrs": "object",
|
|
182
|
+
"@link": "object",
|
|
183
|
+
"@width": "string",
|
|
184
|
+
"@height": "string",
|
|
185
|
+
"@ar": "string"
|
|
186
|
+
},
|
|
187
|
+
"<link>": {
|
|
188
|
+
"<before>": {},
|
|
189
|
+
"<after>": {},
|
|
190
|
+
"@href": "string",
|
|
191
|
+
"@target": "string",
|
|
192
|
+
"@title": "string",
|
|
193
|
+
"@rel": "string",
|
|
194
|
+
"@class": "string",
|
|
195
|
+
"@attrs": "object"
|
|
196
|
+
},
|
|
197
|
+
"@sources <source>[]": {
|
|
198
|
+
"@media": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"required": true
|
|
201
|
+
},
|
|
202
|
+
"@srcset": {
|
|
203
|
+
"type": "array",
|
|
204
|
+
"required": true
|
|
205
|
+
},
|
|
206
|
+
"@width": "number",
|
|
207
|
+
"@height": "number",
|
|
208
|
+
"@ar": "string"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<marko-web-obj|{ value, classNames }|
|
|
2
|
+
type=input.type
|
|
3
|
+
block-name=input.blockName
|
|
4
|
+
obj=input.obj
|
|
5
|
+
field=input.field
|
|
6
|
+
class=input.class
|
|
7
|
+
modifiers=input.modifiers
|
|
8
|
+
>
|
|
9
|
+
<marko-web-array|{ value: v, index, length }|
|
|
10
|
+
attrs=input.attrs
|
|
11
|
+
tag=input.tag
|
|
12
|
+
value=value
|
|
13
|
+
class=classNames
|
|
14
|
+
>
|
|
15
|
+
<${input.renderBody} value=v index=index length=length />
|
|
16
|
+
</marko-web-array>
|
|
17
|
+
</marko-web-obj>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/element/obj-array.marko",
|
|
6
|
+
marko_component = require("./obj-array.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
9
|
+
marko_web_array_template = require("./array.marko"),
|
|
10
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
11
|
+
marko_web_array_tag = marko_loadTag(marko_web_array_template),
|
|
12
|
+
marko_web_obj_template = require("./obj.marko"),
|
|
13
|
+
marko_web_obj_tag = marko_loadTag(marko_web_obj_template);
|
|
14
|
+
|
|
15
|
+
function render(input, out, __component, component, state) {
|
|
16
|
+
var data = input;
|
|
17
|
+
|
|
18
|
+
marko_web_obj_tag({
|
|
19
|
+
type: input.type,
|
|
20
|
+
blockName: input.blockName,
|
|
21
|
+
obj: input.obj,
|
|
22
|
+
field: input.field,
|
|
23
|
+
class: input.class,
|
|
24
|
+
modifiers: input.modifiers,
|
|
25
|
+
renderBody: function(out, { value, classNames }) {
|
|
26
|
+
marko_web_array_tag({
|
|
27
|
+
attrs: input.attrs,
|
|
28
|
+
tag: input.tag,
|
|
29
|
+
value: value,
|
|
30
|
+
class: classNames,
|
|
31
|
+
renderBody: function(out, { value: v, index, length }) {
|
|
32
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
33
|
+
return {
|
|
34
|
+
value: v,
|
|
35
|
+
index: index,
|
|
36
|
+
length: length
|
|
37
|
+
};
|
|
38
|
+
}, null, null, null, __component, "2");
|
|
39
|
+
}
|
|
40
|
+
}, out, __component, "1");
|
|
41
|
+
}
|
|
42
|
+
}, out, __component, "0");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
marko_template._ = marko_renderer(render, {
|
|
46
|
+
e_: marko_componentType
|
|
47
|
+
}, marko_component);
|
|
48
|
+
|
|
49
|
+
marko_template.meta = {
|
|
50
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/obj-array.marko",
|
|
51
|
+
component: "./obj-array.marko",
|
|
52
|
+
tags: [
|
|
53
|
+
"./array.marko",
|
|
54
|
+
"./obj.marko"
|
|
55
|
+
]
|
|
56
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import objectLink from "./object-link";
|
|
2
|
+
import extractRender from "./extract-render";
|
|
3
|
+
|
|
4
|
+
<!-- @deprecated This should use with <marko-core-obj-date>, perhaps? -->
|
|
5
|
+
|
|
6
|
+
<marko-web-obj|{ value, classNames, resolvedObj }|
|
|
7
|
+
type=input.type
|
|
8
|
+
block-name=input.blockName
|
|
9
|
+
obj=input.obj
|
|
10
|
+
field=input.field
|
|
11
|
+
class=input.class
|
|
12
|
+
modifiers=input.modifiers
|
|
13
|
+
>
|
|
14
|
+
<marko-web-audio
|
|
15
|
+
src=value
|
|
16
|
+
class=classNames
|
|
17
|
+
attrs=input.attrs
|
|
18
|
+
...extractRender(input)
|
|
19
|
+
/>
|
|
20
|
+
</marko-web-obj>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/element/obj-audio.marko",
|
|
6
|
+
marko_component = require("./obj-audio.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectLink = require("./object-link"),
|
|
9
|
+
objectLink = module_objectLink.default || module_objectLink,
|
|
10
|
+
module_extractRender = require("./extract-render"),
|
|
11
|
+
extractRender = module_extractRender.default || module_extractRender,
|
|
12
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
13
|
+
marko_web_audio_template = require("./audio.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_audio_tag = marko_loadTag(marko_web_audio_template),
|
|
16
|
+
marko_web_obj_template = require("./obj.marko"),
|
|
17
|
+
marko_web_obj_tag = marko_loadTag(marko_web_obj_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
marko_web_obj_tag({
|
|
23
|
+
type: input.type,
|
|
24
|
+
blockName: input.blockName,
|
|
25
|
+
obj: input.obj,
|
|
26
|
+
field: input.field,
|
|
27
|
+
class: input.class,
|
|
28
|
+
modifiers: input.modifiers,
|
|
29
|
+
renderBody: function(out, { value, classNames, resolvedObj }) {
|
|
30
|
+
marko_web_audio_tag(marko_assign({
|
|
31
|
+
src: value,
|
|
32
|
+
class: classNames,
|
|
33
|
+
attrs: input.attrs
|
|
34
|
+
}, extractRender(input)), out, __component, "1");
|
|
35
|
+
}
|
|
36
|
+
}, out, __component, "0");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
marko_template._ = marko_renderer(render, {
|
|
40
|
+
e_: marko_componentType
|
|
41
|
+
}, marko_component);
|
|
42
|
+
|
|
43
|
+
marko_template.meta = {
|
|
44
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/obj-audio.marko",
|
|
45
|
+
component: "./obj-audio.marko",
|
|
46
|
+
tags: [
|
|
47
|
+
"./audio.marko",
|
|
48
|
+
"./obj.marko"
|
|
49
|
+
]
|
|
50
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import objectLink from "./object-link";
|
|
2
|
+
import extractRender from "./extract-render";
|
|
3
|
+
|
|
4
|
+
<!-- @deprecated This should use with <marko-core-obj-date>, perhaps? -->
|
|
5
|
+
|
|
6
|
+
<marko-web-obj|{ value, classNames, resolvedObj }|
|
|
7
|
+
type=input.type
|
|
8
|
+
block-name=input.blockName
|
|
9
|
+
obj=input.obj
|
|
10
|
+
field=input.field
|
|
11
|
+
class=input.class
|
|
12
|
+
modifiers=input.modifiers
|
|
13
|
+
>
|
|
14
|
+
<marko-web-date
|
|
15
|
+
tag=input.tag
|
|
16
|
+
value=value
|
|
17
|
+
class=classNames
|
|
18
|
+
format=input.format
|
|
19
|
+
locale=input.locale
|
|
20
|
+
timezone=input.timezone
|
|
21
|
+
attrs=input.attrs
|
|
22
|
+
link=objectLink(input.link, resolvedObj)
|
|
23
|
+
...extractRender(input)
|
|
24
|
+
/>
|
|
25
|
+
</marko-web-obj>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/element/obj-date.marko",
|
|
6
|
+
marko_component = require("./obj-date.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectLink = require("./object-link"),
|
|
9
|
+
objectLink = module_objectLink.default || module_objectLink,
|
|
10
|
+
module_extractRender = require("./extract-render"),
|
|
11
|
+
extractRender = module_extractRender.default || module_extractRender,
|
|
12
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
13
|
+
marko_web_date_template = require("./date.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_date_tag = marko_loadTag(marko_web_date_template),
|
|
16
|
+
marko_web_obj_template = require("./obj.marko"),
|
|
17
|
+
marko_web_obj_tag = marko_loadTag(marko_web_obj_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
marko_web_obj_tag({
|
|
23
|
+
type: input.type,
|
|
24
|
+
blockName: input.blockName,
|
|
25
|
+
obj: input.obj,
|
|
26
|
+
field: input.field,
|
|
27
|
+
class: input.class,
|
|
28
|
+
modifiers: input.modifiers,
|
|
29
|
+
renderBody: function(out, { value, classNames, resolvedObj }) {
|
|
30
|
+
marko_web_date_tag(marko_assign({
|
|
31
|
+
tag: input.tag,
|
|
32
|
+
value: value,
|
|
33
|
+
class: classNames,
|
|
34
|
+
format: input.format,
|
|
35
|
+
locale: input.locale,
|
|
36
|
+
timezone: input.timezone,
|
|
37
|
+
attrs: input.attrs,
|
|
38
|
+
link: objectLink(input.link, resolvedObj)
|
|
39
|
+
}, extractRender(input)), out, __component, "1");
|
|
40
|
+
}
|
|
41
|
+
}, out, __component, "0");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
marko_template._ = marko_renderer(render, {
|
|
45
|
+
e_: marko_componentType
|
|
46
|
+
}, marko_component);
|
|
47
|
+
|
|
48
|
+
marko_template.meta = {
|
|
49
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/obj-date.marko",
|
|
50
|
+
component: "./obj-date.marko",
|
|
51
|
+
tags: [
|
|
52
|
+
"./date.marko",
|
|
53
|
+
"./obj.marko"
|
|
54
|
+
]
|
|
55
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getAsArray, getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
<marko-web-obj|{ value, classNames }|
|
|
4
|
+
type=input.type
|
|
5
|
+
block-name=input.blockName
|
|
6
|
+
obj=input.obj
|
|
7
|
+
field=input.field
|
|
8
|
+
class=input.class
|
|
9
|
+
modifiers=input.modifiers
|
|
10
|
+
>
|
|
11
|
+
$ const nodes = getAsArray(value, "edges").map(edge => getAsObject(edge, "node"));
|
|
12
|
+
<marko-web-array|{ value: node, index, length }|
|
|
13
|
+
attrs=input.attrs
|
|
14
|
+
tag=input.tag
|
|
15
|
+
value=nodes
|
|
16
|
+
class=classNames
|
|
17
|
+
>
|
|
18
|
+
<${input.renderBody} node=node index=index length=length />
|
|
19
|
+
</marko-web-array>
|
|
20
|
+
</marko-web-obj>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/element/obj-nodes.marko",
|
|
6
|
+
marko_component = require("./obj-nodes.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
11
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
12
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
13
|
+
marko_web_array_template = require("./array.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_array_tag = marko_loadTag(marko_web_array_template),
|
|
16
|
+
marko_web_obj_template = require("./obj.marko"),
|
|
17
|
+
marko_web_obj_tag = marko_loadTag(marko_web_obj_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
marko_web_obj_tag({
|
|
23
|
+
type: input.type,
|
|
24
|
+
blockName: input.blockName,
|
|
25
|
+
obj: input.obj,
|
|
26
|
+
field: input.field,
|
|
27
|
+
class: input.class,
|
|
28
|
+
modifiers: input.modifiers,
|
|
29
|
+
renderBody: function(out, { value, classNames }) {
|
|
30
|
+
const nodes = getAsArray(value, "edges").map(edge => getAsObject(edge, "node"));
|
|
31
|
+
|
|
32
|
+
marko_web_array_tag({
|
|
33
|
+
attrs: input.attrs,
|
|
34
|
+
tag: input.tag,
|
|
35
|
+
value: nodes,
|
|
36
|
+
class: classNames,
|
|
37
|
+
renderBody: function(out, { value: node, index, length }) {
|
|
38
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
39
|
+
return {
|
|
40
|
+
node: node,
|
|
41
|
+
index: index,
|
|
42
|
+
length: length
|
|
43
|
+
};
|
|
44
|
+
}, null, null, null, __component, "2");
|
|
45
|
+
}
|
|
46
|
+
}, out, __component, "1");
|
|
47
|
+
}
|
|
48
|
+
}, out, __component, "0");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
marko_template._ = marko_renderer(render, {
|
|
52
|
+
e_: marko_componentType
|
|
53
|
+
}, marko_component);
|
|
54
|
+
|
|
55
|
+
marko_template.meta = {
|
|
56
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/obj-nodes.marko",
|
|
57
|
+
component: "./obj-nodes.marko",
|
|
58
|
+
tags: [
|
|
59
|
+
"./array.marko",
|
|
60
|
+
"./obj.marko"
|
|
61
|
+
]
|
|
62
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import objectLink from "./object-link";
|
|
2
|
+
import extractRender from "./extract-render";
|
|
3
|
+
|
|
4
|
+
<!-- @deprecated This should use with <marko-core-obj-text>, perhaps? -->
|
|
5
|
+
|
|
6
|
+
<marko-web-obj|{ value, classNames, resolvedObj }|
|
|
7
|
+
type=input.type
|
|
8
|
+
block-name=input.blockName
|
|
9
|
+
obj=input.obj
|
|
10
|
+
field=input.field
|
|
11
|
+
class=input.class
|
|
12
|
+
modifiers=input.modifiers
|
|
13
|
+
>
|
|
14
|
+
<marko-web-text
|
|
15
|
+
tag=input.tag
|
|
16
|
+
value=value
|
|
17
|
+
html=input.html
|
|
18
|
+
class=classNames
|
|
19
|
+
attrs=input.attrs
|
|
20
|
+
link=objectLink(input.link, resolvedObj)
|
|
21
|
+
...extractRender(input)
|
|
22
|
+
/>
|
|
23
|
+
</marko-web-obj>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/element/obj-text.marko",
|
|
6
|
+
marko_component = require("./obj-text.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectLink = require("./object-link"),
|
|
9
|
+
objectLink = module_objectLink.default || module_objectLink,
|
|
10
|
+
module_extractRender = require("./extract-render"),
|
|
11
|
+
extractRender = module_extractRender.default || module_extractRender,
|
|
12
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
13
|
+
marko_web_text_template = require("./text.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_text_tag = marko_loadTag(marko_web_text_template),
|
|
16
|
+
marko_web_obj_template = require("./obj.marko"),
|
|
17
|
+
marko_web_obj_tag = marko_loadTag(marko_web_obj_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
marko_web_obj_tag({
|
|
23
|
+
type: input.type,
|
|
24
|
+
blockName: input.blockName,
|
|
25
|
+
obj: input.obj,
|
|
26
|
+
field: input.field,
|
|
27
|
+
class: input.class,
|
|
28
|
+
modifiers: input.modifiers,
|
|
29
|
+
renderBody: function(out, { value, classNames, resolvedObj }) {
|
|
30
|
+
marko_web_text_tag(marko_assign({
|
|
31
|
+
tag: input.tag,
|
|
32
|
+
value: value,
|
|
33
|
+
html: input.html,
|
|
34
|
+
class: classNames,
|
|
35
|
+
attrs: input.attrs,
|
|
36
|
+
link: objectLink(input.link, resolvedObj)
|
|
37
|
+
}, extractRender(input)), out, __component, "1");
|
|
38
|
+
}
|
|
39
|
+
}, out, __component, "0");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
marko_template._ = marko_renderer(render, {
|
|
43
|
+
e_: marko_componentType
|
|
44
|
+
}, marko_component);
|
|
45
|
+
|
|
46
|
+
marko_template.meta = {
|
|
47
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/obj-text.marko",
|
|
48
|
+
component: "./obj-text.marko",
|
|
49
|
+
tags: [
|
|
50
|
+
"./text.marko",
|
|
51
|
+
"./obj.marko"
|
|
52
|
+
]
|
|
53
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { get, getAsObject, getAsArray, getLastObject } from "@mindful-web/object-path";
|
|
2
|
+
import { dasherize } from "@mindful-web/inflector";
|
|
3
|
+
import objectType from "./object-type";
|
|
4
|
+
|
|
5
|
+
$ const obj = getAsObject(input, "obj");
|
|
6
|
+
$ const field = input.field || "id";
|
|
7
|
+
$ const resolvedObj = getLastObject(obj, field);
|
|
8
|
+
$ const type = objectType(input.type || get(resolvedObj, "__typename"));
|
|
9
|
+
$ const value = get(obj, field);
|
|
10
|
+
|
|
11
|
+
$ const classNames = [];
|
|
12
|
+
$ if (input.blockName) {
|
|
13
|
+
const elementName = `${input.blockName}__${type}-${dasherize(field.split(".").pop())}`;
|
|
14
|
+
classNames.push(elementName);
|
|
15
|
+
classNames.push(...getAsArray(input.modifiers).map(mod => `${elementName}--${mod}`));
|
|
16
|
+
}
|
|
17
|
+
$ classNames.push(input.class);
|
|
18
|
+
|
|
19
|
+
<!-- @deprecated This should use with <marko-core-obj-value>, perhaps? -->
|
|
20
|
+
|
|
21
|
+
<if(value)>
|
|
22
|
+
<${input.renderBody} value=value class-names=classNames resolved-obj=resolvedObj />
|
|
23
|
+
</if>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/element/obj.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
9
|
+
get = module_objectPath_module.get,
|
|
10
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
11
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
12
|
+
getLastObject = module_objectPath_module.getLastObject,
|
|
13
|
+
module_inflector_module = require("@mindful-web/inflector"),
|
|
14
|
+
inflector_module = module_inflector_module.default || module_inflector_module,
|
|
15
|
+
dasherize = module_inflector_module.dasherize,
|
|
16
|
+
module_objectType = require("./object-type"),
|
|
17
|
+
objectType = module_objectType.default || module_objectType,
|
|
18
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag");
|
|
19
|
+
|
|
20
|
+
function render(input, out, __component, component, state) {
|
|
21
|
+
var data = input;
|
|
22
|
+
|
|
23
|
+
const obj = getAsObject(input, "obj");
|
|
24
|
+
|
|
25
|
+
const field = input.field || "id";
|
|
26
|
+
|
|
27
|
+
const resolvedObj = getLastObject(obj, field);
|
|
28
|
+
|
|
29
|
+
const type = objectType(input.type || get(resolvedObj, "__typename"));
|
|
30
|
+
|
|
31
|
+
const value = get(obj, field);
|
|
32
|
+
|
|
33
|
+
const classNames = [];
|
|
34
|
+
|
|
35
|
+
if (input.blockName) {
|
|
36
|
+
const elementName = `${input.blockName}__${type}-${dasherize(field.split(".").pop())}`;
|
|
37
|
+
classNames.push(elementName);
|
|
38
|
+
classNames.push(...getAsArray(input.modifiers).map(mod => `${elementName}--${mod}`));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
classNames.push(input.class);
|
|
42
|
+
|
|
43
|
+
if (value) {
|
|
44
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
45
|
+
return {
|
|
46
|
+
value: value,
|
|
47
|
+
"class-names": classNames,
|
|
48
|
+
"resolved-obj": resolvedObj
|
|
49
|
+
};
|
|
50
|
+
}, null, null, null, __component, "0");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
marko_template._ = marko_renderer(render, {
|
|
55
|
+
d_: true,
|
|
56
|
+
e_: marko_componentType
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
marko_template.meta = {
|
|
60
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/obj.marko"
|
|
61
|
+
};
|