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.
Files changed (30) hide show
  1. package/VERSION +1 -1
  2. package/package.json +1 -1
  3. package/public/js/init.js +20 -20
  4. package/public/js/init.js.map +3 -3
  5. package/public/js/packages/com.qcobjects.installer.js +15 -15
  6. package/public/js/packages/com.qcobjects.installer.js.map +3 -3
  7. package/public/js/packages/com.qcobjects.services.github.js +4 -4
  8. package/public/js/packages/com.qcobjects.services.github.js.map +3 -3
  9. package/public/js/packages/com.qcobjects.services.newapp.js +4 -4
  10. package/public/js/packages/com.qcobjects.services.newapp.js.map +3 -3
  11. package/public/js/packages/org.quickcorp.custom.components.js +8 -8
  12. package/public/js/packages/org.quickcorp.custom.components.js.map +2 -2
  13. package/public/js/packages/org.quickcorp.custom.controllers.js +16 -16
  14. package/public/js/packages/org.quickcorp.custom.controllers.js.map +3 -3
  15. package/public/js/packages/org.quickcorp.custom.effects.js +4 -4
  16. package/public/js/packages/org.quickcorp.custom.effects.js.map +3 -3
  17. package/public/js/packages/org.quickcorp.custom.js +20 -20
  18. package/public/js/packages/org.quickcorp.custom.js.map +3 -3
  19. package/public/js/packages/org.quickcorp.custom.models.js +4 -4
  20. package/public/js/packages/org.quickcorp.custom.models.js.map +3 -3
  21. package/public/js/packages/org.quickcorp.custom.views.js +4 -4
  22. package/public/js/packages/org.quickcorp.custom.views.js.map +3 -3
  23. package/src/js/packages/com.qcobjects.installer.ts +83 -81
  24. package/src/js/packages/com.qcobjects.services.github.ts +173 -148
  25. package/src/js/packages/com.qcobjects.services.newapp.ts +20 -18
  26. package/src/js/packages/org.quickcorp.custom.components.ts +5 -7
  27. package/src/js/packages/org.quickcorp.custom.controllers.ts +115 -111
  28. package/src/js/packages/org.quickcorp.custom.effects.ts +23 -21
  29. package/src/js/packages/org.quickcorp.custom.models.ts +12 -11
  30. 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
