Add documentation

This commit is contained in:
kevinpauer
2022-05-03 10:59:36 +02:00
parent cf6f1714b4
commit 6f8f0679bd
118 changed files with 27113 additions and 1325 deletions

View File

@@ -0,0 +1,14 @@
var compodoc = {
EVENTS: {
READY: 'compodoc.ready',
SEARCH_READY: 'compodoc.search.ready'
}
};
Object.assign( compodoc, EventDispatcher.prototype );
document.addEventListener('DOMContentLoaded', function() {
compodoc.dispatchEvent({
type: compodoc.EVENTS.READY
});
});

View File

@@ -0,0 +1,44 @@
document.addEventListener('DOMContentLoaded', function() {
var lazyGraphs = [].slice.call(document.querySelectorAll('[lazy]'));
var active = false;
var lazyLoad = function() {
if (active === false) {
active = true;
setTimeout(function() {
lazyGraphs.forEach(function(lazyGraph) {
if (
lazyGraph.getBoundingClientRect().top <= window.innerHeight &&
lazyGraph.getBoundingClientRect().bottom >= 0 &&
getComputedStyle(lazyGraph).display !== 'none'
) {
lazyGraph.data = lazyGraph.getAttribute('lazy');
lazyGraph.removeAttribute('lazy');
lazyGraphs = lazyGraphs.filter(function(image) { return image !== lazyGraph});
if (lazyGraphs.length === 0) {
document.removeEventListener('scroll', lazyLoad);
window.removeEventListener('resize', lazyLoad);
window.removeEventListener('orientationchange', lazyLoad);
}
}
});
active = false;
}, 200);
}
};
// initial load
lazyLoad();
var container = document.querySelector('.container-fluid.modules');
if (container) {
container.addEventListener('scroll', lazyLoad);
window.addEventListener('resize', lazyLoad);
window.addEventListener('orientationchange', lazyLoad);
}
});

View File

