qcobjects-sdk 2.4.66 → 2.5.105

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 (177) hide show
  1. package/.github/workflows/npmpublish.yml +47 -0
  2. package/README.md +0 -1
  3. package/VERSION +1 -1
  4. package/build/index.js +137 -25
  5. package/build/ts/org.qcobjects.base.components.js +75 -0
  6. package/build/ts/org.qcobjects.cloud.auth.session.data.js +122 -0
  7. package/build/ts/org.qcobjects.cloud.auth.session.usertoken.js +97 -0
  8. package/build/ts/org.qcobjects.components.grid.js +63 -0
  9. package/build/ts/org.qcobjects.components.js +200 -0
  10. package/build/{js/org.qcobjects.modal.effects.js → ts/org.qcobjects.components.list.js} +40 -29
  11. package/build/ts/org.qcobjects.components.notifications.js +180 -0
  12. package/build/ts/org.qcobjects.components.slider.js +207 -0
  13. package/build/{js → ts}/org.qcobjects.components.splashscreen.js +123 -130
  14. package/build/ts/org.qcobjects.controllers.form.js +180 -0
  15. package/build/ts/org.qcobjects.controllers.grid.js +269 -0
  16. package/build/{js → ts}/org.qcobjects.controllers.js +11 -11
  17. package/build/ts/org.qcobjects.controllers.list.js +235 -0
  18. package/build/ts/org.qcobjects.controllers.slider.js +126 -0
  19. package/build/ts/org.qcobjects.controllers.swagger.js +75 -0
  20. package/build/ts/org.qcobjects.effects.base.js +70 -0
  21. package/build/ts/org.qcobjects.effects.extended.js +270 -0
  22. package/build/ts/org.qcobjects.effects.js +49 -0
  23. package/build/ts/org.qcobjects.i18n_messages.js +59 -0
  24. package/build/{js → ts}/org.qcobjects.modal.controllers.js +16 -15
  25. package/build/ts/org.qcobjects.modal.effects.js +46 -0
  26. package/build/{js → ts}/org.qcobjects.models.js +11 -11
  27. package/{src/js/org.qcobjects.tools.canvas.ts → build/ts/org.qcobjects.tools.canvas.js} +16 -21
  28. package/build/{js → ts}/org.qcobjects.tools.js +10 -3
  29. package/build/ts/org.qcobjects.tools.layouts.js +74 -0
  30. package/build/{js → ts}/org.qcobjects.views.js +11 -11
  31. package/build-esbuild.js +72 -0
  32. package/eslint.config.mjs +88 -0
  33. package/package.json +67 -63
  34. package/postbuild.js +10 -0
  35. package/public/browser/index.js +9829 -0
  36. package/public/browser/index.js.map +7 -0
  37. package/public/cjs/index.cjs +9879 -0
  38. package/public/cjs/index.cjs.map +7 -0
  39. package/public/esm/index.mjs +9819 -0
  40. package/public/esm/index.mjs.map +7 -0
  41. package/public/types/index.d.ts +614 -0
  42. package/spec/helpers/mock-sdk.helper.ts +2 -0
  43. package/spec/mocks/qcobjects-sdk.mock.ts +1 -0
  44. package/spec/support/jasmine.json +7 -4
  45. package/src/index.ts +127 -2
  46. package/src/ts/org.qcobjects.base.components.ts +83 -0
  47. package/src/ts/org.qcobjects.cloud.auth.session.data.ts +134 -0
  48. package/src/ts/org.qcobjects.cloud.auth.session.usertoken.ts +108 -0
  49. package/src/ts/org.qcobjects.components.grid.ts +68 -0
  50. package/src/{js → ts}/org.qcobjects.components.list.ts +15 -31
  51. package/src/{js → ts}/org.qcobjects.components.notifications.ts +12 -12
  52. package/src/ts/org.qcobjects.components.slider.ts +216 -0
  53. package/src/{js → ts}/org.qcobjects.components.splashscreen.ts +31 -39
  54. package/src/ts/org.qcobjects.components.ts +226 -0
  55. package/src/ts/org.qcobjects.controllers.form.ts +209 -0
  56. package/src/ts/org.qcobjects.controllers.grid.ts +291 -0
  57. package/src/ts/org.qcobjects.controllers.list.ts +256 -0
  58. package/src/ts/org.qcobjects.controllers.slider.ts +153 -0
  59. package/src/ts/org.qcobjects.controllers.swagger.ts +83 -0
  60. package/src/{js → ts}/org.qcobjects.controllers.ts +7 -9
  61. package/src/ts/org.qcobjects.effects.base.ts +81 -0
  62. package/src/{js/org.qcobjects.effects.ts → ts/org.qcobjects.effects.extended.ts} +70 -198
  63. package/src/ts/org.qcobjects.effects.ts +42 -0
  64. package/src/ts/org.qcobjects.i18n_messages.ts +68 -0
  65. package/src/{js → ts}/org.qcobjects.modal.controllers.ts +12 -14
  66. package/src/{js → ts}/org.qcobjects.modal.effects.ts +22 -18
  67. package/src/{js → ts}/org.qcobjects.models.ts +8 -11
  68. package/src/ts/org.qcobjects.tools.canvas.ts +57 -0
  69. package/src/ts/org.qcobjects.tools.layouts.ts +82 -0
  70. package/src/{js → ts}/org.qcobjects.tools.ts +7 -1
  71. package/src/{js → ts}/org.qcobjects.views.ts +9 -8
  72. package/src/types/global/index.d.ts +181 -0
  73. package/transpile.js +65 -0
  74. package/tsconfig.d.json +65 -3
  75. package/tsconfig.jasmine.json +64 -0
  76. package/tsconfig.json +71 -7
  77. package/.eslintignore +0 -4
  78. package/.eslintrc.cjs +0 -6
  79. package/.github/workflows/npmpublish-beta.yml +0 -38
  80. package/.github/workflows/npmpublish-lts.yml +0 -38
  81. package/.github/workflows/npmpublish-main.yml +0 -40
  82. package/.gitmodules +0 -4
  83. package/build/QCObjects-SDK.js +0 -97
  84. package/build/css/base-modal.css +0 -43
  85. package/build/css/basic-layout-embedded-nav.css +0 -14
  86. package/build/css/basic-layout.css +0 -76
  87. package/build/css/components/horizontal-list.css +0 -64
  88. package/build/css/components/list.css +0 -57
  89. package/build/css/components/splashscreen.css +0 -111
  90. package/build/css/modal.css +0 -46
  91. package/build/index.cjs +0 -4
  92. package/build/index.mjs +0 -2
  93. package/build/js/org.qcobjects.cloud.auth.session.data.js +0 -125
  94. package/build/js/org.qcobjects.cloud.auth.session.usertoken.js +0 -109
  95. package/build/js/org.qcobjects.components.grid.js +0 -81
  96. package/build/js/org.qcobjects.components.js +0 -292
  97. package/build/js/org.qcobjects.components.list.js +0 -71
  98. package/build/js/org.qcobjects.components.notifications.js +0 -179
  99. package/build/js/org.qcobjects.components.slider.js +0 -193
  100. package/build/js/org.qcobjects.controllers.form.js +0 -178
  101. package/build/js/org.qcobjects.controllers.grid.js +0 -258
  102. package/build/js/org.qcobjects.controllers.list.js +0 -228
  103. package/build/js/org.qcobjects.controllers.slider.js +0 -131
  104. package/build/js/org.qcobjects.controllers.swagger.js +0 -50
  105. package/build/js/org.qcobjects.effects.js +0 -417
  106. package/build/js/org.qcobjects.i18n_messages.js +0 -72
  107. package/build/js/org.qcobjects.tools.canvas.js +0 -53
  108. package/build/js/org.qcobjects.tools.layouts.js +0 -73
  109. package/build/templates/components/modalyoulose.tpl.html +0 -3
  110. package/build/templates/components/modalyouwin.tpl.html +0 -4
  111. package/build/templates/components/splashscreen.tpl.html +0 -128
  112. package/build/templates/components/swagger-ui.tpl.html +0 -22
  113. package/docs/CNAME +0 -1
  114. package/public/QCObjects-SDK.js +0 -696
  115. package/public/QCObjects-SDK.js.map +0 -7
  116. package/public/css/base-modal.css +0 -2
  117. package/public/css/base-modal.css.map +0 -7
  118. package/public/css/basic-layout-embedded-nav.css +0 -2
  119. package/public/css/basic-layout-embedded-nav.css.map +0 -7
  120. package/public/css/basic-layout.css +0 -2
  121. package/public/css/basic-layout.css.map +0 -7
  122. package/public/css/components/horizontal-list.css +0 -2
  123. package/public/css/components/horizontal-list.css.map +0 -7
  124. package/public/css/components/list.css +0 -2
  125. package/public/css/components/list.css.map +0 -7
  126. package/public/css/components/splashscreen.css +0 -2
  127. package/public/css/components/splashscreen.css.map +0 -7
  128. package/public/css/modal.css +0 -2
  129. package/public/css/modal.css.map +0 -7
  130. package/public/index.cjs +0 -4
  131. package/public/index.js +0 -27
  132. package/public/index.mjs +0 -2
  133. package/public/templates/components/modalyoulose.tpl.html +0 -3
  134. package/public/templates/components/modalyouwin.tpl.html +0 -4
  135. package/public/templates/components/splashscreen.tpl.html +0 -128
  136. package/public/templates/components/swagger-ui.tpl.html +0 -22
  137. package/src/QCObjects-SDK.d.ts +0 -26
  138. package/src/QCObjects-SDK.ts +0 -108
  139. package/src/index.cts +0 -2
  140. package/src/index.d.ts +0 -2
  141. package/src/index.mts +0 -2
  142. package/src/js/org.qcobjects.cloud.auth.session.data.d.ts +0 -1
  143. package/src/js/org.qcobjects.cloud.auth.session.data.ts +0 -135
  144. package/src/js/org.qcobjects.cloud.auth.session.usertoken.d.ts +0 -2
  145. package/src/js/org.qcobjects.cloud.auth.session.usertoken.ts +0 -128
  146. package/src/js/org.qcobjects.components.d.ts +0 -10
  147. package/src/js/org.qcobjects.components.grid.d.ts +0 -3
  148. package/src/js/org.qcobjects.components.grid.ts +0 -95
  149. package/src/js/org.qcobjects.components.list.d.ts +0 -3
  150. package/src/js/org.qcobjects.components.notifications.d.ts +0 -1
  151. package/src/js/org.qcobjects.components.slider.d.ts +0 -1
  152. package/src/js/org.qcobjects.components.slider.ts +0 -205
  153. package/src/js/org.qcobjects.components.splashscreen.d.ts +0 -28
  154. package/src/js/org.qcobjects.components.ts +0 -336
  155. package/src/js/org.qcobjects.controllers.d.ts +0 -1
  156. package/src/js/org.qcobjects.controllers.form.d.ts +0 -1
  157. package/src/js/org.qcobjects.controllers.form.ts +0 -206
  158. package/src/js/org.qcobjects.controllers.grid.d.ts +0 -1
  159. package/src/js/org.qcobjects.controllers.grid.ts +0 -287
  160. package/src/js/org.qcobjects.controllers.list.d.ts +0 -1
  161. package/src/js/org.qcobjects.controllers.list.ts +0 -254
  162. package/src/js/org.qcobjects.controllers.slider.d.ts +0 -1
  163. package/src/js/org.qcobjects.controllers.slider.ts +0 -158
  164. package/src/js/org.qcobjects.controllers.swagger.d.ts +0 -1
  165. package/src/js/org.qcobjects.controllers.swagger.ts +0 -83
  166. package/src/js/org.qcobjects.effects.d.ts +0 -20
  167. package/src/js/org.qcobjects.i18n_messages.d.ts +0 -1
  168. package/src/js/org.qcobjects.i18n_messages.ts +0 -82
  169. package/src/js/org.qcobjects.modal.controllers.d.ts +0 -1
  170. package/src/js/org.qcobjects.modal.effects.d.ts +0 -1
  171. package/src/js/org.qcobjects.models.d.ts +0 -1
  172. package/src/js/org.qcobjects.tools.canvas.d.ts +0 -1
  173. package/src/js/org.qcobjects.tools.d.ts +0 -1
  174. package/src/js/org.qcobjects.tools.layouts.d.ts +0 -1
  175. package/src/js/org.qcobjects.tools.layouts.ts +0 -85
  176. package/src/js/org.qcobjects.views.d.ts +0 -1
  177. /package/spec/{testsSpec.js → testsSpec.ts} +0 -0
