qcobjects-sdk 2.4.64 → 2.5.105-beta

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 (144) hide show
  1. package/.github/workflows/npmpublish-beta.yml +4 -2
  2. package/.github/workflows/npmpublish-lts.yml +4 -2
  3. package/.github/workflows/npmpublish-main.yml +5 -3
  4. package/VERSION +1 -1
  5. package/build/QCObjects-SDK.js +83 -41
  6. package/build/index.js +17 -7
  7. package/build/js/org.qcobjects.base.components.js +75 -0
  8. package/build/js/org.qcobjects.cloud.auth.session.data.js +98 -101
  9. package/build/js/org.qcobjects.cloud.auth.session.usertoken.js +68 -80
  10. package/build/js/org.qcobjects.components.grid.js +35 -53
  11. package/build/js/org.qcobjects.components.js +145 -237
  12. package/build/js/org.qcobjects.components.list.js +36 -45
  13. package/build/js/org.qcobjects.components.notifications.js +107 -106
  14. package/build/js/org.qcobjects.components.slider.js +183 -169
  15. package/build/js/org.qcobjects.components.splashscreen.js +123 -130
  16. package/build/js/org.qcobjects.controllers.form.js +149 -147
  17. package/build/js/org.qcobjects.controllers.grid.js +226 -215
  18. package/build/js/org.qcobjects.controllers.js +11 -11
  19. package/build/js/org.qcobjects.controllers.list.js +195 -188
  20. package/build/js/org.qcobjects.controllers.slider.js +101 -106
  21. package/build/js/org.qcobjects.controllers.swagger.js +71 -46
  22. package/build/js/org.qcobjects.effects.base.js +86 -0
  23. package/build/js/org.qcobjects.effects.extended.js +318 -0
  24. package/build/js/org.qcobjects.effects.js +26 -394
  25. package/build/js/org.qcobjects.i18n_messages.js +33 -46
  26. package/build/js/org.qcobjects.modal.controllers.js +16 -15
  27. package/build/js/org.qcobjects.modal.effects.js +23 -28
  28. package/build/js/org.qcobjects.models.js +11 -11
  29. package/build/js/org.qcobjects.tools.canvas.js +28 -27
  30. package/build/js/org.qcobjects.tools.js +10 -3
  31. package/build/js/org.qcobjects.tools.layouts.js +46 -45
  32. package/build/js/org.qcobjects.views.js +11 -11
  33. package/build-esbuild.js +72 -0
  34. package/eslint.config.mjs +88 -0
  35. package/package.json +66 -59
  36. package/postbuild.js +10 -0
  37. package/public/browser/index.js +9902 -0
  38. package/public/browser/index.js.map +7 -0
  39. package/public/cjs/index.cjs +9894 -0
  40. package/public/cjs/index.cjs.map +7 -0
  41. package/public/esm/index.mjs +9894 -0
  42. package/public/esm/index.mjs.map +7 -0
  43. package/public/types/index.d.ts +698 -0
  44. package/spec/helpers/mock-sdk.helper.ts +2 -0
  45. package/spec/mocks/qcobjects-sdk.mock.ts +1 -0
  46. package/spec/support/jasmine.json +7 -4
  47. package/src/QCObjects-SDK.ts +72 -53
  48. package/src/js/org.qcobjects.base.components.ts +83 -0
  49. package/src/js/org.qcobjects.cloud.auth.session.data.ts +98 -99
  50. package/src/js/org.qcobjects.cloud.auth.session.usertoken.ts +72 -92
  51. package/src/js/org.qcobjects.components.grid.ts +31 -58
  52. package/src/js/org.qcobjects.components.list.ts +15 -31
  53. package/src/js/org.qcobjects.components.notifications.ts +12 -12
  54. package/src/js/org.qcobjects.components.slider.ts +182 -171
  55. package/src/js/org.qcobjects.components.splashscreen.ts +31 -39
  56. package/src/js/org.qcobjects.components.ts +151 -261
  57. package/src/js/org.qcobjects.controllers.form.ts +151 -148
  58. package/src/js/org.qcobjects.controllers.grid.ts +226 -222
  59. package/src/js/org.qcobjects.controllers.list.ts +207 -205
  60. package/src/js/org.qcobjects.controllers.slider.ts +120 -125
  61. package/src/js/org.qcobjects.controllers.swagger.ts +51 -51
  62. package/src/js/org.qcobjects.controllers.ts +7 -9
  63. package/src/js/org.qcobjects.effects.base.ts +97 -0
  64. package/src/js/org.qcobjects.effects.extended.ts +350 -0
  65. package/src/js/org.qcobjects.effects.ts +6 -394
  66. package/src/js/org.qcobjects.i18n_messages.ts +37 -51
  67. package/src/js/org.qcobjects.modal.controllers.ts +12 -14
  68. package/src/js/org.qcobjects.modal.effects.ts +22 -18
  69. package/src/js/org.qcobjects.models.ts +8 -11
  70. package/src/js/org.qcobjects.tools.canvas.ts +26 -28
  71. package/src/js/org.qcobjects.tools.layouts.ts +44 -47
  72. package/src/js/org.qcobjects.tools.ts +7 -1
  73. package/src/js/org.qcobjects.views.ts +9 -8
  74. package/src/types/global/index.d.ts +181 -0
  75. package/transpile.js +65 -0
  76. package/tsconfig.d.json +65 -3
  77. package/tsconfig.jasmine.json +64 -0
  78. package/tsconfig.json +71 -7
  79. package/.eslintignore +0 -4
  80. package/.eslintrc.cjs +0 -6
  81. package/build/css/base-modal.css +0 -43
  82. package/build/css/basic-layout-embedded-nav.css +0 -14
  83. package/build/css/basic-layout.css +0 -76
  84. package/build/css/components/horizontal-list.css +0 -64
  85. package/build/css/components/list.css +0 -57
  86. package/build/css/components/splashscreen.css +0 -111
  87. package/build/css/modal.css +0 -46
  88. package/build/index.cjs +0 -4
  89. package/build/index.mjs +0 -2
  90. package/build/templates/components/modalyoulose.tpl.html +0 -3
  91. package/build/templates/components/modalyouwin.tpl.html +0 -4
  92. package/build/templates/components/splashscreen.tpl.html +0 -128
  93. package/build/templates/components/swagger-ui.tpl.html +0 -22
  94. package/public/QCObjects-SDK.js +0 -696
  95. package/public/QCObjects-SDK.js.map +0 -7
  96. package/public/css/base-modal.css +0 -2
  97. package/public/css/base-modal.css.map +0 -7
  98. package/public/css/basic-layout-embedded-nav.css +0 -2
  99. package/public/css/basic-layout-embedded-nav.css.map +0 -7
  100. package/public/css/basic-layout.css +0 -2
  101. package/public/css/basic-layout.css.map +0 -7
  102. package/public/css/components/horizontal-list.css +0 -2
  103. package/public/css/components/horizontal-list.css.map +0 -7
  104. package/public/css/components/list.css +0 -2
  105. package/public/css/components/list.css.map +0 -7
  106. package/public/css/components/splashscreen.css +0 -2
  107. package/public/css/components/splashscreen.css.map +0 -7
  108. package/public/css/modal.css +0 -2
  109. package/public/css/modal.css.map +0 -7
  110. package/public/index.cjs +0 -4
  111. package/public/index.js +0 -27
  112. package/public/index.mjs +0 -2
  113. package/public/templates/components/modalyoulose.tpl.html +0 -3
  114. package/public/templates/components/modalyouwin.tpl.html +0 -4
  115. package/public/templates/components/splashscreen.tpl.html +0 -128
  116. package/public/templates/components/swagger-ui.tpl.html +0 -22
  117. package/src/QCObjects-SDK.d.ts +0 -26
  118. package/src/index.cts +0 -2
  119. package/src/index.d.ts +0 -2
  120. package/src/index.mts +0 -2
  121. package/src/js/org.qcobjects.cloud.auth.session.data.d.ts +0 -1
  122. package/src/js/org.qcobjects.cloud.auth.session.usertoken.d.ts +0 -2
  123. package/src/js/org.qcobjects.components.d.ts +0 -10
  124. package/src/js/org.qcobjects.components.grid.d.ts +0 -3
  125. package/src/js/org.qcobjects.components.list.d.ts +0 -3
  126. package/src/js/org.qcobjects.components.notifications.d.ts +0 -1
  127. package/src/js/org.qcobjects.components.slider.d.ts +0 -1
  128. package/src/js/org.qcobjects.components.splashscreen.d.ts +0 -28
  129. package/src/js/org.qcobjects.controllers.d.ts +0 -1
  130. package/src/js/org.qcobjects.controllers.form.d.ts +0 -1
  131. package/src/js/org.qcobjects.controllers.grid.d.ts +0 -1
  132. package/src/js/org.qcobjects.controllers.list.d.ts +0 -1
  133. package/src/js/org.qcobjects.controllers.slider.d.ts +0 -1
  134. package/src/js/org.qcobjects.controllers.swagger.d.ts +0 -1
  135. package/src/js/org.qcobjects.effects.d.ts +0 -20
  136. package/src/js/org.qcobjects.i18n_messages.d.ts +0 -1
  137. package/src/js/org.qcobjects.modal.controllers.d.ts +0 -1
  138. package/src/js/org.qcobjects.modal.effects.d.ts +0 -1
  139. package/src/js/org.qcobjects.models.d.ts +0 -1
  140. package/src/js/org.qcobjects.tools.canvas.d.ts +0 -1
  141. package/src/js/org.qcobjects.tools.d.ts +0 -1
  142. package/src/js/org.qcobjects.tools.layouts.d.ts +0 -1
  143. package/src/js/org.qcobjects.views.d.ts +0 -1
  144. /package/spec/{testsSpec.js → testsSpec.ts} +0 -0