@@ -0,0 +1,5 @@
/**
* @author mrdoob / http://mrdoob.com/
*/
var EventDispatcher=function(){};Object.assign(EventDispatcher.prototype,{addEventListener:function(i,t){void 0===this._listeners&&(this._listeners={});var e=this._listeners;void 0===e[i]&&(e[i]=[]),-1===e[i].indexOf(t)&&e[i].push(t)},hasEventListener:function(i,t){if(void 0===this._listeners)return!1;var e=this._listeners;return void 0!==e[i]&&-1!==e[i].indexOf(t)},removeEventListener:function(i,t){if(void 0!==this._listeners){var e=this._listeners[i];if(void 0!==e){var s=e.indexOf(t);-1!==s&&e.splice(s,1)}}},dispatchEvent:function(i){if(void 0!==this._listeners){var t=this._listeners[i.type];if(void 0!==t){i.target=this;var e=[],s=0,n=t.length;for(s=0;s<n;s++)e[s]=t[s];for(s=0;s<n;s++)e[s].call(this,i)}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
/**
@license @nocompile
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
(function () {
'use strict';
(function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.hasOwnProperty('polyfillWrapFlushCallback'))return;const a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)},HTMLElement.prototype=a.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,a);})();
}());

View File

@@ -0,0 +1,38 @@
(function(){
'use strict';var h=new function(){};var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function m(b){var a=aa.has(b);b=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(b);return!a&&b}function n(b){var a=b.isConnected;if(void 0!==a)return a;for(;b&&!(b.__CE_isImportDocument||b instanceof Document);)b=b.parentNode||(window.ShadowRoot&&b instanceof ShadowRoot?b.host:void 0);return!(!b||!(b.__CE_isImportDocument||b instanceof Document))}
function p(b,a){for(;a&&a!==b&&!a.nextSibling;)a=a.parentNode;return a&&a!==b?a.nextSibling:null}
function t(b,a,c){c=c?c:new Set;for(var d=b;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;a(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)t(d,a,c);d=p(b,e);continue}else if("template"===f){d=p(b,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)t(e,a,c)}d=d.firstChild?d.firstChild:p(b,d)}}function u(b,a,c){b[a]=c};function v(){this.a=new Map;this.s=new Map;this.f=[];this.b=!1}function ba(b,a,c){b.a.set(a,c);b.s.set(c.constructor,c)}function w(b,a){b.b=!0;b.f.push(a)}function x(b,a){b.b&&t(a,function(a){return y(b,a)})}function y(b,a){if(b.b&&!a.__CE_patched){a.__CE_patched=!0;for(var c=0;c<b.f.length;c++)b.f[c](a)}}function z(b,a){var c=[];t(a,function(b){return c.push(b)});for(a=0;a<c.length;a++){var d=c[a];1===d.__CE_state?b.connectedCallback(d):A(b,d)}}
function B(b,a){var c=[];t(a,function(b){return c.push(b)});for(a=0;a<c.length;a++){var d=c[a];1===d.__CE_state&&b.disconnectedCallback(d)}}
function C(b,a,c){c=c?c:{};var d=c.w||new Set,e=c.i||function(a){return A(b,a)},f=[];t(a,function(a){if("link"===a.localName&&"import"===a.getAttribute("rel")){var c=a.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:a.addEventListener("load",function(){var c=a.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);C(b,c,{w:f,i:e})}})}else f.push(a)},d);if(b.b)for(a=0;a<
f.length;a++)y(b,f[a]);for(a=0;a<f.length;a++)e(f[a])}
function A(b,a){if(void 0===a.__CE_state){var c=a.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=b.a.get(a.localName)){c.constructionStack.push(a);var d=c.constructor;try{try{if(new d!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(r){throw a.__CE_state=2,r;}a.__CE_state=1;a.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d],
f=a.getAttribute(e);null!==f&&b.attributeChangedCallback(a,e,null,f,null)}n(a)&&b.connectedCallback(a)}}}v.prototype.connectedCallback=function(b){var a=b.__CE_definition;a.connectedCallback&&a.connectedCallback.call(b)};v.prototype.disconnectedCallback=function(b){var a=b.__CE_definition;a.disconnectedCallback&&a.disconnectedCallback.call(b)};
v.prototype.attributeChangedCallback=function(b,a,c,d,e){var f=b.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(a)&&f.attributeChangedCallback.call(b,a,c,d,e)};function D(b,a){this.c=b;this.a=a;this.b=void 0;C(this.c,this.a);"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function E(b){b.b&&b.b.disconnect()}D.prototype.f=function(b){var a=this.a.readyState;"interactive"!==a&&"complete"!==a||E(this);for(a=0;a<b.length;a++)for(var c=b[a].addedNodes,d=0;d<c.length;d++)C(this.c,c[d])};function ca(){var b=this;this.b=this.a=void 0;this.f=new Promise(function(a){b.b=a;b.a&&a(b.a)})}function F(b){if(b.a)throw Error("Already resolved.");b.a=void 0;b.b&&b.b(void 0)};function G(b){this.j=!1;this.c=b;this.o=new Map;this.l=function(b){return b()};this.g=!1;this.m=[];this.u=new D(b,document)}
G.prototype.define=function(b,a){var c=this;if(!(a instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!m(b))throw new SyntaxError("The element name '"+b+"' is not valid.");if(this.c.a.get(b))throw Error("A custom element with name '"+b+"' has already been defined.");if(this.j)throw Error("A custom element is already being defined.");this.j=!0;var d,e,f,r,k;try{var g=function(b){var a=l[b];if(void 0!==a&&!(a instanceof Function))throw Error("The '"+b+"' callback must be a function.");
return a},l=a.prototype;if(!(l instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");d=g("connectedCallback");e=g("disconnectedCallback");f=g("adoptedCallback");r=g("attributeChangedCallback");k=a.observedAttributes||[]}catch(q){return}finally{this.j=!1}a={localName:b,constructor:a,connectedCallback:d,disconnectedCallback:e,adoptedCallback:f,attributeChangedCallback:r,observedAttributes:k,constructionStack:[]};ba(this.c,b,a);this.m.push(a);this.g||
(this.g=!0,this.l(function(){return da(c)}))};G.prototype.i=function(b){C(this.c,b)};function da(b){if(!1!==b.g){b.g=!1;for(var a=b.m,c=[],d=new Map,e=0;e<a.length;e++)d.set(a[e].localName,[]);C(b.c,document,{i:function(a){if(void 0===a.__CE_state){var e=a.localName,f=d.get(e);f?f.push(a):b.c.a.get(e)&&c.push(a)}}});for(e=0;e<c.length;e++)A(b.c,c[e]);for(;0<a.length;){for(var f=a.shift(),e=f.localName,f=d.get(f.localName),r=0;r<f.length;r++)A(b.c,f[r]);(e=b.o.get(e))&&F(e)}}}
G.prototype.get=function(b){if(b=this.c.a.get(b))return b.constructor};G.prototype.whenDefined=function(b){if(!m(b))return Promise.reject(new SyntaxError("'"+b+"' is not a valid custom element name."));var a=this.o.get(b);if(a)return a.f;a=new ca;this.o.set(b,a);this.c.a.get(b)&&!this.m.some(function(a){return a.localName===b})&&F(a);return a.f};G.prototype.v=function(b){E(this.u);var a=this.l;this.l=function(c){return b(function(){return a(c)})}};window.CustomElementRegistry=G;
G.prototype.define=G.prototype.define;G.prototype.upgrade=G.prototype.i;G.prototype.get=G.prototype.get;G.prototype.whenDefined=G.prototype.whenDefined;G.prototype.polyfillWrapFlushCallback=G.prototype.v;var H=window.Document.prototype.createElement,I=window.Document.prototype.createElementNS,ea=window.Document.prototype.importNode,fa=window.Document.prototype.prepend,ga=window.Document.prototype.append,ha=window.DocumentFragment.prototype.prepend,ia=window.DocumentFragment.prototype.append,J=window.Node.prototype.cloneNode,K=window.Node.prototype.appendChild,L=window.Node.prototype.insertBefore,M=window.Node.prototype.removeChild,N=window.Node.prototype.replaceChild,O=Object.getOwnPropertyDescriptor(window.Node.prototype,
"textContent"),P=window.Element.prototype.attachShadow,Q=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),R=window.Element.prototype.getAttribute,S=window.Element.prototype.setAttribute,T=window.Element.prototype.removeAttribute,U=window.Element.prototype.getAttributeNS,ja=window.Element.prototype.setAttributeNS,ka=window.Element.prototype.removeAttributeNS,la=window.Element.prototype.insertAdjacentElement,ma=window.Element.prototype.insertAdjacentHTML,na=window.Element.prototype.prepend,
oa=window.Element.prototype.append,V=window.Element.prototype.before,pa=window.Element.prototype.after,qa=window.Element.prototype.replaceWith,ra=window.Element.prototype.remove,sa=window.HTMLElement,W=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),ta=window.HTMLElement.prototype.insertAdjacentElement,ua=window.HTMLElement.prototype.insertAdjacentHTML;function va(){var b=X;window.HTMLElement=function(){function a(){var a=this.constructor,d=b.s.get(a);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(!e.length)return e=H.call(document,d.localName),Object.setPrototypeOf(e,a.prototype),e.__CE_state=1,e.__CE_definition=d,y(b,e),e;var d=e.length-1,f=e[d];if(f===h)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
e[d]=h;Object.setPrototypeOf(f,a.prototype);y(b,f);return f}a.prototype=sa.prototype;return a}()};function Y(b,a,c){function d(a){return function(c){for(var e=[],d=0;d<arguments.length;++d)e[d-0]=arguments[d];for(var d=[],f=[],l=0;l<e.length;l++){var q=e[l];q instanceof Element&&n(q)&&f.push(q);if(q instanceof DocumentFragment)for(q=q.firstChild;q;q=q.nextSibling)d.push(q);else d.push(q)}a.apply(this,e);for(e=0;e<f.length;e++)B(b,f[e]);if(n(this))for(e=0;e<d.length;e++)f=d[e],f instanceof Element&&z(b,f)}}c.h&&(a.prepend=d(c.h));c.append&&(a.append=d(c.append))};function wa(){var b=X;u(Document.prototype,"createElement",function(a){if(this.__CE_hasRegistry){var c=b.a.get(a);if(c)return new c.constructor}a=H.call(this,a);y(b,a);return a});u(Document.prototype,"importNode",function(a,c){a=ea.call(this,a,c);this.__CE_hasRegistry?C(b,a):x(b,a);return a});u(Document.prototype,"createElementNS",function(a,c){if(this.__CE_hasRegistry&&(null===a||"http://www.w3.org/1999/xhtml"===a)){var d=b.a.get(c);if(d)return new d.constructor}a=I.call(this,a,c);y(b,a);return a});
Y(b,Document.prototype,{h:fa,append:ga})};function xa(){var b=X;function a(a,d){Object.defineProperty(a,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(a){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,a);else{var e=void 0;if(this.firstChild){var c=this.childNodes,k=c.length;if(0<k&&n(this))for(var e=Array(k),g=0;g<k;g++)e[g]=c[g]}d.set.call(this,a);if(e)for(a=0;a<e.length;a++)B(b,e[a])}}})}u(Node.prototype,"insertBefore",function(a,d){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);
a=L.call(this,a,d);if(n(this))for(d=0;d<e.length;d++)z(b,e[d]);return a}e=n(a);d=L.call(this,a,d);e&&B(b,a);n(this)&&z(b,a);return d});u(Node.prototype,"appendChild",function(a){if(a instanceof DocumentFragment){var c=Array.prototype.slice.apply(a.childNodes);a=K.call(this,a);if(n(this))for(var e=0;e<c.length;e++)z(b,c[e]);return a}c=n(a);e=K.call(this,a);c&&B(b,a);n(this)&&z(b,a);return e});u(Node.prototype,"cloneNode",function(a){a=J.call(this,a);this.ownerDocument.__CE_hasRegistry?C(b,a):x(b,a);
return a});u(Node.prototype,"removeChild",function(a){var c=n(a),e=M.call(this,a);c&&B(b,a);return e});u(Node.prototype,"replaceChild",function(a,d){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);a=N.call(this,a,d);if(n(this))for(B(b,d),d=0;d<e.length;d++)z(b,e[d]);return a}var e=n(a),f=N.call(this,a,d),c=n(this);c&&B(b,d);e&&B(b,a);c&&z(b,a);return f});O&&O.get?a(Node.prototype,O):w(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=
0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)M.call(this,this.firstChild);K.call(this,document.createTextNode(a))}})})};function ya(b){var a=Element.prototype;function c(a){return function(e){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];for(var d=[],k=[],g=0;g<c.length;g++){var l=c[g];l instanceof Element&&n(l)&&k.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)d.push(l);else d.push(l)}a.apply(this,c);for(c=0;c<k.length;c++)B(b,k[c]);if(n(this))for(c=0;c<d.length;c++)k=d[c],k instanceof Element&&z(b,k)}}V&&(a.before=c(V));V&&(a.after=c(pa));qa&&u(a,"replaceWith",function(a){for(var e=
[],c=0;c<arguments.length;++c)e[c-0]=arguments[c];for(var c=[],d=[],k=0;k<e.length;k++){var g=e[k];g instanceof Element&&n(g)&&d.push(g);if(g instanceof DocumentFragment)for(g=g.firstChild;g;g=g.nextSibling)c.push(g);else c.push(g)}k=n(this);qa.apply(this,e);for(e=0;e<d.length;e++)B(b,d[e]);if(k)for(B(b,this),e=0;e<c.length;e++)d=c[e],d instanceof Element&&z(b,d)});ra&&u(a,"remove",function(){var a=n(this);ra.call(this);a&&B(b,this)})};function za(){var b=X;function a(a,c){Object.defineProperty(a,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(a){var e=this,d=void 0;n(this)&&(d=[],t(this,function(a){a!==e&&d.push(a)}));c.set.call(this,a);if(d)for(var f=0;f<d.length;f++){var r=d[f];1===r.__CE_state&&b.disconnectedCallback(r)}this.ownerDocument.__CE_hasRegistry?C(b,this):x(b,this);return a}})}function c(a,c){u(a,"insertAdjacentElement",function(a,e){var d=n(e);a=c.call(this,a,e);d&&B(b,e);n(a)&&z(b,e);
return a})}function d(a,c){function e(a,e){for(var c=[];a!==e;a=a.nextSibling)c.push(a);for(e=0;e<c.length;e++)C(b,c[e])}u(a,"insertAdjacentHTML",function(a,b){a=a.toLowerCase();if("beforebegin"===a){var d=this.previousSibling;c.call(this,a,b);e(d||this.parentNode.firstChild,this)}else if("afterbegin"===a)d=this.firstChild,c.call(this,a,b),e(this.firstChild,d);else if("beforeend"===a)d=this.lastChild,c.call(this,a,b),e(d||this.firstChild,null);else if("afterend"===a)d=this.nextSibling,c.call(this,
a,b),e(this.nextSibling,d);else throw new SyntaxError("The value provided ("+String(a)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");})}P&&u(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=P.call(this,a)});Q&&Q.get?a(Element.prototype,Q):W&&W.get?a(HTMLElement.prototype,W):w(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){return J.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,e=b?this.content:this,
c=I.call(document,this.namespaceURI,this.localName);for(c.innerHTML=a;0<e.childNodes.length;)M.call(e,e.childNodes[0]);for(a=b?c.content:c;0<a.childNodes.length;)K.call(e,a.childNodes[0])}})});u(Element.prototype,"setAttribute",function(a,c){if(1!==this.__CE_state)return S.call(this,a,c);var e=R.call(this,a);S.call(this,a,c);c=R.call(this,a);b.attributeChangedCallback(this,a,e,c,null)});u(Element.prototype,"setAttributeNS",function(a,c,d){if(1!==this.__CE_state)return ja.call(this,a,c,d);var e=U.call(this,
a,c);ja.call(this,a,c,d);d=U.call(this,a,c);b.attributeChangedCallback(this,c,e,d,a)});u(Element.prototype,"removeAttribute",function(a){if(1!==this.__CE_state)return T.call(this,a);var c=R.call(this,a);T.call(this,a);null!==c&&b.attributeChangedCallback(this,a,c,null,null)});u(Element.prototype,"removeAttributeNS",function(a,c){if(1!==this.__CE_state)return ka.call(this,a,c);var d=U.call(this,a,c);ka.call(this,a,c);var e=U.call(this,a,c);d!==e&&b.attributeChangedCallback(this,c,d,e,a)});ta?c(HTMLElement.prototype,
ta):la?c(Element.prototype,la):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");ua?d(HTMLElement.prototype,ua):ma?d(Element.prototype,ma):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched.");Y(b,Element.prototype,{h:na,append:oa});ya(b)};/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var Z=window.customElements;if(!Z||Z.forcePolyfill||"function"!=typeof Z.define||"function"!=typeof Z.get){var X=new v;va();wa();Y(X,DocumentFragment.prototype,{h:ha,append:ia});xa();za();document.__CE_hasRegistry=!0;var customElements=new G(X);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};
}).call(self);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
/**
* innerHTML property for SVGElement
* Copyright(c) 2010, Jeff Schiller
*
* Licensed under the Apache License, Version 2
*
* Minor modifications by Chris Price to only polyfill when required.
*/
!function(e){if(e&&!("innerHTML"in e.prototype)){var t=function(e,r){var i=e.nodeType;if(3==i)r.push(e.textContent.replace(/&/,"&amp;").replace(/</,"&lt;").replace(">","&gt;"));else if(1==i){if(r.push("<",e.tagName),e.hasAttributes())for(var n=e.attributes,s=0,o=n.length;s<o;++s){var a=n.item(s);r.push(" ",a.name,"='",a.value,"'")}if(e.hasChildNodes()){r.push(">");for(var h=e.childNodes,s=0,o=h.length;s<o;++s)t(h.item(s),r);r.push("</",e.tagName,">")}else r.push("/>")}else{if(8!=i)throw"Error serializing XML. Unhandled node of type: "+i;r.push("\x3c!--",e.nodeValue,"--\x3e")}};Object.defineProperty(e.prototype,"innerHTML",{get:function(){for(var e=[],r=this.firstChild;r;)t(r,e),r=r.nextSibling;return e.join("")},set:function(e){for(;this.firstChild;)this.removeChild(this.firstChild);try{var t=new DOMParser;t.async=!1,sXML="<svg xmlns='http://www.w3.org/2000/svg'>"+e+"</svg>";for(var r=t.parseFromString(sXML,"text/xml").documentElement.firstChild;r;)this.appendChild(this.ownerDocument.importNode(r,!0)),r=r.nextSibling}catch(e){throw new Error("Error parsing XML string")}}})}}((0,eval)("this").SVGElement);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*
* Copyright 2012-2013 (c) Pierre Duquesne <stackp@online.fr>
* Licensed under the New BSD License.
* https://github.com/stackp/promisejs
*/
(function(a){function b(){this._callbacks=[];}b.prototype.then=function(a,c){var d;if(this._isdone)d=a.apply(c,this.result);else{d=new b();this._callbacks.push(function(){var b=a.apply(c,arguments);if(b&&typeof b.then==='function')b.then(d.done,d);});}return d;};b.prototype.done=function(){this.result=arguments;this._isdone=true;for(var a=0;a<this._callbacks.length;a++)this._callbacks[a].apply(null,arguments);this._callbacks=[];};function c(a){var c=new b();var d=[];if(!a||!a.length){c.done(d);return c;}var e=0;var f=a.length;function g(a){return function(){e+=1;d[a]=Array.prototype.slice.call(arguments);if(e===f)c.done(d);};}for(var h=0;h<f;h++)a[h].then(g(h));return c;}function d(a,c){var e=new b();if(a.length===0)e.done.apply(e,c);else a[0].apply(null,c).then(function(){a.splice(0,1);d(a,arguments).then(function(){e.done.apply(e,arguments);});});return e;}function e(a){var b="";if(typeof a==="string")b=a;else{var c=encodeURIComponent;var d=[];for(var e in a)if(a.hasOwnProperty(e))d.push(c(e)+'='+c(a[e]));b=d.join('&');}return b;}function f(){var a;if(window.XMLHttpRequest)a=new XMLHttpRequest();else if(window.ActiveXObject)try{a=new ActiveXObject("Msxml2.XMLHTTP");}catch(b){a=new ActiveXObject("Microsoft.XMLHTTP");}return a;}function g(a,c,d,g){var h=new b();var j,k;d=d||{};g=g||{};try{j=f();}catch(l){h.done(i.ENOXHR,"");return h;}k=e(d);if(a==='GET'&&k){c+='?'+k;k=null;}j.open(a,c);var m='application/x-www-form-urlencoded';for(var n in g)if(g.hasOwnProperty(n))if(n.toLowerCase()==='content-type')m=g[n];else j.setRequestHeader(n,g[n]);j.setRequestHeader('Content-type',m);function o(){j.abort();h.done(i.ETIMEOUT,"",j);}var p=i.ajaxTimeout;if(p)var q=setTimeout(o,p);j.onreadystatechange=function(){if(p)clearTimeout(q);if(j.readyState===4){var a=(!j.status||(j.status<200||j.status>=300)&&j.status!==304);h.done(a,j.responseText,j);}};j.send(k);return h;}function h(a){return function(b,c,d){return g(a,b,c,d);};}var i={Promise:b,join:c,chain:d,ajax:g,get:h('GET'),post:h('POST'),put:h('PUT'),del:h('DELETE'),ENOXHR:1,ETIMEOUT:2,ajaxTimeout:0};if(typeof define==='function'&&define.amd)define(function(){return i;});else a.promise=i;})(this);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*!
* tablesort v5.1.0 (2018-09-14)
* http://tristen.ca/tablesort/demo/
* Copyright (c) 2018 ; Licensed MIT
*/
!function(){function a(b,c){if(!(this instanceof a))return new a(b,c);if(!b||"TABLE"!==b.tagName)throw new Error("Element must be a table");this.init(b,c||{})}var b=[],c=function(a){var b;return window.CustomEvent&&"function"==typeof window.CustomEvent?b=new CustomEvent(a):(b=document.createEvent("CustomEvent"),b.initCustomEvent(a,!1,!1,void 0)),b},d=function(a){return a.getAttribute("data-sort")||a.textContent||a.innerText||""},e=function(a,b){return a=a.trim().toLowerCase(),b=b.trim().toLowerCase(),a===b?0:a<b?1:-1},f=function(a,b){return function(c,d){var e=a(c.td,d.td);return 0===e?b?d.index-c.index:c.index-d.index:e}};a.extend=function(a,c,d){if("function"!=typeof c||"function"!=typeof d)throw new Error("Pattern and sort must be a function");b.push({name:a,pattern:c,sort:d})},a.prototype={init:function(a,b){var c,d,e,f,g=this;if(g.table=a,g.thead=!1,g.options=b,a.rows&&a.rows.length>0)if(a.tHead&&a.tHead.rows.length>0){for(e=0;e<a.tHead.rows.length;e++)if("thead"===a.tHead.rows[e].getAttribute("data-sort-method")){c=a.tHead.rows[e];break}c||(c=a.tHead.rows[a.tHead.rows.length-1]),g.thead=!0}else c=a.rows[0];if(c){var h=function(){g.current&&g.current!==this&&g.current.removeAttribute("aria-sort"),g.current=this,g.sortTable(this)};for(e=0;e<c.cells.length;e++)f=c.cells[e],f.setAttribute("role","columnheader"),"none"!==f.getAttribute("data-sort-method")&&(f.tabindex=0,f.addEventListener("click",h,!1),null!==f.getAttribute("data-sort-default")&&(d=f));d&&(g.current=d,g.sortTable(d))}},sortTable:function(a,g){var h=this,i=a.cellIndex,j=e,k="",l=[],m=h.thead?0:1,n=a.getAttribute("data-sort-method"),o=a.getAttribute("aria-sort");if(h.table.dispatchEvent(c("beforeSort")),g||(o="ascending"===o?"descending":"descending"===o?"ascending":h.options.descending?"descending":"ascending",a.setAttribute("aria-sort",o)),!(h.table.rows.length<2)){if(!n){for(;l.length<3&&m<h.table.tBodies[0].rows.length;)k=d(h.table.tBodies[0].rows[m].cells[i]),k=k.trim(),k.length>0&&l.push(k),m++;if(!l)return}for(m=0;m<b.length;m++)if(k=b[m],n){if(k.name===n){j=k.sort;break}}else if(l.every(k.pattern)){j=k.sort;break}for(h.col=i,m=0;m<h.table.tBodies.length;m++){var p,q=[],r={},s=0,t=0;if(!(h.table.tBodies[m].rows.length<2)){for(p=0;p<h.table.tBodies[m].rows.length;p++)k=h.table.tBodies[m].rows[p],"none"===k.getAttribute("data-sort-method")?r[s]=k:q.push({tr:k,td:d(k.cells[h.col]),index:s}),s++;for("descending"===o?q.sort(f(j,!0)):(q.sort(f(j,!1)),q.reverse()),p=0;p<s;p++)r[p]?(k=r[p],t++):k=q[p-t].tr,h.table.tBodies[m].appendChild(k)}}h.table.dispatchEvent(c("afterSort"))}},refresh:function(){void 0!==this.current&&this.sortTable(this.current,!0)}},"undefined"!=typeof module&&module.exports?module.exports=a:window.Tablesort=a}();

View File

@@ -0,0 +1,6 @@
/*!
* tablesort v5.1.0 (2018-09-14)
* http://tristen.ca/tablesort/demo/
* Copyright (c) 2018 ; Licensed MIT
*/
!function(){var a=function(a){return a.replace(/[^\-?0-9.]/g,"")},b=function(a,b){return a=parseFloat(a),b=parseFloat(b),a=isNaN(a)?0:a,b=isNaN(b)?0:b,a-b};Tablesort.extend("number",function(a){return a.match(/^[-+]?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/)||a.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/)||a.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)},function(c,d){return c=a(c),d=a(d),b(d,c)})}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,206 @@
'use strict';
customElements.define('compodoc-menu', class extends HTMLElement {
constructor() {
super();
this.isNormalMode = this.getAttribute('mode') === 'normal';
}
connectedCallback() {
this.render(this.isNormalMode);
}
render(isNormalMode) {
let tp = lithtml.html(`
<nav>
<ul class="list">
<li class="title">
<a href="index.html" data-type="index-link">aktienbot documentation</a>
</li>
<li class="divider"></li>
${ isNormalMode ? `<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div>` : '' }
<li class="chapter">
<a data-type="chapter-link" href="index.html"><span class="icon ion-ios-home"></span>Getting started</a>
<ul class="links">
<li class="link">
<a href="overview.html" data-type="chapter-link">
<span class="icon ion-ios-keypad"></span>Overview
</a>
</li>
<li class="link">
<a href="index.html" data-type="chapter-link">
<span class="icon ion-ios-paper"></span>README
</a>
</li>
<li class="link">
<a href="dependencies.html" data-type="chapter-link">
<span class="icon ion-ios-list"></span>Dependencies
</a>
</li>
<li class="link">
<a href="properties.html" data-type="chapter-link">
<span class="icon ion-ios-apps"></span>Properties
</a>
</li>
</ul>
</li>
<li class="chapter modules">
<a data-type="chapter-link" href="modules.html">
<div class="menu-toggler linked" data-toggle="collapse" ${ isNormalMode ?
'data-target="#modules-links"' : 'data-target="#xs-modules-links"' }>
<span class="icon ion-ios-archive"></span>
<span class="link-name">Modules</span>
<span class="icon ion-ios-arrow-down"></span>
</div>
</a>
<ul class="links collapse " ${ isNormalMode ? 'id="modules-links"' : 'id="xs-modules-links"' }>
<li class="link">
<a href="modules/AppModule.html" data-type="entity-link" >AppModule</a>
<li class="chapter inner">
<div class="simple menu-toggler" data-toggle="collapse" ${ isNormalMode ?
'data-target="#components-links-module-AppModule-34cb5442ffd00e56d7aa371f8eaff935ef2fc1ca4c59dabdb9994c138649d65175b885c8e95e6c08c855f26a16755de2fae6988c4609b06ab1109082fa6213b1"' : 'data-target="#xs-components-links-module-AppModule-34cb5442ffd00e56d7aa371f8eaff935ef2fc1ca4c59dabdb9994c138649d65175b885c8e95e6c08c855f26a16755de2fae6988c4609b06ab1109082fa6213b1"' }>
<span class="icon ion-md-cog"></span>
<span>Components</span>
<span class="icon ion-ios-arrow-down"></span>
</div>
<ul class="links collapse" ${ isNormalMode ? 'id="components-links-module-AppModule-34cb5442ffd00e56d7aa371f8eaff935ef2fc1ca4c59dabdb9994c138649d65175b885c8e95e6c08c855f26a16755de2fae6988c4609b06ab1109082fa6213b1"' :
'id="xs-components-links-module-AppModule-34cb5442ffd00e56d7aa371f8eaff935ef2fc1ca4c59dabdb9994c138649d65175b885c8e95e6c08c855f26a16755de2fae6988c4609b06ab1109082fa6213b1"' }>
<li class="link">
<a href="components/AppComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >AppComponent</a>
</li>
<li class="link">
<a href="components/BotSettingsComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >BotSettingsComponent</a>
</li>
<li class="link">
<a href="components/ConfirmationDialogComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >ConfirmationDialogComponent</a>
</li>
<li class="link">
<a href="components/DashboardComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >DashboardComponent</a>
</li>
<li class="link">
<a href="components/HeaderComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >HeaderComponent</a>
</li>
<li class="link">
<a href="components/HelpDialogComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >HelpDialogComponent</a>
</li>
<li class="link">
<a href="components/LoginComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >LoginComponent</a>
</li>
<li class="link">
<a href="components/ProfileComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >ProfileComponent</a>
</li>
<li class="link">
<a href="components/RegisterComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >RegisterComponent</a>
</li>
<li class="link">
<a href="components/UserDialogComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >UserDialogComponent</a>
</li>
</ul>
</li>
</li>
<li class="link">
<a href="modules/AppRoutingModule.html" data-type="entity-link" >AppRoutingModule</a>
</li>
</ul>
</li>
<li class="chapter">
<div class="simple menu-toggler" data-toggle="collapse" ${ isNormalMode ? 'data-target="#injectables-links"' :
'data-target="#xs-injectables-links"' }>
<span class="icon ion-md-arrow-round-down"></span>
<span>Injectables</span>
<span class="icon ion-ios-arrow-down"></span>
</div>
<ul class="links collapse " ${ isNormalMode ? 'id="injectables-links"' : 'id="xs-injectables-links"' }>
<li class="link">
<a href="injectables/AuthService.html" data-type="entity-link" >AuthService</a>
</li>
<li class="link">
<a href="injectables/BotService.html" data-type="entity-link" >BotService</a>
</li>
<li class="link">
<a href="injectables/DataService.html" data-type="entity-link" >DataService</a>
</li>
<li class="link">
<a href="injectables/HelperService.html" data-type="entity-link" >HelperService</a>
</li>
<li class="link">
<a href="injectables/ProfileService.html" data-type="entity-link" >ProfileService</a>
</li>
<li class="link">
<a href="injectables/TokenStorageService.html" data-type="entity-link" >TokenStorageService</a>
</li>
</ul>
</li>
<li class="chapter">
<div class="simple menu-toggler" data-toggle="collapse" ${ isNormalMode ? 'data-target="#interceptors-links"' :
'data-target="#xs-interceptors-links"' }>
<span class="icon ion-ios-swap"></span>
<span>Interceptors</span>
<span class="icon ion-ios-arrow-down"></span>
</div>
<ul class="links collapse " ${ isNormalMode ? 'id="interceptors-links"' : 'id="xs-interceptors-links"' }>
<li class="link">
<a href="interceptors/AuthInterceptor.html" data-type="entity-link" >AuthInterceptor</a>
</li>
</ul>
</li>
<li class="chapter">
<div class="simple menu-toggler" data-toggle="collapse" ${ isNormalMode ? 'data-target="#interfaces-links"' :
'data-target="#xs-interfaces-links"' }>
<span class="icon ion-md-information-circle-outline"></span>
<span>Interfaces</span>
<span class="icon ion-ios-arrow-down"></span>
</div>
<ul class="links collapse " ${ isNormalMode ? ' id="interfaces-links"' : 'id="xs-interfaces-links"' }>
<li class="link">
<a href="interfaces/Fruit.html" data-type="entity-link" >Fruit</a>
</li>
<li class="link">
<a href="interfaces/Keyword.html" data-type="entity-link" >Keyword</a>
</li>
<li class="link">
<a href="interfaces/PeriodicElement.html" data-type="entity-link" >PeriodicElement</a>
</li>
<li class="link">
<a href="interfaces/Share.html" data-type="entity-link" >Share</a>
</li>
<li class="link">
<a href="interfaces/Stock.html" data-type="entity-link" >Stock</a>
</li>
<li class="link">
<a href="interfaces/TransactionData.html" data-type="entity-link" >TransactionData</a>
</li>
</ul>
</li>
<li class="chapter">
<div class="simple menu-toggler" data-toggle="collapse" ${ isNormalMode ? 'data-target="#miscellaneous-links"'
: 'data-target="#xs-miscellaneous-links"' }>
<span class="icon ion-ios-cube"></span>
<span>Miscellaneous</span>
<span class="icon ion-ios-arrow-down"></span>
</div>
<ul class="links collapse " ${ isNormalMode ? 'id="miscellaneous-links"' : 'id="xs-miscellaneous-links"' }>
<li class="link">
<a href="miscellaneous/variables.html" data-type="entity-link">Variables</a>
</li>
</ul>
</li>
<li class="chapter">
<a data-type="chapter-link" href="routes.html"><span class="icon ion-ios-git-branch"></span>Routes</a>
</li>
<li class="chapter">
<a data-type="chapter-link" href="coverage.html"><span class="icon ion-ios-stats"></span>Documentation coverage</a>
</li>
<li class="divider"></li>
<li class="copyright">
Documentation generated using <a href="https://compodoc.app/" target="_blank">
<img data-src="images/compodoc-vectorise.png" class="img-responsive" data-type="compodoc-logo">
</a>
</li>
</ul>
</nav>
`);
this.innerHTML = tp.strings;
}
});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,321 @@
document.addEventListener('DOMContentLoaded', function () {
var menuCollapsed = false,
mobileMenu = document.getElementById('mobile-menu');
var localContextInUrl = '';
if (COMPODOC_CURRENT_PAGE_CONTEXT !== '') {
switch (COMPODOC_CURRENT_PAGE_CONTEXT) {
case 'additional-page':
localContextInUrl = 'additional-documentation';
break;
case 'class':
localContextInUrl = 'classes';
break;
case 'miscellaneous-functions':
case 'miscellaneous-variables':
case 'miscellaneous-typealiases':
case 'miscellaneous-enumerations':
localContextInUrl = 'miscellaneous';
default:
break;
}
}
function hasClass(el, cls) {
return el.className && new RegExp('(\\s|^)' + cls + '(\\s|$)').test(el.className);
}
var processLink = function (link, url) {
if (url.charAt(0) !== '.') {
var prefix = '';
switch (COMPODOC_CURRENT_PAGE_DEPTH) {
case 5:
prefix = '../../../../../';
break;
case 4:
prefix = '../../../../';
break;
case 3:
prefix = '../../../';
break;
case 2:
prefix = '../../';
break;
case 1:
prefix = '../';
break;
case 0:
prefix = './';
break;
}
link.setAttribute('href', prefix + url);
}
};
var processMenuLinks = function (links, dontAddClass) {
for (var i = 0; i < links.length; i++) {
var link = links[i];
var linkHref = link.getAttribute('href');
if (linkHref) {
var linkHrefFile = linkHref.substr(linkHref.lastIndexOf('/') + 1, linkHref.length);
if (
linkHrefFile.toLowerCase() === COMPODOC_CURRENT_PAGE_URL.toLowerCase() &&
link.innerHTML.indexOf('Getting started') == -1 &&
!dontAddClass &&
linkHref.toLowerCase().indexOf(localContextInUrl.toLowerCase()) !== -1
) {
link.classList.add('active');
}
processLink(link, linkHref);
}
}
};
var chapterLinks = document.querySelectorAll('[data-type="chapter-link"]');
processMenuLinks(chapterLinks);
var entityLinks = document.querySelectorAll('[data-type="entity-link"]');
processMenuLinks(entityLinks);
var indexLinks = document.querySelectorAll('[data-type="index-link"]');
processMenuLinks(indexLinks, true);
var compodocLogos = document.querySelectorAll('[data-type="compodoc-logo"]');
var customLogo = document.querySelectorAll('[data-type="custom-logo"]');
var processLogos = function (entityLogos) {
for (var i = 0; i < entityLogos.length; i++) {
var entityLogo = entityLogos[i];
if (entityLogo) {
var url = entityLogo.getAttribute('data-src');
// Dark mode + logo
let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
if (isDarkMode && url.indexOf('compodoc') !== -1) {
url = 'images/compodoc-vectorise-inverted.png';
}
if (url.charAt(0) !== '.') {
var prefix = '';
switch (COMPODOC_CURRENT_PAGE_DEPTH) {
case 5:
prefix = '../../../../../';
break;
case 4:
prefix = '../../../../';
break;
case 3:
prefix = '../../../';
break;
case 2:
prefix = '../../';
break;
case 1:
prefix = '../';
break;
case 0:
prefix = './';
break;
}
entityLogo.src = prefix + url;
}
}
}
};
processLogos(compodocLogos);
processLogos(customLogo);
setTimeout(function () {
document.getElementById('btn-menu').addEventListener('click', function () {
if (menuCollapsed) {
mobileMenu.style.display = 'none';
} else {
mobileMenu.style.display = 'block';
document.getElementsByTagName('body')[0].style['overflow-y'] = 'hidden';
}
menuCollapsed = !menuCollapsed;
});
/**
* Native bootstrap doesn't wait DOMContentLoaded event to start his job, re do it here
*/
var Collapses = document.querySelectorAll('[data-toggle="collapse"]');
for (var o = 0, cll = Collapses.length; o < cll; o++) {
var collapse = Collapses[o],
options = {};
options.duration = collapse.getAttribute('data-duration');
var c = new Collapse(collapse, options);
}
// collapse menu
var classnameMenuToggler = document.getElementsByClassName('menu-toggler'),
faAngleUpClass = 'ion-ios-arrow-up',
faAngleDownClass = 'ion-ios-arrow-down',
toggleItemMenu = function (e) {
var element = $(e.target),
parent = element[0].parentNode,
parentLink,
elementIconChild;
if (parent) {
if (!$(parent).hasClass('linked')) {
e.preventDefault();
} else {
parentLink = parent.parentNode;
if (parentLink && element.hasClass('link-name')) {
$(parentLink).trigger('click');
}
}
elementIconChild = parent.getElementsByClassName(faAngleUpClass)[0];
if (!elementIconChild) {
elementIconChild = parent.getElementsByClassName(faAngleDownClass)[0];
}
if (elementIconChild) {
elementIconChild = $(elementIconChild);
if (elementIconChild.hasClass(faAngleUpClass)) {
elementIconChild.addClass(faAngleDownClass);
elementIconChild.removeClass(faAngleUpClass);
} else {
elementIconChild.addClass(faAngleUpClass);
elementIconChild.removeClass(faAngleDownClass);
}
}
}
};
for (var i = 0; i < classnameMenuToggler.length; i++) {
classnameMenuToggler[i].addEventListener('click', toggleItemMenu, false);
}
// Scroll to active link
var menus = document.querySelectorAll('.menu'),
i = 0,
len = menus.length,
activeMenu,
activeMenuClass,
activeLink;
for (i; i < len; i++) {
if (getComputedStyle(menus[i]).display != 'none') {
activeMenu = menus[i];
activeMenuClass = activeMenu.getAttribute('class').split(' ')[0];
}
}
if (activeMenu) {
activeLink = document.querySelector('.' + activeMenuClass + ' .active');
if (activeLink) {
var linkType = activeLink.getAttribute('data-type');
var linkContext = activeLink.getAttribute('data-context');
if (linkType === 'entity-link') {
var parentLi = activeLink.parentNode,
parentUl,
parentChapterMenu;
if (parentLi) {
parentUl = parentLi.parentNode;
if (parentUl) {
parentChapterMenu = parentUl.parentNode;
if (parentChapterMenu) {
var toggler = parentChapterMenu.querySelector('.menu-toggler'),
elementIconChild =
toggler.getElementsByClassName(faAngleUpClass)[0];
if (toggler && !elementIconChild) {
toggler.click();
}
}
}
}
if (linkContext && linkContext === 'sub-entity') {
// Toggle also the master parent menu
var linkContextId = activeLink.getAttribute('data-context-id');
var toggler = activeMenu.querySelector(
'.chapter.' + linkContextId + ' a .menu-toggler'
);
if (toggler) {
toggler.click();
}
if (linkContextId === 'additional') {
var mainToggler = activeMenu.querySelector(
'.chapter.' + linkContextId + ' div.menu-toggler'
);
if (mainToggler) {
mainToggler.click();
}
}
}
} else if (linkType === 'chapter-link') {
var linkContextId = activeLink.getAttribute('data-context-id');
var toggler = activeLink.querySelector('.menu-toggler');
if (toggler) {
toggler.click();
}
if (linkContextId === 'additional') {
var mainToggler = activeMenu.querySelector(
'.chapter.' + linkContextId + ' div.menu-toggler'
);
if (mainToggler) {
mainToggler.click();
}
}
}
setTimeout(function () {
activeMenu.scrollTop = activeLink.offsetTop;
if (
activeLink.innerHTML.toLowerCase().indexOf('readme') != -1 ||
activeLink.innerHTML.toLowerCase().indexOf('overview') != -1
) {
activeMenu.scrollTop = 0;
}
}, 300);
}
}
// Dark mode toggle button
var useDark = window.matchMedia('(prefers-color-scheme: dark)');
var darkModeState = useDark.matches;
var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');
function checkToggle(check) {
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
$darkModeToggleSwitchers[i].checked = check;
}
}
function toggleDarkMode(state) {
if (window.localStorage) {
localStorage.setItem('compodoc_darkmode-state', state);
}
checkToggle(state);
const hasClass = document.body.classList.contains('dark');
if (state) {
for (var i = 0; i < $darkModeToggles.length; i++) {
$darkModeToggles[i].classList.add('dark');
}
if (!hasClass) {
document.body.classList.add('dark');
}
} else {
for (var i = 0; i < $darkModeToggles.length; i++) {
$darkModeToggles[i].classList.remove('dark');
}
if (hasClass) {
document.body.classList.remove('dark');
}
}
}
useDark.addEventListener('change', function (evt) {
toggleDarkMode(evt.matches);
});
if (darkModeStateLocal) {
darkModeState = darkModeStateLocal === 'true';
}
toggleDarkMode(darkModeState);
if ($darkModeToggles.length > 0) {
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
$darkModeToggleSwitchers[i].addEventListener('change', function (event) {
darkModeState = !darkModeState;
toggleDarkMode(darkModeState);
});
}
}
}, 0);
});

