@botonic/react 0.29.0 → 0.30.0-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.
Files changed (112) hide show
  1. package/lib/cjs/contexts.js +14 -8
  2. package/lib/cjs/contexts.js.map +1 -1
  3. package/lib/cjs/index-types.d.ts +12 -6
  4. package/lib/cjs/index-types.js +6 -1
  5. package/lib/cjs/index-types.js.map +1 -1
  6. package/lib/cjs/webchat/components/{persistent-menu.d.ts → opened-persistent-menu.d.ts} +0 -4
  7. package/lib/cjs/webchat/components/{persistent-menu.js → opened-persistent-menu.js} +2 -12
  8. package/lib/cjs/webchat/components/opened-persistent-menu.js.map +1 -0
  9. package/lib/cjs/webchat/trigger-button/styles.js +1 -1
  10. package/lib/cjs/webchat/utils.d.ts +2 -0
  11. package/lib/cjs/webchat/utils.js +12 -0
  12. package/lib/cjs/webchat/utils.js.map +1 -0
  13. package/lib/cjs/webchat/webchat-input-panel/attachment.d.ts +7 -0
  14. package/lib/cjs/webchat/{components → webchat-input-panel}/attachment.js +6 -4
  15. package/lib/cjs/webchat/webchat-input-panel/attachment.js.map +1 -0
  16. package/lib/cjs/webchat/webchat-input-panel/emoji-picker.d.ts +6 -0
  17. package/lib/cjs/webchat/{components → webchat-input-panel}/emoji-picker.js +5 -20
  18. package/lib/cjs/webchat/webchat-input-panel/emoji-picker.js.map +1 -0
  19. package/lib/cjs/webchat/webchat-input-panel/index.d.ts +13 -0
  20. package/lib/cjs/webchat/webchat-input-panel/index.js +53 -0
  21. package/lib/cjs/webchat/webchat-input-panel/index.js.map +1 -0
  22. package/lib/cjs/webchat/webchat-input-panel/opened-emoji-picker.d.ts +6 -0
  23. package/lib/cjs/webchat/webchat-input-panel/opened-emoji-picker.js +15 -0
  24. package/lib/cjs/webchat/webchat-input-panel/opened-emoji-picker.js.map +1 -0
  25. package/lib/cjs/webchat/webchat-input-panel/persistent-menu.d.ts +6 -0
  26. package/lib/cjs/webchat/webchat-input-panel/persistent-menu.js +19 -0
  27. package/lib/cjs/webchat/webchat-input-panel/persistent-menu.js.map +1 -0
  28. package/lib/cjs/webchat/webchat-input-panel/send-button.d.ts +5 -0
  29. package/lib/cjs/webchat/{components → webchat-input-panel}/send-button.js +2 -2
  30. package/lib/cjs/webchat/webchat-input-panel/send-button.js.map +1 -0
  31. package/lib/cjs/webchat/webchat-input-panel/styles.d.ts +3 -0
  32. package/lib/cjs/webchat/webchat-input-panel/styles.js +30 -0
  33. package/lib/cjs/webchat/webchat-input-panel/styles.js.map +1 -0
  34. package/lib/cjs/webchat/webchat-input-panel/textarea.d.ts +12 -0
  35. package/lib/cjs/webchat/webchat-input-panel/textarea.js +57 -0
  36. package/lib/cjs/webchat/webchat-input-panel/textarea.js.map +1 -0
  37. package/lib/cjs/webchat/webchat.d.ts +0 -1
  38. package/lib/cjs/webchat/webchat.js +16 -108
  39. package/lib/cjs/webchat/webchat.js.map +1 -1
  40. package/lib/cjs/webchat-app.js +1 -1
  41. package/lib/cjs/webchat-app.js.map +1 -1
  42. package/lib/esm/contexts.js +14 -8
  43. package/lib/esm/contexts.js.map +1 -1
  44. package/lib/esm/index-types.d.ts +12 -6
  45. package/lib/esm/index-types.js +5 -0
  46. package/lib/esm/index-types.js.map +1 -1
  47. package/lib/esm/webchat/components/{persistent-menu.d.ts → opened-persistent-menu.d.ts} +0 -4
  48. package/lib/esm/webchat/components/{persistent-menu.js → opened-persistent-menu.js} +2 -11
  49. package/lib/esm/webchat/components/opened-persistent-menu.js.map +1 -0
  50. package/lib/esm/webchat/trigger-button/styles.js +1 -1
  51. package/lib/esm/webchat/utils.d.ts +2 -0
  52. package/lib/esm/webchat/utils.js +8 -0
  53. package/lib/esm/webchat/utils.js.map +1 -0
  54. package/lib/esm/webchat/webchat-input-panel/attachment.d.ts +7 -0
  55. package/lib/esm/webchat/{components → webchat-input-panel}/attachment.js +6 -4
  56. package/lib/esm/webchat/webchat-input-panel/attachment.js.map +1 -0
  57. package/lib/esm/webchat/webchat-input-panel/emoji-picker.d.ts +6 -0
  58. package/lib/esm/webchat/{components → webchat-input-panel}/emoji-picker.js +4 -18
  59. package/lib/esm/webchat/webchat-input-panel/emoji-picker.js.map +1 -0
  60. package/lib/esm/webchat/webchat-input-panel/index.d.ts +13 -0
  61. package/lib/esm/webchat/webchat-input-panel/index.js +49 -0
  62. package/lib/esm/webchat/webchat-input-panel/index.js.map +1 -0
  63. package/lib/esm/webchat/webchat-input-panel/opened-emoji-picker.d.ts +6 -0
  64. package/lib/esm/webchat/webchat-input-panel/opened-emoji-picker.js +10 -0
  65. package/lib/esm/webchat/webchat-input-panel/opened-emoji-picker.js.map +1 -0
  66. package/lib/esm/webchat/webchat-input-panel/persistent-menu.d.ts +6 -0
  67. package/lib/esm/webchat/webchat-input-panel/persistent-menu.js +14 -0
  68. package/lib/esm/webchat/webchat-input-panel/persistent-menu.js.map +1 -0
  69. package/lib/esm/webchat/webchat-input-panel/send-button.d.ts +5 -0
  70. package/lib/esm/webchat/{components → webchat-input-panel}/send-button.js +2 -2
  71. package/lib/esm/webchat/webchat-input-panel/send-button.js.map +1 -0
  72. package/lib/esm/webchat/webchat-input-panel/styles.d.ts +3 -0
  73. package/lib/esm/webchat/webchat-input-panel/styles.js +26 -0
  74. package/lib/esm/webchat/webchat-input-panel/styles.js.map +1 -0
  75. package/lib/esm/webchat/webchat-input-panel/textarea.d.ts +12 -0
  76. package/lib/esm/webchat/webchat-input-panel/textarea.js +52 -0
  77. package/lib/esm/webchat/webchat-input-panel/textarea.js.map +1 -0
  78. package/lib/esm/webchat/webchat.d.ts +0 -1
  79. package/lib/esm/webchat/webchat.js +15 -106
  80. package/lib/esm/webchat/webchat.js.map +1 -1
  81. package/lib/esm/webchat-app.js +2 -2
  82. package/lib/esm/webchat-app.js.map +1 -1
  83. package/package.json +3 -5
  84. package/src/contexts.tsx +10 -4
  85. package/src/index-types.ts +13 -6
  86. package/src/webchat/components/{persistent-menu.jsx → opened-persistent-menu.jsx} +0 -29
  87. package/src/webchat/trigger-button/styles.ts +1 -1
  88. package/src/webchat/utils.ts +7 -0
  89. package/src/webchat/{components/attachment.jsx → webchat-input-panel/attachment.tsx} +16 -4
  90. package/src/webchat/{components/emoji-picker.jsx → webchat-input-panel/emoji-picker.tsx} +11 -33
  91. package/src/webchat/webchat-input-panel/index.tsx +116 -0
  92. package/src/webchat/webchat-input-panel/opened-emoji-picker.tsx +34 -0
  93. package/src/webchat/webchat-input-panel/persistent-menu.tsx +41 -0
  94. package/src/webchat/{components/send-button.jsx → webchat-input-panel/send-button.tsx} +6 -2
  95. package/src/webchat/webchat-input-panel/styles.ts +29 -0
  96. package/src/webchat/webchat-input-panel/textarea.tsx +110 -0
  97. package/src/webchat/webchat.jsx +28 -190
  98. package/src/webchat-app.jsx +2 -2
  99. package/lib/cjs/webchat/components/attachment.d.ts +0 -5
  100. package/lib/cjs/webchat/components/attachment.js.map +0 -1
  101. package/lib/cjs/webchat/components/emoji-picker.d.ts +0 -5
  102. package/lib/cjs/webchat/components/emoji-picker.js.map +0 -1
  103. package/lib/cjs/webchat/components/persistent-menu.js.map +0 -1
  104. package/lib/cjs/webchat/components/send-button.d.ts +0 -3
  105. package/lib/cjs/webchat/components/send-button.js.map +0 -1
  106. package/lib/esm/webchat/components/attachment.d.ts +0 -5
  107. package/lib/esm/webchat/components/attachment.js.map +0 -1
  108. package/lib/esm/webchat/components/emoji-picker.d.ts +0 -5
  109. package/lib/esm/webchat/components/emoji-picker.js.map +0 -1
  110. package/lib/esm/webchat/components/persistent-menu.js.map +0 -1
  111. package/lib/esm/webchat/components/send-button.d.ts +0 -3
  112. package/lib/esm/webchat/components/send-button.js.map +0 -1