- Package("org.quickcorp.custom.controllers", [
12
- class MainController extends Controller {
13
- static loaded: boolean;
14
- constructor(controller:TControllerParams) {
15
- logger.debug("Initializing MainController...");
16
- super(controller);
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
- done(...args: never[]) {
20
- const _ret_ = super.done();
21
- if (!MainController.loaded) {
22
- const s = _DOMCreateElement("style");
23
- s.innerHTML = `
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
- document.body.append(s);
27
- logger.debug("MainController loaded");
28
- MainController.loaded = true;
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
- class SideNavController extends Controller {
35
- effect: Effect | null;
36
- visibility!: boolean;
37
- componentRoot!: any;
38
- component: Component;
33
+ export class SideNavController extends Controller {
34
+ effect: Effect | null;
35
+ visibility!: boolean;
36
+ componentRoot!: any;
37
+ component: Component;
39
38
 
40
- constructor(controller:TControllerParams) {
41
- logger.debug("Initializing SideNavController...");
42
- super(controller);
43
- this.component = controller.component as unknown as Component;
44
- if (this.component.shadowed) {
45
- this.componentRoot = this.component.shadowRoot;
46
- } else {
47
- this.componentRoot = this.component.body;
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
- done(...args: any[]) {
56
- const _ret_ = super.done();
57
- this.bindControls();
58
- this.close();
59
- return _ret_;
60
- }
54
+ done(...args: any[]) {
55
+ const _ret_ = super.done();
56
+ this.bindControls();
57
+ this.close();
58
+ return _ret_;
59
+ }
61
60
 
62
- bindControls() {
63
- if (this.componentRoot) {
64
- const navLinks = (this.componentRoot as IQCObjectsElement)?.subelements("a[href]");
65
- navLinks?.map((link: HTMLElement) => {
66
- link.addEventListener("click", () => this.close());
67
- return link;
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
- open() {
73
- if (this.componentRoot !== null) {
74
- if (this.effect != null) {
75
- this.effect.apply(this.componentRoot, 0, 1);
76
- }
77
- this.componentRoot?.classList.add("open");
78
- // eslint-disable-next-line no-extra-boolean-cast
79
- if (!!this.componentRoot?.parentElement) {
80
- if (this.componentRoot.parentElement !== null) {
81
- (this.componentRoot.parentElement as IQCObjectsElement).subelements(".navbtn")[0].style.display = "none";
82
- (this.componentRoot.parentElement as IQCObjectsElement).subelements(".closebtn")[0].style.display = "block";
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
- close() {
91
- if (typeof this.componentRoot !== "undefined" && this.componentRoot !== null) {
92
- if (this.effect != null) {
93
- this.effect.apply(this.componentRoot, 1, 0);
94
- }
95
- this.componentRoot?.classList.remove("open");
96
- // eslint-disable-next-line no-extra-boolean-cast
97
- if (!!this.componentRoot?.parentElement) {
98
- (this.componentRoot.parentElement as IQCObjectsElement).subelements(".navbtn")[0].style.display = "block";
99
- (this.componentRoot.parentElement as IQCObjectsElement).subelements(".closebtn")[0].style.display = "none";
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
- toggle() {
107
- if (this.visibility) {
108
- this.close();
109
- } else {
110
- this.open();
111
- }
105
+ toggle() {
106
+ if (this.visibility) {
107
+ this.close();
108
+ } else {
109
+ this.open();
112
110
  }
113
- },
111
+ }
112
+ }
114
113
 
115
- class HeaderController extends Controller {
116
- installer: any;
117
- component!: Component;
114
+ export class HeaderController extends Controller {
115
+ installer: any;
116
+ component!: Component;
118
117
 
119
- constructor(controller: TControllerParams) {
120
- super(controller);
121
- logger.debug("Header controller initialized");
122
- }
118
+ constructor(controller: TControllerParams) {
119
+ super(controller);
120
+ logger.debug("Header controller initialized");
121
+ }
123
122
 
124
- loadInstallerButton() {
125
- const componentRoot = this.component.shadowed
123
+ loadInstallerButton() {
124
+ const componentRoot = this.component.shadowed
126
125
  ? (this.component.shadowRoot as IQCObjectsShadowedElement)
127
126
  : (this.component.body as IQCObjectsElement);
128
- if (typeof componentRoot === "undefined" || componentRoot === null) {
129
- logger.debug("HeaderController has no component root yet, skipping installer button");
130
- return;
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
- done(...args: never[]) {
141
- const _ret_ = super.done();
142
- this.loadInstallerButton();
143
- return _ret_;
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
- Package("org.quickcorp.custom.effects", [
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
- class MainTransitionEffect extends TransitionEffect {
8
- duration = 780;
9
- defaultParams: /* partial by design; base class supplies the rest */ any = {
10
- alphaFrom: 0,
11
- alphaTo: 1
12
- };
12
+ effects = ["Fade", "MoveYInFromBottom"];
13
+ fitToHeight = true;
14
+ }
13
15
 
14
- effects = ["Fade", "MoveYInFromBottom"];
15
- fitToHeight = true;
16
- },
16
+ export class SlideLeftTransitionEffect extends TransitionEffect {
17
+ duration = 450;
17
18
 
18
- class SlideLeftTransitionEffect extends TransitionEffect {
19
- duration = 450;
19
+ effects = ["Fade", "MoveXInFromLeft"];
20
+ fitToWidth = true;
21
+ }
20
22
 
21
- effects = ["Fade", "MoveXInFromLeft"];
22
- fitToWidth = true;
23
- },
23
+ export class SlideRightTransitionEffect extends TransitionEffect {
24
+ duration = 450;
24
25
 
25
- class SlideRightTransitionEffect extends TransitionEffect {
26
- duration = 450;
26
+ effects = ["Fade", "MoveXInFromRight"];
27
+ fitToWidth = true;
28
+ }
27
29
 
28
- effects = ["Fade", "MoveXInFromRight"];
29
- fitToWidth = true;
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
- Package("org.quickcorp.custom.models", [
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
- class ContactVO extends VO {
8
- first_name = "";
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
- Package("org.quickcorp.custom.views", [
6
-
7
- class CardView extends View {
8
- done (...args: never[]) {
9
- const _ret_ = super.done(args);
10
- const component = this.component;
11
- if (component !== undefined && component.body !== undefined) {
12
- (component.body as IQCObjectsElement).style.display = "block";
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
  ]);