@@ -0,0 +1,57 @@
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
+
27
+ import { Package, InheritClass } from "qcobjects";
28
+
29
+ export class CanvasTool extends InheritClass {
30
+
31
+ drawImageFilled(img: HTMLImageElement, canvas: HTMLCanvasElement, zoom = 1, px = 0, py = 0) {
32
+ // get the scale
33
+ let scale = Math.max(canvas.width / img.width, canvas.height / img.height);
34
+ scale = scale * zoom;
35
+ // get the top left position of the image
36
+ const x = (canvas.width / 2) - (img.width / 2) * scale;
37
+ const y = (canvas.height / 2) - (img.height / 2) * scale;
38
+ const ctx = canvas.getContext("2d");
39
+ ctx?.drawImage(img, (px + x), (py + y), img.width * scale, img.height * scale);
40
+ }
41
+
42
+ getImageResized(img: HTMLImageElement, width: number, height: number, resizedImage: HTMLImageElement, zoom = 1, px = 0, py = 0) {
43
+ const canvas = document.createElement("canvas");
44
+ canvas.width = width;
45
+ canvas.height = height;
46
+ canvas.style.width = width.toString();
47
+ canvas.style.height = height.toString();
48
+ this.drawImageFilled(img, canvas, zoom, px, py);
49
+ resizedImage.src = canvas.toDataURL("image/png");
50
+ return canvas;
51
+ }
52
+
53
+ }
54
+
55
+ Package("org.qcobjects.tools.canvas", [
56
+ CanvasTool
57
+ ]);
@@ -0,0 +1,82 @@
1
+ /* eslint-disable array-callback-return */
2
+ /**
3
+ * QCObjects SDK 2.5
4
+ * ________________
5
+ *
6
+ * Author: Jean Machuca <correojean@gmail.com>
7
+ *
8
+ * Cross Browser Javascript Framework for MVC Patterns
9
+ * QuickCorp/QCObjects is licensed under the
10
+ * GNU Lesser General Public License v3.0
11
+ * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
12
+ *
13
+ * Permissions of this copyleft license are conditioned on making available
14
+ * complete source code of licensed works and modifications under the same
15
+ * license or the GNU GPLv3. Copyright and license notices must be preserved.
16
+ * Contributors provide an express grant of patent rights. However, a larger
17
+ * work using the licensed work through interfaces provided by the licensed
18
+ * work may be distributed under different terms and without source code for
19
+ * the larger work.
20
+ *
21
+ * Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
22
+ *
23
+ * Everyone is permitted to copy and distribute verbatim copies of this
24
+ * license document, but changing it is not allowed.
25
+ */
26
+ "use strict";
27
+
28
+ import { CONFIG, InheritClass, New, Package, SourceCSS, Tag } from "qcobjects";
29
+ import { Fade, MoveXInFromLeft, MoveXInFromRight, MoveYInFromBottom } from "./org.qcobjects.effects";
30
+ export class BasicLayout extends InheritClass {
31
+ dependencies: any[] = [];
32
+
33
+ constructor({ component = null, dependencies = [] }) {
34
+ super({ component, dependencies });
35
+ }
36
+
37
+ load() {
38
+ this.dependencies.push(New(SourceCSS, {
39
+ external: !(CONFIG.get("useLocalSDK", false)),
40
+ url: (CONFIG.get("useLocalSDK", false)) ? ("css/basic-layout.css") : (CONFIG.get("remoteSDKPath", false) + "css/basic-layout.css")
41
+ }));
42
+ }
43
+
44
+ coloredBorder() {
45
+ /*
46
+ * A helper function to visualize the layout borders
47
+ * Usage: BasicLayout.coloredBorder()
48
+ */
49
+ setTimeout(function () {
50
+ Tag("nav").map((element: HTMLElement) => { element.style.border = "20px solid #3333"; });
51
+ Tag("nav").map((element: HTMLElement) => { element.style.backgroundColor = "#129999"; });
52
+ Tag("component>footer").map((element: HTMLElement) => { element.style.background = "#876"; });
53
+ Tag("component>div").map((element: HTMLElement) => { element.style.border = "3px dashed #fff"; });
54
+ Tag("component>section").map((element: HTMLElement) => { element.style.border = "3px solid #000"; });
55
+ Tag("component>section").map((element: HTMLElement) => { element.style.backgroundColor = "#fffaaa"; });
56
+
57
+ Tag("component>article").map((element: HTMLElement) => { element.style.border = "3px dotted #000"; });
58
+ Tag("component>header").map((element: HTMLElement) => { element.style.background = "#789"; });
59
+ Tag("component>footer").map((element: HTMLElement) => { element.style.background = "#876"; });
60
+ Tag("component>article:nth-child(1)").map((element: HTMLElement) => { element.style.border = "1px solid #444"; });
61
+ Tag("component>article:nth-child(1)").map((element: HTMLElement) => { element.style.backgroundColor = "#555aaa"; });
62
+ Tag("component>article:nth-child(2)").map((element: HTMLElement) => { element.style.backgroundColor = "#aaa333"; });
63
+ Tag("component>article:nth-child(3)").map((element: HTMLElement) => { element.style.backgroundColor = "#54da82"; });
64
+ Tag("*").map((element: HTMLElement) => { element.style.color = "#fff"; });
65
+
66
+
67
+ Tag("component>article").map((element: HTMLElement) => Fade.apply(element, 0, 1));
68
+ Tag("component>footer").map((element: HTMLElement) => Fade.apply(element, 0, 1));
69
+ Tag("component>header").map((element: HTMLElement) => Fade.apply(element, 0, 1));
70
+ Tag("nav").map((element: HTMLElement) => { element.style.display = "block"; element.style.width = element.offsetParent?.scrollWidth.toString() || element.clientWidth.toString(); MoveXInFromLeft.apply(element); });
71
+ Tag("component>article").map((element: HTMLElement) => { element.style.display = "block"; element.style.height = element.offsetParent?.scrollHeight.toString() || element.clientHeight.toString(); MoveYInFromBottom.apply(element); });
72
+ Tag("component>article:nth-child(2)").map((element: HTMLElement) => { element.style.display = "block"; element.style.width = element.offsetParent?.scrollWidth.toString() || element.clientWidth.toString(); MoveXInFromRight.apply(element); });
73
+ }, 300);
74
+ }
75
+
76
+
77
+ }
78
+
79
+ Package("org.qcobjects.tools.layouts", [
80
+ BasicLayout
81
+
82
+ ]);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * QCObjects SDK 2.4
2
+ * QCObjects SDK 2.5
3
3
  * ________________