@@ -1,7 +1,5 @@
1
- import { Effect, Package, logger } from "qcobjects";
2
-
3
1
  /**
4
- * QCObjects SDK 2.4
2
+ * QCObjects SDK 2.5
5
3
  * ________________
6
4
  *
7
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -24,327 +22,9 @@ import { Effect, Package, logger } from "qcobjects";
24
22
  * Everyone is permitted to copy and distribute verbatim copies of this
25
23
  * license document, but changing it is not allowed.
26
24
  */
27
- const _top:any = (typeof module === "object" && typeof module.exports === "object") ? (
28
- module.exports = (typeof globalThis !== "undefined"
29
- ? globalThis
30
- : typeof self !== "undefined"
31
- ? self
32
- : typeof window !== "undefined"
33
- ? window
34
- : typeof global !== "undefined"
35
- ? global
36
- : {})
37
- ) : ((typeof global === "object") ? (global) : (
38
- (typeof window === "object") ? (window) : ({})
39
- ));
40
-
41
- (function () {
42
- "use strict";
43
-
44
- type MoveElement = HTMLElement & {
45
- width:number;
46
- height:number;
47
- };
48
-
49
- class Fade extends Effect {
50
- duration = 1000;
51
-
52
- apply(element:HTMLElement, alphaFrom:number, alphaTo:number) {
53
- const da = alphaTo - alphaFrom;
54
- this.animate({
55
- duration: this.duration,
56
- timing(timeFraction) {
57
- return timeFraction;
58
- },
59
- draw(progress) {
60
- logger.debug("animation progress: " + progress.toString());
61
- const alpha = alphaFrom + (progress * da / 100);
62
- logger.debug("alpha: " + alpha.toString());
63
- element.style.opacity = alpha.toString();
64
- }
65
- });
66
- }
67
- }
68
-
69
- class Move extends Effect {
70
- duration = 1000;
71
-
72
- apply(element:MoveElement, xfrom:number, yfrom:number, xto:number, yto:number) {
73
- const dx = xto - xfrom;
74
- const dy = yto - yfrom;
75
- element.style.transform = "translate(" + xfrom + "px," + yfrom + "px)";
76
- this.animate({
77
- duration: this.duration,
78
- timing(timeFraction) {
79
- return timeFraction;
80
- },
81
- draw(progress) {
82
- logger.debug("animation progress: " + progress.toString());
83
- const y = yfrom + (progress * dy / 100);
84
- const x = xfrom + (progress * dx / 100);
85
- logger.debug("x: " + x.toString() + " y:" + y.toString());
86
- element.style.transform = "translate(" + x + "px," + y + "px)";
87
- }
88
- });
89
- }
90
-
91
- }
92
-
93
- Package("org.qcobjects.effects.base", [
94
- Fade,
95
- Move
96
- ]);
97
-
98
-
99
-
100
- class MoveXInFromRight extends Move {
101
- duration = 1000;
102
-
103
- apply(element:MoveElement) {
104
- super.apply.call(this, element, element.width, 0, 0, 0);
105
- }
106
- }
107
-
108
- class MoveXInFromLeft extends Move {
109
- duration = 1000;
110
-
111
- apply(element:MoveElement) {
112
- super.apply.call(this, element, -element.width, 0, 0, 0);
113
- }
114
- }
115
-
116
- class MoveYInFromBottom extends Move {
117
- duration = 1000;
118
-
119
- apply(element:MoveElement) {
120
- super.apply.call(this, element, 0, element.height, 0, 0);
121
- }
122
-
123
- }
124
-
125
- class MoveYInFromTop extends Move {
126
- duration = 1000;
127
-
128
- apply(element:MoveElement ) {
129
- super.apply.call(this, element, 0, -element.height, 0, 0);
130
- }
131
- }
132
-
133
- class RotateX extends Effect {
134
- duration = 1000;
135
-
136
- apply(element:HTMLElement, angleFrom:number, angleTo:number) {
137
- const da = angleTo - angleFrom;
138
- this.animate({
139
- duration: this.duration,
140
- timing(timeFraction) {
141
- return timeFraction;
142
- },
143
- draw(progress) {
144
- logger.debug("animation progress: " + progress.toString());
145
- const angle = Math.round(angleFrom + (progress * da / 100));
146
- logger.debug("angle: " + angle.toString());
147
- element.style.transform = "rotate3d(1,0,0," + angle.toString() + "deg)";
148
- }
149
- });
150
- }
151
-
152
- }
153
-
154
- class RotateY extends Effect {
155
- duration = 1000;
156
-
157
- apply(element:HTMLElement, angleFrom:number, angleTo:number) {
158
- const da = angleTo - angleFrom;
159
- this.animate({
160
- duration: this.duration,
161
- timing(timeFraction) {
162
- return timeFraction;
163
- },
164
- draw(progress) {
165
- logger.debug("animation progress: " + progress.toString());
166
- const angle = Math.round(angleFrom + (progress * da / 100));
167
- logger.debug("angle: " + angle.toString());
168
- element.style.transform = "rotate3d(0,1,0," + angle.toString() + "deg)";
169
- }
170
- });
171
- }
172
- }
173
-
174
- class RotateZ extends Effect {
175
- duration = 1000;
176
-
177
- apply(element:HTMLElement, angleFrom:number, angleTo:number) {
178
- const da = angleTo - angleFrom;
179
- this.animate({
180
- duration: this.duration,
181
- timing(timeFraction) {
182
- return timeFraction;
183
- },
184
- draw(progress) {
185
- logger.debug("animation progress: " + progress.toString());
186
- const angle = Math.round(angleFrom + (progress * da / 100));
187
- logger.debug("angle: " + angle.toString());
188
- element.style.transform = "rotate3d(0,0,1," + angle.toString() + "deg)";
189
- }
190
- });
191
- }
192
-
193
- }
194
-
195
- class Rotate extends Effect {
196
- duration = 1000;
197
-
198
- apply(element:HTMLElement, angleFrom:number, angleTo:number) {
199
- const da = angleTo - angleFrom;
200
- this.animate({
201
- duration: this.duration,
202
- timing(timeFraction) {
203
- return timeFraction;
204
- },
205
- draw(progress) {
206
- logger.debug("animation progress: " + progress.toString());
207
- const angle = Math.round(angleFrom + (progress * da / 100));
208
- logger.debug("angle: " + angle.toString());
209
- element.style.transform = "rotate3d(1,1,1," + angle.toString() + "deg)";
210
- }
211
- });
212
- }
213
- }
214
-
215
- class Radius extends Effect {
216
- duration = 1000;
217
-
218
- apply(element:HTMLElement, radiusFrom:number, radiusTo:number) {
219
- const dr = radiusTo - radiusFrom;
220
- this.animate({
221
- duration: this.duration,
222
- timing(timeFraction) {
223
- return timeFraction;
224
- },
225
- draw(progress) {
226
- logger.debug("animation progress: " + progress.toString());
227
- const radius = radiusFrom + (progress * dr / 100);
228
- logger.debug("radius: " + radius.toString());
229
- element.style.borderRadius = radius.toString() + "px";
230
- }
231
- });
232
- }
233
-
234
- }
235
-
236
- class Resize extends Effect {
237
- duration = 1000;
238
-
239
- apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
240
- const ds = scaleTo - scaleFrom;
241
- this.animate({
242
- duration: this.duration,
243
- timing(timeFraction) {
244
- return timeFraction;
245
- },
246
- draw(progress) {
247
- logger.debug("animation progress: " + progress.toString());
248
- const scale = scaleFrom + (progress * ds / 100);
249
- logger.debug("resize: " + scale.toString());
250
- element.style.transformOrigin = "center";
251
- element.style.transform = "scale(" + scale + "," + scale + ")";
252
- }
253
- });
254
- }
255
-
256
- }
257
-
258
- class WipeLeft extends Effect {
259
- duration = 1000;
260
-
261
- apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
262
- const ds = scaleTo - scaleFrom;
263
- this.animate({
264
- duration: this.duration,
265
- timing(timeFraction) {
266
- return timeFraction;
267
- },
268
- draw(progress) {
269
- logger.debug("animation progress: " + progress.toString());
270
- const scale = scaleFrom + (progress * ds / 100);
271
- logger.debug("wipe: " + scale.toString());
272
- element.style.transformOrigin = "right";
273
- element.style.transform = "scaleX(" + scale + ")";
274
- }
275
- });
276
- }
277
-
278
- }
279
-
280
- class WipeRight extends Effect {
281
- duration = 1000;
282
-
283
- apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
284
- const ds = scaleTo - scaleFrom;
285
- this.animate({
286
- duration: this.duration,
287
- timing(timeFraction) {
288
- return timeFraction;
289
- },
290
- draw(progress) {
291
- logger.debug("animation progress: " + progress.toString());
292
- const scale = scaleFrom + (progress * ds / 100);
293
- logger.debug("wipe: " + scale.toString());
294
- element.style.transformOrigin = "left";
295
- element.style.transform = "scaleX(" + scale + ")";
296
- }
297
- });
298
- }
299
-
300
- }
301
-
302
- class WipeUp extends Effect {
303
-
304
- duration = 1000;
305
-
306
- apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
307
- const ds = scaleTo - scaleFrom;
308
- this.animate({
309
- duration: this.duration,
310
- timing(timeFraction) {
311
- return timeFraction;
312
- },
313
- draw(progress) {
314
- logger.debug("animation progress: " + progress.toString());
315
- const scale = scaleFrom + (progress * ds / 100);
316
- logger.debug("wipe: " + scale.toString());
317
- element.style.transformOrigin = "bottom";
318
- element.style.transform = "scaleY(" + scale + ")";
319
- }
320
- });
321
- }
322
-
323
- }
324
-
325
- class WipeDown extends Effect {
326
- duration = 1000;
327
-
328
- apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
329
- const ds = scaleTo - scaleFrom;
330
- this.animate({
331
- duration: this.duration,
332
- timing(timeFraction) {
333
- return timeFraction;
334
- },
335
- draw(progress) {
336
- logger.debug("animation progress: " + progress.toString());
337
- const scale = scaleFrom + (progress * ds / 100);
338
- logger.debug("wipe: " + scale.toString());
339
- element.style.transformOrigin = "top";
340
- element.style.transform = "scaleY(" + scale + ")";
341
- }
342
- });
343
- }
344
- }
345
-
346
- Package("org.qcobjects.effects.extended", [
347
- MoveXInFromRight,
25
+ "use strict";
26
+ export {Fade, Move} from "./org.qcobjects.effects.base";
27
+ export{ MoveXInFromRight,
348
28
  MoveXInFromLeft,
349
29
  MoveYInFromBottom,
350
30
  MoveYInFromTop,
@@ -357,74 +37,6 @@ const _top:any = (typeof module === "object" && typeof module.exports === "objec
357
37
  WipeLeft,
358
38
  WipeRight,
359
39
  WipeUp,
360
- WipeDown
361
-
362
- ]);
363
-
364
- class ModalFade extends Fade {
365
- duration = 500;
366
-
367
- }
368
-
369
- class ModalMoveDown extends Move {
370
- duration = 300;
371
-
372
- }
373
-
374
- class ModalMoveUp extends Move {
375
-
376
- duration = 800;
377
-
378
- }
379
-
380
-
381
- Package("org.qcobjects.modal.effects", [
382
- ModalFade,
383
- ModalMoveDown,
384
- ModalMoveUp
385
-
386
- ]);
387
-
388
- })();
389
-
390
- const Fade = _top.Fade;
391
- const Move = _top.Fade;
392
- const MoveXInFromRight = _top.MoveXInFromRight;
393
- const MoveXInFromLeft = _top.MoveXInFromLeft;
394
- const MoveYInFromBottom = _top.MoveYInFromBottom;
395
- const MoveYInFromTop = _top.MoveYInFromTop;
396
- const RotateX = _top.RotateX;
397
- const RotateY = _top.RotateY;
398
- const RotateZ = _top.RotateZ;
399
- const Rotate = _top.Rotate;
400
- const Radius = _top.Radius;
401
- const Resize = _top.Resize;
402
- const WipeLeft = _top.WipeLeft;
403
- const WipeRight = _top.WipeRight;
404
- const WipeUp = _top.WipeUp;
405
- const WipeDown = _top.WipeDown;
406
- const ModalFade = _top.ModalFade;
407
- const ModalMoveDown = _top.ModalMoveDown;
408
- const ModalMoveUp = _top.ModalMoveUp;
40
+ WipeDown} from "./org.qcobjects.effects.extended";
409
41
 
