qcobjects-sdk 0.0.1 → 0.0.3
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.json +28 -0
- 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-beta.yml +38 -0
- package/.github/workflows/npmpublish-lts.yml +38 -0
- package/.github/workflows/npmpublish-main.yml +38 -0
- package/CHANGELOG.md +47 -0
- package/QCObjects-SDK.js +108 -232
- package/README.md +951 -6
- package/VERSION +1 -0
- package/css/base-modal.css +43 -0
- package/css/basic-layout-embedded-nav.css +14 -0
- package/css/basic-layout.css +76 -0
- package/css/components/horizontal-list.css +64 -0
- package/css/components/list.css +57 -0
- package/css/components/splashscreen.css +111 -0
- package/css/modal.css +46 -0
- package/demo-tests/test-component-grid.html +63 -0
- package/demo-tests/test-component-list.html +53 -0
- package/demo-tests/test-component-notifications.html +49 -0
- package/demo-tests/test-component-slider.html +68 -0
- package/favicon.ico +0 -0
- package/js/org.qcobjects.cloud.auth.session.data.js +136 -0
- package/js/org.qcobjects.cloud.auth.session.usertoken.js +107 -0
- package/js/org.qcobjects.components.grid.js +71 -0
- package/js/org.qcobjects.components.js +277 -0
- package/js/org.qcobjects.components.list.js +57 -0
- package/js/org.qcobjects.components.notifications.js +190 -0
- package/js/org.qcobjects.components.slider.js +217 -0
- package/js/org.qcobjects.components.splashscreen.js +622 -0
- package/js/org.qcobjects.controllers.form.js +214 -0
- package/js/org.qcobjects.controllers.grid.js +289 -0
- package/js/org.qcobjects.controllers.js +42 -0
- package/js/org.qcobjects.controllers.list.js +241 -0
- package/js/org.qcobjects.controllers.slider.js +148 -0
- package/js/org.qcobjects.controllers.swagger.js +86 -0
- package/js/org.qcobjects.effects.js +388 -0
- package/js/org.qcobjects.i18n_messages.js +58 -0
- package/js/org.qcobjects.modal.controllers.js +47 -0
- package/js/org.qcobjects.modal.effects.js +57 -0
- package/js/org.qcobjects.models.js +48 -0
- package/js/org.qcobjects.tools.canvas.js +59 -0
- package/js/org.qcobjects.tools.js +68 -0
- package/js/org.qcobjects.tools.layouts.js +82 -0
- package/js/org.qcobjects.views.js +42 -0
- package/package.json +17 -4
- package/spec/support/jasmine.json +16 -0
- package/spec/testsSpec.js +9 -0
- package/templates/components/modalyoulose.tpl.html +3 -0
- package/templates/components/modalyouwin.tpl.html +4 -0
- package/templates/components/splashscreen.tpl.html +128 -0
- package/templates/components/swagger-ui.tpl.html +22 -0
- package/v2.4 version +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QCObjects SDK 2.4
|
|
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
|
+
"use strict";
|
|
26
|
+
(function() {
|
|
27
|
+
Package("org.qcobjects.tools",[
|
|
28
|
+
|
|
29
|
+
class Process extends Timer {
|
|
30
|
+
|
|
31
|
+
constructor () {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.steps=[];
|
|
34
|
+
this.currentStep=0;
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
stop (){
|
|
39
|
+
this.alive=false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
start (){
|
|
43
|
+
var process = this;
|
|
44
|
+
process.alive=true;
|
|
45
|
+
this.thread({
|
|
46
|
+
duration: this.duration,
|
|
47
|
+
timing(timeFraction) {
|
|
48
|
+
process.currentStep+=1;
|
|
49
|
+
process.map(function (p){
|
|
50
|
+
if (typeof p == "function"){
|
|
51
|
+
Promise.resolve().then(
|
|
52
|
+
function (){
|
|
53
|
+
p.call(process);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return timeFraction;
|
|
58
|
+
},
|
|
59
|
+
draw(progress) {
|
|
60
|
+
logger.debug("process execution progress: "+progress.toString());
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
}).call(null);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QCObjects SDK 2.4
|
|
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
|
+
"use strict";
|
|
26
|
+
(function() {
|
|
27
|
+
Package("org.qcobjects.tools.layouts",[
|
|
28
|
+
|
|
29
|
+
class BasicLayout extends InheritClass {
|
|
30
|
+
|
|
31
|
+
constructor () {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.dependencies=[];
|
|
34
|
+
this.component=null;
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
load (){
|
|
39
|
+
this.dependencies.push(New(SourceCSS,{
|
|
40
|
+
external:(CONFIG.get("useLocalSDK"))?(false):(true),
|
|
41
|
+
url:(CONFIG.get("useLocalSDK"))?("css/basic-layout.css"):(CONFIG.get("remoteSDKPath")+"css/basic-layout.css")
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
coloredBorder (){
|
|
46
|
+
/*
|
|
47
|
+
* A helper function to visualize the layout borders
|
|
48
|
+
* Usage: BasicLayout.coloredBorder()
|
|
49
|
+
*/
|
|
50
|
+
setTimeout(function (){
|
|
51
|
+
Tag("nav").map(element=>element.style.border="20px solid #3333");
|
|
52
|
+
Tag("nav").map(element=>element.style.backgroundColor="#129999");
|
|
53
|
+
Tag("component>footer").map(element=>element.style.background="#876");
|
|
54
|
+
Tag("component>div").map(element=>element.style.border="3px dashed #fff");
|
|
55
|
+
Tag("component>section").map(element=>element.style.border="3px solid #000");
|
|
56
|
+
Tag("component>section").map(element=>element.style.backgroundColor="#fffaaa");
|
|
57
|
+
|
|
58
|
+
Tag("component>article").map(element=>element.style.border="3px dotted #000");
|
|
59
|
+
Tag("component>header").map(element=>element.style.background="#789");
|
|
60
|
+
Tag("component>footer").map(element=>element.style.background="#876");
|
|
61
|
+
Tag("component>article:nth-child(1)").map(element=>element.style.border="1px solid #444");
|
|
62
|
+
Tag("component>article:nth-child(1)").map(element=>element.style.backgroundColor="#555aaa");
|
|
63
|
+
Tag("component>article:nth-child(2)").map(element=>element.style.backgroundColor="#aaa333");
|
|
64
|
+
Tag("component>article:nth-child(3)").map(element=>element.style.backgroundColor="#54da82");
|
|
65
|
+
Tag("*").map(element=>element.style.color="#fff");
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
Tag("component>article").map(element=>Fade.apply(element,0,1));
|
|
69
|
+
Tag("component>footer").map(element=>Fade.apply(element,0,1));
|
|
70
|
+
Tag("component>header").map(element=>Fade.apply(element,0,1));
|
|
71
|
+
Tag("nav").map(element=>{element.style.display="block";element.width=element.offsetParent.scrollWidth;MoveXInFromLeft.apply(element);});
|
|
72
|
+
Tag("component>article").map(element=>{element.style.display="block";element.height=element.offsetParent.scrollHeight;MoveYInFromBottom.apply(element);});
|
|
73
|
+
Tag("component>article:nth-child(2)").map(element=>{element.style.display="block";element.width=element.offsetParent.scrollWidth;MoveXInFromRight.apply(element);});
|
|
74
|
+
},300);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
]);
|
|
81
|
+
|
|
82
|
+
}).call(null);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QCObjects SDK 2.4
|
|
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
|
+
(function() {
|
|
26
|
+
"use strict";
|
|
27
|
+
Package("org.qcobjects.views",[
|
|
28
|
+
|
|
29
|
+
class GridView extends View {
|
|
30
|
+
|
|
31
|
+
constructor (){
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.dependencies=[];
|
|
34
|
+
this.component=null;
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
}).call(null);
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjects-sdk",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "QCObjects SDK
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "QCObjects SDK is a set of Controllers, Views and Components that are elementary and useful to assist developers to build applications under MVC patterns using QCObjects, Cross Browser Javascript Framework for MVC Patterns",
|
|
5
5
|
"main": "QCObjects-SDK.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "
|
|
7
|
+
"test": "npm cache verify && (npx eslint *.js js/*.js --fix) && jasmine",
|
|
8
|
+
"sync": "git add . && git commit -am ",
|
|
9
|
+
"preversion": "npm cache verify && npm test",
|
|
10
|
+
"postversion": "git push && git push --tags"
|
|
8
11
|
},
|
|
9
12
|
"repository": {
|
|
10
13
|
"type": "git",
|
|
@@ -25,10 +28,20 @@
|
|
|
25
28
|
"web",
|
|
26
29
|
"webcomponents"
|
|
27
30
|
],
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"eslint": "^8.4.0",
|
|
33
|
+
"qcobjects": "^2.4.23-beta"
|
|
34
|
+
},
|
|
28
35
|
"author": "Jean Machuca <correojean@gmail.com>",
|
|
29
36
|
"license": "LGPL-3.0",
|
|
30
37
|
"bugs": {
|
|
31
38
|
"url": "https://github.com/QuickCorp/QCObjects-SDK/issues"
|
|
32
39
|
},
|
|
33
|
-
"homepage": "https://
|
|
40
|
+
"homepage": "https://sdk.qcobjects.dev",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"jasmine": "^3.6.3"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"qcobjects": "^2.4.32-beta"
|
|
46
|
+
}
|
|
34
47
|
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
:host * {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host {
|
|
7
|
+
zoom: 1.0;
|
|
8
|
+
width: device-width;
|
|
9
|
+
margin: 0;
|
|
10
|
+
top: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
right: 0;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
position: absolute;
|
|
15
|
+
padding: 0;
|
|
16
|
+
min-width: 100vw;
|
|
17
|
+
min-height: 100vh;
|
|
18
|
+
width: 100vw;
|
|
19
|
+
height: 100vh;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
background-color: black;
|
|
22
|
+
}
|
|
23
|
+
#slot-logo::slotted(img) {
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100vw;
|
|
27
|
+
left: 0;
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
top: 20vh;
|
|
31
|
+
bottom: 20vh;
|
|
32
|
+
position: absolute;
|
|
33
|
+
z-index: 9999999999;
|
|
34
|
+
transform-origin: center;
|
|
35
|
+
transform-style: preserve-3d;
|
|
36
|
+
filter: blur(0em);
|
|
37
|
+
transition: filter 0.5s;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host * {
|
|
41
|
+
-webkit-user-select: none;
|
|
42
|
+
-moz-user-select: none;
|
|
43
|
+
-ms-user-select: none;
|
|
44
|
+
user-select: none;
|
|
45
|
+
-webkit-touch-callout: none;
|
|
46
|
+
/* prevent callout to copy image, etc when tap to hold */
|
|
47
|
+
-webkit-text-size-adjust: none;
|
|
48
|
+
/* prevent webkit from resizing text to fit */
|
|
49
|
+
-webkit-user-select: none;
|
|
50
|
+
/* prevent copy paste, to allow, change 'none' to 'text' */
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* FOCUS */
|
|
54
|
+
:host summary:focus,
|
|
55
|
+
:host a:focus,
|
|
56
|
+
:host button:focus {
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.splashscreen,
|
|
61
|
+
.fullscreen-bg {
|
|
62
|
+
padding: 0;
|
|
63
|
+
margin: 0;
|
|
64
|
+
top: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
padding: 0;
|
|
69
|
+
background-attachment: fixed;
|
|
70
|
+
background-position: center;
|
|
71
|
+
background-clip: content-box;
|
|
72
|
+
background-size: cover;
|
|
73
|
+
position: absolute;
|
|
74
|
+
min-width: 100vw;
|
|
75
|
+
min-height: 100vh;
|
|
76
|
+
width: 100vw;
|
|
77
|
+
height: 100vh;
|
|
78
|
+
z-index: 0;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.splashscreen .splashcontent {
|
|
83
|
+
top: 0;
|
|
84
|
+
left: 0;
|
|
85
|
+
right: 0;
|
|
86
|
+
bottom: 0;
|
|
87
|
+
margin: 0 auto;
|
|
88
|
+
width: 100vw;
|
|
89
|
+
height: 100vh;
|
|
90
|
+
padding: 0;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
z-index: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.splashscreen .splashcontent p {
|
|
96
|
+
color: white;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
video.fullscreen-bg__video {
|
|
100
|
+
top: 0;
|
|
101
|
+
left: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
right: 0;
|
|
104
|
+
margin: 0;
|
|
105
|
+
padding: 0;
|
|
106
|
+
position: absolute;
|
|
107
|
+
min-width: 100vw;
|
|
108
|
+
min-height: 100vh;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
z-index: 0;
|
|
111
|
+
object-fit: cover;
|
|
112
|
+
}
|
|
113
|
+
.splashscreen,
|
|
114
|
+
.fullscreen-bg {
|
|
115
|
+
background-image: url('{{background}}');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
</style>
|
|
119
|
+
<div class="splashscreen">
|
|
120
|
+
<div class="fullscreen-bg splashcontent">
|
|
121
|
+
<video loop muted autoplay playsinline name="media" poster="{{background}}" class="fullscreen-bg__video" data-setup="{}" height="100%">
|
|
122
|
+
<source src="{{video_mp4}}" type="video/mp4">
|
|
123
|
+
<source src="{{video_ogg}}" type="video/ogg">
|
|
124
|
+
<source src="{{video_webm}}" type="video/webm">
|
|
125
|
+
</video>
|
|
126
|
+
<slot id="slot-logo" name="logo"></slot>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
html
|
|
3
|
+
{
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
overflow: -moz-scrollbars-vertical;
|
|
6
|
+
overflow-y: scroll;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
*,
|
|
10
|
+
*:before,
|
|
11
|
+
*:after
|
|
12
|
+
{
|
|
13
|
+
box-sizing: inherit;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
body
|
|
17
|
+
{
|
|
18
|
+
margin:0;
|
|
19
|
+
background: #fafafa;
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
22
|
+
<div id="swagger-ui"></div>
|
package/v2.4 version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.3
|