View File

@@ -0,0 +1,280 @@
document.addEventListener('DOMContentLoaded', function() {
function htmlEntities(str) {
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}
function foundLazyModuleWithPath(path) {
//path is like app/customers/customers.module#CustomersModule
var split = path.split('#'),
lazyModulePath = split[0],
lazyModuleName = split[1];
return lazyModuleName;
}
function getBB(selection) {
selection.each(function(d){d.bbox = this.getBBox();})
}
var test_cases,
test_case,
test_case_num,
engine;
var tree = ROUTES_INDEX;
function cleanStringChildren(obj) {
for (var property in obj) {
if (obj.hasOwnProperty(property)) {
if (property === 'children' && typeof obj[property] === 'object') {
for (var i = obj[property].length - 1; i >= 0 ; i--) {
if (typeof obj[property][i] === 'string') {
obj[property].splice(i, 1);
}
}
}
if (typeof obj[property] === 'object') {
cleanStringChildren(obj[property]);
}
}
}
}
cleanStringChildren(tree);
engine = d3.layout.tree().setNodeSizes(true);
engine.spacing(function(a, b) {
return a.parent == b.parent ?
0 : engine.rootXSize();
})
engine.nodeSize(function(d) {
return [document.getElementById(d.id).getBBox()["height"] + 70, document.getElementById(d.id).getBBox()["width"] + 30];
});
var nodes = d3.layout.hierarchy()(tree),
svg = d3.select("#body-routes").append('svg'),
svg_g = svg.append("g"),
svg_p = svg.append("g"),
last_id = 0,
node = svg_g.selectAll(".node")
.data(nodes, function(d) {
return d.id || (d.id = ++last_id);
})
.enter().append("g")
.attr("class", "node");
svg
.attr('id', 'main')
svg_g
.attr("transform", "translate(20,0)")
.attr('id', 'main-group')
svg_p
.attr("transform", "translate(20,0)")
.attr('id', 'paths')
var infos_group = node.append("g")
.attr({
"id": function(d) {
return d.id;
},
dx: 0,
dy: 0,
})
//Node icon
infos_group.append("text")
.attr('font-family', 'Ionicons')
.attr("y", 5)
.attr("x", 0)
.attr('class', function(d) {
return d.children || d._children
? "icon has-children"
: "icon";
})
.attr('font-size', function(d) {
return '15px'
}).text(function(d) {
return '\uf183'
});
//node infos
infos_group.append("svg:text")
.attr("x", function(d) {
return 0;
})
.attr("y", function(d) {
return 10;
})
.attr("dy", ".35em")
.attr('class', 'text')
.attr("text-anchor", function(d) {
return "start";
}).html(function(d) {
// if kind === module name + module
// if kind === component component + path
var _name = '';
if (d.kind === 'module') {
if (d.module) {
_name += '<tspan x="0" dy="1.4em"><a href="./modules/' + d.module + '.html">' + d.module + '</a></tspan>';
if (d.name) {
_name += '<tspan x="0" dy="1.4em">' + d.name + '</tspan>';
}
} else {
_name += '<tspan x="0" dy="1.4em">' + htmlEntities(d.name) + '</tspan>';
}
} else if (d.kind === 'component') {
_name += '<tspan x="0" dy="1.4em">' + d.path + '</tspan>'
_name += '<tspan x="0" dy="1.4em"><a href="./components/' + d.component + '.html">' + d.component + '</a></tspan>'
if (d.outlet) {
_name += '<tspan x="0" dy="1.4em">&lt;outlet&gt; : ' + d.outlet + '</tspan>'
}
} else {
_name += '<tspan x="0" dy="1.4em">/' + d.path + '</tspan>'
if (d.component) {
_name += '<tspan x="0" dy="1.4em"><a href="./components/' + d.component + '.html">' + d.component + '</a></tspan>'
}
if (d.loadChildren) {
var moduleName = foundLazyModuleWithPath(d.loadChildren);
_name += '<tspan x="0" dy="1.4em"><a href="./modules/' + moduleName + '.html">' + moduleName + '</a></tspan>'
}
if (d.canActivate) {
_name += '<tspan x="0" dy="1.4em">&#10003; canActivate</tspan>'
}
if (d.canDeactivate) {
_name += '<tspan x="0" dy="1.4em">&#215;&nbsp;&nbsp;canDeactivate</tspan>'
}
if (d.canActivateChild) {
_name += '<tspan x="0" dy="1.4em">&#10003; canActivateChild</tspan>'
}
if (d.canLoad) {
_name += '<tspan x="0" dy="1.4em">&#8594; canLoad</tspan>'
}
if (d.redirectTo) {
_name += '<tspan x="0" dy="1.4em">&rarr; ' + d.redirectTo + '</tspan>'
}
if (d.pathMatch) {
_name += '<tspan x="0" dy="1.4em">&gt; ' + d.pathMatch + '</tspan>'
}
if (d.outlet) {
_name += '<tspan x="0" dy="1.4em">&lt;outlet&gt; : ' + d.outlet + '</tspan>'
}
}
return _name;
})
.call(getBB);
//
// Node lazy loaded ?
//
infos_group.append('svg:text')
.attr("y", function(d) {
return 45;
})
.attr("x", function(d) {
return -18;
})
.attr('font-family', 'Ionicons')
.attr('class', function(d) {
return "icon";
})
.attr('font-size', function(d) {
return '15px'
}).text(function(d) {
var _text = '';
if (d.loadChildren) {
_text = '\uf4c1';
}
if (d.guarded) {
_text = '\uf1b0';
}
return _text;
});
//Node text background
infos_group.insert("rect","text")
.attr("width", function(d){
return d.bbox.width;
})
.attr("height", function(d){
return d.bbox.height;
})
.attr("y", function(d) {
return 15;
})
.style("fill", "white")
.style("fill-opacity", 0.75);
nodes = engine.nodes(tree);
function node_extents(n) {
return [n.x - n.x_size / 2, n.y,
n.x + n.x_size / 2, n.y + n.y_size
];
}
var root_extents = node_extents(nodes[0]);
var xmin = root_extents[0],
ymin = root_extents[1],
xmax = root_extents[2],
ymax = root_extents[3],
area_sum = (xmax - xmin) * (ymax - ymin),
x_size_min = nodes[0].x_size,
y_size_min = nodes[0].y_size;
nodes.slice(1).forEach(function(n) {
var ne = node_extents(n);
xmin = Math.min(xmin, ne[0]);
ymin = Math.min(ymin, ne[1]);
xmax = Math.max(xmax, ne[2]);
ymax = Math.max(ymax, ne[3]);
area_sum += (ne[2] - ne[0]) * (ne[3] - ne[1]);
x_size_min = Math.min(x_size_min, n.x_size);
y_size_min = Math.min(y_size_min, n.y_size);
});
var area_ave = area_sum / nodes.length;
var scale = 80 / Math.sqrt(area_ave);
function svg_x(node_y) {
return (node_y - ymin);
}
function svg_y(node_x) {
return (node_x - xmin) * scale;
}
var nodebox_right_margin = Math.min(x_size_min * scale, 10);
var nodebox_vertical_margin = Math.min(y_size_min * scale, 3);
node.attr("transform", function(d) {
return "translate(" + svg_x(d.y) + "," + svg_y(d.x) + ")";
})
var diagonal = d3.svg.diagonal()
.projection(function(d) {
return [svg_x(d.y), svg_y(d.x)];
});
var links = engine.links(nodes);
var links = svg_p.selectAll(".link")
.data(links)
.enter().append("path")
.attr("class", "link")
.attr("d", diagonal);
var _svg = document.getElementById('main'),
main_g = _svg.childNodes[0]
_svg.removeChild(main_g);
_svg.appendChild(main_g);
svg.attr({
width: document.getElementById('main-group').getBBox()['width'] + 30,
height: document.getElementById('main-group').getBBox()['height'] + 50,
});
});

