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
@@ -0,0 +1,350 @@
1
+ /**
2
+ * QCObjects SDK 2.5
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
+ "use strict";
26
+ import {Effect, logger, Package} from "qcobjects";
27
+ import {Move, MoveElement} from "./org.qcobjects.effects.base";
28
+
29
+ export class MoveXInFromRight extends Move {
30
+ duration = 1000;
31
+
32
+ static apply(element:MoveElement) {
33
+ Move.apply.call(this, element, element.width as number, 0, 0, 0);
34
+ }
35
+ }
36
+
37
+ export class MoveXInFromLeft extends Move {
38
+ duration = 1000;
39
+
40
+ static apply(element:MoveElement) {
41
+ Move.apply.call(this, element, -(element.width as number), 0, 0, 0);
42
+ }
43
+ }
44
+
45
+ export class MoveYInFromBottom extends Move {
46
+ duration = 1000;
47
+
48
+ static apply(element:MoveElement) {
49
+ Move.apply.call(this, element, 0, element.height as number, 0, 0);
50
+ }
51
+
52
+ }
53
+
54
+ export class MoveYInFromTop extends Move {
55
+ duration = 1000;
56
+
57
+ static apply(element:MoveElement ) {
58
+ Move.apply.call(this, element, 0, -(element.height as number), 0, 0);
59
+ }
60
+ }
61
+
62
+ export class RotateX extends Effect {
63
+ duration = 1000;
64
+ static duration: any;
65
+
66
+ static apply(element:HTMLElement, angleFrom:number, angleTo:number) {
67
+ const da = angleTo - angleFrom;
68
+ this.animate({
69
+ duration: this.duration,
70
+ timing(timeFraction) {
71
+
72
+ return timeFraction;
73
+ },
74
+ draw(progress) {
75
+ logger.debug("animation progress: " + progress.toString());
76
+ const angle = Math.round(angleFrom + (progress * da / 100));
77
+ logger.debug("angle: " + angle.toString());
78
+ element.style.transform = "rotate3d(1,0,0," + angle.toString() + "deg)";
79
+ }
80
+ });
81
+ }
82
+ // eslint-disable-next-line no-unused-vars
83
+ static animate(arg0: { duration: any; timing(timeFraction: any): any; draw(progress: any): void; }) {
84
+ throw new Error("Method not implemented.");
85
+ }
86
+ // eslint-disable-next-line no-unused-vars
87
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
88
+ throw new Error("Method not implemented.");
89
+ }
90
+
91
+ }
92
+
93
+ export class RotateY extends Effect {
94
+ duration = 1000;
95
+ static duration: any;
96
+
97
+ static apply(element:HTMLElement, angleFrom:number, angleTo:number) {
98
+ const da = angleTo - angleFrom;
99
+ this.animate({
100
+ duration: this.duration,
101
+ timing(timeFraction) {
102
+
103
+ return timeFraction;
104
+ },
105
+ draw(progress) {
106
+ logger.debug("animation progress: " + progress.toString());
107
+ const angle = Math.round(angleFrom + (progress * da / 100));
108
+ logger.debug("angle: " + angle.toString());
109
+ element.style.transform = "rotate3d(0,1,0," + angle.toString() + "deg)";
110
+ }
111
+ });
112
+ }
113
+ // eslint-disable-next-line no-unused-vars
114
+ static animate(arg0: { duration: any; timing(timeFraction: any): any; draw(progress: any): void; }) {
115
+ throw new Error("Method not implemented.");
116
+ }
117
+ // eslint-disable-next-line no-unused-vars
118
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
119
+ throw new Error("Method not implemented.");
120
+ }
121
+ }
122
+
123
+ export class RotateZ extends Effect {
124
+ duration = 1000;
125
+
126
+ apply(element:HTMLElement, angleFrom:number, angleTo:number) {
127
+ const da = angleTo - angleFrom;
128
+ this.animate({
129
+ duration: this.duration,
130
+ timing(timeFraction) {
131
+
132
+ return timeFraction;
133
+ },
134
+ draw(progress) {
135
+ logger.debug("animation progress: " + progress.toString());
136
+ const angle = Math.round(angleFrom + (progress * da / 100));
137
+ logger.debug("angle: " + angle.toString());
138
+ element.style.transform = "rotate3d(0,0,1," + angle.toString() + "deg)";
139
+ }
140
+ });
141
+ }
142
+ // eslint-disable-next-line no-unused-vars
143
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
144
+ throw new Error("Method not implemented.");
145
+ }
146
+
147
+ }
148
+
149
+ export class Rotate extends Effect {
150
+ duration = 1000;
151
+
152
+ apply(element:HTMLElement, angleFrom:number, angleTo:number) {
153
+ const da = angleTo - angleFrom;
154
+ this.animate({
155
+ duration: this.duration,
156
+ timing(timeFraction) {
157
+
158
+ return timeFraction;
159
+ },
160
+ draw(progress) {
161
+ logger.debug("animation progress: " + progress.toString());
162
+ const angle = Math.round(angleFrom + (progress * da / 100));
163
+ logger.debug("angle: " + angle.toString());
164
+ element.style.transform = "rotate3d(1,1,1," + angle.toString() + "deg)";
165
+ }
166
+ });
167
+ }
168
+ // eslint-disable-next-line no-unused-vars
169
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
170
+ throw new Error("Method not implemented.");
171
+ }
172
+ }
173
+
174
+ export class Radius extends Effect {
175
+ duration = 1000;
176
+
177
+ apply(element:HTMLElement, radiusFrom:number, radiusTo:number) {
178
+ const dr = radiusTo - radiusFrom;
179
+ this.animate({
180
+ duration: this.duration,
181
+ timing(timeFraction) {
182
+
183
+ return timeFraction;
184
+ },
185
+ draw(progress) {
186
+ logger.debug("animation progress: " + progress.toString());
187
+ const radius = radiusFrom + (progress * dr / 100);
188
+ logger.debug("radius: " + radius.toString());
189
+ element.style.borderRadius = radius.toString() + "px";
190
+ }
191
+ });
192
+ }
193
+ // eslint-disable-next-line no-unused-vars
194
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
195
+ throw new Error("Method not implemented.");
196
+ }
197
+
198
+ }
199
+
200
+ export class Resize extends Effect {
201
+ duration = 1000;
202
+
203
+ apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
204
+ const ds = scaleTo - scaleFrom;
205
+ this.animate({
206
+ duration: this.duration,
207
+ timing(timeFraction) {
208
+
209
+ return timeFraction;
210
+ },
211
+ draw(progress) {
212
+ logger.debug("animation progress: " + progress.toString());
213
+ const scale = scaleFrom + (progress * ds / 100);
214
+ logger.debug("resize: " + scale.toString());
215
+ element.style.transformOrigin = "center";
216
+ element.style.transform = "scale(" + scale + "," + scale + ")";
217
+ }
218
+ });
219
+ }
220
+ // eslint-disable-next-line no-unused-vars
221
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
222
+ throw new Error("Method not implemented.");
223
+ }
224
+
225
+ }
226
+
227
+ export class WipeLeft extends Effect {
228
+ duration = 1000;
229
+
230
+ apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
231
+ const ds = scaleTo - scaleFrom;
232
+ this.animate({
233
+ duration: this.duration,
234
+ timing(timeFraction) {
235
+
236
+ return timeFraction;
237
+ },
238
+ draw(progress) {
239
+ logger.debug("animation progress: " + progress.toString());
240
+ const scale = scaleFrom + (progress * ds / 100);
241
+ logger.debug("wipe: " + scale.toString());
242
+ element.style.transformOrigin = "right";
243
+ element.style.transform = "scaleX(" + scale + ")";
244
+ }
245
+ });
246
+ }
247
+ // eslint-disable-next-line no-unused-vars
248
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
249
+ throw new Error("Method not implemented.");
250
+ }
251
+
252
+ }
253
+
254
+ export class WipeRight extends Effect {
255
+ duration = 1000;
256
+
257
+ apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
258
+ const ds = scaleTo - scaleFrom;
259
+ this.animate({
260
+ duration: this.duration,
261
+ timing(timeFraction) {
262
+
263
+ return timeFraction;
264
+ },
265
+ draw(progress) {
266
+ logger.debug("animation progress: " + progress.toString());
267
+ const scale = scaleFrom + (progress * ds / 100);
268
+ logger.debug("wipe: " + scale.toString());
269
+ element.style.transformOrigin = "left";
270
+ element.style.transform = "scaleX(" + scale + ")";
271
+ }
272
+ });
273
+ }
274
+ // eslint-disable-next-line no-unused-vars
275
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
276
+ throw new Error("Method not implemented.");
277
+ }
278
+
279
+ }
280
+
281
+ export class WipeUp extends Effect {
282
+
283
+ duration = 1000;
284
+
285
+ apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
286
+ const ds = scaleTo - scaleFrom;
287
+ this.animate({
288
+ duration: this.duration,
289
+ timing(timeFraction) {
290
+
291
+ return timeFraction;
292
+ },
293
+ draw(progress) {
294
+ logger.debug("animation progress: " + progress.toString());
295
+ const scale = scaleFrom + (progress * ds / 100);
296
+ logger.debug("wipe: " + scale.toString());
297
+ element.style.transformOrigin = "bottom";
298
+ element.style.transform = "scaleY(" + scale + ")";
299
+ }
300
+ });
301
+ }
302
+ // eslint-disable-next-line no-unused-vars
303
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
304
+ throw new Error("Method not implemented.");
305
+ }
306
+
307
+ }
308
+
309
+ export class WipeDown extends Effect {
310
+ duration = 1000;
311
+
312
+ apply(element:HTMLElement, scaleFrom:number, scaleTo:number) {
313
+ const ds = scaleTo - scaleFrom;
314
+ this.animate({
315
+ duration: this.duration,
316
+ timing(timeFraction) {
317
+
318
+ return timeFraction;
319
+ },
320
+ draw(progress) {
321
+ logger.debug("animation progress: " + progress.toString());
322
+ const scale = scaleFrom + (progress * ds / 100);
323
+ logger.debug("wipe: " + scale.toString());
324
+ element.style.transformOrigin = "top";
325
+ element.style.transform = "scaleY(" + scale + ")";
326
+ }
327
+ });
328
+ }
329
+ // eslint-disable-next-line no-unused-vars
330
+ animate(arg0: { duration: number; timing(timeFraction: any): any; draw(progress: any): void; }) {
331
+ throw new Error("Method not implemented.");
332
+ }
333
+ }
334
+ Package("org.qcobjects.effects.extended", [
335
+ MoveXInFromRight,
336
+ MoveXInFromLeft,
337
+ MoveYInFromBottom,
338
+ MoveYInFromTop,
339
+ RotateX,
340
+ RotateY,
341
+ RotateZ,
342
+ Rotate,
343
+ Radius,
344
+ Resize,
345
+ WipeLeft,
346
+ WipeRight,
347
+ WipeUp,
348
+ WipeDown
349
+
350
+ ]);