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.
- package/.github/workflows/npmpublish.yml +47 -0
- package/README.md +0 -1
- package/VERSION +1 -1
- package/build/index.js +137 -25
- package/build/ts/org.qcobjects.base.components.js +75 -0
- package/build/ts/org.qcobjects.cloud.auth.session.data.js +122 -0
- package/build/ts/org.qcobjects.cloud.auth.session.usertoken.js +97 -0
- package/build/ts/org.qcobjects.components.grid.js +63 -0
- package/build/ts/org.qcobjects.components.js +200 -0
- package/build/{js/org.qcobjects.modal.effects.js → ts/org.qcobjects.components.list.js} +40 -29
- package/build/ts/org.qcobjects.components.notifications.js +180 -0
- package/build/ts/org.qcobjects.components.slider.js +207 -0
- package/build/{js → ts}/org.qcobjects.components.splashscreen.js +123 -130
- package/build/ts/org.qcobjects.controllers.form.js +180 -0
- package/build/ts/org.qcobjects.controllers.grid.js +269 -0
- package/build/{js → ts}/org.qcobjects.controllers.js +11 -11
- package/build/ts/org.qcobjects.controllers.list.js +235 -0
- package/build/ts/org.qcobjects.controllers.slider.js +126 -0
- package/build/ts/org.qcobjects.controllers.swagger.js +75 -0
- package/build/ts/org.qcobjects.effects.base.js +70 -0
- package/build/ts/org.qcobjects.effects.extended.js +270 -0
- package/build/ts/org.qcobjects.effects.js +49 -0
- package/build/ts/org.qcobjects.i18n_messages.js +59 -0
- package/build/{js → ts}/org.qcobjects.modal.controllers.js +16 -15
- package/build/ts/org.qcobjects.modal.effects.js +46 -0
- package/build/{js → ts}/org.qcobjects.models.js +11 -11
- package/{src/js/org.qcobjects.tools.canvas.ts → build/ts/org.qcobjects.tools.canvas.js} +16 -21
- package/build/{js → ts}/org.qcobjects.tools.js +10 -3
- package/build/ts/org.qcobjects.tools.layouts.js +74 -0
- package/build/{js → ts}/org.qcobjects.views.js +11 -11
- package/build-esbuild.js +72 -0
- package/eslint.config.mjs +88 -0
- package/package.json +67 -63
- package/postbuild.js +10 -0
- package/public/browser/index.js +9829 -0
- package/public/browser/index.js.map +7 -0
- package/public/cjs/index.cjs +9879 -0
- package/public/cjs/index.cjs.map +7 -0
- package/public/esm/index.mjs +9819 -0
- package/public/esm/index.mjs.map +7 -0
- package/public/types/index.d.ts +614 -0
- package/spec/helpers/mock-sdk.helper.ts +2 -0
- package/spec/mocks/qcobjects-sdk.mock.ts +1 -0
- package/spec/support/jasmine.json +7 -4
- package/src/index.ts +127 -2
- package/src/ts/org.qcobjects.base.components.ts +83 -0
- package/src/ts/org.qcobjects.cloud.auth.session.data.ts +134 -0
- package/src/ts/org.qcobjects.cloud.auth.session.usertoken.ts +108 -0
- package/src/ts/org.qcobjects.components.grid.ts +68 -0
- package/src/{js → ts}/org.qcobjects.components.list.ts +15 -31
- package/src/{js → ts}/org.qcobjects.components.notifications.ts +12 -12
- package/src/ts/org.qcobjects.components.slider.ts +216 -0
- package/src/{js → ts}/org.qcobjects.components.splashscreen.ts +31 -39
- package/src/ts/org.qcobjects.components.ts +226 -0
- package/src/ts/org.qcobjects.controllers.form.ts +209 -0
- package/src/ts/org.qcobjects.controllers.grid.ts +291 -0
- package/src/ts/org.qcobjects.controllers.list.ts +256 -0
- package/src/ts/org.qcobjects.controllers.slider.ts +153 -0
- package/src/ts/org.qcobjects.controllers.swagger.ts +83 -0
- package/src/{js → ts}/org.qcobjects.controllers.ts +7 -9
- package/src/ts/org.qcobjects.effects.base.ts +81 -0
- package/src/{js/org.qcobjects.effects.ts → ts/org.qcobjects.effects.extended.ts} +70 -198
- package/src/ts/org.qcobjects.effects.ts +42 -0
- package/src/ts/org.qcobjects.i18n_messages.ts +68 -0
- package/src/{js → ts}/org.qcobjects.modal.controllers.ts +12 -14
- package/src/{js → ts}/org.qcobjects.modal.effects.ts +22 -18
- package/src/{js → ts}/org.qcobjects.models.ts +8 -11
- package/src/ts/org.qcobjects.tools.canvas.ts +57 -0
- package/src/ts/org.qcobjects.tools.layouts.ts +82 -0
- package/src/{js → ts}/org.qcobjects.tools.ts +7 -1
- package/src/{js → ts}/org.qcobjects.views.ts +9 -8
- package/src/types/global/index.d.ts +181 -0
- package/transpile.js +65 -0
- package/tsconfig.d.json +65 -3
- package/tsconfig.jasmine.json +64 -0
- package/tsconfig.json +71 -7
- package/.eslintignore +0 -4
- package/.eslintrc.cjs +0 -6
- package/.github/workflows/npmpublish-beta.yml +0 -38
- package/.github/workflows/npmpublish-lts.yml +0 -38
- package/.github/workflows/npmpublish-main.yml +0 -40
- package/.gitmodules +0 -4
- package/build/QCObjects-SDK.js +0 -97
- package/build/css/base-modal.css +0 -43
- package/build/css/basic-layout-embedded-nav.css +0 -14
- package/build/css/basic-layout.css +0 -76
- package/build/css/components/horizontal-list.css +0 -64
- package/build/css/components/list.css +0 -57
- package/build/css/components/splashscreen.css +0 -111
- package/build/css/modal.css +0 -46
- package/build/index.cjs +0 -4
- package/build/index.mjs +0 -2
- package/build/js/org.qcobjects.cloud.auth.session.data.js +0 -125
- package/build/js/org.qcobjects.cloud.auth.session.usertoken.js +0 -109
- package/build/js/org.qcobjects.components.grid.js +0 -81
- package/build/js/org.qcobjects.components.js +0 -292
- package/build/js/org.qcobjects.components.list.js +0 -71
- package/build/js/org.qcobjects.components.notifications.js +0 -179
- package/build/js/org.qcobjects.components.slider.js +0 -193
- package/build/js/org.qcobjects.controllers.form.js +0 -178
- package/build/js/org.qcobjects.controllers.grid.js +0 -258
- package/build/js/org.qcobjects.controllers.list.js +0 -228
- package/build/js/org.qcobjects.controllers.slider.js +0 -131
- package/build/js/org.qcobjects.controllers.swagger.js +0 -50
- package/build/js/org.qcobjects.effects.js +0 -417
- package/build/js/org.qcobjects.i18n_messages.js +0 -72
- package/build/js/org.qcobjects.tools.canvas.js +0 -53
- package/build/js/org.qcobjects.tools.layouts.js +0 -73
- package/build/templates/components/modalyoulose.tpl.html +0 -3
- package/build/templates/components/modalyouwin.tpl.html +0 -4
- package/build/templates/components/splashscreen.tpl.html +0 -128
- package/build/templates/components/swagger-ui.tpl.html +0 -22
- package/docs/CNAME +0 -1
- package/public/QCObjects-SDK.js +0 -696
- package/public/QCObjects-SDK.js.map +0 -7
- package/public/css/base-modal.css +0 -2
- package/public/css/base-modal.css.map +0 -7
- package/public/css/basic-layout-embedded-nav.css +0 -2
- package/public/css/basic-layout-embedded-nav.css.map +0 -7
- package/public/css/basic-layout.css +0 -2
- package/public/css/basic-layout.css.map +0 -7
- package/public/css/components/horizontal-list.css +0 -2
- package/public/css/components/horizontal-list.css.map +0 -7
- package/public/css/components/list.css +0 -2
- package/public/css/components/list.css.map +0 -7
- package/public/css/components/splashscreen.css +0 -2
- package/public/css/components/splashscreen.css.map +0 -7
- package/public/css/modal.css +0 -2
- package/public/css/modal.css.map +0 -7
- package/public/index.cjs +0 -4
- package/public/index.js +0 -27
- package/public/index.mjs +0 -2
- package/public/templates/components/modalyoulose.tpl.html +0 -3
- package/public/templates/components/modalyouwin.tpl.html +0 -4
- package/public/templates/components/splashscreen.tpl.html +0 -128
- package/public/templates/components/swagger-ui.tpl.html +0 -22
- package/src/QCObjects-SDK.d.ts +0 -26
- package/src/QCObjects-SDK.ts +0 -108
- package/src/index.cts +0 -2
- package/src/index.d.ts +0 -2
- package/src/index.mts +0 -2
- package/src/js/org.qcobjects.cloud.auth.session.data.d.ts +0 -1
- package/src/js/org.qcobjects.cloud.auth.session.data.ts +0 -135
- package/src/js/org.qcobjects.cloud.auth.session.usertoken.d.ts +0 -2
- package/src/js/org.qcobjects.cloud.auth.session.usertoken.ts +0 -128
- package/src/js/org.qcobjects.components.d.ts +0 -10
- package/src/js/org.qcobjects.components.grid.d.ts +0 -3
- package/src/js/org.qcobjects.components.grid.ts +0 -95
- package/src/js/org.qcobjects.components.list.d.ts +0 -3
- package/src/js/org.qcobjects.components.notifications.d.ts +0 -1
- package/src/js/org.qcobjects.components.slider.d.ts +0 -1
- package/src/js/org.qcobjects.components.slider.ts +0 -205
- package/src/js/org.qcobjects.components.splashscreen.d.ts +0 -28
- package/src/js/org.qcobjects.components.ts +0 -336
- package/src/js/org.qcobjects.controllers.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.form.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.form.ts +0 -206
- package/src/js/org.qcobjects.controllers.grid.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.grid.ts +0 -287
- package/src/js/org.qcobjects.controllers.list.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.list.ts +0 -254
- package/src/js/org.qcobjects.controllers.slider.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.slider.ts +0 -158
- package/src/js/org.qcobjects.controllers.swagger.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.swagger.ts +0 -83
- package/src/js/org.qcobjects.effects.d.ts +0 -20
- package/src/js/org.qcobjects.i18n_messages.d.ts +0 -1
- package/src/js/org.qcobjects.i18n_messages.ts +0 -82
- package/src/js/org.qcobjects.modal.controllers.d.ts +0 -1
- package/src/js/org.qcobjects.modal.effects.d.ts +0 -1
- package/src/js/org.qcobjects.models.d.ts +0 -1
- package/src/js/org.qcobjects.tools.canvas.d.ts +0 -1
- package/src/js/org.qcobjects.tools.d.ts +0 -1
- package/src/js/org.qcobjects.tools.layouts.d.ts +0 -1
- package/src/js/org.qcobjects.tools.layouts.ts +0 -85
- package/src/js/org.qcobjects.views.d.ts +0 -1
- /package/spec/{testsSpec.js → testsSpec.ts} +0 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QCObjects SDK 2.5
|
|
3
|
+
* ________________
|
|
4
|
+
*
|
|
5
|
+
* Author: Jean Machuca <correojean@gmail.com>
|
|
6
|
+
*
|
|
7
|
+
* Cross Browser Javascript Framework for MVC Patterns
|
|
8
|
+
* QuickCorp/QCObjects is licensed under the
|
|
9
|
+
* GNU Lesser General Public License v3.0
|
|
10
|
+
* [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
|
|
11
|
+
*
|
|
12
|
+
* Permissions of this copyleft license are conditioned on making available
|
|
13
|
+
* complete source code of licensed works and modifications under the same
|
|
14
|
+
* license or the GNU GPLv3. Copyright and license notices must be preserved.
|
|
15
|
+
* Contributors provide an express grant of patent rights. However, a larger
|
|
16
|
+
* work using the licensed work through interfaces provided by the licensed
|
|
17
|
+
* work may be distributed under different terms and without source code for
|
|
18
|
+
* the larger work.
|
|
19
|
+
*
|
|
20
|
+
* Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
|
|
21
|
+
*
|
|
22
|
+
* Everyone is permitted to copy and distribute verbatim copies of this
|
|
23
|
+
* license document, but changing it is not allowed.
|
|
24
|
+
*/
|
|
25
|
+
"use strict";
|
|
26
|
+
import { Package, Component } from "qcobjects";
|
|
27
|
+
|
|
28
|
+
export class SlideListComponent extends Component {
|
|
29
|
+
tplsource = "inline";
|
|
30
|
+
template = "<p>Loading...</p>";
|
|
31
|
+
name = "slidelist";
|
|
32
|
+
body: any;
|
|
33
|
+
|
|
34
|
+
constructor(o: any) {
|
|
35
|
+
super(o);
|
|
36
|
+
this.body.setAttribute("controllerClass", "DataGridController");
|
|
37
|
+
const subcomponentClass = (this.body.getAttribute("subcomponentClass") !== null) ? (this.body.getAttribute("subcomponentClass")) : ("GridItemComponent");
|
|
38
|
+
this.body.setAttribute("subcomponentClass", subcomponentClass as string);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class SlideItemComponent extends Component {
|
|
44
|
+
effectClass = "Fade";
|
|
45
|
+
name = "slider_item";
|
|
46
|
+
data: any;
|
|
47
|
+
template: string;
|
|
48
|
+
tplsource: string;
|
|
49
|
+
|
|
50
|
+
constructor(o: any) {
|
|
51
|
+
super(o);
|
|
52
|
+
this.data.slideNumber = this.data.__dataIndex + 1;
|
|
53
|
+
this.template = `
|
|
54
|
+
<div class="qcoSlides" style="display:none">
|
|
55
|
+
<div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
|
|
56
|
+
<img src="{{image}}" alt="{{title}}"/>
|
|
57
|
+
<div class="qco-slider__text">
|
|
58
|
+
<p>{{label}} <a href="{{link}}">{{category}}</a></p>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
`;
|
|
62
|
+
this.tplsource = "inline";
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class SliderComponent extends Component {
|
|
69
|
+
name = "slider";
|
|
70
|
+
template: string;
|
|
71
|
+
tplsource: string;
|
|
72
|
+
shadowed: boolean;
|
|
73
|
+
data: any;
|
|
74
|
+
body: any;
|
|
75
|
+
__instanceID: any;
|
|
76
|
+
|
|
77
|
+
constructor(o: any) {
|
|
78
|
+
super(o);
|
|
79
|
+
this.template = `
|
|
80
|
+
<style>
|
|
81
|
+
/* Slideshow container */
|
|
82
|
+
|
|
83
|
+
:host a:hover,
|
|
84
|
+
:host a:active,
|
|
85
|
+
:host a:visited {
|
|
86
|
+
color: #ffffff;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
{
|
|
90
|
+
color: #ffffff;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host .prev {left:0;}
|
|
94
|
+
.qco-slider__container {
|
|
95
|
+
max-width: 100%;
|
|
96
|
+
position: relative;
|
|
97
|
+
margin: auto;
|
|
98
|
+
height: 300px;
|
|
99
|
+
}
|
|
100
|
+
:host .qco-slider__container .qcoSlides img {
|
|
101
|
+
object-fit: cover;
|
|
102
|
+
width: 100%;
|
|
103
|
+
height: 300px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Next & previous buttons */
|
|
107
|
+
:host .prev,
|
|
108
|
+
:host .next {
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: 50%;
|
|
112
|
+
width: auto;
|
|
113
|
+
margin-top: -22px;
|
|
114
|
+
padding: 16px;
|
|
115
|
+
color: white;
|
|
116
|
+
font-weight: bold;
|
|
117
|
+
font-size: 18px;
|
|
118
|
+
transition: 0.6s ease;
|
|
119
|
+
border-radius: 0 3px 3px 0;
|
|
120
|
+
background-color: rgba(1, 1, 1, 0.1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Position the "next button" to the right */
|
|
124
|
+
:host .next {
|
|
125
|
+
right: 0;
|
|
126
|
+
border-radius: 3px 0 0 3px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* On hover, add a black background color with a little bit see-through */
|
|
130
|
+
:host .prev:hover,
|
|
131
|
+
:host .next:hover {
|
|
132
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Caption text */
|
|
136
|
+
:host .qco-slider__text {
|
|
137
|
+
color: #f2f2f2;
|
|
138
|
+
font-size: 15px;
|
|
139
|
+
/* padding: 8px 12px;*/
|
|
140
|
+
position: absolute;
|
|
141
|
+
bottom: 8px;
|
|
142
|
+
width: 100%;
|
|
143
|
+
text-align: center;
|
|
144
|
+
text-shadow: -1px 1px 3px #111111;
|
|
145
|
+
background-color: rgba(1,1,1,0.7);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Number text (1/3 etc) */
|
|
149
|
+
:host .qco-slider__numbertext {
|
|
150
|
+
color: #f2f2f2;
|
|
151
|
+
text-shadow: 0px 2px 3px #111111;
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
padding: 8px 12px;
|
|
154
|
+
position: absolute;
|
|
155
|
+
top: 0;
|
|
156
|
+
padding-top: 0;
|
|
157
|
+
margin-top: 10px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* The dots/bullets/indicators */
|
|
161
|
+
:host .qcoSlider__dots {
|
|
162
|
+
text-align: center;
|
|
163
|
+
margin: 0 auto;
|
|
164
|
+
padding: 0;
|
|
165
|
+
}
|
|
166
|
+
:host .qcoSlider__dots--dot {
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
height: 10px;
|
|
169
|
+
width: 10px;
|
|
170
|
+
margin: 0 2px;
|
|
171
|
+
background-color: #bbb;
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
display: inline-block;
|
|
174
|
+
transition: background-color 0.6s ease;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host .active,
|
|
178
|
+
:host .qcoSlider__dots--dot:hover {
|
|
179
|
+
background-color: #717171;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:host .qco-slider__container .qcoSlides img {
|
|
183
|
+
border-radius: 30px 30px 0px 0px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
</style>
|
|
187
|
+
|
|
188
|
+
<div class="qco-slider__container">
|
|
189
|
+
<component name="slidelist" componentClass="SlideListComponent" subcomponentClass="SlideItemComponent" serviceClass="{{SERVICE_CLASS}}" ></component>
|
|
190
|
+
|
|
191
|
+
<a class="prev" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(-1)">❮</a>
|
|
192
|
+
<a class="next" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(1)">❯</a>
|
|
193
|
+
</div>
|
|
194
|
+
<br>
|
|
195
|
+
|
|
196
|
+
<div class="qcoSlider__dots" style="text-align:center">
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
`;
|
|
200
|
+
this.tplsource = "inline";
|
|
201
|
+
this.shadowed = true;
|
|
202
|
+
this.data.SERVICE_CLASS = this.body.getAttribute("serviceClass");
|
|
203
|
+
this.data.sliderHandler = "slider_" + this.__instanceID.toString();
|
|
204
|
+
this.body.setAttribute("controllerClass", "SliderController");
|
|
205
|
+
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
Package("org.qcobjects.components.slider", [
|
|
212
|
+
SlideListComponent,
|
|
213
|
+
SlideItemComponent,
|
|
214
|
+
SliderComponent
|
|
215
|
+
|
|
216
|
+
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* QCObjects SDK 2.
|
|
2
|
+
* QCObjects SDK 2.5.0
|
|
3
3
|
* ________________
|
|
4
4
|
*
|
|
5
5
|
* Author: Jean Machuca <correojean@gmail.com>
|
|
@@ -23,39 +23,35 @@
|
|
|
23
23
|
* license document, but changing it is not allowed.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
"use strict";
|
|
27
|
+
import { Package, Component, CONFIG, logger, global } from "qcobjects";
|
|
27
28
|
import { Resize, Fade } from "./org.qcobjects.effects";
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
? globalThis
|
|
32
|
-
: typeof self !== "undefined"
|
|
33
|
-
? self
|
|
34
|
-
: typeof window !== "undefined"
|
|
35
|
-
? window
|
|
36
|
-
: typeof global !== "undefined"
|
|
37
|
-
? global
|
|
38
|
-
: {})
|
|
39
|
-
) : ((typeof global === "object") ? (global) : (
|
|
40
|
-
(typeof window === "object") ? (window) : ({})
|
|
41
|
-
));
|
|
42
|
-
|
|
43
|
-
// eslint-disable-next-line camelcase
|
|
44
|
-
(function __splash_screen__(global) {
|
|
45
|
-
"use strict";
|
|
46
|
-
type SplashScreenParams = ComponentParams & {
|
|
30
|
+
type SplashScreenParams = {
|
|
31
|
+
name:string;
|
|
47
32
|
basePath: string;
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
data:any;
|
|
34
|
+
body:any;
|
|
35
|
+
}
|
|
36
|
+
type MainSplashComponent = {
|
|
37
|
+
body: any;
|
|
38
|
+
splashScreenComponent: any;
|
|
39
|
+
shadowed: any;
|
|
40
|
+
shadowRoot: any;
|
|
41
|
+
// eslint-disable-next-line no-unused-vars
|
|
42
|
+
addComponentHelper(arg0: () => void): unknown;
|
|
43
|
+
name:string;
|
|
50
44
|
_mainPosition: string;
|
|
51
45
|
_mainOpacity: string;
|
|
52
46
|
}
|
|
53
47
|
|
|
54
|
-
|
|
48
|
+
export class SplashScreenComponent extends Component {
|
|
55
49
|
_enabled_: boolean;
|
|
56
50
|
_bgcolor: string;
|
|
57
51
|
cached = false;
|
|
58
52
|
shadowed = true;
|
|
53
|
+
body: any;
|
|
54
|
+
shadowRoot: any;
|
|
59
55
|
|
|
60
56
|
constructor(component: SplashScreenParams) {
|
|
61
57
|
component.name = (typeof component.name === "undefined") ? ("splashscreen") : (component.name);
|
|
@@ -98,6 +94,7 @@ const _top: any = (typeof module === "object" && typeof module.exports === "obje
|
|
|
98
94
|
if (!_helper_.executed) {
|
|
99
95
|
const _componentRoot = (this.shadowed) ? (this.shadowRoot?.host as HTMLElement) : (this.body as HTMLElement);
|
|
100
96
|
if (typeof global.componentsStack !== "undefined") {
|
|
97
|
+
|
|
101
98
|
global.componentsStack.filter((c: MainSplashComponent) => c.body.hasAttribute("splashscreen")).map(
|
|
102
99
|
(mainComponent: MainSplashComponent) => {
|
|
103
100
|
logger.debug(`Splash Screen of Main Component: ${mainComponent.name}`);
|
|
@@ -106,11 +103,11 @@ const _top: any = (typeof module === "object" && typeof module.exports === "obje
|
|
|
106
103
|
if (!(SplashScreenHandler as any).executed) {
|
|
107
104
|
const component = mainComponent.splashScreenComponent as SplashScreenComponent;
|
|
108
105
|
const mainElement = (mainComponent.shadowed) ? (mainComponent.shadowRoot?.host as HTMLElement) : (mainComponent.body as HTMLElement);
|
|
109
|
-
mainComponent._mainPosition =
|
|
106
|
+
mainComponent._mainPosition = mainElement.style.position;
|
|
110
107
|
if (typeof mainElement !== "undefined") {
|
|
111
108
|
mainElement.style.position = "fixed";
|
|
112
109
|
}
|
|
113
|
-
mainComponent._mainOpacity =
|
|
110
|
+
mainComponent._mainOpacity = mainElement.style.opacity;
|
|
114
111
|
_componentRoot.style.width = "100%";
|
|
115
112
|
_componentRoot.style.height = "100%";
|
|
116
113
|
document.body.style.backgroundColor = "#111111";
|
|
@@ -118,9 +115,10 @@ const _top: any = (typeof module === "object" && typeof module.exports === "obje
|
|
|
118
115
|
setTimeout(function () {
|
|
119
116
|
if (typeof _componentRoot !== "undefined") {
|
|
120
117
|
document.body.style.backgroundColor = component?._bgcolor;
|
|
121
|
-
(_componentRoot as
|
|
118
|
+
(_componentRoot as any).subelements("#slot-logo").map((slotlogo:any) => {
|
|
122
119
|
slotlogo.style.display = "block";
|
|
123
120
|
slotlogo.style.transformOrigin = "center";
|
|
121
|
+
|
|
124
122
|
return (new Resize()).apply(slotlogo, 1, 0);
|
|
125
123
|
});
|
|
126
124
|
(new Fade()).apply(_componentRoot, 1, 0);
|
|
@@ -151,6 +149,10 @@ const _top: any = (typeof module === "object" && typeof module.exports === "obje
|
|
|
151
149
|
}
|
|
152
150
|
|
|
153
151
|
}
|
|
152
|
+
// eslint-disable-next-line no-unused-vars
|
|
153
|
+
addComponentHelper(arg0: { (): void; executed: boolean; }) {
|
|
154
|
+
throw new Error("Method not implemented.");
|
|
155
|
+
}
|
|
154
156
|
|
|
155
157
|
|
|
156
158
|
}
|
|
@@ -160,7 +162,7 @@ const _top: any = (typeof module === "object" && typeof module.exports === "obje
|
|
|
160
162
|
SplashScreenComponent
|
|
161
163
|
]);
|
|
162
164
|
|
|
163
|
-
class VideoSplashScreenComponent extends SplashScreenComponent {
|
|
165
|
+
export class VideoSplashScreenComponent extends SplashScreenComponent {
|
|
164
166
|
cached = false;
|
|
165
167
|
shadowed = true;
|
|
166
168
|
tplsource = "inline";
|
|
@@ -336,7 +338,7 @@ const _top: any = (typeof module === "object" && typeof module.exports === "obje
|
|
|
336
338
|
}
|
|
337
339
|
}
|
|
338
340
|
|
|
339
|
-
class CubeSplashScreenComponent extends SplashScreenComponent {
|
|
341
|
+
export class CubeSplashScreenComponent extends SplashScreenComponent {
|
|
340
342
|
cached = false;
|
|
341
343
|
shadowed = true;
|
|
342
344
|
tplsource = "inline";
|
|
@@ -663,18 +665,8 @@ const _top: any = (typeof module === "object" && typeof module.exports === "obje
|
|
|
663
665
|
|
|
664
666
|
|
|
665
667
|
Package("org.qcobjects.components.splashscreen", [
|
|
668
|
+
SplashScreenComponent,
|
|
666
669
|
VideoSplashScreenComponent,
|
|
667
670
|
CubeSplashScreenComponent
|
|
668
671
|
]);
|
|
669
672
|
|
|
670
|
-
})(_top);
|
|
671
|
-
|
|
672
|
-
const SplashScreenComponent = _top.SplashScreenComponent;
|
|
673
|
-
const VideoSplashScreenComponent = _top.VideoSplashScreenComponent;
|
|
674
|
-
const CubeSplashScreenComponent = _top.CubeSplashScreenComponent;
|
|
675
|
-
|
|
676
|
-
export {
|
|
677
|
-
SplashScreenComponent,
|
|
678
|
-
VideoSplashScreenComponent,
|
|
679
|
-
CubeSplashScreenComponent
|
|
680
|
-
};
|
|
@@ -0,0 +1,226 @@
|
|
|
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, Component, _DOMCreateElement, CONFIG, New, ClassFactory, Tag, ComponentURI } from "qcobjects";
|
|
28
|
+
import { ModalFade, ModalMoveDown, ModalMoveUp } from "./org.qcobjects.effects";
|
|
29
|
+
import {FormField, FieldComponentParams} from "./org.qcobjects.base.components";
|
|
30
|
+
export {FormField};
|
|
31
|
+
|
|
32
|
+
export class ShadowedComponent extends Component {
|
|
33
|
+
container = null;
|
|
34
|
+
shadowed = true;
|
|
35
|
+
cached = false;
|
|
36
|
+
controller = null;
|
|
37
|
+
view = null;
|
|
38
|
+
data = {};
|
|
39
|
+
|
|
40
|
+
constructor(o: FieldComponentParams) {
|
|
41
|
+
o.body = _DOMCreateElement("div");
|
|
42
|
+
super(o);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class ButtonField extends FormField {
|
|
49
|
+
constructor(o: FieldComponentParams) {
|
|
50
|
+
o.fieldType = "button";
|
|
51
|
+
super(o);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class InputField extends FormField {
|
|
56
|
+
constructor(o: FieldComponentParams) {
|
|
57
|
+
o.fieldType = "input";
|
|
58
|
+
super(o);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export class TextField extends FormField {
|
|
64
|
+
constructor(o: FieldComponentParams) {
|
|
65
|
+
o.fieldType = "textarea";
|
|
66
|
+
super(o);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export class EmailField extends FormField {
|
|
72
|
+
constructor(o: FieldComponentParams) {
|
|
73
|
+
o.fieldType = "input";
|
|
74
|
+
super(o);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export class ModalEnclosureComponent extends Component {
|
|
80
|
+
name = "modalenclosure";
|
|
81
|
+
tplsource = "inline";
|
|
82
|
+
cached = false;
|
|
83
|
+
basePath = CONFIG.get("modalBasePath", CONFIG.get("remoteSDKPath", ""));
|
|
84
|
+
template = `
|
|
85
|
+
<!-- The Modal -->
|
|
86
|
+
<style>
|
|
87
|
+
@import url('https://sdk.qcobjects.dev/css/modal.css');
|
|
88
|
+
</style>
|
|
89
|
+
<div id="modalInstance_{{modalId}}" class="modal">
|
|
90
|
+
|
|
91
|
+
<!-- Modal content -->
|
|
92
|
+
<div class="modal-content">
|
|
93
|
+
<span class="close">×</span>
|
|
94
|
+
{{content}}
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
</div>
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
data = {};
|
|
101
|
+
constructor(o: FieldComponentParams) {
|
|
102
|
+
o.body = _DOMCreateElement("div");
|
|
103
|
+
super(o);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export class ModalComponent extends Component {
|
|
109
|
+
name = "modal";
|
|
110
|
+
cached = false;
|
|
111
|
+
modalEnclosureComponentClass = "ModalEnclosureComponent";
|
|
112
|
+
controller = null;
|
|
113
|
+
view = null;
|
|
114
|
+
tplsource = "none";
|
|
115
|
+
closeOnClickOutside = false;
|
|
116
|
+
data = {
|
|
117
|
+
content: "",
|
|
118
|
+
modalId: 0
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
submodal = null;
|
|
122
|
+
__instanceID!: number;
|
|
123
|
+
basePath: any;
|
|
124
|
+
subcomponents: any;
|
|
125
|
+
body: any;
|
|
126
|
+
templateURI: any;
|
|
127
|
+
|
|
128
|
+
constructor(o: FieldComponentParams) {
|
|
129
|
+
o.basePath = CONFIG.get("modalBasePath", CONFIG.get("remoteSDKPath", ""));
|
|
130
|
+
super(o);
|
|
131
|
+
this.data.modalId = this.__instanceID;
|
|
132
|
+
const submodal = New(ClassFactory(this.modalEnclosureComponentClass), {
|
|
133
|
+
name: this.name,
|
|
134
|
+
basePath: this.basePath,
|
|
135
|
+
data: this.data
|
|
136
|
+
});
|
|
137
|
+
this.subcomponents.push(submodal);
|
|
138
|
+
this.submodal = submodal;
|
|
139
|
+
if (submodal.tplsource === "none") {
|
|
140
|
+
this.body.innerHTML = submodal.parsedAssignmentText;
|
|
141
|
+
} else {
|
|
142
|
+
this.body.append(submodal.body);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
modal() {
|
|
148
|
+
const modalId = this.data.modalId;
|
|
149
|
+
|
|
150
|
+
Tag("#modalInstance_" + modalId + ".modal").map((modal: any) => {
|
|
151
|
+
modal.style.display = "block";
|
|
152
|
+
|
|
153
|
+
return (new ModalFade()).apply(modal, 0, 1);
|
|
154
|
+
});
|
|
155
|
+
Tag("#modalInstance_" + modalId + ".modal .modal-content").map((modalcontent: any) => {
|
|
156
|
+
|
|
157
|
+
return ModalMoveDown.apply(modalcontent, 0, -document.body.clientHeight, 0, 0);
|
|
158
|
+
});
|
|
159
|
+
Tag("#modalInstance_" + modalId + ".modal .modal-content .close").map((closebtn: any) => {
|
|
160
|
+
|
|
161
|
+
return closebtn.addEventListener("click", () => {
|
|
162
|
+
this.close();
|
|
163
|
+
}, false);
|
|
164
|
+
});
|
|
165
|
+
if (this.closeOnClickOutside) {
|
|
166
|
+
window.addEventListener("click", () => {
|
|
167
|
+
this.close();
|
|
168
|
+
}, false);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
close() {
|
|
173
|
+
const modalId = this.data.modalId;
|
|
174
|
+
Tag("#modalInstance_" + modalId + ".modal").map((modal: any) => {
|
|
175
|
+
modal.style.display = "block";
|
|
176
|
+
|
|
177
|
+
return (new ModalFade({ duration: 3000 })).apply(modal, 1, 0);
|
|
178
|
+
});
|
|
179
|
+
Tag("#modalInstance_" + modalId + ".modal .modal-content").map(function (modalcontent: any) {
|
|
180
|
+
|
|
181
|
+
return ModalMoveUp.apply(modalcontent, 0, 0, 0, -document.body.clientHeight);
|
|
182
|
+
});
|
|
183
|
+
setTimeout(function () {
|
|
184
|
+
Tag("#modalInstance_" + modalId + ".modal").map((modal: any) => {
|
|
185
|
+
modal.style.display = "none";
|
|
186
|
+
return true;
|
|
187
|
+
});
|
|
188
|
+
}, 900);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
rebuild() {
|
|
192
|
+
const _ret_ = super.rebuild();
|
|
193
|
+
this.templateURI = ComponentURI({
|
|
194
|
+
"COMPONENTS_BASE_PATH": CONFIG.get("componentsBasePath", ""),
|
|
195
|
+
"COMPONENT_NAME": "modal",
|
|
196
|
+
"TPLEXTENSION": CONFIG.get("tplextension", ""),
|
|
197
|
+
"TPL_SOURCE": "default" // here is always default in order to get the right uri
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
return _ret_; // parent call
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export class SwaggerUIComponent extends Component {
|
|
207
|
+
cached = false;
|
|
208
|
+
basePath = CONFIG.get("remoteSDKPath", "");
|
|
209
|
+
tplextension = "tpl.html";
|
|
210
|
+
name = "swagger-ui";
|
|
211
|
+
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
Package("org.qcobjects.form.components", [
|
|
216
|
+
ShadowedComponent,
|
|
217
|
+
ButtonField,
|
|
218
|
+
InputField,
|
|
219
|
+
TextField,
|
|
220
|
+
EmailField,
|
|
221
|
+
ModalEnclosureComponent,
|
|
222
|
+
ModalComponent,
|
|
223
|
+
SwaggerUIComponent
|
|
224
|
+
]);
|
|
225
|
+
|
|
226
|
+
|