qcobjectsnewapp 2.5.22-ts → 2.5.24-ts
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/VERSION +1 -1
- package/package.json +1 -1
- package/public/js/init.js +20 -20
- package/public/js/init.js.map +3 -3
- package/public/js/packages/com.qcobjects.installer.js +15 -15
- package/public/js/packages/com.qcobjects.installer.js.map +3 -3
- package/public/js/packages/com.qcobjects.services.github.js +4 -4
- package/public/js/packages/com.qcobjects.services.github.js.map +3 -3
- package/public/js/packages/com.qcobjects.services.newapp.js +4 -4
- package/public/js/packages/com.qcobjects.services.newapp.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.components.js +8 -8
- package/public/js/packages/org.quickcorp.custom.components.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.controllers.js +16 -16
- package/public/js/packages/org.quickcorp.custom.controllers.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.effects.js +4 -4
- package/public/js/packages/org.quickcorp.custom.effects.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.js +20 -20
- package/public/js/packages/org.quickcorp.custom.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.models.js +4 -4
- package/public/js/packages/org.quickcorp.custom.models.js.map +3 -3
- package/public/js/packages/org.quickcorp.custom.views.js +4 -4
- package/public/js/packages/org.quickcorp.custom.views.js.map +3 -3
- package/src/js/packages/com.qcobjects.installer.ts +83 -81
- package/src/js/packages/com.qcobjects.services.github.ts +173 -148
- package/src/js/packages/com.qcobjects.services.newapp.ts +20 -18
- package/src/js/packages/org.quickcorp.custom.components.ts +5 -7
- package/src/js/packages/org.quickcorp.custom.controllers.ts +115 -111
- package/src/js/packages/org.quickcorp.custom.effects.ts +23 -21
- package/src/js/packages/org.quickcorp.custom.models.ts +12 -11
- package/src/js/packages/org.quickcorp.custom.views.ts +13 -12
|
@@ -3,144 +3,148 @@
|
|
|
3
3
|
/* eslint-disable no-unused-vars */
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
-
import { Package, Controller, logger, _DOMCreateElement, set,
|
|
7
|
-
type Effect, New, ClassFactory, type IQCObjectsElement,
|
|
6
|
+
import { Package, Controller, logger, _DOMCreateElement, set,
|
|
7
|
+
type Effect, New, ClassFactory, type IQCObjectsElement,
|
|
8
8
|
type IQCObjectsShadowedElement, type Component, type TControllerParams } from "qcobjects";
|
|
9
9
|
import { Fade } from "qcobjects-sdk";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
11
|
+
export class MainController extends Controller {
|
|
12
|
+
static loaded: boolean;
|
|
13
|
+
constructor(controller:TControllerParams) {
|
|
14
|
+
logger.debug("Initializing MainController...");
|
|
15
|
+
super(controller);
|
|
16
|
+
}
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
done(...args: never[]) {
|
|
19
|
+
const _ret_ = super.done();
|
|
20
|
+
if (!MainController.loaded) {
|
|
21
|
+
const s = _DOMCreateElement("style");
|
|
22
|
+
s.innerHTML = `
|
|
24
23
|
@import url(css/body-layout.css);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
return _ret_;
|
|
24
|
+
`;
|
|
25
|
+
document.body.append(s);
|
|
26
|
+
logger.debug("MainController loaded");
|
|
27
|
+
MainController.loaded = true;
|
|
31
28
|
}
|
|
32
|
-
|
|
29
|
+
return _ret_;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
export class SideNavController extends Controller {
|
|
34
|
+
effect: Effect | null;
|
|
35
|
+
visibility!: boolean;
|
|
36
|
+
componentRoot!: any;
|
|
37
|
+
component: Component;
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
set("sideNavController", this);
|
|
50
|
-
this.effect = new Fade({
|
|
51
|
-
duration: 300
|
|
52
|
-
});
|
|
39
|
+
constructor(controller:TControllerParams) {
|
|
40
|
+
logger.debug("Initializing SideNavController...");
|
|
41
|
+
super(controller);
|
|
42
|
+
this.component = controller.component as unknown as Component;
|
|
43
|
+
if (this.component.shadowed) {
|
|
44
|
+
this.componentRoot = this.component.shadowRoot;
|
|
45
|
+
} else {
|
|
46
|
+
this.componentRoot = this.component.body;
|
|
53
47
|
}
|
|
48
|
+
set("sideNavController", this);
|
|
49
|
+
this.effect = new Fade({
|
|
50
|
+
duration: 300
|
|
51
|
+
});
|
|
52
|
+
}
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
done(...args: any[]) {
|
|
55
|
+
const _ret_ = super.done();
|
|
56
|
+
this.bindControls();
|
|
57
|
+
this.close();
|
|
58
|
+
return _ret_;
|
|
59
|
+
}
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
61
|
+
bindControls() {
|
|
62
|
+
if (this.componentRoot) {
|
|
63
|
+
const navLinks = (this.componentRoot as IQCObjectsElement)?.subelements("a[href]");
|
|
64
|
+
navLinks?.map((link: HTMLElement) => {
|
|
65
|
+
link.addEventListener("click", () => this.close());
|
|
66
|
+
return link;
|
|
67
|
+
});
|
|
70
68
|
}
|
|
69
|
+
}
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
71
|
+
open() {
|
|
72
|
+
if (this.componentRoot !== null) {
|
|
73
|
+
if (this.effect != null) {
|
|
74
|
+
this.effect.apply(this.componentRoot, 0, 1);
|
|
75
|
+
}
|
|
76
|
+
this.componentRoot?.classList.add("open");
|
|
77
|
+
// eslint-disable-next-line no-extra-boolean-cast
|
|
78
|
+
if (!!this.componentRoot?.parentElement) {
|
|
79
|
+
if (this.componentRoot.parentElement !== null) {
|
|
80
|
+
(this.componentRoot.parentElement as IQCObjectsElement).subelements(".navbtn")[0].style.display = "none";
|
|
81
|
+
(this.componentRoot.parentElement as IQCObjectsElement).subelements(".closebtn")[0].style.display = "block";
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
|
-
this.visibility = true;
|
|
87
|
-
return this.visibility;
|
|
88
84
|
}
|
|
85
|
+
this.visibility = true;
|
|
86
|
+
return this.visibility;
|
|
87
|
+
}
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
89
|
+
close() {
|
|
90
|
+
if (typeof this.componentRoot !== "undefined" && this.componentRoot !== null) {
|
|
91
|
+
if (this.effect != null) {
|
|
92
|
+
this.effect.apply(this.componentRoot, 1, 0);
|
|
93
|
+
}
|
|
94
|
+
this.componentRoot?.classList.remove("open");
|
|
95
|
+
// eslint-disable-next-line no-extra-boolean-cast
|
|
96
|
+
if (!!this.componentRoot?.parentElement) {
|
|
97
|
+
(this.componentRoot.parentElement as IQCObjectsElement).subelements(".navbtn")[0].style.display = "block";
|
|
98
|
+
(this.componentRoot.parentElement as IQCObjectsElement).subelements(".closebtn")[0].style.display = "none";
|
|
101
99
|
}
|
|
102
|
-
this.visibility = false;
|
|
103
|
-
return this.visibility;
|
|
104
100
|
}
|
|
101
|
+
this.visibility = false;
|
|
102
|
+
return this.visibility;
|
|
103
|
+
}
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
105
|
+
toggle() {
|
|
106
|
+
if (this.visibility) {
|
|
107
|
+
this.close();
|
|
108
|
+
} else {
|
|
109
|
+
this.open();
|
|
112
110
|
}
|
|
113
|
-
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
114
113
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
export class HeaderController extends Controller {
|
|
115
|
+
installer: any;
|
|
116
|
+
component!: Component;
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
constructor(controller: TControllerParams) {
|
|
119
|
+
super(controller);
|
|
120
|
+
logger.debug("Header controller initialized");
|
|
121
|
+
}
|
|
123
122
|
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
loadInstallerButton() {
|
|
124
|
+
const componentRoot = this.component.shadowed
|
|
126
125
|
? (this.component.shadowRoot as IQCObjectsShadowedElement)
|
|
127
126
|
: (this.component.body as IQCObjectsElement);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
componentRoot.subelements("#installerbutton").map(
|
|
133
|
-
(element) => {
|
|
134
|
-
this.installer = New(ClassFactory("Installer"), element);
|
|
135
|
-
return element;
|
|
136
|
-
}
|
|
137
|
-
);
|
|
127
|
+
if (typeof componentRoot === "undefined" || componentRoot === null) {
|
|
128
|
+
logger.debug("HeaderController has no component root yet, skipping installer button");
|
|
129
|
+
return;
|
|
138
130
|
}
|
|
131
|
+
componentRoot.subelements("#installerbutton").map(
|
|
132
|
+
(element) => {
|
|
133
|
+
this.installer = New(ClassFactory("Installer"), element);
|
|
134
|
+
return element;
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
139
138
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
139
|
+
done(...args: never[]) {
|
|
140
|
+
const _ret_ = super.done();
|
|
141
|
+
this.loadInstallerButton();
|
|
142
|
+
return _ret_;
|
|
145
143
|
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
Package("org.quickcorp.custom.controllers", [
|
|
147
|
+
MainController,
|
|
148
|
+
SideNavController,
|
|
149
|
+
HeaderController
|
|
146
150
|
]);
|
|
@@ -2,31 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
import { Package, TransitionEffect } from "qcobjects";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export class MainTransitionEffect extends TransitionEffect {
|
|
6
|
+
duration = 780;
|
|
7
|
+
defaultParams: /* partial by design; base class supplies the rest */ any = {
|
|
8
|
+
alphaFrom: 0,
|
|
9
|
+
alphaTo: 1
|
|
10
|
+
};
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
alphaFrom: 0,
|
|
11
|
-
alphaTo: 1
|
|
12
|
-
};
|
|
12
|
+
effects = ["Fade", "MoveYInFromBottom"];
|
|
13
|
+
fitToHeight = true;
|
|
14
|
+
}
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
16
|
+
export class SlideLeftTransitionEffect extends TransitionEffect {
|
|
17
|
+
duration = 450;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
effects = ["Fade", "MoveXInFromLeft"];
|
|
20
|
+
fitToWidth = true;
|
|
21
|
+
}
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
23
|
+
export class SlideRightTransitionEffect extends TransitionEffect {
|
|
24
|
+
duration = 450;
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
effects = ["Fade", "MoveXInFromRight"];
|
|
27
|
+
fitToWidth = true;
|
|
28
|
+
}
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
Package("org.quickcorp.custom.effects", [
|
|
31
|
+
MainTransitionEffect,
|
|
32
|
+
SlideLeftTransitionEffect,
|
|
33
|
+
SlideRightTransitionEffect
|
|
32
34
|
]);
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import { Package, VO } from "qcobjects";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export class ContactVO extends VO {
|
|
6
|
+
first_name = "";
|
|
7
|
+
last_name = "";
|
|
8
|
+
address = "";
|
|
9
|
+
postalCode = "";
|
|
10
|
+
city = "";
|
|
11
|
+
country = "";
|
|
12
|
+
email = "";
|
|
13
|
+
phone = "";
|
|
14
|
+
}
|
|
6
15
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
last_name = "";
|
|
10
|
-
address = "";
|
|
11
|
-
postalCode = "";
|
|
12
|
-
city = "";
|
|
13
|
-
country = "";
|
|
14
|
-
email = "";
|
|
15
|
-
phone = "";
|
|
16
|
-
}
|
|
16
|
+
Package("org.quickcorp.custom.models", [
|
|
17
|
+
ContactVO
|
|
17
18
|
]);
|
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import { Package, type IQCObjectsElement, View } from "qcobjects";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(component.body as IQCObjectsElement).style.width = "100px";
|
|
14
|
-
(component.body as IQCObjectsElement).style.height = "100px";
|
|
15
|
-
}
|
|
16
|
-
return _ret_;
|
|
5
|
+
export class CardView extends View {
|
|
6
|
+
done (...args: never[]) {
|
|
7
|
+
const _ret_ = super.done(args);
|
|
8
|
+
const component = this.component;
|
|
9
|
+
if (component !== undefined && component.body !== undefined) {
|
|
10
|
+
(component.body as IQCObjectsElement).style.display = "block";
|
|
11
|
+
(component.body as IQCObjectsElement).style.width = "100px";
|
|
12
|
+
(component.body as IQCObjectsElement).style.height = "100px";
|
|
17
13
|
}
|
|
14
|
+
return _ret_;
|
|
18
15
|
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
Package("org.quickcorp.custom.views", [
|
|
19
|
+
CardView
|
|
19
20
|
]);
|