@subiz/widget-v4 4.1.120 → 4.1.121

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.
@@ -8287,7 +8287,22 @@ class Event extends common/* Com */.Mw {
8287
8287
  });
8288
8288
  }
8289
8289
  renderTyping() {
8290
- let innercls = 'agent-convo-event-inner';
8290
+ if (!this.props.event.is_show) {
8291
+ return (0,preact_module.h)("div", {
8292
+ key: 'container',
8293
+ class: "convo-event agent-message",
8294
+ style: "opacity: 0 !important"
8295
+ }, (0,preact_module.h)("div", {
8296
+ class: "agent-convo-event-wrapper"
8297
+ }, (0,preact_module.h)("div", {
8298
+ class: "agent-convo-event-inner"
8299
+ }, (0,preact_module.h)("div", {
8300
+ class: "message-agent message-text--agent",
8301
+ style: "opacity: 0.6 !important"
8302
+ }, (0,preact_module.h)("div", {
8303
+ style: "height: 20px !important; width: 35px !important"
8304
+ })))));
8305
+ }
8291
8306
  var html = `
8292
8307
  <html>
8293
8308
  <head>
@@ -8336,14 +8351,15 @@ class Event extends common/* Com */.Mw {
8336
8351
  `;
8337
8352
  let src = 'data:text/html,' + encodeURIComponent(html);
8338
8353
  return (0,preact_module.h)("div", {
8339
- class: "convo-event agent-message"
8354
+ key: 'container',
8355
+ class: "convo-event agent-message",
8356
+ style: "opacity: 0.6 !important"
8340
8357
  }, (0,preact_module.h)("div", {
8341
8358
  class: "agent-convo-event-wrapper"
8342
8359
  }, (0,preact_module.h)("div", {
8343
- class: innercls
8360
+ class: "agent-convo-event-inner"
8344
8361
  }, (0,preact_module.h)("div", {
8345
- class: "message-agent message-text--agent",
8346
- style: "opacity: 0.6 !important"
8362
+ class: "message-agent message-text--agent"
8347
8363
  }, (0,preact_module.h)("iframe", {
8348
8364
  src: src,
8349
8365
  style: "width: 35px !important; height: 20px !important; display: block !important; overflow: hidden !important; padding: 0 !important "
@@ -8430,6 +8446,9 @@ class Event extends common/* Com */.Mw {
8430
8446
  });
8431
8447
  }
8432
8448
  let $sender = null;
8449
+ if (this.props.event.mode === 'lead') $sender = (0,preact_module.h)("div", {
8450
+ class: "pt-2"
8451
+ });
8433
8452
  let $error = null;
8434
8453
  if (ev._error && ev.type === 'message_sent') {
8435
8454
  let msg = this.props.t('error_send_message');
@@ -8717,33 +8736,31 @@ class Events extends common/* Com */.Mw {
8717
8736
  events = util/* default */.A.map(events, ev => ({
8718
8737
  ev: ev
8719
8738
  }));
8720
- if (this.state.isShowTyping) {
8721
- let ev = this.state.typing_event || {
8722
- id: 'evzz' + util/* default */.A.Date.now(),
8723
- created: util/* default */.A.Date.now(),
8724
- by: {
8725
- type: 'agent'
8726
- }
8727
- };
8728
- let fakeev = {
8729
- is_typing: true,
8739
+ let ev = this.state.typing_event || {
8740
+ id: 'evzz' + util/* default */.A.Date.now(),
8741
+ created: util/* default */.A.Date.now(),
8742
+ by: {
8743
+ type: 'agent'
8744
+ }
8745
+ };
8746
+ let fakeev = {
8747
+ is_typing: true,
8748
+ is_show: this.state.isShowTyping,
8749
+ id: ev.id,
8750
+ ev: {
8730
8751
  id: ev.id,
8731
- ev: {
8732
- id: ev.id,
8733
- created: ev.created,
8734
- by: ev.by,
8735
- type: 'message_sent',
8736
- data: {
8737
- message: {
8738
- text: '...',
8739
- conversation_id: this.props.cid
8740
- }
8752
+ created: ev.created,
8753
+ by: ev.by,
8754
+ type: 'message_sent',
8755
+ data: {
8756
+ message: {
8757
+ text: '...',
8758
+ conversation_id: this.props.cid
8741
8759
  }
8742
8760
  }
8743
- };
8744
- console.log('FA', fakeev);
8745
- events.push(fakeev);
8746
- }
8761
+ }
8762
+ };
8763
+ events.push(fakeev);
8747
8764
  processEvents(convo, events);
8748
8765
  let $events = util/* default */.A.map(events, ev => {
8749
8766
  let isLast = ev.ev.id === util/* default */.A.get(convo, 'last_message_sent.id');
@@ -9873,7 +9890,9 @@ class Widget extends common/* Com */.Mw {
9873
9890
  class: "flex-grow-1"
9874
9891
  }, (0,preact_module.h)("div", {
9875
9892
  class: "form mt-3 pl-3 pr-3 pt-3 pb-3 d-flex flex-column"
9876
- }, (0,preact_module.h)("div", null, title), this.renderFields(form, formName))), (0,preact_module.h)(PoweredBy, {
9893
+ }, (0,preact_module.h)("div", null, title), this.renderFields(form, formName))), (0,preact_module.h)("div", {
9894
+ class: "mt-2"
9895
+ }), (0,preact_module.h)(PoweredBy, {
9877
9896
  store: this.props.store,
9878
9897
  t: this.props.t
9879
9898
  })), (0,preact_module.h)("div", {
@@ -9945,7 +9964,9 @@ class Widget extends common/* Com */.Mw {
9945
9964
  alt: "send button",
9946
9965
  width: "26",
9947
9966
  height: "26"
9948
- })), (0,preact_module.h)(PoweredBy, {
9967
+ })), (0,preact_module.h)("div", {
9968
+ class: "mt-2"
9969
+ }), (0,preact_module.h)(PoweredBy, {
9949
9970
  store: this.props.store
9950
9971
  })));
9951
9972
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/widget-v4",
3
- "version": "4.1.120",
3
+ "version": "4.1.121",
4
4
  "main": "./compiled_src/lib.js",
5
5
  "scripts": {
6
6
  "dev": "npx webpack serve --config webpack.dev.js",
@@ -299,7 +299,7 @@ export default class Event extends Com {
299
299
  }
300
300
 
301
301
  let $sender = null
302
- if (this.props.event.mode === 'lead') $sender = <div class='pt-2'></div>
302
+ if (this.props.event.mode === 'lead') $sender = <div class='pt-3'></div>
303
303
 
304
304
  let $error = null
305
305
  if (ev._error && ev.type === 'message_sent') {
@@ -7,6 +7,7 @@ import Time from './time.js'
7
7
 
8
8
  export default class TextMessage extends Com {
9
9
  renderTime() {
10
+ return null
10
11
  if (!this.props.showTime && !this.props.isLast && !this.props.isFirst) return null
11
12
 
12
13
  return (
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes