qcobjects-sdk 2.4.64 → 2.5.105-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npmpublish-beta.yml +4 -2
- package/.github/workflows/npmpublish-lts.yml +4 -2
- package/.github/workflows/npmpublish-main.yml +5 -3
- package/VERSION +1 -1
- package/build/QCObjects-SDK.js +83 -41
- package/build/index.js +17 -7
- package/build/js/org.qcobjects.base.components.js +75 -0
- package/build/js/org.qcobjects.cloud.auth.session.data.js +98 -101
- package/build/js/org.qcobjects.cloud.auth.session.usertoken.js +68 -80
- package/build/js/org.qcobjects.components.grid.js +35 -53
- package/build/js/org.qcobjects.components.js +145 -237
- package/build/js/org.qcobjects.components.list.js +36 -45
- package/build/js/org.qcobjects.components.notifications.js +107 -106
- package/build/js/org.qcobjects.components.slider.js +183 -169
- package/build/js/org.qcobjects.components.splashscreen.js +123 -130
- package/build/js/org.qcobjects.controllers.form.js +149 -147
- package/build/js/org.qcobjects.controllers.grid.js +226 -215
- package/build/js/org.qcobjects.controllers.js +11 -11
- package/build/js/org.qcobjects.controllers.list.js +195 -188
- package/build/js/org.qcobjects.controllers.slider.js +101 -106
- package/build/js/org.qcobjects.controllers.swagger.js +71 -46
- package/build/js/org.qcobjects.effects.base.js +86 -0
- package/build/js/org.qcobjects.effects.extended.js +318 -0
- package/build/js/org.qcobjects.effects.js +26 -394
- package/build/js/org.qcobjects.i18n_messages.js +33 -46
- package/build/js/org.qcobjects.modal.controllers.js +16 -15
- package/build/js/org.qcobjects.modal.effects.js +23 -28
- package/build/js/org.qcobjects.models.js +11 -11
- package/build/js/org.qcobjects.tools.canvas.js +28 -27
- package/build/js/org.qcobjects.tools.js +10 -3
- package/build/js/org.qcobjects.tools.layouts.js +46 -45
- package/build/js/org.qcobjects.views.js +11 -11
- package/build-esbuild.js +72 -0
- package/eslint.config.mjs +88 -0
- package/package.json +66 -59
- package/postbuild.js +10 -0
- package/public/browser/index.js +9902 -0
- package/public/browser/index.js.map +7 -0
- package/public/cjs/index.cjs +9894 -0
- package/public/cjs/index.cjs.map +7 -0
- package/public/esm/index.mjs +9894 -0
- package/public/esm/index.mjs.map +7 -0
- package/public/types/index.d.ts +698 -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/QCObjects-SDK.ts +72 -53
- package/src/js/org.qcobjects.base.components.ts +83 -0
- package/src/js/org.qcobjects.cloud.auth.session.data.ts +98 -99
- package/src/js/org.qcobjects.cloud.auth.session.usertoken.ts +72 -92
- package/src/js/org.qcobjects.components.grid.ts +31 -58
- package/src/js/org.qcobjects.components.list.ts +15 -31
- package/src/js/org.qcobjects.components.notifications.ts +12 -12
- package/src/js/org.qcobjects.components.slider.ts +182 -171
- package/src/js/org.qcobjects.components.splashscreen.ts +31 -39
- package/src/js/org.qcobjects.components.ts +151 -261
- package/src/js/org.qcobjects.controllers.form.ts +151 -148
- package/src/js/org.qcobjects.controllers.grid.ts +226 -222
- package/src/js/org.qcobjects.controllers.list.ts +207 -205
- package/src/js/org.qcobjects.controllers.slider.ts +120 -125
- package/src/js/org.qcobjects.controllers.swagger.ts +51 -51
- package/src/js/org.qcobjects.controllers.ts +7 -9
- package/src/js/org.qcobjects.effects.base.ts +97 -0
- package/src/js/org.qcobjects.effects.extended.ts +350 -0
- package/src/js/org.qcobjects.effects.ts +6 -394
- package/src/js/org.qcobjects.i18n_messages.ts +37 -51
- package/src/js/org.qcobjects.modal.controllers.ts +12 -14
- package/src/js/org.qcobjects.modal.effects.ts +22 -18
- package/src/js/org.qcobjects.models.ts +8 -11
- package/src/js/org.qcobjects.tools.canvas.ts +26 -28
- package/src/js/org.qcobjects.tools.layouts.ts +44 -47
- package/src/js/org.qcobjects.tools.ts +7 -1
- package/src/js/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/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/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/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/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.usertoken.d.ts +0 -2
- 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.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.splashscreen.d.ts +0 -28
- 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.grid.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.list.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.slider.d.ts +0 -1
- package/src/js/org.qcobjects.controllers.swagger.d.ts +0 -1
- 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.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.views.d.ts +0 -1
- /package/spec/{testsSpec.js → testsSpec.ts} +0 -0
|
@@ -1,9 +1,5 @@
|
|
|
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
1
|
/**
|
|
6
|
-
* QCObjects SDK 2.
|
|
2
|
+
* QCObjects SDK 2.5
|
|
7
3
|
* ________________
|
|
8
4
|
*
|
|
9
5
|
* Author: Jean Machuca <correojean@gmail.com>
|
|
@@ -26,17 +22,22 @@ const org_qcobjects_effects_1 = require("./org.qcobjects.effects");
|
|
|
26
22
|
* Everyone is permitted to copy and distribute verbatim copies of this
|
|
27
23
|
* license document, but changing it is not allowed.
|
|
28
24
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
"use strict";
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.NotificationComponent = void 0;
|
|
28
|
+
const qcobjects_1 = require("qcobjects");
|
|
29
|
+
const org_qcobjects_effects_1 = require("./org.qcobjects.effects");
|
|
30
|
+
class NotificationComponent extends qcobjects_1.Component {
|
|
31
|
+
cached = false;
|
|
32
|
+
tplsource = "inline";
|
|
33
|
+
shadowed = false;
|
|
34
|
+
kinds;
|
|
35
|
+
template;
|
|
36
|
+
constructor(o) {
|
|
37
|
+
o.name = "notification";
|
|
38
|
+
o.body = (0, qcobjects_1._DOMCreateElement)("div");
|
|
39
|
+
super(o);
|
|
40
|
+
this.template = `
|
|
40
41
|
<style>
|
|
41
42
|
div.notification_background {
|
|
42
43
|
display: block; /* Hidden by default */
|
|
@@ -82,98 +83,98 @@ const org_qcobjects_effects_1 = require("./org.qcobjects.effects");
|
|
|
82
83
|
</div>
|
|
83
84
|
</div>
|
|
84
85
|
`;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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}...`
|
|
86
|
+
this.kinds = ["danger", "success", "info", "warning"];
|
|
87
|
+
}
|
|
88
|
+
display(element) {
|
|
89
|
+
const _display_ = function (element) {
|
|
90
|
+
element.style.display = "block";
|
|
91
|
+
const appearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {
|
|
92
|
+
duration: 900,
|
|
93
|
+
apply(element) {
|
|
94
|
+
(0, qcobjects_1._super_)("Fade", "apply").call(this, element, 0, 1);
|
|
95
|
+
(0, qcobjects_1._super_)("Move", "apply").call(this, element, 0, -document.body.clientHeight, 0, 0);
|
|
154
96
|
}
|
|
155
97
|
});
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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}...`
|
|
98
|
+
const disappearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {
|
|
99
|
+
duration: 650,
|
|
100
|
+
apply(element) {
|
|
101
|
+
(0, qcobjects_1._super_)("Fade", "apply").call(this, element, 1, 0);
|
|
102
|
+
(0, qcobjects_1._super_)("Move", "apply").call(this, element, 0, 0, 0, -document.body.clientHeight);
|
|
169
103
|
}
|
|
170
104
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
105
|
+
appearEffect.apply(element);
|
|
106
|
+
setTimeout(function () {
|
|
107
|
+
disappearEffect.apply(element);
|
|
108
|
+
}, 2000);
|
|
109
|
+
};
|
|
110
|
+
element.subelements("div.notification_background").map((element) => { return (new org_qcobjects_effects_1.Fade({ duration: 500 })).apply(element, 0, 1); });
|
|
111
|
+
element.subelements("div.notification").map((element) => _display_(element));
|
|
112
|
+
setTimeout(function () {
|
|
113
|
+
element.remove();
|
|
114
|
+
}, 2200);
|
|
115
|
+
}
|
|
116
|
+
static success(message) {
|
|
117
|
+
const c = (0, qcobjects_1.New)(NotificationComponent, {
|
|
118
|
+
name: "notification",
|
|
119
|
+
shadowed: true,
|
|
120
|
+
body: (0, qcobjects_1._DOMCreateElement)("div"),
|
|
121
|
+
data: {
|
|
122
|
+
kind: "success",
|
|
123
|
+
title: "Success!",
|
|
124
|
+
message: `${message}...`
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
document.body.append(c);
|
|
128
|
+
const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
|
|
129
|
+
c.display(_componentRoot);
|
|
130
|
+
}
|
|
131
|
+
static danger(message) {
|
|
132
|
+
const c = (0, qcobjects_1.New)(NotificationComponent, {
|
|
133
|
+
name: "notification",
|
|
134
|
+
shadowed: true,
|
|
135
|
+
body: (0, qcobjects_1._DOMCreateElement)("div"),
|
|
136
|
+
data: {
|
|
137
|
+
kind: "danger",
|
|
138
|
+
title: "Danger!",
|
|
139
|
+
message: `${message}...`
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
document.body.append(c);
|
|
143
|
+
const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
|
|
144
|
+
c.display(_componentRoot);
|
|
145
|
+
}
|
|
146
|
+
static info(message) {
|
|
147
|
+
const c = (0, qcobjects_1.New)(NotificationComponent, {
|
|
148
|
+
name: "notification",
|
|
149
|
+
shadowed: true,
|
|
150
|
+
body: (0, qcobjects_1._DOMCreateElement)("div"),
|
|
151
|
+
data: {
|
|
152
|
+
kind: "info",
|
|
153
|
+
title: "Info!",
|
|
154
|
+
message: `${message}...`
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
document.body.append(c);
|
|
158
|
+
const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
|
|
159
|
+
c.display(_componentRoot);
|
|
160
|
+
}
|
|
161
|
+
static warning(message) {
|
|
162
|
+
const c = (0, qcobjects_1.New)(NotificationComponent, {
|
|
163
|
+
name: "notification",
|
|
164
|
+
shadowed: true,
|
|
165
|
+
body: (0, qcobjects_1._DOMCreateElement)("div"),
|
|
166
|
+
data: {
|
|
167
|
+
kind: "warning",
|
|
168
|
+
title: "Warning!",
|
|
169
|
+
message: `${message}...`
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
document.body.append(c);
|
|
173
|
+
const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);
|
|
174
|
+
c.display(_componentRoot);
|
|
175
175
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
}
|
|
177
|
+
exports.NotificationComponent = NotificationComponent;
|
|
178
|
+
(0, qcobjects_1.Package)("org.quickcorp.components.notifications", [
|
|
179
|
+
NotificationComponent
|
|
180
|
+
]);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const qcobjects_1 = require("qcobjects");
|
|
4
1
|
/**
|
|
5
|
-
* QCObjects SDK 2.
|
|
2
|
+
* QCObjects SDK 2.5
|
|
6
3
|
* ________________
|
|
7
4
|
*
|
|
8
5
|
* Author: Jean Machuca <correojean@gmail.com>
|
|
@@ -25,169 +22,186 @@ const qcobjects_1 = require("qcobjects");
|
|
|
25
22
|
* Everyone is permitted to copy and distribute verbatim copies of this
|
|
26
23
|
* license document, but changing it is not allowed.
|
|
27
24
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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)">❮</a>
|
|
177
|
-
<a class="next" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(1)">❯</a>
|
|
178
|
-
</div>
|
|
179
|
-
<br>
|
|
180
|
-
|
|
181
|
-
<div class="qcoSlider__dots" style="text-align:center">
|
|
25
|
+
"use strict";
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.SliderComponent = exports.SlideItemComponent = exports.SlideListComponent = void 0;
|
|
28
|
+
const qcobjects_1 = require("qcobjects");
|
|
29
|
+
class SlideListComponent extends qcobjects_1.Component {
|
|
30
|
+
tplsource = "inline";
|
|
31
|
+
template = "<p>Loading...</p>";
|
|
32
|
+
name = "slidelist";
|
|
33
|
+
body;
|
|
34
|
+
constructor(o) {
|
|
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);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.SlideListComponent = SlideListComponent;
|
|
42
|
+
class SlideItemComponent extends qcobjects_1.Component {
|
|
43
|
+
effectClass = "Fade";
|
|
44
|
+
name = "slider_item";
|
|
45
|
+
data;
|
|
46
|
+
template;
|
|
47
|
+
tplsource;
|
|
48
|
+
constructor(o) {
|
|
49
|
+
super(o);
|
|
50
|
+
this.data.slideNumber = this.data.__dataIndex + 1;
|
|
51
|
+
this.template = `
|
|
52
|
+
<div class="qcoSlides" style="display:none">
|
|
53
|
+
<div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
|
|
54
|
+
<img src="{{image}}" alt="{{title}}"/>
|
|
55
|
+
<div class="qco-slider__text">
|
|
56
|
+
<p>{{label}} <a href="{{link}}">{{category}}</a></p>
|
|
182
57
|
</div>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
this.tplsource = "inline";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.SlideItemComponent = SlideItemComponent;
|
|
64
|
+
class SliderComponent extends qcobjects_1.Component {
|
|
65
|
+
name = "slider";
|
|
66
|
+
template;
|
|
67
|
+
tplsource;
|
|
68
|
+
shadowed;
|
|
69
|
+
data;
|
|
70
|
+
body;
|
|
71
|
+
__instanceID;
|
|
72
|
+
constructor(o) {
|
|
73
|
+
super(o);
|
|
74
|
+
this.template = `
|
|
75
|
+
<style>
|
|
76
|
+
/* Slideshow container */
|
|
77
|
+
|
|
78
|
+
:host a:hover,
|
|
79
|
+
:host a:active,
|
|
80
|
+
:host a:visited {
|
|
81
|
+
color: #ffffff;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
{
|
|
85
|
+
color: #ffffff;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host .prev {left:0;}
|
|
89
|
+
.qco-slider__container {
|
|
90
|
+
max-width: 100%;
|
|
91
|
+
position: relative;
|
|
92
|
+
margin: auto;
|
|
93
|
+
height: 300px;
|
|
94
|
+
}
|
|
95
|
+
:host .qco-slider__container .qcoSlides img {
|
|
96
|
+
object-fit: cover;
|
|
97
|
+
width: 100%;
|
|
98
|
+
height: 300px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Next & previous buttons */
|
|
102
|
+
:host .prev,
|
|
103
|
+
:host .next {
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 50%;
|
|
107
|
+
width: auto;
|
|
108
|
+
margin-top: -22px;
|
|
109
|
+
padding: 16px;
|
|
110
|
+
color: white;
|
|
111
|
+
font-weight: bold;
|
|
112
|
+
font-size: 18px;
|
|
113
|
+
transition: 0.6s ease;
|
|
114
|
+
border-radius: 0 3px 3px 0;
|
|
115
|
+
background-color: rgba(1, 1, 1, 0.1);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Position the "next button" to the right */
|
|
119
|
+
:host .next {
|
|
120
|
+
right: 0;
|
|
121
|
+
border-radius: 3px 0 0 3px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* On hover, add a black background color with a little bit see-through */
|
|
125
|
+
:host .prev:hover,
|
|
126
|
+
:host .next:hover {
|
|
127
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Caption text */
|
|
131
|
+
:host .qco-slider__text {
|
|
132
|
+
color: #f2f2f2;
|
|
133
|
+
font-size: 15px;
|
|
134
|
+
/* padding: 8px 12px;*/
|
|
135
|
+
position: absolute;
|
|
136
|
+
bottom: 8px;
|
|
137
|
+
width: 100%;
|
|
138
|
+
text-align: center;
|
|
139
|
+
text-shadow: -1px 1px 3px #111111;
|
|
140
|
+
background-color: rgba(1,1,1,0.7);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Number text (1/3 etc) */
|
|
144
|
+
:host .qco-slider__numbertext {
|
|
145
|
+
color: #f2f2f2;
|
|
146
|
+
text-shadow: 0px 2px 3px #111111;
|
|
147
|
+
font-size: 12px;
|
|
148
|
+
padding: 8px 12px;
|
|
149
|
+
position: absolute;
|
|
150
|
+
top: 0;
|
|
151
|
+
padding-top: 0;
|
|
152
|
+
margin-top: 10px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* The dots/bullets/indicators */
|
|
156
|
+
:host .qcoSlider__dots {
|
|
157
|
+
text-align: center;
|
|
158
|
+
margin: 0 auto;
|
|
159
|
+
padding: 0;
|
|
160
|
+
}
|
|
161
|
+
:host .qcoSlider__dots--dot {
|
|
162
|
+
cursor: pointer;
|
|
163
|
+
height: 10px;
|
|
164
|
+
width: 10px;
|
|
165
|
+
margin: 0 2px;
|
|
166
|
+
background-color: #bbb;
|
|
167
|
+
border-radius: 50%;
|
|
168
|
+
display: inline-block;
|
|
169
|
+
transition: background-color 0.6s ease;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:host .active,
|
|
173
|
+
:host .qcoSlider__dots--dot:hover {
|
|
174
|
+
background-color: #717171;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host .qco-slider__container .qcoSlides img {
|
|
178
|
+
border-radius: 30px 30px 0px 0px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
</style>
|
|
182
|
+
|
|
183
|
+
<div class="qco-slider__container">
|
|
184
|
+
<component name="slidelist" componentClass="SlideListComponent" subcomponentClass="SlideItemComponent" serviceClass="{{SERVICE_CLASS}}" ></component>
|
|
185
|
+
|
|
186
|
+
<a class="prev" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(-1)">❮</a>
|
|
187
|
+
<a class="next" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(1)">❯</a>
|
|
188
|
+
</div>
|
|
189
|
+
<br>
|
|
190
|
+
|
|
191
|
+
<div class="qcoSlider__dots" style="text-align:center">
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
`;
|
|
195
|
+
this.tplsource = "inline";
|
|
196
|
+
this.shadowed = true;
|
|
197
|
+
this.data.SERVICE_CLASS = this.body.getAttribute("serviceClass");
|
|
198
|
+
this.data.sliderHandler = "slider_" + this.__instanceID.toString();
|
|
199
|
+
this.body.setAttribute("controllerClass", "SliderController");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
exports.SliderComponent = SliderComponent;
|
|
203
|
+
(0, qcobjects_1.Package)("org.qcobjects.components.slider", [
|
|
204
|
+
SlideListComponent,
|
|
205
|
+
SlideItemComponent,
|
|
206
|
+
SliderComponent
|
|
207
|
+
]);
|