qcobjects-sdk 2.4.59 → 2.4.61

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 (77) hide show
  1. package/.dockerignore +98 -1
  2. package/.eslintignore +1 -2
  3. package/.github/workflows/static.yml +91 -0
  4. package/VERSION +1 -1
  5. package/config.json +4 -0
  6. package/package.json +31 -9
  7. package/src/QCObjects-SDK.d.ts +26 -0
  8. package/src/QCObjects-SDK.ts +110 -0
  9. package/src/index.d.ts +1 -1
  10. package/src/index.mts +2 -0
  11. package/src/js/org.qcobjects.cloud.auth.session.data.d.ts +1 -0
  12. package/src/js/{org.qcobjects.cloud.auth.session.data.js → org.qcobjects.cloud.auth.session.data.ts} +28 -22
  13. package/src/js/org.qcobjects.cloud.auth.session.usertoken.d.ts +2 -0
  14. package/src/js/org.qcobjects.cloud.auth.session.usertoken.ts +128 -0
  15. package/src/js/org.qcobjects.components.d.ts +10 -0
  16. package/src/js/org.qcobjects.components.grid.d.ts +3 -0
  17. package/src/js/org.qcobjects.components.grid.ts +95 -0
  18. package/src/js/org.qcobjects.components.list.d.ts +3 -0
  19. package/src/js/org.qcobjects.components.list.ts +83 -0
  20. package/src/js/org.qcobjects.components.notifications.d.ts +1 -0
  21. package/src/js/org.qcobjects.components.notifications.ts +191 -0
  22. package/src/js/org.qcobjects.components.slider.d.ts +1 -0
  23. package/src/js/{org.qcobjects.components.slider.js → org.qcobjects.components.slider.ts} +8 -6
  24. package/src/js/org.qcobjects.components.splashscreen.d.ts +28 -0
  25. package/src/js/org.qcobjects.components.splashscreen.ts +680 -0
  26. package/src/js/org.qcobjects.components.ts +336 -0
  27. package/src/js/org.qcobjects.controllers.d.ts +1 -0
  28. package/src/js/org.qcobjects.controllers.form.d.ts +1 -0
  29. package/src/js/{org.qcobjects.controllers.form.js → org.qcobjects.controllers.form.ts} +57 -59
  30. package/src/js/org.qcobjects.controllers.grid.d.ts +1 -0
  31. package/src/js/{org.qcobjects.controllers.grid.js → org.qcobjects.controllers.grid.ts} +103 -98
  32. package/src/js/org.qcobjects.controllers.list.d.ts +1 -0
  33. package/src/js/{org.qcobjects.controllers.list.js → org.qcobjects.controllers.list.ts} +86 -76
  34. package/src/js/org.qcobjects.controllers.slider.d.ts +1 -0
  35. package/src/js/org.qcobjects.controllers.slider.ts +158 -0
  36. package/src/js/org.qcobjects.controllers.swagger.d.ts +1 -0
  37. package/src/js/{org.qcobjects.controllers.swagger.js → org.qcobjects.controllers.swagger.ts} +13 -14
  38. package/src/js/{org.qcobjects.controllers.js → org.qcobjects.controllers.ts} +3 -6
  39. package/src/js/org.qcobjects.effects.d.ts +20 -0
  40. package/src/js/org.qcobjects.effects.ts +430 -0
  41. package/src/js/org.qcobjects.i18n_messages.d.ts +1 -0
  42. package/src/js/{org.qcobjects.i18n_messages.js → org.qcobjects.i18n_messages.ts} +36 -27
  43. package/src/js/org.qcobjects.modal.controllers.d.ts +1 -0
  44. package/src/js/{org.qcobjects.modal.controllers.js → org.qcobjects.modal.controllers.ts} +5 -6
  45. package/src/js/org.qcobjects.modal.effects.d.ts +1 -0
  46. package/src/js/{org.qcobjects.modal.effects.js → org.qcobjects.modal.effects.ts} +4 -1
  47. package/src/js/org.qcobjects.models.d.ts +1 -0
  48. package/src/js/{org.qcobjects.models.js → org.qcobjects.models.ts} +3 -24
  49. package/src/js/org.qcobjects.tools.canvas.d.ts +1 -0
  50. package/src/js/{org.qcobjects.tools.canvas.js → org.qcobjects.tools.canvas.ts} +14 -11
  51. package/src/js/org.qcobjects.tools.d.ts +1 -0
  52. package/src/js/org.qcobjects.tools.layouts.d.ts +1 -0
  53. package/src/js/org.qcobjects.tools.layouts.ts +85 -0
  54. package/src/js/{org.qcobjects.tools.js → org.qcobjects.tools.ts} +19 -11
  55. package/src/js/org.qcobjects.views.d.ts +1 -0
  56. package/src/js/{org.qcobjects.views.js → org.qcobjects.views.ts} +3 -5
  57. package/tsconfig.json +1 -1
  58. package/-m +0 -1
  59. package/src/QCObjects-SDK.js +0 -148
  60. package/src/index.mjs +0 -2
  61. package/src/js/org.qcobjects.cloud.auth.session.usertoken.js +0 -116
  62. package/src/js/org.qcobjects.components.grid.js +0 -65
  63. package/src/js/org.qcobjects.components.js +0 -276
  64. package/src/js/org.qcobjects.components.list.js +0 -59
  65. package/src/js/org.qcobjects.components.notifications.js +0 -190
  66. package/src/js/org.qcobjects.components.splashscreen.js +0 -645
  67. package/src/js/org.qcobjects.controllers.slider.js +0 -154
  68. package/src/js/org.qcobjects.effects.js +0 -345
  69. package/src/js/org.qcobjects.tools.layouts.js +0 -79
  70. /package/{css → src/css}/base-modal.css +0 -0
  71. /package/{css → src/css}/basic-layout-embedded-nav.css +0 -0
  72. /package/{css → src/css}/basic-layout.css +0 -0
  73. /package/{css → src/css}/components/horizontal-list.css +0 -0
  74. /package/{css → src/css}/components/list.css +0 -0
  75. /package/{css → src/css}/components/splashscreen.css +0 -0
  76. /package/{css → src/css}/modal.css +0 -0
  77. /package/src/{index.cjs → index.cts} +0 -0
