qcobjectsnewapp 1.2.85 → 1.2.92
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/.github/FUNDING.yml +12 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/.github/ISSUE_TEMPLATE/custom.md +10 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/ISSUE_TEMPLATE/issue-template.md +33 -0
- package/.github/workflows/codeql-analysis.yml +71 -0
- package/.github/workflows/npmpublish.yml +38 -0
- package/VERSION +1 -1
- package/css/components/button.css +34 -33
- package/css/components/card.css +16 -14
- package/css/components/hero/hero-call-to-action.css +5 -5
- package/css/components/hero/hero-overlay.css +4 -4
- package/css/components/hero/hero-two-column-form.css +5 -5
- package/css/components/modal.css +9 -7
- package/css/desktop/container.css +10 -10
- package/css/desktop/content.css +9 -9
- package/css/desktop/footer.css +1 -1
- package/css/desktop/index.css +1 -1
- package/css/desktop/navbar.css +15 -11
- package/css/desktop/sidebar.css +1 -1
- package/css/index.css +122 -130
- package/css/mobile/content.css +13 -13
- package/css/mobile/footer.css +1 -1
- package/css/mobile/navbar.css +40 -30
- package/css/mobile/sidebar.css +1 -1
- package/css/modern-base.css +123 -108
- package/css/theme/basic/style.css +37 -35
- package/css/theme/cyan/style.css +38 -36
- package/img/logo-qcobjects-white-powered-quickcorp.svg +176 -0
- package/img/logo-qcobjects-white.svg +1 -176
- package/index.html +1 -1
- package/js/init.js +1 -0
- package/js/packages/com.qcobjects.installer.js +65 -0
- package/js/packages/org.quickcorp.custom.controllers.js +102 -110
- package/js/packages/org.quickcorp.custom.js +1 -0
- package/js/packages/org.quickcorp.custom.views.js +0 -1
- package/manifest.json +15 -9
- package/package.json +9 -9
- package/sw.js +1 -1
- package/templates/components/layout-basic.tpl.html +2 -0
- package/js/packages/installer.js +0 -47
|
@@ -1,136 +1,128 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
/* eslint-disable no-unused-vars */
|
|
1
3
|
"use strict";
|
|
2
|
-
Import ("installer");
|
|
3
4
|
|
|
4
|
-
Package("org.quickcorp.custom.controllers",[
|
|
5
|
-
Class("MainController",Controller,{
|
|
6
|
-
dependencies:[],
|
|
7
|
-
component:null,
|
|
8
|
-
_new_
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//TODO: Implement
|
|
5
|
+
Package("org.quickcorp.custom.controllers", [
|
|
6
|
+
Class("MainController", Controller, {
|
|
7
|
+
dependencies: [],
|
|
8
|
+
component: null,
|
|
9
|
+
_new_(o) {
|
|
10
|
+
this.__new__(o);
|
|
11
|
+
//TODO: Implement
|
|
12
12
|
},
|
|
13
|
-
done:function(){
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/*
|
|
23
|
-
Timer.thread({
|
|
24
|
-
duration:300,
|
|
25
|
-
timing(timeFraction,elapsed){
|
|
26
|
-
return timeFraction;
|
|
27
|
-
},
|
|
28
|
-
intervalInterceptor(progress){
|
|
29
|
-
if (progress>=100 && !Component._bindroute.__assigned){
|
|
30
|
-
controller.component.route();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
*/
|
|
35
|
-
|
|
13
|
+
done: function () {
|
|
14
|
+
if (!MainController.loaded) {
|
|
15
|
+
var s = _DOMCreateElement("style");
|
|
16
|
+
s.innerHTML = "body, html {margin:0;padding:0;width:100%;height:100%;top:0;bottom:0;left:0;right:0}";
|
|
17
|
+
document.body.append(s);
|
|
18
|
+
MainController.loaded = true;
|
|
19
|
+
}
|
|
36
20
|
|
|
37
21
|
}
|
|
38
22
|
}),
|
|
39
|
-
Class("PWAController",Object,{
|
|
40
|
-
component:null,
|
|
41
|
-
_new_
|
|
23
|
+
Class("PWAController", Object, {
|
|
24
|
+
component: null,
|
|
25
|
+
_new_(o) {
|
|
42
26
|
logger.debug("PWAController Element Initialized");
|
|
43
27
|
this.component = o.component;
|
|
44
28
|
},
|
|
45
|
-
done: function (){
|
|
46
|
-
document.head.innerHTML+=
|
|
47
|
-
|
|
29
|
+
done: function () {
|
|
30
|
+
document.head.innerHTML += componentRoot.innerHTML;
|
|
31
|
+
componentRoot.innerHTML = "";
|
|
48
32
|
}
|
|
49
33
|
}),
|
|
50
|
-
Class("SideNavController",Object,{
|
|
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
|
-
|
|
34
|
+
Class("SideNavController", Object, {
|
|
35
|
+
dependencies: [],
|
|
36
|
+
component: null,
|
|
37
|
+
visibility: false,
|
|
38
|
+
effect: null,
|
|
39
|
+
open() {
|
|
40
|
+
var controller = this;
|
|
41
|
+
var componentRoot = (controller.component.shadowed)?(controller.component.shadowRoot):(controller.component.body);
|
|
42
|
+
if (this.effect != null) {
|
|
43
|
+
this.effect.apply(componentRoot, 0, 1);
|
|
44
|
+
}
|
|
45
|
+
componentRoot.style.width = "100%";
|
|
46
|
+
componentRoot.style.overflowX = "visible";
|
|
47
|
+
componentRoot.parentElement.subelements(".navbtn")[0].style.display = "none";
|
|
48
|
+
componentRoot.parentElement.subelements(".closebtn")[0].style.display = "block";
|
|
49
|
+
this.visibility = true;
|
|
50
|
+
return this.visibility;
|
|
51
|
+
},
|
|
52
|
+
close() {
|
|
53
|
+
var controller = this;
|
|
54
|
+
var componentRoot = (controller.component.shadowed)?(controller.component.shadowRoot):(controller.component.body);
|
|
55
|
+
if (this.effect != null) {
|
|
56
|
+
this.effect.apply(componentRoot, 1, 0);
|
|
57
|
+
}
|
|
58
|
+
componentRoot.style.width = "0px";
|
|
59
|
+
componentRoot.style.overflowX = "hidden";
|
|
60
|
+
componentRoot.parentElement.subelements(".navbtn")[0].style.display = "block";
|
|
61
|
+
componentRoot.parentElement.subelements(".closebtn")[0].style.display = "none";
|
|
62
|
+
this.visibility = false;
|
|
63
|
+
return this.visibility;
|
|
64
|
+
},
|
|
65
|
+
toggle() {
|
|
66
|
+
if (this.visibility) {
|
|
67
|
+
this.close();
|
|
68
|
+
} else {
|
|
69
|
+
this.open();
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
_new_(o) {
|
|
73
|
+
this.__new__(o);
|
|
86
74
|
global.sideNavController = this;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
75
|
+
var controller = this;
|
|
76
|
+
global._sdk_.then(function () {
|
|
77
|
+
controller.effect = New(Fade, {
|
|
78
|
+
duration: 300
|
|
79
|
+
});
|
|
80
|
+
controller.close();
|
|
81
|
+
});
|
|
82
|
+
//TODO: Implement
|
|
93
83
|
|
|
94
84
|
},
|
|
95
|
-
done: function (){
|
|
96
|
-
}
|
|
85
|
+
done: function () {}
|
|
97
86
|
}),
|
|
98
|
-
Class("HeaderController",Controller,{
|
|
99
|
-
dependencies:[],
|
|
100
|
-
component:null,
|
|
101
|
-
installer:null,
|
|
102
|
-
loadInstallerButton
|
|
87
|
+
Class("HeaderController", Controller, {
|
|
88
|
+
dependencies: [],
|
|
89
|
+
component: null,
|
|
90
|
+
installer: null,
|
|
91
|
+
loadInstallerButton() {
|
|
103
92
|
var controller = this;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
var componentRoot = (controller.component.shadowed)?(controller.component.shadowRoot):(controller.component.body);
|
|
94
|
+
componentRoot.subelements("#installerbutton").map(
|
|
95
|
+
function (element) {
|
|
96
|
+
controller.installer = New(Installer, {
|
|
97
|
+
root: element
|
|
98
|
+
});
|
|
107
99
|
}
|
|
108
100
|
);
|
|
109
101
|
},
|
|
110
|
-
_new_
|
|
111
|
-
|
|
112
|
-
|
|
102
|
+
_new_(o) {
|
|
103
|
+
this.__new__(o);
|
|
104
|
+
//TODO: Implement
|
|
113
105
|
},
|
|
114
|
-
done: function (){
|
|
106
|
+
done: function () {
|
|
115
107
|
this.loadInstallerButton();
|
|
116
108
|
}
|
|
117
109
|
}),
|
|
118
|
-
Class("Controller1",Controller,{
|
|
119
|
-
dependencies:[],
|
|
120
|
-
component:null,
|
|
121
|
-
_new_
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
Class("Controller1", Controller, {
|
|
111
|
+
dependencies: [],
|
|
112
|
+
component: null,
|
|
113
|
+
_new_(o) {
|
|
114
|
+
this.__new__(o);
|
|
115
|
+
var controller = this;
|
|
116
|
+
//TODO: Implement
|
|
125
117
|
}
|
|
126
118
|
}),
|
|
127
|
-
Class("Controller2",Controller,{
|
|
128
|
-
dependencies:[],
|
|
129
|
-
component:null,
|
|
130
|
-
_new_
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
119
|
+
Class("Controller2", Controller, {
|
|
120
|
+
dependencies: [],
|
|
121
|
+
component: null,
|
|
122
|
+
_new_(o) {
|
|
123
|
+
this.__new__(o);
|
|
124
|
+
var controller = this;
|
|
125
|
+
//TODO: Implement
|
|
134
126
|
}
|
|
135
|
-
})
|
|
136
|
-
]);
|
|
127
|
+
})
|
|
128
|
+
]);
|
package/manifest.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"background_color": "rgb(1,1,1)",
|
|
2
|
+
"background_color": "#000000",
|
|
3
|
+
"description": "Awesome app template that will help you achieve your dreams.",
|
|
4
|
+
"dir": "ltr",
|
|
6
5
|
"display": "standalone",
|
|
7
|
-
"
|
|
6
|
+
"name": "newapp.qcobjects",
|
|
8
7
|
"orientation": "portrait-primary",
|
|
9
|
-
"lang": "en-US",
|
|
10
|
-
"dir": "auto",
|
|
11
8
|
"scope": "/",
|
|
9
|
+
"short_name": "newapp.qcobjects",
|
|
10
|
+
"start_url": "/",
|
|
11
|
+
"theme_color": "#000000",
|
|
12
|
+
"shortcuts": [],
|
|
13
|
+
"lang": "en-US",
|
|
12
14
|
"categories": ["utilities"],
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
+
"icons": [
|
|
16
|
+
{
|
|
17
|
+
"src": "/favicon.ico",
|
|
18
|
+
"type": "image/x-icon"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
15
21
|
"src": "img/icons/icon-72x72.png",
|
|
16
22
|
"sizes": "72x72",
|
|
17
23
|
"type": "image/png"
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjectsnewapp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.92",
|
|
4
4
|
"description": "App template for New App in QCObjects",
|
|
5
5
|
"main": "js/init.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "(npx eslint *.js js/*.js js/packages/*.js --fix) && (npx jasmine)",
|
|
8
8
|
"sync": "git add . && git commit -am ",
|
|
9
9
|
"preversion": "npm i --upgrade && npm test",
|
|
10
|
-
"postversion": "git push && git push --tags
|
|
10
|
+
"postversion": "git push && git push --tags",
|
|
11
11
|
"coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
|
|
12
12
|
"start": "node app.js",
|
|
13
13
|
"build": "exit 0"
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"author": "Jean Machuca (correojean@gmail.com)",
|
|
26
26
|
"license": "LGPL-3.0-or-later",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"eslint": "^
|
|
29
|
-
"eslint-config-qcobjects": "0.0.
|
|
30
|
-
"jasmine": "^3.
|
|
31
|
-
"qcobjects": "^2.3.
|
|
32
|
-
"qcobjects-cli": "
|
|
28
|
+
"eslint": "^8.2.0",
|
|
29
|
+
"eslint-config-qcobjects": "^0.0.13",
|
|
30
|
+
"jasmine": "^3.6.3",
|
|
31
|
+
"qcobjects": "^2.3.68",
|
|
32
|
+
"qcobjects-cli": "^2.3.50"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"grunt": "^1.4.1",
|
|
36
|
-
"grunt-contrib-jasmine": "^
|
|
36
|
+
"grunt-contrib-jasmine": "^2.0.2",
|
|
37
37
|
"nyc": "^15.1.0",
|
|
38
|
-
"qcobjects-sdk": "
|
|
38
|
+
"qcobjects-sdk": "^2.3.30"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/sw.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* license document, but changing it is not allowed.
|
|
24
24
|
*/
|
|
25
25
|
"use strict";
|
|
26
|
-
const version = "1.2.
|
|
26
|
+
const version = "1.2.86";
|
|
27
27
|
const appName = "qcobjectsnewapp";
|
|
28
28
|
const cacheSufix = (Math.round(Date.now()/(1000*3600))).toString(); // 1 hour
|
|
29
29
|
const cacheName = `qcobjects-app-${appName}-${version}-${cacheSufix}`;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
@import url('https://sdk.qcobjects.dev/css/basic-layout.css');
|
|
6
6
|
@import url('css/index.css');
|
|
7
|
+
$layout(landscape,css/desktop/index.css)
|
|
8
|
+
$layout(portrait,css/mobile/index.css)
|
|
7
9
|
|
|
8
10
|
/* uncomment the next line to apply a theme */
|
|
9
11
|
/* @import url('css/theme/cyan/style.css'); */
|
package/js/packages/installer.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var Installer = function (root) {
|
|
2
|
-
var promptEvent;
|
|
3
|
-
|
|
4
|
-
var install = function (e) {
|
|
5
|
-
logger.debug("installer actioned");
|
|
6
|
-
if (promptEvent) {
|
|
7
|
-
logger.debug("prompt event");
|
|
8
|
-
|
|
9
|
-
promptEvent.prompt();
|
|
10
|
-
promptEvent.userChoice
|
|
11
|
-
.then(function (choiceResult) {
|
|
12
|
-
// The user actioned the prompt (good or bad).
|
|
13
|
-
// good is handled in
|
|
14
|
-
promptEvent = null;
|
|
15
|
-
// root.classList.remove('available');
|
|
16
|
-
})
|
|
17
|
-
.catch(function (installError) {
|
|
18
|
-
// Boo. update the UI.
|
|
19
|
-
promptEvent = null;
|
|
20
|
-
root.classList.remove("available");
|
|
21
|
-
});
|
|
22
|
-
} else {
|
|
23
|
-
logger.debug("not asking for install");
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var installed = function (e) {
|
|
28
|
-
logger.debug("app is already installed");
|
|
29
|
-
promptEvent = null;
|
|
30
|
-
// This fires after onbeforinstallprompt OR after manual add to homescreen.
|
|
31
|
-
root.classList.remove("available");
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
var beforeinstallprompt = function (e) {
|
|
35
|
-
logger.debug("registering installer event");
|
|
36
|
-
promptEvent = e;
|
|
37
|
-
promptEvent.preventDefault();
|
|
38
|
-
root.classList.add("available");
|
|
39
|
-
return false;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
window.addEventListener("beforeinstallprompt", beforeinstallprompt,false);
|
|
43
|
-
window.addEventListener("appinstalled", installed,false);
|
|
44
|
-
|
|
45
|
-
root.addEventListener("click", install.bind(this));
|
|
46
|
-
root.addEventListener("touchend", install.bind(this));
|
|
47
|
-
};
|