@@ -3,10 +3,14 @@ import React, { useContext } from 'react'
3
3
  import SendButtonIcon from '../../assets/send-button.svg'
4
4
  import { ROLES, WEBCHAT } from '../../constants'
5
5
  import { WebchatContext } from '../../contexts'
6
+ import { Icon } from '../components/common'
6
7
  import { ConditionalAnimation } from '../components/conditional-animation'
7
- import { Icon } from './common'
8
8
 
9
- export const SendButton = ({ onClick }) => {
9
+ interface SendButtonProps {
10
+ onClick: () => Promise<void>
11
+ }
12
+
13
+ export const SendButton = ({ onClick }: SendButtonProps) => {
10
14
  const { getThemeProperty } = useContext(WebchatContext)
11
15
 
12
16
  const sendButtonEnabled = getThemeProperty(
@@ -0,0 +1,29 @@
1
+ import styled from 'styled-components'
2
+
3
+ import { COLORS } from '../../constants'
4
+
5
+ export const UserInputContainer = styled.div`
6
+ min-height: 52px;
7
+ position: relative;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: flex-start;
11
+ gap: 16px;
12
+ padding: 0px 16px;
13
+ z-index: 1;
14
+ border-top: 1px solid ${COLORS.SOLID_BLACK_ALPHA_0_5};
15
+ `
16
+
17
+ export const TextAreaContainer = styled.div`
18
+ display: flex;
19
+ flex: 1 1 auto;
20
+ align-items: center;
21
+ `
22
+
23
+ export const OpenedEmojiPickerContainer = styled.div`
24
+ display: flex;
25
+ justify-content: flex-end;
26
+ position: absolute;
27
+ right: 3px;
28
+ top: -324px;
29
+ `
@@ -0,0 +1,110 @@
1
+ import React, { useContext } from 'react'
2
+ import TextareaAutosize from 'react-textarea-autosize'
3
+
4
+ import { PersistentMenuTheme } from '../../components/index-types'
5
+ import { WEBCHAT } from '../../constants'
6
+ import { WebchatContext } from '../../contexts'
7
+ import { Typing } from '../../index-types'
8
+ import { DeviceAdapter } from '../devices/device-adapter'
9
+ import { TextAreaContainer } from './styles'
10
+
11
+ interface TextareaProps {
12
+ deviceAdapter: DeviceAdapter
13
+ persistentMenu: PersistentMenuTheme
14
+ textareaRef: React.MutableRefObject<HTMLTextAreaElement>
15
+ sendChatEvent: (event: string) => Promise<void>
16
+ sendTextAreaText: () => Promise<void>
17
+ }
18
+
19
+ export const Textarea = ({
20
+ deviceAdapter,
21
+ persistentMenu,
22
+ textareaRef,
23
+ sendChatEvent,
24
+ sendTextAreaText,
25
+ }: TextareaProps) => {
26
+ const { getThemeProperty } = useContext(WebchatContext)
27
+
28
+ let isTyping = false
29
+ let typingTimeout
30
+
31
+ const persistentMenuOptions = getThemeProperty(
32
+ WEBCHAT.CUSTOM_PROPERTIES.persistentMenu,
33
+ persistentMenu
34
+ )
35
+
36
+ const onKeyDown = event => {
37
+ if (event.keyCode === 13 && event.shiftKey === false) {
38
+ event.preventDefault()
39
+ sendTextAreaText()
40
+ stopTyping()
41
+ }
42
+ }
43
+
44
+ const onKeyUp = () => {
45
+ if (textareaRef.current.value === '') {
46
+ stopTyping()
47
+ return
48
+ }
49
+ if (!isTyping) {
50
+ startTyping()
51
+ }
52
+ clearTimeoutWithReset(true)
53
+ }
54
+
55
+ const clearTimeoutWithReset = (reset: boolean) => {
56
+ const waitTime = 20 * 1000
57
+ if (typingTimeout) clearTimeout(typingTimeout)
58
+ if (reset) typingTimeout = setTimeout(stopTyping, waitTime)
59
+ }
60
+
61
+ const startTyping = () => {
62
+ isTyping = true
63
+ sendChatEvent(Typing.On)
64
+ }
65
+
66
+ const stopTyping = () => {
67
+ clearTimeoutWithReset(false)
68
+ isTyping = false
69
+ sendChatEvent(Typing.Off)
70
+ }
71
+
72
+ return (
73
+ <TextAreaContainer>
74
+ <TextareaAutosize
75
+ ref={(ref: HTMLTextAreaElement) => (textareaRef.current = ref)}
76
+ name='text'
77
+ onFocus={() => {
78
+ deviceAdapter.onFocus()
79
+ }}
80
+ onBlur={() => {
81
+ deviceAdapter.onBlur()
82
+ }}
83
+ maxRows={4}
84
+ wrap='soft'
85
+ maxLength={1000}
86
+ placeholder={getThemeProperty(
87
+ WEBCHAT.CUSTOM_PROPERTIES.textPlaceholder,
88
+ WEBCHAT.DEFAULTS.PLACEHOLDER
89
+ )}
90
+ autoFocus={false}
91
+ onKeyDown={e => onKeyDown(e)}
92
+ onKeyUp={onKeyUp}
93
+ style={{
94
+ display: 'flex',
95
+ fontSize: deviceAdapter.fontSize(14),
96
+ width: '100%',
97
+ border: 'none',
98
+ resize: 'none',
99
+ overflow: 'auto',
100
+ outline: 'none',
101
+ flex: '1 1 auto',
102
+ padding: 10,
103
+ paddingLeft: persistentMenuOptions ? 0 : 10,
104
+ fontFamily: 'inherit',
105
+ ...getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.userInputBoxStyle),
106
+ }}
107
+ />
108
+ </TextAreaContainer>
109
+ )
110
+ }
@@ -1,4 +1,9 @@
1
- import { INPUT, isMobile, params2queryString } from '@botonic/core'
1
+ import {
2
+ BotonicAction,
3
+ INPUT,
4
+ isMobile,
5
+ params2queryString,
6
+ } from '@botonic/core'
2
7
  import merge from 'lodash.merge'
3
8
  import React, {
4
9
  forwardRef,
@@ -7,9 +12,7 @@ import React, {
7
12
  useRef,
8
13
  useState,
9
14
  } from 'react'
10
- import Textarea from 'react-textarea-autosize'
11
15
  import styled, { StyleSheetManager } from 'styled-components'
12
- import { useAsyncEffect } from 'use-async-effect'
13
16
  import { v4 as uuidv4 } from 'uuid'
14
17
 
15
18
  import { Audio, Document, Image, Text, Video } from '../components'
@@ -19,7 +22,6 @@ import { COLORS, MAX_ALLOWED_SIZE_MB, ROLES, WEBCHAT } from '../constants'
19
22
  import { WebchatContext, WebviewRequestContext } from '../contexts'
20
23
  import { SENDERS } from '../index-types'
21
24
  import {
22
- getFullMimeWhitelist,
23
25
  getMediaType,
24
26
  isAllowedSize,
25
27
  isAudio,
@@ -40,13 +42,7 @@ import {
40
42
  initSession,
41
43
  shouldKeepSessionOnReload,
42
44
  } from '../util/webchat'
43
- import { Attachment } from './components/attachment'
44
- import { EmojiPicker, OpenedEmojiPicker } from './components/emoji-picker'
45
- import {
46
- OpenedPersistentMenu,
47
- PersistentMenu,
48
- } from './components/persistent-menu'
49
- import { SendButton } from './components/send-button'
45
+ import { OpenedPersistentMenu } from './components/opened-persistent-menu'
50
46
  import { DeviceAdapter } from './devices/device-adapter'
51
47
  import { StyledWebchatHeader } from './header'
52
48
  import {
@@ -59,14 +55,10 @@ import { WebchatMessageList } from './message-list'
59
55
  import { WebchatReplies } from './replies'
60
56
  import { TriggerButton } from './trigger-button'
61
57
  import { useStorageState } from './use-storage-state-hook'
58
+ import { getParsedAction } from './utils'
59
+ import { WebchatInputPanel } from './webchat-input-panel'
62
60
  import { WebviewContainer } from './webview'
63
61
 
64
- export const getParsedAction = botonicAction => {
65
- const splittedAction = botonicAction.split('create_case:')
66
- if (splittedAction.length <= 1) return undefined
67
- return JSON.parse(splittedAction[1])
68
- }
69
-
70
62
  const StyledWebchat = styled.div`
71
63
  position: fixed;
72
64
  right: 20px;
@@ -81,24 +73,6 @@ const StyledWebchat = styled.div`
81
73
  flex-direction: column;
82
74
  `
83
75
 
84
- const UserInputContainer = styled.div`
85
- min-height: 52px;
86
- position: relative;
87
- display: flex;
88
- align-items: center;
89
- justify-content: flex-start;
90
- gap: 16px;
91
- padding: 0px 16px;
92
- z-index: 1;
93
- border-top: 1px solid ${COLORS.SOLID_BLACK_ALPHA_0_5};
94
- `
95
-
96
- const TextAreaContainer = styled.div`
97
- display: flex;
98
- flex: 1 1 auto;
99
- align-items: center;
100
- `
101
-
102
76
  const ErrorMessageContainer = styled.div`
103
77
  position: relative;
104
78
  display: flex;
@@ -232,21 +206,6 @@ export const Webchat = forwardRef((props, ref) => {
232
206
  }
233
207
  }
234
208
 
235
- const sendChatEvent = async chatEvent => {
236
- const chatEventInput = {
237
- id: uuidv4(),
238
- type: INPUT.CHAT_EVENT,
239
- data: chatEvent,
240
- }
241
- props.onUserInput &&
242
- props.onUserInput({
243
- user: webchatState.session.user,
244
- input: chatEventInput,
245
- session: webchatState.session,
246
- lastRoutePath: webchatState.lastRoutePath,
247
- })
248
- }
249
-
250
209
  // Load styles stored in window._botonicInsertStyles by Webpack
251
210
  useComponentWillMount(() => {
252
211
  if (window._botonicInsertStyles && window._botonicInsertStyles.length) {
@@ -333,7 +292,7 @@ export const Webchat = forwardRef((props, ref) => {
333
292
  webchatState.lastMessageUpdate,
334
293
  ])
335
294
 
336
- useAsyncEffect(async () => {
295
+ useEffect(() => {
337
296
  if (!webchatState.online) {
338
297
  setError({
339
298
  message: getServerErrorMessage(props.server),
@@ -351,18 +310,16 @@ export const Webchat = forwardRef((props, ref) => {
351
310
  updateTheme(merge(props.theme, theme, webchatState.themeUpdates))
352
311
  }, [props.theme, webchatState.themeUpdates])
353
312
 
354
- const openWebview = (webviewComponent, params) =>
313
+ const openWebview = (webviewComponent, params) => {
355
314
  updateWebview(webviewComponent, params)
356
-
357
- const handleSelectedEmoji = event => {
358
- textArea.current.value += event.emoji
359
- textArea.current.focus()
360
315
  }
361
316
 
317
+ const textareaRef = useRef(null)
318
+
362
319
  const closeWebview = options => {
363
320
  updateWebview()
364
321
  if (userInputEnabled) {
365
- textArea.current.focus()
322
+ textareaRef.current.focus()
366
323
  }
367
324
  if (options?.payload) {
368
325
  sendPayload(options.payload)
@@ -372,14 +329,6 @@ export const Webchat = forwardRef((props, ref) => {
372
329
  }
373
330
  }
374
331
 
375
- const handleMenu = () => {
376
- togglePersistentMenu(!webchatState.isPersistentMenuOpen)
377
- }
378
-
379
- const handleEmojiClick = () => {
380
- toggleEmojiPicker(!webchatState.isEmojiPickerOpen)
381
- }
382
-
383
332
  const persistentMenuOptions = getThemeProperty(
384
333
  WEBCHAT.CUSTOM_PROPERTIES.persistentMenu,
385
334
  props.persistentMenu
@@ -553,7 +502,7 @@ export const Webchat = forwardRef((props, ref) => {
553
502
  if (session) {
554
503
  updateSession(merge(session, { user: webchatState.session.user }))
555
504
  const action = session._botonic_action || ''
556
- const handoff = action.startsWith('create_case')
505
+ const handoff = action.startsWith(BotonicAction.CreateCase)
557
506
  if (handoff && isDev) addMessageComponent(<Handoff />)
558
507
  updateHandoff(handoff)
559
508
  }
@@ -649,50 +598,6 @@ export const Webchat = forwardRef((props, ref) => {
649
598
  }
650
599
  }
651
600
 
652
- const sendTextAreaText = () => {
653
- sendText(textArea.current.value)
654
- textArea.current.value = ''
655
- }
656
-
657
- let isTyping = false
658
- let typingTimeout = null
659
-
660
- function clearTimeoutWithReset(reset) {
661
- const waitTime = 20 * 1000
662
- if (typingTimeout) clearTimeout(typingTimeout)
663
- if (reset) typingTimeout = setTimeout(stopTyping, waitTime)
664
- }
665
-
666
- function startTyping() {
667
- isTyping = true
668
- sendChatEvent('typing_on')
669
- }
670
-
671
- function stopTyping() {
672
- clearTimeoutWithReset(false)
673
- isTyping = false
674
- sendChatEvent('typing_off')
675
- }
676
-
677
- const onKeyDown = event => {
678
- if (event.keyCode === 13 && event.shiftKey === false) {
679
- event.preventDefault()
680
- sendTextAreaText()
681
- stopTyping()
682
- }
683
- }
684
-
685
- const onKeyUp = () => {
686
- if (textArea.current.value === '') {
687
- stopTyping()
688
- return
689
- }
690
- if (!isTyping) {
691
- startTyping()
692
- }
693
- clearTimeoutWithReset(true)
694
- }
695
-
696
601
  const webviewRequestContext = {
697
602
  closeWebview: closeWebview,
698
603
  getString: stringId => props.getString(stringId, webchatState.session),
@@ -725,85 +630,6 @@ export const Webchat = forwardRef((props, ref) => {
725
630
 
726
631
  const userInputEnabled = isUserInputEnabled()
727
632
 
728
- const textArea = useRef(null)
729
- const userInputArea = () => {
730
- return (
731
- userInputEnabled && (
732
- <UserInputContainer
733
- style={{
734
- ...getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.userInputStyle),
735
- }}
736
- className='user-input-container'
737
- >
738
- {webchatState.isEmojiPickerOpen && (
739
- <OpenedEmojiPicker
740
- height={webchatState.theme.style.height}
741
- onEmojiClick={handleSelectedEmoji}
742
- onClick={handleEmojiClick}
743
- />
744
- )}
745
-
746
- <PersistentMenu
747
- onClick={handleMenu}
748
- persistentMenu={props.persistentMenu}
749
- />
750
-
751
- <TextAreaContainer>
752
- <Textarea
753
- inputRef={textArea}
754
- name='text'
755
- onFocus={() => {
756
- deviceAdapter.onFocus()
757
- }}
758
- onBlur={() => {
759
- deviceAdapter.onBlur()
760
- }}
761
- maxRows={4}
762
- wrap='soft'
763
- maxLength='1000'
764
- placeholder={getThemeProperty(
765
- WEBCHAT.CUSTOM_PROPERTIES.textPlaceholder,
766
- WEBCHAT.DEFAULTS.PLACEHOLDER
767
- )}
768
- autoFocus={false}
769
- onKeyDown={e => onKeyDown(e)}
770
- onKeyUp={onKeyUp}
771
- style={{
772
- display: 'flex',
773
- fontSize: deviceAdapter.fontSize(14),
774
- width: '100%',
775
- border: 'none',
776
- resize: 'none',
777
- overflow: 'auto',
778
- outline: 'none',
779
- flex: '1 1 auto',
780
- padding: 10,
781
- paddingLeft: persistentMenuOptions ? 0 : 10,
782
- fontFamily: 'inherit',
783
- ...getThemeProperty(
784
- WEBCHAT.CUSTOM_PROPERTIES.userInputBoxStyle
785
- ),
786
- }}
787
- />
788
- </TextAreaContainer>
789
-
790
- <EmojiPicker
791
- enableEmojiPicker={props.enableEmojiPicker}
792
- onClick={handleEmojiClick}
793
- />
794
-
795
- <Attachment
796
- enableAttachments={props.enableAttachments}
797
- onChange={handleAttachment}
798
- accept={getFullMimeWhitelist().join(',')}
799
- />
800
-
801
- <SendButton onClick={sendTextAreaText} />
802
- </UserInputContainer>
803
- )
804
- )
805
- }
806
-
807
633
  const webchatWebview = () => (
808
634
  <WebviewRequestContext.Provider value={webviewRequestContext}>
809
635
  <WebviewContainer
@@ -874,6 +700,8 @@ export const Webchat = forwardRef((props, ref) => {
874
700
  sendPayload,
875
701
  sendText,
876
702
  toggleWebchat,
703
+ toggleEmojiPicker,
704
+ togglePersistentMenu,
877
705
  updateLatestInput,
878
706
  updateMessage,
879
707
  updateReplies,
@@ -918,7 +746,17 @@ export const Webchat = forwardRef((props, ref) => {
918
746
  {webchatState.isPersistentMenuOpen && (
919
747
  <DarkenBackground component={persistentMenu()} />
920
748
  )}
921
- {!webchatState.handoff && userInputArea()}
749
+ {!webchatState.handoff && userInputEnabled && (
750
+ <WebchatInputPanel
751
+ persistentMenu={props.persistentMenu}
752
+ enableEmojiPicker={props.enableEmojiPicker}
753
+ enableAttachments={props.enableAttachments}
754
+ handleAttachment={handleAttachment}
755
+ textareaRef={textareaRef}
756
+ deviceAdapter={deviceAdapter}
757
+ onUserInput={props.onUserInput}
758
+ />
759
+ )}
922
760
  {webchatState.webview && webchatWebview()}
923
761
  {webchatState.isCoverComponentOpen && coverComponent()}
924
762
  {webchatState.isCustomComponentRendered &&
@@ -4,7 +4,7 @@ import React, { createRef } from 'react'
4
4
  import { render, unmountComponentAtNode } from 'react-dom'
5
5
 
6
6
  import { WEBCHAT } from './constants'
7
- import { SENDERS } from './index-types'
7
+ import { SENDERS, Typing } from './index-types'
8
8
  import { msgToBotonic } from './msg-to-botonic'
9
9
  import { isShadowDOMSupported, onDOMLoaded } from './util/dom'
10
10
  import { Webchat } from './webchat/webchat'
@@ -156,7 +156,7 @@ export class WebchatApp {
156
156
  } else if (event.message?.type === 'update_webchat_settings') {
157
157
  this.updateWebchatSettings(event.message.data)
158
158
  } else if (event.message?.type === 'sender_action') {
159
- this.setTyping(event.message.data === 'typing_on')
159
+ this.setTyping(event.message.data === Typing.On)
160
160
  } else {
161
161
  this.onMessage &&
162
162
  this.onMessage(this, { sentBy: SENDERS.bot, message: event.message })
@@ -1,5 +0,0 @@
1
- export function Attachment({ onChange, accept, enableAttachments }: {
2
- onChange: any;
3
- accept: any;
4
- enableAttachments: any;
5
- }): JSX.Element;
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachment.js","sourceRoot":"","sources":["../../../../src/webchat/components/attachment.jsx"],"names":[],"mappings":";;;;;AAAA,uDAAiD;AAEjD,mGAA6D;AAC7D,+CAAgD;AAChD,6CAA+C;AAC/C,+EAA0E;AAC1E,qCAA+B;AAExB,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,EAAE;IACpE,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,kBAAU,EAAC,yBAAc,CAAC,CAAA;IAEvD,MAAM,YAAY,GAAG,IAAA,cAAM,EAAC,IAAI,CAAC,CAAA;IAEjC,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,mBAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAC3C,SAAS,CACV,CAAA;IAED,MAAM,oBAAoB,GAAG,GAAG,EAAE;;QAChC,MAAM,oBAAoB,GAAG,CAAC,CAAC,iBAAiB,CAAA;QAChD,OAAO,CACL,MAAA,gBAAgB,CACd,mBAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAC3C,iBAAiB,CAClB,mCAAI,oBAAoB,CAC1B,CAAA;IACH,CAAC,CAAA;IACD,MAAM,kBAAkB,GAAG,oBAAoB,EAAE,CAAA;IAEjD,MAAM,cAAc,GAAG,KAAK,CAAC,EAAE;QAC7B,QAAQ,CAAC,KAAK,CAAC,CAAA;QACf,YAAY,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAA;IACnC,CAAC,CAAA;IAED,OAAO,CACL,2DACG,kBAAkB,CAAC,CAAC,CAAC,CACpB,uBAAC,4CAAoB,cACnB,+CAAK,IAAI,EAAE,iBAAK,CAAC,eAAe,iBAC9B,gDAAO,OAAO,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,gBAChD,iBAAiB,CAAC,CAAC,CAAC,CACnB,uBAAC,iBAAiB,KAAG,CACtB,CAAC,CAAC,CAAC,CACF,uBAAC,aAAI,IAAC,GAAG,EAAE,6BAAc,GAAI,CAC9B,IACK,EACR,kCACE,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,YAAY,EACf,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,GACd,KACE,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AApDY,QAAA,UAAU,cAoDtB"}
@@ -1,5 +0,0 @@
1
- export function EmojiPicker({ enableEmojiPicker, onClick }: {
2
- enableEmojiPicker: any;
3
- onClick: any;
4
- }): JSX.Element;
5
- export function OpenedEmojiPicker(props: any): JSX.Element;
@@ -1 +0,0 @@
1
- {"version":3,"file":"emoji-picker.js","sourceRoot":"","sources":["../../../../src/webchat/components/emoji-picker.jsx"],"names":[],"mappings":";;;;;AAAA,oFAAuC;AACvC,uDAAyC;AACzC,kFAAsC;AAEtC,2FAAoD;AACpD,+CAAgD;AAChD,6CAA+C;AAC/C,+EAA0E;AAC1E,oCAA8C;AAC9C,qCAA+B;AAExB,MAAM,WAAW,GAAG,CAAC,EAAE,iBAAiB,EAAE,OAAO,EAAE,EAAE,EAAE;IAC5D,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,kBAAU,EAAC,yBAAc,CAAC,CAAA;IAEvD,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,mBAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAC3C,SAAS,CACV,CAAA;IAED,MAAM,oBAAoB,GAAG,GAAG,EAAE;;QAChC,MAAM,oBAAoB,GAAG,CAAC,CAAC,iBAAiB,CAAA;QAChD,OAAO,CACL,MAAA,gBAAgB,CACd,mBAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAC3C,iBAAiB,CAClB,mCAAI,oBAAoB,CAC1B,CAAA;IACH,CAAC,CAAA;IACD,MAAM,kBAAkB,GAAG,oBAAoB,EAAE,CAAA;IAEjD,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE;QAC1B,OAAO,EAAE,CAAA;QACT,KAAK,CAAC,eAAe,EAAE,CAAA;IACzB,CAAC,CAAA;IAED,OAAO,CACL,2DACG,kBAAkB,CAAC,CAAC,CAAC,CACpB,uBAAC,4CAAoB,cACnB,8CAAK,IAAI,EAAE,iBAAK,CAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,gBACrD,iBAAiB,CAAC,CAAC,CAAC,CACnB,uBAAC,iBAAiB,KAAG,CACtB,CAAC,CAAC,CAAC,CACF,uBAAC,aAAI,IAAC,GAAG,EAAE,yBAAS,GAAI,CACzB,IACG,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AAvCY,QAAA,WAAW,eAuCvB;AAED,MAAM,SAAS,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;CAM3B,CAAA;AAEM,MAAM,iBAAiB,GAAG,KAAK,CAAC,EAAE;IACvC,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,IAAA,2BAAmB,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAC5E,OAAO,CACL,8CAAK,GAAG,EAAE,GAAG,gBACV,kBAAkB,IAAI,CACrB,uBAAC,SAAS,kBAAC,IAAI,EAAE,iBAAK,CAAC,YAAY,gBACjC,uBAAC,4BAAM,IACL,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,OAAO,EACd,aAAa,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EACrC,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,gBAAgB,EAAE,IAAI,GACtB,IACQ,CACb,IACG,CACP,CAAA;AACH,CAAC,CAAA;AAjBY,QAAA,iBAAiB,qBAiB7B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistent-menu.js","sourceRoot":"","sources":["../../../../src/webchat/components/persistent-menu.jsx"],"names":[],"mappings":";;;;;AAAA,uDAAyC;AACzC,kFAAsC;AAEtC,yFAAkD;AAClD,oDAAgD;AAChD,+CAAgD;AAChD,6CAA+C;AAC/C,+EAA0E;AAC1E,oCAA8C;AAC9C,qCAA+B;AAE/B,MAAM,gBAAgB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;CAMlC,CAAA;AAEM,MAAM,oBAAoB,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;IACzE,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,IAAA,2BAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACtE,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,kBAAU,EAAC,yBAA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,EAAE,gBAAgB,EAAE,GAAG,IAAA,kBAAU,EAAC,yBAAc,CAAC,CAAA;IAEvD,MAAM,qBAAqB,GAAG,gBAAgB,CAC5C,mBAAO,CAAC,iBAAiB,CAAC,cAAc,EACxC,cAAc,CACf,CAAA;IAED,MAAM,gBAAgB,GAAG,gBAAgB,CACvC,mBAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,SAAS,CACV,CAAA;IAED,OAAO,CACL,2DACG,qBAAqB,CAAC,CAAC,CAAC,CACvB,uBAAC,4CAAoB,cACnB,8CAAK,IAAI,EAAE,iBAAK,CAAC,oBAAoB,EAAE,OAAO,EAAE,OAAO,gBACpD,gBAAgB,CAAC,CAAC,CAAC,uBAAC,gBAAgB,KAAG,CAAC,CAAC,CAAC,uBAAC,aAAI,IAAC,GAAG,EAAE,wBAAQ,GAAI,IAC9D,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AAxBY,QAAA,cAAc,kBAwB1B;AAED,kBAAe,4BAAoB,CAAA"}
@@ -1,3 +0,0 @@
1
- export function SendButton({ onClick }: {
2
- onClick: any;
3
- }): JSX.Element;
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-button.js","sourceRoot":"","sources":["../../../../src/webchat/components/send-button.jsx"],"names":[],"mappings":";;;;;AAAA,uDAAyC;AAEzC,2FAAyD;AACzD,+CAAgD;AAChD,6CAA+C;AAC/C,+EAA0E;AAC1E,qCAA+B;AAExB,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,kBAAU,EAAC,yBAAc,CAAC,CAAA;IAEvD,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,mBAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,IAAI,CACL,CAAA;IAED,MAAM,gBAAgB,GAAG,gBAAgB,CACvC,mBAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,SAAS,CACV,CAAA;IAED,OAAO,CACL,2DACG,iBAAiB,IAAI,gBAAgB,CAAC,CAAC,CAAC,CACvC,uBAAC,4CAAoB,cACnB,8CAAK,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAK,CAAC,gBAAgB,gBAChD,gBAAgB,CAAC,CAAC,CAAC,CAClB,uBAAC,gBAAgB,KAAG,CACrB,CAAC,CAAC,CAAC,CACF,uBAAC,aAAI,IAAC,GAAG,EAAE,yBAAc,GAAI,CAC9B,IACG,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AA5BY,QAAA,UAAU,cA4BtB"}
@@ -1,5 +0,0 @@
1
- export function Attachment({ onChange, accept, enableAttachments }: {
2
- onChange: any;
3
- accept: any;
4
- enableAttachments: any;
5
- }): JSX.Element;
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachment.js","sourceRoot":"","sources":["../../../../src/webchat/components/attachment.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,cAAc,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,EAAE;IACpE,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAEvD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IAEjC,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAC3C,SAAS,CACV,CAAA;IAED,MAAM,oBAAoB,GAAG,GAAG,EAAE;;QAChC,MAAM,oBAAoB,GAAG,CAAC,CAAC,iBAAiB,CAAA;QAChD,OAAO,CACL,MAAA,gBAAgB,CACd,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAC3C,iBAAiB,CAClB,mCAAI,oBAAoB,CAC1B,CAAA;IACH,CAAC,CAAA;IACD,MAAM,kBAAkB,GAAG,oBAAoB,EAAE,CAAA;IAEjD,MAAM,cAAc,GAAG,KAAK,CAAC,EAAE;QAC7B,QAAQ,CAAC,KAAK,CAAC,CAAA;QACf,YAAY,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAA;IACnC,CAAC,CAAA;IAED,OAAO,CACL,4BACG,kBAAkB,CAAC,CAAC,CAAC,CACpB,KAAC,oBAAoB,cACnB,6BAAK,IAAI,EAAE,KAAK,CAAC,eAAe,iBAC9B,8BAAO,OAAO,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,gBAChD,iBAAiB,CAAC,CAAC,CAAC,CACnB,KAAC,iBAAiB,KAAG,CACtB,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,cAAc,GAAI,CAC9B,IACK,EACR,gBACE,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,YAAY,EACf,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,GACd,KACE,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export function EmojiPicker({ enableEmojiPicker, onClick }: {
2
- enableEmojiPicker: any;
3
- onClick: any;
4
- }): JSX.Element;
5
- export function OpenedEmojiPicker(props: any): JSX.Element;
@@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AC,CAAC,CAAC,CACpB,KAAC,oBAAoB,cACnB,4BAAK,IAAI,EAAE,KAAK,CAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,gBACrD,iBAAiB,CAAC,CAAC,CAAC,CACnB,KAAC,iBAAiB,KAAG,CACtB,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,SAAS,GAAI,CACzB,IACG,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAM3B,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,EAAE;IACvC,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAC5E,OAAO,CACL,4BAAK,GAAG,EAAE,GAAG,gBACV,kBAAkB,IAAI,CACrB,KAAC,SAAS,kBAAC,IAAI,EAAE,KAAK,CAAC,YAAY,gBACjC,KAAC,MAAM,IACL,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,OAAO,EACd,aAAa,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EACrC,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,gBAAgB,EAAE,IAAI,GACtB,IACQ,CACb,IACG,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistent-menu.js","sourceRoot":"","sources":["../../../../src/webchat/components/persistent-menu.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,QAAQ,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,i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ourceRoot":"","sources":["../../../../src/webchat/components/send-button.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,cAAc,MAAM,8BAA8B,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAEvD,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,IAAI,CACL,CAAA;IAED,MAAM,gBAAgB,GAAG,gBAAgB,CACvC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAC1C,SAAS,CACV,CAAA;IAED,OAAO,CACL,4BACG,iBAAiB,IAAI,gBAAgB,CAAC,CAAC,CAAC,CACvC,KAAC,oBAAoB,cACnB,4BAAK,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,gBAAgB,gBAChD,gBAAgB,CAAC,CAAC,CAAC,CAClB,KAAC,gBAAgB,KAAG,CACrB,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,cAAc,GAAI,CAC9B,IACG,GACe,CACxB,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA"}