qcobjectsnewapp 2.4.14 → 2.4.16

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 CHANGED
@@ -1 +1 @@
1
- 2.4.14
1
+ 2.4.16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjectsnewapp",
3
- "version": "2.4.14",
3
+ "version": "2.4.16",
4
4
  "description": "App template for New App in QCObjects",
5
5
  "targets": {
6
6
  "default": {
package/src/js/config.ts CHANGED
@@ -10,7 +10,7 @@ CONFIG.set("componentsBasePath", "templates/components/");
10
10
  CONFIG.set("delayForReady", 1); // delay to wait before executing the first ready event, it includes imports
11
11
  CONFIG.set("preserveComponentBodyTag", false); // don't use <componentBody></componentBody> tag
12
12
  CONFIG.set("useConfigService", false); // Load settings from config.json
13
- CONFIG.set("routingWay", "hash"); // routingWay possible values are 'hash','pathname','search'
13
+ CONFIG.set("routingWay", "pathname"); // routingWay possible values are 'hash','pathname','search'
14
14
  CONFIG.set("useLocalSDK", true); // on the frontend side you can chose whether to load the SDK from sdk.qcobjects.dev or from your local website
15
15
  CONFIG.set("tplextension", "tpl.html"); // this is the file extension to locate the template files (if component.name = 'main' then template name will be main.tpl.html)
16
16
  CONFIG.set("asynchronousImportsLoad", true); // it is recommended to load the Import declarations in an asyncronous way
@@ -32,26 +32,28 @@ Package("org.quickcorp.custom.controllers", [
32
32
  constructor ({ component }: { component: Component }) {
33
33
  logger.debug("Initializing SideNavController...");
34
34
  super({ component });
35
+ this.effect = New(ClassFactory("Fade"), {
36
+ duration: 300
37
+ });
35
38
  (global as any).sideNavController = this;
36
39
  }
37
40
 
38
41
  done (...args: any[]) {
39
- super.done(args);
40
- this.effect = New(ClassFactory("Fade"), {
41
- duration: 300
42
- });
42
+ const _ret_ = super.done(args);
43
43
  this.close();
44
+ return _ret_;
44
45
  }
45
46
 
46
47
  open () {
47
- const componentRoot = (this.component.shadowed != null) ? (this.component.shadowRoot) : (this.component.body);
48
- if (this.effect != null) {
49
- this.effect.apply(componentRoot, 0, 1);
50
- }
51
- if (componentRoot !== undefined) {
48
+ const componentRoot = this.component.body;
49
+ if (typeof componentRoot !== "undefined") {
50
+ if (this.effect != null) {
51
+ this.effect.apply(componentRoot, 0, 1);
52
+ }
52
53
  componentRoot.style.width = "100%";
53
54
  componentRoot.style.overflowX = "visible";
54
- if (Object.hasOwnProperty.call(componentRoot, "parentElement") && typeof componentRoot.parentElement !== "undefined") {
55
+ // eslint-disable-next-line no-extra-boolean-cast
56
+ if (!!componentRoot.parentElement) {
55
57
  const parentElement = componentRoot.parentElement as QCObjectsElement;
56
58
  if (parentElement !== null) {
57
59
  parentElement.subelements(".navbtn")[0].style.display = "none";
@@ -64,14 +66,15 @@ Package("org.quickcorp.custom.controllers", [
64
66
  }
65
67
 
66
68
  close () {
67
- const componentRoot = (this.component.shadowed != null) ? (this.component.shadowRoot) : (this.component.body);
68
- if (this.effect != null) {
69
- this.effect.apply(componentRoot, 1, 0);
70
- }
71
- if (componentRoot !== undefined) {
69
+ const componentRoot = this.component.body;
70
+ if (typeof componentRoot !== "undefined") {
71
+ if (this.effect != null) {
72
+ this.effect.apply(componentRoot, 1, 0);
73
+ }
72
74
  componentRoot.style.width = "0px";
73
75
  componentRoot.style.overflowX = "hidden";
74
- if (Object.hasOwnProperty.call(componentRoot, "parentElement") && typeof componentRoot.parentElement !== "undefined") {
76
+ // eslint-disable-next-line no-extra-boolean-cast
77
+ if (!!componentRoot.parentElement) {
75
78
  const parentElement = componentRoot.parentElement as QCObjectsElement;
76
79
  parentElement.subelements(".navbtn")[0].style.display = "block";
77
80
  parentElement.subelements(".closebtn")[0].style.display = "none";
@@ -13,35 +13,34 @@
13
13
 
14
14
  <header>
15
15
  <quick-component name="header" shadowed="true" controllerClass="HeaderController" effectClass="MainTransitionEffect">
16
- <routing path="#author" name="blank"></routing>
17
- <routing path="#about-of" name="blank"></routing>
18
- <routing path="^#signup$" name="blank"></routing>
19
- <routing path="^#signin$" name="blank"></routing>
20
- <routing path="^#author$" name="blank"></routing>
21
- <routing path="^#page1$" name="blank"></routing>
22
- <routing path="^#page2$" name="blank"></routing>
23
- <routing path="^#page3$" name="header"></routing>
24
- <routing path="^#loading$" name="blank"></routing>
25
- <routing path="^#signupsuccessful$" name="blank"></routing>
26
- <routing path="^#overlay$" name="hero/hero-overlay"></routing>
27
- <routing path="^#two-column-header$" name="hero/hero-two-column-form"></routing>
28
- <routing path="^#$" name="header"></routing>
29
- <routing path="" name="header"></routing>
16
+ <routing path="^#author|/author$" name="blank"></routing>
17
+ <routing path="^#about-of|/about-of$" name="blank"></routing>
18
+ <routing path="^#signup|/signup$" name="blank"></routing>
19
+ <routing path="^#signin|/signin$" name="blank"></routing>
20
+ <routing path="^#page1|/page1$" name="blank"></routing>
21
+ <routing path="^#page2|/page2$" name="blank"></routing>
22
+ <routing path="^#page3|/page3$" name="header"></routing>
23
+ <routing path="^#loading|/loading$" name="blank"></routing>
24
+ <routing path="^#signupsuccessful|/signupsuccessful$" name="blank"></routing>
25
+ <routing path="^#overlay|/overlay$" name="hero/hero-overlay"></routing>
26
+ <routing path="^#two-column-header|/two-column-header$" name="hero/hero-two-column-form"></routing>
27
+ <routing path="^#|/$" name="header"></routing>
28
+ <routing path="^$" name="header"></routing>
30
29
  </quick-component>
31
30
  </header>
32
31
  <aside>
33
32
  <nav>
34
33
  <span class="topnav">
35
34
  <quick-component name="topmenu">
36
- <routing path="#author" name="blank"></routing>
37
- <routing path="#about-of" name="blank"></routing>
38
- <routing path="#page1" name="blank"></routing>
39
- <routing path="#page2" name="blank"></routing>
40
- <routing path="#page3" name="blank"></routing>
41
- <routing path="#signup" name="blank"></routing>
42
- <routing path="#signin" name="blank"></routing>
43
- <routing path="#" name="topmenu"></routing>
44
- <routing path="" name="topmenu"></routing>
35
+ <routing path="^#author|/author$" name="blank"></routing>
36
+ <routing path="^#about-of|/about-of$" name="blank"></routing>
37
+ <routing path="^#page1|/page1$" name="blank"></routing>
38
+ <routing path="^#page2|/page2$" name="blank"></routing>
39
+ <routing path="^#page3|/page3$" name="blank"></routing>
40
+ <routing path="^#signup|/signup$" name="blank"></routing>
41
+ <routing path="^#signin|/signin$" name="blank"></routing>
42
+ <routing path="^#|/$" name="topmenu"></routing>
43
+ <routing path="^$" name="topmenu"></routing>
45
44
  </quick-component>
46
45
  </span>
47
46
  <button aria-label="nav button" role="button" tabindex="-1" class="navbtn" onclick="global.sideNavController.toggle()"></button>
@@ -51,32 +50,31 @@
51
50
  <main role="main">
52
51
  <section>
53
52
  <quick-component name="contentblock" effectClass="MainTransitionEffect">
54
- <routing path="#author" name="pages/author"></routing>
55
- <routing path="#about-of" name="pages/about-of"></routing>
56
- <routing path="#page1" name="pages/page1"></routing>
57
- <routing path="#page2" name="pages/page2"></routing>
58
- <routing path="#page3" name="pages/page3"></routing>
59
- <routing path="^#signup$" name="signup" ></routing>
60
- <routing path="^#coursedetail$" name="coursedetail"></routing>
61
- <routing path="^#loading$" name="loading"></routing>
62
- <routing path="^#signupsuccessful$" name="signupsuccessful"></routing>
63
- <routing path="#signin" name="login2"></routing>
64
- <routing path="#" name="contentblock"></routing>
65
- <routing path="" name="contentblock"></routing>
53
+ <routing path="^#author|/author$" name="pages/author"></routing>
54
+ <routing path="^#about-of|/about-of$" name="pages/about-of"></routing>
55
+ <routing path="^#page1|/page1$" name="pages/page1"></routing>
56
+ <routing path="^#page2|/page2$" name="pages/page2"></routing>
57
+ <routing path="^#page3|/page3$" name="pages/page3"></routing>
58
+ <routing path="^#signup|/signup$" name="signup" ></routing>
59
+ <routing path="^#loading|/loading$" name="loading"></routing>
60
+ <routing path="^#signupsuccessful|/signupsuccessful$" name="signupsuccessful"></routing>
61
+ <routing path="^#signin|/signin$" name="login2"></routing>
62
+ <routing path="^#|/$" name="contentblock"></routing>
63
+ <routing path="^$" name="contentblock"></routing>
66
64
  </quick-component>
67
65
  </section>
68
66
  </main>
69
67
  <footer>
70
68
  <quick-component name="footer" shadowed="true" effectClass="MainTransitionEffect">
71
- <routing path="#author" name="blank"></routing>
72
- <routing path="#about-of" name="blank"></routing>
73
- <routing path="^#signup$" name="signupbuttons"></routing>
74
- <routing path="^#loading$" name="loadingfooter"></routing>
75
- <routing path="^#signupsuccessful$" name="signupsuccessfulfooter"></routing>
76
- <routing path="#page1" name="blank"></routing>
77
- <routing path="#page2" name="blank"></routing>
78
- <routing path="#page3" name="blank"></routing>
79
- <routing path="#" name="footer"></routing>
80
- <routing path="" name="footer"></routing>
69
+ <routing path="^#author|/author$" name="blank"></routing>
70
+ <routing path="^#about-of|/about-of$" name="blank"></routing>
71
+ <routing path="^#signup|/signup$" name="signupbuttons"></routing>
72
+ <routing path="^#loading|/loading$" name="loadingfooter"></routing>
73
+ <routing path="^#signupsuccessful|/signupsuccessful$" name="signupsuccessfulfooter"></routing>
74
+ <routing path="^#page1|/page1$" name="blank"></routing>
75
+ <routing path="^#page2|/page2$" name="blank"></routing>
76
+ <routing path="^#page3|/page3$" name="blank"></routing>
77
+ <routing path="^#|/$" name="footer"></routing>
78
+ <routing path="^$" name="footer"></routing>
81
79
  </quick-component>
82
80
  </footer>
@@ -3,21 +3,21 @@
3
3
  <details>
4
4
  <summary>Main</summary>
5
5
  <ul>
6
- <li><a onclick="global.sideNavController.close()" href="/#">Main</a></li>
6
+ <li><a onclick="global.sideNavController.close()" href="/">Main</a></li>
7
7
  </ul>
8
8
  </details>
9
9
  <details>
10
10
  <summary>Register</summary>
11
11
  <ul>
12
- <li><a onclick="global.sideNavController.close();return true;" href="/#signup">Create an account</a></li>
13
- <li><a onclick="global.sideNavController.close();return true;" href="/#signin">Sign In</a></li>
12
+ <li><a onclick="global.sideNavController.close();return true;" href="/signup">Create an account</a></li>
13
+ <li><a onclick="global.sideNavController.close();return true;" href="/signin">Sign In</a></li>
14
14
  </ul>
15
15
  </details>
16
16
  <details>
17
17
  <summary>Other</summary>
18
18
  <ul>
19
- <li><a onclick="global.sideNavController.close()" href="/#author">Author</a></li>
20
- <li><a onclick="global.sideNavController.close()" href="/#about-of">About QCObjects</a></li>
19
+ <li><a onclick="global.sideNavController.close()" href="/author">Author</a></li>
20
+ <li><a onclick="global.sideNavController.close()" href="/about-of">About QCObjects</a></li>
21
21
  </ul>
22
22
  </details>
23
23
  </div>
@@ -1,12 +1,12 @@
1
1
  <main role= “main”>
2
2
  <section>
3
3
  <quick-component name="contentblock">
4
- <routing path="#signup" name="signup"></routing>
4
+ <routing path="/signup" name="signup"></routing>
5
5
  </quick-component>
6
6
  </section>
7
7
  </main>
8
8
  <footer>
9
9
  <quick-component name="footer">
10
- <routing path="#signup" name="signupbuttons"></routing>
10
+ <routing path="/signup" name="signupbuttons"></routing>
11
11
  </quick-component>
12
12
  </footer>
@@ -1,3 +1,3 @@
1
1
  <div class="clearfix">
2
- <button aria-label="Home" onclick="location.href='/#'" role="button" tabindex="-1" type="button" class="cancelbtn"><p>&#x1F448; Back to Home</p></button>
2
+ <button aria-label="Home" onclick="location.href='/'" role="button" tabindex="-1" type="button" class="cancelbtn"><p>&#x1F448; Back to Home</p></button>
3
3
  </div>
@@ -1,7 +1,7 @@
1
- <a href="#" class="topmenu active">Home</a>
1
+ <a href="/" class="topmenu active">Home</a>
2
2
  <a href="https://qcobjects.com" class="topmenu">QCObjects</a>
3
- <a href="#signup" class="topmenu">Contact</a>
4
- <a href="#signup" class="topmenu createaccountlink2">Register</a>
3
+ <a href="/signup" class="topmenu">Contact</a>
4
+ <a href="/signup" class="topmenu createaccountlink2">Register</a>
5
5
  <div class="login-container">
6
6
  <quick-component name="loginform"></quick-component>
7
7
  </div>