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,7 +25,8 @@
25
25
  (function() {
26
26
  "use strict";
27
27
  Package("org.qcobjects.controllers.form",[
28
- Class("FormValidations",Controller,{
28
+
29
+ class FormValidations extends Controller {
29
30
  getDefault (){
30
31
  return function (fieldName, dataValue, element){
31
32
  var _regex = {
@@ -37,16 +38,24 @@ Package("org.qcobjects.controllers.form",[
37
38
  return pattern.test(dataValue);
38
39
  };
39
40
  }
40
- }),
41
- Class("FormController",Controller,{
42
- dependencies:[],
43
- component:null,
44
- serviceClass:"",
45
- formSettings:{
46
- backRouting:"#",
47
- loadingRouting:"#loading",
48
- nextRouting:"#signupsuccessful"
49
- },
41
+
42
+ },
43
+
44
+ class FormController extends Controller {
45
+
46
+ constructor (){
47
+ super();
48
+ this.dependencies=[];
49
+ this.component=null;
50
+ this.serviceClass="";
51
+ this.formSettings={
52
+ backRouting:"#",
53
+ loadingRouting:"#loading",
54
+ nextRouting:"#signupsuccessful"
55
+ };
56
+
57
+ }
58
+
50
59
  hasValidation (element){
51
60
  var controller = this;
52
61
  var fieldName = element.getAttribute("data-field");
@@ -56,7 +65,8 @@ Package("org.qcobjects.controllers.form",[
56
65
  _hasValidation = true;
57
66
  }
58
67
  return _hasValidation;
59
- },
68
+ }
69
+
60
70
  isInvalid (element){
61
71
  var controller = this;
62
72
  var _isInvalid = false;
@@ -75,10 +85,12 @@ Package("org.qcobjects.controllers.form",[
75
85
  _isInvalid = true;
76
86
  }
77
87
  return _isInvalid;
78
- },
88
+ }
89
+
79
90
  isValid (element){
80
91
  return !this.isInvalid(element);
81
- },
92
+ }
93
+
82
94
  save (){
83
95
  var controller = this;
84
96
  if (controller.serviceClass !== ""){
@@ -105,7 +117,8 @@ Package("org.qcobjects.controllers.form",[
105
117
  logger.debug("No service name declared on serviceClass property");
106
118
  }
107
119
 
108
- },
120
+ }
121
+
109
122
  formSaveTouchHandler (){
110
123
  logger.debug("Saving data...");
111
124
  var controller = this;
@@ -157,13 +170,15 @@ Package("org.qcobjects.controllers.form",[
157
170
  logger.debug("Saving data...");
158
171
  controller.save();
159
172
  }
160
- },
173
+ }
174
+
161
175
  _new_ (o){
176
+ super.__new__(o);
162
177
  var controller = this;
163
- this.__new__(o);
164
178
  controller.component = o.component;
165
179
  controller.component = controller.component.Cast(FormField);
166
- },
180
+ }
181
+
167
182
  done (){
168
183
  logger.debugEnabled=true;
169
184
  var controller=this;
@@ -190,7 +205,10 @@ Package("org.qcobjects.controllers.form",[
190
205
  });
191
206
 
192
207
  }
193
- })
208
+
209
+
210
+ }
211
+
194
212
  ]);
195
213
 
196
214
  }).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,18 +25,26 @@
25
25
  (function() {
26
26
  "use strict";
27
27
  Package("org.qcobjects.controllers.grid",[
28
- Class("GridController",Controller,{
29
- dependencies:[],
30
- component:null,
31
- _new_:function (o){
32
- this.__new__(o);
28
+
29
+ class GridComponent extends Controller {
30
+
31
+ constructor (){
32
+ super();
33
+ this.dependencies=[];
34
+ this.component=null;
35
+
36
+ }
37
+
38
+ _new_ (o){
39
+ super.__new__(o);
33
40
  var controller=this;
34
41
  controller.rows=controller.component.body.getAttribute("rows");
35
42
  controller.rows=(controller.rows !== null)?(controller.rows):(controller.component.rows);
36
43
  controller.cols=controller.component.body.getAttribute("cols");
37
44
  controller.cols=(controller.cols !== null)?(controller.cols):(controller.component.cols);
38
- },
39
- cssGrid: function (){
45
+ }
46
+
47
+ cssGrid (){
40
48
  var controller=this;
41
49
  var component = controller.component;
42
50
  var _componentRoot = (component.shadowed)?(component.shadowRoot):(component.body);
@@ -58,20 +66,28 @@ Package("org.qcobjects.controllers.grid",[
58
66
  _componentRoot.classList.add(className);
59
67
  }
60
68
  }
61
- },
62
- done: function (){
69
+ }
70
+
71
+ done (){
63
72
  var controller=this;
64
73
  controller.cssGrid();
65
74
 
66
75
  logger.debug("GridComponent built");
67
76
 
68
77
  }
69
- }),
70
- Class("DataGridController",Controller,{
71
- dependencies:[],
72
- component:null,
73
- _new_:function (o){
74
- this.__new__(o);
78
+
79
+ },
80
+
81
+ class DataGridController extends Controller {
82
+ constructor (){
83
+ super();
84
+ this.dependencies=[];
85
+ this.component=null;
86
+
87
+ }
88
+
89
+ _new_ (o){
90
+ super.__new__(o);
75
91
  var controller=this;
76
92
  var component = controller.component;
77
93
  controller._componentRoot = (component.shadowed)?(component.shadowRoot):(component.body);
@@ -80,15 +96,17 @@ Package("org.qcobjects.controllers.grid",[
80
96
  controller.cols=controller.component.body.getAttribute("cols");
81
97
  controller.cols=(controller.cols !== null)?(controller.cols):(controller.component.cols);
82
98
  logger.debug("DataGridController INIT");
83
- },
84
- getPageIndex: function (page, totalPage, totalElements) {
99
+ }
100
+
101
+ getPageIndex (page, totalPage, totalElements) {
85
102
  page = new Number(page);
86
103
  page = (page>0)?(page-1):(0);
87
104
  totalPage = new Number(totalPage);
88
105
  totalElements = new Number(totalElements);
89
106
  return [totalElements*page/ totalPage, (totalElements*page/ totalPage) + totalElements/totalPage];
90
- },
91
- addSubcomponents:function (){
107
+ }
108
+
109
+ addSubcomponents (){
92
110
  var controller = this;
93
111
  controller.component.subcomponents = [];
94
112
  controller._componentRoot.innerHTML = "";
@@ -181,8 +199,9 @@ Package("org.qcobjects.controllers.grid",[
181
199
  } catch (e){
182
200
  logger.debug("No data for component");
183
201
  }
184
- },
185
- cssGrid: function (){
202
+ }
203
+
204
+ cssGrid (){
186
205
  var controller=this;
187
206
  var component = controller.component;
188
207
  var _componentRoot = (component.shadowed)?(component.shadowRoot):(component.body);
@@ -205,8 +224,9 @@ Package("org.qcobjects.controllers.grid",[
205
224
  _componentRoot.classList.add(className);
206
225
  }
207
226
  }
208
- },
209
- done:function (){
227
+ }
228
+
229
+ done (){
210
230
  var controller = this;
211
231
  var componentInstance = controller.component;
212
232
  logger.debug("DataGridController DONE");
@@ -260,8 +280,9 @@ Package("org.qcobjects.controllers.grid",[
260
280
  }
261
281
 
262
282
  }
283
+
263
284
 
264
- })
285
+ }
265
286
 
266
287
  ]);
267
288
 
@@ -1,10 +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() {
1
26
  "use strict";
2
27
  Package("org.qcobjects.controllers",[
3
- Class("GenericController",Controller,{
4
- dependencies:[],
5
- component:null,
6
- _new_:function (o){
7
- this.__new__(o);
28
+
29
+ class GenericController extends Controller {
30
+ constructor () {
31
+ super();
32
+ this.dependencies=[];
33
+ this.component=null;
34
+
8
35
  }
9
- })
36
+
37
+
38
+ }
39
+
10
40
  ]);
41
+
42
+ }).call(null);