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.
Files changed (41) hide show
  1. package/.github/FUNDING.yml +12 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  3. package/.github/ISSUE_TEMPLATE/custom.md +10 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. package/.github/ISSUE_TEMPLATE/issue-template.md +33 -0
  6. package/.github/workflows/codeql-analysis.yml +71 -0
  7. package/.github/workflows/npmpublish.yml +38 -0
  8. package/VERSION +1 -1
  9. package/css/components/button.css +34 -33
  10. package/css/components/card.css +16 -14
  11. package/css/components/hero/hero-call-to-action.css +5 -5
  12. package/css/components/hero/hero-overlay.css +4 -4
  13. package/css/components/hero/hero-two-column-form.css +5 -5
  14. package/css/components/modal.css +9 -7
  15. package/css/desktop/container.css +10 -10
  16. package/css/desktop/content.css +9 -9
  17. package/css/desktop/footer.css +1 -1
  18. package/css/desktop/index.css +1 -1
  19. package/css/desktop/navbar.css +15 -11
  20. package/css/desktop/sidebar.css +1 -1
  21. package/css/index.css +122 -130
  22. package/css/mobile/content.css +13 -13
  23. package/css/mobile/footer.css +1 -1
  24. package/css/mobile/navbar.css +40 -30
  25. package/css/mobile/sidebar.css +1 -1
  26. package/css/modern-base.css +123 -108
  27. package/css/theme/basic/style.css +37 -35
  28. package/css/theme/cyan/style.css +38 -36
  29. package/img/logo-qcobjects-white-powered-quickcorp.svg +176 -0
  30. package/img/logo-qcobjects-white.svg +1 -176
  31. package/index.html +1 -1
  32. package/js/init.js +1 -0
  33. package/js/packages/com.qcobjects.installer.js +65 -0
  34. package/js/packages/org.quickcorp.custom.controllers.js +102 -110
  35. package/js/packages/org.quickcorp.custom.js +1 -0
  36. package/js/packages/org.quickcorp.custom.views.js +0 -1
  37. package/manifest.json +15 -9
  38. package/package.json +9 -9
  39. package/sw.js +1 -1
  40. package/templates/components/layout-basic.tpl.html +2 -0
  41. 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_ (o){
9
- this.__new__(o);
10
- var controller=this;
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
- var controller = this;
15
- if (!MainController.loaded){
16
- var 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
- MainController.loaded = true;
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_ (o){
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+=this.component.body.innerHTML;
47
- this.component.body.innerHTML="";
29
+ done: function () {
30
+ document.head.innerHTML += componentRoot.innerHTML;
31
+ componentRoot.innerHTML = "";
48
32
  }
49
33
  }),
50
- Class("SideNavController",Object,{
51
- dependencies:[],
52
- component:null,
53
- visibility:false,
54
- effect:null,
55
- open (){
56
- if (this.effect != null){
57
- this.effect.apply(this.component.body, 0,1);
58
- }
59
- this.component.body.style.width="100%";
60
- this.component.body.style.overflowX="visible";
61
- this.component.body.parentElement.subelements(".navbtn")[0].style.display="none";
62
- this.component.body.parentElement.subelements(".closebtn")[0].style.display="block";
63
- this.visibility = true;
64
- return this.visibility;
65
- },
66
- close (){
67
- if (this.effect != null){
68
- this.effect.apply(this.component.body, 1,0);
69
- }
70
- this.component.body.style.width="0px";
71
- this.component.body.style.overflowX="hidden";
72
- this.component.body.parentElement.subelements(".navbtn")[0].style.display="block";
73
- this.component.body.parentElement.subelements(".closebtn")[0].style.display="none";
74
- this.visibility = false;
75
- return this.visibility;
76
- },
77
- toggle (){
78
- if (this.visibility){
79
- this.close();
80
- } else {
81
- this.open();
82
- }
83
- },
84
- _new_ (o){
85
- this.__new__(o);
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
- var controller = this;
88
- global._sdk_.then(function (){
89
- controller.effect = New(Fade,{duration:300});
90
- controller.close();
91
- });
92
- //TODO: Implement
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
- this.component.body.subelements("#installerbutton").map(
105
- function (element){
106
- controller.installer = new Installer(element);
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_ (o){
111
- this.__new__(o);
112
- //TODO: Implement
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_ (o){
122
- this.__new__(o);
123
- var controller=this;
124
- //TODO: Implement
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_ (o){
131
- this.__new__(o);
132
- var controller=this;
133
- //TODO: Implement
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
+ ]);
@@ -1,4 +1,5 @@
1
1
  "use script";
2
+ Import("com.qcobjects.installer");
2
3
  Import("org.quickcorp.custom.effects");
3
4
  Import("org.quickcorp.custom.models");
4
5
  Import("org.quickcorp.custom.components");
@@ -13,7 +13,6 @@ Package("org.quickcorp.custom.views",[
13
13
  component:null,
14
14
  _new_ (o){
15
15
  this.__new__(o);
16
- var controller=this;
17
16
  //TODO: Implement
18
17
  }
19
18
  }),
package/manifest.json CHANGED
@@ -1,17 +1,23 @@
1
1
  {
2
- "name": "QCObjects New App",
3
- "short_name": "qcobjects_newapp",
4
- "theme_color": "rgb(1,1,1)",
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
- "description": "Awesome application that will help you achieve your dreams.",
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
- "start_url": "/?homescreen=1",
14
- "icons": [{
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.85",
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 && npm publish",
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": "^7.25.0",
29
- "eslint-config-qcobjects": "0.0.6",
30
- "jasmine": "^3.5.0",
31
- "qcobjects": "^2.3.29",
32
- "qcobjects-cli": "latest"
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": "^3.0.0",
36
+ "grunt-contrib-jasmine": "^2.0.2",
37
37
  "nyc": "^15.1.0",
38
- "qcobjects-sdk": "latest"
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.49";
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'); */
@@ -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
- };