410
- export {
411
- Fade,
412
- Move,
413
- MoveXInFromRight,
414
- MoveXInFromLeft,
415
- MoveYInFromBottom,
416
- MoveYInFromTop,
417
- RotateX,
418
- RotateY,
419
- RotateZ,
420
- Rotate,
421
- Radius,
422
- Resize,
423
- WipeLeft,
424
- WipeRight,
425
- WipeUp,
426
- WipeDown,
427
- ModalFade,
428
- ModalMoveDown,
429
- ModalMoveUp
430
- };
42
+ export {ModalFade, ModalMoveUp, ModalMoveDown} from "./org.qcobjects.modal.effects";
@@ -1,7 +1,5 @@
1
- import { Package, InheritClass, CONFIG, Import } from "qcobjects";
2
-
3
1
  /**
4
- * QCObjects SDK 2.4
2
+ * QCObjects SDK 2.5
5
3
  * ________________
6
4
  *
7
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -24,59 +22,47 @@ import { Package, InheritClass, CONFIG, Import } from "qcobjects";
24
22
  * Everyone is permitted to copy and distribute verbatim copies of this
25
23
  * license document, but changing it is not allowed.
26
24
  */
27
- (function (global:any) {
28
- "use strict";
25
+ "use strict";
26
+ import { Package, InheritClass, CONFIG, Import, global } from "qcobjects";
29
27
 
30
- // eslint-disable-next-line camelcase
31
- class i18n_messages extends InheritClass {
32
28
 
33
- constructor({
34
- messages = []
35
- }) {
36
- super({
37
- messages
38
- });
39
- if (CONFIG.get("use_i18n", false)) {
40
- CONFIG.set("lang", "en");
41
- if (!global.get("i18n")) {
42
- global.set("i18n", {
43
- messages
44
- });
45
- } else {
46
- global.set("i18n", {
47
- messages: global.get("i18n").messages.concat(messages)
48
- });
49
- }
50
- }
51
29
 
52
- }
30
+ export class i18n_messages extends InheritClass {
53
31
 
54
- _load_i18n_packages_() {
55
- // eslint-disable-next-line array-callback-return, camelcase
56
- return CONFIG.get("i18n_languages", []).map((i18n_packagename: any) => {
57
- // eslint-disable-next-line camelcase
58
- Import(`org.quickcorp.i18n_messages.${i18n_packagename}`);
59
- });
32
+ constructor({
33
+ messages = []
34
+ }) {
35
+ super({
36
+ messages
37
+ });
38
+ if (CONFIG.get("use_i18n", false)) {
39
+ CONFIG.set("lang", "en");
40
+ if (!global.get("i18n")) {
41
+ global.set("i18n", {
42
+ messages
43
+ });
44
+ } else {
45
+ global.set("i18n", {
46
+ messages: global.get("i18n").messages.concat(messages)
47
+ });
48
+ }
60
49
  }
61
50
 
62
51
  }
63
52
 
64
- Package("org.qcobjects.i18n_messages", [
65
- // eslint-disable-next-line camelcase
66
- i18n_messages
67
- ]);
68
- // eslint-disable-next-line new-cap
69
- (new i18n_messages({}))._load_i18n_packages_();
70
- })((typeof module === "object" && typeof module.exports === "object") ? (
71
- module.exports = (typeof globalThis !== "undefined"
72
- ? globalThis
73
- : typeof self !== "undefined"
74
- ? self
75
- : typeof window !== "undefined"
76
- ? window
77
- : typeof global !== "undefined"
78
- ? global
79
- : {})
80
- ) : ((typeof global === "object") ? (global) : (
81
- (typeof window === "object") ? (window) : ({})
82
- )));
53
+ _load_i18n_packages_() {
54
+ // eslint-disable-next-line array-callback-return
55
+ return CONFIG.get("i18n_languages", []).map((i18n_packagename: any) => {
56
+
57
+ Import(`org.quickcorp.i18n_messages.${i18n_packagename}`);
58
+ });
59
+ }
60
+
61
+ }
62
+
63
+ Package("org.qcobjects.i18n_messages", [
64
+
65
+ i18n_messages
66
+ ]);
67
+
68
+ (new i18n_messages({}))._load_i18n_packages_();
@@ -1,8 +1,5 @@
1
- import { Package, Controller } from "qcobjects";
2
- import { ModalComponent } from "./org.qcobjects.components";
3
-
4
1
  /**
5
- * QCObjects SDK 2.4
2
+ * QCObjects SDK 2.5
6
3
  * ________________
7
4
  *
8
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -25,20 +22,21 @@ import { ModalComponent } from "./org.qcobjects.components";
25
22
  * Everyone is permitted to copy and distribute verbatim copies of this
26
23
  * license document, but changing it is not allowed.
27
24
  */
28
- (function() {
29
25
  "use strict";
30
- Package("org.qcobjects.modal.controllers",[
31
-
32
- class ModalController extends Controller {
26
+ import { Package, Controller } from "qcobjects";
33
27
 
34
- done (){
35
- const component = this.component as typeof ModalComponent;
36
- component.body.innerHTML = component.body.innerHTML.replace("/{{content}}/g",component.submodal.template);
28
+ export class ModalController extends Controller {
29
+ component: any;
37
30
 
38
- }
31
+ done() {
32
+ const component = this.component;
33
+ component.body.innerHTML = component.body.innerHTML.replace("/{{content}}/g", component.submodal.template);
39
34
 
40
35
  }
41
36
 
42
- ]);
37
+ }
38
+
39
+ Package("org.qcobjects.modal.controllers", [
40
+ ModalController
43
41
 
44
- })();
42
+ ]);
@@ -1,8 +1,5 @@
1
- import { Package } from "qcobjects";
2
- import { Fade, Move } from "./org.qcobjects.effects";
3
-
4
1
  /**
5
- * QCObjects SDK 2.4
2
+ * QCObjects SDK 2.5
6
3
  * ________________
7
4
  *
8
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -25,27 +22,34 @@ import { Fade, Move } from "./org.qcobjects.effects";
25
22
  * Everyone is permitted to copy and distribute verbatim copies of this
26
23
  * license document, but changing it is not allowed.
27
24
  */
28
- (function () {
29
- "use strict";
30
- Package("org.qcobjects.modal.effects", [
25
+ "use strict";
26
+ import { Package } from "qcobjects";
27
+ import { Fade, Move } from "./org.qcobjects.effects";
28
+
29
+ export class ModalFade extends Fade {
30
+ duration = 500;
31
+
32
+ }
33
+
34
+
35
+ export class ModalMoveUp extends Move {
31
36
 
32
- class ModalFade extends Fade {
37
+ duration = 800;
33
38
 
34
- duration = 500;
39
+ }
35
40
 
36
- },
37
41
 
38
- class ModalMoveDown extends Move {
42
+ export class ModalMoveDown extends Move {
39
43
 
40
- duration = 300;
44
+ duration = 300;
41
45
 
42
- },
46
+ }
43
47
 
44
- class ModalMoveUp extends Move {
45
- duration = 800;
46
48
 
47
- }
49
+ Package("org.qcobjects.modal.effects", [
50
+ ModalFade,
51
+ ModalMoveDown,
52
+ ModalMoveUp
53
+ ]);
48
54
 
49
- ]);
50
55
 
51
- })();
@@ -1,7 +1,5 @@
1
- import { Package, VO } from "qcobjects";
2
-
3
1
  /**
4
- * QCObjects SDK 2.4
2
+ * QCObjects SDK 2.5
5
3
  * ________________
6
4
  *
7
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -24,14 +22,13 @@ import { Package, VO } from "qcobjects";
24
22
  * Everyone is permitted to copy and distribute verbatim copies of this
25
23
  * license document, but changing it is not allowed.
26
24
  */
27
- (function () {
28
- "use strict";
29
- Package("org.qcobjects.models", [
30
-
31
- class Contact extends VO {
25
+ "use strict";
26
+ import { Package, VO } from "qcobjects";
27
+ export class Contact extends VO {
32
28
 
33
- }
29
+ }
34
30
 
35
- ]);
31
+ Package("org.qcobjects.models", [
32
+ Contact
36
33
 
37
- })();
34
+ ]);