4
4
  *
5
5
  * Author: Jean Machuca <correojean@gmail.com>
@@ -33,6 +33,7 @@ import { Timer, Package, logger } from "qcobjects";
33
33
  alive:boolean;
34
34
  steps:any[] = [];
35
35
  currentStep = 0;
36
+ duration: any;
36
37
 
37
38
  constructor ({steps = [], currentStep = 0, alive = false}) {
38
39
  super({steps, currentStep, alive});
@@ -50,6 +51,7 @@ import { Timer, Package, logger } from "qcobjects";
50
51
  duration: this.duration,
51
52
  timing: (timeFraction:number) => {
52
53
  this.currentStep+=1;
54
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
53
55
  this.steps.map((p:()=> void):Promise<void> | undefined => {
54
56
  let _ret_;
55
57
  if (typeof p === "function"){
@@ -67,6 +69,10 @@ import { Timer, Package, logger } from "qcobjects";
67
69
  }
68
70
  });
69
71
  }
72
+ // eslint-disable-next-line no-unused-vars
73
+ thread(arg0: { duration: any; timing: (timeFraction: number) => number; intervalInterceptor(progress: number): void; }) {
74
+ throw new Error("Method not implemented.");
75
+ }
70
76
  }
71
77
 
72
78
  ]);
