@developpement/tp-chatbot-widget 0.0.13 → 0.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@developpement/tp-chatbot-widget",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Chatbot widget for TravelPlanet / Makitizy",
5
5
  "main": "src/chatbot.js",
6
6
  "files": [
package/src/chatbot.css CHANGED
@@ -472,43 +472,43 @@
472
472
 
473
473
  /* ─── Markdown content ───────────────────────────────────────────────────── */
474
474
 
475
- .tp-chatbot-markdown h1,
476
- .tp-chatbot-markdown h2,
477
- .tp-chatbot-markdown h3 {
475
+ .tp-md h1,
476
+ .tp-md h2,
477
+ .tp-md h3 {
478
478
  font-size: 13px;
479
479
  font-weight: 700;
480
480
  margin: 8px 0 3px;
481
481
  color: #1a1a2e;
482
482
  }
483
483
 
484
- .tp-chatbot-markdown p {
484
+ .tp-md p {
485
485
  margin: 3px 0;
486
486
  }
487
487
 
488
- .tp-chatbot-markdown ul,
489
- .tp-chatbot-markdown ol {
488
+ .tp-md ul,
489
+ .tp-md ol {
490
490
  margin: 4px 0 4px 16px;
491
491
  padding: 0;
492
492
  }
493
493
 
494
- .tp-chatbot-markdown li {
494
+ .tp-md li {
495
495
  margin: 2px 0;
496
496
  }
497
497
 
498
- .tp-chatbot-markdown strong {
498
+ .tp-md strong {
499
499
  font-weight: 700;
500
500
  }
501
501
 
502
- .tp-chatbot-markdown em {
502
+ .tp-md em {
503
503
  font-style: italic;
504
504
  }
505
505
 
506
- .tp-chatbot-markdown a {
506
+ .tp-md a {
507
507
  color: #7b1fa2;
508
508
  text-decoration: underline;
509
509
  }
510
510
 
511
- .tp-chatbot-markdown code {
511
+ .tp-md code {
512
512
  background: #f0ecf8;
513
513
  padding: 1px 5px;
514
514
  border-radius: 4px;
package/src/chatbot.js CHANGED
@@ -1487,9 +1487,9 @@
1487
1487
  });
1488
1488
  const data = await response.json();
1489
1489
  const m = this.getMessages(),
1490
- status = data.result?.status;
1490
+ status = data.result?.result?.status;
1491
1491
  let msg = '';
1492
- if (status === 'outside_hours') msg = m.outside_hours(data.result.next_opening);
1492
+ if (status === 'outside_hours') msg = m.outside_hours(data.result.result.next_opening);
1493
1493
  else if (status === 'no_agents') msg = m.no_agents;
1494
1494
  else if (status === 'waiting_agent') msg = m.waiting_agent;
1495
1495
  else if (status === 'waiting_agent_already') msg = m.waiting_agent_already;