@botonic/react 0.22.6 → 0.23.1-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/lib/cjs/components/image.js +3 -1
- package/lib/cjs/components/image.js.map +1 -1
- package/lib/cjs/components/index-types.d.ts +10 -1
- package/lib/cjs/components/index-types.js.map +1 -1
- package/lib/cjs/components/multichannel/index-types.d.ts +1 -0
- package/lib/cjs/components/multichannel/multichannel-text.js +53 -18
- package/lib/cjs/components/multichannel/multichannel-text.js.map +1 -1
- package/lib/cjs/components/multichannel/multichannel-utils.d.ts +2 -0
- package/lib/cjs/components/multichannel/multichannel-utils.js +3 -1
- package/lib/cjs/components/multichannel/multichannel-utils.js.map +1 -1
- package/lib/cjs/components/webchat-settings.d.ts +3 -10
- package/lib/cjs/components/webchat-settings.js +9 -14
- package/lib/cjs/components/webchat-settings.js.map +1 -1
- package/lib/cjs/components/whatsapp-button-list.d.ts +1 -1
- package/lib/cjs/constants.d.ts +1 -0
- package/lib/cjs/constants.js +1 -0
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/index-types.d.ts +24 -4
- package/lib/cjs/index-types.js +0 -4
- package/lib/cjs/index-types.js.map +1 -1
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/util/environment.js +1 -1
- package/lib/cjs/util/environment.js.map +1 -1
- package/lib/cjs/webchat/trigger-button/index.js +2 -1
- package/lib/cjs/webchat/trigger-button/index.js.map +1 -1
- package/lib/cjs/webchat/webchat.js +3 -1
- package/lib/cjs/webchat/webchat.js.map +1 -1
- package/lib/esm/components/image.js +3 -1
- package/lib/esm/components/image.js.map +1 -1
- package/lib/esm/components/index-types.d.ts +10 -1
- package/lib/esm/components/index-types.js.map +1 -1
- package/lib/esm/components/multichannel/index-types.d.ts +1 -0
- package/lib/esm/components/multichannel/multichannel-text.js +55 -20
- package/lib/esm/components/multichannel/multichannel-text.js.map +1 -1
- package/lib/esm/components/multichannel/multichannel-utils.d.ts +2 -0
- package/lib/esm/components/multichannel/multichannel-utils.js +2 -0
- package/lib/esm/components/multichannel/multichannel-utils.js.map +1 -1
- package/lib/esm/components/webchat-settings.d.ts +3 -10
- package/lib/esm/components/webchat-settings.js +9 -13
- package/lib/esm/components/webchat-settings.js.map +1 -1
- package/lib/esm/components/whatsapp-button-list.d.ts +1 -1
- package/lib/esm/constants.d.ts +1 -0
- package/lib/esm/constants.js +1 -0
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/index-types.d.ts +24 -4
- package/lib/esm/index-types.js +1 -3
- package/lib/esm/index-types.js.map +1 -1
- package/lib/esm/index.d.ts +2 -0
- package/lib/esm/index.js +2 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/util/environment.js +1 -1
- package/lib/esm/util/environment.js.map +1 -1
- package/lib/esm/webchat/trigger-button/index.js +2 -1
- package/lib/esm/webchat/trigger-button/index.js.map +1 -1
- package/lib/esm/webchat/webchat.js +3 -1
- package/lib/esm/webchat/webchat.js.map +1 -1
- package/package.json +2 -2
- package/src/components/image.jsx +3 -1
- package/src/components/index-types.ts +10 -1
- package/src/components/multichannel/index-types.ts +1 -0
- package/src/components/multichannel/multichannel-text.jsx +99 -25
- package/src/components/multichannel/multichannel-utils.js +2 -0
- package/src/components/{webchat-settings.jsx → webchat-settings.tsx} +8 -8
- package/src/components/whatsapp-button-list.tsx +1 -1
- package/src/constants.js +1 -0
- package/src/index-types.ts +26 -26
- package/src/index.ts +2 -2
- package/src/util/environment.js +1 -1
- package/src/webchat/trigger-button/index.tsx +6 -1
- package/src/webchat/webchat.jsx +4 -2
|
@@ -32,6 +32,11 @@ export const TriggerButton = (): JSX.Element => {
|
|
|
32
32
|
WEBCHAT.CUSTOM_PROPERTIES.triggerButtonStyle
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
+
const notificationsEnabled = getThemeProperty(
|
|
36
|
+
WEBCHAT.CUSTOM_PROPERTIES.triggerButtonNotificationsEnabled,
|
|
37
|
+
false
|
|
38
|
+
)
|
|
39
|
+
|
|
35
40
|
const CustomTriggerButton = getThemeProperty(
|
|
36
41
|
WEBCHAT.CUSTOM_PROPERTIES.customTrigger,
|
|
37
42
|
undefined
|
|
@@ -44,7 +49,7 @@ export const TriggerButton = (): JSX.Element => {
|
|
|
44
49
|
|
|
45
50
|
return (
|
|
46
51
|
<div onClick={handleClick}>
|
|
47
|
-
{webchatState.unreadMessages !== 0 && (
|
|
52
|
+
{webchatState.unreadMessages !== 0 && notificationsEnabled && (
|
|
48
53
|
<UnreadMessagesCounter className='trigger-notifications'>
|
|
49
54
|
{webchatState.unreadMessages}
|
|
50
55
|
</UnreadMessagesCounter>
|
package/src/webchat/webchat.jsx
CHANGED
|
@@ -496,8 +496,10 @@ export const Webchat = forwardRef((props, ref) => {
|
|
|
496
496
|
from: SENDERS.user,
|
|
497
497
|
src: temporaryDisplayUrl,
|
|
498
498
|
}
|
|
499
|
-
if (isImage(input))
|
|
500
|
-
|
|
499
|
+
if (isImage(input)) {
|
|
500
|
+
mediaProps.input = input
|
|
501
|
+
messageComponent = <Image {...mediaProps} />
|
|
502
|
+
} else if (isAudio(input)) messageComponent = <Audio {...mediaProps} />
|
|
501
503
|
else if (isVideo(input)) messageComponent = <Video {...mediaProps} />
|
|
502
504
|
else if (isDocument(input))
|
|
503
505
|
messageComponent = <Document {...mediaProps} />
|