qcobjects-sdk 2.4.66 → 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 (147) 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 +2 -2
  4. package/README.md +0 -1
  5. package/VERSION +1 -1
  6. package/build/QCObjects-SDK.js +83 -41
  7. package/build/index.js +17 -7
  8. package/build/js/org.qcobjects.base.components.js +75 -0
  9. package/build/js/org.qcobjects.cloud.auth.session.data.js +98 -101
  10. package/build/js/org.qcobjects.cloud.auth.session.usertoken.js +68 -80
  11. package/build/js/org.qcobjects.components.grid.js +35 -53
  12. package/build/js/org.qcobjects.components.js +145 -237
  13. package/build/js/org.qcobjects.components.list.js +36 -45
  14. package/build/js/org.qcobjects.components.notifications.js +107 -106
  15. package/build/js/org.qcobjects.components.slider.js +183 -169
  16. package/build/js/org.qcobjects.components.splashscreen.js +123 -130
  17. package/build/js/org.qcobjects.controllers.form.js +149 -147
  18. package/build/js/org.qcobjects.controllers.grid.js +226 -215
  19. package/build/js/org.qcobjects.controllers.js +11 -11
  20. package/build/js/org.qcobjects.controllers.list.js +195 -188
  21. package/build/js/org.qcobjects.controllers.slider.js +101 -106
  22. package/build/js/org.qcobjects.controllers.swagger.js +71 -46
  23. package/build/js/org.qcobjects.effects.base.js +86 -0
  24. package/build/js/org.qcobjects.effects.extended.js +318 -0
  25. package/build/js/org.qcobjects.effects.js +26 -394
  26. package/build/js/org.qcobjects.i18n_messages.js +33 -46
  27. package/build/js/org.qcobjects.modal.controllers.js +16 -15
  28. package/build/js/org.qcobjects.modal.effects.js +23 -28
  29. package/build/js/org.qcobjects.models.js +11 -11
  30. package/build/js/org.qcobjects.tools.canvas.js +28 -27
  31. package/build/js/org.qcobjects.tools.js +10 -3
  32. package/build/js/org.qcobjects.tools.layouts.js +46 -45
  33. package/build/js/org.qcobjects.views.js +11 -11
  34. package/build-esbuild.js +72 -0
  35. package/eslint.config.mjs +88 -0
  36. package/package.json +67 -63
  37. package/postbuild.js +10 -0
  38. package/public/browser/index.js +9902 -0
  39. package/public/browser/index.js.map +7 -0
  40. package/public/cjs/index.cjs +9894 -0
  41. package/public/cjs/index.cjs.map +7 -0
  42. package/public/esm/index.mjs +9894 -0
  43. package/public/esm/index.mjs.map +7 -0
  44. package/public/types/index.d.ts +698 -0
  45. package/spec/helpers/mock-sdk.helper.ts +2 -0
  46. package/spec/mocks/qcobjects-sdk.mock.ts +1 -0
  47. package/spec/support/jasmine.json +7 -4
  48. package/src/QCObjects-SDK.ts +72 -53
  49. package/src/js/org.qcobjects.base.components.ts +83 -0
  50. package/src/js/org.qcobjects.cloud.auth.session.data.ts +98 -99
  51. package/src/js/org.qcobjects.cloud.auth.session.usertoken.ts +72 -92
  52. package/src/js/org.qcobjects.components.grid.ts +31 -58
  53. package/src/js/org.qcobjects.components.list.ts +15 -31
  54. package/src/js/org.qcobjects.components.notifications.ts +12 -12
  55. package/src/js/org.qcobjects.components.slider.ts +182 -171
  56. package/src/js/org.qcobjects.components.splashscreen.ts +31 -39
  57. package/src/js/org.qcobjects.components.ts +151 -261
  58. package/src/js/org.qcobjects.controllers.form.ts +151 -148
  59. package/src/js/org.qcobjects.controllers.grid.ts +226 -222
  60. package/src/js/org.qcobjects.controllers.list.ts +207 -205
  61. package/src/js/org.qcobjects.controllers.slider.ts +120 -125
  62. package/src/js/org.qcobjects.controllers.swagger.ts +51 -51
  63. package/src/js/org.qcobjects.controllers.ts +7 -9
  64. package/src/js/org.qcobjects.effects.base.ts +97 -0
  65. package/src/js/org.qcobjects.effects.extended.ts +350 -0
  66. package/src/js/org.qcobjects.effects.ts +6 -394
  67. package/src/js/org.qcobjects.i18n_messages.ts +37 -51
  68. package/src/js/org.qcobjects.modal.controllers.ts +12 -14
  69. package/src/js/org.qcobjects.modal.effects.ts +22 -18
  70. package/src/js/org.qcobjects.models.ts +8 -11
  71. package/src/js/org.qcobjects.tools.canvas.ts +26 -28
  72. package/src/js/org.qcobjects.tools.layouts.ts +44 -47
  73. package/src/js/org.qcobjects.tools.ts +7 -1
  74. package/src/js/org.qcobjects.views.ts +9 -8
  75. package/src/types/global/index.d.ts +181 -0
  76. package/transpile.js +65 -0
  77. package/tsconfig.d.json +65 -3
  78. package/tsconfig.jasmine.json +64 -0
  79. package/tsconfig.json +71 -7
  80. package/.eslintignore +0 -4
  81. package/.eslintrc.cjs +0 -6
  82. package/.gitmodules +0 -4
  83. package/build/css/base-modal.css +0 -43
  84. package/build/css/basic-layout-embedded-nav.css +0 -14
  85. package/build/css/basic-layout.css +0 -76
  86. package/build/css/components/horizontal-list.css +0 -64
  87. package/build/css/components/list.css +0 -57
  88. package/build/css/components/splashscreen.css +0 -111
  89. package/build/css/modal.css +0 -46
  90. package/build/index.cjs +0 -4
  91. package/build/index.mjs +0 -2
  92. package/build/templates/components/modalyoulose.tpl.html +0 -3
  93. package/build/templates/components/modalyouwin.tpl.html +0 -4
  94. package/build/templates/components/splashscreen.tpl.html +0 -128
  95. package/build/templates/components/swagger-ui.tpl.html +0 -22
  96. package/docs/CNAME +0 -1
  97. package/public/QCObjects-SDK.js +0 -696
  98. package/public/QCObjects-SDK.js.map +0 -7
  99. package/public/css/base-modal.css +0 -2
  100. package/public/css/base-modal.css.map +0 -7
  101. package/public/css/basic-layout-embedded-nav.css +0 -2
  102. package/public/css/basic-layout-embedded-nav.css.map +0 -7
  103. package/public/css/basic-layout.css +0 -2
  104. package/public/css/basic-layout.css.map +0 -7
  105. package/public/css/components/horizontal-list.css +0 -2
  106. package/public/css/components/horizontal-list.css.map +0 -7
  107. package/public/css/components/list.css +0 -2
  108. package/public/css/components/list.css.map +0 -7
  109. package/public/css/components/splashscreen.css +0 -2
  110. package/public/css/components/splashscreen.css.map +0 -7
  111. package/public/css/modal.css +0 -2
  112. package/public/css/modal.css.map +0 -7
  113. package/public/index.cjs +0 -4
  114. package/public/index.js +0 -27
  115. package/public/index.mjs +0 -2
  116. package/public/templates/components/modalyoulose.tpl.html +0 -3
  117. package/public/templates/components/modalyouwin.tpl.html +0 -4
  118. package/public/templates/components/splashscreen.tpl.html +0 -128
  119. package/public/templates/components/swagger-ui.tpl.html +0 -22
  120. package/src/QCObjects-SDK.d.ts +0 -26
  121. package/src/index.cts +0 -2
  122. package/src/index.d.ts +0 -2
  123. package/src/index.mts +0 -2
  124. package/src/js/org.qcobjects.cloud.auth.session.data.d.ts +0 -1
  125. package/src/js/org.qcobjects.cloud.auth.session.usertoken.d.ts +0 -2
  126. package/src/js/org.qcobjects.components.d.ts +0 -10
  127. package/src/js/org.qcobjects.components.grid.d.ts +0 -3
  128. package/src/js/org.qcobjects.components.list.d.ts +0 -3
  129. package/src/js/org.qcobjects.components.notifications.d.ts +0 -1
  130. package/src/js/org.qcobjects.components.slider.d.ts +0 -1
  131. package/src/js/org.qcobjects.components.splashscreen.d.ts +0 -28
  132. package/src/js/org.qcobjects.controllers.d.ts +0 -1
  133. package/src/js/org.qcobjects.controllers.form.d.ts +0 -1
  134. package/src/js/org.qcobjects.controllers.grid.d.ts +0 -1
  135. package/src/js/org.qcobjects.controllers.list.d.ts +0 -1
  136. package/src/js/org.qcobjects.controllers.slider.d.ts +0 -1
  137. package/src/js/org.qcobjects.controllers.swagger.d.ts +0 -1
  138. package/src/js/org.qcobjects.effects.d.ts +0 -20
  139. package/src/js/org.qcobjects.i18n_messages.d.ts +0 -1
  140. package/src/js/org.qcobjects.modal.controllers.d.ts +0 -1
  141. package/src/js/org.qcobjects.modal.effects.d.ts +0 -1
  142. package/src/js/org.qcobjects.models.d.ts +0 -1
  143. package/src/js/org.qcobjects.tools.canvas.d.ts +0 -1
  144. package/src/js/org.qcobjects.tools.d.ts +0 -1
  145. package/src/js/org.qcobjects.tools.layouts.d.ts +0 -1
  146. package/src/js/org.qcobjects.views.d.ts +0 -1
  147. /package/spec/{testsSpec.js → testsSpec.ts} +0 -0