View File

@@ -0,0 +1 @@
var ROUTES_INDEX = {"name":"<root>","kind":"module","className":"AppModule","children":[{"name":"routes","filename":"src/app/app-routing.module.ts","module":"AppRoutingModule","children":[{"path":"login","component":"LoginComponent"},{"path":"","component":"DashboardComponent"},{"path":"register","component":"RegisterComponent"},{"path":"profile","component":"ProfileComponent"},{"path":"settings","component":"BotSettingsComponent"}],"kind":"module"}]}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,67 @@
(function(compodoc) {
function LunrSearchEngine() {
this.index = undefined;
this.store = {};
this.name = 'LunrSearchEngine';
}
LunrSearchEngine.prototype.init = function() {
var that = this,
d = new promise.Promise();
that.index = lunr.Index.load(COMPODOC_SEARCH_INDEX.index);
that.store = COMPODOC_SEARCH_INDEX.store;
d.done();
return d;
};
LunrSearchEngine.prototype.search = function(q, offset, length) {
var that = this,
results = [],
d = new promise.Promise();
if (this.index) {
results = $.map(this.index.search('*' + q + '*'), function(result) {
var doc = that.store[result.ref];
return {
title: doc.title,
url: doc.url,
body: doc.summary || doc.body
};
});
}
d.done({
query: q,
results: length === 0 ? results : results.slice(0, length),
count: results.length
});
return d;
};
compodoc.addEventListener(compodoc.EVENTS.READY, function(event) {
var engine = new LunrSearchEngine(),
initialized = false;
function query(q, offset, length) {
if (!initialized) throw new Error('Search has not been initialized');
return engine.search(q, offset, length);
}
compodoc.search = {
query: query
};
engine.init()
.then(function() {
initialized = true;
compodoc.dispatchEvent({
type: compodoc.EVENTS.SEARCH_READY
});
});
});
})(compodoc);

