qcobjectsnewapp 2.4.12 → 2.4.14

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/.eslintignore +1 -1
  2. package/.eslintrc.cjs +3 -18
  3. package/.gitpod.yml +21 -0
  4. package/.prettierignore +2 -1
  5. package/Dockerfile +2 -0
  6. package/README.md +38 -35
  7. package/VERSION +1 -1
  8. package/package.json +28 -8
  9. package/src/css/desktop/components/deploy-grid.css +4 -0
  10. package/src/css/index.css +1 -1
  11. package/src/css/mobile/components/deploy-grid.css +5 -0
  12. package/src/css/modern-base.css +1 -1
  13. package/src/index-fallback.html +47 -0
  14. package/src/js/config.d.ts +1 -0
  15. package/src/js/config.ts +2 -5
  16. package/src/js/customWidgets.d.ts +1 -0
  17. package/src/js/customWidgets.ts +4 -0
  18. package/src/js/init.d.ts +27 -0
  19. package/src/js/init.ts +1 -0
  20. package/src/js/packages/com.qcobjects.installer.d.ts +1 -0
  21. package/src/js/packages/com.qcobjects.installer.ts +1 -1
  22. package/src/js/packages/com.qcobjects.services.github.d.ts +1 -0
  23. package/src/js/packages/com.qcobjects.services.github.ts +26 -28
  24. package/src/js/packages/org.quickcorp.custom.components.d.ts +1 -0
  25. package/src/js/packages/org.quickcorp.custom.components.ts +14 -12
  26. package/src/js/packages/org.quickcorp.custom.controllers.d.ts +1 -0
  27. package/src/js/packages/org.quickcorp.custom.d.ts +7 -0
  28. package/src/js/packages/org.quickcorp.custom.effects.d.ts +1 -0
  29. package/src/js/packages/org.quickcorp.custom.models.d.ts +1 -0
  30. package/src/js/packages/org.quickcorp.custom.views.d.ts +1 -0
  31. package/src/pwabuilder-sw.js +55 -0
  32. package/src/sw.js +2 -0
  33. package/src/templates/components/gitpod-button.tpl.html +38 -0
  34. package/src/templates/components/header.tpl.html +17 -10
  35. package/src/templates/components/netlify-button.tpl.html +4 -0
  36. package/tsconfig.d.json +5 -0
  37. package/tsconfig.json +2 -15
  38. package/src/js/types/global.d.ts +0 -25
  39. package/src/js/types/init.d.ts +0 -0
  40. /package/src/css/{components/github-grid-landscape.css → desktop/components/github-grid.css} +0 -0
  41. /package/src/css/{components/github-grid-portrait.css → mobile/components/github-grid.css} +0 -0
package/.eslintignore CHANGED
@@ -1,4 +1,4 @@
1
1
  build
2
2
  dist
3
3
  public
4
- tools
4
+ src/**/*.d.ts
package/.eslintrc.cjs CHANGED
@@ -1,21 +1,6 @@
1
1
  module.exports = {
2
- env: {
3
- browser: true,
4
- node: true,
5
- es2021: true,
6
- es2020: true,
7
- es2017: true,
8
- es6: true
9
- },
10
-
11
2
  extends: [
12
- "eslint-config-semistandard",
13
- "standard",
14
- "prettier",
15
- "eslint:recommended", "plugin:@typescript-eslint/recommended",
16
- "qcobjects"
17
- ],
18
- parser: "@typescript-eslint/parser",
19
- plugins: ["@typescript-eslint"],
20
- root: true
3
+ "qcobjects",
4
+ "qcobjects-typescript"
5
+ ]
21
6
  };
package/.gitpod.yml ADDED
@@ -0,0 +1,21 @@
1
+ image: quickcorp/qcobjects
2
+
3
+ # List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/
4
+ ports:
5
+ - port: 8080
6
+ onOpen: ignore
7
+ visibility: public
8
+ - port: 8443
9
+ onOpen: open-browser
10
+ visibility: public
11
+
12
+ # List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
13
+ tasks:
14
+ - init: |
15
+ npm install
16
+ command: |
17
+ npm run start
18
+
19
+ vscode:
20
+ extensions:
21
+ - dbaeumer.vscode-eslint
package/.prettierignore CHANGED
@@ -4,4 +4,5 @@ lib
4
4
  coverage
