@botfabrik/engine-webclient 4.64.5 → 4.64.6-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -329,6 +329,16 @@ Um den Server- und Client-Teil des Webclients lokal zu entwickeln (leider ohne H
329
329
  1. Nun das Chatbot-Projekt starten mit `npm start`
330
330
  1. Bei Änderungen an der Engine muss jeweils im Ordner des Webclient-Packages `npm run build` ausgeführt werden und das Projekt neu gestartet werden mit `npm start`.
331
331
 
332
+ ### Embed
333
+
334
+ Um nur die Embed-Seite zu entwickeln, kann ein lokaler Server ohne Konfiguration gestartet werden:
335
+
336
+ 1. In das Verzeichnis des Webclient wechseln (`packages/engine-webclient`)
337
+ 1. `npm run dev:embed`
338
+ 1. `localhost:3000/` im Browser öffnen
339
+ 1. `./src/views/index.ts` bearbeiten
340
+ 1. Refresh im Browser (CMD-R)
341
+
332
342
  ## Google Speech-to-Text API
333
343
 
334
344
  Das Google-Speech-to-Text API muss für das entsprechende Projekt aktiviert werden. Zudem muss der Service Account über die entsprechenden Rollen verfügen. Siehe:
@@ -1,25 +1,22 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
2
- <svg width="100%" height="100%" viewBox="0 0 22491 7169" version="1.1"
1
+ <svg width="100%" height="100%" viewBox="0 0 23313 6000" version="1.1"
3
2
  xmlns="http://www.w3.org/2000/svg"
4
3
  xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
5
- xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
6
- <g>
7
- <path d="M22488.6,1379.69c0,-760.491 -617.422,-1377.91 -1377.91,-1377.91l-19730.6,0c-760.491,0 -1377.91,617.422 -1377.91,1377.91l0,2755.83c0,760.491 617.422,1377.91 1377.91,1377.91l5930.17,0l-151.21,1653.15l3524.17,-1653.15l10427.4,0c760.49,0 1377.91,-617.421 1377.91,-1377.91l0,-2755.83Z" style="fill:#fff;"/>
8
- <g>
9
- <g>
10
- <path d="M1592.76,1680.94l0,2240.46l995.351,0c657.445,0 995.35,-205.681 995.35,-609.698c0,-297.503 -150.588,-473.801 -455.437,-554.605c190.99,-77.13 312.195,-216.7 312.195,-433.4c0,-422.381 -301.176,-642.754 -877.818,-642.754l-969.641,0Zm686.829,877.819l-0,-341.578l282.812,-0c157.933,-0 227.718,51.42 227.718,168.952c0,110.187 -66.112,172.626 -183.644,172.626l-326.886,-0Zm-0,819.052l-0,-381.979l326.886,-0c172.626,-0 268.12,66.111 268.12,183.644c0,139.569 -84.476,198.335 -279.138,198.335l-315.868,0Z" style="fill:#8748d7;fill-rule:nonzero;"/>
11
- <path d="M5577.83,3921.39l0,-1788.69l-664.791,-0l0,1043.1c-84.476,99.167 -187.317,168.952 -297.503,168.952c-135.897,0 -165.28,-62.439 -165.28,-249.756l0,-962.294l-664.791,-0l-0,1138.59c-0,484.82 205.681,683.155 580.315,683.155c202.008,0 315.868,-88.149 547.259,-242.41l0,209.354l664.791,0Z" style="fill:#8748d7;fill-rule:nonzero;"/>
12
- <path d="M6558.49,1559.73l-664.791,0l0,2361.66l664.791,0l0,-202.008c139.57,150.588 238.738,235.064 510.531,235.064c370.961,0 697.847,-279.139 697.847,-947.603c0,-631.735 -224.046,-903.528 -661.118,-903.528c-205.682,-0 -370.961,73.457 -547.26,249.755l0,-793.342Zm0,1270.82c88.15,-113.859 179.972,-172.625 301.177,-172.625c161.606,-0 249.755,102.84 249.755,348.923c0,279.139 -95.494,400.344 -264.447,400.344c-135.897,0 -213.027,-55.093 -286.485,-161.607l0,-415.035Z" style="fill:#8748d7;fill-rule:nonzero;"/>
13
- <path d="M8663.05,1559.73l-664.792,0l0,2361.66l664.792,0l-0,-202.008c139.569,150.588 238.737,235.064 510.53,235.064c370.961,0 697.847,-279.139 697.847,-947.603c0,-631.735 -224.045,-903.528 -661.118,-903.528c-205.681,-0 -370.961,73.457 -547.259,249.755l-0,-793.342Zm-0,1270.82c88.149,-113.859 179.971,-172.625 301.176,-172.625c161.607,-0 249.756,102.84 249.756,348.923c-0,279.139 -95.495,400.344 -264.448,400.344c-135.896,0 -213.027,-55.093 -286.484,-161.607l-0,-415.035Z" style="fill:#8748d7;fill-rule:nonzero;"/>
14
- <rect x="10102.8" y="1559.73" width="664.791" height="2361.66" style="fill:#8748d7;fill-rule:nonzero;"/>
15
- <path d="M12560,3289.66c-227.719,106.513 -385.653,154.261 -628.063,154.261c-179.971,-0 -271.793,-69.785 -304.849,-238.737l1105.54,-0c11.019,-102.841 14.692,-168.953 14.692,-249.756c-0,-550.932 -326.887,-855.781 -844.763,-855.781c-576.642,-0 -918.22,330.559 -918.22,940.257c0,595.007 352.597,914.547 918.22,914.547c304.849,0 558.278,-84.476 844.763,-286.484l-187.317,-378.307Zm-936.585,-440.746c29.383,-198.335 128.551,-293.83 279.139,-293.83c168.953,-0 260.775,102.841 268.121,293.83l-547.26,0Z" style="fill:#8748d7;fill-rule:nonzero;"/>
16
- </g>
17
- <g>
18
- <path d="M15241.9,3190.49c-319.541,117.532 -477.475,150.588 -708.866,150.588c-282.812,0 -462.783,-198.335 -466.456,-532.567c-0,-370.961 176.298,-550.932 499.512,-550.932c168.952,-0 330.559,33.056 617.043,106.513l202.009,-517.876c-275.466,-135.897 -565.624,-202.008 -848.436,-202.008c-727.23,-0 -1164.3,418.708 -1164.3,1164.3c0,734.576 437.073,1145.94 1127.58,1145.94c337.905,0 613.371,-73.457 962.294,-253.428l-220.372,-510.531Z" style="fill:#8748d7;fill-rule:nonzero;"/>
19
- <path d="M16310.7,1559.73l-664.792,0l0,2361.66l664.792,0l-0,-1010.04c88.149,-99.167 183.644,-165.279 297.503,-165.279c135.897,-0 165.28,58.766 165.28,246.083l-0,929.238l664.791,0l-0,-1138.59c-0,-484.82 -143.242,-679.482 -517.876,-679.482c-202.009,-0 -374.634,84.476 -609.698,286.484l-0,-830.071Z" style="fill:#8748d7;fill-rule:nonzero;"/>
20
- <path d="M17897.3,2679.96c249.756,-51.421 440.746,-77.131 569.296,-77.131c179.972,0 224.046,77.131 224.046,231.392l-312.195,-0c-503.184,-0 -756.613,176.298 -756.613,554.605c-0,437.072 213.027,565.623 583.988,565.623c194.663,0 348.924,-88.149 484.82,-242.41l0,209.354l657.446,0l-0,-1087.17c-0,-517.876 -224.046,-734.576 -756.614,-734.576c-179.971,-0 -359.942,22.037 -793.342,139.569l99.168,440.746Zm793.342,466.456l0,224.045c-69.785,58.766 -154.261,106.514 -260.774,106.514c-113.86,-0 -190.99,-66.112 -190.99,-172.626c-0,-117.532 84.476,-157.933 231.391,-157.933l220.373,-0Z" style="fill:#8748d7;fill-rule:nonzero;"/>
21
- <path d="M20832,3418.21c-84.476,3.673 -150.588,3.673 -227.718,3.673c-165.28,-0 -205.682,-77.131 -205.682,-209.355l0,-528.894l418.709,-0l-0,-547.259l-418.709,-0l0,-381.98l-664.791,-0l0,381.98l-242.41,-0l0,547.259l242.41,-0l0,558.278c0,510.53 183.644,708.865 613.371,708.865c198.336,0 426.054,-55.093 550.932,-132.223l-66.112,-400.344Z" style="fill:#8748d7;fill-rule:nonzero;"/>
22
- </g>
23
- </g>
4
+ style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
5
+ <g transform="translate(-400, 600) scale(0.7)">
6
+ <path d="M6432,1430.86c0,-788.293 -639.994,-1428.29 -1428.29,-1428.29l-2600,0c-788.293,0 -1428.29,639.995 -1428.29,1428.29l0,2856.58c0,788.294 639.995,1428.29 1428.29,1428.29l50.97,0l-156.737,1713.59l2653.01,-1713.59l50,0c788.293,0 1428.29,-639.994 1428.29,-1428.29l0,-2856.58Z" fill="#85FF00"/>
7
+ <path transform="scale(1.5)" d="M1500,730l0,2322.37l1031.74,0c681.481,0 1031.74,-213.201 1031.74,-631.988c-0,-308.38 -156.094,-491.123 -472.088,-574.881c197.973,-79.95 323.609,-224.622 323.609,-449.245c-0,-437.823 -312.187,-666.252 -909.911,-666.252l-1005.09,-0Zm711.939,909.911l-0,-354.066l293.151,-0c163.708,-0 236.044,53.3 236.044,175.129c-0,114.215 -68.529,178.937 -190.358,178.937l-338.837,-0Zm-0,848.996l-0,-395.945l338.837,0c178.936,0 277.922,68.529 277.922,190.358c0,144.672 -87.564,205.587 -289.344,205.587l-327.415,-0Z" fill="#063062"/>
24
8
  </g>
25
- </svg>
9
+ <g transform="translate(4000 260) scale(0.8) ">
10
+ <path d="M15787.6,3224.92c-331.223,121.829 -494.931,156.093 -734.782,156.093c-293.151,0 -479.702,-205.586 -483.509,-552.038c0,-384.523 182.744,-571.073 517.774,-571.073c175.129,-0 342.644,34.264 639.602,110.407l209.394,-536.809c-285.537,-140.865 -586.303,-209.394 -879.454,-209.394c-753.817,0 -1206.87,434.016 -1206.87,1206.87c0,761.432 453.052,1187.83 1168.8,1187.83c350.258,0 635.795,-76.143 997.475,-262.693l-228.429,-529.195Z" fill="white"/>
11
+ <path d="M16895.5,1534.55l-689.095,-0l-0,2448l689.095,0l0,-1046.97c91.372,-102.794 190.358,-171.322 308.38,-171.322c140.865,-0 171.322,60.914 171.322,255.079l0,963.211l689.096,0l-0,-1180.22c-0,-502.545 -148.479,-704.324 -536.809,-704.324c-209.394,-0 -388.33,87.565 -631.989,296.958l0,-860.417Z" fill="white"/>
12
+ <path d="M18540.2,2695.73c258.886,-53.3 456.859,-79.951 590.109,-79.951c186.551,0 232.237,79.951 232.237,239.851l-323.609,0c-521.58,0 -784.274,182.744 -784.274,574.881c-0,453.052 220.815,586.302 605.338,586.302c201.779,0 361.68,-91.371 502.545,-251.272l-0,217.008l681.481,0l-0,-1126.92c-0,-536.809 -232.237,-761.431 -784.275,-761.431c-186.55,-0 -373.101,22.843 -822.346,144.672l102.794,456.859Zm822.346,483.509l-0,232.236c-72.336,60.915 -159.901,110.408 -270.309,110.408c-118.021,-0 -197.972,-68.529 -197.972,-178.936c0,-121.83 87.565,-163.708 239.851,-163.708l228.43,-0Z" fill="white"/>
13
+ <path d="M21582.1,3460.97c-87.565,3.808 -156.094,3.808 -236.044,3.808c-171.322,-0 -213.201,-79.951 -213.201,-217.008l0,-548.231l434.016,-0l-0,-567.267l-434.016,0l0,-395.944l-689.096,-0l0,395.944l-251.272,0l0,567.267l251.272,-0l0,578.688c0,529.195 190.358,734.781 635.796,734.781c205.586,0 441.63,-57.107 571.073,-137.057l-68.528,-414.981Z" fill="white"/>
14
+
15
+ <path d="M1660.64,1660.18l0,2322.37l1031.74,0c681.481,0 1031.74,-213.201 1031.74,-631.988c-0,-308.38 -156.094,-491.123 -472.088,-574.881c197.973,-79.95 323.609,-224.622 323.609,-449.245c-0,-437.823 -312.187,-666.252 -909.911,-666.252l-1005.09,-0Zm711.939,909.911l-0,-354.066l293.151,-0c163.708,-0 236.044,53.3 236.044,175.129c-0,114.215 -68.529,178.937 -190.358,178.937l-338.837,-0Zm-0,848.996l-0,-395.945l338.837,0c178.936,0 277.922,68.529 277.922,190.358c0,144.672 -87.564,205.587 -289.344,205.587l-327.415,-0Z" fill="white"/>
16
+ <path d="M5791.4,3982.55l-0,-1854.09l-689.096,0l0,1081.23c-87.565,102.793 -194.165,175.129 -308.38,175.129c-140.865,0 -171.322,-64.721 -171.322,-258.886l0,-997.476l-689.095,0l-0,1180.22c-0,502.545 213.2,708.131 601.531,708.131c209.393,0 327.415,-91.371 567.266,-251.272l0,217.008l689.096,0Z" fill="white"/>
17
+ <path d="M6807.91,1534.55l-689.096,-0l0,2448l689.096,0l-0,-209.394c144.672,156.094 247.465,243.658 529.195,243.658c384.523,0 723.36,-289.344 723.36,-982.246c-0,-654.831 -232.237,-936.561 -685.289,-936.561c-213.201,-0 -384.523,76.143 -567.266,258.887l-0,-822.346Zm-0,1317.28c91.371,-118.022 186.55,-178.936 312.187,-178.936c167.515,-0 258.886,106.6 258.886,361.68c0,289.344 -98.986,414.98 -274.115,414.98c-140.865,-0 -220.815,-57.107 -296.958,-167.515l-0,-430.209Z" fill="white"/>
18
+ <path d="M8989.42,1534.55l-689.096,-0l0,2448l689.096,0l0,-209.394c144.672,156.094 247.465,243.658 529.195,243.658c384.523,0 723.36,-289.344 723.36,-982.246c-0,-654.831 -232.237,-936.561 -685.288,-936.561c-213.201,-0 -384.523,76.143 -567.267,258.887l0,-822.346Zm0,1317.28c91.372,-118.022 186.551,-178.936 312.187,-178.936c167.515,-0 258.887,106.6 258.887,361.68c-0,289.344 -98.986,414.98 -274.116,414.98c-140.865,-0 -220.815,-57.107 -296.958,-167.515l0,-430.209Z" fill="white"/>
19
+ <rect x="10481.8" y="1534.55" width="689.096" height="2448" fill="white"/>
20
+ <path d="M13028.8,3327.72c-236.043,110.407 -399.751,159.901 -651.024,159.901c-186.55,-0 -281.729,-72.336 -315.994,-247.466l1145.95,0c11.421,-106.6 15.228,-175.129 15.228,-258.886c0,-571.074 -338.837,-887.068 -875.646,-887.068c-597.724,-0 -951.789,342.644 -951.789,974.632c-0,616.76 365.487,947.982 951.789,947.982c315.994,0 578.688,-87.564 875.646,-296.958l-194.165,-392.137Zm-970.825,-456.859c30.457,-205.587 133.251,-304.573 289.344,-304.573c175.129,0 270.308,106.601 277.923,304.573l-567.267,-0Z" fill="white"/>
21
+ </g>
22
+ </svg>
@@ -9,12 +9,12 @@ const index = (server, scriptUrl) => `<!DOCTYPE html>
9
9
 
10
10
  <link rel="preconnect" href="https://fonts.googleapis.com">
11
11
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12
- <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;600&display=swap" rel="stylesheet">
12
+ <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;600&display=swap" rel="stylesheet">
13
13
 
14
14
  <title>Bubble Chat: Webclient für Ihren Chatbot</title>
15
15
  <style>
16
16
  html {
17
- font-family: 'Poppins', sans-serif;
17
+ font-family: 'Montserrat', sans-serif;
18
18
  height: 100%;
19
19
  }
20
20
  body {
@@ -25,8 +25,15 @@ const index = (server, scriptUrl) => `<!DOCTYPE html>
25
25
  }
