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,170 +25,193 @@
25
25
  (function() {
26
26
  "use strict";
27
27
  Package("org.qcobjects.components.slider",[
28
- Class("SlideListComponent",Component,{
29
- name:"slidelist",
30
- tplsource: "inline",
31
- template: "<p>Loading...</p>",
32
- _new_ (o){
33
- o.body.setAttribute("controllerClass","DataGridController");
34
- var subcomponentClass = (o.body.getAttribute("subcomponentClass") !== null)?(o.body.getAttribute("subcomponentClass")):("GridItemComponent");
35
- o.body.setAttribute("subcomponentClass",subcomponentClass);
36
- _super_("Component","_new_").call(this,o);
37
- }
38
- }),
39
- Class("SlideItemComponent",Component,{
40
- name:"slider_item",
41
- template: `
42
- <div class="qcoSlides" style="display:none">
43
- <div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
44
- <img src="{{image}}" alt="{{name}}"/>
45
- <div class="qco-slider__text">
46
- <p>{{label}} <a href="{{link}}">{{category}}</a></p>
47
- </div>
48
- </div>
49
- `,
50
- tplsource: "inline",
51
- _new_:function (o){
52
-
53
- o.data.slideNumber = o.data.__dataIndex + 1;
54
-
55
- _super_("Component","_new_").call(this,o);
56
- }
57
- }),
58
-
59
- Class("SliderComponent",Component,{
60
- name:"slider",
61
- template: `
62
- <style>
63
- /* Slideshow container */
64
-
65
- :host a:hover,
66
- :host a:active,
67
- :host a:visited {
68
- color: #ffffff;
69
- }
70
-
71
- {
72
- color: #ffffff;
73
- }
74
28
 
75
- :host .prev {left:0;}
76
- .qco-slider__container {
77
- max-width: 100%;
78
- position: relative;
79
- margin: auto;
80
- height: 300px;
81
- }
82
- :host .qco-slider__container .qcoSlides img {
83
- object-fit: cover;
84
- width: 100%;
85
- height: 300px;
86
- }
87
-
88
- /* Next & previous buttons */
89
- :host .prev,
90
- :host .next {
91
- cursor: pointer;
92
- position: absolute;
93
- top: 50%;
94
- width: auto;
95
- margin-top: -22px;
96
- padding: 16px;
97
- color: white;
98
- font-weight: bold;
99
- font-size: 18px;
100
- transition: 0.6s ease;
101
- border-radius: 0 3px 3px 0;
102
- background-color: rgba(1, 1, 1, 0.1);
103
- }
29
+ class SlideListComponent extends Component {
104
30
 
105
- /* Position the "next button" to the right */
106
- :host .next {
107
- right: 0;
108
- border-radius: 3px 0 0 3px;
31
+ constructor (){
32
+ super();
33
+ this.name="slidelist";
34
+ this.tplsource="inline";
35
+ this.template="<p>Loading...</p>";
36
+
109
37
  }
110
38
 
111
- /* On hover, add a black background color with a little bit see-through */
112
- :host .prev:hover,
113
- :host .next:hover {
114
- background-color: rgba(0, 0, 0, 0.8);
39
+ _new_ (o){
40
+ super._new_(o);
41
+ o.body.setAttribute("controllerClass","DataGridController");
42
+ var subcomponentClass = (o.body.getAttribute("subcomponentClass") !== null)?(o.body.getAttribute("subcomponentClass")):("GridItemComponent");
43
+ o.body.setAttribute("subcomponentClass",subcomponentClass);
115
44
  }
116
45
 
117
- /* Caption text */
118
- :host .qco-slider__text {
119
- color: #f2f2f2;
120
- font-size: 15px;
121
- /* padding: 8px 12px;*/
122
- position: absolute;
123
- bottom: 8px;
124
- width: 100%;
125
- text-align: center;
126
- text-shadow: -1px 1px 3px #111111;
127
- background-color: rgba(1,1,1,0.7);
128
- }
129
46
 
130
- /* Number text (1/3 etc) */
131
- :host .qco-slider__numbertext {
132
- color: #f2f2f2;
133
- text-shadow: 0px 2px 3px #111111;
134
- font-size: 12px;
135
- padding: 8px 12px;
136
- position: absolute;
137
- top: 0;
138
- padding-top: 0;
139
- margin-top: 10px;
140
- }
47
+ },
141
48
 
142
- /* The dots/bullets/indicators */
143
- :host .qcoSlider__dots {
144
- text-align: center;
145
- margin: 0 auto;
146
- padding: 0;
147
- }
148
- :host .qcoSlider__dots--dot {
149
- cursor: pointer;
150
- height: 10px;
151
- width: 10px;
152
- margin: 0 2px;
153
- background-color: #bbb;
154
- border-radius: 50%;
155
- display: inline-block;
156
- transition: background-color 0.6s ease;
157
- }
49
+ class SlideItemComponent extends Component {
158
50
 
159
- :host .active,
160
- :host .qcoSlider__dots--dot:hover {
161
- background-color: #717171;
51
+ constructor () {
52
+ super();
53
+ this.name="slider_item";
54
+ this.template= `
55
+ <div class="qcoSlides" style="display:none">
56
+ <div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
57
+ <img src="{{image}}" alt="{{name}}"/>
58
+ <div class="qco-slider__text">
59
+ <p>{{label}} <a href="{{link}}">{{category}}</a></p>
60
+ </div>
61
+ </div>
62
+ `;
63
+ this.tplsource= "inline";
64
+
65
+ }
66
+
67
+ _new_ (){
68
+ super._new_();
69
+ this.data.slideNumber = o.data.__dataIndex + 1;
70
+ }
71
+
72
+
73
+ },
74
+
75
+ class SliderComponent extends Component {
76
+
77
+ constructor () {
78
+ super();
79
+ this.name="slider";
80
+ this.template= `
81
+ <style>
82
+ /* Slideshow container */
83
+
84
+ :host a:hover,
85
+ :host a:active,
86
+ :host a:visited {
87
+ color: #ffffff;
88
+ }
89
+
90
+ {
91
+ color: #ffffff;
92
+ }
93
+
94
+ :host .prev {left:0;}
95
+ .qco-slider__container {
96
+ max-width: 100%;
97
+ position: relative;
98
+ margin: auto;
99
+ height: 300px;
100
+ }
101
+ :host .qco-slider__container .qcoSlides img {
102
+ object-fit: cover;
103
+ width: 100%;
104
+ height: 300px;
105
+ }
106
+
107
+ /* Next & previous buttons */
108
+ :host .prev,
109
+ :host .next {
110
+ cursor: pointer;
111
+ position: absolute;
112
+ top: 50%;
113
+ width: auto;
114
+ margin-top: -22px;
115
+ padding: 16px;
116
+ color: white;
117
+ font-weight: bold;
118
+ font-size: 18px;
119
+ transition: 0.6s ease;
120
+ border-radius: 0 3px 3px 0;
121
+ background-color: rgba(1, 1, 1, 0.1);
122
+ }
123
+
124
+ /* Position the "next button" to the right */
125
+ :host .next {
126
+ right: 0;
127
+ border-radius: 3px 0 0 3px;
128
+ }
129
+
130
+ /* On hover, add a black background color with a little bit see-through */
131
+ :host .prev:hover,
132
+ :host .next:hover {
133
+ background-color: rgba(0, 0, 0, 0.8);
134
+ }
135
+
136
+ /* Caption text */
137
+ :host .qco-slider__text {
138
+ color: #f2f2f2;
139
+ font-size: 15px;
140
+ /* padding: 8px 12px;*/
141
+ position: absolute;
142
+ bottom: 8px;
143
+ width: 100%;
144
+ text-align: center;
145
+ text-shadow: -1px 1px 3px #111111;
146
+ background-color: rgba(1,1,1,0.7);
147
+ }
148
+
149
+ /* Number text (1/3 etc) */
150
+ :host .qco-slider__numbertext {
151
+ color: #f2f2f2;
152
+ text-shadow: 0px 2px 3px #111111;
153
+ font-size: 12px;
154
+ padding: 8px 12px;
155
+ position: absolute;
156
+ top: 0;
157
+ padding-top: 0;
158
+ margin-top: 10px;
159
+ }
160
+
161
+ /* The dots/bullets/indicators */
162
+ :host .qcoSlider__dots {
163
+ text-align: center;
164
+ margin: 0 auto;
165
+ padding: 0;
166
+ }
167
+ :host .qcoSlider__dots--dot {
168
+ cursor: pointer;
169
+ height: 10px;
170
+ width: 10px;
171
+ margin: 0 2px;
172
+ background-color: #bbb;
173
+ border-radius: 50%;
174
+ display: inline-block;
175
+ transition: background-color 0.6s ease;
176
+ }
177
+
178
+ :host .active,
179
+ :host .qcoSlider__dots--dot:hover {
180
+ background-color: #717171;
181
+ }
182
+
183
+ :host .qco-slider__container .qcoSlides img {
184
+ border-radius: 30px 30px 0px 0px;
185
+ }
186
+
187
+ </style>
188
+
189
+ <div class="qco-slider__container">
190
+ <component name="slidelist" componentClass="SlideListComponent" subcomponentClass="SlideItemComponent" serviceClass="{{SERVICE_CLASS}}" ></component>
191
+
192
+ <a class="prev" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(-1)">&#10094;</a>
193
+ <a class="next" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(1)">&#10095;</a>
194
+ </div>
195
+ <br>
196
+
197
+ <div class="qcoSlider__dots" style="text-align:center">
198
+ </div>
199
+
200
+ `;
201
+ this.tplsource= "inline";
202
+ this.shadowed= true;
203
+
162
204
  }
163
205
 
164
- :host .qco-slider__container .qcoSlides img {
165
- border-radius: 30px 30px 0px 0px;
206
+ _new_(){
207
+ super._new_();
208
+ this.data.SERVICE_CLASS = this.body.getAttribute("serviceClass");
209
+ this.data.sliderHandler = "slider_"+this.__instanceID.toString();
210
+ this.body.setAttribute("controllerClass","SliderController");
166
211
  }
167
212
 
168
- </style>
169
-
170
- <div class="qco-slider__container">
171
- <component name="slidelist" componentClass="SlideListComponent" subcomponentClass="SlideItemComponent" serviceClass="{{SERVICE_CLASS}}" ></component>
172
-
173
- <a class="prev" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(-1)">&#10094;</a>
174
- <a class="next" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(1)">&#10095;</a>
175
- </div>
176
- <br>
177
-
178
- <div class="qcoSlider__dots" style="text-align:center">
179
- </div>
180
-
181
- `,
182
- tplsource: "inline",
183
- shadowed: true,
184
- _new_(o){
185
- o.data.SERVICE_CLASS = o.body.getAttribute("serviceClass");
186
- o.data.sliderHandler = "slider_"+this.__instanceID.toString();
187
- o.body.setAttribute("controllerClass","SliderController");
188
- _super_("Component","_new_").call(this,o);
189
- }
213
+ }
190
214
 
191
- })
192
215
  ]);
193
216
 
194
217
  }).call(null);