View File

@@ -0,0 +1,268 @@
(function(compodoc) {
var usePushState = (typeof history.pushState !== 'undefined'),
// DOM Elements
$body = $('body'),
$searchResults,
$searchInput,
$searchList,
$searchTitle,
$searchResultsCount,
$searchQuery,
$mainContainer,
$xsMenu;
// Throttle search
function throttle(fn, wait) {
var timeout;
return function() {
var ctx = this, args = arguments;
if (!timeout) {
timeout = setTimeout(function() {
timeout = undefined;
fn.apply(ctx, args);
}, wait);
}
};
}
function displayResults(res) {
var noResults = res.count == 0;
var groups = {};
$searchResults.toggleClass('no-results', noResults);
// Clear old results
$searchList.empty();
// Display title for research
$searchResultsCount.text(res.count);
$searchQuery.text(res.query);
// Group result by context
res.results.forEach(function(res) {
var context = res.title.split(' - ')[0];
if (typeof groups[context] === 'undefined') {
groups[context] = {
results: [res]
}
} else {
groups[context].results.push(res)
}
});
var sortedGroups = Object.keys(groups).sort();
for (var i = 0; i < sortedGroups.length; i++) {
var property = sortedGroups[i];
var $li = $('<li>', {
'class': 'search-results-group'
});
var finalPropertyLabel = '';
var propertyLabels = property.split('-');
if (propertyLabels.length === 2 && propertyLabels[0] !== 'miscellaneous' && propertyLabels[0] !== 'additional') {
finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' - ' + propertyLabels[1].charAt(0).toUpperCase() + propertyLabels[1].substring(1) + ' (' + groups[property].results.length + ')';
} else if (propertyLabels[0] === 'additional') {
finalPropertyLabel = 'Additional pages' + ' (' + groups[property].results.length + ')'
} else {
finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' (' + groups[property].results.length + ')'
}
var $groupTitle = $('<h3>', {
'text': finalPropertyLabel
});
$groupTitle.appendTo($li);
var $ulResults = $('<ul>', {
'class': 'search-results-list'
})
groups[property].results.forEach(function(res) {
var link = '';
var $liResult = $('<li>', {
'class': 'search-results-item'
});
switch (COMPODOC_CURRENT_PAGE_DEPTH) {
case 0:
link = './';
break;
case 1:
case 2:
case 3:
case 4:
case 5:
link = '../'.repeat(COMPODOC_CURRENT_PAGE_DEPTH);
break;
};
var finalResLabel = res.title.split(' - ')[1].charAt(0).toUpperCase() + res.title.split(' - ')[1].substring(1);
var $link = $('<a>', {
'href': link + res.url,
'text': finalResLabel
});
$link.appendTo($liResult);
$liResult.appendTo($ulResults);
});
$ulResults.appendTo($li);
$li.appendTo($searchList);
}
}
function launchSearch(q) {
$body.addClass('with-search');
if ($xsMenu.css('display') === 'block') {
$mainContainer.css('height', 'calc(100% - 100px)');
$mainContainer.css('margin-top', '100px');
}
throttle(compodoc.search.query(q, 0, MAX_SEARCH_RESULTS)
.then(function(results) {
displayResults(results);
}), 1000);
}
function closeSearch() {
$body.removeClass('with-search');
if ($xsMenu.css('display') === 'block') {
$mainContainer.css('height', 'calc(100% - 50px)');
$mainContainer.css('margin-top', '50px');
}
}
function bindMenuButton() {
document.getElementById('btn-menu').addEventListener('click', function() {
if ($xsMenu.css('display') === 'none') {
$body.removeClass('with-search');
$mainContainer.css('height', 'calc(100% - 50px)');
$mainContainer.css('margin-top', '50px');
}
$.each($searchInputs, function(index, item){
var item = $(item);
item.val('');
});
});
}
function bindSearch() {
// Bind DOM
$searchInputs = $('#book-search-input input');
$searchResults = $('.search-results');
$searchList = $searchResults.find('.search-results-list');
$searchTitle = $searchResults.find('.search-results-title');
$searchResultsCount = $searchTitle.find('.search-results-count');
$searchQuery = $searchTitle.find('.search-query');
$mainContainer = $('.container-fluid');
$xsMenu = $('.xs-menu');
// Launch query based on input content
function handleUpdate(item) {
var q = item.val();
if (q.length == 0) {
closeSearch();
window.location.href = window.location.href.replace(window.location.search, '');
} else {
launchSearch(q);
}
}
// Detect true content change in search input
var propertyChangeUnbound = false;
$.each($searchInputs, function(index, item){
var item = $(item);
// HTML5 (IE9 & others)
item.on('input', function(e) {
// Unbind propertychange event for IE9+
if (!propertyChangeUnbound) {
$(this).unbind('propertychange');
propertyChangeUnbound = true;
}
handleUpdate($(this));
});
// Workaround for IE < 9
item.on('propertychange', function(e) {
if (e.originalEvent.propertyName == 'value') {
handleUpdate($(this));
}
});
// Push to history on blur
item.on('blur', function(e) {
// Update history state
if (usePushState) {
var uri = updateQueryString('q', $(this).val());
if ($(this).val() !== '') {
history.pushState({ path: uri }, null, uri);
}
}
});
});
}
function launchSearchFromQueryString() {
var q = getParameterByName('q');
if (q && q.length > 0) {
// Update search inputs
$.each($searchInputs, function(index, item){
var item = $(item);
item.val(q)
});
// Launch search
launchSearch(q);
}
}
compodoc.addEventListener(compodoc.EVENTS.SEARCH_READY, function(event) {
bindSearch();
bindMenuButton();
launchSearchFromQueryString();
});
function getParameterByName(name) {
var url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
function updateQueryString(key, value) {
value = encodeURIComponent(value);
var url = window.location.href;
var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'),
hash;
if (re.test(url)) {
if (typeof value !== 'undefined' && value !== null)
return url.replace(re, '$1' + key + '=' + value + '$2$3');
else {
hash = url.split('#');
url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, '');
if (typeof hash[1] !== 'undefined' && hash[1] !== null)
url += '#' + hash[1];
return url;
}
}
else {
if (typeof value !== 'undefined' && value !== null) {
var separator = url.indexOf('?') !== -1 ? '&' : '?';
hash = url.split('#');
url = hash[0] + separator + key + '=' + value;
if (typeof hash[1] !== 'undefined' && hash[1] !== null)
url += '#' + hash[1];
return url;
}
else
return url;
}
}
})(compodoc);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,58 @@
document.addEventListener('DOMContentLoaded', function() {
var $tabSource = document.querySelector('#source-tab'),
$tabInfo = document.querySelector('#info-tab'),
$tabReadme = document.querySelector('#readme-tab'),
$tabTemplate = document.querySelector('#templateData-tab'),
$tabTree = document.querySelector('#tree-tab'),
$tabExample = document.querySelector('#example-tab'),
$prismPre = document.querySelector('pre.compodoc-sourcecode');
if ($tabSource && $prismPre) {
$prismCode = $prismPre.querySelector('code'),
$content = document.querySelector('.content'),
prismLinks = document.querySelectorAll('.link-to-prism')
for (var i = 0; i < prismLinks.length; i++) {
prismLinks[i].addEventListener('click', linkToPrism, false);
}
function linkToPrism(event) {
var targetLine = event.target.getAttribute('data-line');
event.preventDefault();
$prismPre.setAttribute('data-line', targetLine);
Prism.highlightElement($prismCode, function() {});
$tabSource.click();
setTimeout(function() {
var $prismHighlightLine = document.querySelector('.line-highlight'),
top = parseInt(getComputedStyle($prismHighlightLine)['top']);
$content.scrollTop = top;
}, 500);
};
window.onhashchange = function(event) {
switch (window.location.hash) {
case '':
case '#info':
$tabInfo.click();
break;
case '#readme':
$tabReadme.click();
break;
case '#source':
$tabSource.click();
break;
case '#template':
$tabTemplate.click();
break;
case '#dom-tree':
$tabTree.click();
break;
case '#example':
$tabExample.click();
break;
}
}
}
});

