qcobjects-sdk 2.4.55 → 2.4.57

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.55
1
+ 2.4.57
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects-sdk",
3
- "version": "2.4.55",
3
+ "version": "2.4.57",
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": "src/index.cjs",
6
6
  "module": "src/index.mjs",
@@ -29,40 +29,49 @@ Package("org.qcobjects.components.base", [
29
29
  cached = false;
30
30
  shadowed= true;
31
31
 
32
- constructor (o) {
33
- o.name = "splashscreen";
34
- super(o);
32
+ constructor (component) {
33
+ component.name = "splashscreen";
35
34
 
36
35
  var isBrowser = typeof window !== "undefined" && typeof window.self !== "undefined" && window === window.self;
37
- let component = this;
38
36
  var isStartURL = (location.hash === ""
39
37
  && location.pathname === "/" && location.search === "")
40
38
  || CONFIG.get("routingWay") === "hash" && CONFIG.get("start_url","/") === location.hash
41
39
  || CONFIG.get("routingWay") === "pathname" && CONFIG.get("start_url","/") === location.pathname
42
40
  || CONFIG.get("routingWay") === "search" && CONFIG.get("start_url","/") === location.search;
43
41
  var _enabled_ = isBrowser && isStartURL;
42
+
44
43
  if (_enabled_){
45
44
  component.basePath = CONFIG.get("splashscreenBasePath",CONFIG.get("remoteSDKPath"));
46
- o.data.basePath = component.basePath;
45
+ if (typeof component.data === "undefined"){
46
+ component.data = {};
47
+ }
48
+ component.data.basePath = component.basePath;
49
+ } else {
50
+ component.body.style.display="none";
51
+ }
52
+ super(component);
53
+ this._enabled_ = _enabled_;
54
+
55
+ if (this._enabled_){
47
56
  var displayEffectDuration = 1000;
48
- var duration = component.body.getAttribute("duration");
57
+ var duration = this.body.getAttribute("duration");
49
58
  if (duration === null){
50
- duration = 3000;
59
+ duration = displayEffectDuration;
51
60
  } else {
52
61
  duration = parseInt(duration);
53
62
  }
54
- component._bgcolor = document.body.style.backgroundColor;
55
- var _helper_ = function (){
63
+ this._bgcolor = this.body.style.backgroundColor;
64
+
65
+ var _helper_ = () => {
56
66
  if (!_helper_.executed){
57
- var component = this;
58
- var _componentRoot = (component.shadowed)?(component.shadowRoot.host):(component.body);
67
+ var _componentRoot = (this.shadowed)?(this.shadowRoot.host):(this.body);
59
68
  global.componentsStack.filter(c=>c.body.hasAttribute("splashscreen")).map(
60
- function (mainComponent){
69
+ (mainComponent) => {
61
70
  logger.debug("Splash Screen of Main Component:",mainComponent.name);
62
- mainComponent.splashScreenComponent = component;
71
+ mainComponent.splashScreenComponent = this;
63
72
  function SplashScreenHandler (){
64
73
  if (!SplashScreenHandler.executed){
65
- var mainComponent = this;
74
+ var mainComponent = this; /* here this is bound to mainComponent */
66
75
  var component = mainComponent.splashScreenComponent;
67
76
  var mainElement = (mainComponent.shadowed)?(mainComponent.shadowRoot.host):(mainComponent.body);
68
77
  mainComponent._mainPosition = mainElement.style.position;
@@ -99,11 +108,9 @@ Package("org.qcobjects.components.base", [
99
108
  }
100
109
  };
101
110
  _helper_.executed=false;
102
- component.addComponentHelper(_helper_.bind(component));
103
- } else {
104
- component.body.style.display="none";
111
+ this.addComponentHelper(_helper_.bind(component));
105
112
  }
106
-
113
+
107
114
  }
108
115
 
109
116
 
@@ -167,11 +167,10 @@ Package("org.qcobjects.controllers.form",[
167
167
  }
168
168
  }
169
169
 
170
- _new_ (o){
171
- super.__new__(o);
172
- var controller = this;
173
- controller.component = o.component;
174
- controller.component = controller.component.Cast(FormField);
170
+ constructor (o){
171
+ super(o);
172
+ this.component = o.component;
173
+ this.component = this.component.Cast(FormField);
175
174
  }
176
175
 
177
176
  done (){
@@ -26,13 +26,7 @@
26
26
  (function () {
27
27
  Package("org.qcobjects.effects.base", [
28
28
  class Fade extends Effect {
29
- constructor({
30
- duration = 1000
31
- }) {
32
- super({
33
- duration
34
- });
35
- }
29
+ duration = 1000;
36
30
 
37
31
  apply(element, alphaFrom, alphaTo) {
38
32
  var da = alphaTo - alphaFrom;
@@ -52,13 +46,7 @@
52
46
  },
53
47
 
54
48
  class Move extends Effect {
55
- constructor({
56
- duration = 1000
57
- }) {
58
- super({
59
- duration
60
- });
61
- }
49
+ duration = 1000;
62
50
 
63
51
  apply(element, xfrom, yfrom, xto, yto) {
64
52
  var dx = xto - xfrom;
@@ -88,13 +76,7 @@
88
76
 
89
77
 
90
78
  class MoveXInFromRight extends Move {
91
- constructor({
92
- duration = 1000
93
- }) {
94
- super({
95
- duration
96
- });
97
- }
79
+ duration = 1000;
98
80
 
99
81
  apply(element) {
100
82
  super.apply.call(this, element, element.width, 0, 0, 0);
@@ -102,14 +84,7 @@
102
84
  },
103
85
 
104
86
  class MoveXInFromLeft extends Move {
105
-
106
- constructor({
107
- duration = 1000
108
- }) {
109
- super({
110
- duration
111
- });
112
- }
87
+ duration = 1000;
113
88
 
114
89
  apply(element) {
115
90
  super.apply.call(this, element, -element.width, 0, 0, 0);
@@ -117,13 +92,7 @@
117
92
  },
118
93
 
119
94
  class MoveYInFromBottom extends Move {
120
- constructor({
121
- duration = 1000
122
- }) {
123
- super({
124
- duration
125
- });
126
- }
95
+ duration = 1000;
127
96
 
128
97
  apply(element) {
129
98
  super.apply.call(this, element, 0, element.height, 0, 0);
@@ -132,14 +101,7 @@
132
101
  },
133
102
 
134
103
  class MoveYInFromTop extends Move {
135
-
136
- constructor({
137
- duration = 1000
138
- }) {
139
- super({
140
- duration
141
- });
142
- }
104
+ duration = 1000;
143
105
 
144
106
  apply(element) {
145
107
  super.apply.call(this, element, 0, -element.height, 0, 0);
@@ -147,14 +109,7 @@
147
109
  },
148
110
 
149
111
  class RotateX extends Effect {
150
-
151
- constructor({
152
- duration = 1000
153
- }) {
154
- super({
155
- duration
156
- });
157
- }
112
+ duration = 1000;
158
113
 
159
114
  apply(element, angleFrom, angleTo) {
160
115
  var da = angleTo - angleFrom;
@@ -175,14 +130,7 @@
175
130
  },
176
131
 
177
132
  class RotateY extends Effect {
178
-
179
- constructor({
180
- duration = 1000
181
- }) {
182
- super({
183
- duration
184
- });
185
- }
133
+ duration = 1000;
186
134
 
187
135
  apply(element, angleFrom, angleTo) {
188
136
  var da = angleTo - angleFrom;
@@ -202,14 +150,7 @@
202
150
  },
203
151
 
204
152
  class RotateZ extends Effect {
205
-
206
- constructor({
207
- duration = 1000
208
- }) {
209
- super({
210
- duration
211
- });
212
- }
153
+ duration = 1000;
213
154
 
214
155
  apply(element, angleFrom, angleTo) {
215
156
  var da = angleTo - angleFrom;
@@ -230,14 +171,7 @@
230
171
  },
231
172
 
232
173
  class Rotate extends Effect {
233
-
234
- constructor({
235
- duration = 1000
236
- }) {
237
- super({
238
- duration
239
- });
240
- }
174
+ duration = 1000;
241
175
 
242
176
  apply(element, angleFrom, angleTo) {
243
177
  var da = angleTo - angleFrom;
@@ -257,14 +191,7 @@
257
191
  },
258
192
 
259
193
  class Radius extends Effect {
260
-
261
- constructor({
262
- duration = 1000
263
- }) {
264
- super({
265
- duration
266
- });
267
- }
194
+ duration = 1000;
268
195
 
269
196
  apply(element, radiusFrom, radiusTo) {
270
197
  var dr = radiusTo - radiusFrom;
@@ -285,14 +212,7 @@
285
212
  },
286
213
 
287
214
  class Resize extends Effect {
288
-
289
- constructor({
290
- duration = 1000
291
- }) {
292
- super({
293
- duration
294
- });
295
- }
215
+ duration = 1000;
296
216
 
297
217
  apply(element, scaleFrom, scaleTo) {
298
218
  var ds = scaleTo - scaleFrom;
@@ -314,13 +234,7 @@
314
234
  },
315
235
 
316
236
  class WipeLeft extends Effect {
317
- constructor({
318
- duration = 1000
319
- }) {
320
- super({
321
- duration
322
- });
323
- }
237
+ duration = 1000;
324
238
 
325
239
  apply(element, scaleFrom, scaleTo) {
326
240
  var ds = scaleTo - scaleFrom;
@@ -342,14 +256,7 @@
342
256
  },
343
257
 
344
258
  class WipeRight extends Effect {
345
-
346
- constructor({
347
- duration = 1000
348
- }) {
349
- super({
350
- duration
351
- });
352
- }
259
+ duration = 1000;
353
260
 
354
261
  apply(element, scaleFrom, scaleTo) {
355
262
  var ds = scaleTo - scaleFrom;
@@ -372,13 +279,7 @@
372
279
 
373
280
  class WipeUp extends Effect {
374
281
 
375
- constructor({
376
- duration = 1000
377
- }) {
378
- super({
379
- duration
380
- });
381
- }
282
+ duration = 1000;
382
283
 
383
284
  apply(element, scaleFrom, scaleTo) {
384
285
  var ds = scaleTo - scaleFrom;
@@ -400,14 +301,7 @@
400
301
  },
401
302
 
402
303
  class WipeDown extends Effect {
403
-
404
- constructor({
405
- duration = 1000
406
- }) {
407
- super({
408
- duration
409
- });
410
- }
304
+ duration = 1000;
411
305
 
412
306
  apply(element, scaleFrom, scaleTo) {
413
307
  var ds = scaleTo - scaleFrom;
@@ -431,37 +325,18 @@
431
325
  Package("org.qcobjects.modal.effects", [
432
326
 
433
327
  class ModalFade extends Fade {
434
- constructor({
435
- duration = 500
436
- }) {
437
- super({
438
- duration
439
- });
440
- }
328
+ duration = 500;
441
329
 
442
330
  },
443
331
 
444
332
  class ModalMoveDown extends Move {
445
- constructor({
446
- duration = 300
447
- }) {
448
- super({
449
- duration
450
- });
451
-
452
- }
333
+ duration = 300;
453
334
 
454
335
  },
455
336
 
456
337
  class ModalMoveUp extends Move {
457
- constructor({
458
- duration = 800
459
- }) {
460
- super({
461
- duration
462
- });
463
338
 
464
- }
339
+ duration = 800;
465
340
 
466
341
  }
467
342
 
@@ -27,37 +27,19 @@
27
27
  Package("org.qcobjects.modal.effects", [
28
28
 
29
29
  class ModalFade extends Fade {
30
- constructor({
31
- duration = 500
32
- }) {
33
- super({
34
- duration
35
- });
36
- }
30
+
31
+ duration = 500;
37
32
 
38
33
  },
39
34
 
40
35
  class ModalMoveDown extends Move {
41
- constructor({
42
- duration = 300
43
- }) {
44
- super({
45
- duration
46
- });
47
36
 
48
- }
37
+ duration = 300;
49
38
 
50
39
  },
51
40
 
52
41
  class ModalMoveUp extends Move {
53
- constructor({
54
- duration = 800
55
- }) {
56
- super({
57
- duration
58
- });
59
-
60
- }
42
+ duration = 800;
61
43
 
62
44
  }
63
45