qcobjects-sdk 2.4.62 → 2.4.66

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 (68) hide show
  1. package/.github/workflows/npmpublish-main.yml +5 -3
  2. package/.gitmodules +4 -0
  3. package/README.md +1 -0
  4. package/VERSION +1 -1
  5. package/build/QCObjects-SDK.js +97 -0
  6. package/build/css/base-modal.css +43 -0
  7. package/build/css/basic-layout-embedded-nav.css +14 -0
  8. package/build/css/basic-layout.css +76 -0
  9. package/build/css/components/horizontal-list.css +64 -0
  10. package/build/css/components/list.css +57 -0
  11. package/build/css/components/splashscreen.css +111 -0
  12. package/build/css/modal.css +46 -0
  13. package/build/index.cjs +4 -0
  14. package/build/index.js +27 -0
  15. package/build/index.mjs +2 -0
  16. package/build/js/org.qcobjects.cloud.auth.session.data.js +125 -0
  17. package/build/js/org.qcobjects.cloud.auth.session.usertoken.js +109 -0
  18. package/build/js/org.qcobjects.components.grid.js +81 -0
  19. package/build/js/org.qcobjects.components.js +292 -0
  20. package/build/js/org.qcobjects.components.list.js +71 -0
  21. package/build/js/org.qcobjects.components.notifications.js +179 -0
  22. package/build/js/org.qcobjects.components.slider.js +193 -0
  23. package/build/js/org.qcobjects.components.splashscreen.js +642 -0
  24. package/build/js/org.qcobjects.controllers.form.js +178 -0
  25. package/build/js/org.qcobjects.controllers.grid.js +258 -0
  26. package/build/js/org.qcobjects.controllers.js +34 -0
  27. package/build/js/org.qcobjects.controllers.list.js +228 -0
  28. package/build/js/org.qcobjects.controllers.slider.js +131 -0
  29. package/build/js/org.qcobjects.controllers.swagger.js +50 -0
  30. package/build/js/org.qcobjects.effects.js +417 -0
  31. package/build/js/org.qcobjects.i18n_messages.js +72 -0
  32. package/build/js/org.qcobjects.modal.controllers.js +38 -0
  33. package/build/js/org.qcobjects.modal.effects.js +51 -0
  34. package/build/js/org.qcobjects.models.js +34 -0
  35. package/build/js/org.qcobjects.tools.canvas.js +53 -0
  36. package/build/js/org.qcobjects.tools.js +64 -0
  37. package/build/js/org.qcobjects.tools.layouts.js +73 -0
  38. package/build/js/org.qcobjects.views.js +34 -0
  39. package/build/templates/components/modalyoulose.tpl.html +3 -0
  40. package/build/templates/components/modalyouwin.tpl.html +4 -0
  41. package/build/templates/components/splashscreen.tpl.html +128 -0
  42. package/build/templates/components/swagger-ui.tpl.html +22 -0
  43. package/docs/CNAME +1 -0
  44. package/package.json +7 -4
  45. package/public/QCObjects-SDK.js +696 -0
  46. package/public/QCObjects-SDK.js.map +7 -0
  47. package/public/css/base-modal.css +2 -0
  48. package/public/css/base-modal.css.map +7 -0
  49. package/public/css/basic-layout-embedded-nav.css +2 -0
  50. package/public/css/basic-layout-embedded-nav.css.map +7 -0
  51. package/public/css/basic-layout.css +2 -0
  52. package/public/css/basic-layout.css.map +7 -0
  53. package/public/css/components/horizontal-list.css +2 -0
  54. package/public/css/components/horizontal-list.css.map +7 -0
  55. package/public/css/components/list.css +2 -0
  56. package/public/css/components/list.css.map +7 -0
  57. package/public/css/components/splashscreen.css +2 -0
  58. package/public/css/components/splashscreen.css.map +7 -0
  59. package/public/css/modal.css +2 -0
  60. package/public/css/modal.css.map +7 -0
  61. package/public/index.cjs +4 -0
  62. package/public/index.js +27 -0
  63. package/public/index.mjs +2 -0
  64. package/public/templates/components/modalyoulose.tpl.html +3 -0
  65. package/public/templates/components/modalyouwin.tpl.html +4 -0
  66. package/public/templates/components/splashscreen.tpl.html +128 -0
  67. package/public/templates/components/swagger-ui.tpl.html +22 -0
  68. package/src/js/org.qcobjects.cloud.auth.session.usertoken.ts +11 -11
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const qcobjects_1 = require("qcobjects");
4
+ const org_qcobjects_effects_1 = require("./org.qcobjects.effects");
5
+ /**
6
+ * QCObjects SDK 2.4
7
+ * ________________
8
+ *
9
+ * Author: Jean Machuca <correojean@gmail.com>
10
+ *
11
+ * Cross Browser Javascript Framework for MVC Patterns
12
+ * QuickCorp/QCObjects is licensed under the
13
+ * GNU Lesser General Public License v3.0
14
+ * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
15
+ *
16
+ * Permissions of this copyleft license are conditioned on making available
17
+ * complete source code of licensed works and modifications under the same
18
+ * license or the GNU GPLv3. Copyright and license notices must be preserved.
19
+ * Contributors provide an express grant of patent rights. However, a larger
20
+ * work using the licensed work through interfaces provided by the licensed
21
+ * work may be distributed under different terms and without source code for
22
+ * the larger work.
23
+ *
24
+ * Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
25
+ *
26
+ * Everyone is permitted to copy and distribute verbatim copies of this
27
+ * license document, but changing it is not allowed.
28
+ */
29
+ (function () {
30
+ "use strict";
31
+ class NotificationComponent extends qcobjects_1.Component {
32
+ constructor(o) {
33
+ o.name = "notification";
34
+ o.body = (0, qcobjects_1._DOMCreateElement)("div");
35
+ super(o);
36
+ this.cached = false;
37
+ this.tplsource = "inline";
38
+ this.shadowed = false;
39
+ this.template = `
40
+ <style>
41
+ div.notification_background {
42
+ display: block; /* Hidden by default */
43
+ position: fixed; /* Stay in place */
44
+ z-index: 1; /* Sit on top */
45
+ padding-top: 100px; /* Location of the box */
46
+ left: 0;
47
+ top: 0;
48
+ bottom:0;
49
+ right:0;
50
+ width: 100%; /* Full width */
51
+ height: 100%; /* Full height */
52
+ overflow: auto; /* Enable scroll if needed */
53
+ background-color: rgb(0,0,0); /* Fallback color */
54
+ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
55
+ border: none !important;
56
+ }
57
+ div.notification {
58
+ border-radius: 12px !important;
59
+ margin-bottom: 15px;
60
+ padding: 4px 12px;
61
+ }
62
+ .notification.danger {
63
+ background-color: #ffdddd;
64
+ border-left: 6px solid #f44336;
65
+ }
66
+ .notification.success {
67
+ background-color: #ddffdd;
68
+ border-left: 6px solid #4CAF50;
69
+ }
70
+ .notification.info {
71
+ background-color: #e7f3fe;
72
+ border-left: 6px solid #2196F3;
73
+ }
74
+ .notification.warning {
75
+ background-color: #ffffcc;
76
+ border-left: 6px solid #ffeb3b;
77
+ }
78
+ </style>
79
+ <div class="notification_background">
80
+ <div class="notification {{kind}}">
81
+ <p><strong>{{title}}</strong> {{message}}</p>
82
+ </div>
83
+ </div>
84
+ `;
85
+ this.kinds = ["danger", "success", "info", "warning"];
86
+ }
87
+ display(element) {
88
+ const _display_ = function (element) {
89
+ element.style.display = "block";
90
+ const appearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {
91
+ duration: 900,
92
+ apply(element) {
93
+ (0, qcobjects_1._super_)("Fade", "apply").call(this, element, 0, 1);
94
+ (0, qcobjects_1._super_)("Move", "apply").call(this, element, 0, -document.body.clientHeight, 0, 0);
95
+ }
96
+ });
97
+ const disappearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {
98
+ duration: 650,
99
+ apply(element) {
100
+ (0, qcobjects_1._super_)("Fade", "apply").call(this, element, 1, 0);
101
+ (0, qcobjects_1._super_)("Move", "apply").call(this, element, 0, 0, 0, -document.body.clientHeight);
102
+ }
103
+ });
104
+ appearEffect.apply(element);
105
+ setTimeout(function () {
106
+ disappearEffect.apply(element);
107
+ }, 2000);
108
+ };
109
+ element.subelements("div.notification_background").map(element => (0, qcobjects_1.New)(org_qcobjects_effects_1.Fade, { duration: 500 }).apply(element, 0, 1));
110
+ element.subelements("div.notification").map(element => _display_(element));
111
+ setTimeout(function () {
112
+ element.remove();
113
+ }, 2200);
114
+ }
115
+ static success(message) {
116
+ const c = (0, qcobjects_1.New)(NotificationComponent, {
117
+ name: "notification",
118
+ shadowed: true,
119
+ body: (0, qcobjects_1._DOMCreateElement)("div"),
120
+ data: {
121
+ kind: "success",
122
+ title: "Success!",
123
+ message: `${message}...`
124
+ }
125
+ });
126
+ document.body.append(c);
127
+ const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
128
+ c.display(_componentRoot);
129
+ }
130
+ static danger(message) {
131
+ const c = (0, qcobjects_1.New)(NotificationComponent, {
132
+ name: "notification",
133
+ shadowed: true,
134
+ body: (0, qcobjects_1._DOMCreateElement)("div"),
135
+ data: {
136
+ kind: "danger",
137
+ title: "Danger!",
138
+ message: `${message}...`
139
+ }
140
+ });
141
+ document.body.append(c);
142
+ const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
143
+ c.display(_componentRoot);
144
+ }
145
+ static info(message) {
146
+ const c = (0, qcobjects_1.New)(NotificationComponent, {
147
+ name: "notification",
148
+ shadowed: true,
149
+ body: (0, qcobjects_1._DOMCreateElement)("div"),
150
+ data: {
151
+ kind: "info",
152
+ title: "Info!",
153
+ message: `${message}...`
154
+ }
155
+ });
156
+ document.body.append(c);
157
+ const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
158
+ c.display(_componentRoot);
159
+ }
160
+ static warning(message) {
161
+ const c = (0, qcobjects_1.New)(NotificationComponent, {
162
+ name: "notification",
163
+ shadowed: true,
164
+ body: (0, qcobjects_1._DOMCreateElement)("div"),
165
+ data: {
166
+ kind: "warning",
167
+ title: "Warning!",
168
+ message: `${message}...`
169
+ }
170
+ });
171
+ document.body.append(c);
172
+ const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
173
+ c.display(_componentRoot);
174
+ }
175
+ }
176
+ (0, qcobjects_1.Package)("org.quickcorp.components.notifications", [
177
+ NotificationComponent
178
+ ]);
179
+ })();
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const qcobjects_1 = require("qcobjects");
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
+ (0, qcobjects_1.Package)("org.qcobjects.components.slider", [
31
+ class SlideListComponent extends qcobjects_1.Component {
32
+ constructor(o) {
33
+ super(o);
34
+ this.tplsource = "inline";
35
+ this.template = "<p>Loading...</p>";
36
+ this.name = "slidelist";
37
+ this.body.setAttribute("controllerClass", "DataGridController");
38
+ const subcomponentClass = (this.body.getAttribute("subcomponentClass") !== null) ? (this.body.getAttribute("subcomponentClass")) : ("GridItemComponent");
39
+ this.body.setAttribute("subcomponentClass", subcomponentClass);
40
+ }
41
+ },
42
+ class SlideItemComponent extends qcobjects_1.Component {
43
+ constructor(o) {
44
+ super(o);
45
+ this.effectClass = "Fade";
46
+ this.name = "slider_item";
47
+ this.data.slideNumber = this.data.__dataIndex + 1;
48
+ this.template = `
49
+ <div class="qcoSlides" style="display:none">
50
+ <div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
51
+ <img src="{{image}}" alt="{{title}}"/>
52
+ <div class="qco-slider__text">
53
+ <p>{{label}} <a href="{{link}}">{{category}}</a></p>
54
+ </div>
55
+ </div>
56
+ `;
57
+ this.tplsource = "inline";
58
+ }
59
+ },
60
+ class SliderComponent extends qcobjects_1.Component {
61
+ constructor(o) {
62
+ super(o);
63
+ this.name = "slider";
64
+ this.template = `
65
+ <style>
66
+ /* Slideshow container */
67
+
68
+ :host a:hover,
69
+ :host a:active,
70
+ :host a:visited {
71
+ color: #ffffff;
72
+ }
73
+
74
+ {
75
+ color: #ffffff;
76
+ }
77
+
78
+ :host .prev {left:0;}
79
+ .qco-slider__container {
80
+ max-width: 100%;
81
+ position: relative;
82
+ margin: auto;
83
+ height: 300px;
84
+ }
85
+ :host .qco-slider__container .qcoSlides img {
86
+ object-fit: cover;
87
+ width: 100%;
88
+ height: 300px;
89
+ }
90
+
91
+ /* Next & previous buttons */
92
+ :host .prev,
93
+ :host .next {
94
+ cursor: pointer;
95
+ position: absolute;
96
+ top: 50%;
97
+ width: auto;
98
+ margin-top: -22px;
99
+ padding: 16px;
100
+ color: white;
101
+ font-weight: bold;
102
+ font-size: 18px;
103
+ transition: 0.6s ease;
104
+ border-radius: 0 3px 3px 0;
105
+ background-color: rgba(1, 1, 1, 0.1);
106
+ }
107
+
108
+ /* Position the "next button" to the right */
109
+ :host .next {
110
+ right: 0;
111
+ border-radius: 3px 0 0 3px;
112
+ }
113
+
114
+ /* On hover, add a black background color with a little bit see-through */
115
+ :host .prev:hover,
116
+ :host .next:hover {
117
+ background-color: rgba(0, 0, 0, 0.8);
118
+ }
119
+
120
+ /* Caption text */
121
+ :host .qco-slider__text {
122
+ color: #f2f2f2;
123
+ font-size: 15px;
124
+ /* padding: 8px 12px;*/
125
+ position: absolute;
126
+ bottom: 8px;
127
+ width: 100%;
128
+ text-align: center;
129
+ text-shadow: -1px 1px 3px #111111;
130
+ background-color: rgba(1,1,1,0.7);
131
+ }
132
+
133
+ /* Number text (1/3 etc) */
134
+ :host .qco-slider__numbertext {
135
+ color: #f2f2f2;
136
+ text-shadow: 0px 2px 3px #111111;
137
+ font-size: 12px;
138
+ padding: 8px 12px;
139
+ position: absolute;
140
+ top: 0;
141
+ padding-top: 0;
142
+ margin-top: 10px;
143
+ }
144
+
145
+ /* The dots/bullets/indicators */
146
+ :host .qcoSlider__dots {
147
+ text-align: center;
148
+ margin: 0 auto;
149
+ padding: 0;
150
+ }
151
+ :host .qcoSlider__dots--dot {
152
+ cursor: pointer;
153
+ height: 10px;
154
+ width: 10px;
155
+ margin: 0 2px;
156
+ background-color: #bbb;
157
+ border-radius: 50%;
158
+ display: inline-block;
159
+ transition: background-color 0.6s ease;
160
+ }
161
+
162
+ :host .active,
163
+ :host .qcoSlider__dots--dot:hover {
164
+ background-color: #717171;
165
+ }
166
+
167
+ :host .qco-slider__container .qcoSlides img {
168
+ border-radius: 30px 30px 0px 0px;
169
+ }
170
+
171
+ </style>
172
+
173
+ <div class="qco-slider__container">
174
+ <component name="slidelist" componentClass="SlideListComponent" subcomponentClass="SlideItemComponent" serviceClass="{{SERVICE_CLASS}}" ></component>
175
+
176
+ <a class="prev" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(-1)">&#10094;</a>
177
+ <a class="next" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(1)">&#10095;</a>
178
+ </div>
179
+ <br>
180
+
181
+ <div class="qcoSlider__dots" style="text-align:center">
182
+ </div>
183
+
184
+ `;
185
+ this.tplsource = "inline";
186
+ this.shadowed = true;
187
+ this.data.SERVICE_CLASS = this.body.getAttribute("serviceClass");
188
+ this.data.sliderHandler = "slider_" + this.__instanceID.toString();
189
+ this.body.setAttribute("controllerClass", "SliderController");
190
+ }
191
+ }
192
+ ]);
193
+ })();