qcobjects-sdk 2.4.5 → 2.4.8

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 (31) hide show
  1. package/.eslintrc.json +26 -21
  2. package/QCObjects-SDK.js +47 -47
  3. package/VERSION +1 -1
  4. package/demo-tests/test-component-grid.html +43 -30
  5. package/demo-tests/test-component-list.html +31 -23
  6. package/demo-tests/test-component-notifications.html +31 -12
  7. package/demo-tests/test-component-slider.html +47 -31
  8. package/js/org.qcobjects.cloud.auth.session.data.js +106 -47
  9. package/js/org.qcobjects.cloud.auth.session.usertoken.js +64 -54
  10. package/js/org.qcobjects.components.grid.js +46 -34
  11. package/js/org.qcobjects.components.js +137 -80
  12. package/js/org.qcobjects.components.list.js +27 -18
  13. package/js/org.qcobjects.components.notifications.js +73 -58
  14. package/js/org.qcobjects.components.slider.js +174 -151
  15. package/js/org.qcobjects.components.splashscreen.js +480 -460
  16. package/js/org.qcobjects.controllers.form.js +38 -20
  17. package/js/org.qcobjects.controllers.grid.js +46 -25
  18. package/js/org.qcobjects.controllers.js +38 -6
  19. package/js/org.qcobjects.controllers.list.js +169 -157
  20. package/js/org.qcobjects.controllers.slider.js +113 -97
  21. package/js/org.qcobjects.controllers.swagger.js +60 -51
  22. package/js/org.qcobjects.effects.js +149 -124
  23. package/js/org.qcobjects.i18n_messages.js +11 -6
  24. package/js/org.qcobjects.modal.controllers.js +14 -9
  25. package/js/org.qcobjects.modal.effects.js +25 -16
  26. package/js/org.qcobjects.models.js +19 -11
  27. package/js/org.qcobjects.tools.canvas.js +10 -6
  28. package/js/org.qcobjects.tools.js +17 -8
  29. package/js/org.qcobjects.tools.layouts.js +19 -8
  30. package/js/org.qcobjects.views.js +12 -7
  31. package/package.json +3 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * QCObjects SDK 2.3
2
+ * QCObjects SDK 2.4
3
3
  * ________________
4
4
  *
5
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -25,16 +25,24 @@
25
25
  (function() {
26
26
  "use strict";
27
27
  Package("org.qcobjects.models",[
28
- Class("Contact",VO,{
29
- first_name:"",
30
- last_name:"",
31
- address:"",
32
- postalCode:"",
33
- city:"",
34
- country:"",
35
- email:"",
36
- phone:""
37
- })
28
+
29
+ class Contact extends VO {
30
+
31
+ constructor (){
32
+ super();
33
+ this.first_name="";
34
+ this.last_name="";
35
+ this.address="";
36
+ this.postalCode="";
37
+ this.city="";
38
+ this.country="";
39
+ this.email="";
40
+ this.phone="";
41
+
42
+ }
43
+
44
+ }
45
+
38
46
  ]);
39
47
 
40
48
  }).call(null);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * QCObjects SDK 2.3
2
+ * QCObjects SDK 2.4
3
3
  * ________________
4
4
  *
5
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -25,8 +25,10 @@
25
25
  "use strict";