@@ -1,50 +1,75 @@
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
+ */
1
25
  "use strict";
2
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.SwaggerUIController = void 0;
3
28
  const qcobjects_1 = require("qcobjects");
4
- (function () {
5
- "use strict";
6
- (0, qcobjects_1.Package)("org.qcobjects.controllers.swagger", [
7
- class SwaggerUIController extends qcobjects_1.Controller {
8
- startSwaggerUI() {
9
- // Begin Swagger UI call region
10
- if (typeof SwaggerUIBundle !== "undefined") {
11
- /* eslint-disable no-undef */
12
- const ui = SwaggerUIBundle({
13
- url: qcobjects_1.CONFIG.get("swagger-ui-url", "https://petstore.swagger.io/v2/swagger.json"),
14
- dom_id: "#" + qcobjects_1.CONFIG.get("swagger-ui-dom_id", "swagger-ui"),
15
- deepLinking: true,
16
- presets: [
17
- SwaggerUIBundle.presets.apis,
18
- SwaggerUIStandalonePreset
19
- ],
20
- plugins: [
21
- SwaggerUIBundle.plugins.DownloadUrl
22
- ],
23
- layout: "StandaloneLayout"
24
- });
25
- // End Swagger UI call region
26
- window.ui = ui;
27
- }
28
- }
29
- done() {
30
- this.component.body.innerHTML = "<div id=\"" + qcobjects_1.CONFIG.get("swagger-ui-dom_id", "swagger-ui") + "\"></div>";
31
- const swaggerUIPackagePath = qcobjects_1.CONFIG.get("swagger-ui-package-path", "node_modules/swagger-ui-dist/");
32
- this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {
33
- url: swaggerUIPackagePath + "swagger-ui-standalone-preset.js",
34
- external: qcobjects_1.CONFIG.get("swagger-ui-external", false)
35
- }));
36
- this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceCSS, {
37
- url: swaggerUIPackagePath + "swagger-ui.css",
38
- external: qcobjects_1.CONFIG.get("swagger-ui-external", false)
39
- }));
40
- this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {
41
- url: swaggerUIPackagePath + "swagger-ui-bundle.js",
42
- external: qcobjects_1.CONFIG.get("swagger-ui-external", false),
43
- done: () => {
44
- this.startSwaggerUI();
45
- }
46
- }));
47
- }
29
+ class SwaggerUIController extends qcobjects_1.Controller {
30
+ component;
31
+ dependencies;
32
+ startSwaggerUI() {
33
+ // Begin Swagger UI call region
34
+ if (typeof SwaggerUIBundle !== "undefined") {
35
+ const ui = SwaggerUIBundle({
36
+ url: qcobjects_1.CONFIG.get("swagger-ui-url", "https://petstore.swagger.io/v2/swagger.json"),
37
+ dom_id: "#" + qcobjects_1.CONFIG.get("swagger-ui-dom_id", "swagger-ui"),
38
+ deepLinking: true,
39
+ presets: [
40
+ SwaggerUIBundle.presets.apis,
41
+ SwaggerUIStandalonePreset
42
+ ],
43
+ plugins: [
44
+ SwaggerUIBundle.plugins.DownloadUrl
45
+ ],
46
+ layout: "StandaloneLayout"
47
+ });
48
+ // End Swagger UI call region
49
+ window.ui = ui;
48
50
  }
49
- ]);
50
- })();
51
+ }
52
+ done() {
53
+ this.component.body.innerHTML = "<div id=\"" + qcobjects_1.CONFIG.get("swagger-ui-dom_id", "swagger-ui") + "\"></div>";
54
+ const swaggerUIPackagePath = qcobjects_1.CONFIG.get("swagger-ui-package-path", "node_modules/swagger-ui-dist/");
55
+ this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {
56
+ url: swaggerUIPackagePath + "swagger-ui-standalone-preset.js",
57
+ external: qcobjects_1.CONFIG.get("swagger-ui-external", false)
58
+ }));
59
+ this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceCSS, {
60
+ url: swaggerUIPackagePath + "swagger-ui.css",
61
+ external: qcobjects_1.CONFIG.get("swagger-ui-external", false)
62
+ }));
63
+ this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {
64
+ url: swaggerUIPackagePath + "swagger-ui-bundle.js",
65
+ external: qcobjects_1.CONFIG.get("swagger-ui-external", false),
66
+ done: () => {
67
+ this.startSwaggerUI();
68
+ }
69
+ }));
70
+ }
71
+ }
72
+ exports.SwaggerUIController = SwaggerUIController;
73
+ (0, qcobjects_1.Package)("org.qcobjects.controllers.swagger", [
74
+ SwaggerUIController
75
+ ]);
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Move = exports.Fade = void 0;
4
+ const qcobjects_1 = require("qcobjects");
5
+ class Fade extends qcobjects_1.Effect {
6
+ duration = 1000;
7
+ static duration;
8
+ constructor(o) {
9
+ super(o);
10
+ this.duration = o?.duration;
11
+ }
12
+ apply(element, alphaFrom, alphaTo) {
13
+ const da = alphaTo - alphaFrom;
14
+ this.animate({
15
+ duration: this.duration,
16
+ timing(timeFraction) {
17
+ return timeFraction;
18
+ },
19
+ draw(progress) {
20
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
21
+ const alpha = alphaFrom + (progress * da / 100);
22
+ qcobjects_1.logger.debug("alpha: " + alpha.toString());
23
+ element.style.opacity = alpha.toString();
24
+ }
25
+ });
26
+ }
27
+ static apply(element, alphaFrom, alphaTo) {
28
+ const da = alphaTo - alphaFrom;
29
+ this.animate({
30
+ duration: this.duration,
31
+ timing(timeFraction) {
32
+ return timeFraction;
33
+ },
34
+ draw(progress) {
35
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
36
+ const alpha = alphaFrom + (progress * da / 100);
37
+ qcobjects_1.logger.debug("alpha: " + alpha.toString());
38
+ element.style.opacity = alpha.toString();
39
+ }
40
+ });
41
+ }
42
+ // eslint-disable-next-line no-unused-vars
43
+ static animate(arg0) {
44
+ throw new Error("Method not implemented.");
45
+ }
46
+ // eslint-disable-next-line no-unused-vars
47
+ animate(arg0) {
48
+ throw new Error("Method not implemented.");
49
+ }
50
+ }
51
+ exports.Fade = Fade;
52
+ class Move extends qcobjects_1.Effect {
53
+ duration = 1000;
54
+ static duration;
55
+ static apply(element, xfrom, yfrom, xto, yto) {
56
+ const dx = xto - xfrom;
57
+ const dy = yto - yfrom;
58
+ element.style.transform = "translate(" + xfrom + "px," + yfrom + "px)";
59
+ this.animate({
60
+ duration: this.duration,
61
+ timing(timeFraction) {
62
+ return timeFraction;
63
+ },
64
+ draw(progress) {
65
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
66
+ const y = yfrom + (progress * dy / 100);
67
+ const x = xfrom + (progress * dx / 100);
68
+ qcobjects_1.logger.debug("x: " + x.toString() + " y:" + y.toString());
69
+ element.style.transform = "translate(" + x + "px," + y + "px)";
70
+ }
71
+ });
72
+ }
73
+ // eslint-disable-next-line no-unused-vars
74
+ static animate(arg0) {
75
+ throw new Error("Method not implemented.");
76
+ }
77
+ // eslint-disable-next-line no-unused-vars
78
+ animate(arg0) {
79
+ throw new Error("Method not implemented.");
80
+ }
81
+ }
82
+ exports.Move = Move;
83
+ (0, qcobjects_1.Package)("org.qcobjects.effects.base", [
84
+ Fade,
85
+ Move
86
+ ]);
@@ -0,0 +1,318 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.WipeDown = exports.WipeUp = exports.WipeRight = exports.WipeLeft = exports.Resize = exports.Radius = exports.Rotate = exports.RotateZ = exports.RotateY = exports.RotateX = exports.MoveYInFromTop = exports.MoveYInFromBottom = exports.MoveXInFromLeft = exports.MoveXInFromRight = void 0;
28
+ const qcobjects_1 = require("qcobjects");
29
+ const org_qcobjects_effects_base_1 = require("./org.qcobjects.effects.base");
30
+ class MoveXInFromRight extends org_qcobjects_effects_base_1.Move {
31
+ duration = 1000;
32
+ static apply(element) {
33
+ org_qcobjects_effects_base_1.Move.apply.call(this, element, element.width, 0, 0, 0);
34
+ }
35
+ }
36
+ exports.MoveXInFromRight = MoveXInFromRight;
37
+ class MoveXInFromLeft extends org_qcobjects_effects_base_1.Move {
38
+ duration = 1000;
39
+ static apply(element) {
40
+ org_qcobjects_effects_base_1.Move.apply.call(this, element, -element.width, 0, 0, 0);
41
+ }
42
+ }
43
+ exports.MoveXInFromLeft = MoveXInFromLeft;
44
+ class MoveYInFromBottom extends org_qcobjects_effects_base_1.Move {
45
+ duration = 1000;
46
+ static apply(element) {
47
+ org_qcobjects_effects_base_1.Move.apply.call(this, element, 0, element.height, 0, 0);
48
+ }
49
+ }
50
+ exports.MoveYInFromBottom = MoveYInFromBottom;
51
+ class MoveYInFromTop extends org_qcobjects_effects_base_1.Move {
52
+ duration = 1000;
53
+ static apply(element) {
54
+ org_qcobjects_effects_base_1.Move.apply.call(this, element, 0, -element.height, 0, 0);
55
+ }
56
+ }
57
+ exports.MoveYInFromTop = MoveYInFromTop;
58
+ class RotateX extends qcobjects_1.Effect {
59
+ duration = 1000;
60
+ static duration;
61
+ static apply(element, angleFrom, angleTo) {
62
+ const da = angleTo - angleFrom;
63
+ this.animate({
64
+ duration: this.duration,
65
+ timing(timeFraction) {
66
+ return timeFraction;
67
+ },
68
+ draw(progress) {
69
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
70
+ const angle = Math.round(angleFrom + (progress * da / 100));
71
+ qcobjects_1.logger.debug("angle: " + angle.toString());
72
+ element.style.transform = "rotate3d(1,0,0," + angle.toString() + "deg)";
73
+ }
74
+ });
75
+ }
76
+ // eslint-disable-next-line no-unused-vars
77
+ static animate(arg0) {
78
+ throw new Error("Method not implemented.");
79
+ }
80
+ // eslint-disable-next-line no-unused-vars
81
+ animate(arg0) {
82
+ throw new Error("Method not implemented.");
83
+ }
84
+ }
85
+ exports.RotateX = RotateX;
86
+ class RotateY extends qcobjects_1.Effect {
87
+ duration = 1000;
88
+ static duration;
89
+ static apply(element, angleFrom, angleTo) {
90
+ const da = angleTo - angleFrom;
91
+ this.animate({
92
+ duration: this.duration,
93
+ timing(timeFraction) {
94
+ return timeFraction;
95
+ },
96
+ draw(progress) {
97
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
98
+ const angle = Math.round(angleFrom + (progress * da / 100));
99
+ qcobjects_1.logger.debug("angle: " + angle.toString());
100
+ element.style.transform = "rotate3d(0,1,0," + angle.toString() + "deg)";
101
+ }
102
+ });
103
+ }
104
+ // eslint-disable-next-line no-unused-vars
105
+ static animate(arg0) {
106
+ throw new Error("Method not implemented.");
107
+ }
108
+ // eslint-disable-next-line no-unused-vars
109
+ animate(arg0) {
110
+ throw new Error("Method not implemented.");
111
+ }
112
+ }
113
+ exports.RotateY = RotateY;
114
+ class RotateZ extends qcobjects_1.Effect {
115
+ duration = 1000;
116
+ apply(element, angleFrom, angleTo) {
117
+ const da = angleTo - angleFrom;
118
+ this.animate({
119
+ duration: this.duration,
120
+ timing(timeFraction) {
121
+ return timeFraction;
122
+ },
123
+ draw(progress) {
124
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
125
+ const angle = Math.round(angleFrom + (progress * da / 100));
126
+ qcobjects_1.logger.debug("angle: " + angle.toString());
127
+ element.style.transform = "rotate3d(0,0,1," + angle.toString() + "deg)";
128
+ }
129
+ });
130
+ }
131
+ // eslint-disable-next-line no-unused-vars
132
+ animate(arg0) {
133
+ throw new Error("Method not implemented.");
134
+ }
135
+ }
136
+ exports.RotateZ = RotateZ;
137
+ class Rotate extends qcobjects_1.Effect {
138
+ duration = 1000;
139
+ apply(element, angleFrom, angleTo) {
140
+ const da = angleTo - angleFrom;
141
+ this.animate({
142
+ duration: this.duration,
143
+ timing(timeFraction) {
144
+ return timeFraction;
145
+ },
146
+ draw(progress) {
147
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
148
+ const angle = Math.round(angleFrom + (progress * da / 100));
149
+ qcobjects_1.logger.debug("angle: " + angle.toString());
150
+ element.style.transform = "rotate3d(1,1,1," + angle.toString() + "deg)";
151
+ }
152
+ });
153
+ }
154
+ // eslint-disable-next-line no-unused-vars
155
+ animate(arg0) {
156
+ throw new Error("Method not implemented.");
157
+ }
158
+ }
159
+ exports.Rotate = Rotate;
160
+ class Radius extends qcobjects_1.Effect {
161
+ duration = 1000;
162
+ apply(element, radiusFrom, radiusTo) {
163
+ const dr = radiusTo - radiusFrom;
164
+ this.animate({
165
+ duration: this.duration,
166
+ timing(timeFraction) {
167
+ return timeFraction;
168
+ },
169
+ draw(progress) {
170
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
171
+ const radius = radiusFrom + (progress * dr / 100);
172
+ qcobjects_1.logger.debug("radius: " + radius.toString());
173
+ element.style.borderRadius = radius.toString() + "px";
174
+ }
175
+ });
176
+ }
177
+ // eslint-disable-next-line no-unused-vars
178
+ animate(arg0) {
179
+ throw new Error("Method not implemented.");
180
+ }
181
+ }
182
+ exports.Radius = Radius;
183
+ class Resize extends qcobjects_1.Effect {
184
+ duration = 1000;
185
+ apply(element, scaleFrom, scaleTo) {
186
+ const ds = scaleTo - scaleFrom;
187
+ this.animate({
188
+ duration: this.duration,
189
+ timing(timeFraction) {
190
+ return timeFraction;
191
+ },
192
+ draw(progress) {
193
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
194
+ const scale = scaleFrom + (progress * ds / 100);
195
+ qcobjects_1.logger.debug("resize: " + scale.toString());
196
+ element.style.transformOrigin = "center";
197
+ element.style.transform = "scale(" + scale + "," + scale + ")";
198
+ }
199
+ });
200
+ }
201
+ // eslint-disable-next-line no-unused-vars
202
+ animate(arg0) {
203
+ throw new Error("Method not implemented.");
204
+ }
205
+ }
206
+ exports.Resize = Resize;
207
+ class WipeLeft extends qcobjects_1.Effect {
208
+ duration = 1000;
209
+ apply(element, scaleFrom, scaleTo) {
210
+ const ds = scaleTo - scaleFrom;
211
+ this.animate({
212
+ duration: this.duration,
213
+ timing(timeFraction) {
214
+ return timeFraction;
215
+ },
216
+ draw(progress) {
217
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
218
+ const scale = scaleFrom + (progress * ds / 100);
219
+ qcobjects_1.logger.debug("wipe: " + scale.toString());
220
+ element.style.transformOrigin = "right";
221
+ element.style.transform = "scaleX(" + scale + ")";
222
+ }
223
+ });
224
+ }
225
+ // eslint-disable-next-line no-unused-vars
226
+ animate(arg0) {
227
+ throw new Error("Method not implemented.");
228
+ }
229
+ }
230
+ exports.WipeLeft = WipeLeft;
231
+ class WipeRight extends qcobjects_1.Effect {
232
+ duration = 1000;
233
+ apply(element, scaleFrom, scaleTo) {
234
+ const ds = scaleTo - scaleFrom;
235
+ this.animate({
236
+ duration: this.duration,
237
+ timing(timeFraction) {
238
+ return timeFraction;
239
+ },
240
+ draw(progress) {
241
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
242
+ const scale = scaleFrom + (progress * ds / 100);
243
+ qcobjects_1.logger.debug("wipe: " + scale.toString());
244
+ element.style.transformOrigin = "left";
245
+ element.style.transform = "scaleX(" + scale + ")";
246
+ }
247
+ });
248
+ }
249
+ // eslint-disable-next-line no-unused-vars
250
+ animate(arg0) {
251
+ throw new Error("Method not implemented.");
252
+ }
253
+ }
254
+ exports.WipeRight = WipeRight;
255
+ class WipeUp extends qcobjects_1.Effect {
256
+ duration = 1000;
257
+ apply(element, scaleFrom, scaleTo) {
258
+ const ds = scaleTo - scaleFrom;
259
+ this.animate({
260
+ duration: this.duration,
261
+ timing(timeFraction) {
262
+ return timeFraction;
263
+ },
264
+ draw(progress) {
265
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
266
+ const scale = scaleFrom + (progress * ds / 100);
267
+ qcobjects_1.logger.debug("wipe: " + scale.toString());
268
+ element.style.transformOrigin = "bottom";
269
+ element.style.transform = "scaleY(" + scale + ")";
270
+ }
271
+ });
272
+ }
273
+ // eslint-disable-next-line no-unused-vars
274
+ animate(arg0) {
275
+ throw new Error("Method not implemented.");
276
+ }
277
+ }
278
+ exports.WipeUp = WipeUp;
279
+ class WipeDown extends qcobjects_1.Effect {
280
+ duration = 1000;
281
+ apply(element, scaleFrom, scaleTo) {
282
+ const ds = scaleTo - scaleFrom;
283
+ this.animate({
284
+ duration: this.duration,
285
+ timing(timeFraction) {
286
+ return timeFraction;
287
+ },
288
+ draw(progress) {
289
+ qcobjects_1.logger.debug("animation progress: " + progress.toString());
290
+ const scale = scaleFrom + (progress * ds / 100);
291
+ qcobjects_1.logger.debug("wipe: " + scale.toString());
292
+ element.style.transformOrigin = "top";
293
+ element.style.transform = "scaleY(" + scale + ")";
294
+ }
295
+ });
296
+ }
297
+ // eslint-disable-next-line no-unused-vars
298
+ animate(arg0) {
299
+ throw new Error("Method not implemented.");
300
+ }
301
+ }
302
+ exports.WipeDown = WipeDown;
303
+ (0, qcobjects_1.Package)("org.qcobjects.effects.extended", [
304
+ MoveXInFromRight,
305
+ MoveXInFromLeft,
306
+ MoveYInFromBottom,
307
+ MoveYInFromTop,
308
+ RotateX,
309
+ RotateY,
310
+ RotateZ,
311
+ Rotate,
312
+ Radius,
313
+ Resize,
314
+ WipeLeft,
315
+ WipeRight,
316
+ WipeUp,
317
+ WipeDown
318
+ ]);