View File

@@ -0,0 +1,53 @@
document.addEventListener('DOMContentLoaded', function() {
if (document.getElementById('module-graph-svg')) {
panZoom = svgPanZoom(document.getElementById('module-graph-svg').querySelector('svg'), {
zoomEnabled: true,
minZoom: 1,
maxZoom: 5
});
document.getElementById('zoom-in').addEventListener('click', function(ev) {
ev.preventDefault();
panZoom.zoomIn();
});
document.getElementById('zoom-out').addEventListener('click', function(ev) {
ev.preventDefault();
panZoom.zoomOut();
});
document.getElementById('reset').addEventListener('click', function(ev) {
ev.preventDefault();
panZoom.resetZoom();
panZoom.resetPan();
});
var overviewFullscreen = false,
originalOverviewHeight;
document.getElementById('fullscreen').addEventListener('click', function(ev) {
if (overviewFullscreen) {
document.getElementById('module-graph-svg').style.height = originalOverviewHeight;
overviewFullscreen = false;
if (ev.target) {
ev.target.classList.remove('ion-md-close');
ev.target.classList.add('ion-ios-resize');
}
} else {
originalOverviewHeight = document.getElementById('module-graph-svg').style.height;
document.getElementById('module-graph-svg').style.height = '85vh';
overviewFullscreen = true;
if (ev.target) {
ev.target.classList.remove('ion-ios-resize');
ev.target.classList.add('ion-md-close');
}
}
document.getElementById('module-graph-svg').querySelector('svg').style.height = document.getElementById('module-graph-svg').clientHeight;
setTimeout(function() {
panZoom.resize();
panZoom.fit();
panZoom.center();
}, 0)
});
}
});

