UNPKG

@rws-framework/client

Version:

This package provides the core client-side framework for Realtime Web Suit (RWS), enabling modular, asynchronous web components, state management, and integration with backend services. It is located in `.dev/client`.

180 lines 82.1 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Realtime Web Suite Client package</title><meta name="description" content="Documentation for Realtime Web Suite Client package"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script><link rel="stylesheet" href="assets/hierarchy.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">Realtime Web Suite Client package</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>Realtime Web Suite Client package</h2></div><div class="tsd-panel tsd-typography"><a id="md:realtime-web-suit-client-setup-and-configuration-guide" class="tsd-anchor"></a><h1><a href="#md:realtime-web-suit-client-setup-and-configuration-guide">Realtime Web Suit client setup and configuration guide</a></h1><p>Realtime Web Suit is a web-component powered, MS FAST powered fullstack-oriented framework that you can use to create domain-agnostic modular asynchoronous components with intershared authorized states.</p> <a id="md:table-of-contents" class="tsd-anchor"></a><h2><a href="#md:table-of-contents">Table of Contents</a></h2><ol> <li><a href="#md:overview">Overview</a></li> <li><a href="#md:getting-started">Getting Started</a></li> <li><a href="#md:key-components-rwsclient--routingservice">Key Components: RWSClient &amp; RoutingService</a></li> <li><a href="#md:component-initialization">Component Initialization</a></li> <li><a href="#md:dependency-injection">DI</a></li> <li><a href="#md:frontend-routes">Frontend routes</a></li> <li><a href="#md:backend-imports">Backend Imports</a></li> <li><a href="#md:utilizing-apiservice">Utilizing APIService</a></li> <li><a href="#md:notifier">Notifier</a></li> <li><a href="#md:service-worker">Service Worker</a></li> <li><a href="#md:example-webchat-component">Example: WebChat Component</a></li> <li><a href="#md:other-configs">Other configs</a></li> <li><a href="#md:plugin-system">Plugins</a></li> <li><a href="#md:links">Links</a></li> </ol> <a id="md:overview" class="tsd-anchor"></a><h2><a href="#md:overview">Overview</a></h2><p>The RWS Frontend Framework is designed to create dynamic and responsive web applications. It integrates seamlessly with the backend and provides a robust set of tools for developing comprehensive web solutions.</p> <a id="md:getting-started" class="tsd-anchor"></a><h2><a href="#md:getting-started">Getting Started</a></h2><p>To get started with the RWS Frontend Framework, ensure you have the necessary environment set up, including Node.js and any other dependencies specific to the framework.</p> <p>from your project dir do:</p> <pre><code class="language-bash"><span class="hl-0">yarn</span> </code><button>Copy</button></pre> <p>Initiate cfg files and webpack build:</p> <pre><code class="language-bash"><span class="hl-0">rws-client</span><span class="hl-1"> </span><span class="hl-2">init</span> </code><button>Copy</button></pre> <p>to install once and then to build after preparing components:</p> <pre><code class="language-bash"><span class="hl-0">yarn</span><span class="hl-1"> </span><span class="hl-2">build</span> </code><button>Copy</button></pre> <p>or to watch for dev</p> <pre><code class="language-bash"><span class="hl-0">yarn</span><span class="hl-1"> </span><span class="hl-2">watch</span> </code><button>Copy</button></pre> <p>or to just start server</p> <pre><code class="language-bash"><span class="hl-0">yarn</span><span class="hl-1"> </span><span class="hl-2">server</span> </code><button>Copy</button></pre> <p>then start engine in the site javascript (can be inline):</p> <pre><code class="language-javascript"><span class="hl-3">window</span><span class="hl-1">.</span><span class="hl-4">RWS</span><span class="hl-1">.</span><span class="hl-3">client</span><span class="hl-1">.</span><span class="hl-0">start</span><span class="hl-1">(</span><span class="hl-4">CFG</span><span class="hl-1">); </span><span class="hl-5">// it is async function</span> </code><button>Copy</button></pre> <p><em>or for initial setup then start on certain event (example)</em> </p> <pre><code class="language-javascript"><span class="hl-3">window</span><span class="hl-1">.</span><span class="hl-4">RWS</span><span class="hl-1">.</span><span class="hl-3">client</span><span class="hl-1">.</span><span class="hl-0">setup</span><span class="hl-1">(</span><span class="hl-4">CFG</span><span class="hl-1">).</span><span class="hl-0">then</span><span class="hl-1">(() </span><span class="hl-6">=&gt;</span><span class="hl-1"> { </span><span class="hl-5">// it is async function</span><br/><span class="hl-1"> </span><span class="hl-3">$</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;loaded&#39;</span><span class="hl-1">, </span><span class="hl-6">function</span><span class="hl-1">(</span><span class="hl-3">data</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">optionalNewCfg</span><span class="hl-1"> = { </span><span class="hl-3">backendRoutes:</span><span class="hl-1"> </span><span class="hl-3">data</span><span class="hl-1">.</span><span class="hl-3">backendRoutes</span><span class="hl-1"> };</span><br/><span class="hl-1"> </span><span class="hl-3">window</span><span class="hl-1">.</span><span class="hl-3">RWSClient</span><span class="hl-1">.</span><span class="hl-0">start</span><span class="hl-1">(</span><span class="hl-3">optionalNewCfg</span><span class="hl-1">).</span><span class="hl-0">then</span><span class="hl-1">();</span><br/><span class="hl-1"> }) </span><br/><span class="hl-1">});</span> </code><button>Copy</button></pre> <a id="md:default-config-for-rws" class="tsd-anchor"></a><h3><a href="#md:default-config-for-rws">default config for RWS:</a></h3><pre><code class="language-javascript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">_DEFAULT_CONFIG_VARS</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-5">//Build configs</span><br/><span class="hl-1"> </span><span class="hl-3">dev:</span><span class="hl-1"> </span><span class="hl-6">false</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">hot:</span><span class="hl-1"> </span><span class="hl-6">false</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">report:</span><span class="hl-1"> </span><span class="hl-6">false</span><span class="hl-1">, </span><br/><span class="hl-1"> </span><span class="hl-3">publicDir:</span><span class="hl-1"> </span><span class="hl-2">&#39;./public&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">publicIndex:</span><span class="hl-1"> </span><span class="hl-2">&#39;index.html&#39;</span><span class="hl-1">, </span><br/><span class="hl-1"> </span><span class="hl-3">outputFileName:</span><span class="hl-1"> </span><span class="hl-2">&#39;client.rws.js&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">outputDir:</span><span class="hl-1"> </span><span class="hl-3">process</span><span class="hl-1">.</span><span class="hl-0">cwd</span><span class="hl-1">() + </span><span class="hl-2">&#39;/build&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">//Frontend RWS client configs </span><br/><span class="hl-1"> </span><span class="hl-3">backendUrl:</span><span class="hl-1"> </span><span class="hl-6">null</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">wsUrl:</span><span class="hl-1"> </span><span class="hl-6">null</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">partedDirUrlPrefix:</span><span class="hl-1"> </span><span class="hl-2">&#39;/lib/rws&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">partedPrefix:</span><span class="hl-1"> </span><span class="hl-2">&#39;rws&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">pubUrlFilePrefix:</span><span class="hl-1"> </span><span class="hl-2">&#39;/&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">//Universal configs</span><br/><span class="hl-1"> </span><span class="hl-3">transports:</span><span class="hl-1"> [</span><span class="hl-2">&#39;websocket&#39;</span><span class="hl-1">], </span><br/><span class="hl-1"> </span><span class="hl-3">parted:</span><span class="hl-1"> </span><span class="hl-6">false</span><span class="hl-1">, </span><br/><span class="hl-1">}</span><br/> </code><button>Copy</button></pre> <p><em>The options description:</em></p> <table> <thead> <tr> <th><strong>Option</strong></th> <th><strong>Description</strong></th> <th><strong>Default</strong></th> </tr> </thead> <tbody><tr> <td>backendUrl</td> <td>Url for backend integration (API calls)</td> <td>null</td> </tr> <tr> <td>wsUrl</td> <td>Url for backend integration (Websocket calls)</td> <td>null</td> </tr> <tr> <td>backendRoutes</td> <td>Backend routes object imported from backend node for integration with API calls</td> <td>null</td> </tr> <tr> <td>apiPrefix</td> <td>Prefix for API calls</td> <td>/</td> </tr> <tr> <td>routes</td> <td>Routes for frontend routing</td> <td>{}</td> </tr> <tr> <td>transports</td> <td>Websockets transports method</td> <td>[&#39;websockets&#39;]</td> </tr> <tr> <td>user</td> <td>User object for backend auth / frontend data source</td> <td>null</td> </tr> <tr> <td>ignoreRWSComponents</td> <td>Do not declare base RWS components (uploader, progress)</td> <td>false</td> </tr> <tr> <td>pubUrlFilePrefix</td> <td>the url for accessing files from browser URL</td> <td>/</td> </tr> <tr> <td>pubUrl</td> <td>the url for accessing public dir from browser URL</td> <td>/</td> </tr> <tr> <td>outputDir</td> <td>build dir</td> <td>./build</td> </tr> <tr> <td>outputFileName</td> <td>output file name</td> <td>rws.client.js</td> </tr> <tr> <td>publicDir</td> <td>public dir for HTML serving</td> <td>./public</td> </tr> <tr> <td>tsConfigPath</td> <td>tsconfig.json path</td> <td>./tsconfig.njson</td> </tr> <tr> <td>entry</td> <td>default TS entry for transpilation</td> <td>./src/index.ts</td> </tr> <tr> <td>parted</td> <td>&quot;Parted&quot; mode if enabled. &quot;Monolith&quot; if disabled. Parted mode outputs every component as separate js file and asynchronously adds them to browser. Monolith is single file js build.</td> <td>false</td> </tr> <tr> <td>partedPrefix</td> <td>parted file prefix ([prefix].[cmp name].js)</td> <td>rws</td> </tr> <tr> <td>partedDirUrlPrefix</td> <td>URL for generated js parted files directory</td> <td>/</td> </tr> <tr> <td>copyAssets</td> <td>An option for defining structure that will be copied after build</td> <td>{}</td> </tr> </tbody></table> <p><em>copyAssets example</em></p> <pre><code class="language-json"><span class="hl-2">&quot;copyAssets&quot;</span><span class="hl-1">: {</span><br/><span class="hl-1"> </span><span class="hl-7">&quot;./public/js/&quot;</span><span class="hl-1">: [ </span><span class="hl-5">// target directory</span><br/><span class="hl-1"> </span><span class="hl-2">&quot;./build/&quot;</span><span class="hl-1">, </span><span class="hl-5">// copy this directory to target</span><br/><span class="hl-1"> </span><span class="hl-2">&quot;./src/styles/compiled/main.css&quot;</span><span class="hl-1"> </span><span class="hl-5">//copy this file to target</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1">}</span> </code><button>Copy</button></pre> <a id="md:the-front-config-ts-interface" class="tsd-anchor"></a><h3><a href="#md:the-front-config-ts-interface">The FRONT config TS interface:</a></h3><pre><code class="language-typescript"><span class="hl-6">interface</span><span class="hl-1"> </span><span class="hl-8">IRWSConfig</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">defaultLayout</span><span class="hl-1">?: </span><span class="hl-6">typeof</span><span class="hl-1"> </span><span class="hl-3">RWSViewComponent</span><br/><span class="hl-1"> </span><span class="hl-3">backendUrl</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">wsUrl</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">backendRoutes</span><span class="hl-1">?: </span><span class="hl-8">any</span><span class="hl-1">[]</span><br/><span class="hl-1"> </span><span class="hl-3">apiPrefix</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">routes</span><span class="hl-1">?: </span><span class="hl-8">IFrontRoutes</span><br/><span class="hl-1"> </span><span class="hl-3">transports</span><span class="hl-1">?: </span><span class="hl-8">string</span><span class="hl-1">[]</span><br/><span class="hl-1"> </span><span class="hl-3">user</span><span class="hl-1">?: </span><span class="hl-8">any</span><br/><span class="hl-1"> </span><span class="hl-3">ignoreRWSComponents</span><span class="hl-1">?: </span><span class="hl-8">boolean</span><br/><span class="hl-1"> </span><span class="hl-3">pubUrl</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">pubUrlFilePrefix</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">partedDirUrlPrefix</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">dontPushToSW</span><span class="hl-1">?: </span><span class="hl-8">boolean</span><br/><span class="hl-1"> </span><span class="hl-3">parted</span><span class="hl-1">?: </span><span class="hl-8">boolean</span><br/><span class="hl-1"> </span><span class="hl-3">partedFileDir</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">partedPrefix</span><span class="hl-1">?: </span><span class="hl-8">string</span><br/><span class="hl-1"> </span><span class="hl-3">routing_enabled</span><span class="hl-1">?: </span><span class="hl-8">boolean</span><br/><span class="hl-1"> </span><span class="hl-3">_noLoad</span><span class="hl-1">?: </span><span class="hl-8">boolean</span><span class="hl-1"> </span><br/><span class="hl-1">}</span> </code><button>Copy</button></pre> <a id="md:the-front-webpack-config" class="tsd-anchor"></a><h3><a href="#md:the-front-webpack-config">The FRONT webpack config:</a></h3><pre><code class="language-javascript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">path</span><span class="hl-1"> = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;path&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">RWSWebpackWrapper</span><span class="hl-1"> = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;@rws-framework/client/rws.webpack.config&#39;</span><span class="hl-1">);</span><br/><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">executionDir</span><span class="hl-1"> = </span><span class="hl-3">process</span><span class="hl-1">.</span><span class="hl-0">cwd</span><span class="hl-1">();</span><br/><br/><span class="hl-8">module</span><span class="hl-1">.</span><span class="hl-8">exports</span><span class="hl-1"> = </span><span class="hl-0">RWSWebpackWrapper</span><span class="hl-1">({ </span><br/><span class="hl-1"> </span><span class="hl-3">tsConfigPath:</span><span class="hl-1"> </span><span class="hl-3">executionDir</span><span class="hl-1"> + </span><span class="hl-2">&#39;/tsconfig.json&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">entry:</span><span class="hl-1"> </span><span class="hl-2">`</span><span class="hl-6">${</span><span class="hl-3">executionDir</span><span class="hl-6">}</span><span class="hl-2">/src/index.ts`</span><span class="hl-1">, </span><br/><span class="hl-1"> </span><span class="hl-3">publicDir:</span><span class="hl-1"> </span><span class="hl-3">path</span><span class="hl-1">.</span><span class="hl-0">resolve</span><span class="hl-1">(</span><span class="hl-3">executionDir</span><span class="hl-1">, </span><span class="hl-2">&#39;public&#39;</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">outputDir:</span><span class="hl-1"> </span><span class="hl-3">path</span><span class="hl-1">.</span><span class="hl-0">resolve</span><span class="hl-1">(</span><span class="hl-3">executionDir</span><span class="hl-1">, </span><span class="hl-2">&#39;build&#39;</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">outputFileName:</span><span class="hl-1"> </span><span class="hl-2">&#39;jtrainer.client.js&#39;</span><br/><span class="hl-1">});</span> </code><button>Copy</button></pre> <a id="md:key-components" class="tsd-anchor"></a><h2><a href="#md:key-components">Key Components</a></h2><a id="md:rwsclient" class="tsd-anchor"></a><h3><a href="#md:rwsclient">RWSClient</a></h3><a id="md:" class="tsd-anchor"></a><h2><a href="#md:"></a></h2><p><code>RWS.client</code> is the heart of the framework, managing configuration and initialization. It sets up routes, backend connections, and other essential framework services.</p> <a id="md:routingservice" class="tsd-anchor"></a><h3><a href="#md:routingservice">RoutingService</a></h3><p><code>RoutingService</code> handles the navigation and routing within your application. It ensures that URL changes reflect the correct component rendering.</p> <p><strong>Depreciation Notice</strong></p> <p><em><strong>RoutingService will be moved to @rws-framework/browser-router near future</strong></em></p> <a id="md:wsservice" class="tsd-anchor"></a><h3><a href="#md:wsservice">WSService</a></h3><p><code>WSService</code> handles Websockets messenging to the backend.</p> <p><strong>Depreciation Notice</strong> <em><strong>WSService will be moved to @rws-framework/nest-interconnectors in near future</strong></em></p> <a id="md:apiservice" class="tsd-anchor"></a><h3><a href="#md:apiservice">APIService</a></h3><p><code>APIService</code> handles API requests to the backend.</p> <p>Implementing the Framework</p> <p><strong>Main File:</strong></p> <p>The main file (<code>index.ts</code>) is where you initialize the RWSClient. Here, you configure your routes, backend routes, and component initializations.</p> <p>Following is example of full usage of the framework</p> <pre><code class="language-typescript"><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">initializeApp</span><span class="hl-1">() { </span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">theClient</span><span class="hl-1"> = </span><span class="hl-0">RWSContainer</span><span class="hl-1">().</span><span class="hl-0">get</span><span class="hl-1">(</span><span class="hl-3">RWSClient</span><span class="hl-1">); </span><br/><br/><span class="hl-1"> </span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-0">addRoutes</span><span class="hl-1">(</span><span class="hl-3">frontendRoutes</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-0">setBackendRoutes</span><span class="hl-1">(</span><span class="hl-0">backendRoutes</span><span class="hl-1">());</span><br/><br/><span class="hl-1"> </span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-0">enableRouting</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-0">onInit</span><span class="hl-1">(</span><span class="hl-6">async</span><span class="hl-1"> () </span><span class="hl-6">=&gt;</span><span class="hl-1"> { </span><br/><br/><span class="hl-1"> </span><span class="hl-5">// For single file output:</span><br/><span class="hl-1"> </span><span class="hl-0">initComponents</span><span class="hl-1">(</span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-3">appConfig</span><span class="hl-1">.</span><span class="hl-0">get</span><span class="hl-1">(</span><span class="hl-2">&#39;parted&#39;</span><span class="hl-1">)); </span><span class="hl-5">// start components for monolith mode </span><br/><span class="hl-1"> </span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-0">defineComponents</span><span class="hl-1">(); </span><span class="hl-5">// start RWS conponents</span><br/><br/><span class="hl-1"> </span><span class="hl-5">//custom outside components registering</span><br/><span class="hl-1"> </span><span class="hl-0">provideFASTDesignSystem</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">register</span><span class="hl-1">(</span><span class="hl-0">fastButton</span><span class="hl-1">())</span><br/><span class="hl-1"> .</span><span class="hl-0">register</span><span class="hl-1">(</span><span class="hl-0">fastTab</span><span class="hl-1">())</span><br/><span class="hl-1"> .</span><span class="hl-0">register</span><span class="hl-1">(</span><span class="hl-0">fastSlider</span><span class="hl-1">())</span><br/><span class="hl-1"> .</span><span class="hl-0">register</span><span class="hl-1">(</span><span class="hl-0">fastSelect</span><span class="hl-1">())</span><br/><span class="hl-1"> .</span><span class="hl-0">register</span><span class="hl-1">(</span><span class="hl-0">fastDivider</span><span class="hl-1">())</span><br/><span class="hl-1"> .</span><span class="hl-0">register</span><span class="hl-1">(</span><span class="hl-0">fastMenu</span><span class="hl-1">())</span><br/><span class="hl-1"> .</span><span class="hl-0">register</span><span class="hl-1">(</span><span class="hl-0">fastMenuItem</span><span class="hl-1">())</span><br/><span class="hl-1"> ;</span><br/><br/><span class="hl-1"> </span><span class="hl-5">// Service worker code</span><br/><span class="hl-1"> </span><span class="hl-5">// const swFilePath: string = `${theClient.appConfig.get(&#39;pubUrl&#39;)}/service_worker.js`; </span><br/><br/><span class="hl-1"> </span><span class="hl-5">// await theClient.swService.registerServiceWorker(); </span><br/><br/><span class="hl-1"> </span><span class="hl-5">//if(theClient.getUser()){</span><br/><span class="hl-1"> </span><span class="hl-5">// theClient.pushUserToServiceWorker({...theClient.getUser(), instructor: false}); </span><br/><span class="hl-1"> </span><span class="hl-5">//}</span><br/><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-0">setNotifier</span><span class="hl-1">((</span><span class="hl-3">message</span><span class="hl-1">: </span><span class="hl-8">string</span><span class="hl-1">, </span><span class="hl-3">logType</span><span class="hl-1">: </span><span class="hl-8">NotifyLogType</span><span class="hl-1">, </span><span class="hl-3">uiType</span><span class="hl-1">: </span><span class="hl-8">NotifyUiType</span><span class="hl-1"> = </span><span class="hl-2">&#39;notification&#39;</span><span class="hl-1">, </span><span class="hl-0">onConfirm</span><span class="hl-1">: (</span><span class="hl-3">params</span><span class="hl-1">: </span><span class="hl-8">any</span><span class="hl-1">) </span><span class="hl-6">=&gt;</span><span class="hl-1"> </span><span class="hl-8">void</span><span class="hl-1">, </span><span class="hl-3">notifierOptions</span><span class="hl-1">: </span><span class="hl-8">any</span><span class="hl-1"> = {}) </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-9">switch</span><span class="hl-1">(</span><span class="hl-3">uiType</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><span class="hl-9">case</span><span class="hl-1"> </span><span class="hl-2">&#39;notification&#39;</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-6">let</span><span class="hl-1"> </span><span class="hl-3">notifType</span><span class="hl-1"> = </span><span class="hl-2">&#39;success&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-9">if</span><span class="hl-1">(</span><span class="hl-3">logType</span><span class="hl-1"> === </span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><span class="hl-3">notifType</span><span class="hl-1"> = </span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-9">if</span><span class="hl-1">(</span><span class="hl-3">logType</span><span class="hl-1"> === </span><span class="hl-2">&#39;warning&#39;</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><span class="hl-3">notifType</span><span class="hl-1"> = </span><span class="hl-2">&#39;warning&#39;</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-9">return</span><span class="hl-1"> </span><span class="hl-3">alertify</span><span class="hl-1">.</span><span class="hl-0">notify</span><span class="hl-1">(</span><span class="hl-3">message</span><span class="hl-1">, </span><span class="hl-3">notifType</span><span class="hl-1">, </span><span class="hl-10">5</span><span class="hl-1">, </span><span class="hl-3">onConfirm</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-9">case</span><span class="hl-1"> </span><span class="hl-2">&#39;alert&#39;</span><span class="hl-1">: </span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">alertObj</span><span class="hl-1"> = </span><span class="hl-3">alertify</span><span class="hl-1">.</span><span class="hl-0">alert</span><span class="hl-1">(</span><span class="hl-2">&#39;Junction AI Notification&#39;</span><span class="hl-1">, </span><span class="hl-3">message</span><span class="hl-1">, </span><span class="hl-3">onConfirm</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-3">Object</span><span class="hl-1">.</span><span class="hl-0">keys</span><span class="hl-1">(</span><span class="hl-3">notifierOptions</span><span class="hl-1">).</span><span class="hl-0">forEach</span><span class="hl-1">(</span><span class="hl-3">key</span><span class="hl-1"> </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-4">optionValue</span><span class="hl-1"> = </span><span class="hl-3">notifierOptions</span><span class="hl-1">[</span><span class="hl-3">key</span><span class="hl-1">];</span><br/><br/><span class="hl-1"> </span><span class="hl-9">if</span><span class="hl-1">(</span><span class="hl-3">key</span><span class="hl-1"> === </span><span class="hl-2">&#39;width&#39;</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-3">alertObj</span><span class="hl-1">.</span><span class="hl-3">elements</span><span class="hl-1">.</span><span class="hl-3">dialog</span><span class="hl-1">.</span><span class="hl-3">style</span><span class="hl-1"> = </span><span class="hl-2">`max-width: </span><span class="hl-6">${</span><span class="hl-3">optionValue</span><span class="hl-6">}</span><span class="hl-2">;`</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-9">return</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">alertObj</span><span class="hl-1">.</span><span class="hl-0">set</span><span class="hl-1">(</span><span class="hl-3">key</span><span class="hl-1">, </span><span class="hl-3">optionValue</span><span class="hl-1">);</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-3">alertObj</span><span class="hl-1">.</span><span class="hl-0">show</span><span class="hl-1">();</span><br/><br/><span class="hl-1"> </span><span class="hl-9">return</span><span class="hl-1"> </span><span class="hl-3">alertObj</span><span class="hl-1">; </span><br/><span class="hl-1"> </span><span class="hl-9">case</span><span class="hl-1"> </span><span class="hl-2">&#39;silent&#39;</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-9">if</span><span class="hl-1">(</span><span class="hl-3">logType</span><span class="hl-1"> == </span><span class="hl-2">&#39;warning&#39;</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-0">warn</span><span class="hl-1">(</span><span class="hl-3">message</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><span class="hl-9">else</span><span class="hl-1"> </span><span class="hl-9">if</span><span class="hl-1">(</span><span class="hl-3">logType</span><span class="hl-1"> == </span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-3">message</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><span class="hl-9">else</span><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-3">message</span><span class="hl-1">);</span><br/><span class="hl-1"> } </span><br/><span class="hl-1"> </span><span class="hl-9">return</span><span class="hl-1">; </span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-3">theClient</span><span class="hl-1">.</span><span class="hl-0">assignClientToBrowser</span><span class="hl-1">();</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-0">initializeApp</span><span class="hl-1">().</span><span class="hl-0">catch</span><span class="hl-1">(</span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-3">error</span><span class="hl-1">);</span> </code><button>Copy</button></pre> <a id="md:component-initialization" class="tsd-anchor"></a><h2><a href="#md:component-initialization">Component Initialization</a></h2><p>In <code>application/_initComponents.ts</code>, you initialize the custom components used in your application. If components added in here will include other components they dont need to be listed here. A component imported in this mode needs to be imported once.</p> <p><strong>This should be conditioned not to execute imported code when using parted mode.</strong></p> <a id="md:default-component-structure" class="tsd-anchor"></a><h3><a href="#md:default-component-structure">Default component structure</a></h3><pre><code><span class="hl-3">component</span><span class="hl-1">-</span><span class="hl-3">dir</span><span class="hl-1">/</span><br/><span class="hl-1"> </span><span class="hl-3">component</span><span class="hl-1">.</span><span class="hl-3">ts</span><br/><span class="hl-1"> </span><span class="hl-3">template</span><span class="hl-1">.</span><span class="hl-3">html</span><br/><span class="hl-1"> </span><span class="hl-3">styles</span><span class="hl-1">/</span><br/><span class="hl-1"> </span><span class="hl-3">layout</span><span class="hl-1">.</span><span class="hl-3">scss</span> </code><button>Copy</button></pre> <p><strong>WARNING</strong> <em>All html templates refer to variable &quot;T&quot; as to FASTElement templating html scope. It contains all the functions FAST templates uses in html. F.e:</em> <strong>T.html</strong>, <strong>T.when</strong>, <strong>T.repeat</strong></p> <pre><code class="language-html"><span class="hl-11">&lt;</span><span class="hl-12">div</span><span class="hl-1"> </span><span class="hl-13">class</span><span class="hl-1">=</span><span class="hl-14">&quot;convo-area-wrap&quot;</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">header</span><span class="hl-11">&gt;</span><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">div</span><span class="hl-1"> </span><span class="hl-13">class</span><span class="hl-1">=</span><span class="hl-14">&quot;header-inner&quot;</span><span class="hl-11">&gt;&lt;/</span><span class="hl-12">div</span><span class="hl-11">&gt;</span><span class="hl-1"> </span><br/><span class="hl-1"> ${T.when(x =&gt; x.noChoose === &#39;false&#39;, (item, index) =&gt; T.html`</span><span class="hl-11">&lt;</span><span class="hl-12">div</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">chat-convo-models</span><span class="hl-1"> </span><span class="hl-13">:chosenModel</span><span class="hl-1">=</span><span class="hl-14">&quot;${x =&gt; x.chosenModel}&quot;</span><span class="hl-11">&gt;&lt;/</span><span class="hl-12">chat-convo-models</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;/</span><span class="hl-12">div</span><span class="hl-11">&gt;</span><span class="hl-1">`)}</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">div</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">h2</span><span class="hl-11">&gt;</span><span class="hl-1">${ x =&gt; x.chatContext ? x.chatContext.label : &#39;loading...&#39; }</span><span class="hl-11">&lt;/</span><span class="hl-12">h2</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">h3</span><span class="hl-11">&gt;&lt;</span><span class="hl-12">strong</span><span class="hl-11">&gt;</span><span class="hl-1">${ x =&gt; x.messageList.length }</span><span class="hl-11">&lt;/</span><span class="hl-12">strong</span><span class="hl-11">&gt;</span><span class="hl-1"> messages in total</span><span class="hl-11">&lt;/</span><span class="hl-12">h3</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;/</span><span class="hl-12">div</span><span class="hl-11">&gt;</span><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">fast-divider</span><span class="hl-11">&gt;&lt;/</span><span class="hl-12">fast-divider</span><span class="hl-11">&gt;</span><span class="hl-1"> </span><br/><span class="hl-1"> </span><span class="hl-11">&lt;/</span><span class="hl-12">header</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">section</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">div</span><span class="hl-1"> </span><span class="hl-13">class</span><span class="hl-1">=</span><span class="hl-14">&quot;scroll-area&quot;</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">div</span><span class="hl-1"> </span><span class="hl-13">class</span><span class="hl-1">=</span><span class="hl-14">&quot;scroll-content&quot;</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> ${T.repeat(x =&gt; x.messageList, (item, index) =&gt; T.html`</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">chat-convo-message</span><span class="hl-1"> </span><span class="hl-13">:contentReturn</span><span class="hl-1">=</span><span class="hl-14">&quot;${item =&gt; item}&quot;</span><span class="hl-1"> </span><span class="hl-13">:item</span><span class="hl-1">=</span><span class="hl-14">&quot;${item =&gt; item}&quot;</span><span class="hl-11">/&gt;</span><br/><span class="hl-1"> `)} </span><br/><span class="hl-1"> </span><br/><span class="hl-1"> ${T.when(x =&gt; !x.messageList.length, (item, index) =&gt; T.html`</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;</span><span class="hl-12">p</span><span class="hl-1"> </span><span class="hl-13">class</span><span class="hl-1">=</span><span class="hl-14">&quot;no-chat&quot;</span><span class="hl-11">&gt;</span><span class="hl-1">No messages</span><span class="hl-11">&lt;/</span><span class="hl-12">p</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> `)} </span><br/><span class="hl-1"> </span><span class="hl-11">&lt;/</span><span class="hl-12">div</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;/</span><span class="hl-12">div</span><span class="hl-11">&gt;</span><br/><span class="hl-1"> </span><span class="hl-11">&lt;/</span><span class="hl-12">section</span><span class="hl-11">&gt;</span><span class="hl-1"> </span><br/><br/><span class="hl-11">&lt;/</span><span class="hl-12">div</span><span class="hl-11">&gt;</span> </code><button>Copy</button></pre> <a id="md:application_initcomponentsts" class="tsd-anchor"></a><h3><a href="#md:application_initcomponentsts">application/_initComponents.ts</a></h3><p>Only if parted mode is false.</p> <pre><code class="language-typescript"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-3">ChatNav</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;../components/chat-nav/component&#39;</span><span class="hl-1">;</span><br/><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-3">DefaultLayout</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;../components/default-layout/component&#39;</span><span class="hl-1">;</span><br/><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-3">RWSIcon</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;../components/rws-icon/component&#39;</span><span class="hl-1">;</span><br/><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-3">LineSplitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;../components/line-splitter/component&#39;</span><span class="hl-1">;</span><br/><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-3">WebChat</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;../components/webchat/component&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-9">export</span><span class="hl-1"> </span><span class="hl-9">default</span><span class="hl-1"> (</span><span class="hl-3">partedMode</span><span class="hl-1">: </span><span class="hl-8">boolean</span><span class="hl-1"> = </span><span class="hl-6">false</span><span class="hl-1">) </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-9">if</span><span class="hl-1">(!</span><span class="hl-3">partedMode</span><span class="hl-1">){</span><br/><span class="hl-1"> </span><span class="hl-3">WebChat</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">LineSplitter</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">DefaultLayout</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">ChatNav</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">RWSIcon</span><span class="hl-1">; </span><br/><span class="hl-1"> }</span><br/><span class="hl-1">};</span> </code><button>Copy</button></pre> <p>**Component needs to extend RWSViewComponent and use</p> </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><ul><li><a href="#md:realtime-web-suit-client-setup-and-configuration-guide"><span>Realtime <wbr/>Web <wbr/>Suit client setup and configuration guide</span></a></li><li><ul><li><a href="#md:table-of-contents"><span>Table of <wbr/>Contents</span></a></li><li><a href="#md:overview"><span>Overview</span></a></li><li><a href="#md:getting-started"><span>Getting <wbr/>Started</span></a></li><li><ul><li><a href="#md:default-config-for-rws"><span>default config for RWS:</span></a></li><li><a href="#md:the-front-config-ts-interface"><span>The FRONT config TS interface:</span></a></li><li><a href="#md:the-front-webpack-config"><span>The FRONT webpack config:</span></a></li></ul></li><li><a href="#md:key-components"><span>Key <wbr/>Components</span></a></li><li><ul><li><a href="#md:rwsclient"><span>RWSClient</span></a></li></ul></li><li><a href="#md:"><span></span></a></li><li><ul><li><a href="#md:routingservice"><span>Routing<wbr/>Service</span></a></li><li><a href="#md:wsservice"><span>WSService</span></a></li><li><a href="#md:apiservice"><span>APIService</span></a></li></ul></li><li><a href="#md:component-initialization"><span>Component <wbr/>Initialization</span></a></li><li><ul><li><a href="#md:default-component-structure"><span>Default component structure</span></a></li><li><a href="#md:application_initcomponentsts"><span>application/_<wbr/>init<wbr/>Components.ts</span></a></li></ul></li></ul></li></ul></li></ul></div></details></div><div class="site-menu"><div class="tree"><div class="tree-config"><button class="tree-config__button tree-config__button--expand js-tree-expand" title="Expand All"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 490.72 490.72" fill="currentColor"><path d="M480.027,288.027H10.693c-5.867,0-10.667,4.8-10.667,10.667c0,5.867,4.8,10.667,10.667,10.667h213.333v144.96l-45.76-45.76c-4.267-4.053-10.987-3.947-15.04,0.213c-3.947,4.16-3.947,10.667,0,14.827l64,64c4.16,4.16,10.88,4.16,15.04,0l64-64c4.053-4.267,3.947-10.987-0.213-15.04c-4.16-3.947-10.667-3.947-14.827,0l-45.867,45.76V309.36h234.667c5.867,0,10.667-4.8,10.667-10.667C490.693,292.827,485.893,288.027,480.027,288.027z"></path><path d="M10.693,224.027h469.333c5.867,0,10.667-4.8,10.667-10.667c0-5.867-4.8-10.667-10.667-10.667H245.36V36.4l45.76,45.76c4.267,4.053,10.987,3.947,15.04-0.213c3.947-4.16,3.947-10.667,0-14.827l-64-64c-4.16-4.16-10.88-4.16-15.04,0l-64,64c-4.053,4.267-3.947,10.987,0.213,15.04c4.16,3.947,10.667,3.947,14.827,0l45.867-45.76v166.293H10.693c-5.867,0-10.667,4.8-10.667,10.667C0.027,219.227,4.827,224.027,10.693,224.027z"></path></svg></button><button class="tree-config__button tree-config__button--collapse js-tree-collapse" title="Collapse All"><svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13A.5.5 0 0 1 1 8zm7-8a.5.5 0 0 1 .5.5v3.793l1.146-1.147a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 1 1 .708-.708L7.5 4.293V.5A.5.5 0 0 1 8 0zm-.5 11.707-1.146 1.147a.5.5 0 0 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 11.707V15.5a.5.5 0 0 1-1 0v-3.793z"></path></svg></button><button class="tree-config__button tree-config__button--target js-tree-target" title="Scroll to current file"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><circle cx="12" cy="12" r="3"></circle><path d="M13 4.069V2h-2v2.069A8.008 8.008 0 0 0 4.069 11H2v2h2.069A8.007 8.007 0 0 0 11 19.931V22h2v-2.069A8.007 8.007 0 0 0 19.931 13H22v-2h-2.069A8.008 8.008 0 0 0 13 4.069zM12 18c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"></path></svg></button></div><div class="tree-content"><ul class="js-category-list category" data-id="root"><li><span class="js-category-title category__title" data-id="root-src"><div class="category__folder" data-id="root-src"></div>src</span><ul class="js-category-list category" data-id="root-src"><li><span class="js-category-title category__title" data-id="root-src-services"><di