5
5
  dist
6
6
  public
7
- build
7
+ build
8
+ src/**/.d.ts
package/Dockerfile CHANGED
@@ -31,6 +31,8 @@ ENV LC_ALL C
31
31
  ENV DEBIAN_FRONTEND noninteractive
32
32
 
33
33
  LABEL MAINTAINER "Jean Machuca <jean@qcobjects.com>"
34
+ LABEL Author "Jean Machuca <jean@qcobjects.com>"
35
+ LABEL org.opencontainers.image.authors="Jean Machuca <jean@qcobjects.com>"
34
36
  ENV container docker
35
37
 
36
38
  RUN npm i -g qcobjects qcobjects-sdk qcobjects-cli
package/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  This is a demo of a QCObjects based front-end Progressive Web App
4
4
 
5
+ # Deploy to Netlify
6
+
7
+ [![Deploy on Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/QuickCorp/qcobjects-new-app)
8
+
9
+
5
10
  # Open Live Demo
6
11
 
7
12
  You can view the result of this project opening [QCObjects Demo App](https://newapp.qcobjects.dev) on any browser.
@@ -12,29 +17,31 @@ The following is the project structure of a Progressive Web App made in QCObject
12
17
 
13
18
  ```shell
14
19
  .
15
- ├── css
16
- │ ├── components
17
- │ │ └── hero
18
- │ ├── desktop
19
- │ ├── mobile
20
- │ └── theme
21
- │ ├── basic
22
- │ ├── cyan
23
- │ ├── redlight
24
- │ └── xtra
25
- ├── demo-tests
26
- ├── img
27
- │ ├── icons
28
- │ └── screenshots
29
- ├── js
30
- │ └── packages
20
+ ├── backend
31
21
  ├── spec
32
22
  │ └── support
33
- └── templates
34
- └── components
35
- ├── hero
36
- └── pages
37
-
23
+ └── src
24
+ ├── css
25
+ │ ├── components
26
+ │ │ └── hero
27
+ │ ├── desktop
28
+ │ │ └── components
29
+ │ ├── mobile
30
+ │ │ └── components
31
+ │ └── theme
32
+ │ ├── basic
33
+ │ ├── cyan
34
+ │ ├── redlight
35
+ │ └── xtra
36
+ ├── img
37
+ │ ├── icons
38
+ │ └── screenshots
39
+ ├── js
40
+ │ └── packages
41
+ └── templates
42
+ └── components
43
+ ├── hero
44
+ └── pages
38
45
  ```
39
46
 
40
47
  # Entry point
@@ -62,20 +69,6 @@ CONFIG.set("serviceWorkerURI","/sw.js"); //QCObjects will register an launch thi
62
69
 
63
70
  ```
64
71
 
65
- You will also find the main imports:
66
-
67
- ```javascript
68
- // note that this line is pure JavaScript ECMA2020
69
- import "../QCObjects.js";
70
- ```
71
-
72
- ```javascript
73
- Import("org.quickcorp.custom"); // this will load js/packages/org.quickcorp.custom.js file
74
- ```
75
-
76
- Above Import function comes from QCObjects Framework
77
- You can either use this function or import statement to load QCObjects packages.
78
-
79
72
  # Enable QCObjects from local server
80
73
 
81
74
  In package.json file, in scripts section, you will find some common commands that need to be present in every project that works with QCObjects.
@@ -146,6 +139,16 @@ npm run serve
146
139
  npm run server
147
140
  ```
148
141
 
142
+ # Run start DEV
143
+
144
+ The "start:dev" script will build, publish and start the server using npm-watch.
145
+
146
+ ```shell
147
+ # Start the QCObjects Server
148
+ npm run start:dev
149
+ ```
150
+
151
+
149
152
  # Run QCObjects Collab
150
153
 
151
154
  The "collab" script launches the collaborative coding tool "qcobjects-collab". This is useful for working with other developers on the same codebase.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.12
1
+ 2.4.14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjectsnewapp",
3
- "version": "2.4.12",
3
+ "version": "2.4.14",
4
4
  "description": "App template for New App in QCObjects",
5
5
  "targets": {
6
6
  "default": {
@@ -10,8 +10,20 @@
10
10
  },
11
11
  "main": "public/js/init.js",
12
12
  "type": "commonjs",
13
- "types": "src/ts/types/init.d.ts",
13
+ "types": "src/**/*.d.ts",
14
14
  "browserslist": "> 0.5%, last 2 versions, not dead",
15
+ "watch": {
16
+ "start": {
17
+ "patterns": [
18
+ "src"
19
+ ],
20
+ "extensions": "ts,html,css",
21
+ "quiet": true,
22
+ "legacyWatch": true,
23
+ "delay": 2500,
24
+ "runOnChangeOnly": false
25
+ }
26
+ },
15
27
  "scripts": {
16
28
  "test": "(npm run lint && (npx jasmine))",
17
29
  "lint": "(npx eslint \"src/**/*.ts\" --fix --ext ts)",
@@ -36,11 +48,13 @@
36
48
  "azure-server": "npm start",
37
49
  "aws-server": "npm start",
38
50
  "do-server": "npm start",
51
+ "minify:css": "(npx esbuild build/css/*.css build/css/**/*.css --outdir=public/css --keep-names --minify --global-name=global --sourcemap --loader:.svg=file)",
39
52
  "build:docker": "docker build -t qcobjects/qcobjects-newapp:latest .",
40
53
  "build:static": "npx qcobjects publish:static src/ build/ --exclude js --exclude=.DS_Store",
41
54
  "build:ts": "npm test && npx tsc",
42
- "build:ts-types": "npx -p typescript tsc src/**/*.ts --declaration --allowJs --esModuleInterop --emitDeclarationOnly --outDir types",
43
- "publish:static": "npx qcobjects publish:static build/ public/ --exclude js --exclude=.DS_Store",
55
+ "build:ts-types": "npx tsc --project tsconfig.declaration.json",
56
+ "build": "npm run build:ts-types && npm run build:ts && npm run build:static && npm run build:docker",
57
+ "publish:static": "(npx qcobjects publish:static build/ public/ --exclude js --exclude=.DS_Store) && npm run minify:css",
44
58
  "publish:ios": "qcobjects publish ios",
45
59
  "publish:android": "qcobjects publish android",
46
60
  "publish:electron": "qcobjects publish electron",
@@ -48,11 +62,14 @@
48
62
  "publish:parcel": "npx parcel build",
49
63
  "publish:web": "npm run build:static && npm run build:ts && npm run publish:static && npm run publish:esbuild",
50
64
  "publish:docker": "docker push qcobjects/qcobjects-newapp:latest",
51
- "deploy:docker": "npm-run-all build:docker publish:docker",
65
+ "deploy:docker": "npm run build:docker && npm run publish:docker",
52
66
  "docker-server": "docker run -p 8080:8080 -p 8443:8443 -d --name qcobjects-newapp qcobjects/qcobjects-newapp",
53
67
  "prepare": "node -e \"if(!require('fs').existsSync('.git')){process.exit(0)}\" || npx -y husky install",
54
68
  "prestart": "npm run publish:web",
55
- "cli:help": "qcobjects --help"
69
+ "cli:help": "qcobjects --help",
70
+ "start:dev": "npm-watch start",
71
+ "build:dev": "npm-watch build",
72
+ "tree": "tree -d --gitignore"
56
73
  },
57
74
  "repository": {
58
75
  "type": "file",
@@ -81,6 +98,7 @@
81
98
  "eslint": "^8.39.0",
82
99
  "eslint-config-prettier": "^8.8.0",
83
100
  "eslint-config-qcobjects": "^0.0.26",
101
+ "eslint-config-qcobjects-typescript": "^2.4.5",
84
102
  "eslint-config-semistandard": "^17.0.0",
85
103
  "eslint-config-standard": "^17.0.0",
86
104
  "eslint-config-standard-with-typescript": "^34.0.1",
@@ -94,16 +112,18 @@
94
112
  "npm-run-all": "^4.1.5",
95
113
  "parcel": "^2.8.3",
96
114
  "process": "^0.11.10",
97
- "qcobjects-cli": "^2.4.34",
115
+ "qcobjects-cli": "^2.4.35",
116
+ "qcobjects-command-publish-static": "^1.0.2",
117
+ "qcobjects-tsconfig": "^2.4.10",
98
118
  "systemjs": "^6.14.1",
99
119
  "typescript": "^5.0.4"
100
120
  },
101
121
  "dependencies": {
102
122
  "grunt": "^1.4.1",
103
123
  "grunt-contrib-jasmine": "^4.0.0",
124
+ "npm-watch": "^0.11.0",
104
125
  "nyc": "^15.1.0",
105
126
  "qcobjects": "^2.4.67",
106
- "qcobjects-command-publish-static": "^1.0.2",
107
127
  "qcobjects-sdk": "^2.4.30",
108
128
  "semistandard": "^16.0.1"
109
129
  },
@@ -0,0 +1,4 @@
1
+ .deploy-grid {
2
+ display:grid;
3
+ grid-template-columns: 50% 50%;
4
+ }
package/src/css/index.css CHANGED
@@ -144,7 +144,7 @@ nav details {
144
144
  }
145
145
 
146
146
  nav summary::before {
147
- content: url('/img/Q_web.svg'); /* the icon for list in sidebar */
147
+ content: url('../img/Q_web.svg'); /* the icon for list in sidebar */
148
148
  color: #e5f59d;
149
149
  margin-right: 20px;
150
150
  }
@@ -0,0 +1,5 @@
1
+ .deploy-grid {
2
+ display:grid;
3
+ grid-template-columns: 100%;
4
+ grid-template-rows: 50% 50%;
5
+ }
@@ -105,7 +105,7 @@ p * {
105
105
  font-family: var(--font2);
106
106
  }
107
107
 
108
- button:not(.navbtn), {
108
+ button:not(.navbtn) {
109
109
  padding: 10px 20px 10px 20px;
110
110
  border: 0;
111
111
  outline: 0;
@@ -0,0 +1,47 @@
1
+ <!doctype html>
2
+ <html class="no-js" lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <!-- This is a wide open CSP declaration. To lock this down for production, see below. -->
8
+ <meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: https://ssl.gstatic.com; img-src * 'self' data:; child-src *; style-src * 'self' 'unsafe-inline' 'unsafe-eval'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; connect-src * 'self' 'unsafe-inline' 'unsafe-eval';media-src *">
9
+ <title>QCObjects New App v2.4</title>
10
+ <meta name="description" content="QCObjects New App v2.4">
11
+ <link rel="canonical" href="https://newapp.qcobjects.dev/">
12
+ <link rel="manifest" href="manifest.json">
13
+ <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
14
+ <link rel="icon" href="./favicon.ico" type="image/x-icon">
15
+ <meta name="mobile-web-app-capable" content="yes">
16
+ <meta name="apple-mobile-web-app-capable" content="yes">
17
+ <meta name="application-name" content="QCObjects New App">
18
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
19
+ <meta name="apple-mobile-web-app-title" content="QCObjects New App">
20
+ <link rel="icon" sizes="192x192" href="./img/icons/icon-192x192.png">
21
+ <link rel="apple-touch-icon" href="./img/icons/icon-192x192.png">
22
+ <meta name="msapplication-TileImage" content="./img/icons/icon-144x144.png">
23
+ <meta name="msapplication-TileColor" content="rgb(1,1,1)">
24
+ <meta name="theme-color" content="rgb(1,1,1)">
25
+ <meta property="og:title" content="QCObjects Config">
26
+ <meta property="og:type" content="website">
27
+ <meta property="og:image" content="https://newapp.qcobjects.dev/img/icons/icon-192x192.png">
28
+ <meta property="og:url" content="https://newapp.qcobjects.dev/">
29
+ <meta property="og:description" content="QCObjects New App">
30
+ <meta name="twitter:card" content="summary">
31
+ <meta name="twitter:url" content="https://newapp.qcobjects.dev/">
32
+ <meta name="twitter:title" content="QCObjects New App">
33
+ <meta name="twitter:description" content="QCObjects New App">
34
+ <meta name="twitter:image" content="https://config.qcobjects.dev/img/icons/icon-192x192.png">
35
+ <meta name="twitter:creator" content="@jeanmachuca">
36
+ <link rel="preload" href="css/index.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
37
+ <noscript><link rel="stylesheet" href="css/index.css"></noscript>
38
+ </head>
39
+ <body>
40
+ <noscript>
41
+ <!-- anchor linking to external file -->
42
+ <p>This page needs JavaScript because it uses QCObjects (https://qcobjects.com).</p>
43
+ <p>Please, check to enable JavaScript</p>
44
+ </noscript>
45
+ <p>Please check your Internet connection!</p>
46
+ </body>
47
+ </html>
@@ -0,0 +1 @@
1
+ export {};
package/src/js/config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CONFIG, Component, RegisterWidgets } from "qcobjects";
1
+ import { CONFIG, Component } from "qcobjects";
2
2
  /*
3
3
  * The next values are the default settings
4
4
  * You can change any value in runtime by using CONFIG.set
@@ -18,7 +18,4 @@ CONFIG.set("serviceWorkerURI", "/sw.js"); // QCObjects will register an launch t
18
18
 
19
19
  // if Component.cached is true, all the Class('Component') declarations will save the template in a localStorage cache
20
20
  // until a cached=false attribute is found in a <component> html declaration
21
- Component.cached = true; // this will load js/packages/org.quickcorp.custom.js file
22
-
23
- // eslint-disable-next-line no-undef
24
- RegisterWidgets("layout-basic", "splash-screen", "github-grid", "octocat-icon", "lib-list");
21
+ Component.cached = true; // this will load js/packages/org.quickcorp.custom.js file
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { RegisterWidgets } from "qcobjects";
2
+
3
+ RegisterWidgets("layout-basic", "splash-screen", "github-grid", "octocat-icon", "lib-list");
4
+ RegisterWidgets("gitpod-button", "netlify-button", "deploy-grid");
@@ -0,0 +1,27 @@
1
+ /**
2
+ * QCObjects New App PWA Template 1.x
3
+ * ________________
4
+ *
5
+ * Author: Jean Machuca <correojean@gmail.com>
6
+ *
7
+ * Cross Browser Javascript Framework for MVC Patterns
8
+ * QuickCorp/QCObjects is licensed under the
9
+ * GNU Lesser General Public License v3.0
10
+ * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
11
+ *
12
+ * Permissions of this copyleft license are conditioned on making available
13
+ * complete source code of licensed works and modifications under the same
14
+ * license or the GNU GPLv3. Copyright and license notices must be preserved.
15
+ * Contributors provide an express grant of patent rights. However, a larger
16
+ * work using the licensed work through interfaces provided by the licensed
17
+ * work may be distributed under different terms and without source code for
18
+ * the larger work.
19
+ *
20
+ * Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
21
+ *
22
+ * Everyone is permitted to copy and distribute verbatim copies of this
23
+ * license document, but changing it is not allowed.
24
+ */
25
+ import "./config";
26
+ import "./packages/org.quickcorp.custom";
27
+ import "./customWidgets";
package/src/js/init.ts CHANGED
@@ -25,3 +25,4 @@
25
25
  */
26
26
  import "./config";
27
27
  import "./packages/org.quickcorp.custom";
28
+ import "./customWidgets";
@@ -0,0 +1 @@
1
+ export {};
@@ -91,7 +91,7 @@ Package("com.qcobjects.installer", [
91
91
  logger.warn(`Error during install: ${installError.toString()}`);
92
92
  });
93
93
  } else {
94
- logger.debug("not asking for install");
94
+ logger.debug("It is not possible to get the prompt event for install ");
95
95
  }
96
96
  }
97
97
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable prefer-rest-params */
2
2
  "use strict";
3
- import { Package, JSONService, Service, logger, Class } from "qcobjects";
3
+ import { Package, JSONService, Service, logger } from "qcobjects";
4
4
 
5
5
  Package("com.qcobjects.services.github", [
6
6
  class GitHubService extends JSONService {
@@ -112,37 +112,34 @@ Package("com.qcobjects.services.github", [
112
112
  }
113
113
  },
114
114
 
115
- Class("QCObjectsVersionService", Service, {
116
- name: "qcobjects_version_service",
117
- external: true,
118
- cached: false,
119
- method: "GET",
120
- headers: { "Content-Type": "application/json" },
121
- url: "https://api.github.com/repos/QuickCorp/QCObjects/tags",
122
- withCredentials: false,
123
- _new_: () => {
124
- // service instantiated
125
- },
126
- done: ({ service }: { service: Service }) => {
115
+ class QCObjectsVersionService extends Service {
116
+ name= "qcobjects_version_service";
117
+ external= true;
118
+ cached= false;
119
+ method= "GET";
120
+ headers= { "Content-Type": "application/json" };
121
+ url= "https://api.github.com/repos/QuickCorp/QCObjects/tags";
122
+ withCredentials= false;
123
+
124
+ done ({ service }: { service: Service }) {
127
125
  const latest = JSON.parse(service.template)[0];
128
126
  service.template = {
129
127
  version: latest.name
130
128
  };
131
129
  }
132
- }),
133
-
134
- Class("QCObjectsStarsForksService", Service, {
135
- name: "qcobjects_stars_forks_service",
136
- external: true,
137
- cached: false,
138
- method: "GET",
139
- headers: { "Content-Type": "application/json" },
140
- url: "https://api.github.com/repos/QuickCorp/QCObjects",
141
- withCredentials: false,
142
- _new_: () => {
143
- // service instantiated
144
- },
145
- done: ({ service }: { service: Service }) => {
130
+
131
+ },
132
+
133
+ class QCObjectsStarsForksService extends Service {
134
+ name= "qcobjects_stars_forks_service";
135
+ external= true;
136
+ cached= false;
137
+ method= "GET";
138
+ headers= { "Content-Type": "application/json" };
139
+ url= "https://api.github.com/repos/QuickCorp/QCObjects";
140
+ withCredentials= false;
141
+
142
+ done ({ service }: { service: Service }) {
146
143
  const repo = JSON.parse(service.template);
147
144
  service.template = {
148
145
  forks: repo.forks_count,
@@ -151,6 +148,7 @@ Package("com.qcobjects.services.github", [
151
148
  size: Math.round(repo.size / 1000)
152
149
  };
153
150
  }
154
- })
151
+
152
+ }
155
153
 
156
154
  ]);
@@ -8,8 +8,8 @@ Package("org.quickcorp.custom.components", [
8
8
  tplsource = "inline";
9
9
  template = `
10
10
  <style>
11
- $layout(landscape,css/components/github-grid-landscape.css)
12
- $layout(portrait,css/components/github-grid-portrait.css)
11
+ $layout(landscape,css/desktop/components/github-grid.css)
12
+ $layout(portrait,css/mobile/components/github-grid.css)
13
13
 
14
14
  :host {
15
15
  margin:0 auto;
@@ -21,16 +21,18 @@ Package("org.quickcorp.custom.components", [
21
21
  `;
22
22
  },
23
23
 
24
- class Component1 extends Component {
25
- name = "main";
26
- cached = false;
27
- controller = null;
28
- view = null;
29
- },
30
-
31
- class Component2 extends Component {
32
- name = "component-two";
33
- propertyName2 = "propertyValue2";
24
+ class DeployGrid extends Component {
25
+ name = "deploygrid";
26
+ template = `
27
+ <style>
28
+ $layout(landscape,css/desktop/components/deploy-grid.css)
29
+ $layout(portrait,css/mobile/components/deploy-grid.css)
30
+ </style>
31
+ <div class="deploy-grid">
32
+ <netlify-button></netlify-button>
33
+ <gitpod-button></gitpod-button>
34
+ </div>
35
+ `;
34
36
  }
35
37
 
36
38
  ]);
@@ -0,0 +1,7 @@
1
+ import "./com.qcobjects.installer";
2
+ import "./org.quickcorp.custom.effects";
3
+ import "./org.quickcorp.custom.models";
4
+ import "./org.quickcorp.custom.components";
5
+ import "./org.quickcorp.custom.controllers";
6
+ import "./org.quickcorp.custom.views";
7
+ import "./com.qcobjects.services.github";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,55 @@
1
+ /* eslint-disable no-undef */
2
+ // This is the service worker with the combined offline experience (Offline page + Offline copy of pages)
3
+
4
+ const CACHE = "qcobjectsnewapp-offline-page";
5
+
6
+ importScripts("https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js");
7
+
8
+ const offlineFallbackPage = "index-fallback.html";
9
+
10
+ self.addEventListener("message", (event) => {
11
+ if (event.data && event.data.type === "SKIP_WAITING") {
12
+ self.skipWaiting();
13
+ }
14
+ });
15
+
16
+ self.addEventListener("install", async (event) => {
17
+ event.waitUntil(
18
+ caches.open(CACHE)
19
+ .then((cache) => cache.add(offlineFallbackPage))
20
+ );
21
+ });
22
+
23
+ if (workbox.navigationPreload.isSupported()) {
24
+ workbox.navigationPreload.enable();
25
+ }
26
+
27
+ workbox.routing.registerRoute(
28
+ // eslint-disable-next-line prefer-regex-literals
29
+ new RegExp("/*"),
30
+ new workbox.strategies.StaleWhileRevalidate({
31
+ cacheName: CACHE
32
+ })
33
+ );
34
+
35
+ self.addEventListener("fetch", (event) => {
36
+ if (event.request.mode === "navigate") {
37
+ event.respondWith((async () => {
38
+ try {
39
+ const preloadResp = await event.preloadResponse;
40
+
41
+ if (preloadResp) {
42
+ return preloadResp;
43
+ }
44
+
45
+ const networkResp = await fetch(event.request);
46
+ return networkResp;
47
+ } catch (error) {
48
+
49
+ const cache = await caches.open(CACHE);
50
+ const cachedResp = await cache.match(offlineFallbackPage);
51
+ return cachedResp;
52
+ }
53
+ })());
54
+ }
55
+ });
package/src/sw.js CHANGED
@@ -23,6 +23,8 @@
23
23
  * license document, but changing it is not allowed.
24
24
  */
25
25
  "use strict";
26
+ // eslint-disable-next-line no-undef
27
+ importScripts("./pwabuilder-sw.js");
26
28
  const version = "1.2.93";
27
29
  const appName = "qcobjectsnewapp";
28
30
  const cacheSufix = (Math.round(Date.now() / (1000 * 3600))).toString(); // 1 hour
@@ -0,0 +1,38 @@
1
+ <style>
2
+ .gitpod-button {
3
+ background-color: #191712;
4
+ padding: 0.4em;
5
+ max-width: 192px;
6
+ max-height: 51px;
7
+ margin: 0 auto;
8
+ border: 1px solid #2d2828;
9
+ border-radius: 0.7em;
10
+ }
11
+ .text-white{
12
+ color: white;
13
+ }
14
+ </style>
15
+ <div class="gitpod-button">
16
+ <a href="https://gitpod.io#https://github.com/QuickCorp/qcobjects-new-app"
17
+ target="_blank"
18
+ class="text-white inline-flex stroked after:dark:hover:bg-light-black after:!filter-none py-3 px-4 items-center justify-center bg-bg dark:bg-card rounded-2xl text-important dark:text-white shadow-light dark:shadow-none font-semibold hover:bg-card focus:bg-card dark:hover:bg-light-black dark:focus:bg-light-black svelte-1bcz8bs"
19
+ rel="noopener noreferrer" data-analytics="{&quot;variant&quot;:&quot;open_in_gitpod&quot;}"><span>
20
+ <svg
21
+ viewBox="0 0 24 24" height="24" width="24" fill="none" xmlns="http://www.w3.org/2000/svg">
22
+ <g clip-path="url(#clip0-textless-renderedOn)">
23
+ <path fill-rule="evenodd" clip-rule="evenodd"
24
+ d="M14.07 1.195a2.364 2.364 0 01-.887 3.236l-7.11 4.04a.6.6 0 00-.304.52v6.343a.6.6 0 00.304.52l5.628 3.199a.605.605 0 00.598 0l5.628-3.198a.6.6 0 00.304-.521V11.39l-5.06 2.838a2.392 2.392 0 01-3.248-.9 2.364 2.364 0 01.905-3.23l7.239-4.062C20.272 4.8 23 6.383 23 8.901v6.914c0 1.62-.873 3.115-2.287 3.919l-6.461 3.671a4.56 4.56 0 01-4.504 0l-6.461-3.671A4.509 4.509 0 011 15.815V8.51c0-1.62.873-3.115 2.287-3.918l7.53-4.28a2.392 2.392 0 013.253.883z"
25
+ fill="url(#paint0_linear-textless=desktop)"></path>
26
+ </g>
27
+ <defs>
28
+ <linearGradient id="paint0_linear-textless=desktop" x1="17.558" y1="3.629" x2="6.356" y2="21.34"
29
+ gradientUnits="userSpaceOnUse">
30
+ <stop stop-color="#FFB45B"></stop>
31
+ <stop offset="1" stop-color="#FF8A00"></stop>
32
+ </linearGradient>
33
+ <clipPath id="clip0-textless-renderedOn">
34
+ <path fill="#fff" d="M0 0h24v24H0z"></path>
35
+ </clipPath>
36
+ </defs>
37
+ </svg></span> <span class="ml-3">Edit in Gitpod</span></a>
38
+ </div>
@@ -1,14 +1,21 @@
1
1
  <style>
2
- @import url("./css/components/button.css");
3
- :host{
4
- place-items: center;
5
- margin:-30px;
6
- }
2
+ @import url("./css/components/button.css");
3
+
4
+ :host {
5
+ place-items: center;
6
+ margin: -30px;
7
+ }
8
+ .header-logo {
9
+ min-height:300px;
10
+ margin-top: 30px;
11
+ }
12
+
7
13
 
8
14
  </style>
9
- <div >
10
- <div style="min-height:300px">
11
- <img alt="logo" src="img/logo-qcobjects-white.svg" width="320px"/>
15
+ <div>
16
+ <div class="header-logo">
17
+ <img alt="logo" src="img/logo-qcobjects-white.svg" width="320px" />
12
18
  </div>
13
- <button id="installerbutton">INSTALL</button>
14
- </div>
19
+ <deploy-grid componentClass="DeployGrid">
20
+ </deploy-grid>
21
+ </div>
@@ -0,0 +1,4 @@
1
+ <a style="margin:0 auto;"
2
+ href="https://app.netlify.com/start/deploy?repository=https://github.com/QuickCorp/qcobjects-new-app">
3
+ <img src="https://www.netlify.com/img/deploy/button.svg" title="Deploy to Netlify">
4
+ </a>
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "qcobjects-tsconfig/tsconfig.d.json",
3
+ "include": ["src/**/*.ts"],
4
+ "exclude": ["src/**/*.spec.js", "src/*.js"]
5
+ }
package/tsconfig.json CHANGED
@@ -1,22 +1,9 @@
1
1
  {
2
+ "extends": "qcobjects-tsconfig/tsconfig.json",
2
3
  "compilerOptions": {
3
- "target": "ES2021", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
4
- "lib": ["ES2021", "DOM"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
5
- "module": "NodeNext", /* Specify what module code is generated. */
6
4
  "rootDir": "src", /* Specify the root folder within your source files. */
7
5
  "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
8
- "outDir": "build", /* Specify an output folder for all emitted files. */
9
- /*"outFile": "build/init.js",*/
10
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
11
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
12
- "strict": true, /* Enable all strict type-checking options. */
13
- "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
14
- "skipLibCheck": true, /* Skip type checking all .d.ts files. */
15
- "moduleResolution": "nodenext",
16
- "resolveJsonModule": false,
17
- "declaration": false,
18
- "sourceMap": false,
19
- "isolatedModules": false
6
+ "outDir": "build", /* Specify an output folder for all emitted files. */
20
7
  },
21
8
  "include": ["src/**/*.ts"],
22
9
  "exclude": ["src/**/*.spec.js", "src/*.js"]
@@ -1,25 +0,0 @@
1
- import { type Effect, Controller } from "qcobjects";
2
-
3
- declare namespace global {
4
- class SideNavController extends Controller {
5
- effect?: Effect;
6
- visibility?: boolean;
7
- }
8
-
9
- class Installer {
10
- root: Element;
11
- promptEvent!: Event;
12
-
13
- constructor (root: HTMLElement)
14
- beforeinstallprompt (e: Event)
15
- installed ()
16
- install ()
17
- }
18
-
19
- let sideNavController: SideNavController;
20
- function set (_, value: never)
21
- function get (_: string, value: never)
22
-
23
- }
24
-
25
- export default global;
File without changes