View File

@@ -0,0 +1,21 @@
document.addEventListener('DOMContentLoaded', function() {
var tabs = document.getElementsByClassName('nav-tabs'),
updateAddress = function(e) {
if(history.pushState && e.target.dataset.link) {
history.pushState(null, null, '#' + e.target.dataset.link);
}
};
if (tabs.length > 0) {
tabs = tabs[0].querySelectorAll('li');
for (var i = 0; i < tabs.length; i++) {
tabs[i].addEventListener('click', updateAddress);
var linkTag = tabs[i].querySelector('a');
if (location.hash !== '') {
var currentHash = location.hash.substr(1);
if (currentHash === linkTag.dataset.link) {
linkTag.click();
}
}
}
}
});

View File

@@ -0,0 +1,147 @@
document.addEventListener('DOMContentLoaded', function() {
var tabs = document.getElementsByClassName('nav-tabs')[0],
tabsCollection = tabs.getElementsByTagName('A'),
treeTab;
var len = tabsCollection.length;
for(var i = 0; i < len; i++) {
if (tabsCollection[i].getAttribute('id') === 'tree-tab') {
treeTab = tabsCollection[i];
}
}
// short-circuit if no tree tab
if (!treeTab) return;
var handler = new Tautologistics.NodeHtmlParser.HtmlBuilder(function(error, dom) {
if (error) {
console.log('handler ko');
}
}),
parser = new Tautologistics.NodeHtmlParser.Parser(handler),
currentLocation = window.location;
parser.parseComplete(COMPONENT_TEMPLATE);
var newNodes = [],
newEdges = [],
parsedHtml = handler.dom[0],
nodeCount = 0,
nodeLevel = 0;
newNodes.push({
_id: 0,
label: parsedHtml.name,
type: parsedHtml.type
})
//Add id for nodes
var traverseIds = function(o) {
for (i in o) {
if (!!o[i] && typeof(o[i]) == "object") {
if (!o[i].length && o[i].type === 'tag') {
nodeCount += 1;
o[i]._id = nodeCount;
}
traverseIds(o[i]);
}
}
}
parsedHtml._id = 0;
traverseIds(parsedHtml);
var DeepIterator = deepIterator.default,
it = DeepIterator(parsedHtml);
for (let {
value,
parent,
parentNode,
key,
type
} of it) {
if (type === 'NonIterableObject' && typeof key !== 'undefined' && value.type === 'tag') {
var newNode = {
id: value._id,
label: value.name,
type: value.type
};
for(var i = 0; i < COMPONENTS.length; i++) {
if (COMPONENTS[i].selector === value.name) {
newNode.font = {
multi: 'html'
};
newNode.label = '<b>' + newNode.label + '</b>';
newNode.color = '#FB7E81';
newNode.name = COMPONENTS[i].name;
}
}
for(var i = 0; i < DIRECTIVES.length; i++) {
if (value.attributes) {
for(attr in value.attributes) {
if (DIRECTIVES[i].selector.indexOf(attr) !== -1) {
newNode.font = {
multi: 'html'
};
newNode.label = '<b>' + newNode.label + '</b>';
newNode.color = '#FF9800';
newNode.name = DIRECTIVES[i].name;
}
}
}
}
newNodes.push(newNode);
newEdges.push({
from: parentNode._parent._id,
to: value._id,
arrows: 'to'
});
}
}
newNodes.shift();
var container = document.getElementById('tree-container'),
data = {
nodes: newNodes,
edges: newEdges
},
options = {
layout: {
hierarchical: {
sortMethod: 'directed',
enabled: true
}
},
nodes: {
shape: 'ellipse',
fixed: true
}
},
handleClickNode = function(params) {
var clickeNodeId;
if (params.nodes.length > 0) {
clickeNodeId = params.nodes[0];
for(var i = 0; i < newNodes.length; i++) {
if (newNodes[i].id === clickeNodeId) {
for(var j = 0; j < COMPONENTS.length; j++) {
if (COMPONENTS[j].name === newNodes[i].name) {
document.location.href = currentLocation.origin + currentLocation.pathname.replace(ACTUAL_COMPONENT.name, newNodes[i].name);
}
}
}
}
}
},
loadTree = function () {
setTimeout(function() {
container.style.height = document.getElementsByClassName('content')[0].offsetHeight - 140 + 'px';
var network = new vis.Network(container, data, options);
network.on('click', handleClickNode);
}, 200); // Fade is 0.150
};
loadTree();
treeTab.addEventListener('click', function() {
loadTree();
});
});