26
26
  header {
27
27
  color: white;
28
- background: linear-gradient(216deg,#eb2f96,#2f55eb 80%,#2f55eb);
29
- padding: 3em 0;
28
+ padding: 3rem 0;
29
+ background-image: linear-gradient(
30
+ to right bottom,
31
+ rgb(17, 126, 255),
32
+ rgb(11, 28, 57)
33
+ );
34
+ background-size: 300%;
35
+ animation: animatedGradient 8s ease infinite;
36
+
30
37
  }
31
38
  main {
32
39
  display: flex;
@@ -34,17 +41,20 @@ const index = (server, scriptUrl) => `<!DOCTYPE html>
34
41
  padding: 4em 0;
35
42
  min-width: 0; // needed for overflow on pre to work
36
43
  }
37
- header h1 {
44
+ h1 {
38
45
  margin: 0
39
46
  }
40
- header h2 {
47
+ h2 {
41
48
  margin: 0
42
49
  }
50
+ a {
51
+ color: #063062;
52
+ }
43
53
  a.button {
44
54
  display: inline-block;
45
55
  font-weight: bold;
46
- color: #2f55eb;
47
- border: 2px solid #2f55eb;
56
+ color: #85FF00;
57
+ background-color: #063062;
48
58
  border-radius: 0.4em;
49
59
  padding: 0.8em 1.6em;
50
60
  margin: 1em 1em 0 0;
@@ -58,21 +68,58 @@ const index = (server, scriptUrl) => `<!DOCTYPE html>
58
68
  overflow-x: auto;
59
69
  }
60
70
  .container {
61
- max-width: 1280px;
71
+ max-width: 1024px;
62
72
  margin-left: auto;
63
73
  margin-right: auto;
64
- padding: 1.5em;
74
+ padding: 2rem;
65
75
  }
66
76
  .container h3 {
67
77
  margin-top: 2rem;
68
78
  }
79
+
80
+ @keyframes animatedGradient {
81
+ 0% {
82
+ background-position: 0 50%;
83
+ }
84
+
85
+ 50% {
86
+ background-position: 100% 50%;
87
+ }
88
+ 100% {
89
+ background-position: 0 50%;
90
+ }
91
+ }
69
92
  </style>
70
93
  </head>
71
94
  <body>
72
95
  <header>
73
96
  <div class="container">
74
- <h2>Bubble Chat</h2>
75
- <h1>Webclient für Ihren Chatbot</h1>
97
+ <div style="width: 16rem;">
98
+ <svg width="100%" height="100%" viewBox="0 0 23313 6000" version="1.1"
99
+ xmlns="http://www.w3.org/2000/svg"
100
+ xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
101
+ style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
102
+ <g transform="translate(-400, 600) scale(0.7)">
103
+ <path d="M6432,1430.86c0,-788.293 -639.994,-1428.29 -1428.29,-1428.29l-2600,0c-788.293,0 -1428.29,639.995 -1428.29,1428.29l0,2856.58c0,788.294 639.995,1428.29 1428.29,1428.29l50.97,0l-156.737,1713.59l2653.01,-1713.59l50,0c788.293,0 1428.29,-639.994 1428.29,-1428.29l0,-2856.58Z" fill="#85FF00"/>
104
+ <path transform="scale(1.5)" d="M1500,730l0,2322.37l1031.74,0c681.481,0 1031.74,-213.201 1031.74,-631.988c-0,-308.38 -156.094,-491.123 -472.088,-574.881c197.973,-79.95 323.609,-224.622 323.609,-449.245c-0,-437.823 -312.187,-666.252 -909.911,-666.252l-1005.09,-0Zm711.939,909.911l-0,-354.066l293.151,-0c163.708,-0 236.044,53.3 236.044,175.129c-0,114.215 -68.529,178.937 -190.358,178.937l-338.837,-0Zm-0,848.996l-0,-395.945l338.837,0c178.936,0 277.922,68.529 277.922,190.358c0,144.672 -87.564,205.587 -289.344,205.587l-327.415,-0Z" fill="#063062"/>
105
+ </g>
106
+ <g transform="translate(4000 260) scale(0.8) ">
107
+ <path d="M15787.6,3224.92c-331.223,121.829 -494.931,156.093 -734.782,156.093c-293.151,0 -479.702,-205.586 -483.509,-552.038c0,-384.523 182.744,-571.073 517.774,-571.073c175.129,-0 342.644,34.264 639.602,110.407l209.394,-536.809c-285.537,-140.865 -586.303,-209.394 -879.454,-209.394c-753.817,0 -1206.87,434.016 -1206.87,1206.87c0,761.432 453.052,1187.83 1168.8,1187.83c350.258,0 635.795,-76.143 997.475,-262.693l-228.429,-529.195Z" fill="white"/>
108
+ <path d="M16895.5,1534.55l-689.095,-0l-0,2448l689.095,0l0,-1046.97c91.372,-102.794 190.358,-171.322 308.38,-171.322c140.865,-0 171.322,60.914 171.322,255.079l0,963.211l689.096,0l-0,-1180.22c-0,-502.545 -148.479,-704.324 -536.809,-704.324c-209.394,-0 -388.33,87.565 -631.989,296.958l0,-860.417Z" fill="white"/>
109
+ <path d="M18540.2,2695.73c258.886,-53.3 456.859,-79.951 590.109,-79.951c186.551,0 232.237,79.951 232.237,239.851l-323.609,0c-521.58,0 -784.274,182.744 -784.274,574.881c-0,453.052 220.815,586.302 605.338,586.302c201.779,0 361.68,-91.371 502.545,-251.272l-0,217.008l681.481,0l-0,-1126.92c-0,-536.809 -232.237,-761.431 -784.275,-761.431c-186.55,-0 -373.101,22.843 -822.346,144.672l102.794,456.859Zm822.346,483.509l-0,232.236c-72.336,60.915 -159.901,110.408 -270.309,110.408c-118.021,-0 -197.972,-68.529 -197.972,-178.936c0,-121.83 87.565,-163.708 239.851,-163.708l228.43,-0Z" fill="white"/>
110
+ <path d="M21582.1,3460.97c-87.565,3.808 -156.094,3.808 -236.044,3.808c-171.322,-0 -213.201,-79.951 -213.201,-217.008l0,-548.231l434.016,-0l-0,-567.267l-434.016,0l0,-395.944l-689.096,-0l0,395.944l-251.272,0l0,567.267l251.272,-0l0,578.688c0,529.195 190.358,734.781 635.796,734.781c205.586,0 441.63,-57.107 571.073,-137.057l-68.528,-414.981Z" fill="white"/>
111
+
112
+ <path d="M1660.64,1660.18l0,2322.37l1031.74,0c681.481,0 1031.74,-213.201 1031.74,-631.988c-0,-308.38 -156.094,-491.123 -472.088,-574.881c197.973,-79.95 323.609,-224.622 323.609,-449.245c-0,-437.823 -312.187,-666.252 -909.911,-666.252l-1005.09,-0Zm711.939,909.911l-0,-354.066l293.151,-0c163.708,-0 236.044,53.3 236.044,175.129c-0,114.215 -68.529,178.937 -190.358,178.937l-338.837,-0Zm-0,848.996l-0,-395.945l338.837,0c178.936,0 277.922,68.529 277.922,190.358c0,144.672 -87.564,205.587 -289.344,205.587l-327.415,-0Z" fill="white"/>
113
+ <path d="M5791.4,3982.55l-0,-1854.09l-689.096,0l0,1081.23c-87.565,102.793 -194.165,175.129 -308.38,175.129c-140.865,0 -171.322,-64.721 -171.322,-258.886l0,-997.476l-689.095,0l-0,1180.22c-0,502.545 213.2,708.131 601.531,708.131c209.393,0 327.415,-91.371 567.266,-251.272l0,217.008l689.096,0Z" fill="white"/>
114
+ <path d="M6807.91,1534.55l-689.096,-0l0,2448l689.096,0l-0,-209.394c144.672,156.094 247.465,243.658 529.195,243.658c384.523,0 723.36,-289.344 723.36,-982.246c-0,-654.831 -232.237,-936.561 -685.289,-936.561c-213.201,-0 -384.523,76.143 -567.266,258.887l-0,-822.346Zm-0,1317.28c91.371,-118.022 186.55,-178.936 312.187,-178.936c167.515,-0 258.886,106.6 258.886,361.68c0,289.344 -98.986,414.98 -274.115,414.98c-140.865,-0 -220.815,-57.107 -296.958,-167.515l-0,-430.209Z" fill="white"/>
115
+ <path d="M8989.42,1534.55l-689.096,-0l0,2448l689.096,0l0,-209.394c144.672,156.094 247.465,243.658 529.195,243.658c384.523,0 723.36,-289.344 723.36,-982.246c-0,-654.831 -232.237,-936.561 -685.288,-936.561c-213.201,-0 -384.523,76.143 -567.267,258.887l0,-822.346Zm0,1317.28c91.372,-118.022 186.551,-178.936 312.187,-178.936c167.515,-0 258.887,106.6 258.887,361.68c-0,289.344 -98.986,414.98 -274.116,414.98c-140.865,-0 -220.815,-57.107 -296.958,-167.515l0,-430.209Z" fill="white"/>
116
+ <rect x="10481.8" y="1534.55" width="689.096" height="2448" fill="white"/>
117
+ <path d="M13028.8,3327.72c-236.043,110.407 -399.751,159.901 -651.024,159.901c-186.55,-0 -281.729,-72.336 -315.994,-247.466l1145.95,0c11.421,-106.6 15.228,-175.129 15.228,-258.886c0,-571.074 -338.837,-887.068 -875.646,-887.068c-597.724,-0 -951.789,342.644 -951.789,974.632c-0,616.76 365.487,947.982 951.789,947.982c315.994,0 578.688,-87.564 875.646,-296.958l-194.165,-392.137Zm-970.825,-456.859c30.457,-205.587 133.251,-304.573 289.344,-304.573c175.129,0 270.308,106.601 277.923,304.573l-567.267,-0Z" fill="white"/>
118
+ </g>
119
+ </svg>
120
+
121
+ </div>
122
+ <h1 style="padding-top: 2rem;">Webclient für Ihren Chatbot</h1>
76
123
  </div>
77
124
  </header>
78
125
  <main>
@@ -85,7 +132,12 @@ const index = (server, scriptUrl) => `<!DOCTYPE html>
85
132
  Der Chatbot kann mit dem folgenden Snippet auf Ihrer Webseite eingebettet werden. Am besten wird das Snippet zu
86
133
  unterst im Body hinzugefügt.
87
134
  </p>
88
- <pre><code>&lt;script id=&quot;chatbot&quot; data-server=&quot;${server}&quot; defer src=&quot;${scriptUrl}&quot;&gt;&lt;/script&gt;</code></pre>
135
+ <pre><code>&lt;script
136
+ id=&quot;chatbot&quot;
137
+ data-server=&quot;${server}&quot;
138
+ defer
139
+ src=&quot;${scriptUrl}&quot;
140
+ &gt;&lt;/script&gt;</code></pre>
89
141
 
90
142
  <h3>Bookmarklet (nur zum Testen)</h3>
91
143
  <p>Um die Integration schnell zu testen, kann das folgende Bookmarklet verwendet werden.</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.64.5",
3
+ "version": "4.64.6-alpha.0",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,8 @@
16
16
  "test:watch": "jest --watch",
17
17
  "prepare": "(cd client && npm install); (cd script-tag && npm install)",
18
18
  "prepublishOnly": "npm run build",
19
- "update": "npx npm-check-updates -i"
19
+ "update": "npx npm-check-updates -i",
20
+ "dev:embed": "tsx --watch ./run-embed-local.ts"
20
21
  },
21
22
  "dependencies": {
22
23
  "@botfabrik/engine-core": "^4.64.2",
@@ -36,7 +37,8 @@
36
37
  "@types/ua-parser-js": "^0.7.39",
37
38
  "copyfiles": "^2.4.1",
38
39
  "rimraf": "^5.0.7",
40
+ "tsx": "^4.16.2",
39
41
  "typescript": "5.1.6"
40
42
  },
41
- "gitHead": "305a2ee77d9e0695d9c5e2d1d7b23f9ee0aec0fe"
43
+ "gitHead": "9470102f03bcb6c8691da595769164abc756a990"
42
44
  }
@@ -0,0 +1,16 @@
1
+ import express from 'express';
2
+ import index from './src/views/index';
3
+ const app = express();
4
+ const port = 3000;
5
+
6
+ app.get('/', (req, res) => {
7
+ console.log('Request received');
8
+ const server = `https://chatbot.apptiva.ch/chatbot`;
9
+ res.set('Content-Type', 'text/html; charset=utf-8');
10
+ res.write(index(server, `${server}/embed/bundle.js`));
11
+ res.end();
12
+ });
13
+
14
+ app.listen(port, () => {
15
+ console.log(`Server is running at http://localhost:${port}`);
16
+ });