qcobjectsnewapp 2.4.5 → 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 +11 -1
- package/VERSION +1 -1
- package/config.json +38 -0
- package/js/init.js +7 -8
- package/js/packages/com.qcobjects.installer.js +10 -13
- package/js/packages/com.qcobjects.services.github.js +89 -108
- package/js/packages/org.quickcorp.custom.components.js +5 -20
- 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 -1
- 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/.eslintrc.json +0 -8
package/.eslintrc.js
ADDED
package/.gitlab-ci.yml
CHANGED
package/Dockerfile
CHANGED
|
@@ -1,18 +1,63 @@
|
|
|
1
1
|
FROM quickcorp/qcobjects:latest
|
|
2
|
+
###
|
|
3
|
+
# QCObjects Framework
|
|
4
|
+
# ________________
|
|
5
|
+
#
|
|
6
|
+
# Author: Jean Machuca <correojean@gmail.com>
|
|
7
|
+
#
|
|
8
|
+
# Cross Browser Javascript Framework for MVC Patterns
|
|
9
|
+
# QuickCorp/QCObjects is licensed under the
|
|
10
|
+
# GNU Lesser General Public License v3.0
|
|
11
|
+
# [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
|
|
12
|
+
#
|
|
13
|
+
# Permissions of this copyleft license are conditioned on making available
|
|
14
|
+
# complete source code of licensed works and modifications under the same
|
|
15
|
+
# license or the GNU GPLv3. Copyright and license notices must be preserved.
|
|
16
|
+
# Contributors provide an express grant of patent rights. However, a larger
|
|
17
|
+
# work using the licensed work through interfaces provided by the licensed
|
|
18
|
+
# work may be distributed under different terms and without source code for
|
|
19
|
+
# the larger work.
|
|
20
|
+
#
|
|
21
|
+
# Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
|
|
22
|
+
#
|
|
23
|
+
# Everyone is permitted to copy and distribute verbatim copies of this
|
|
24
|
+
# license document, but changing it is not allowed.
|
|
25
|
+
###
|
|
26
|
+
USER root
|
|
2
27
|
|
|
3
|
-
|
|
28
|
+
ENV XDG_RUNTIME_DIR $(id -u)
|
|
29
|
+
ENV container docker
|
|
30
|
+
ENV LC_ALL C
|
|
31
|
+
ENV DEBIAN_FRONTEND noninteractive
|
|
4
32
|
|
|
5
|
-
|
|
6
|
-
ENV
|
|
33
|
+
LABEL MAINTAINER "Jean Machuca <jean@qcobjects.com>"
|
|
34
|
+
ENV container docker
|
|
7
35
|
|
|
8
|
-
|
|
9
|
-
RUN npm install
|
|
36
|
+
RUN npm i -g qcobjects qcobjects-sdk qcobjects-cli
|
|
10
37
|
|
|
11
|
-
|
|
38
|
+
USER qcobjects
|
|
12
39
|
|
|
13
|
-
|
|
14
|
-
|
|
40
|
+
#Configure the internal user permissions
|
|
41
|
+
RUN mkdir -p /home/qcobjects/app && chown -R qcobjects:qcobjects /home/qcobjects/app
|
|
42
|
+
|
|
43
|
+
#Setting the work directory
|
|
44
|
+
WORKDIR /home/qcobjects/app
|
|
45
|
+
ENV DOCUMENT_ROOT /home/qcobjects/app/
|
|
46
|
+
ENV DATA_PATH $DOCUMENT_ROOT/data/
|
|
47
|
+
COPY package*.json ./
|
|
48
|
+
|
|
49
|
+
#Run the initial install init scripts for jasmine and cache verify
|
|
50
|
+
#RUN jasmine init
|
|
51
|
+
RUN npm cache verify
|
|
52
|
+
RUN npm ci --save --only=production
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
USER root
|
|
56
|
+
|
|
57
|
+
# Bundle app source
|
|
58
|
+
COPY --chown=qcobjects:qcobjects . .
|
|
59
|
+
|
|
60
|
+
EXPOSE 8080:8080
|
|
61
|
+
EXPOSE 8443:8443
|
|
15
62
|
|
|
16
|
-
EXPOSE $PORT_HTTP
|
|
17
|
-
EXPOSE $PORT_HTTPS
|
|
18
63
|
CMD [ "npm", "start" ]
|
package/README.md
CHANGED
|
@@ -148,4 +148,14 @@ npm run gae-server
|
|
|
148
148
|
```shell
|
|
149
149
|
# This command will be implemented in the future for TypeScript
|
|
150
150
|
npm run build
|
|
151
|
-
```
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
# Docker installation
|
|
154
|
+
|
|
155
|
+
To run this app with docker, execute the following command:
|
|
156
|
+
|
|
157
|
+
```shell
|
|
158
|
+
docker run -p 8080:8080 -p 8443:8443 --name qcobjects-newapp -d qcobjects/qcobjects-newapp
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Then go to [https://127.0.0.1:8443/](https://127.0.0.1:8443/)
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.7
|
package/config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"devmode":"debug",
|
|
3
|
+
"autodiscover":true,
|
|
4
|
+
"cacheControl":"max-age=31536000",
|
|
5
|
+
"relativeImportPath":"js/packages/",
|
|
6
|
+
"serverPortHTTP": "8080",
|
|
7
|
+
"serverPortHTTPS": "8443",
|
|
8
|
+
"useLocalSDK":true,
|
|
9
|
+
"backend":{
|
|
10
|
+
"routes":[
|
|
11
|
+
{
|
|
12
|
+
"name":"QCObjects-SDK.js for demo folder",
|
|
13
|
+
"description":"Redirection of QCObjects SDK",
|
|
14
|
+
"path":"^/demo-tests/QCObjects-SDK.js$",
|
|
15
|
+
"microservice":"com.qcobjects.backend.microservice.static",
|
|
16
|
+
"redirect_to": "./node_modules/qcobjects-sdk/QCObjects-SDK.js",
|
|
17
|
+
"responseHeaders":{
|
|
18
|
+
},
|
|
19
|
+
"cors":{
|
|
20
|
+
"allow_origins":"*"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name":"QCObjects-SDK Components for demo folder",
|
|
25
|
+
"description":"Redirection of QCObjects SDK",
|
|
26
|
+
"path":"^/demo-tests/qcobjects-sdk/(.*)$",
|
|
27
|
+
"microservice":"com.qcobjects.backend.microservice.static",
|
|
28
|
+
"redirect_to": "./node_modules/qcobjects-sdk/$1",
|
|
29
|
+
"responseHeaders":{},
|
|
30
|
+
"cors":{
|
|
31
|
+
"allow_origins":"*"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
package/js/init.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
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 */
|
|
27
|
+
// import "../QCObjects.js"; /* uncomment this line to load QCObjects from backend */
|
|
28
28
|
import "https://cdnjs.cloudflare.com/ajax/libs/qcobjects/2.4.52/QCObjects.js"; /* uncomment this line to load QCObjects from cdnjs */
|
|
29
29
|
|
|
30
30
|
/*
|
|
@@ -38,21 +38,20 @@ CONFIG.set("componentsBasePath", "templates/components/");
|
|
|
38
38
|
CONFIG.set("delayForReady", 1); // delay to wait before executing the first ready event, it includes imports
|
|
39
39
|
CONFIG.set("preserveComponentBodyTag", false); // don't use <componentBody></componentBody> tag
|
|
40
40
|
CONFIG.set("useConfigService", false); // Load settings from config.json
|
|
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
|
|
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
|
|
46
46
|
|
|
47
47
|
// if Component.cached is true, all the Class('Component') declarations will save the template in a localStorage cache
|
|
48
48
|
// until a cached=false attribute is found in a <component> html declaration
|
|
49
|
-
Component.cached=true;
|
|
49
|
+
Component.cached = true;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Main import sentence.
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
|
-
|
|
56
55
|
Import("org.quickcorp.custom"); // this will load js/packages/org.quickcorp.custom.js file
|
|
57
56
|
|
|
58
57
|
// eslint-disable-next-line no-undef
|
|
@@ -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
|
]);
|
|
@@ -1,118 +1,99 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Package("com.qcobjects.services.github", [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
id: project.id,
|
|
25
|
-
description: project.description,
|
|
26
|
-
title: project.name,
|
|
27
|
-
url: project.html_url,
|
|
28
|
-
image: `https://via.placeholder.com/150/000000/FFFFFF?text=${encodeURI(project.name)}`
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
service.template = JSON.stringify({
|
|
33
|
-
result: result
|
|
34
|
-
});
|
|
35
|
-
return super.done(...arguments);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
class GitHubTagService extends JSONService {
|
|
42
|
-
name = "myservice";
|
|
43
|
-
external = true;
|
|
44
|
-
cached = false;
|
|
45
|
-
method = "GET";
|
|
46
|
-
headers = { "Content-Type": "application/json" };
|
|
47
|
-
url = "https://api.github.com/search/repositories?q=qcobjects";
|
|
48
|
-
withCredentials = false;
|
|
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
|
+
});
|
|
49
23
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
24
|
+
service.template = JSON.stringify({
|
|
25
|
+
result
|
|
26
|
+
});
|
|
27
|
+
return super.done(...arguments);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
55
30
|
|
|
56
|
-
|
|
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;
|
|
57
39
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
+
});
|
|
69
51
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
52
|
+
service.template = JSON.stringify({
|
|
53
|
+
result
|
|
54
|
+
});
|
|
55
|
+
return super.done(...arguments);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
76
58
|
|
|
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
|
-
|
|
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
|
+
}
|
|
115
97
|
})
|
|
116
98
|
|
|
117
|
-
|
|
118
|
-
|
|
99
|
+
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Package("org.quickcorp.custom.components",[
|
|
2
|
+
Package("org.quickcorp.custom.components", [
|
|
3
3
|
class GitHubGrid extends Component {
|
|
4
4
|
name = "github-grid";
|
|
5
5
|
tplsource = "inline";
|
|
@@ -16,33 +16,18 @@ Package("org.quickcorp.custom.components",[
|
|
|
16
16
|
</style>
|
|
17
17
|
$mapper(github-card,result)
|
|
18
18
|
`;
|
|
19
|
-
|
|
20
|
-
constructor (){
|
|
21
|
-
super(...arguments);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
19
|
},
|
|
25
20
|
|
|
26
21
|
class Component1 extends Component {
|
|
27
22
|
name = "main";
|
|
28
|
-
cached=false;
|
|
29
|
-
controller=null;
|
|
30
|
-
view=null;
|
|
31
|
-
|
|
32
|
-
constructor () {
|
|
33
|
-
super(...arguments);
|
|
34
|
-
}
|
|
23
|
+
cached = false;
|
|
24
|
+
controller = null;
|
|
25
|
+
view = null;
|
|
35
26
|
},
|
|
36
27
|
|
|
37
28
|
class Component2 extends Component {
|
|
38
29
|
name = "component-two";
|
|
39
|
-
propertyName2="propertyValue2";
|
|
40
|
-
|
|
41
|
-
constructor () {
|
|
42
|
-
super(...arguments);
|
|
43
|
-
}
|
|
44
|
-
|
|
30
|
+
propertyName2 = "propertyValue2";
|
|
45
31
|
}
|
|
46
32
|
|
|
47
|
-
|
|
48
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": {
|
package/spec/testsSpec.js
CHANGED
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/* eslint-disable no-undef */
|
|
2
3
|
|
|
3
|
-
describe(
|
|
4
|
-
require(
|
|
4
|
+
describe("QCObjects Main Test", function () {
|
|
5
|
+
require("qcobjects");
|
|
5
6
|
|
|
6
|
-
it(
|
|
7
|
-
Class(
|
|
8
|
-
_new_: (o) => {
|
|
9
|
-
let main = this
|
|
10
|
-
}
|
|
11
|
-
})
|
|
7
|
+
it("Class Declaration Test Spec", function () {
|
|
8
|
+
Class("Main", Object, {});
|
|
12
9
|
|
|
13
|
-
expect(Main).toEqual(ClassFactory(
|
|
14
|
-
logger.debug(
|
|
10
|
+
expect(Main).toEqual(ClassFactory("Main"));
|
|
11
|
+
logger.debug("Class Declaration Test Spec... OK");
|
|
15
12
|
});
|
|
16
13
|
|
|
17
|
-
it(
|
|
18
|
-
|
|
19
|
-
expect(typeof __main__.__instanceID).toEqual(
|
|
20
|
-
expect(__main__.__classType).toEqual(
|
|
21
|
-
logger.debug(
|
|
14
|
+
it("Main intance Test Spec", function () {
|
|
15
|
+
const __main__ = New(Main, {});
|
|
16
|
+
expect(typeof __main__.__instanceID).toEqual("number");
|
|
17
|
+
expect(__main__.__classType).toEqual("Main");
|
|
18
|
+
logger.debug("Main intance Test Spec... OK");
|
|
22
19
|
});
|
|
23
20
|
|
|
24
|
-
it(
|
|
25
|
-
expect(Component).toEqual(ClassFactory(
|
|
26
|
-
logger.debug(
|
|
21
|
+
it("Existence of Component Class", function () {
|
|
22
|
+
expect(Component).toEqual(ClassFactory("Component"));
|
|
23
|
+
logger.debug("Existence of Component Class... OK");
|
|
27
24
|
});
|
|
28
25
|
|
|
29
|
-
it(
|
|
30
|
-
expect(Effect).toEqual(ClassFactory(
|
|
31
|
-
logger.debug(
|
|
26
|
+
it("Existence of Effect Class", function () {
|
|
27
|
+
expect(Effect).toEqual(ClassFactory("Effect"));
|
|
28
|
+
logger.debug("Existence of Effect Class... OK");
|
|
32
29
|
});
|
|
33
30
|
|
|
34
|
-
it(
|
|
35
|
-
expect(typeof global.__definition).toEqual(
|
|
36
|
-
logger.debug(
|
|
31
|
+
it("global as QCObjects global", function () {
|
|
32
|
+
expect(typeof global.__definition).toEqual("object");
|
|
33
|
+
logger.debug("global as QCObjects global... OK");
|
|
37
34
|
});
|
|
38
35
|
|
|
39
|
-
it(
|
|
40
|
-
expect(
|
|
41
|
-
logger.debug(
|
|
36
|
+
it("Existence of QCObjects SDK", function () {
|
|
37
|
+
expect(Object.hasOwnProperty.call(global, "_sdk_")).toEqual(true);
|
|
38
|
+
logger.debug("Existence of QCObjects SDK... OK");
|
|
42
39
|
});
|
|
43
|
-
|
|
44
|
-
})
|
|
40
|
+
});
|
package/sw.js
CHANGED
|
@@ -25,130 +25,130 @@
|
|
|
25
25
|
"use strict";
|
|
26
26
|
const version = "1.2.93";
|
|
27
27
|
const appName = "qcobjectsnewapp";
|
|
28
|
-
const cacheSufix = (Math.round(Date.now()/(1000*3600))).toString(); // 1 hour
|
|
28
|
+
const cacheSufix = (Math.round(Date.now() / (1000 * 3600))).toString(); // 1 hour
|
|
29
29
|
const cacheName = `qcobjects-app-${appName}-${version}-${cacheSufix}`;
|
|
30
|
-
const
|
|
30
|
+
const startUrl = "/?homescreen=1";
|
|
31
31
|
caches.delete(cacheName); // force to reload cache for the first time the sw is loaded
|
|
32
32
|
self.addEventListener("install", e => {
|
|
33
33
|
e.waitUntil(
|
|
34
34
|
caches.open(cacheName).then(cache => {
|
|
35
|
-
return cache.addAll([`${
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
35
|
+
return cache.addAll([`${startUrl}`,
|
|
36
|
+
"/",
|
|
37
|
+
"Dockerfile",
|
|
38
|
+
"LICENSE.txt",
|
|
39
|
+
"README.md",
|
|
40
|
+
"VERSION",
|
|
41
|
+
"app.js",
|
|
42
|
+
"coverage/lcov-report/base.css",
|
|
43
|
+
"coverage/lcov-report/block-navigation.js",
|
|
44
|
+
"coverage/lcov-report/favicon.png",
|
|
45
|
+
"coverage/lcov-report/index.html",
|
|
46
|
+
"coverage/lcov-report/prettify.css",
|
|
47
|
+
"coverage/lcov-report/prettify.js",
|
|
48
|
+
"coverage/lcov-report/sort-arrow-sprite.png",
|
|
49
|
+
"coverage/lcov-report/sorter.js",
|
|
50
|
+
"coverage/lcov-report/testsSpec.js.html",
|
|
51
|
+
"coverage/lcov.info",
|
|
52
|
+
"css/components/button.css",
|
|
53
|
+
"css/components/card.css",
|
|
54
|
+
"css/components/hero/hero-call-to-action.css",
|
|
55
|
+
"css/components/hero/hero-overlay.css",
|
|
56
|
+
"css/components/hero/hero-two-column-form.css",
|
|
57
|
+
"css/components/modal.css",
|
|
58
|
+
"css/desktop/container.css",
|
|
59
|
+
"css/desktop/content.css",
|
|
60
|
+
"css/desktop/footer.css",
|
|
61
|
+
"css/desktop/index.css",
|
|
62
|
+
"css/desktop/navbar.css",
|
|
63
|
+
"css/desktop/sidebar.css",
|
|
64
|
+
"css/index.css",
|
|
65
|
+
"css/mobile/content.css",
|
|
66
|
+
"css/mobile/footer.css",
|
|
67
|
+
"css/mobile/index.css",
|
|
68
|
+
"css/mobile/navbar.css",
|
|
69
|
+
"css/mobile/sidebar.css",
|
|
70
|
+
"css/modern-base.css",
|
|
71
|
+
"css/theme/basic/style.css",
|
|
72
|
+
"css/theme/cyan/style.css",
|
|
73
|
+
"css/theme/redlight/style.css",
|
|
74
|
+
"css/theme/xtra/style.css",
|
|
75
|
+
"favicon.ico",
|
|
76
|
+
"humans.txt",
|
|
77
|
+
"img/Q_web copy.png",
|
|
78
|
+
"img/Q_web-white.png",
|
|
79
|
+
"img/Q_web.png",
|
|
80
|
+
"img/Q_web.svg",
|
|
81
|
+
"img/icons/icon-128x128.png",
|
|
82
|
+
"img/icons/icon-144x144.png",
|
|
83
|
+
"img/icons/icon-152x152.png",
|
|
84
|
+
"img/icons/icon-192x192.png",
|
|
85
|
+
"img/icons/icon-384x384.png",
|
|
86
|
+
"img/icons/icon-512x512.png",
|
|
87
|
+
"img/icons/icon-72x72.png",
|
|
88
|
+
"img/icons/icon-96x96.png",
|
|
89
|
+
"img/logo-qcobjects-white-powered-quickcorp.svg",
|
|
90
|
+
"img/logo-qcobjects-white.svg",
|
|
91
|
+
"img/logo.png",
|
|
92
|
+
"img/placeholder.svg",
|
|
93
|
+
"img/screenshots/screenshot1.png",
|
|
94
|
+
"img/screenshots/screenshot1.webp",
|
|
95
|
+
"img/screenshots/screenshot2.png",
|
|
96
|
+
"img/screenshots/screenshot2.webp",
|
|
97
|
+
"index.html",
|
|
98
|
+
"js/init.js",
|
|
99
|
+
"js/packages/com.qcobjects.installer.js",
|
|
100
|
+
"js/packages/org.quickcorp.custom.components.js",
|
|
101
|
+
"js/packages/org.quickcorp.custom.controllers.js",
|
|
102
|
+
"js/packages/org.quickcorp.custom.effects.js",
|
|
103
|
+
"js/packages/org.quickcorp.custom.js",
|
|
104
|
+
"js/packages/org.quickcorp.custom.models.js",
|
|
105
|
+
"js/packages/org.quickcorp.custom.views.js",
|
|
106
|
+
"manifest.json",
|
|
107
|
+
"qcobjectsnewapp.iml",
|
|
108
|
+
"robots.txt",
|
|
109
|
+
"spec/support/jasmine.json",
|
|
110
|
+
"spec/testsSpec.js",
|
|
111
|
+
"templates/components/article1.tpl.html",
|
|
112
|
+
"templates/components/article2.tpl.html",
|
|
113
|
+
"templates/components/article3.tpl.html",
|
|
114
|
+
"templates/components/article4.tpl.html",
|
|
115
|
+
"templates/components/blank.tpl.html",
|
|
116
|
+
"templates/components/card.tpl.html",
|
|
117
|
+
"templates/components/contentblock.tpl.html",
|
|
118
|
+
"templates/components/footer.tpl.html",
|
|
119
|
+
"templates/components/footer2.tpl.html",
|
|
120
|
+
"templates/components/header.tpl.html",
|
|
121
|
+
"templates/components/hero/hero-call-to-action.tpl.html",
|
|
122
|
+
"templates/components/hero/hero-overlay.tpl.html",
|
|
123
|
+
"templates/components/hero/hero-two-column-form.tpl.html",
|
|
124
|
+
"templates/components/install-button.tpl.html",
|
|
125
|
+
"templates/components/layout-basic.tpl.html",
|
|
126
|
+
"templates/components/loading.tpl.html",
|
|
127
|
+
"templates/components/loadingfooter.tpl.html",
|
|
128
|
+
"templates/components/login-button.tpl.html",
|
|
129
|
+
"templates/components/login2.tpl.html",
|
|
130
|
+
"templates/components/loginform.tpl.html",
|
|
131
|
+
"templates/components/modal.tpl.html",
|
|
132
|
+
"templates/components/nav.tpl.html",
|
|
133
|
+
"templates/components/pages/page1.tpl.html",
|
|
134
|
+
"templates/components/pages/page2.tpl.html",
|
|
135
|
+
"templates/components/pages/page3.tpl.html",
|
|
136
|
+
"templates/components/product.tpl.html",
|
|
137
|
+
"templates/components/profile.tpl.html",
|
|
138
|
+
"templates/components/section1.tpl.html",
|
|
139
|
+
"templates/components/section2.tpl.html",
|
|
140
|
+
"templates/components/shadowed-card.tpl.html",
|
|
141
|
+
"templates/components/signin-button.tpl.html",
|
|
142
|
+
"templates/components/signup-form.tpl.html",
|
|
143
|
+
"templates/components/signup.tpl.html",
|
|
144
|
+
"templates/components/signupbuttons.tpl.html",
|
|
145
|
+
"templates/components/signupform.tpl.html",
|
|
146
|
+
"templates/components/signuppage.tpl.html",
|
|
147
|
+
"templates/components/signupsuccessful.tpl.html",
|
|
148
|
+
"templates/components/signupsuccessfulfooter.tpl.html",
|
|
149
|
+
"templates/components/splashscreen.tpl.html",
|
|
150
|
+
"templates/components/topmenu.tpl.html"])
|
|
151
|
+
.then(() => self.skipWaiting());
|
|
152
152
|
})
|
|
153
153
|
);
|
|
154
154
|
});
|
|
@@ -160,9 +160,9 @@ self.addEventListener("activate", event => {
|
|
|
160
160
|
self.addEventListener("fetch", event => {
|
|
161
161
|
event.respondWith(
|
|
162
162
|
caches.open(cacheName)
|
|
163
|
-
.then(cache => cache.match(event.request, {ignoreSearch: true}))
|
|
163
|
+
.then(cache => cache.match(event.request, { ignoreSearch: true }))
|
|
164
164
|
.then(response => {
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
return response || fetch(event.request);
|
|
166
|
+
})
|
|
167
167
|
);
|
|
168
168
|
});
|