@@ -0,0 +1,95 @@
1
+ import { Package, Component, ComponentParams } from "qcobjects";
2
+
3
+ /**
4
+ * QCObjects SDK 2.4
5
+ * ________________
6
+ *
7
+ * Author: Jean Machuca <correojean@gmail.com>
8
+ *
9
+ * Cross Browser Javascript Framework for MVC Patterns
10
+ * QuickCorp/QCObjects is licensed under the
11
+ * GNU Lesser General Public License v3.0
12
+ * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
13
+ *
14
+ * Permissions of this copyleft license are conditioned on making available
15
+ * complete source code of licensed works and modifications under the same
16
+ * license or the GNU GPLv3. Copyright and license notices must be preserved.
17
+ * Contributors provide an express grant of patent rights. However, a larger
18
+ * work using the licensed work through interfaces provided by the licensed
19
+ * work may be distributed under different terms and without source code for
20
+ * the larger work.
21
+ *
22
+ * Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
23
+ *
24
+ * Everyone is permitted to copy and distribute verbatim copies of this
25
+ * license document, but changing it is not allowed.
26
+ */
27
+ const _top = (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
+ (function (global:any) {
41
+ "use strict";
42
+
43
+ class GridItemComponent extends Component {
44
+ name = "grid-item";
45
+ shadowed= true;
46
+ tplsource= "inline";
47
+ template= `
48
+ <img src="{{image}}" />
49
+ <p>{{description}}</p>
50
+ `;
51
+
52
+ cached= false;
53
+
54
+ }
55
+
56
+ class GridComponent extends Component {
57
+ name= "grid";
58
+ cached= false;
59
+ view= null;
60
+ shadowed= true;
61
+ rows= 3;
62
+ cols= 3;
63
+ templateURI= "";
64
+ data= {};
65
+ tplsource= "inline";
66
+ template= "<p>Loading...</p>";
67
+
68
+ constructor (o:ComponentParams){
69
+ super(o);
70
+ this.body.setAttribute("controllerClass", "DataGridController");
71
+ const subcomponentClass = (this.body.getAttribute("subcomponentClass") !== null) ? (this.body.getAttribute("subcomponentClass")) : ("GridItemComponent");
72
+ this.body.setAttribute("subcomponentClass", subcomponentClass as string);
73
+
74
+ }
75
+
76
+
77
+ }
78
+
79
+ Package("org.qcobjects.components.grid", [
80
+ GridComponent,
81
+ GridItemComponent
82
+ ]);
83
+
84
+ global.GridComponent = GridComponent;
85
+ global.GridItemComponent = GridItemComponent;
86
+
87
+ })(_top);
88
+
89
+ const GridComponent = (_top as any).GridComponent;
90
+ const GridItemComponent = (_top as any).GridItemComponent;
91
+
92
+ export {
93
+ GridComponent,
94
+ GridItemComponent
95
+ };
@@ -0,0 +1,3 @@
1
+ declare const ListComponent: any;
2
+ declare const ListItemComponent: any;
3
+ export { ListComponent, ListItemComponent };
@@ -0,0 +1,83 @@
1
+ import { Component, ComponentParams, Package } from "qcobjects";
2
+
3
+ /**
4
+ * QCObjects SDK 2.4
5
+ * ________________
6
+ *
7
+ * Author: Jean Machuca <correojean@gmail.com>
8
+ *
9
+ * Cross Browser Javascript Framework for MVC Patterns
10
+ * QuickCorp/QCObjects is licensed under the
11
+ * GNU Lesser General Public License v3.0
12
+ * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
13
+ *
14
+ * Permissions of this copyleft license are conditioned on making available
15
+ * complete source code of licensed works and modifications under the same
16
+ * license or the GNU GPLv3. Copyright and license notices must be preserved.
17
+ * Contributors provide an express grant of patent rights. However, a larger
18
+ * work using the licensed work through interfaces provided by the licensed
19
+ * work may be distributed under different terms and without source code for
20
+ * the larger work.
21
+ *
22
+ * Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
23
+ *
24
+ * Everyone is permitted to copy and distribute verbatim copies of this
25
+ * license document, but changing it is not allowed.
26
+ */
27
+ const _top = (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
+ (function(global:any) {
41
+ "use strict";
42
+ class ListItemComponent extends Component {
43
+ shadowed= false;
44
+ tplsource= "inline";
45
+ template="<a href=\"{{value}}\">{{label}}</a>";
46
+ cached= false;
47
+
48
+ constructor (o:ComponentParams){
49
+ o.name="list-item";
50
+ super(o);
51
+ }
52
+
53
+ }
54
+
55
+ class ListComponent extends Component {
56
+ shadowed= true;
57
+ tplsource= "inline";
58
+ template= "<p>Loading...</p>";
59
+
60
+ constructor (o:ComponentParams){
61
+ o.name = "list";
62
+ super(o);
63
+ this.body.setAttribute("controllerClass","ListController");
64
+ this.body.setAttribute("subcomponentClass","ListItemComponent");
65
+
66
+ }
67
+
68
+ }
69
+
70
+ Package("org.qcobjects.components.list",[
71
+ ListItemComponent,
72
+ ListComponent
73
+ ]);
74
+
75
+ global.ListComponent = ListComponent;
76
+ global.ListItemComponent = ListItemComponent;
77
+
78
+ })(_top);
79
+
80
+ const ListComponent = (_top as any).ListComponent;
81
+ const ListItemComponent = (_top as any).ListItemComponent;
82
+
83
+ export {ListComponent, ListItemComponent};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,191 @@
1
+ import { Package, Component, _DOMCreateElement, New, _super_, ComponentParams, QCObjectsElement } from "qcobjects";
2
+ import { Fade, Move } from "./org.qcobjects.effects";
3
+
4
+ /**
5
+ * QCObjects SDK 2.4
6
+ * ________________
7
+ *
8
+ * Author: Jean Machuca <correojean@gmail.com>
9
+ *
10
+ * Cross Browser Javascript Framework for MVC Patterns
11
+ * QuickCorp/QCObjects is licensed under the
12
+ * GNU Lesser General Public License v3.0
13
+ * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
14
+ *
15
+ * Permissions of this copyleft license are conditioned on making available
16
+ * complete source code of licensed works and modifications under the same
17
+ * license or the GNU GPLv3. Copyright and license notices must be preserved.
18
+ * Contributors provide an express grant of patent rights. However, a larger
19
+ * work using the licensed work through interfaces provided by the licensed
20
+ * work may be distributed under different terms and without source code for
21
+ * the larger work.
22
+ *
23
+ * Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
24
+ *
25
+ * Everyone is permitted to copy and distribute verbatim copies of this
26
+ * license document, but changing it is not allowed.
27
+ */
28
+ (function() {
29
+ "use strict";
30
+ class NotificationComponent extends Component {
31
+ cached= false;
32
+ tplsource= "inline";
33
+ shadowed= false;
34
+ kinds:string[];
35
+
36
+ constructor (o:ComponentParams){
37
+ o.name= "notification";
38
+ o.body = _DOMCreateElement("div") as QCObjectsElement;
39
+ super(o);
40
+
41
+ this.template= `
42
+ <style>
43
+ div.notification_background {
44
+ display: block; /* Hidden by default */
45
+ position: fixed; /* Stay in place */
46
+ z-index: 1; /* Sit on top */
47
+ padding-top: 100px; /* Location of the box */
48
+ left: 0;
49
+ top: 0;
50
+ bottom:0;
51
+ right:0;
52
+ width: 100%; /* Full width */
53
+ height: 100%; /* Full height */
54
+ overflow: auto; /* Enable scroll if needed */
55
+ background-color: rgb(0,0,0); /* Fallback color */
56
+ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
57
+ border: none !important;
58
+ }
59
+ div.notification {
60
+ border-radius: 12px !important;
61
+ margin-bottom: 15px;
62
+ padding: 4px 12px;
63
+ }
64
+ .notification.danger {
65
+ background-color: #ffdddd;
66
+ border-left: 6px solid #f44336;
67
+ }
68
+ .notification.success {
69
+ background-color: #ddffdd;
70
+ border-left: 6px solid #4CAF50;
71
+ }
72
+ .notification.info {
73
+ background-color: #e7f3fe;
74
+ border-left: 6px solid #2196F3;
75
+ }
76
+ .notification.warning {
77
+ background-color: #ffffcc;
78
+ border-left: 6px solid #ffeb3b;
79
+ }
80
+ </style>
81
+ <div class="notification_background">
82
+ <div class="notification {{kind}}">
83
+ <p><strong>{{title}}</strong> {{message}}</p>
84
+ </div>
85
+ </div>
86
+ `;
87
+ this.kinds=["danger", "success", "info", "warning"];
88
+
89
+ }
90
+
91
+ display(element:HTMLElement) {
92
+ const _display_ = function (element:HTMLElement){
93
+ element.style.display="block";
94
+ const appearEffect = New(Move,{
95
+ duration:900,
96
+ apply (element:HTMLElement){
97
+ _super_("Fade","apply").call(this,element,0,1);
98
+ _super_("Move","apply").call(this,element,0,-document.body.clientHeight,0,0);
99
+ }
100
+ });
101
+ const disappearEffect = New(Move,{
102
+ duration:650,
103
+ apply (element:HTMLElement){
104
+ _super_("Fade","apply").call(this,element,1,0);
105
+ _super_("Move","apply").call(this,element,0,0,0,-document.body.clientHeight);
106
+ }
107
+ });
108
+ appearEffect.apply(element);
109
+ setTimeout(function (){
110
+ disappearEffect.apply(element);
111
+ },2000);
112
+ };
113
+ (element as QCObjectsElement).subelements("div.notification_background").map(element=>New(Fade,{duration:500}).apply(element,0,1));
114
+ (element as QCObjectsElement).subelements("div.notification").map(element=>_display_(element));
115
+ setTimeout(function (){
116
+ element.remove();
117
+ },2200);
118
+ }
119
+
120
+ static success(message:string) {
121
+ const c = New(NotificationComponent, {
122
+ name: "notification",
123
+ shadowed: true,
124
+ body: _DOMCreateElement("div"),
125
+ data: {
126
+ kind: "success",
127
+ title: "Success!",
128
+ message: `${message}...`
129
+ }
130
+ });
131
+ document.body.append(c);
132
+ const _componentRoot = (c.shadowed)?(c.shadowRoot.host):(c.body);
133
+ c.display(_componentRoot);
134
+ }
135
+
136
+ static danger(message:string) {
137
+ const c = New(NotificationComponent, {
138
+ name: "notification",
139
+ shadowed: true,
140
+ body: _DOMCreateElement("div"),
141
+ data: {
142
+ kind: "danger",
143
+ title: "Danger!",
144
+ message: `${message}...`
145
+ }
146
+ });
147
+ document.body.append(c);
148
+ const _componentRoot = (c.shadowed)?(c.shadowRoot.host):(c.body);
149
+ c.display(_componentRoot);
150
+ }
151
+
152
+ static info(message:string) {
153
+ const c = New(NotificationComponent, {
154
+ name: "notification",
155
+ shadowed: true,
156
+ body: _DOMCreateElement("div"),
157
+ data: {
158
+ kind: "info",
159
+ title: "Info!",
160
+ message: `${message}...`
161
+ }
162
+ });
163
+ document.body.append(c);
164
+ const _componentRoot = (c.shadowed)?(c.shadowRoot.host):(c.body);
165
+ c.display(_componentRoot);
166
+ }
167
+
168
+ static warning(message:string) {
169
+ const c = New(NotificationComponent, {
170
+ name: "notification",
171
+ shadowed: true,
172
+ body: _DOMCreateElement("div"),
173
+ data: {
174
+ kind: "warning",
175
+ title: "Warning!",
176
+ message: `${message}...`
177
+ }
178
+ });
179
+ document.body.append(c);
180
+ const _componentRoot = (c.shadowed)?(c.shadowRoot.host):(c.body);
181
+ c.display(_componentRoot);
182
+ }
183
+
184
+
185
+ }
186
+
187
+ Package("org.quickcorp.components.notifications", [
188
+ NotificationComponent
189
+ ]);
190
+
191
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,5 @@
1
+ import { Package, Component, ComponentParams } from "qcobjects";
2
+
1
3
  /**
2
4
  * QCObjects SDK 2.4
3
5
  * ________________
@@ -31,11 +33,11 @@ Package("org.qcobjects.components.slider",[
31
33
  template="<p>Loading...</p>";
32
34
  name = "slidelist";
33
35
 
34
- constructor (o){
36
+ constructor (o:ComponentParams){
35
37
  super(o);
36
38
  this.body.setAttribute("controllerClass","DataGridController");
37
- var subcomponentClass = (this.body.getAttribute("subcomponentClass") !== null)?(this.body.getAttribute("subcomponentClass")):("GridItemComponent");
38
- this.body.setAttribute("subcomponentClass",subcomponentClass);
39
+ const subcomponentClass = (this.body.getAttribute("subcomponentClass") !== null)?(this.body.getAttribute("subcomponentClass")):("GridItemComponent");
40
+ this.body.setAttribute("subcomponentClass",subcomponentClass as string);
39
41
  }
40
42
 
41
43
  },
@@ -44,7 +46,7 @@ Package("org.qcobjects.components.slider",[
44
46
  effectClass = "Fade";
45
47
  name = "slider_item";
46
48
 
47
- constructor (o) {
49
+ constructor (o:ComponentParams) {
48
50
  super(o);
49
51
  this.data.slideNumber = this.data.__dataIndex+1;
50
52
  this.template= `
@@ -65,7 +67,7 @@ Package("org.qcobjects.components.slider",[
65
67
  class SliderComponent extends Component {
66
68
  name = "slider";
67
69
 
68
- constructor (o) {
70
+ constructor (o:ComponentParams) {
69
71
  super(o);
70
72
  this.template= `
71
73
  <style>
@@ -200,4 +202,4 @@ Package("org.qcobjects.components.slider",[
200
202
 
201
203
  ]);
202
204
 
203
- }).call(null);
205
+ })();
@@ -0,0 +1,28 @@
1
+ /**
2
+ * QCObjects SDK 2.4.0
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
+ declare const SplashScreenComponent: any;
26
+ declare const VideoSplashScreenComponent: any;
27
+ declare const CubeSplashScreenComponent: any;
28
+ export { SplashScreenComponent, VideoSplashScreenComponent, CubeSplashScreenComponent };