26
26
  (function() {
27
27
  Package("org.qcobjects.tools.canvas",[
28
- Class("CanvasTool",{
29
- drawImageFilled: function (img,canvas,zoom=1,px=0,py=0){
28
+
29
+ class CanvasTool extends InheritClass {
30
+
31
+ drawImageFilled (img, canvas, zoom=1, px=0, py=0){
30
32
  // get the scale
31
33
  var scale = Math.max(canvas.width / img.width, canvas.height / img.height);
32
34
  scale = scale*zoom;
@@ -35,8 +37,9 @@
35
37
  var y = (canvas.height / 2) - (img.height / 2) * scale;
36
38
  var ctx = canvas.getContext("2d");
37
39
  ctx.drawImage(img, (px+x), (py+y), img.width * scale, img.height * scale);
38
- },
39
- getImageResized: function (img,width,height,resizedImage,zoom=1,px=0,py=0){
40
+ }
41
+
42
+ getImageResized (img, width, height, resizedImage, zoom=1, px=0, py=0){
40
43
  var canvas = document.createElement("canvas");
41
44
  canvas.width = width;
42
45
  canvas.height = height;
@@ -46,7 +49,8 @@
46
49
  resizedImage.src = canvas.toDataURL("image/png");
47
50
  return canvas;
48
51
  }
49
- })
52
+
53
+ }
50
54
  ]);
51
55
 
52
56
  }).call(null);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * QCObjects SDK 2.3
2
+ * QCObjects SDK 2.4
3
3
  * ________________
4
4
  *
5
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -25,13 +25,21 @@
25
25
  "use strict";
26
26
  (function() {
27
27
  Package("org.qcobjects.tools",[
28
- Class("Process",Timer,{
29
- steps:[],
30
- currentStep:0,
31
- stop: function (){
28
+
29
+ class Process extends Timer {
30
+
31
+ constructor () {
32
+ super();
33
+ this.steps=[];
34
+ this.currentStep=0;
35
+
36
+ }
37
+
38
+ stop (){
32
39
  this.alive=false;
33
- },
34
- start: function (){
40
+ }
41
+
42
+ start (){
35
43
  var process = this;
36
44
  process.alive=true;
37
45
  this.thread({
@@ -53,7 +61,8 @@
53
61
  }
54
62
  });
55
63
  }
56
- })
64
+ }
65
+
57
66
  ]);
58
67
 
59
68
  }).call(null);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * QCObjects SDK 2.3
2
+ * QCObjects SDK 2.4
3
3
  * ________________
4
4
  *
5
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -25,16 +25,24 @@
25
25
  "use strict";
26
26
  (function() {
27
27
  Package("org.qcobjects.tools.layouts",[
28
- Class("BasicLayout",Object,{
29
- dependencies:[],
30
- component:null,
31
- load:function (){
28
+
29
+ class BasicLayout extends InheritClass {
30
+
31
+ constructor () {
32
+ super();
33
+ this.dependencies=[];
34
+ this.component=null;
35
+
36
+ }
37
+
38
+ load (){
32
39
  this.dependencies.push(New(SourceCSS,{
33
40
  external:(CONFIG.get("useLocalSDK"))?(false):(true),
34
41
  url:(CONFIG.get("useLocalSDK"))?("css/basic-layout.css"):(CONFIG.get("remoteSDKPath")+"css/basic-layout.css")
35
42
  }));
36
- },
37
- coloredBorder:function (){
43
+ }
44
+
45
+ coloredBorder (){
38
46
  /*
39
47
  * A helper function to visualize the layout borders
40
48
  * Usage: BasicLayout.coloredBorder()
@@ -65,7 +73,10 @@
65
73
  Tag("component>article:nth-child(2)").map(element=>{element.style.display="block";element.width=element.offsetParent.scrollWidth;MoveXInFromRight.apply(element);});
66
74
  },300);
67
75
  }
68
- })
76
+
77
+
78
+ }
79
+
69
80
  ]);
70
81
 
71
82
  }).call(null);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * QCObjects SDK 2.3
2
+ * QCObjects SDK 2.4
3
3
  * ________________
4
4
  *
5
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -25,13 +25,18 @@
25
25
  (function() {
26
26
  "use strict";
27
27
  Package("org.qcobjects.views",[
28
- Class("GridView",View,{
29
- dependencies:[],
30
- component:null,
31
- _new_:function (o){
32
- this.__new__(o);
28
+
29
+ class GridView extends View {
30
+
31
+ constructor (){
32
+ super();
33
+ this.dependencies=[];
34
+ this.component=null;
35
+
33
36
  }
34
- })
37
+
38
+ }
39
+
35
40
  ]);
36
41
 
37
42
  }).call(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects-sdk",
3
- "version": "2.4.5",
3
+ "version": "2.4.8",
4
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": {
@@ -30,8 +30,7 @@
30
30
  ],
31
31
  "devDependencies": {
32
32
  "eslint": "^8.4.0",
33
- "eslint-config-qcobjects": "^0.0.13",
34
- "qcobjects": "2.4-beta"
33
+ "qcobjects": "^2.4.23-beta"
35
34
  },
36
35
  "author": "Jean Machuca <correojean@gmail.com>",
37
36
  "license": "LGPL-3.0",
@@ -43,6 +42,6 @@
43
42
  "jasmine": "^3.6.3"
44
43
  },
45
44
  "peerDependencies": {
46
- "qcobjects": ">=2.4"
45
+ "qcobjects": ">=2.3"
47
46
  }
48
47
  }