@mindful-web/marko-core 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 +1 -0
- package/LICENSE +21 -0
- package/components/elements/array.marko +20 -0
- package/components/elements/array.marko.js +69 -0
- package/components/elements/components/text.marko +11 -0
- package/components/elements/components/text.marko.js +37 -0
- package/components/elements/date.marko +22 -0
- package/components/elements/date.marko.js +53 -0
- package/components/elements/img.marko +27 -0
- package/components/elements/img.marko.js +60 -0
- package/components/elements/link.marko +25 -0
- package/components/elements/link.marko.js +58 -0
- package/components/elements/marko.json +128 -0
- package/components/elements/obj-array.marko +13 -0
- package/components/elements/obj-array.marko.js +52 -0
- package/components/elements/obj-date.marko +17 -0
- package/components/elements/obj-date.marko.js +48 -0
- package/components/elements/obj-nodes.marko +16 -0
- package/components/elements/obj-nodes.marko.js +58 -0
- package/components/elements/obj-text.marko +16 -0
- package/components/elements/obj-text.marko.js +47 -0
- package/components/elements/obj-value.marko +14 -0
- package/components/elements/obj-value.marko.js +50 -0
- package/components/elements/text.marko +37 -0
- package/components/elements/text.marko.js +78 -0
- package/components/marko.json +10 -0
- package/components/queries/all-author-content.marko +3 -0
- package/components/queries/all-author-content.marko.js +33 -0
- package/components/queries/all-company-content.marko +3 -0
- package/components/queries/all-company-content.marko.js +33 -0
- package/components/queries/all-published-content.marko +3 -0
- package/components/queries/all-published-content.marko.js +33 -0
- package/components/queries/components/loader.marko +6 -0
- package/components/queries/components/loader.marko.js +40 -0
- package/components/queries/content.marko +3 -0
- package/components/queries/content.marko.js +33 -0
- package/components/queries/dynamic-page.marko +3 -0
- package/components/queries/dynamic-page.marko.js +33 -0
- package/components/queries/index.marko +65 -0
- package/components/queries/index.marko.js +110 -0
- package/components/queries/magazine-active-issues.marko +3 -0
- package/components/queries/magazine-active-issues.marko.js +33 -0
- package/components/queries/magazine-issue.marko +3 -0
- package/components/queries/magazine-issue.marko.js +33 -0
- package/components/queries/magazine-latest-issue.marko +3 -0
- package/components/queries/magazine-latest-issue.marko.js +33 -0
- package/components/queries/magazine-publication.marko +3 -0
- package/components/queries/magazine-publication.marko.js +33 -0
- package/components/queries/magazine-publications.marko +3 -0
- package/components/queries/magazine-publications.marko.js +33 -0
- package/components/queries/magazine-scheduled-content.marko +3 -0
- package/components/queries/magazine-scheduled-content.marko.js +33 -0
- package/components/queries/marko.json +66 -0
- package/components/queries/most-popular-content.marko +3 -0
- package/components/queries/most-popular-content.marko.js +33 -0
- package/components/queries/newsletter-scheduled-content.marko +3 -0
- package/components/queries/newsletter-scheduled-content.marko.js +33 -0
- package/components/queries/related-published-content.marko +3 -0
- package/components/queries/related-published-content.marko.js +33 -0
- package/components/queries/website-optioned-content.marko +3 -0
- package/components/queries/website-optioned-content.marko.js +33 -0
- package/components/queries/website-scheduled-content.marko +3 -0
- package/components/queries/website-scheduled-content.marko.js +33 -0
- package/components/queries/website-section.marko +3 -0
- package/components/queries/website-section.marko.js +33 -0
- package/components/queries/website-sections.marko +3 -0
- package/components/queries/website-sections.marko.js +33 -0
- package/components/resolve.marko +32 -0
- package/components/resolve.marko.js +85 -0
- package/marko.json +6 -0
- package/middleware/clean-marko-response.js +1 -0
- package/package.json +35 -0
- package/utils/build-marko-global.js +1 -0
- package/utils/clean-marko-chunk.js +1 -0
- package/utils/default-value.js +6 -0
- package/utils/extract-render-body.js +1 -0
- package/utils/is-dev.js +1 -0
- package/utils/should-collapse.js +5 -0
package/.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.marko.js
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Parameter1 LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
import defaultValue from "../../utils/default-value";
|
|
3
|
+
|
|
4
|
+
$ const tag = defaultValue(input.tag, "div");
|
|
5
|
+
$ const value = getAsArray(input, "value");
|
|
6
|
+
|
|
7
|
+
<if(value.length)>
|
|
8
|
+
<if(tag)>
|
|
9
|
+
<${tag} ...input.attrs class=input.class>
|
|
10
|
+
<for|v, index| of=value>
|
|
11
|
+
<${input.renderBody} value=v index=index length=value.length />
|
|
12
|
+
</for>
|
|
13
|
+
</>
|
|
14
|
+
</if>
|
|
15
|
+
<else>
|
|
16
|
+
<for|v, index| of=value>
|
|
17
|
+
<${input.renderBody} value=v index=index length=value.length />
|
|
18
|
+
</for>
|
|
19
|
+
</else>
|
|
20
|
+
</if>
|
|
@@ -0,0 +1,69 @@
|
|
|
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-core$1.0.0/components/elements/array.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
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
10
|
+
module_defaultValue = require("../../utils/default-value"),
|
|
11
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
12
|
+
marko_forOf = require("marko/dist/runtime/helpers/for-of"),
|
|
13
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
14
|
+
marko_assign = require("marko/dist/runtime/helpers/assign");
|
|
15
|
+
|
|
16
|
+
function render(input, out, __component, component, state) {
|
|
17
|
+
var data = input;
|
|
18
|
+
|
|
19
|
+
const tag = defaultValue(input.tag, "div");
|
|
20
|
+
|
|
21
|
+
const value = getAsArray(input, "value");
|
|
22
|
+
|
|
23
|
+
if (value.length) {
|
|
24
|
+
if (tag) {
|
|
25
|
+
marko_dynamicTag(out, tag, function() {
|
|
26
|
+
return marko_assign({}, input.attrs, {
|
|
27
|
+
class: input.class
|
|
28
|
+
});
|
|
29
|
+
}, function(out) {
|
|
30
|
+
var $for$0 = 0;
|
|
31
|
+
|
|
32
|
+
marko_forOf(value, function(v, index) {
|
|
33
|
+
var $keyScope$0 = "[" + (($for$0++) + "]");
|
|
34
|
+
|
|
35
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
36
|
+
return {
|
|
37
|
+
value: v,
|
|
38
|
+
index: index,
|
|
39
|
+
length: value.length
|
|
40
|
+
};
|
|
41
|
+
}, null, null, null, __component, "1" + $keyScope$0);
|
|
42
|
+
});
|
|
43
|
+
}, null, null, __component, "0");
|
|
44
|
+
} else {
|
|
45
|
+
var $for$1 = 0;
|
|
46
|
+
|
|
47
|
+
marko_forOf(value, function(v, index) {
|
|
48
|
+
var $keyScope$1 = "[" + (($for$1++) + "]");
|
|
49
|
+
|
|
50
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
51
|
+
return {
|
|
52
|
+
value: v,
|
|
53
|
+
index: index,
|
|
54
|
+
length: value.length
|
|
55
|
+
};
|
|
56
|
+
}, null, null, null, __component, "2" + $keyScope$1);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
marko_template._ = marko_renderer(render, {
|
|
63
|
+
d_: true,
|
|
64
|
+
e_: marko_componentType
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
marko_template.meta = {
|
|
68
|
+
id: "/@mindful-web/marko-core$1.0.0/components/elements/array.marko"
|
|
69
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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-core$1.0.0/components/elements/components/text.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
8
|
+
marko_str = require("marko/dist/runtime/helpers/to-string"),
|
|
9
|
+
helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
|
|
10
|
+
marko_escapeXml = helpers_escape_xml.x;
|
|
11
|
+
|
|
12
|
+
function render(input, out, __component, component, state) {
|
|
13
|
+
var data = input;
|
|
14
|
+
|
|
15
|
+
const { value, renderBody, html } = input;
|
|
16
|
+
|
|
17
|
+
if (renderBody) {
|
|
18
|
+
marko_dynamicTag(out, renderBody, function() {
|
|
19
|
+
return {
|
|
20
|
+
value: value
|
|
21
|
+
};
|
|
22
|
+
}, null, null, null, __component, "0");
|
|
23
|
+
} else if (html) {
|
|
24
|
+
out.w(marko_str(value));
|
|
25
|
+
} else {
|
|
26
|
+
out.w(marko_escapeXml(value));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
marko_template._ = marko_renderer(render, {
|
|
31
|
+
d_: true,
|
|
32
|
+
e_: marko_componentType
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
marko_template.meta = {
|
|
36
|
+
id: "/@mindful-web/marko-core$1.0.0/components/elements/components/text.marko"
|
|
37
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import dayjs from "@mindful-web/dayjs";
|
|
2
|
+
import { getAsObject } from "@mindful-web/object-path";
|
|
3
|
+
import defaultValue from "../../utils/default-value";
|
|
4
|
+
|
|
5
|
+
$ const config = getAsObject(out.global, "markoCoreDate");
|
|
6
|
+
|
|
7
|
+
$ const format = defaultValue(input.format, config.format || "MMM Do, YYYY");
|
|
8
|
+
$ const timezone = defaultValue(input.timezone, config.timezone || "America/Chicago");
|
|
9
|
+
|
|
10
|
+
$ const date = defaultValue(input.value, null, v => dayjs(v).tz(timezone));
|
|
11
|
+
$ const value = date && date.isValid() ? date.format(format) : null;
|
|
12
|
+
|
|
13
|
+
$ const textInput = {
|
|
14
|
+
value,
|
|
15
|
+
tag: input.tag,
|
|
16
|
+
class: input.class,
|
|
17
|
+
attrs: input.attrs,
|
|
18
|
+
link: input.link,
|
|
19
|
+
renderBody: input.renderBody,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
<marko-core-text ...textInput />
|
|
@@ -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-core$1.0.0/components/elements/date.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_dayjs = require("@mindful-web/dayjs"),
|
|
8
|
+
dayjs = module_dayjs.default || module_dayjs,
|
|
9
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
10
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
11
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
12
|
+
module_defaultValue = require("../../utils/default-value"),
|
|
13
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
14
|
+
marko_core_text_template = require("./text.marko"),
|
|
15
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
16
|
+
marko_core_text_tag = marko_loadTag(marko_core_text_template);
|
|
17
|
+
|
|
18
|
+
function render(input, out, __component, component, state) {
|
|
19
|
+
var data = input;
|
|
20
|
+
|
|
21
|
+
const config = getAsObject(out.global, "markoCoreDate");
|
|
22
|
+
|
|
23
|
+
const format = defaultValue(input.format, config.format || "MMM Do, YYYY");
|
|
24
|
+
|
|
25
|
+
const timezone = defaultValue(input.timezone, config.timezone || "America/Chicago");
|
|
26
|
+
|
|
27
|
+
const date = defaultValue(input.value, null, v => dayjs(v).tz(timezone));
|
|
28
|
+
|
|
29
|
+
const value = date && date.isValid() ? date.format(format) : null;
|
|
30
|
+
|
|
31
|
+
const textInput = {
|
|
32
|
+
value,
|
|
33
|
+
tag: input.tag,
|
|
34
|
+
class: input.class,
|
|
35
|
+
attrs: input.attrs,
|
|
36
|
+
link: input.link,
|
|
37
|
+
renderBody: input.renderBody,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
marko_core_text_tag(textInput, out, __component, "0");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
marko_template._ = marko_renderer(render, {
|
|
44
|
+
d_: true,
|
|
45
|
+
e_: marko_componentType
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
marko_template.meta = {
|
|
49
|
+
id: "/@mindful-web/marko-core$1.0.0/components/elements/date.marko",
|
|
50
|
+
tags: [
|
|
51
|
+
"./text.marko"
|
|
52
|
+
]
|
|
53
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const hasImage = Boolean(input.src);
|
|
4
|
+
$ const srcset = getAsArray(input.srcset).filter(v => v).join(",") || null;
|
|
5
|
+
|
|
6
|
+
<if(hasImage)>
|
|
7
|
+
<if(input.link)>
|
|
8
|
+
<marko-core-link ...input.link>
|
|
9
|
+
<img
|
|
10
|
+
...input.attrs
|
|
11
|
+
src=input.src
|
|
12
|
+
srcset=srcset
|
|
13
|
+
alt=input.alt
|
|
14
|
+
class=input.class
|
|
15
|
+
/>
|
|
16
|
+
</marko-core-link>
|
|
17
|
+
</if>
|
|
18
|
+
<else>
|
|
19
|
+
<img
|
|
20
|
+
...input.attrs
|
|
21
|
+
src=input.src
|
|
22
|
+
srcset=srcset
|
|
23
|
+
alt=input.alt
|
|
24
|
+
class=input.class
|
|
25
|
+
/>
|
|
26
|
+
</else>
|
|
27
|
+
</if>
|
|
@@ -0,0 +1,60 @@
|
|
|
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-core$1.0.0/components/elements/img.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
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
10
|
+
marko_mergeAttrs = require("marko/dist/runtime/html/helpers/merge-attrs"),
|
|
11
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
12
|
+
marko_core_link_template = require("./link.marko"),
|
|
13
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
14
|
+
marko_core_link_tag = marko_loadTag(marko_core_link_template);
|
|
15
|
+
|
|
16
|
+
function render(input, out, __component, component, state) {
|
|
17
|
+
var data = input;
|
|
18
|
+
|
|
19
|
+
const hasImage = Boolean(input.src);
|
|
20
|
+
|
|
21
|
+
const srcset = getAsArray(input.srcset).filter(v => v).join(",") || null;
|
|
22
|
+
|
|
23
|
+
if (hasImage) {
|
|
24
|
+
if (input.link) {
|
|
25
|
+
marko_core_link_tag(marko_assign({}, input.link, {
|
|
26
|
+
renderBody: function(out) {
|
|
27
|
+
out.w("<img" +
|
|
28
|
+
marko_mergeAttrs(input.attrs, {
|
|
29
|
+
src: input.src,
|
|
30
|
+
srcset: srcset,
|
|
31
|
+
alt: input.alt,
|
|
32
|
+
class: input.class
|
|
33
|
+
}) +
|
|
34
|
+
">");
|
|
35
|
+
}
|
|
36
|
+
}), out, __component, "0");
|
|
37
|
+
} else {
|
|
38
|
+
out.w("<img" +
|
|
39
|
+
marko_mergeAttrs(input.attrs, {
|
|
40
|
+
src: input.src,
|
|
41
|
+
srcset: srcset,
|
|
42
|
+
alt: input.alt,
|
|
43
|
+
class: input.class
|
|
44
|
+
}) +
|
|
45
|
+
">");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
marko_template._ = marko_renderer(render, {
|
|
51
|
+
d_: true,
|
|
52
|
+
e_: marko_componentType
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
marko_template.meta = {
|
|
56
|
+
id: "/@mindful-web/marko-core$1.0.0/components/elements/img.marko",
|
|
57
|
+
tags: [
|
|
58
|
+
"./link.marko"
|
|
59
|
+
]
|
|
60
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
$ const { href, target } = input;
|
|
2
|
+
$ const classNames = input.class;
|
|
3
|
+
$ const hasHref = Boolean(href);
|
|
4
|
+
$ const rels = [];
|
|
5
|
+
$ if (input.rel) rels.push(input.rel);
|
|
6
|
+
$ if (target === "_blank") rels.push("noopener");
|
|
7
|
+
$ const rel = rels.length ? rels.join(" ") : null;
|
|
8
|
+
|
|
9
|
+
<if(hasHref)>
|
|
10
|
+
<${input.before} />
|
|
11
|
+
<a
|
|
12
|
+
rel=rel
|
|
13
|
+
...input.attrs
|
|
14
|
+
href=href
|
|
15
|
+
title=input.title
|
|
16
|
+
target=target
|
|
17
|
+
class=classNames
|
|
18
|
+
>
|
|
19
|
+
<${input.renderBody} />
|
|
20
|
+
</a>
|
|
21
|
+
<${input.after} />
|
|
22
|
+
</if>
|
|
23
|
+
<else>
|
|
24
|
+
<${input.renderBody} />
|
|
25
|
+
</else>
|
|
@@ -0,0 +1,58 @@
|
|
|
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-core$1.0.0/components/elements/link.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
8
|
+
marko_mergeAttrs = require("marko/dist/runtime/html/helpers/merge-attrs");
|
|
9
|
+
|
|
10
|
+
function render(input, out, __component, component, state) {
|
|
11
|
+
var data = input;
|
|
12
|
+
|
|
13
|
+
const { href, target } = input;
|
|
14
|
+
|
|
15
|
+
const classNames = input.class;
|
|
16
|
+
|
|
17
|
+
const hasHref = Boolean(href);
|
|
18
|
+
|
|
19
|
+
const rels = [];
|
|
20
|
+
|
|
21
|
+
if (input.rel) rels.push(input.rel);
|
|
22
|
+
|
|
23
|
+
if (target === "_blank") rels.push("noopener");
|
|
24
|
+
|
|
25
|
+
const rel = rels.length ? rels.join(" ") : null;
|
|
26
|
+
|
|
27
|
+
if (hasHref) {
|
|
28
|
+
marko_dynamicTag(out, input.before, null, null, null, null, __component, "0");
|
|
29
|
+
|
|
30
|
+
out.w("<a" +
|
|
31
|
+
marko_mergeAttrs({
|
|
32
|
+
rel: rel
|
|
33
|
+
}, input.attrs, {
|
|
34
|
+
href: href,
|
|
35
|
+
title: input.title,
|
|
36
|
+
target: target,
|
|
37
|
+
class: classNames
|
|
38
|
+
}) +
|
|
39
|
+
">");
|
|
40
|
+
|
|
41
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "2");
|
|
42
|
+
|
|
43
|
+
out.w("</a>");
|
|
44
|
+
|
|
45
|
+
marko_dynamicTag(out, input.after, null, null, null, null, __component, "3");
|
|
46
|
+
} else {
|
|
47
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "4");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
marko_template._ = marko_renderer(render, {
|
|
52
|
+
d_: true,
|
|
53
|
+
e_: marko_componentType
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
marko_template.meta = {
|
|
57
|
+
id: "/@mindful-web/marko-core$1.0.0/components/elements/link.marko"
|
|
58
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<marko-core-link>": {
|
|
3
|
+
"template": "./link.marko",
|
|
4
|
+
"<before>": {},
|
|
5
|
+
"<after>": {},
|
|
6
|
+
"@href": "string",
|
|
7
|
+
"@target": "string",
|
|
8
|
+
"@title": "string",
|
|
9
|
+
"@rel": "string",
|
|
10
|
+
"@class": "string",
|
|
11
|
+
"@attrs": "object"
|
|
12
|
+
},
|
|
13
|
+
"<marko-core-img>": {
|
|
14
|
+
"template": "./img.marko",
|
|
15
|
+
"<link>": {},
|
|
16
|
+
"@src": "string",
|
|
17
|
+
"@srcset": "array",
|
|
18
|
+
"@alt": "string",
|
|
19
|
+
"@class": "string",
|
|
20
|
+
"@attrs": "object"
|
|
21
|
+
},
|
|
22
|
+
"<marko-core-text>": {
|
|
23
|
+
"template": "./text.marko",
|
|
24
|
+
"<link>": {
|
|
25
|
+
"<before>": {},
|
|
26
|
+
"<after>": {},
|
|
27
|
+
"@href": "string",
|
|
28
|
+
"@target": "string",
|
|
29
|
+
"@title": "string",
|
|
30
|
+
"@rel": "string",
|
|
31
|
+
"@class": "string",
|
|
32
|
+
"@attrs": "object"
|
|
33
|
+
},
|
|
34
|
+
"@value": "expression",
|
|
35
|
+
"@tag": "string",
|
|
36
|
+
"@html": "boolean",
|
|
37
|
+
"@class": "string",
|
|
38
|
+
"@attrs": "object"
|
|
39
|
+
},
|
|
40
|
+
"<marko-core-date>": {
|
|
41
|
+
"template": "./date.marko",
|
|
42
|
+
"<link>": {
|
|
43
|
+
"<before>": {},
|
|
44
|
+
"<after>": {},
|
|
45
|
+
"@href": "string",
|
|
46
|
+
"@target": "string",
|
|
47
|
+
"@title": "string",
|
|
48
|
+
"@rel": "string",
|
|
49
|
+
"@class": "string",
|
|
50
|
+
"@attrs": "object"
|
|
51
|
+
},
|
|
52
|
+
"@value": "expression",
|
|
53
|
+
"@tag": "string",
|
|
54
|
+
"@format": "string",
|
|
55
|
+
"@locale": "string",
|
|
56
|
+
"@timezone": "string",
|
|
57
|
+
"@class": "string",
|
|
58
|
+
"@attrs": "object"
|
|
59
|
+
},
|
|
60
|
+
"<marko-core-array>": {
|
|
61
|
+
"template": "./array.marko",
|
|
62
|
+
"@value": "array",
|
|
63
|
+
"@tag": "string",
|
|
64
|
+
"@class": "string",
|
|
65
|
+
"@attrs": "object"
|
|
66
|
+
},
|
|
67
|
+
"<marko-core-obj-value>": {
|
|
68
|
+
"template": "./obj-value.marko",
|
|
69
|
+
"@obj": "object",
|
|
70
|
+
"@field": "string",
|
|
71
|
+
"@as": "string"
|
|
72
|
+
},
|
|
73
|
+
"<marko-core-obj-text>": {
|
|
74
|
+
"template": "./obj-text.marko",
|
|
75
|
+
"<link>": {
|
|
76
|
+
"<before>": {},
|
|
77
|
+
"<after>": {},
|
|
78
|
+
"@href": "string",
|
|
79
|
+
"@target": "string",
|
|
80
|
+
"@title": "string",
|
|
81
|
+
"@rel": "string",
|
|
82
|
+
"@class": "string",
|
|
83
|
+
"@attrs": "object"
|
|
84
|
+
},
|
|
85
|
+
"@obj": "object",
|
|
86
|
+
"@field": "string",
|
|
87
|
+
"@html": "boolean",
|
|
88
|
+
"@tag": "string",
|
|
89
|
+
"@class": "string",
|
|
90
|
+
"@attrs": "object"
|
|
91
|
+
},
|
|
92
|
+
"<marko-core-obj-date>": {
|
|
93
|
+
"template": "./obj-date.marko",
|
|
94
|
+
"<link>": {
|
|
95
|
+
"<before>": {},
|
|
96
|
+
"<after>": {},
|
|
97
|
+
"@href": "string",
|
|
98
|
+
"@target": "string",
|
|
99
|
+
"@title": "string",
|
|
100
|
+
"@rel": "string",
|
|
101
|
+
"@class": "string",
|
|
102
|
+
"@attrs": "object"
|
|
103
|
+
},
|
|
104
|
+
"@obj": "object",
|
|
105
|
+
"@field": "string",
|
|
106
|
+
"@format": "string",
|
|
107
|
+
"@locale": "string",
|
|
108
|
+
"@tag": "string",
|
|
109
|
+
"@class": "string",
|
|
110
|
+
"@attrs": "object"
|
|
111
|
+
},
|
|
112
|
+
"<marko-core-obj-array>": {
|
|
113
|
+
"template": "./obj-array.marko",
|
|
114
|
+
"@obj": "object",
|
|
115
|
+
"@field": "string",
|
|
116
|
+
"@tag": "string",
|
|
117
|
+
"@class": "string",
|
|
118
|
+
"@attrs": "object"
|
|
119
|
+
},
|
|
120
|
+
"<marko-core-obj-nodes>": {
|
|
121
|
+
"template": "./obj-nodes.marko",
|
|
122
|
+
"@obj": "object",
|
|
123
|
+
"@field": "string",
|
|
124
|
+
"@tag": "string",
|
|
125
|
+
"@class": "string",
|
|
126
|
+
"@attrs": "object"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<marko-core-obj-value|{ value }|
|
|
2
|
+
obj=input.obj
|
|
3
|
+
field=input.field
|
|
4
|
+
>
|
|
5
|
+
<marko-core-array|{ value: v, index, length }|
|
|
6
|
+
tag=input.tag
|
|
7
|
+
value=value
|
|
8
|
+
class=input.class
|
|
9
|
+
attrs=input.attrs
|
|
10
|
+
>
|
|
11
|
+
<${input.renderBody} value=v index=index length=length />
|
|
12
|
+
</marko-core-array>
|
|
13
|
+
</marko-core-obj-value>
|
|
@@ -0,0 +1,52 @@
|
|
|
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-core$1.0.0/components/elements/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_core_array_template = require("./array.marko"),
|
|
10
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
11
|
+
marko_core_array_tag = marko_loadTag(marko_core_array_template),
|
|
12
|
+
marko_core_obj_value_template = require("./obj-value.marko"),
|
|
13
|
+
marko_core_obj_value_tag = marko_loadTag(marko_core_obj_value_template);
|
|
14
|
+
|
|
15
|
+
function render(input, out, __component, component, state) {
|
|
16
|
+
var data = input;
|
|
17
|
+
|
|
18
|
+
marko_core_obj_value_tag({
|
|
19
|
+
obj: input.obj,
|
|
20
|
+
field: input.field,
|
|
21
|
+
renderBody: function(out, { value }) {
|
|
22
|
+
marko_core_array_tag({
|
|
23
|
+
tag: input.tag,
|
|
24
|
+
value: value,
|
|
25
|
+
class: input.class,
|
|
26
|
+
attrs: input.attrs,
|
|
27
|
+
renderBody: function(out, { value: v, index, length }) {
|
|
28
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
29
|
+
return {
|
|
30
|
+
value: v,
|
|
31
|
+
index: index,
|
|
32
|
+
length: length
|
|
33
|
+
};
|
|
34
|
+
}, null, null, null, __component, "2");
|
|
35
|
+
}
|
|
36
|
+
}, out, __component, "1");
|
|
37
|
+
}
|
|
38
|
+
}, out, __component, "0");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
marko_template._ = marko_renderer(render, {
|
|
42
|
+
e_: marko_componentType
|
|
43
|
+
}, marko_component);
|
|
44
|
+
|
|
45
|
+
marko_template.meta = {
|
|
46
|
+
id: "/@mindful-web/marko-core$1.0.0/components/elements/obj-array.marko",
|
|
47
|
+
component: "./obj-array.marko",
|
|
48
|
+
tags: [
|
|
49
|
+
"./array.marko",
|
|
50
|
+
"./obj-value.marko"
|
|
51
|
+
]
|
|
52
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import extractRenderBody from "../../utils/extract-render-body";
|
|
2
|
+
|
|
3
|
+
<marko-core-obj-value|{ value }|
|
|
4
|
+
obj=input.obj
|
|
5
|
+
field=input.field
|
|
6
|
+
>
|
|
7
|
+
<marko-core-date
|
|
8
|
+
tag=input.tag
|
|
9
|
+
value=value
|
|
10
|
+
format=input.format
|
|
11
|
+
locale=input.locale
|
|
12
|
+
class=input.class
|
|
13
|
+
attrs=input.attrs
|
|
14
|
+
link=input.link
|
|
15
|
+
...extractRenderBody(input)
|
|
16
|
+
/>
|
|
17
|
+
</marko-core-obj-value>
|
|
@@ -0,0 +1,48 @@
|
|
|
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-core$1.0.0/components/elements/obj-date.marko",
|
|
6
|
+
marko_component = require("./obj-date.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_extractRenderBody = require("../../utils/extract-render-body"),
|
|
9
|
+
extractRenderBody = module_extractRenderBody.default || module_extractRenderBody,
|
|
10
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
11
|
+
marko_core_date_template = require("./date.marko"),
|
|
12
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
13
|
+
marko_core_date_tag = marko_loadTag(marko_core_date_template),
|
|
14
|
+
marko_core_obj_value_template = require("./obj-value.marko"),
|
|
15
|
+
marko_core_obj_value_tag = marko_loadTag(marko_core_obj_value_template);
|
|
16
|
+
|
|
17
|
+
function render(input, out, __component, component, state) {
|
|
18
|
+
var data = input;
|
|
19
|
+
|
|
20
|
+
marko_core_obj_value_tag({
|
|
21
|
+
obj: input.obj,
|
|
22
|
+
field: input.field,
|
|
23
|
+
renderBody: function(out, { value }) {
|
|
24
|
+
marko_core_date_tag(marko_assign({
|
|
25
|
+
tag: input.tag,
|
|
26
|
+
value: value,
|
|
27
|
+
format: input.format,
|
|
28
|
+
locale: input.locale,
|
|
29
|
+
class: input.class,
|
|
30
|
+
attrs: input.attrs,
|
|
31
|
+
link: input.link
|
|
32
|
+
}, extractRenderBody(input)), out, __component, "1");
|
|
33
|
+
}
|
|
34
|
+
}, out, __component, "0");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
marko_template._ = marko_renderer(render, {
|
|
38
|
+
e_: marko_componentType
|
|
39
|
+
}, marko_component);
|
|
40
|
+
|
|
41
|
+
marko_template.meta = {
|
|
42
|
+
id: "/@mindful-web/marko-core$1.0.0/components/elements/obj-date.marko",
|
|
43
|
+
component: "./obj-date.marko",
|
|
44
|
+
tags: [
|
|
45
|
+
"./date.marko",
|
|
46
|
+
"./obj-value.marko"
|
|
47
|
+
]
|
|
48
|
+
};
|