@@ -1,7 +1,5 @@
1
- import { Package, View } 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,15 +22,18 @@ import { Package, View } 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
25
  "use strict";
29
- Package("org.qcobjects.views",[
26
+ import { Package, View } from "qcobjects";
27
+
28
+
29
+ export class GridView extends View {
30
+
30
31
 
31
- class GridView extends View {
32
+ }
32
33
 
33
34
 
34
- }
35
+ Package("org.qcobjects.views", [
35
36
 
37
+ GridView
36
38
  ]);
37
39
 
38
- })();
@@ -0,0 +1,181 @@
1
+ /* eslint-disable @typescript-eslint/no-misused-new */
2
+
3
+ // Type definitions for QCObjects 2.4
4
+ // Project: https://qcobjects.dev
5
+ // Definitions by: Jean Machuca <https://github.com/jeanmachuca>
6
+ // Definitions: https://qcobjects.dev
7
+
8
+ /**
9
+ */
10
+
11
+ import { View } from "qcobjects";
12
+ import { InheritClass } from "qcobjects";
13
+ import { Component, Controller, Effect, VO } from "qcobjects";
14
+
15
+ declare namespace sdk {
16
+ type SessionUser = {
17
+ token: string,
18
+ id: string,
19
+ priority: number
20
+ };
21
+ type SliderControllerParams = {
22
+ component: Component,
23
+ dependencies?: Array<any>,
24
+ duration?: number,
25
+ slideIndex?: number,
26
+ interval?: number | null,
27
+ sliderHandlerName?: string
28
+ };
29
+ type ModalData = {
30
+ content: string,
31
+ modalId: number
32
+ };
33
+ type ListControllerParams = {
34
+ component:Component,
35
+ dependencies?:Array<any>,
36
+ valueField?:string,
37
+ labelField?:string
38
+ };
39
+
40
+ class SlideListComponent extends Component { }
41
+ class SlideItemComponent extends Component { }
42
+ class SliderComponent extends Component { }
43
+ class FormField extends Component {
44
+ createBindingEvents(): void;
45
+ executeBinding(_obj: HTMLElement | Element | ShadowRoot ): void;
46
+ executeBindings(): void;
47
+ }
48
+ class ShadowedComponent extends Component { }
49
+ class ButtonField extends FormField { }
50
+ class InputField extends FormField { }
51
+ class TextField extends FormField { }
52
+ class EmailField extends FormField { }
53
+ class ModalEnclosureComponent extends Component { }
54
+ class ModalComponent extends Component {
55
+ modalEnclosureComponentClass: string;
56
+ closeOnClickOutside: boolean;
57
+ data: ModalData;
58
+ submodal: Component;
59
+ modal(): void;
60
+ close(): void;
61
+
62
+ }
63
+ class SwaggerUIComponent extends Component { }
64
+ class Contact extends VO {
65
+ first_name: string;
66
+ last_name: string;
67
+ address: string;
68
+ postalCode: string;
69
+ city: string;
70
+ country: string;
71
+ email: string;
72
+ phone: string;
73
+ }
74
+ class GridItemComponent extends Component { }
75
+ class GridComponent extends Component { }
76
+ class NotificationComponent extends Component {
77
+ static display(element: Element | ShadowRoot): void;
78
+ static success(message: string): void;
79
+ static danger(message: string): void;
80
+ static info(message: string): void;
81
+ static warning(message: string): void;
82
+ }
83
+ class GenericController extends Controller { }
84
+ class DataGridController extends Controller {
85
+ getPageIndex(page:number | string, totalPage:number | string, totalElements: number | string):number;
86
+ addSubcomponents():void;
87
+ cssGrid():void;
88
+ }
89
+ class GridController extends Controller {
90
+ cssGrid():void;
91
+ }
92
+ class ListController extends Controller {
93
+ constructor(controller:ListControllerParams);
94
+ getPageIndex(page:number | string, totalPage:number | string, totalElements: number | string):number;
95
+ addSubcomponents():void;
96
+ cssGrid():void;
97
+ }
98
+ class SliderController extends Controller {
99
+ constructor(controller: SliderControllerParams);
100
+ stop():void;
101
+ plusSlidesAndStop(n:number):void;
102
+ plusSlides(n:number):void;
103
+ currentSlide(n?:number):void;
104
+ automate():void;
105
+ showSlides(n:number):void;
106
+ fillDots():void;
107
+ }
108
+ class SwaggerUIController extends Controller {
109
+ startSwaggerUI():void;
110
+ }
111
+ class Fade extends Effect { }
112
+ class Move extends Effect { }
113
+ class MoveXInFromRight extends Effect { }
114
+ class MoveXInFromLeft extends Effect { }
115
+ class MoveYInFromBottom extends Effect { }
116
+ class MoveYInFromTop extends Effect { }
117
+ class RotateX extends Effect { }
118
+ class RotateY extends Effect { }
119
+ class RotateZ extends Effect { }
120
+ class Rotate extends Effect { }
121
+ class Radius extends Effect { }
122
+ class Resize extends Effect { }
123
+ class WipeLeft extends Effect { }
124
+ class WipeRight extends Effect { }
125
+ class WipeUp extends Effect { }
126
+ class WipeDown extends Effect { }
127
+ class ModalFade extends Effect { }
128
+ class ModalMoveDown extends Effect { }
129
+ class ModalMoveUp extends Effect { }
130
+ class i18n_messages extends InheritClass {
131
+ messages: Array<any>;
132
+ _load_i18n_packages_(): void;
133
+ }
134
+ class SplashScreenComponent extends Component { }
135
+ class VideoSplashScreenComponent extends SplashScreenComponent { }
136
+ class CubeSplashScreenComponent extends SplashScreenComponent { }
137
+ class ModalController extends Component { }
138
+ class ListItemComponent extends Component { }
139
+ class ListComponent extends Component { }
140
+ class GridView extends View { }
141
+ class BasicLayout extends InheritClass { }
142
+ class SessionUserToken extends InheritClass {
143
+ static generateIndex(...args: Array<any>): string;
144
+ static getGlobalUser(...args: Array<any>): SessionUser;
145
+ static getGlobalUserToken(...args: Array<any>): string;
146
+ static getGlobalUserId(...args: Array<any>): string;
147
+ static getGlobalUserPriority(...args: Array<any>): string;
148
+ static getLoginCredentialsToken(username: string, password: string): string;
149
+ static closeGlobalSession(): void;
150
+
151
+ }
152
+ class SessionData extends InheritClass {
153
+ __session_container__: any;
154
+ setSessionContainer(...args: Array<any>): any;
155
+ getSessionContainer(...args: Array<any>): any;
156
+ getSessionData(...args: Array<any>): any;
157
+ index(...args: Array<any>): string;
158
+ get(name: string, defaultValue?: any): any;
159
+ set(name: string, value: any): void;
160
+
161
+ }
162
+ class FormValidations extends Controller {
163
+ getDefault(): Function;
164
+ }
165
+ class FormController extends Controller {
166
+ serviceClass: string;
167
+ formSettings: {
168
+ backRouting: string,
169
+ loadingRouting: string,
170
+ nextRouting: string
171
+ };
172
+ hasValidation(element: HTMLElement | Element | ShadowRoot ): boolean;
173
+ isInvalid(element: HTMLElement | Element | ShadowRoot ): boolean;
174
+ isValid(element: HTMLElement | Element | ShadowRoot ): boolean;
175
+ save(): void;
176
+ formSaveTouchHandler(): void;
177
+ }
178
+ class CanvasTool extends InheritClass { }
179
+ }
180
+
181
+ export = sdk;
package/transpile.js ADDED
@@ -0,0 +1,65 @@
1
+ const ts = require('typescript');
2
+ const path = require('path');
3
+
4
+ // Get the tsconfig file name from command line arguments
5
+ const configFileName = process.argv[2];
6
+
7
+ if (!configFileName) {
8
+ console.error('Please provide the tsconfig file name as a parameter.');
9
+ process.exit(1);
10
+ }
11
+
12
+ // Resolve the path to the tsconfig file
13
+ const configPath = path.resolve(__dirname, configFileName);
14
+
15
+ // Parse the tsconfig file
16
+ const parsedCommandLine = ts.getParsedCommandLineOfConfigFile(configPath, {}, {
17
+ ...ts.sys,
18
+ onUnRecoverableConfigFileDiagnostic: diagnostic => {
19
+ console.error(ts.formatDiagnostic(diagnostic, {
20
+ getCanonicalFileName: (fileName) => fileName,
21
+ getCurrentDirectory: ts.sys.getCurrentDirectory,
22
+ getNewLine: () => ts.sys.newLine,
23
+ }));
24
+ process.exit(1);
25
+ }
26
+ });
27
+
28
+ if (!parsedCommandLine) {
29
+ console.error('Failed to parse tsconfig file');
30
+ process.exit(1);
31
+ }
32
+
33
+ // Create a program with the parsed settings
34
+ const program = ts.createProgram({
35
+ rootNames: parsedCommandLine.fileNames,
36
+ options: parsedCommandLine.options,
37
+ });
38
+
39
+ // Emit the compiled files
40
+ const emitResult = program.emit();
41
+
42
+ // Report any diagnostics (errors or warnings)
43
+ const allDiagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
44
+
45
+ allDiagnostics.forEach(diagnostic => {
46
+ if (diagnostic.file) {
47
+ const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
48
+ const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
49
+ console.error(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
50
+ } else {
51
+ console.error(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'));
52
+ }
53
+ });
54
+
55
+ // Check if any files were emitted
56
+ const emittedFiles = emitResult.emittedFiles || [];
57
+ if (emittedFiles.length > 0) {
58
+ console.log('Emitted files:');
59
+ emittedFiles.forEach(file => console.log(file));
60
+ }
61
+
62
+ // Exit with an appropriate code
63
+ const exitCode = emitResult.emitSkipped ? 1 : 0;
64
+ console.log(`Process exiting with code '${exitCode}'.`);
65
+ process.exit(exitCode);
package/tsconfig.d.json CHANGED
@@ -1,5 +1,67 @@
1
1
  {
2
- "extends": "qcobjects-tsconfig/tsconfig.d.json",
3
- "include": ["src/**/*.ts"],
4
- "exclude": ["src/**/*.spec.js", "src/*.js"]
2
+ "extends": [
3
+ "./tsconfig.json"
4
+ ],
5
+ "compilerOptions": {
6
+ "strict": true,
7
+ "noImplicitAny": true,
8
+ "strictNullChecks": true,
9
+ "strictFunctionTypes": true,
10
+ "strictPropertyInitialization": true,
11
+ "noImplicitThis": true,
12
+ "alwaysStrict": true,
13
+ "rootDir": "./src",
14
+ "outFile": "public/types/index.d.ts",
15
+ "allowSyntheticDefaultImports": true,
16
+ "esModuleInterop": true,
17
+ "declaration": true,
18
+ "emitDeclarationOnly": true,
19
+ "baseUrl": ".",
20
+ "typeRoots": ["./node_modules/@types"],
21
+ "paths": {
22
+ "types": ["src/types/global"]
23
+ }
24
+ },
25
+ "include": [
26
+ "src/**/*",
27
+ "src/types/**/*"
28
+ ],
29
+ "exclude": [
30
+ "**/*.js",
31
+ "src/index.mts",
32
+ "src/index.cts",
33
+ "node_modules",
34
+ "node_modules/**/*",
35
+ "**/node_modules/*",
36
+ "public/types"
37
+ ],
38
+ "ts-node": {
39
+ // It is faster to skip typechecking.
40
+ // Remove if you want ts-node to do typechecking.
41
+ "transpileOnly": true,
42
+ "files": true,
43
+ "compilerOptions": {
44
+ "rootDir": "./src",
45
+ "baseUrl": ".",
46
+ "paths": {
47
+ "types": ["types/global"]
48
+
49
+ }
50
+
51
+ },
52
+ "include": [
53
+ "src/**/*",
54
+ "src/types/**/*"
55
+ ],
56
+ "exclude": [
57
+ "**/*.js",
58
+ "src/index.mts",
59
+ "src/index.cts",
60
+ "node_modules",
61
+ "node_modules/**/*",
62
+ "**/node_modules/*",
63
+ "public/types"
64
+ ]
65
+
66
+ }
5
67
  }
@@ -0,0 +1,64 @@
1
+ {
2
+ "compilerOptions": {
3
+ "skipLibCheck": true,
4
+ "moduleDetection": "auto",
5
+ "moduleResolution": "nodenext",
6
+ "allowImportingTsExtensions": true,
7
+ "noEmit": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "strict": true,
10
+ "noImplicitAny": true,
11
+ "strictNullChecks": true,
12
+ "strictFunctionTypes": true,
13
+ "strictPropertyInitialization": true,
14
+ "noImplicitThis": true,
15
+ "alwaysStrict": true,
16
+ "target": "ESNext",
17
+ "lib": [
18
+ "ESNext",
19
+ "DOM"
20
+ ],
21
+ "module": "NodeNext",
22
+ "rootDir": "./",
23
+ "allowJs": true,
24
+ "outDir": "build/spec",
25
+ "allowSyntheticDefaultImports": true,
26
+ "esModuleInterop": true,
27
+ "baseUrl": ".",
28
+ "sourceRoot": "./src",
29
+ "inlineSourceMap": true,
30
+ "typeRoots": [
31
+ "./node_modules/@types"
32
+ ],
33
+ "types": [
34
+ "node",
35
+ "jasmine"
36
+ ],
37
+ "paths": {
38
+ "*": [
39
+ "src/*"
40
+ ],
41
+ "types": [
42
+ "src/types/global/index.d.ts"
43
+ ],
44
+ "qcobjects": [
45
+ "src/qcobjects.ts"
46
+ ],
47
+ "qcobjects-sdk": [
48
+ "spec/mocks/qcobjects-sdk.mock.ts"
49
+ ]
50
+ }
51
+ },
52
+ "include": [
53
+ "spec/**/*",
54
+ "src/**/*",
55
+ "src/*"
56
+ ],
57
+ "exclude": [
58
+ "src/**/*.mts",
59
+ "src/**/*.cts",
60
+ "node_modules",
61
+ "node_modules/**/*",
62
+ "public/types/**/*"
63
+ ]
64
+ }
package/tsconfig.json CHANGED
@@ -1,10 +1,74 @@
1
1
  {
2
- "extends": "qcobjects-tsconfig/tsconfig.json",
3
2
  "compilerOptions": {
4
- "rootDir": "src", /* Specify the root folder within your source files. */
5
- "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
6
- "outDir": "build", /* Specify an output folder for all emitted files. */
3
+ "skipLibCheck": true,
4
+ "forceConsistentCasingInFileNames": true,
5
+ "strict": true,
6
+ "noImplicitAny": true,
7
+ "strictNullChecks": true,
8
+ "strictFunctionTypes": true,
9
+ "strictPropertyInitialization": true,
10
+ "noImplicitThis": true,
11
+ "alwaysStrict": true,
12
+ "target": "ESNext",
13
+ "lib": [
14
+ "ESNext",
15
+ "DOM"
16
+ ],
17
+ "module": "NodeNext",
18
+ "rootDir": "./src",
19
+ "allowJs": true,
20
+ "outDir": "build",
21
+ "allowSyntheticDefaultImports": true,
22
+ "esModuleInterop": true,
23
+ "baseUrl": ".",
24
+ "typeRoots": [
25
+ "./node_modules/@types"
26
+ ],
27
+ "paths": {
28
+ "types": [
29
+ "src/types/global"
30
+ ]
31
+ }
7
32
  },
8
- "include": ["src/**/*.ts", "src/**/*.mts", "src/**/*.cts"],
9
- "exclude": ["src/**/*.spec.js", "src/*.js"]
10
- }
33
+ "include": [
34
+ "src/**/*",
35
+ "src/types/**/*"
36
+ ],
37
+ "exclude": [
38
+ "**/*.js",
39
+ "src/index.mts",
40
+ "src/index.cts",
41
+ "node_modules",
42
+ "node_modules/**/*",
43
+ "**/node_modules/*",
44
+ "public/types"
45
+ ],
46
+ "ts-node": {
47
+ // It is faster to skip typechecking.
48
+ // Remove if you want ts-node to do typechecking.
49
+ "transpileOnly": true,
50
+ "files": true,
51
+ "compilerOptions": {
52
+ "rootDir": "./src",
53
+ "baseUrl": ".",
54
+ "paths": {
55
+ "types": [
56
+ "types/global"
57
+ ]
58
+ }
59
+ },
60
+ "include": [
61
+ "src/**/*",
62
+ "src/types/**/*"
63
+ ],
64
+ "exclude": [
65
+ "**/*.js",
66
+ "src/index.mts",
67
+ "src/index.cts",
68
+ "node_modules",
69
+ "node_modules/**/*",
70
+ "**/node_modules/*",
71
+ "public/types"
72
+ ]
73
+ }
74
+ }
package/.eslintignore DELETED
@@ -1,4 +0,0 @@
1
- build
2
- dist
3
- public
4
- src/**/*.d.ts
package/.eslintrc.cjs DELETED
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: [
3
- "qcobjects",
4
- "qcobjects-typescript"
5
- ]
6
- };