@parameter1/base-cms-marko-web 2.43.0 → 2.46.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +13 -13
- package/components/load-more/index.marko.js +0 -118
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parameter1/base-cms-marko-web",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.46.1",
|
4
4
|
"description": "Core Marko+Express components for BaseCMS websites",
|
5
5
|
"author": "Jacob Bare <jacob@parameter1.com>",
|
6
6
|
"main": "index.js",
|
@@ -14,17 +14,17 @@
|
|
14
14
|
"test": "yarn compile && yarn lint"
|
15
15
|
},
|
16
16
|
"dependencies": {
|
17
|
-
"@godaddy/terminus": "^4.
|
18
|
-
"@parameter1/base-cms-apollo-ssr": "^2.
|
19
|
-
"@parameter1/base-cms-embedded-media": "^2.
|
20
|
-
"@parameter1/base-cms-express-apollo": "^2.
|
21
|
-
"@parameter1/base-cms-graphql-fragment-types": "^2.
|
22
|
-
"@parameter1/base-cms-image": "^2.
|
17
|
+
"@godaddy/terminus": "^4.9.0",
|
18
|
+
"@parameter1/base-cms-apollo-ssr": "^2.45.0",
|
19
|
+
"@parameter1/base-cms-embedded-media": "^2.45.0",
|
20
|
+
"@parameter1/base-cms-express-apollo": "^2.45.0",
|
21
|
+
"@parameter1/base-cms-graphql-fragment-types": "^2.45.0",
|
22
|
+
"@parameter1/base-cms-image": "^2.45.0",
|
23
23
|
"@parameter1/base-cms-inflector": "^2.0.0",
|
24
|
-
"@parameter1/base-cms-object-path": "^2.
|
24
|
+
"@parameter1/base-cms-object-path": "^2.45.0",
|
25
25
|
"@parameter1/base-cms-tenant-context": "^2.0.0",
|
26
26
|
"@parameter1/base-cms-utils": "^2.22.2",
|
27
|
-
"@parameter1/base-cms-web-common": "^2.
|
27
|
+
"@parameter1/base-cms-web-common": "^2.46.0",
|
28
28
|
"apollo-cache-inmemory": "^1.6.6",
|
29
29
|
"apollo-client": "^2.6.10",
|
30
30
|
"apollo-link": "^1.2.14",
|
@@ -33,14 +33,14 @@
|
|
33
33
|
"express": "^4.17.1",
|
34
34
|
"express-http-proxy": "^1.6.2",
|
35
35
|
"graphql": "^14.7.0",
|
36
|
-
"graphql-tag": "^2.
|
36
|
+
"graphql-tag": "^2.12.5",
|
37
37
|
"helmet": "^3.23.3",
|
38
38
|
"http-errors": "^1.8.0",
|
39
|
-
"jquery": "^3.
|
39
|
+
"jquery": "^3.6.0",
|
40
40
|
"marko": "~4.20.0",
|
41
41
|
"moment": "^2.29.1",
|
42
42
|
"vue": "^2.6.14",
|
43
|
-
"vue-apollo": "^3.0.
|
43
|
+
"vue-apollo": "^3.0.8",
|
44
44
|
"vue-server-renderer": "^2.6.14",
|
45
45
|
"whatwg-fetch": "^3.6.1"
|
46
46
|
},
|
@@ -50,5 +50,5 @@
|
|
50
50
|
"publishConfig": {
|
51
51
|
"access": "public"
|
52
52
|
},
|
53
|
-
"gitHead": "
|
53
|
+
"gitHead": "490a86132152d30fa01b8212476c6aeff138d137"
|
54
54
|
}
|
@@ -1,118 +0,0 @@
|
|
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 = "/@parameter1/base-cms-marko-web$2.13.0/components/load-more/index.marko",
|
6
|
-
marko_component = require("./index.marko"),
|
7
|
-
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
8
|
-
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
9
|
-
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
10
|
-
getAsObject = module_baseCmsObjectPath_module.getAsObject,
|
11
|
-
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
12
|
-
marko_web_browser_component_template = require("../browser-component.marko"),
|
13
|
-
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
14
|
-
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
|
15
|
-
marko_str = require("marko/dist/runtime/helpers/to-string"),
|
16
|
-
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
17
|
-
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
18
|
-
marko_web_load_more_trigger_template = require("./trigger.marko"),
|
19
|
-
marko_web_load_more_trigger_tag = marko_loadTag(marko_web_load_more_trigger_template),
|
20
|
-
marko_web_page_container_template = require("../page/container.marko"),
|
21
|
-
marko_web_page_container_tag = marko_loadTag(marko_web_page_container_template),
|
22
|
-
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
23
|
-
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
24
|
-
|
25
|
-
function render(input, out, __component, component, state) {
|
26
|
-
var data = input;
|
27
|
-
|
28
|
-
const { components, fragments } = out.global;
|
29
|
-
|
30
|
-
const Component = components.get(input.componentName);
|
31
|
-
|
32
|
-
const pageNumber = input.pageNumber || 1;
|
33
|
-
|
34
|
-
const queryParams = {
|
35
|
-
...getAsObject(input, "queryParams"),
|
36
|
-
queryName: "LoadMore",
|
37
|
-
queryFragment: fragments.get(input.fragmentName),
|
38
|
-
};
|
39
|
-
|
40
|
-
if (Component) {
|
41
|
-
marko_web_query_tag({
|
42
|
-
collapsible: true,
|
43
|
-
name: input.queryName,
|
44
|
-
params: queryParams,
|
45
|
-
renderBody: function(out, { nodes, pageInfo }) {
|
46
|
-
if (nodes.length) {
|
47
|
-
marko_web_page_container_tag(marko_assign({
|
48
|
-
tag: "section"
|
49
|
-
}, input.pageInput, {
|
50
|
-
modifiers: ["load-more", `page-${pageNumber}`, ...getAsArray(input, "pageInput.modifiers")],
|
51
|
-
renderBody: function(out) {
|
52
|
-
marko_web_browser_component_tag({
|
53
|
-
name: "TriggerInViewEvent",
|
54
|
-
props: {
|
55
|
-
eventName: "load-more-in-view",
|
56
|
-
data: {
|
57
|
-
page_number: pageNumber + 1
|
58
|
-
}
|
59
|
-
}
|
60
|
-
}, out, __component, "2");
|
61
|
-
|
62
|
-
if ((pageNumber === 1) && input.header) {
|
63
|
-
out.w("<div class=\"load-more-header\">" +
|
64
|
-
marko_str(input.header) +
|
65
|
-
"</div>");
|
66
|
-
}
|
67
|
-
|
68
|
-
marko_dynamicTag(out, Component, function() {
|
69
|
-
return marko_assign({}, input.componentInput, {
|
70
|
-
nodes: nodes,
|
71
|
-
"page-info": pageInfo,
|
72
|
-
"page-number": pageNumber
|
73
|
-
});
|
74
|
-
}, null, null, null, __component, "4");
|
75
|
-
|
76
|
-
const { endCursor, hasNextPage } = pageInfo;
|
77
|
-
|
78
|
-
delete queryParams.skip;
|
79
|
-
|
80
|
-
delete queryParams.queryFragment;
|
81
|
-
|
82
|
-
delete queryParams.renderBody;
|
83
|
-
|
84
|
-
const provide = {
|
85
|
-
...input,
|
86
|
-
queryParams: { ...queryParams, after: endCursor },
|
87
|
-
};
|
88
|
-
|
89
|
-
marko_web_load_more_trigger_tag(marko_assign({}, input.triggerInput, {
|
90
|
-
appendTo: input.appendTo,
|
91
|
-
maxPages: input.maxPages,
|
92
|
-
expand: input.expand,
|
93
|
-
pageNumber: pageNumber,
|
94
|
-
provide: provide,
|
95
|
-
show: hasNextPage
|
96
|
-
}), out, __component, "5");
|
97
|
-
}
|
98
|
-
}), out, __component, "1");
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}, out, __component, "0");
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
marko_template._ = marko_renderer(render, {
|
106
|
-
e_: marko_componentType
|
107
|
-
}, marko_component);
|
108
|
-
|
109
|
-
marko_template.meta = {
|
110
|
-
id: "/@parameter1/base-cms-marko-web$2.13.0/components/load-more/index.marko",
|
111
|
-
component: "./",
|
112
|
-
tags: [
|
113
|
-
"../browser-component.marko",
|
114
|
-
"./trigger.marko",
|
115
|
-
"../page/container.marko",
|
116
|
-
"@parameter1/base-cms-marko-core/components/queries/index.marko"
|
117
|
-
]
|
118
|
-
};
|