qcobjectsnewapp 2.4.4 → 2.4.7
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/.eslintrc.js +7 -0
- package/.gitlab-ci.yml +2 -1
- package/Dockerfile +55 -10
- package/README.md +141 -142
- package/VERSION +1 -1
- package/config.json +38 -0
- package/css/components/card.css +5 -1
- package/css/components/github-grid-landscape.css +6 -0
- package/css/components/github-grid-portrait.css +6 -0
- package/demo-tests/test-component-grid.html +3 -2
- package/demo-tests/test-component-list.html +3 -2
- package/demo-tests/test-component-notifications.html +3 -2
- package/demo-tests/test-component-slider.html +3 -2
- package/img/logo-qcobjects-version.svg +4 -0
- package/img/octocat.svg +3 -0
- package/index.html +0 -1
- package/js/init.js +11 -9
- package/js/packages/com.qcobjects.installer.js +10 -13
- package/js/packages/com.qcobjects.services.github.js +99 -0
- package/js/packages/org.quickcorp.custom.components.js +22 -15
- package/js/packages/org.quickcorp.custom.controllers.js +109 -120
- package/js/packages/org.quickcorp.custom.effects.js +7 -11
- package/js/packages/org.quickcorp.custom.js +1 -0
- package/js/packages/org.quickcorp.custom.models.js +9 -10
- package/js/packages/org.quickcorp.custom.views.js +7 -11
- package/package.json +13 -10
- package/spec/testsSpec.js +25 -29
- package/sw.js +122 -122
- package/templates/components/article1.tpl.html +5 -10
- package/templates/components/article2.tpl.html +5 -10
- package/templates/components/card.tpl.html +1 -1
- package/templates/components/footer.tpl.html +12 -1
- package/templates/components/github-card.tpl.html +7 -0
- package/templates/components/layout-basic.tpl.html +11 -2
- package/templates/components/nav.tpl.html +2 -4
- package/templates/components/octocat-icon.tpl.html +11 -0
- package/templates/components/pages/about-of.tpl.html +21 -0
- package/templates/components/pages/author.tpl.html +18 -0
- package/templates/components/pages/page1.tpl.html +2 -1
- package/templates/components/pages/qcobjects-forks-stars.tpl.html +5 -0
- package/templates/components/section1.tpl.html +0 -6
- package/templates/components/section2.tpl.html +1 -1
- package/templates/components/shadowed-card.tpl.html +12 -4
- package/templates/components/signupbuttons.tpl.html +19 -3
- package/.eslintrc.json +0 -8
- package/templates/components/article3.tpl.html +0 -11
- package/templates/components/article4.tpl.html +0 -12
package/img/octocat.svg
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle">
|
|
2
|
+
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
|
|
3
|
+
</svg>
|
package/index.html
CHANGED
package/js/init.js
CHANGED
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
* Everyone is permitted to copy and distribute verbatim copies of this
|
|
24
24
|
* license document, but changing it is not allowed.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
// import "../QCObjects.js"; /* uncomment this line to load QCObjects from backend */
|
|
28
|
+
import "https://cdnjs.cloudflare.com/ajax/libs/qcobjects/2.4.52/QCObjects.js"; /* uncomment this line to load QCObjects from cdnjs */
|
|
29
|
+
|
|
27
30
|
/*
|
|
28
31
|
* The next values are the default settings
|
|
29
32
|
* You can change any value in runtime by using CONFIG.set
|
|
@@ -35,22 +38,21 @@ CONFIG.set("componentsBasePath", "templates/components/");
|
|
|
35
38
|
CONFIG.set("delayForReady", 1); // delay to wait before executing the first ready event, it includes imports
|
|
36
39
|
CONFIG.set("preserveComponentBodyTag", false); // don't use <componentBody></componentBody> tag
|
|
37
40
|
CONFIG.set("useConfigService", false); // Load settings from config.json
|
|
38
|
-
CONFIG.set("routingWay","hash"); // routingWay possible values are 'hash','pathname','search'
|
|
39
|
-
CONFIG.set("useLocalSDK",
|
|
40
|
-
CONFIG.set("tplextension","tpl.html"); // this is the file extension to locate the template files (if component.name = 'main' then template name will be main.tpl.html)
|
|
41
|
-
CONFIG.set("asynchronousImportsLoad",true); // it is recommended to load the Import declarations in an asyncronous way
|
|
42
|
-
CONFIG.set("serviceWorkerURI","/sw.js"); //QCObjects will register an launch this service worker automatically to work offline
|
|
41
|
+
CONFIG.set("routingWay", "hash"); // routingWay possible values are 'hash','pathname','search'
|
|
42
|
+
CONFIG.set("useLocalSDK", false); // on the frontend side you can chose whether to load the SDK from sdk.qcobjects.dev or from your local website
|
|
43
|
+
CONFIG.set("tplextension", "tpl.html"); // this is the file extension to locate the template files (if component.name = 'main' then template name will be main.tpl.html)
|
|
44
|
+
CONFIG.set("asynchronousImportsLoad", true); // it is recommended to load the Import declarations in an asyncronous way
|
|
45
|
+
CONFIG.set("serviceWorkerURI", "/sw.js"); // QCObjects will register an launch this service worker automatically to work offline
|
|
43
46
|
|
|
44
47
|
// if Component.cached is true, all the Class('Component') declarations will save the template in a localStorage cache
|
|
45
48
|
// until a cached=false attribute is found in a <component> html declaration
|
|
46
|
-
Component.cached=true;
|
|
49
|
+
Component.cached = true;
|
|
47
50
|
|
|
48
51
|
/**
|
|
49
52
|
* Main import sentence.
|
|
50
53
|
*/
|
|
51
54
|
|
|
52
|
-
|
|
53
55
|
Import("org.quickcorp.custom"); // this will load js/packages/org.quickcorp.custom.js file
|
|
54
56
|
|
|
55
57
|
// eslint-disable-next-line no-undef
|
|
56
|
-
RegisterWidgets("layout-basic", "splash-screen");
|
|
58
|
+
RegisterWidgets("layout-basic", "splash-screen", "github-grid", "octocat-icon", "lib-list");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Package("com.qcobjects.installer",[
|
|
2
|
+
Package("com.qcobjects.installer", [
|
|
3
3
|
class Installer extends ClassFactory("InheritClass") {
|
|
4
|
-
constructor ({root}){
|
|
4
|
+
constructor ({ root }) {
|
|
5
5
|
super(...arguments);
|
|
6
6
|
|
|
7
7
|
this.root = root;
|
|
8
|
-
window.addEventListener("beforeinstallprompt", this.beforeinstallprompt.bind(this),false);
|
|
9
|
-
window.addEventListener("appinstalled", this.installed.bind(this),false);
|
|
10
|
-
|
|
8
|
+
window.addEventListener("beforeinstallprompt", this.beforeinstallprompt.bind(this), false);
|
|
9
|
+
window.addEventListener("appinstalled", this.installed.bind(this), false);
|
|
10
|
+
|
|
11
11
|
root.addEventListener("click", this.install.bind(this));
|
|
12
12
|
root.addEventListener("touchend", this.install.bind(this));
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
window.matchMedia("(display-mode: standalone)").addEventListener("change", (evt) => {
|
|
15
15
|
let displayMode = "browser";
|
|
16
16
|
if (evt.matches) {
|
|
@@ -19,10 +19,9 @@ Package("com.qcobjects.installer",[
|
|
|
19
19
|
NotificationComponent.success(`TWA in ${displayMode} Mode`);
|
|
20
20
|
});
|
|
21
21
|
global.set("installer", this);
|
|
22
|
-
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
promptEvent=null;
|
|
24
|
+
promptEvent = null;
|
|
26
25
|
|
|
27
26
|
beforeinstallprompt (e) {
|
|
28
27
|
logger.debug("registering installer event");
|
|
@@ -35,14 +34,14 @@ Package("com.qcobjects.installer",[
|
|
|
35
34
|
installed () {
|
|
36
35
|
logger.debug("app is already installed");
|
|
37
36
|
this.promptEvent = null;
|
|
38
|
-
// This fires after onbeforinstallprompt OR after manual add to homescreen.
|
|
37
|
+
// This fires after onbeforinstallprompt OR after manual add to homescreen.
|
|
39
38
|
this.root.classList.remove("available");
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
install () {
|
|
43
|
-
|
|
42
|
+
const root = this.root;
|
|
44
43
|
logger.debug("installer actioned");
|
|
45
|
-
|
|
44
|
+
let promptEvent = this.promptEvent;
|
|
46
45
|
if (promptEvent) {
|
|
47
46
|
logger.debug("prompt event");
|
|
48
47
|
|
|
@@ -68,7 +67,5 @@ Package("com.qcobjects.installer",[
|
|
|
68
67
|
logger.debug("not asking for install");
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
70
|
}
|
|
74
71
|
]);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Package("com.qcobjects.services.github", [
|
|
3
|
+
class GitHubService extends JSONService {
|
|
4
|
+
name = "myservice";
|
|
5
|
+
external = true;
|
|
6
|
+
cached = false;
|
|
7
|
+
method = "GET";
|
|
8
|
+
headers = { "Content-Type": "application/json" };
|
|
9
|
+
url = "https://api.github.com/orgs/QuickCorp/repos";
|
|
10
|
+
withCredentials = false;
|
|
11
|
+
|
|
12
|
+
done ({ request, service }) {
|
|
13
|
+
logger.debug(request);
|
|
14
|
+
const result = JSON.parse(service.template).reverse().map(function (project) {
|
|
15
|
+
return {
|
|
16
|
+
id: project.id,
|
|
17
|
+
description: project.description,
|
|
18
|
+
title: project.name,
|
|
19
|
+
url: project.html_url,
|
|
20
|
+
image: `https://via.placeholder.com/150/000000/FFFFFF?text=${encodeURI(project.name)}`
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
service.template = JSON.stringify({
|
|
25
|
+
result
|
|
26
|
+
});
|
|
27
|
+
return super.done(...arguments);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
class GitHubTagService extends JSONService {
|
|
32
|
+
name = "myservice";
|
|
33
|
+
external = true;
|
|
34
|
+
cached = false;
|
|
35
|
+
method = "GET";
|
|
36
|
+
headers = { "Content-Type": "application/json" };
|
|
37
|
+
url = "https://api.github.com/search/repositories?q=qcobjects";
|
|
38
|
+
withCredentials = false;
|
|
39
|
+
|
|
40
|
+
done ({ request, service }) {
|
|
41
|
+
logger.debug(request);
|
|
42
|
+
const result = JSON.parse(service.template).items.map(function (project) {
|
|
43
|
+
return {
|
|
44
|
+
id: project.id,
|
|
45
|
+
description: project.description,
|
|
46
|
+
title: project.name,
|
|
47
|
+
url: project.html_url,
|
|
48
|
+
image: `https://via.placeholder.com/150/000000/FFFFFF?text=${encodeURI(project.name)}`
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
service.template = JSON.stringify({
|
|
53
|
+
result
|
|
54
|
+
});
|
|
55
|
+
return super.done(...arguments);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
Class("QCObjectsVersionService", Service, {
|
|
60
|
+
name: "qcobjects_version_service",
|
|
61
|
+
external: true,
|
|
62
|
+
cached: false,
|
|
63
|
+
method: "GET",
|
|
64
|
+
headers: { "Content-Type": "application/json" },
|
|
65
|
+
url: "https://api.github.com/repos/QuickCorp/QCObjects/tags",
|
|
66
|
+
withCredentials: false,
|
|
67
|
+
_new_: () => {
|
|
68
|
+
// service instantiated
|
|
69
|
+
},
|
|
70
|
+
done: ({ service }) => {
|
|
71
|
+
const latest = JSON.parse(service.template)[0];
|
|
72
|
+
service.template = {
|
|
73
|
+
version: latest.name
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
Class("QCObjectsStarsForksService", Service, {
|
|
78
|
+
name: "qcobjects_stars_forks_service",
|
|
79
|
+
external: true,
|
|
80
|
+
cached: false,
|
|
81
|
+
method: "GET",
|
|
82
|
+
headers: { "Content-Type": "application/json" },
|
|
83
|
+
url: "https://api.github.com/repos/QuickCorp/QCObjects",
|
|
84
|
+
withCredentials: false,
|
|
85
|
+
_new_: () => {
|
|
86
|
+
// service instantiated
|
|
87
|
+
},
|
|
88
|
+
done: ({ service }) => {
|
|
89
|
+
const repo = JSON.parse(service.template);
|
|
90
|
+
service.template = {
|
|
91
|
+
forks: repo.forks_count,
|
|
92
|
+
stars: repo.stargazers_count,
|
|
93
|
+
watchers: repo.watchers_count,
|
|
94
|
+
size: Math.round(repo.size / 1000)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
]);
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Package("org.quickcorp.custom.components",[
|
|
2
|
+
Package("org.quickcorp.custom.components", [
|
|
3
|
+
class GitHubGrid extends Component {
|
|
4
|
+
name = "github-grid";
|
|
5
|
+
tplsource = "inline";
|
|
6
|
+
template = `
|
|
7
|
+
<style>
|
|
8
|
+
$layout(landscape,css/components/github-grid-landscape.css)
|
|
9
|
+
$layout(portrait,css/components/github-grid-portrait.css)
|
|
10
|
+
|
|
11
|
+
:host {
|
|
12
|
+
margin:0 auto;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
overflow-y: clip;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
$mapper(github-card,result)
|
|
18
|
+
`;
|
|
19
|
+
},
|
|
3
20
|
|
|
4
21
|
class Component1 extends Component {
|
|
5
22
|
name = "main";
|
|
6
|
-
cached=false;
|
|
7
|
-
controller=null;
|
|
8
|
-
view=null;
|
|
9
|
-
|
|
10
|
-
constructor () {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
}
|
|
23
|
+
cached = false;
|
|
24
|
+
controller = null;
|
|
25
|
+
view = null;
|
|
13
26
|
},
|
|
14
27
|
|
|
15
28
|
class Component2 extends Component {
|
|
16
29
|
name = "component-two";
|
|
17
|
-
propertyName2="propertyValue2";
|
|
18
|
-
|
|
19
|
-
constructor () {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
}
|
|
22
|
-
|
|
30
|
+
propertyName2 = "propertyValue2";
|
|
23
31
|
}
|
|
24
32
|
|
|
25
|
-
|
|
26
33
|
]);
|
|
@@ -4,123 +4,112 @@
|
|
|
4
4
|
|
|
5
5
|
Package("org.quickcorp.custom.controllers", [
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
done() {
|
|
120
|
-
var _ret_ = super.done(...arguments);
|
|
121
|
-
this.loadInstallerButton();
|
|
122
|
-
return _ret_;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
]);
|
|
7
|
+
class MainController extends Controller {
|
|
8
|
+
constructor () {
|
|
9
|
+
logger.debug("Initializing MainController...");
|
|
10
|
+
super(...arguments);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
done () {
|
|
14
|
+
const _ret_ = super.done(...arguments);
|
|
15
|
+
if (!MainController.loaded) {
|
|
16
|
+
const s = _DOMCreateElement("style");
|
|
17
|
+
s.innerHTML = "body, html {margin:0;padding:0;width:100%;height:100%;top:0;bottom:0;left:0;right:0}";
|
|
18
|
+
document.body.append(s);
|
|
19
|
+
logger.debug("MainController loaded");
|
|
20
|
+
MainController.loaded = true;
|
|
21
|
+
}
|
|
22
|
+
return _ret_;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
class PWAController extends Controller {
|
|
27
|
+
constructor () {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
logger.debug("PWAController Element Initialized");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
done () {
|
|
33
|
+
const _ret_ = super.done(...arguments);
|
|
34
|
+
document.head.innerHTML += componentRoot.innerHTML;
|
|
35
|
+
componentRoot.innerHTML = "";
|
|
36
|
+
return _ret_;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
class SideNavController extends Controller {
|
|
41
|
+
constructor () {
|
|
42
|
+
super(...arguments);
|
|
43
|
+
|
|
44
|
+
global.sideNavController = this;
|
|
45
|
+
const controller = this;
|
|
46
|
+
global._sdk_.then(function () {
|
|
47
|
+
controller.effect = new Fade({
|
|
48
|
+
duration: 300
|
|
49
|
+
});
|
|
50
|
+
controller.close();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
open () {
|
|
55
|
+
const controller = this;
|
|
56
|
+
const componentRoot = (controller.component.shadowed) ? (controller.component.shadowRoot) : (controller.component.body);
|
|
57
|
+
if (this.effect != null) {
|
|
58
|
+
this.effect.apply(componentRoot, 0, 1);
|
|
59
|
+
}
|
|
60
|
+
componentRoot.style.width = "100%";
|
|
61
|
+
componentRoot.style.overflowX = "visible";
|
|
62
|
+
if (Object.hasOwnProperty.call(componentRoot, "parentElement") && typeof componentRoot.parentElement !== "undefined") {
|
|
63
|
+
componentRoot.parentElement.subelements(".navbtn")[0].style.display = "none";
|
|
64
|
+
componentRoot.parentElement.subelements(".closebtn")[0].style.display = "block";
|
|
65
|
+
}
|
|
66
|
+
this.visibility = true;
|
|
67
|
+
return this.visibility;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
close () {
|
|
71
|
+
const controller = this;
|
|
72
|
+
const componentRoot = (controller.component.shadowed) ? (controller.component.shadowRoot) : (controller.component.body);
|
|
73
|
+
if (this.effect != null) {
|
|
74
|
+
this.effect.apply(componentRoot, 1, 0);
|
|
75
|
+
}
|
|
76
|
+
componentRoot.style.width = "0px";
|
|
77
|
+
componentRoot.style.overflowX = "hidden";
|
|
78
|
+
if (Object.hasOwnProperty.call(componentRoot, "parentElement") && typeof componentRoot.parentElement !== "undefined") {
|
|
79
|
+
componentRoot.parentElement.subelements(".navbtn")[0].style.display = "block";
|
|
80
|
+
componentRoot.parentElement.subelements(".closebtn")[0].style.display = "none";
|
|
81
|
+
}
|
|
82
|
+
this.visibility = false;
|
|
83
|
+
return this.visibility;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
toggle () {
|
|
87
|
+
if (this.visibility) {
|
|
88
|
+
this.close();
|
|
89
|
+
} else {
|
|
90
|
+
this.open();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
class HeaderController extends Controller {
|
|
96
|
+
loadInstallerButton () {
|
|
97
|
+
const controller = this;
|
|
98
|
+
const componentRoot = (controller.component.shadowed) ? (controller.component.shadowRoot) : (controller.component.body);
|
|
99
|
+
componentRoot.subelements("#installerbutton").map(
|
|
100
|
+
function (element) {
|
|
101
|
+
controller.installer = New(Installer, {
|
|
102
|
+
root: element
|
|
103
|
+
});
|
|
104
|
+
return element;
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
done () {
|
|
110
|
+
const _ret_ = super.done(...arguments);
|
|
111
|
+
this.loadInstallerButton();
|
|
112
|
+
return _ret_;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Package("org.quickcorp.custom.effects",[
|
|
2
|
+
Package("org.quickcorp.custom.effects", [
|
|
3
3
|
|
|
4
4
|
class MainTransitionEffect extends TransitionEffect {
|
|
5
|
-
duration=780;
|
|
6
|
-
defaultParams={
|
|
7
|
-
alphaFrom:0,
|
|
8
|
-
alphaTo:1
|
|
5
|
+
duration = 780;
|
|
6
|
+
defaultParams = {
|
|
7
|
+
alphaFrom: 0,
|
|
8
|
+
alphaTo: 1
|
|
9
9
|
};
|
|
10
|
-
effects=["Fade","MoveYInFromBottom"];
|
|
11
|
-
fitToHeight=true;
|
|
12
|
-
|
|
13
|
-
constructor (){
|
|
14
|
-
super(...arguments);
|
|
15
|
-
}
|
|
16
10
|
|
|
11
|
+
effects = ["Fade", "MoveYInFromBottom"];
|
|
12
|
+
fitToHeight = true;
|
|
17
13
|
}
|
|
18
14
|
]);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Package("org.quickcorp.custom.models",[
|
|
2
|
+
Package("org.quickcorp.custom.models", [
|
|
3
3
|
|
|
4
4
|
class ContactVO extends VO {
|
|
5
|
-
first_name="";
|
|
6
|
-
last_name="";
|
|
7
|
-
address="";
|
|
8
|
-
postalCode="";
|
|
9
|
-
city="";
|
|
10
|
-
country="";
|
|
11
|
-
email="";
|
|
12
|
-
phone="";
|
|
13
|
-
|
|
5
|
+
first_name = "";
|
|
6
|
+
last_name = "";
|
|
7
|
+
address = "";
|
|
8
|
+
postalCode = "";
|
|
9
|
+
city = "";
|
|
10
|
+
country = "";
|
|
11
|
+
email = "";
|
|
12
|
+
phone = "";
|
|
14
13
|
}
|
|
15
14
|
]);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Package("org.quickcorp.custom.views",[
|
|
2
|
+
Package("org.quickcorp.custom.views", [
|
|
3
3
|
|
|
4
4
|
class CardView extends View {
|
|
5
|
-
|
|
6
|
-
super(...arguments);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
component.body.style.display="block";
|
|
12
|
-
component.body.style.width="100px";
|
|
13
|
-
component.body.style.height="100px";
|
|
5
|
+
done () {
|
|
6
|
+
const _ret_ = super.done(...arguments);
|
|
7
|
+
const component = this.component;
|
|
8
|
+
component.body.style.display = "block";
|
|
9
|
+
component.body.style.width = "100px";
|
|
10
|
+
component.body.style.height = "100px";
|
|
14
11
|
return _ret_;
|
|
15
12
|
}
|
|
16
|
-
|
|
17
13
|
}
|
|
18
14
|
]);
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjectsnewapp",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.7",
|
|
4
4
|
"description": "App template for New App in QCObjects",
|
|
5
5
|
"main": "js/init.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "(npx eslint *.js js/*.js js/packages/*.js --fix) && (npx jasmine)",
|
|
7
|
+
"test": "((npx eslint *.js js/*.js js/packages/*.js spec/*.js --fix) && (npx jasmine)) || exit 0",
|
|
8
8
|
"sync": "git add . && git commit -am ",
|
|
9
9
|
"preversion": "npm i --upgrade && npm test",
|
|
10
10
|
"postversion": "git push && git push --tags",
|
|
11
11
|
"coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
|
|
12
|
-
"start": "
|
|
12
|
+
"start": "npm run createcert && npm run serve",
|
|
13
13
|
"serve": "node app.js",
|
|
14
14
|
"server": "node app.js",
|
|
15
15
|
"collab": "node -e \"require('qcobjects-cli/qcobjects-collab')\"",
|
|
@@ -32,18 +32,21 @@
|
|
|
32
32
|
"author": "Jean Machuca (correojean@gmail.com)",
|
|
33
33
|
"license": "LGPL-3.0-or-later",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"eslint": "^8.
|
|
36
|
-
"eslint-config-qcobjects": "^0.0.
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
35
|
+
"eslint": "^8.38.0",
|
|
36
|
+
"eslint-config-qcobjects": "^0.0.26",
|
|
37
|
+
"eslint-config-semistandard": "^17.0.0",
|
|
38
|
+
"eslint-config-standard": "^17.0.0",
|
|
39
|
+
"eslint-plugin-import": "^2.27.5",
|
|
40
|
+
"eslint-plugin-n": "^15.7.0",
|
|
41
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
42
|
+
"jasmine": "^3.99.0"
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {
|
|
42
45
|
"grunt": "^1.4.1",
|
|
43
46
|
"grunt-contrib-jasmine": "^4.0.0",
|
|
44
47
|
"nyc": "^15.1.0",
|
|
45
|
-
"qcobjects": "^2.4.
|
|
46
|
-
"qcobjects-cli": "^2.4.
|
|
48
|
+
"qcobjects": "^2.4.55",
|
|
49
|
+
"qcobjects-cli": "^2.4.32",
|
|
47
50
|
"qcobjects-sdk": "^2.4.28"
|
|
48
51
|
},
|
|
49
52
|
"engines": {
|