qcobjectsnewapp 2.4.19 → 2.4.20
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/.gitlab-ci.yml +1 -1
- package/VERSION +1 -1
- package/netlify.toml +2 -0
- package/package.json +4 -3
- package/src/css/components/button.css +2 -3
- package/src/css/modern-base.css +2 -0
- package/src/js/init.ts +1 -1
- package/src/js/packages/com.qcobjects.services.github.ts +59 -27
- package/src/templates/components/layout-basic.tpl.html +1 -1
- /package/{_redirects → src/_redirects} +0 -0
package/.gitlab-ci.yml
CHANGED
|
@@ -8,7 +8,7 @@ pages:
|
|
|
8
8
|
- npm test
|
|
9
9
|
- mkdir public
|
|
10
10
|
- npm run publish:web
|
|
11
|
-
- cp _redirects public/
|
|
11
|
+
- cp src/_redirects public/
|
|
12
12
|
- cp -r node_modules/qcobjects-sdk public/qcobjects-sdk
|
|
13
13
|
# Build the public/ directory first
|
|
14
14
|
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.20
|
package/netlify.toml
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjectsnewapp",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.20",
|
|
4
4
|
"description": "App template for New App in QCObjects",
|
|
5
5
|
"targets": {
|
|
6
6
|
"default": {
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
"build:docker": "docker build -t qcobjects/qcobjects-newapp:latest .",
|
|
53
53
|
"build:static": "npx qcobjects publish:static src/ build/ --exclude js --exclude=.DS_Store",
|
|
54
54
|
"build:ts": "npm test && npx tsc",
|
|
55
|
-
"build:ts-types": "npx tsc --project tsconfig.
|
|
55
|
+
"build:ts-types": "npx tsc --project tsconfig.d.json",
|
|
56
|
+
"build:netlify": "npm run publish:web",
|
|
56
57
|
"build": "npm run build:ts-types && npm run build:ts && npm run build:static && npm run build:docker",
|
|
57
58
|
"publish:static": "(npx qcobjects publish:static build/ public/ --exclude js --exclude=.DS_Store) && npm run minify:css",
|
|
58
59
|
"publish:ios": "qcobjects publish ios",
|
|
@@ -123,7 +124,7 @@
|
|
|
123
124
|
"grunt-contrib-jasmine": "^4.0.0",
|
|
124
125
|
"npm-watch": "^0.11.0",
|
|
125
126
|
"nyc": "^15.1.0",
|
|
126
|
-
"qcobjects": "^2.4.
|
|
127
|
+
"qcobjects": "^2.4.69",
|
|
127
128
|
"qcobjects-sdk": "^2.4.34",
|
|
128
129
|
"semistandard": "^16.0.1"
|
|
129
130
|
},
|
|
@@ -23,8 +23,7 @@
|
|
|
23
23
|
* Everyone is permitted to copy and distribute verbatim copies of this
|
|
24
24
|
* license document, but changing it is not allowed.
|
|
25
25
|
*/
|
|
26
|
-
button:not(.navbtn),
|
|
27
|
-
input {
|
|
26
|
+
button:not(.navbtn), input {
|
|
28
27
|
border-radius: 27px;
|
|
29
28
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
|
30
29
|
outline: none;
|
|
@@ -52,7 +51,7 @@ button:not(.navbtn):hover {
|
|
|
52
51
|
background-color: #333;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
button:not(.navbtn)
|
|
54
|
+
button:not(.navbtn){
|
|
56
55
|
padding: 10px 20px 10px 20px;
|
|
57
56
|
border: 0;
|
|
58
57
|
outline: 0;
|
package/src/css/modern-base.css
CHANGED
|
@@ -114,6 +114,7 @@ button:not(.navbtn) {
|
|
|
114
114
|
cursor: pointer;
|
|
115
115
|
color: var(--text-inverse);
|
|
116
116
|
box-shadow: 0 10px 30px var(--primary-shadow);
|
|
117
|
+
-webkit-transition: var(--transition);
|
|
117
118
|
transition: var(--transition);
|
|
118
119
|
-webkit-transition: var(--transition);
|
|
119
120
|
font-family: var(--font2);
|
|
@@ -131,6 +132,7 @@ button:not(.navbtn):hover {
|
|
|
131
132
|
|
|
132
133
|
header {
|
|
133
134
|
z-index: 10;
|
|
135
|
+
-webkit-transition: var(--transition);
|
|
134
136
|
transition: var(--transition);
|
|
135
137
|
-webkit-transition: var(--transition);
|
|
136
138
|
justify-content: center;
|
package/src/js/init.ts
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import { Package, JSONService, Service, logger } from "qcobjects";
|
|
4
4
|
|
|
5
|
+
type Project = {
|
|
6
|
+
id: string;
|
|
7
|
+
description: string;
|
|
8
|
+
name: string;
|
|
9
|
+
html_url: string;
|
|
10
|
+
owner: { avatar_url: string },
|
|
11
|
+
forks_count:number,
|
|
12
|
+
stargazers_count:number,
|
|
13
|
+
watchers_count:number,
|
|
14
|
+
size:number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type StandardResponse = {
|
|
18
|
+
request: XMLHttpRequest;
|
|
19
|
+
service: Service;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type GitHubTagServiceResponse = {
|
|
23
|
+
total_count:number;
|
|
24
|
+
incomplete_results: boolean;
|
|
25
|
+
items:Array<Project>
|
|
26
|
+
};
|
|
27
|
+
type ItemProject = {
|
|
28
|
+
id:string;
|
|
29
|
+
description:string;
|
|
30
|
+
title:string;
|
|
31
|
+
url:string;
|
|
32
|
+
image:string;
|
|
33
|
+
};
|
|
34
|
+
type ItemsProject = Array<ItemProject>;
|
|
35
|
+
|
|
5
36
|
Package("com.qcobjects.services.github", [
|
|
6
37
|
class GitHubService extends JSONService {
|
|
7
38
|
/**
|
|
@@ -65,9 +96,10 @@ Package("com.qcobjects.services.github", [
|
|
|
65
96
|
* @param param0 this param has two properties, one is the native request call (XHR or Fetch object). The second property is the service object.
|
|
66
97
|
* @returns Promise
|
|
67
98
|
*/
|
|
68
|
-
done
|
|
69
|
-
|
|
70
|
-
const result = JSON.parse(service.template)
|
|
99
|
+
done({ request, service }: StandardResponse) {
|
|
100
|
+
|
|
101
|
+
const result:ItemsProject = (JSON.parse(service.template) as Array<Project>)
|
|
102
|
+
.reverse().map(function (project: Project) {
|
|
71
103
|
return {
|
|
72
104
|
id: project.id,
|
|
73
105
|
description: project.description,
|
|
@@ -80,7 +112,7 @@ Package("com.qcobjects.services.github", [
|
|
|
80
112
|
service.template = JSON.stringify({
|
|
81
113
|
result
|
|
82
114
|
});
|
|
83
|
-
return super.done(
|
|
115
|
+
return super.done({ request, service });
|
|
84
116
|
}
|
|
85
117
|
},
|
|
86
118
|
|
|
@@ -93,9 +125,10 @@ Package("com.qcobjects.services.github", [
|
|
|
93
125
|
url = "https://api.github.com/search/repositories?q=qcobjects";
|
|
94
126
|
withCredentials = false;
|
|
95
127
|
|
|
96
|
-
done
|
|
128
|
+
done({ request, service }: StandardResponse) {
|
|
97
129
|
logger.debug(request);
|
|
98
|
-
const result = JSON.parse(service.template)
|
|
130
|
+
const result:ItemsProject = (JSON.parse(service.template) as GitHubTagServiceResponse)
|
|
131
|
+
.items.map(function (project: Project) {
|
|
99
132
|
return {
|
|
100
133
|
id: project.id,
|
|
101
134
|
description: project.description,
|
|
@@ -108,20 +141,20 @@ Package("com.qcobjects.services.github", [
|
|
|
108
141
|
service.template = JSON.stringify({
|
|
109
142
|
result
|
|
110
143
|
});
|
|
111
|
-
return super.done(
|
|
144
|
+
return super.done({ request, service });
|
|
112
145
|
}
|
|
113
146
|
},
|
|
114
147
|
|
|
115
148
|
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
|
|
149
|
+
name = "qcobjects_version_service";
|
|
150
|
+
external = true;
|
|
151
|
+
cached = false;
|
|
152
|
+
method = "GET";
|
|
153
|
+
headers = { "Content-Type": "application/json" };
|
|
154
|
+
url = "https://api.github.com/repos/QuickCorp/QCObjects/tags";
|
|
155
|
+
withCredentials = false;
|
|
156
|
+
|
|
157
|
+
done({ service }: StandardResponse) {
|
|
125
158
|
const latest = JSON.parse(service.template)[0];
|
|
126
159
|
service.template = {
|
|
127
160
|
version: latest.name
|
|
@@ -131,16 +164,16 @@ Package("com.qcobjects.services.github", [
|
|
|
131
164
|
},
|
|
132
165
|
|
|
133
166
|
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
|
|
143
|
-
const repo = JSON.parse(service.template);
|
|
167
|
+
name = "qcobjects_stars_forks_service";
|
|
168
|
+
external = true;
|
|
169
|
+
cached = false;
|
|
170
|
+
method = "GET";
|
|
171
|
+
headers = { "Content-Type": "application/json" };
|
|
172
|
+
url = "https://api.github.com/repos/QuickCorp/QCObjects";
|
|
173
|
+
withCredentials = false;
|
|
174
|
+
|
|
175
|
+
done({ service }: StandardResponse) {
|
|
176
|
+
const repo:Project = (JSON.parse(service.template) as Project);
|
|
144
177
|
service.template = {
|
|
145
178
|
forks: repo.forks_count,
|
|
146
179
|
stars: repo.stargazers_count,
|
|
@@ -150,5 +183,4 @@ Package("com.qcobjects.services.github", [
|
|
|
150
183
|
}
|
|
151
184
|
|
|
152
185
|
}
|
|
153
|
-
|
|
154
186
|
]);
|
|
File without changes
|