@bikdotai/bik-component-library 0.0.813 → 0.0.814-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/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
- package/dist/cjs/components/TypographyStyle.js +22 -13
- package/dist/cjs/components/TypographyStyle.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.styled.js +3 -3
- package/dist/cjs/components/avatar/Avatar.styled.js.map +1 -1
- package/dist/cjs/components/avatar/AvatarHelper.js +1 -1
- package/dist/cjs/components/avatar/AvatarHelper.js.map +1 -1
- package/dist/cjs/components/bik-layout/BikSidebar.js.map +1 -1
- package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js +2 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +1 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +2 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +1 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +294 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +1 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +2 -0
- package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +1 -0
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +1 -1
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/button/themes.js +1 -1
- package/dist/cjs/components/button/themes.js.map +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js.map +1 -1
- package/dist/cjs/components/country-code-picker/CountryCodePicker.js.map +1 -1
- package/dist/cjs/components/country-code-picker/CountryPicker.js.map +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +6 -5
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +9 -9
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +8 -4
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.style.js +10 -6
- package/dist/cjs/components/dropdown-button/DropdownButton.style.js.map +1 -1
- package/dist/cjs/components/dual-icon-button/DualIconButton.js +2 -0
- package/dist/cjs/components/dual-icon-button/DualIconButton.js.map +1 -0
- package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js +26 -0
- package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js.map +1 -0
- package/dist/cjs/components/fab-menu/FABMenu.js.map +1 -1
- package/dist/cjs/components/icon-button/IconButton.js +1 -1
- package/dist/cjs/components/icon-button/IconButton.js.map +1 -1
- package/dist/cjs/components/icon-button/IconButton.styled.js +3 -3
- package/dist/cjs/components/icon-button/IconButton.styled.js.map +1 -1
- package/dist/cjs/components/icon-button/theme.js +1 -1
- package/dist/cjs/components/icon-button/theme.js.map +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/input/Input.styled.js +1 -1
- package/dist/cjs/components/input/Input.styled.js.map +1 -1
- package/dist/cjs/components/list-item/ListItem.js +1 -1
- package/dist/cjs/components/list-item/ListItem.js.map +1 -1
- package/dist/cjs/components/list-item/ListItem.styled.js +1 -1
- package/dist/cjs/components/list-item/ListItem.styled.js.map +1 -1
- package/dist/cjs/components/list-item/themes.js +1 -1
- package/dist/cjs/components/list-item/themes.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js +33 -30
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.js.map +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +1 -1
- package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
- package/dist/cjs/components/tag/model.js.map +1 -1
- package/dist/cjs/components/variable-picker-v3/SubHeaderItems.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
- package/dist/cjs/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNewPanel.js.map +1 -1
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/cjs/constants/Theme.js.map +1 -1
- package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js +1 -1
- package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/src/components/BikGiftedChat/GiftedChat/types.d.ts +6 -2
- package/dist/cjs/src/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/src/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/src/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/src/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/src/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/cjs/src/components/TypographyStyle.d.ts +4 -0
- package/dist/cjs/src/components/avatar/Avatar.d.ts +3 -2
- package/dist/cjs/src/components/avatar/AvatarHelper.d.ts +5 -4
- package/dist/cjs/src/components/bik-layout/BikSidebarV2/BikSidebarV2.d.ts +33 -0
- package/dist/cjs/src/components/bik-layout/BikSidebarV2/SidebarV2.model.d.ts +27 -0
- package/dist/cjs/src/components/bik-layout/BikSidebarV2/SidebarV2Popup.d.ts +13 -0
- package/dist/cjs/src/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +44 -0
- package/dist/cjs/src/components/bik-layout/BikSidebarV2/SimpleSidebarV2.d.ts +3 -0
- package/dist/cjs/src/components/bik-layout/index.d.ts +2 -0
- package/dist/cjs/src/components/button/Button.styled.d.ts +1 -1
- package/dist/cjs/src/components/button/model.d.ts +3 -3
- package/dist/cjs/src/components/button/themes.d.ts +2 -2
- package/dist/cjs/src/components/checkBox/CheckBox.d.ts +1 -0
- package/dist/cjs/src/components/country-code-picker/CountryCodePicker.d.ts +1 -1
- package/dist/cjs/src/components/country-code-picker/CountryPicker.d.ts +1 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/description/Description.d.ts +1 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +1 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.d.ts +3 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +3 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +3 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +2 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +3 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +1 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +1 -0
- package/dist/cjs/src/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +2 -0
- package/dist/cjs/src/components/dropdown/hooks/useDropdown.d.ts +2 -0
- package/dist/cjs/src/components/dropdown/type.d.ts +6 -1
- package/dist/cjs/src/components/dropdown-button/DropdownButton.d.ts +3 -1
- package/dist/cjs/src/components/dropdown-button/DropdownButton.style.d.ts +9 -2
- package/dist/cjs/src/components/dual-icon-button/DualIconButton.d.ts +3 -0
- package/dist/cjs/src/components/dual-icon-button/DualIconButton.styled.d.ts +7 -0
- package/dist/cjs/src/components/dual-icon-button/index.d.ts +2 -0
- package/dist/cjs/src/components/dual-icon-button/model.d.ts +12 -0
- package/dist/cjs/src/components/fab-menu/FABMenu.d.ts +1 -1
- package/dist/cjs/src/components/icon-button/IconButton.styled.d.ts +3 -1
- package/dist/cjs/src/components/icon-button/model.d.ts +12 -1
- package/dist/cjs/src/components/input/Input.model.d.ts +2 -1
- package/dist/cjs/src/components/input/Input.styled.d.ts +16 -1
- package/dist/cjs/src/components/list-item/List.model.d.ts +2 -1
- package/dist/cjs/src/components/list-item/ListItem.styled.d.ts +2 -1
- package/dist/cjs/src/components/list-item/themes.d.ts +2 -2
- package/dist/cjs/src/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -0
- package/dist/cjs/src/components/multi-level-dropdown/MenuItem.d.ts +1 -0
- package/dist/cjs/src/components/multi-level-dropdown/MenuList.d.ts +1 -0
- package/dist/cjs/src/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +13 -3
- package/dist/cjs/src/components/multi-level-dropdown/type.d.ts +1 -0
- package/dist/cjs/src/components/tag/Tag.d.ts +1 -1
- package/dist/cjs/src/components/tag/Tag.stories.d.ts +5 -5
- package/dist/cjs/src/components/tag/Tag.styled.d.ts +3 -1
- package/dist/cjs/src/components/tag/model.d.ts +5 -1
- package/dist/cjs/src/components/whats-new/WhatsNew.d.ts +2 -0
- package/dist/cjs/src/components/whats-new/WhatsNew.types.d.ts +2 -0
- package/dist/cjs/src/constants/Theme.d.ts +24 -0
- package/dist/cjs/src/icons/Arrows/Chevron/ChevronUp.d.ts +1 -2
- package/dist/cjs/src/icons/index.d.ts +24 -24
- package/dist/cjs/src/index.d.ts +1 -0
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
- package/dist/esm/components/TypographyStyle.js +21 -12
- package/dist/esm/components/TypographyStyle.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/avatar/Avatar.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.styled.js +6 -6
- package/dist/esm/components/avatar/Avatar.styled.js.map +1 -1
- package/dist/esm/components/avatar/AvatarHelper.js +1 -1
- package/dist/esm/components/avatar/AvatarHelper.js.map +1 -1
- package/dist/esm/components/bik-layout/BikSidebar.js.map +1 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js +2 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +1 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +2 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +1 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +294 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +1 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +2 -0
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +1 -0
- package/dist/esm/components/button/Button.js +1 -1
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/Button.styled.js +1 -1
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/button/themes.js.map +1 -1
- package/dist/esm/components/checkBox/CheckBox.js +1 -1
- package/dist/esm/components/checkBox/CheckBox.js.map +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.js.map +1 -1
- package/dist/esm/components/country-code-picker/CountryPicker.js.map +1 -1
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +3 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +10 -10
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +6 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.style.js +8 -4
- package/dist/esm/components/dropdown-button/DropdownButton.style.js.map +1 -1
- package/dist/esm/components/dual-icon-button/DualIconButton.js +2 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.js.map +1 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.js +26 -0
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.js.map +1 -0
- package/dist/esm/components/fab-menu/FABMenu.js.map +1 -1
- package/dist/esm/components/icon-button/IconButton.js +1 -1
- package/dist/esm/components/icon-button/IconButton.js.map +1 -1
- package/dist/esm/components/icon-button/IconButton.styled.js +1 -1
- package/dist/esm/components/icon-button/IconButton.styled.js.map +1 -1
- package/dist/esm/components/icon-button/theme.js +1 -1
- package/dist/esm/components/icon-button/theme.js.map +1 -1
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.styled.js +1 -1
- package/dist/esm/components/input/Input.styled.js.map +1 -1
- package/dist/esm/components/list-item/ListItem.js +1 -1
- package/dist/esm/components/list-item/ListItem.js.map +1 -1
- package/dist/esm/components/list-item/ListItem.styled.js +1 -1
- package/dist/esm/components/list-item/ListItem.styled.js.map +1 -1
- package/dist/esm/components/list-item/themes.js +1 -1
- package/dist/esm/components/list-item/themes.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +32 -29
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/Tag.js.map +1 -1
- package/dist/esm/components/tag/Tag.styled.js +1 -1
- package/dist/esm/components/tag/Tag.styled.js.map +1 -1
- package/dist/esm/components/tag/model.js.map +1 -1
- package/dist/esm/components/variable-picker-v3/SubHeaderItems.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNew.js +1 -1
- package/dist/esm/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
- package/dist/esm/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNewPanel.js.map +1 -1
- package/dist/esm/constants/Theme.js +1 -1
- package/dist/esm/constants/Theme.js.map +1 -1
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.js +1 -1
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/src/components/BikGiftedChat/GiftedChat/types.d.ts +6 -2
- package/dist/esm/src/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/src/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/src/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/src/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/src/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/esm/src/components/TypographyStyle.d.ts +4 -0
- package/dist/esm/src/components/avatar/Avatar.d.ts +3 -2
- package/dist/esm/src/components/avatar/AvatarHelper.d.ts +5 -4
- package/dist/esm/src/components/bik-layout/BikSidebarV2/BikSidebarV2.d.ts +33 -0
- package/dist/esm/src/components/bik-layout/BikSidebarV2/SidebarV2.model.d.ts +27 -0
- package/dist/esm/src/components/bik-layout/BikSidebarV2/SidebarV2Popup.d.ts +13 -0
- package/dist/esm/src/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +44 -0
- package/dist/esm/src/components/bik-layout/BikSidebarV2/SimpleSidebarV2.d.ts +3 -0
- package/dist/esm/src/components/bik-layout/index.d.ts +2 -0
- package/dist/esm/src/components/button/Button.styled.d.ts +1 -1
- package/dist/esm/src/components/button/model.d.ts +3 -3
- package/dist/esm/src/components/button/themes.d.ts +2 -2
- package/dist/esm/src/components/checkBox/CheckBox.d.ts +1 -0
- package/dist/esm/src/components/country-code-picker/CountryCodePicker.d.ts +1 -1
- package/dist/esm/src/components/country-code-picker/CountryPicker.d.ts +1 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/description/Description.d.ts +1 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +1 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.d.ts +3 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +3 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +3 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +2 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +3 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +1 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +1 -0
- package/dist/esm/src/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +2 -0
- package/dist/esm/src/components/dropdown/hooks/useDropdown.d.ts +2 -0
- package/dist/esm/src/components/dropdown/type.d.ts +6 -1
- package/dist/esm/src/components/dropdown-button/DropdownButton.d.ts +3 -1
- package/dist/esm/src/components/dropdown-button/DropdownButton.style.d.ts +9 -2
- package/dist/esm/src/components/dual-icon-button/DualIconButton.d.ts +3 -0
- package/dist/esm/src/components/dual-icon-button/DualIconButton.styled.d.ts +7 -0
- package/dist/esm/src/components/dual-icon-button/index.d.ts +2 -0
- package/dist/esm/src/components/dual-icon-button/model.d.ts +12 -0
- package/dist/esm/src/components/fab-menu/FABMenu.d.ts +1 -1
- package/dist/esm/src/components/icon-button/IconButton.styled.d.ts +3 -1
- package/dist/esm/src/components/icon-button/model.d.ts +12 -1
- package/dist/esm/src/components/input/Input.model.d.ts +2 -1
- package/dist/esm/src/components/input/Input.styled.d.ts +16 -1
- package/dist/esm/src/components/list-item/List.model.d.ts +2 -1
- package/dist/esm/src/components/list-item/ListItem.styled.d.ts +2 -1
- package/dist/esm/src/components/list-item/themes.d.ts +2 -2
- package/dist/esm/src/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -0
- package/dist/esm/src/components/multi-level-dropdown/MenuItem.d.ts +1 -0
- package/dist/esm/src/components/multi-level-dropdown/MenuList.d.ts +1 -0
- package/dist/esm/src/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +13 -3
- package/dist/esm/src/components/multi-level-dropdown/type.d.ts +1 -0
- package/dist/esm/src/components/tag/Tag.d.ts +1 -1
- package/dist/esm/src/components/tag/Tag.stories.d.ts +5 -5
- package/dist/esm/src/components/tag/Tag.styled.d.ts +3 -1
- package/dist/esm/src/components/tag/model.d.ts +5 -1
- package/dist/esm/src/components/whats-new/WhatsNew.d.ts +2 -0
- package/dist/esm/src/components/whats-new/WhatsNew.types.d.ts +2 -0
- package/dist/esm/src/constants/Theme.d.ts +24 -0
- package/dist/esm/src/icons/Arrows/Chevron/ChevronUp.d.ts +1 -2
- package/dist/esm/src/icons/index.d.ts +24 -24
- package/dist/esm/src/index.d.ts +1 -0
- package/package.json +3 -2
|
@@ -92,7 +92,11 @@ export interface TagProps extends React.BaseHTMLAttributes<HTMLDivElement> {
|
|
|
92
92
|
*/
|
|
93
93
|
leadingIconTooltip?: Omit<TooltipProps, 'children'>;
|
|
94
94
|
tagText: string | number;
|
|
95
|
-
version?: '1.0' | '2.0';
|
|
95
|
+
version?: '1.0' | '2.0' | '3.0';
|
|
96
|
+
/** Custom CSS padding string, e.g. '4px 8px' */
|
|
97
|
+
padding?: string;
|
|
98
|
+
/** Custom height in px */
|
|
99
|
+
height?: number;
|
|
96
100
|
cursor?: string;
|
|
97
101
|
alignIcon?: string;
|
|
98
102
|
noBorder?: boolean;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export declare const BASE_COLORS: {
|
|
2
2
|
brand: {
|
|
3
3
|
900: string;
|
|
4
|
+
850: string;
|
|
4
5
|
800: string;
|
|
6
|
+
700: string;
|
|
5
7
|
500: string;
|
|
6
8
|
100: string;
|
|
7
9
|
50: string;
|
|
8
10
|
10: string;
|
|
11
|
+
7: string;
|
|
12
|
+
5: string;
|
|
9
13
|
};
|
|
10
14
|
grayscale: {
|
|
11
15
|
900: string;
|
|
@@ -52,8 +56,11 @@ export declare const COLORS: {
|
|
|
52
56
|
brand: string;
|
|
53
57
|
brandLight: string;
|
|
54
58
|
brandVeryLight: string;
|
|
59
|
+
brandUltraLight: string;
|
|
60
|
+
brandGhost: string;
|
|
55
61
|
pureWhite: string;
|
|
56
62
|
brandTint: string;
|
|
63
|
+
brandHovered: string;
|
|
57
64
|
negative: {
|
|
58
65
|
vibrant: string;
|
|
59
66
|
light: string;
|
|
@@ -114,6 +121,7 @@ export declare const COLORS: {
|
|
|
114
121
|
vibrant: string;
|
|
115
122
|
};
|
|
116
123
|
brandLightAlt: string;
|
|
124
|
+
brandSubdued: string;
|
|
117
125
|
blue: {
|
|
118
126
|
lightAlt: string;
|
|
119
127
|
};
|
|
@@ -206,6 +214,12 @@ export declare const FONTS: {
|
|
|
206
214
|
lineHeight: number;
|
|
207
215
|
letterSpacing: number;
|
|
208
216
|
};
|
|
217
|
+
bodyTinySemiBold: {
|
|
218
|
+
fontWeight: string;
|
|
219
|
+
fontSize: number;
|
|
220
|
+
lineHeight: number;
|
|
221
|
+
letterSpacing: number;
|
|
222
|
+
};
|
|
209
223
|
tiny: {
|
|
210
224
|
fontWeight: string;
|
|
211
225
|
fontSize: number;
|
|
@@ -343,8 +357,11 @@ export declare const DEFAULT_THEME: {
|
|
|
343
357
|
brand: string;
|
|
344
358
|
brandLight: string;
|
|
345
359
|
brandVeryLight: string;
|
|
360
|
+
brandUltraLight: string;
|
|
361
|
+
brandGhost: string;
|
|
346
362
|
pureWhite: string;
|
|
347
363
|
brandTint: string;
|
|
364
|
+
brandHovered: string;
|
|
348
365
|
negative: {
|
|
349
366
|
vibrant: string;
|
|
350
367
|
light: string;
|
|
@@ -405,6 +422,7 @@ export declare const DEFAULT_THEME: {
|
|
|
405
422
|
vibrant: string;
|
|
406
423
|
};
|
|
407
424
|
brandLightAlt: string;
|
|
425
|
+
brandSubdued: string;
|
|
408
426
|
blue: {
|
|
409
427
|
lightAlt: string;
|
|
410
428
|
};
|
|
@@ -497,6 +515,12 @@ export declare const DEFAULT_THEME: {
|
|
|
497
515
|
lineHeight: number;
|
|
498
516
|
letterSpacing: number;
|
|
499
517
|
};
|
|
518
|
+
bodyTinySemiBold: {
|
|
519
|
+
fontWeight: string;
|
|
520
|
+
fontSize: number;
|
|
521
|
+
lineHeight: number;
|
|
522
|
+
letterSpacing: number;
|
|
523
|
+
};
|
|
500
524
|
tiny: {
|
|
501
525
|
fontWeight: string;
|
|
502
526
|
fontSize: number;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { SVGProps } from 'react';
|
|
2
2
|
interface Props extends SVGProps<SVGSVGElement> {
|
|
3
|
-
size?: number | string;
|
|
4
3
|
color?: string;
|
|
5
4
|
}
|
|
6
|
-
declare const SvgChevronUp: ({
|
|
5
|
+
declare const SvgChevronUp: ({ width, height, color, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default SvgChevronUp;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
export { Activate, Code, Cross, Deactivate, Delete, Edit, Forward, Fullscreen, LinkSimpleHorizontal, Minus, Plus, SendAirplane, ShareAndroid } from './Actions/Common actions';
|
|
2
|
-
export { CheckboxIcon, Copy, DecreaseIndent, Dropdown, IncreaseIndent, MultiLine, MultiSelect, Number, NumberList, Quotes, Subscript, Superscript, TextBold, Text, TextAlignCenter, TextAlignLeft, TextAlignRight, TextItalics, TextJustify, TextStrikethrough, TextUnderline, Textbox } from './Actions/Formatting';
|
|
3
|
-
export { ArrowRedo, ArrowUndo, LogIn, LogOut, OpenNewWindow, Refresh, Rewind, Sync, Whatsapp } from './Actions/Navigation';
|
|
1
|
+
export { Activate, Code, Cross, Deactivate, Delete, Edit, Forward, Fullscreen, LinkSimpleHorizontal, Minus, Plus, SendAirplane, ShareAndroid, } from './Actions/Common actions';
|
|
2
|
+
export { CheckboxIcon, Copy, DecreaseIndent, Dropdown, IncreaseIndent, MultiLine, MultiSelect, Number, NumberList, Quotes, Subscript, Superscript, TextBold, Text, TextAlignCenter, TextAlignLeft, TextAlignRight, TextItalics, TextJustify, TextStrikethrough, TextUnderline, Textbox, } from './Actions/Formatting';
|
|
3
|
+
export { ArrowRedo, ArrowUndo, LogIn, LogOut, OpenNewWindow, Refresh, Rewind, Sync, Whatsapp, } from './Actions/Navigation';
|
|
4
4
|
export { HandleDrag, SingleChoice } from './Actions/Selection';
|
|
5
5
|
export { CaratDown, CaratLeft, CaratRight, CaratUp } from './Arrows/Carat';
|
|
6
|
-
export { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from './Arrows/Chevron';
|
|
7
|
-
export { ChevronDoubleDown, ChevronDoubleLeft, ChevronDoubleRight, ChevronDoubleUp } from './Arrows/Double chevron';
|
|
8
|
-
export { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight } from './Arrows/Normal arrows';
|
|
6
|
+
export { ChevronDown, ChevronLeft, ChevronRight, ChevronUp, } from './Arrows/Chevron';
|
|
7
|
+
export { ChevronDoubleDown, ChevronDoubleLeft, ChevronDoubleRight, ChevronDoubleUp, } from './Arrows/Double chevron';
|
|
8
|
+
export { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight, } from './Arrows/Normal arrows';
|
|
9
9
|
export { ArrowSwitch } from './Arrows/Special';
|
|
10
|
-
export { AiIcon, AiEmoji, AiRobot, Expand, Frame27389, Frame27597, Frame27598, Frame27599, GeminiSparkle, ManifestSparkle, PricePlease, Shape, Shorter, Sparkling2Line, Write } from './BIK AI specific';
|
|
11
|
-
export { Bell, BellSync, Bulb, Forms, MenuHamburger, MessageSearch, MoreHorizontal, MoreVertical, Placeholder, Search, Settings, Training } from './Informational/Common UI';
|
|
12
|
-
export { Chat, ChatCheck, ChatQuestion, ChatStar, Email, LiveChat, Phone } from './Informational/Communication';
|
|
13
|
-
export { ClipboardCheck, Experimental, Help, Percent, Purchase, Services, ShoppingCart, Unsatisfactory, UserSound } from './Informational/Customer intent';
|
|
10
|
+
export { AiIcon, AiEmoji, AiRobot, Expand, Frame27389, Frame27597, Frame27598, Frame27599, GeminiSparkle, ManifestSparkle, PricePlease, Shape, Shorter, Sparkling2Line, Write, } from './BIK AI specific';
|
|
11
|
+
export { Bell, BellSync, Bulb, Forms, MenuHamburger, MessageSearch, MoreHorizontal, MoreVertical, Placeholder, Search, Settings, Training, } from './Informational/Common UI';
|
|
12
|
+
export { Chat, ChatCheck, ChatQuestion, ChatStar, Email, LiveChat, Phone, } from './Informational/Communication';
|
|
13
|
+
export { ClipboardCheck, Experimental, Help, Percent, Purchase, Services, ShoppingCart, Unsatisfactory, UserSound, } from './Informational/Customer intent';
|
|
14
14
|
export { SingleChoice as SingleChoice2 } from './Informational/Customer intent';
|
|
15
|
-
export { Calendar, CalendarAdd, Clock, HourGlass, WorkingHours } from './Informational/Date and time';
|
|
16
|
-
export { AddLabel, Click, Filter, Gift1, GiftMinus, GiftPlus, Promocode, Receipt, ShieldCheck, ShoppingBag, ShoppingBasket } from './Informational/eCommerce';
|
|
15
|
+
export { Calendar, CalendarAdd, Clock, HourGlass, WorkingHours, } from './Informational/Date and time';
|
|
16
|
+
export { AddLabel, Click, Filter, Gift1, GiftMinus, GiftPlus, Promocode, Receipt, ShieldCheck, ShoppingBag, ShoppingBasket, } from './Informational/eCommerce';
|
|
17
17
|
export { ShoppingCart as ShoppingCart2 } from './Informational/eCommerce';
|
|
18
|
-
export { Archive1, Excel, File, FileCsv, FilePage, FilePdf, Folder, MediaMessage, Move, OrderHistory, PrivateNote, TextMessage, Unarchive } from './Informational/Files and folders';
|
|
19
|
-
export { Bank, CashOnDelivery, ChartLine, CreditCard, Growth, Money1, NoCredits, Rupee, TablerTicket, Wallet } from './Informational/Finance';
|
|
18
|
+
export { Archive1, Excel, File, FileCsv, FilePage, FilePdf, Folder, MediaMessage, Move, OrderHistory, PrivateNote, TextMessage, Unarchive, } from './Informational/Files and folders';
|
|
19
|
+
export { Bank, CashOnDelivery, ChartLine, CreditCard, Growth, Money1, NoCredits, Rupee, TablerTicket, Wallet, } from './Informational/Finance';
|
|
20
20
|
export { Percent as Percent2 } from './Informational/Finance';
|
|
21
|
-
export { AlertTriangle, Check, CheckDouble, CloseTicket1, Error, FailDoc, IcList, Info, NewTicket, RoundCheck, Slash } from './Informational/General';
|
|
21
|
+
export { AlertTriangle, Check, CheckDouble, CloseTicket1, Error, FailDoc, IcList, Info, NewTicket, RoundCheck, Slash, } from './Informational/General';
|
|
22
22
|
export { Help as Help2 } from './Informational/General';
|
|
23
|
-
export { Chatbot, Contacts, Group, IdCard, Person, Robot, Union, Union1, UserMinus1, UserPlus } from './Informational/Identity';
|
|
24
|
-
export { Address, LanguageChange, MapPin, Truck } from './Informational/Location';
|
|
25
|
-
export { AllProduct, Clipboard, CustomerReport, Head112, InventoryReport, LegalBalance, OrderReport, PaymentReport, Store, StoreSync } from './Informational/Store related';
|
|
23
|
+
export { Chatbot, Contacts, Group, IdCard, Person, Robot, Union, Union1, UserMinus1, UserPlus, } from './Informational/Identity';
|
|
24
|
+
export { Address, LanguageChange, MapPin, Truck, } from './Informational/Location';
|
|
25
|
+
export { AllProduct, Clipboard, CustomerReport, Head112, InventoryReport, LegalBalance, OrderReport, PaymentReport, Store, StoreSync, } from './Informational/Store related';
|
|
26
26
|
export { ClipboardCheck as ClipboardCheck2 } from './Informational/Store related';
|
|
27
27
|
export { Box, Box2 } from './Legacy - Bikayi specific/Categories';
|
|
28
28
|
export { Journeys } from './Legacy - Bikayi specific/Navigation';
|
|
29
29
|
export { Services as Services2 } from './Legacy - Bikayi specific/Navigation';
|
|
30
30
|
export { PlanUltimate } from './Legacy - Bikayi specific/Plans';
|
|
31
|
-
export { Businesscard, Customdomain, Marketing, PaymentLink, Theme } from './Legacy - Bikayi specific/Services';
|
|
32
|
-
export { Microphone, Pause, Play, Sleep, VolumeMute, VolumeOneline, VolumeTwoline } from './Media/Audio';
|
|
31
|
+
export { Businesscard, Customdomain, Marketing, PaymentLink, Theme, } from './Legacy - Bikayi specific/Services';
|
|
32
|
+
export { Microphone, Pause, Play, Sleep, VolumeMute, VolumeOneline, VolumeTwoline, } from './Media/Audio';
|
|
33
33
|
export { Desktop, Smartphone } from './Media/Devices';
|
|
34
|
-
export { BarcodeScan, Download, EmojiSmile, Paperclip, Upload } from './Media/Others';
|
|
35
|
-
export { Camera, CameraAdd, Crop, FlashOff, FlashOn, Image, ImageAdd, Images, Maximize, RotateAnticlockwise, RotateClockwise, VideoCamcorder, VideoFilm } from './Media/Visual';
|
|
36
|
-
export { Bigcommerce, EmailMarketing, Facebook, FacebookComment, Instagram, InstagramIcon, Messenger, Tasks, WebPush, WhatsApp } from './Social/Channels';
|
|
34
|
+
export { BarcodeScan, Download, EmojiSmile, Paperclip, Upload, } from './Media/Others';
|
|
35
|
+
export { Camera, CameraAdd, Crop, FlashOff, FlashOn, Image, ImageAdd, Images, Maximize, RotateAnticlockwise, RotateClockwise, VideoCamcorder, VideoFilm, } from './Media/Visual';
|
|
36
|
+
export { Bigcommerce, EmailMarketing, Facebook, FacebookComment, Instagram, InstagramIcon, Messenger, Tasks, WebPush, WhatsApp, } from './Social/Channels';
|
|
37
37
|
export { Email as Email2 } from './Social/Channels';
|
|
38
38
|
export { Google, Rcs, Twitter, Website, Youtube } from './Social/Social';
|
|
39
39
|
export { EmailMarketing as EmailMarketing2 } from './Social/Social';
|
|
@@ -41,4 +41,4 @@ export { Facebook as Facebook2 } from './Social/Social';
|
|
|
41
41
|
export { Instagram as Instagram2 } from './Social/Social';
|
|
42
42
|
export { Messenger as Messenger2 } from './Social/Social';
|
|
43
43
|
export { Whatsapp as Whatsapp2 } from './Social/Social';
|
|
44
|
-
export { Eye, EyeClosed, EyeOff, HeartEmpty, HeartFilled, Lock, StarEmpty, StarFilled, StarHalf, Unlock } from './Toggles/General';
|
|
44
|
+
export { Eye, EyeClosed, EyeOff, HeartEmpty, HeartFilled, Lock, StarEmpty, StarFilled, StarHalf, Unlock, } from './Toggles/General';
|
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './components/spinner';
|
|
|
17
17
|
export * from './components/stepper';
|
|
18
18
|
export * from './components/tag';
|
|
19
19
|
export * from './components/icon-button';
|
|
20
|
+
export * from './components/dual-icon-button';
|
|
20
21
|
export * from './components/template-preview';
|
|
21
22
|
export * from './components/template-context-mapper';
|
|
22
23
|
export * from './components/fab-menu';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import t,{useMemo as n,useCallback as
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import t,{useMemo as n,useCallback as l}from"react";import{COLORS as o}from"../../../constants/Theme.js";import{useWindowSize as r}from"../../../hooks/useWindowSize.js";import{MESSAGE_CHANNELS as s}from"../GiftedChat/types.js";import{Constants as a,isStringifiedArray as d}from"../GiftedChat/utils.js";import{GiftedChatAppType as c}from"./types.js";const g=t=>{var g,u,v,f,h,m;const{currentMessage:b,position:y,renderMessageText:p,renderTicks:j,renderTime:T,renderCustomView:I,isCustomViewBottom:O,isUnsatisfactoryMessageFn:k,messagesGroupedByAiTraceId:x,onPress:C,containerStyle:A,bubbleStyles:w,appType:M=c.Bik}=t,G=r(),P=b,B=M===c.Manifest,S=n((()=>P.category===a.ChatActivity.Category.ACTIVITY&&P.activityType===a.ChatActivity.Type.PRIVATE_NOTE),[P.category,P.activityType]),N=n((()=>{const[e,i]=d(null==P?void 0:P.message);return e&&i&&Array.isArray(i)}),[null==P?void 0:P.message]),V=(null==P?void 0:P.channelId)===s.SMTP||(null==P?void 0:P.channelName)===s.SMTP,L=n((()=>{var e,i,t;const n={borderRadius:8,minHeight:20,margin:0,flexGrow:G?1:0,width:"100%"},l=(null==P?void 0:P.channelId)===s.GMAIL||(null==P?void 0:P.channelName)===s.GMAIL;let r={};if(B)return r="left"===y?w&&"object"==typeof w.left?w.left:{}:w&&"object"==typeof w.right?w.right:{},Object.assign({},r);if("left"===y)r=Object.assign(Object.assign({},G||l||V?{maxWidth:"100%"}:{}),S?{background:o.background.warning.light}:{backgroundColor:(null==P?void 0:P.isPrivateMail)?o.background.blue.light:o.background.warning.light});else{const i=k&&k({aiTraceId:null===(e=P.eventProperties)||void 0===e?void 0:e.aiTraceId,messagesGroupedByAiTraceId:x});r=Object.assign(Object.assign({backgroundColor:"failed"===P.status||i?o.background.negative.light:o.background.brandUltraLight},S?{background:o.background.warning.light}:{}),!G&&N?{maxWidth:500}:{})}const a=w&&"object"==typeof w?"left"in w||"right"in w?"left"===y?null!==(i=w.left)&&void 0!==i?i:{}:null!==(t=w.right)&&void 0!==t?t:{}:w:{};return Object.assign(Object.assign(Object.assign({},n),r),a)}),[null==P?void 0:P.channelId,null==P?void 0:P.channelName,null===(g=null==P?void 0:P.meta)||void 0===g?void 0:g.aiUsed,null==P?void 0:P.status,null===(u=null==P?void 0:P.eventProperties)||void 0===u?void 0:u.aiTraceId,y,G,S,N,k,x,null==P?void 0:P.isPrivateMail,w,B]),U=l((()=>e("div",{children:[!O&&(null==I?void 0:I(t)),null==p?void 0:p(t),O&&(null==I?void 0:I(t))]})),[O,I,p,t]),W=n((()=>B&&"object"==typeof A?"left"===y&&"left"in A&&A.left&&"object"==typeof A.left?A.left:"right"===y&&"right"in A&&A.right&&"object"==typeof A.right?A.right:{}:{}),[B,A,y]),E=!B&&A&&"object"==typeof A?"left"in A||"right"in A?"left"===y?null!==(v=A.left)&&void 0!==v?v:{}:null!==(f=A.right)&&void 0!==f?f:{}:A:{};return i("div",Object.assign({style:Object.assign(Object.assign(Object.assign({display:"flex",marginTop:B?0:6,marginBottom:B?0:(null===(m=null===(h=null==b?void 0:b.messageInformation)||void 0===h?void 0:h.reactions)||void 0===m?void 0:m.length)>0?24:6,flexGrow:G?1:0},B?Object.assign({alignItems:"flex-end"},"right"===y?{cursor:"pointer"}:{}):{}),W),E)},B?{onClick:C}:{},{children:i("div",Object.assign({style:L},{children:e("div",{children:[i("div",Object.assign({id:b.chatActivityId||`message-${b.psqlId}`},{children:U()})),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end"}},{children:[null==T?void 0:T(t),null==j?void 0:j(b)]}))]})}))}))},u=t.memo(g);export{u as Bubble,u as default};
|
|
2
2
|
//# sourceMappingURL=Bubble.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\t\tconst isSmtp =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: message?.meta?.aiUsed\n\t\t\t\t\t\t\t\t\t? 'linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)'\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.surface.hovered,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandVeryLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: message?.meta?.aiUsed\n\t\t\t\t\t\t\t\t\t? 'linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)'\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn { ...baseStyles, ...dynamicStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\tmarginLeft: '32px',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","Bik","isMobile","useWindowSize","message","isManifestApp","Manifest","isPrivateNote","useMemo","category","Constants","ChatActivity","Category","ACTIVITY","activityType","Type","PRIVATE_NOTE","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","Array","isArray","wrapperStyles","baseStyles","borderRadius","minHeight","margin","flexGrow","isGmail","channelId","MESSAGE_CHANNELS","GMAIL","channelName","isSmtp","SMTP","dynamicStyles","left","right","Object","assign","maxWidth","background","_a","meta","aiUsed","COLORS","warning","light","backgroundColor","isPrivateMail","blue","surface","hovered","isUnsatisfactory","aiTraceId","_b","eventProperties","status","negative","brandVeryLight","_c","renderContent","useCallback","_jsxs","children","manifestContainerStyle","_jsx","style","display","marginTop","marginBottom","_d","reactions","length","alignItems","cursor","onClick","id","flexDirection","justifyContent","marginLeft","Bubble","React","memo"],"mappings":"+YAQA,MAAMA,EACLC,gBAEA,MAAMC,eACLA,EAAcC,SACdA,EAAQC,kBACRA,EAAiBC,YACjBA,EAAWC,WACXA,EAAUC,iBACVA,EAAgBC,mBAChBA,EAAkBC,0BAClBA,EAAyBC,2BACzBA,EAA0BC,QAC1BA,EAAOC,eACPA,EAAcC,aACdA,EAAYC,QACZA,EAAUC,EAAkBC,KACzBf,EAEEgB,EAAWC,IACXC,EAAUjB,EACVkB,EAAgBN,IAAYC,EAAkBM,SAG9CC,EAAgBC,GACrB,IACCJ,EAAQK,WAAaC,EAAUC,aAAaC,SAASC,UACrDT,EAAQU,eAAiBJ,EAAUC,aAAaI,KAAKC,cACtD,CAACZ,EAAQK,SAAUL,EAAQU,eAItBG,EAAoBT,GAAQ,KACjC,MAAOU,EAAoBC,GAAiBC,EAC3ChB,aAAA,EAAAA,EAASA,SAEV,OAAOc,GAAsBC,GAAiBE,MAAMC,QAAQH,EAAc,GACxE,CAACf,aAAA,EAAAA,EAASA,UAGPmB,EAAgBf,GAAQ,eAC7B,MAAMgB,EAAkC,CACvCC,aAAc,EACdC,UAAW,GACXC,OAAQ,EACRC,SAAU1B,EAAW,EAAI,GAIpB2B,GACLzB,aAAA,EAAAA,EAAS0B,aAAcC,EAAiBC,QACxC5B,aAAA,EAAAA,EAAS6B,eAAgBF,EAAiBC,MACrCE,GACL9B,aAAA,EAAAA,EAAS0B,aAAcC,EAAiBI,OACxC/B,aAAA,EAAAA,EAAS6B,eAAgBF,EAAiBI,KAE3C,IAAIC,EAAqC,CAAA,EAEzC,GAAI/B,EAYH,OAVC+B,EADgB,SAAbhD,EAEFU,GAA6C,iBAAtBA,EAA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A1E,aAAU,EAAVA,EAAaL,GACbI,aAAA,EAAAA,EAAcH,eAIb,EAKK+F,EAASC,EAAMC,KAAKnG"}
|
|
1
|
+
{"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\tconst isSmtp =\n\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\twidth: '100%',\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandUltraLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tconst extraBubbleStyles: React.CSSProperties =\n\t\t\tbubbleStyles && typeof bubbleStyles === 'object'\n\t\t\t\t? 'left' in bubbleStyles || 'right' in bubbleStyles\n\t\t\t\t\t? position === 'left'\n\t\t\t\t\t\t? (bubbleStyles as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t\t: (bubbleStyles as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t\t: (bubbleStyles as React.CSSProperties)\n\t\t\t\t: {};\n\n\t\treturn { ...baseStyles, ...dynamicStyles, ...extraBubbleStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\tconst extraContainerStyle: React.CSSProperties =\n\t\t!isManifestApp && containerStyle && typeof containerStyle === 'object'\n\t\t\t? 'left' in containerStyle || 'right' in containerStyle\n\t\t\t\t? position === 'left'\n\t\t\t\t\t? (containerStyle as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t: (containerStyle as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t: (containerStyle as React.CSSProperties)\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t\t...extraContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","Bik","isMobile","useWindowSize","message","isManifestApp","Manifest","isPrivateNote","useMemo","category","Constants","ChatActivity","Category","ACTIVITY","activityType","Type","PRIVATE_NOTE","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","Array","isArray","isSmtp","channelId","MESSAGE_CHANNELS","SMTP","channelName","wrapperStyles","baseStyles","borderRadius","minHeight","margin","flexGrow","width","isGmail","GMAIL","dynamicStyles","left","right","Object","assign","maxWidth","background","COLORS","warning","light","backgroundColor","isPrivateMail","blue","isUnsatisfactory","aiTraceId","_a","eventProperties","status","negative","brandUltraLight","extraBubbleStyles","_b","_c","meta","aiUsed","renderContent","useCallback","_jsxs","children","manifestContainerStyle","extraContainerStyle","_d","_jsx","style","display","marginTop","marginBottom","_f","_e","reactions","length","alignItems","cursor","onClick","id","flexDirection","justifyContent","Bubble","React","memo"],"mappings":"+YAQA,MAAMA,EACLC,oBAEA,MAAMC,eACLA,EAAcC,SACdA,EAAQC,kBACRA,EAAiBC,YACjBA,EAAWC,WACXA,EAAUC,iBACVA,EAAgBC,mBAChBA,EAAkBC,0BAClBA,EAAyBC,2BACzBA,EAA0BC,QAC1BA,EAAOC,eACPA,EAAcC,aACdA,EAAYC,QACZA,EAAUC,EAAkBC,KACzBf,EAEEgB,EAAWC,IACXC,EAAUjB,EACVkB,EAAgBN,IAAYC,EAAkBM,SAG9CC,EAAgBC,GACrB,IACCJ,EAAQK,WAAaC,EAAUC,aAAaC,SAASC,UACrDT,EAAQU,eAAiBJ,EAAUC,aAAaI,KAAKC,cACtD,CAACZ,EAAQK,SAAUL,EAAQU,eAItBG,EAAoBT,GAAQ,KACjC,MAAOU,EAAoBC,GAAiBC,EAC3ChB,aAAA,EAAAA,EAASA,SAEV,OAAOc,GAAsBC,GAAiBE,MAAMC,QAAQH,EAAc,GACxE,CAACf,aAAA,EAAAA,EAASA,UACPmB,GACLnB,aAAA,EAAAA,EAASoB,aAAcC,EAAiBC,OACxCtB,aAAA,EAAAA,EAASuB,eAAgBF,EAAiBC,KAIrCE,EAAgBpB,GAAQ,eAC7B,MAAMqB,EAAkC,CACvCC,aAAc,EACdC,UAAW,GACXC,OAAQ,EACRC,SAAU/B,EAAW,EAAI,EACzBgC,MAAO,QAIFC,GACL/B,aAAA,EAAAA,EAASoB,aAAcC,EAAiBW,QACxChC,aAAA,EAAAA,EAASuB,eAAgBF,EAAiBW,MAE3C,IAAIC,EAAqC,CAAA,EAEzC,GAAIhC,EAYH,OAVCgC,EADgB,SAAbjD,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MAAO1C,GACX,CAAAqC,SAAAD,EAAA,MAAA,CAAAC,SAAA,CAECI,EACC,MAAA7B,OAAAC,OAAA,CAAAwC,GACC9F,EAA+B,gBAC/B,WAAWA,EAAuB,UAAG,CAAA8E,SAGrCH,OAIFE,EACC,MAAAxB,OAAAC,OAAA,CAAA6B,MAAO,CACNC,QAAS,OACTW,cAAe,MACfC,eAAgB,aAGhB,CAAAlB,SAAA,CAAA1E,aAAU,EAAVA,EAAaL,GACbI,aAAA,EAAAA,EAAcH,eAIb,EAKKiG,EAASC,EAAMC,KAAKrG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{startOfDay as r,format as n,isSameYear as a,differenceInDays as i}from"date-fns";import o,{useMemo as s}from"react";import{COLORS as l}from"../../../constants/Theme.js";import{BodyCaption as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{startOfDay as r,format as n,isSameYear as a,differenceInDays as i}from"date-fns";import o,{useMemo as s}from"react";import{COLORS as l}from"../../../constants/Theme.js";import{BodyCaption as d}from"../../TypographyStyle.js";import{GiftedChatAppType as p}from"../Bubble/types.js";const y=o=>{let{createdAt:y,dateFormat:c="D MMMM YY",dateFormatCalendar:m,appType:f=p.Bik}=o;const u=s((()=>{if(null==y)return null;let e;if("number"==typeof y)e=r(new Date(y));else if(y instanceof Date)e=r(y);else{if("string"!=typeof y)return null;e=r(new Date(y))}if(f===p.Manifest)return n(e,"MMM d, yyyy");const t=r(new Date);if(!a(t,e))return n(e,"EEEE, d MMMM yy");const o=i(t,e);return o<1?(null==m?void 0:m.sameDay)?m.sameDay.replace(/\[|\]/g,""):"Today":1===o?"Yesterday":n(e,"EEEE, d MMMM yy")}),[y,c,m,f]);return u?f===p.Manifest?e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:5,marginBottom:10}},{children:e("span",Object.assign({style:{background:"transparent",color:"#b2b2b2",fontSize:12,fontWeight:600,padding:"2px 8px"}},{children:u}))})):t("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:[e("div",{style:{flex:1,height:"1px",backgroundColor:l.stroke.primary}}),e("div",Object.assign({style:{border:`1px solid ${l.stroke.primary}`,borderRadius:"16px",padding:"4px 12px"}},{children:e(d,Object.assign({style:{color:l.content.secondary}},{children:u}))})),e("div",{style:{flex:1,height:"1px",backgroundColor:l.stroke.primary}})]})):null},c=o.memo(y);export{c as Day,c as default};
|
|
2
2
|
//# sourceMappingURL=Day.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Day.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/Day.tsx"],"sourcesContent":["import { differenceInDays, format, isSameYear, startOfDay } from 'date-fns';\nimport React, { useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { BodyCaption } from '../../TypographyStyle';\nimport { GiftedChatAppType } from '../Bubble/types';\n\n// Props for Day component\nexport interface DayProps {\n\tcreatedAt?: Date | number | string;\n\tdateFormat?: string;\n\tdateFormatCalendar?: {\n\t\tsameDay?: string;\n\t\tnextDay?: string;\n\t\tnextWeek?: string;\n\t\tlastDay?: string;\n\t\tlastWeek?: string;\n\t\tsameElse?: string;\n\t};\n\tappType?: GiftedChatAppType;\n}\n\n// Day component - renders date separator in chat\n// Shows formatted date with smart labeling (Today, Yesterday, etc.)\nconst DayComponent: React.FC<DayProps> = ({\n\tcreatedAt,\n\tdateFormat = 'D MMMM YY',\n\tdateFormatCalendar,\n\tappType = GiftedChatAppType.Bik,\n}) => {\n\t// Format date for display with smart labeling\n\tconst dateStr = useMemo(() => {\n\t\tif (createdAt == null) return null;\n\n\t\tlet date: Date;\n\t\tif (typeof createdAt === 'number') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else if (createdAt instanceof Date) {\n\t\t\tdate = startOfDay(createdAt);\n\t\t} else if (typeof createdAt === 'string') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For manifest, always show 'Jan 9, 2026' format\n\t\tif (appType === GiftedChatAppType.Manifest) {\n\t\t\treturn format(date, 'MMM d, yyyy');\n\t\t}\n\n\t\tconst now = startOfDay(new Date());\n\t\t// If not same year, show full date with day of week\n\t\tif (!isSameYear(now, date)) {\n\t\t\treturn format(date, 'EEEE, d MMMM yy');\n\t\t}\n\n\t\tconst daysDiff = differenceInDays(now, date);\n\n\t\t// If today\n\t\tif (daysDiff < 1) {\n\t\t\tif (dateFormatCalendar?.sameDay) {\n\t\t\t\treturn dateFormatCalendar.sameDay.replace(/\\[|\\]/g, '');\n\t\t\t}\n\t\t\treturn 'Today';\n\t\t}\n\n\t\t// If yesterday\n\t\tif (daysDiff === 1) {\n\t\t\treturn 'Yesterday';\n\t\t}\n\n\t\t// Format: \"Friday, 7 November 25\"\n\t\treturn format(date, 'EEEE, d MMMM yy');\n\t}, [createdAt, dateFormat, dateFormatCalendar, appType]);\n\n\tif (!dateStr) return null;\n\n\tif (appType === GiftedChatAppType.Manifest) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tmarginTop: 5,\n\t\t\t\t\tmarginBottom: 10,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: 'transparent',\n\t\t\t\t\t\tcolor: '#b2b2b2',\n\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\tfontWeight: 600,\n\t\t\t\t\t\tpadding: '2px 8px',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{dateStr}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\talignItems: 'center',\n\t\t\t\tjustifyContent: 'center',\n\t\t\t
|
|
1
|
+
{"version":3,"file":"Day.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/Day.tsx"],"sourcesContent":["import { differenceInDays, format, isSameYear, startOfDay } from 'date-fns';\nimport React, { useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { BodyCaption } from '../../TypographyStyle';\nimport { GiftedChatAppType } from '../Bubble/types';\n\n// Props for Day component\nexport interface DayProps {\n\tcreatedAt?: Date | number | string;\n\tdateFormat?: string;\n\tdateFormatCalendar?: {\n\t\tsameDay?: string;\n\t\tnextDay?: string;\n\t\tnextWeek?: string;\n\t\tlastDay?: string;\n\t\tlastWeek?: string;\n\t\tsameElse?: string;\n\t};\n\tappType?: GiftedChatAppType;\n}\n\n// Day component - renders date separator in chat\n// Shows formatted date with smart labeling (Today, Yesterday, etc.)\nconst DayComponent: React.FC<DayProps> = ({\n\tcreatedAt,\n\tdateFormat = 'D MMMM YY',\n\tdateFormatCalendar,\n\tappType = GiftedChatAppType.Bik,\n}) => {\n\t// Format date for display with smart labeling\n\tconst dateStr = useMemo(() => {\n\t\tif (createdAt == null) return null;\n\n\t\tlet date: Date;\n\t\tif (typeof createdAt === 'number') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else if (createdAt instanceof Date) {\n\t\t\tdate = startOfDay(createdAt);\n\t\t} else if (typeof createdAt === 'string') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For manifest, always show 'Jan 9, 2026' format\n\t\tif (appType === GiftedChatAppType.Manifest) {\n\t\t\treturn format(date, 'MMM d, yyyy');\n\t\t}\n\n\t\tconst now = startOfDay(new Date());\n\t\t// If not same year, show full date with day of week\n\t\tif (!isSameYear(now, date)) {\n\t\t\treturn format(date, 'EEEE, d MMMM yy');\n\t\t}\n\n\t\tconst daysDiff = differenceInDays(now, date);\n\n\t\t// If today\n\t\tif (daysDiff < 1) {\n\t\t\tif (dateFormatCalendar?.sameDay) {\n\t\t\t\treturn dateFormatCalendar.sameDay.replace(/\\[|\\]/g, '');\n\t\t\t}\n\t\t\treturn 'Today';\n\t\t}\n\n\t\t// If yesterday\n\t\tif (daysDiff === 1) {\n\t\t\treturn 'Yesterday';\n\t\t}\n\n\t\t// Format: \"Friday, 7 November 25\"\n\t\treturn format(date, 'EEEE, d MMMM yy');\n\t}, [createdAt, dateFormat, dateFormatCalendar, appType]);\n\n\tif (!dateStr) return null;\n\n\tif (appType === GiftedChatAppType.Manifest) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tmarginTop: 5,\n\t\t\t\t\tmarginBottom: 10,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: 'transparent',\n\t\t\t\t\t\tcolor: '#b2b2b2',\n\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\tfontWeight: 600,\n\t\t\t\t\t\tpadding: '2px 8px',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{dateStr}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\talignItems: 'center',\n\t\t\t\tjustifyContent: 'center',\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tflex: 1,\n\t\t\t\t\theight: '1px',\n\t\t\t\t\tbackgroundColor: COLORS.stroke.primary,\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tborder: `1px solid ${COLORS.stroke.primary}`,\n\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\tpadding: '4px 12px',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<BodyCaption style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t{dateStr}\n\t\t\t\t</BodyCaption>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tflex: 1,\n\t\t\t\t\theight: '1px',\n\t\t\t\t\tbackgroundColor: COLORS.stroke.primary,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Day = React.memo(DayComponent);\n\nexport default Day;\n"],"names":["DayComponent","_ref","createdAt","dateFormat","dateFormatCalendar","appType","GiftedChatAppType","Bik","dateStr","useMemo","date","startOfDay","Date","Manifest","format","now","isSameYear","daysDiff","differenceInDays","sameDay","replace","_jsx","Object","assign","style","display","alignItems","justifyContent","marginTop","marginBottom","children","background","color","fontSize","fontWeight","padding","_jsxs","flex","height","backgroundColor","COLORS","stroke","primary","border","borderRadius","BodyCaption","content","secondary","Day","React","memo"],"mappings":"gVAuBA,MAAMA,EAAmCC,IAKpC,IALqCC,UACzCA,EAASC,WACTA,EAAa,YAAWC,mBACxBA,EAAkBC,QAClBA,EAAUC,EAAkBC,KAC5BN,EAEA,MAAMO,EAAUC,GAAQ,KACvB,GAAiB,MAAbP,EAAmB,OAAO,KAE9B,IAAIQ,EACJ,GAAyB,iBAAdR,EACVQ,EAAOC,EAAW,IAAIC,KAAKV,SACrB,GAAIA,aAAqBU,KAC/BF,EAAOC,EAAWT,OACZ,IAAyB,iBAAdA,EAGjB,OAAO,KAFPQ,EAAOC,EAAW,IAAIC,KAAKV,GAG3B,CAGD,GAAIG,IAAYC,EAAkBO,SACjC,OAAOC,EAAOJ,EAAM,eAGrB,MAAMK,EAAMJ,EAAW,IAAIC,MAE3B,IAAKI,EAAWD,EAAKL,GACpB,OAAOI,EAAOJ,EAAM,mBAGrB,MAAMO,EAAWC,EAAiBH,EAAKL,GAGvC,OAAIO,EAAW,GACVb,eAAAA,EAAoBe,SAChBf,EAAmBe,QAAQC,QAAQ,SAAU,IAE9C,QAIS,IAAbH,EACI,YAIDH,EAAOJ,EAAM,kBAAkB,GACpC,CAACR,EAAWC,EAAYC,EAAoBC,IAE/C,OAAKG,EAEDH,IAAYC,EAAkBO,SAEhCQ,EACC,MAAAC,OAAAC,OAAA,CAAAC,MAAO,CACNC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,UAAW,EACXC,aAAc,KAGf,CAAAC,SAAAT,EAAA,OAAAC,OAAAC,OAAA,CACCC,MAAO,CACNO,WAAY,cACZC,MAAO,UACPC,SAAU,GACVC,WAAY,IACZC,QAAS,YACT,CAAAL,SAEAtB,QAOJ4B,EACC,MAAAd,OAAAC,OAAA,CAAAC,MAAO,CACNC,QAAS,OACTC,WAAY,SACZC,eAAgB,WAGjB,CAAAG,SAAA,CAAAT,EAAA,MAAA,CACCG,MAAO,CACNa,KAAM,EACNC,OAAQ,MACRC,gBAAiBC,EAAOC,OAAOC,WAGjCrB,EACC,MAAAC,OAAAC,OAAA,CAAAC,MAAO,CACNmB,OAAqB,aAAAH,EAAOC,OAAOC,UACnCE,aAAc,OACdT,QAAS,aAGV,CAAAL,SAAAT,EAACwB,EAAYvB,OAAAC,OAAA,CAAAC,MAAO,CAAEQ,MAAOQ,EAAOM,QAAQC,YAC1C,CAAAjB,SAAAtB,QAGHa,EACC,MAAA,CAAAG,MAAO,CACNa,KAAM,EACNC,OAAQ,MACRC,gBAAiBC,EAAOC,OAAOC,eA1Dd,IA6Dd,EAKKM,EAAMC,EAAMC,KAAKlD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e}from"../../../_virtual/_tslib.js";import{jsx as
|
|
1
|
+
import{__rest as e}from"../../../_virtual/_tslib.js";import{jsx as t,Fragment as r,jsxs as i}from"react/jsx-runtime";import n,{forwardRef as s,useRef as o,useState as l,useMemo as a,useImperativeHandle as d,useCallback as g,useEffect as u}from"react";import{COLORS as c}from"../../../constants/Theme.js";import{useWindowSize as h}from"../../../hooks/useWindowSize.js";import{Button as v}from"../../button/Button.js";import{BodySecondary as p}from"../../TypographyStyle.js";import{GiftedChatAppType as m}from"../Bubble/types.js";import{Day as f}from"./Day.js";import{getMessagePlacement as b,shouldCenterAlign as y}from"./messageHelpers.js";import{useScrollToBottom as x,useInitialMountScroll as j,useScrollCleanup as T,useRestoreScrollPosition as w,useAutoScrollOnNewMessages as M,useResizeObserverForFirstMessage as O,useScrollHandler as A}from"./scrollHooks.js";import{MESSAGE_CHANNELS as _}from"./types.js";import{TOP_THRESHOLD as S,normalizeRef as k,isSameDay as R,Constants as B}from"./utils.js";const E=e=>{let{text:n,isExpanded:s,onToggle:a}=e;const d=o(null),[g,c]=l(!1);return u((()=>{const e=d.current;if(e){e.style.maxHeight="none";const t=e.scrollHeight>204;e.style.maxHeight=s?"none":"204px",c(t)}}),[n,s]),i(r,{children:[t("div",Object.assign({ref:d,style:{maxHeight:s?"none":204,overflow:"hidden"}},{children:t(p,{children:n})})),g&&t(v,{buttonType:"text",size:"xs",buttonText:s?"Show less":"Read more",onClick:a})]})};var H=s(((s,u)=>{var v;const p=s||{},{messages:H=[],user:L,renderBubble:C,renderAvatar:I,renderDay:D,renderLoading:P,renderChatEmpty:$,listViewProps:F={},renderAvatarOnTop:U=!1,showUserAvatar:V=!1,showAvatarForEveryMessage:W=!1,inverted:G=!1,messageIdGenerator:z,topThreshold:N=S,appType:Y=m.Bik,maxHeight:X,isActivityMessage:q}=p,J=e(p,["messages","user","renderBubble","renderAvatar","renderDay","renderLoading","renderChatEmpty","listViewProps","renderAvatarOnTop","showUserAvatar","showAvatarForEveryMessage","inverted","messageIdGenerator","topThreshold","appType","maxHeight","isActivityMessage"]),K=h(),Q=o(null),Z=k(F.ref||u,Q),ee=o({isInitialMount:!0,isUserScrolling:!1,isLoadingOldMessages:!1,isAtBottom:!0,hasTriggeredEndReached:!1,lastMessagesLength:null!==(v=null==H?void 0:H.length)&&void 0!==v?v:0,previousScrollHeight:0,previousScrollTop:0,scrollTimeout:null}),[te,re]=l(new Set),ie=a((()=>H&&0!==H.length?[...H].reverse():[]),[H]),ne=x(Z,ee);d(u,(()=>Z.current)),j(Z,ee,ie.length,ne),T(ee),w(Z,ee,ie.length),M(Z,ee,H.length,ne),O(null==H?void 0:H[0],ee,ne,z);const se=A(ee,F.onEndReached,F.onScroll,N),oe=g((e=>{var t;return Boolean(e&&L&&(null===(t=e.user)||void 0===t?void 0:t._id)===L._id)}),[L]),le=g(((e,t)=>!!V&&(!!W||(!t||!!q&&q(e)||!!q&&q(t)||t.user._id!==e.user._id))),[V,W,q]),ae=g(((e,r,i)=>{var n,s,o,l,a;const d=oe(e)?"right":"left",g=(null===(n=null==r?void 0:r.user)||void 0===n?void 0:n._id)!==(null===(s=null==e?void 0:e.user)||void 0===s?void 0:s._id),u=(null===(o=null==i?void 0:i.user)||void 0===o?void 0:o._id)!==(null===(l=null==e?void 0:e.user)||void 0===l?void 0:l._id),h=Object.assign({currentMessage:e,previousMessage:r,nextMessage:i,position:d,user:L},J);if(C)return C(h);const v=e._id,p=te.has(v);return t("div",Object.assign({style:Object.assign(Object.assign({maxWidth:Y===m.Manifest?"50%":"70%",width:"fit-content"},Y===m.Manifest?{minWidth:"130px"}:{}),{padding:"8px 12px",borderTopLeftRadius:"left"===d?g?12:2:12,borderTopRightRadius:"right"===d?g?12:2:12,borderBottomLeftRadius:"left"===d?u?12:2:12,borderBottomRightRadius:"right"===d?u?12:2:12,border:"left"===d&&Y===m.Manifest?"1px solid rgb(224, 224, 224)":"none",backgroundColor:"right"===d?Y===m.Manifest?c.background.brandTint:c.background.brandLight:Y===m.Manifest?c.background.pureWhite:c.background.inactive,color:c.content.primary,wordBreak:"break-word"})},{children:t(E,{text:null!==(a=e.text)&&void 0!==a?a:"",isExpanded:p,onToggle:()=>re((e=>{const t=new Set(e);return p?t.delete(v):t.add(v),t}))})}))}),[oe,L,C,J,te]),de=g(((e,t,r)=>{if(!le(e,t))return null;const i=oe(e)?"right":"left";return I?I({currentMessage:e,previousMessage:t,nextMessage:r,position:i,user:L,renderAvatarOnTop:U,showUserAvatar:V,showAvatarForEveryMessage:W}):null}),[le,oe,L,U,V,W,I]);return H&&0!==H.length?i("div",Object.assign({ref:Z,style:Object.assign(Object.assign({flex:1,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column"},X?{maxHeight:X,height:X}:{}),F.style),onScroll:se},{children:[t("div",{style:{flex:"1 0 auto"}}),t("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:"0 0 auto"}},{children:ie.map(((e,r)=>{var s,o,l,a,d,g;const u=(null==e?void 0:e.channelId)===_.SMTP||(null==e?void 0:e.channelName)===_.SMTP,c=u?"left":oe(e)?"right":"left",h=ie[r-1],v=ie[r+1],p=!R(e,h),x=b(e,c),j=y(e),T=e.category===B.ChatActivity.Category.ACTIVITY&&e.activityType===B.ChatActivity.Type.PRIVATE_NOTE;return i(n.Fragment,{children:[p&&(D?D({createdAt:e.createdAt}):t(f,{createdAt:e.createdAt,appType:Y})),i("div",Object.assign({style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},K?{margin:"0 4px"}:{}),j?{}:{display:"flex",alignItems:"flex-start"}),Y!==m.Manifest?K||"right"!==c?{marginRight:8}:{marginLeft:8}:{}),u&&!T&&K?{marginLeft:8,marginRight:8}:{}),{justifyContent:x,marginBottom:v?(null===(s=null==v?void 0:v.user)||void 0===s?void 0:s._id)===(null===(o=null==e?void 0:e.user)||void 0===o?void 0:o._id)?4:20:0})},{children:[!K&&"left"===c&&t("div",Object.assign({style:{marginRight:"4px",width:"24px",flexShrink:0}},{children:de(e,h,v)})),t("div",Object.assign({id:`message-bubble-${null!==(l=e._id)&&void 0!==l?l:`${r}-${null!==(a=null==z?void 0:z())&&void 0!==a?a:"id"}`}`,style:Y===m.Manifest?{width:"100%"}:K||u?{display:"flex",flexGrow:1,width:"100%"}:{}},{children:ae(e,h,v)})),!K&&"right"===c&&t("div",Object.assign({style:{marginLeft:"4px",width:"24px",flexShrink:0,alignSelf:"flex-start"}},{children:de(e,h,v)}))]}))]},null!==(d=e._id)&&void 0!==d?d:`${r}-${null!==(g=null==z?void 0:z())&&void 0!==g?g:"id"}`)}))}))]})):$?t(r,{children:$()}):null}));export{H as default};
|
|
2
2
|
//# sourceMappingURL=GiftedChat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GiftedChat.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/GiftedChat.tsx"],"sourcesContent":["import React, {\n\tforwardRef,\n\tuseCallback,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n} from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { BodySecondary } from '../../TypographyStyle';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage } from '../types';\nimport { Day } from './Day';\nimport { getMessagePlacement, shouldCenterAlign } from './messageHelpers';\nimport {\n\tuseAutoScrollOnNewMessages,\n\tuseInitialMountScroll,\n\tuseResizeObserverForFirstMessage,\n\tuseRestoreScrollPosition,\n\tuseScrollCleanup,\n\tuseScrollHandler,\n\tuseScrollToBottom,\n} from './scrollHooks';\nimport { AvatarProps, GiftedChatProps, MESSAGE_CHANNELS } from './types';\nimport { isSameDay, normalizeRef } from './utils';\nimport { Constants, TOP_THRESHOLD } from './utils';\n\nconst GiftedChatInner = (\n\tprops: Omit<GiftedChatProps<IMessage>, 'ref'>,\n\tforwardedRef: React.Ref<HTMLDivElement>,\n) => {\n\tconst {\n\t\tmessages = [],\n\t\tuser,\n\t\trenderBubble,\n\t\trenderAvatar,\n\t\trenderDay,\n\t\trenderLoading,\n\t\trenderChatEmpty,\n\t\tlistViewProps = {},\n\t\trenderAvatarOnTop = false,\n\t\tshowUserAvatar = false,\n\t\tshowAvatarForEveryMessage = false,\n\t\tinverted = false,\n\t\tmessageIdGenerator,\n\t\ttopThreshold = TOP_THRESHOLD,\n\t\tappType = GiftedChatAppType.Bik,\n\t\t...extraProps\n\t} = props || {};\n\n\tconst isMobile = useWindowSize();\n\n\tconst internalScrollRef = useRef<HTMLDivElement | null>(null);\n\tconst scrollRef = normalizeRef(\n\t\tlistViewProps.ref || forwardedRef,\n\t\tinternalScrollRef,\n\t);\n\n\tconst scrollState = useRef({\n\t\tisInitialMount: true,\n\t\tisUserScrolling: false,\n\t\tisLoadingOldMessages: false,\n\t\tisAtBottom: true,\n\t\thasTriggeredEndReached: false,\n\t\tlastMessagesLength: messages?.length ?? 0,\n\t\tpreviousScrollHeight: 0,\n\t\tpreviousScrollTop: 0,\n\t\tscrollTimeout: null,\n\t});\n\n\t// Reverse messages so newest appears last in DOM (natural reading order)\n\tconst reversedMessages = useMemo(() => {\n\t\tif (!messages || messages.length === 0) return [] as IMessage[];\n\t\treturn [...messages].reverse() as IMessage[];\n\t}, [messages]);\n\n\tconst scrollToBottom = useScrollToBottom(scrollRef, scrollState);\n\n\tuseImperativeHandle(forwardedRef, () => scrollRef.current!);\n\n\tuseInitialMountScroll(\n\t\tscrollRef,\n\t\tscrollState,\n\t\treversedMessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseScrollCleanup(scrollState);\n\n\tuseRestoreScrollPosition(scrollRef, scrollState, reversedMessages.length);\n\n\tuseAutoScrollOnNewMessages(\n\t\tscrollRef,\n\t\tscrollState,\n\t\tmessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseResizeObserverForFirstMessage(\n\t\tmessages?.[0],\n\t\tscrollState,\n\t\tscrollToBottom,\n\t\tmessageIdGenerator,\n\t);\n\n\tconst handleScroll = useScrollHandler(\n\t\tscrollState,\n\t\tlistViewProps.onEndReached,\n\t\tlistViewProps.onScroll,\n\t\ttopThreshold,\n\t);\n\n\t// Check if a message belongs to the current user\n\tconst isUserMessage = useCallback(\n\t\t(message: IMessage) => {\n\t\t\treturn Boolean(message && user && message.user?._id === user._id);\n\t\t},\n\t\t[user],\n\t);\n\n\t// Determine if avatar should be shown for this message\n\tconst shouldShowAvatar = useCallback(\n\t\t(message: IMessage, nextMessage?: IMessage) => {\n\t\t\tif (!showUserAvatar) return false;\n\t\t\tif (showAvatarForEveryMessage) return true;\n\n\t\t\t// Show avatar only when next message is from different user\n\t\t\treturn !nextMessage || nextMessage.user._id !== message.user._id;\n\t\t},\n\t\t[showUserAvatar, showAvatarForEveryMessage],\n\t);\n\n\t// Render a message bubble (or call custom renderBubble)\n\tconst renderMessageBubble = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\n\t\t\tconst bubbleProps: BubbleProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\t...extraProps,\n\t\t\t};\n\n\t\t\t// Use custom render function if provided\n\t\t\tif (renderBubble) {\n\t\t\t\treturn renderBubble(bubbleProps);\n\t\t\t}\n\n\t\t\t// Default bubble rendering\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tmaxWidth: appType === GiftedChatAppType.Manifest ? '50%' : '70%',\n\t\t\t\t\t\twidth: 'fit-content',\n\t\t\t\t\t\t...(appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t? { minWidth: '130px' }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\tpadding: '8px 12px',\n\t\t\t\t\t\tborderRadius: appType === GiftedChatAppType.Manifest ? 16 : 4,\n\t\t\t\t\t\tborder:\n\t\t\t\t\t\t\tposition === 'left' && appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? '1px solid rgb(224, 224, 224)'\n\t\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\t\tposition === 'right'\n\t\t\t\t\t\t\t\t? appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t? COLORS.background.brandTint\n\t\t\t\t\t\t\t\t\t: COLORS.background.brandLight\n\t\t\t\t\t\t\t\t: appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? COLORS.background.pureWhite\n\t\t\t\t\t\t\t\t: COLORS.background.inactive,\n\t\t\t\t\t\tcolor: COLORS.content.primary,\n\t\t\t\t\t\twordBreak: 'break-word',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<BodySecondary>{message.text}</BodySecondary>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\t[isUserMessage, user, renderBubble, extraProps],\n\t);\n\n\t// Render a message avatar (or call custom renderAvatar)\n\tconst renderMessageAvatar = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst shouldShow = shouldShowAvatar(message, nextMessage);\n\n\t\t\tif (!shouldShow) return null;\n\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\n\t\t\tconst avatarProps: AvatarProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\trenderAvatarOnTop,\n\t\t\t\tshowUserAvatar,\n\t\t\t\tshowAvatarForEveryMessage,\n\t\t\t};\n\n\t\t\treturn renderAvatar ? renderAvatar(avatarProps) : null;\n\t\t},\n\t\t[\n\t\t\tshouldShowAvatar,\n\t\t\tisUserMessage,\n\t\t\tuser,\n\t\t\trenderAvatarOnTop,\n\t\t\tshowUserAvatar,\n\t\t\tshowAvatarForEveryMessage,\n\t\t\trenderAvatar,\n\t\t],\n\t);\n\n\t// Render: Empty State\n\tif (!messages || messages.length === 0) {\n\t\treturn renderChatEmpty ? <>{renderChatEmpty()}</> : null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={scrollRef as React.RefObject<HTMLDivElement>}\n\t\t\tstyle={{\n\t\t\t\tflex: 1,\n\t\t\t\toverflowY: 'auto',\n\t\t\t\toverflowX: 'hidden',\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\t...listViewProps.style,\n\t\t\t}}\n\t\t\tonScroll={handleScroll}\n\t\t>\n\t\t\t{/* Spacer to push messages to bottom (newest appears last in DOM) */}\n\t\t\t<div style={{ flex: '1 0 auto' }} />\n\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tflex: '0 0 auto',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{reversedMessages.map((message, index) => {\n\t\t\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\t\t\t\t\tconst previousMessage = reversedMessages[index - 1];\n\t\t\t\t\tconst nextMessage = reversedMessages[index + 1];\n\t\t\t\t\tconst shouldShowDay = !isSameDay(message, previousMessage);\n\t\t\t\t\tconst placement = getMessagePlacement(message, position);\n\t\t\t\t\tconst isCentered = shouldCenterAlign(message);\n\t\t\t\t\tconst isSmtp =\n\t\t\t\t\t\tmessage?.['channelId'] === MESSAGE_CHANNELS.SMTP ||\n\t\t\t\t\t\tmessage?.['channelName'] === MESSAGE_CHANNELS.SMTP;\n\t\t\t\t\t// Check if message is a private note\n\t\t\t\t\tconst isPrivateNote =\n\t\t\t\t\t\tmessage['category'] === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\t\t\t\tmessage['activityType'] ===\n\t\t\t\t\t\t\tConstants.ChatActivity.Type.PRIVATE_NOTE;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<React.Fragment\n\t\t\t\t\t\t\tkey={message._id ?? `${index}-${messageIdGenerator?.() ?? 'id'}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/* Day separator */}\n\t\t\t\t\t\t\t{shouldShowDay &&\n\t\t\t\t\t\t\t\t(renderDay ? (\n\t\t\t\t\t\t\t\t\trenderDay({ createdAt: message.createdAt })\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Day createdAt={message.createdAt} appType={appType} />\n\t\t\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t\t{/* Message container */}\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t...(isMobile ? { margin: '0 4px' } : {}),\n\t\t\t\t\t\t\t\t\t...(isCentered ? {} : { display: 'flex' }),\n\t\t\t\t\t\t\t\t\t...(appType !== GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t? !isMobile && message?.user?._id === 2\n\t\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8 }\n\t\t\t\t\t\t\t\t\t\t\t: { marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t...(isSmtp && !isPrivateNote && isMobile\n\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8, marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\tjustifyContent: placement,\n\t\t\t\t\t\t\t\t\tmarginBottom: 8,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/* Left avatar (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t{!isMobile && position === 'left' && (\n\t\t\t\t\t\t\t\t\t<div style={{ margin: '0 8px' }}>\n\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* Message bubble */}\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tid={`message-bubble-${\n\t\t\t\t\t\t\t\t\t\tmessage._id ?? `${index}-${messageIdGenerator?.() ?? 'id'}`\n\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\tappType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t\t? { width: '100%' }\n\t\t\t\t\t\t\t\t\t\t\t: isMobile && isSmtp\n\t\t\t\t\t\t\t\t\t\t\t? { display: 'flex', flexGrow: 1 }\n\t\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderMessageBubble(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{/* Right avatar (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t{!isMobile && position === 'right' && (\n\t\t\t\t\t\t\t\t\t<div style={{ margin: '0 8px' }}>\n\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default forwardRef<HTMLDivElement, GiftedChatProps<IMessage>>(\n\tGiftedChatInner,\n);\n"],"names":["GiftedChat","forwardRef","GiftedChatInner","props","forwardedRef","_b","messages","user","renderBubble","renderAvatar","renderDay","renderLoading","renderChatEmpty","listViewProps","renderAvatarOnTop","showUserAvatar","showAvatarForEveryMessage","inverted","messageIdGenerator","topThreshold","TOP_THRESHOLD","appType","GiftedChatAppType","Bik","extraProps","__rest","isMobile","useWindowSize","internalScrollRef","useRef","scrollRef","normalizeRef","ref","scrollState","isInitialMount","isUserScrolling","isLoadingOldMessages","isAtBottom","hasTriggeredEndReached","lastMessagesLength","_a","length","previousScrollHeight","previousScrollTop","scrollTimeout","reversedMessages","useMemo","reverse","scrollToBottom","useScrollToBottom","useImperativeHandle","current","useInitialMountScroll","useScrollCleanup","useRestoreScrollPosition","useAutoScrollOnNewMessages","useResizeObserverForFirstMessage","handleScroll","useScrollHandler","onEndReached","onScroll","isUserMessage","useCallback","message","Boolean","_id","shouldShowAvatar","nextMessage","renderMessageBubble","previousMessage","position","bubbleProps","Object","assign","currentMessage","_jsx","style","maxWidth","Manifest","width","minWidth","padding","borderRadius","border","backgroundColor","COLORS","background","brandTint","brandLight","pureWhite","inactive","color","content","primary","wordBreak","children","BodySecondary","text","renderMessageAvatar","_jsxs","flex","overflowY","overflowX","display","flexDirection","map","index","shouldShowDay","isSameDay","placement","getMessagePlacement","isCentered","shouldCenterAlign","isSmtp","MESSAGE_CHANNELS","SMTP","isPrivateNote","Constants","ChatActivity","Category","ACTIVITY","Type","PRIVATE_NOTE","React","Fragment","createdAt","Day","margin","marginRight","marginLeft","justifyContent","marginBottom","id","_c","flexGrow","_d","_e","_Fragment"],"mappings":"45BAwUA,IAAAA,EAAeC,GA7SSC,CACvBC,EACAC,WAEA,MAAMC,EAiBFF,GAAS,CAAE,GAjBTG,SACLA,EAAW,GAAEC,KACbA,EAAIC,aACJA,EAAYC,aACZA,EAAYC,UACZA,EAASC,cACTA,EAAaC,gBACbA,EAAeC,cACfA,EAAgB,CAAE,EAAAC,kBAClBA,GAAoB,EAAKC,eACzBA,GAAiB,EAAKC,0BACtBA,GAA4B,EAAKC,SACjCA,GAAW,EAAKC,mBAChBA,EAAkBC,aAClBA,EAAeC,EAAaC,QAC5BA,EAAUC,EAAkBC,KAEdlB,EADXmB,EAAUC,EAAApB,EAhBR,CAiBL,WAAA,OAAA,eAAA,eAAA,YAAA,gBAAA,kBAAA,gBAAA,oBAAA,iBAAA,4BAAA,WAAA,qBAAA,eAAA,YAEKqB,EAAWC,IAEXC,EAAoBC,EAA8B,MAClDC,EAAYC,EACjBlB,EAAcmB,KAAO5B,EACrBwB,GAGKK,EAAcJ,EAAO,CAC1BK,gBAAgB,EAChBC,iBAAiB,EACjBC,sBAAsB,EACtBC,YAAY,EACZC,wBAAwB,EACxBC,mBAAoC,QAAhBC,EAAAlC,eAAAA,EAAUmC,cAAM,IAAAD,EAAAA,EAAI,EACxCE,qBAAsB,EACtBC,kBAAmB,EACnB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B,UAAb4C,GACbK,EAAA,MAAAH,OAAAC,OAAA,CAAKG,MAAO,CAAEmD,OAAQ,UACpB,CAAAhC,SAAAG,GAAoBnC,EAASM,EAAiBF,YArDlC,QAAXoE,EAAAxE,EAAQE,WAAG,IAAAsE,EAAAA,EAAO,GAAA7B,KAAmC,QAA1B8B,EAAAtH,aAAkB,EAAlBA,WAA0B,IAAAsH,EAAAA,EAAA,OAyD1C,WApGd5H,EAAkB+D,EAAG8D,EAAA,CAAA1C,SAAAnF,MAAwB,IAwG9C"}
|
|
1
|
+
{"version":3,"file":"GiftedChat.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/GiftedChat.tsx"],"sourcesContent":["import React, {\n\tforwardRef,\n\tuseCallback,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { Button } from '../../button';\nimport { BodySecondary } from '../../TypographyStyle';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage } from '../types';\nimport { Day } from './Day';\nimport { getMessagePlacement, shouldCenterAlign } from './messageHelpers';\nimport {\n\tuseAutoScrollOnNewMessages,\n\tuseInitialMountScroll,\n\tuseResizeObserverForFirstMessage,\n\tuseRestoreScrollPosition,\n\tuseScrollCleanup,\n\tuseScrollHandler,\n\tuseScrollToBottom,\n} from './scrollHooks';\nimport { AvatarProps, GiftedChatProps, MESSAGE_CHANNELS } from './types';\nimport { isSameDay, normalizeRef } from './utils';\nimport { Constants, TOP_THRESHOLD } from './utils';\n\nconst COLLAPSED_MAX_HEIGHT = 204;\n\nconst CollapsibleBubbleText: React.FC<{\n\ttext: string;\n\tisExpanded: boolean;\n\tonToggle: () => void;\n}> = ({ text, isExpanded, onToggle }) => {\n\tconst textRef = useRef<HTMLDivElement>(null);\n\tconst [isOverflowing, setIsOverflowing] = useState(false);\n\n\tuseEffect(() => {\n\t\tconst el = textRef.current;\n\t\tif (el) {\n\t\t\t// Temporarily remove max-height to measure true scroll height\n\t\t\tel.style.maxHeight = 'none';\n\t\t\tconst overflows = el.scrollHeight > COLLAPSED_MAX_HEIGHT;\n\t\t\tel.style.maxHeight = isExpanded ? 'none' : `${COLLAPSED_MAX_HEIGHT}px`;\n\t\t\tsetIsOverflowing(overflows);\n\t\t}\n\t}, [text, isExpanded]);\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tref={textRef}\n\t\t\t\tstyle={{\n\t\t\t\t\tmaxHeight: isExpanded ? 'none' : COLLAPSED_MAX_HEIGHT,\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<BodySecondary>{text}</BodySecondary>\n\t\t\t</div>\n\t\t\t{isOverflowing && (\n\t\t\t\t<Button\n\t\t\t\t\tbuttonType=\"text\"\n\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\tbuttonText={isExpanded ? 'Show less' : 'Read more'}\n\t\t\t\t\tonClick={onToggle}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nconst GiftedChatInner = (\n\tprops: Omit<GiftedChatProps<IMessage>, 'ref'>,\n\tforwardedRef: React.Ref<HTMLDivElement>,\n) => {\n\tconst {\n\t\tmessages = [],\n\t\tuser,\n\t\trenderBubble,\n\t\trenderAvatar,\n\t\trenderDay,\n\t\trenderLoading,\n\t\trenderChatEmpty,\n\t\tlistViewProps = {},\n\t\trenderAvatarOnTop = false,\n\t\tshowUserAvatar = false,\n\t\tshowAvatarForEveryMessage = false,\n\t\tinverted = false,\n\t\tmessageIdGenerator,\n\t\ttopThreshold = TOP_THRESHOLD,\n\t\tappType = GiftedChatAppType.Bik,\n\t\tmaxHeight,\n\t\tisActivityMessage,\n\t\t...extraProps\n\t} = props || {};\n\n\tconst isMobile = useWindowSize();\n\n\tconst internalScrollRef = useRef<HTMLDivElement | null>(null);\n\tconst scrollRef = normalizeRef(\n\t\tlistViewProps.ref || forwardedRef,\n\t\tinternalScrollRef,\n\t);\n\n\tconst scrollState = useRef({\n\t\tisInitialMount: true,\n\t\tisUserScrolling: false,\n\t\tisLoadingOldMessages: false,\n\t\tisAtBottom: true,\n\t\thasTriggeredEndReached: false,\n\t\tlastMessagesLength: messages?.length ?? 0,\n\t\tpreviousScrollHeight: 0,\n\t\tpreviousScrollTop: 0,\n\t\tscrollTimeout: null,\n\t});\n\n\tconst [expandedMessages, setExpandedMessages] = useState<\n\t\tSet<string | number>\n\t>(new Set());\n\n\t// Reverse messages so newest appears last in DOM (natural reading order)\n\tconst reversedMessages = useMemo(() => {\n\t\tif (!messages || messages.length === 0) return [] as IMessage[];\n\t\treturn [...messages].reverse() as IMessage[];\n\t}, [messages]);\n\n\tconst scrollToBottom = useScrollToBottom(scrollRef, scrollState);\n\n\tuseImperativeHandle(forwardedRef, () => scrollRef.current!);\n\n\tuseInitialMountScroll(\n\t\tscrollRef,\n\t\tscrollState,\n\t\treversedMessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseScrollCleanup(scrollState);\n\n\tuseRestoreScrollPosition(scrollRef, scrollState, reversedMessages.length);\n\n\tuseAutoScrollOnNewMessages(\n\t\tscrollRef,\n\t\tscrollState,\n\t\tmessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseResizeObserverForFirstMessage(\n\t\tmessages?.[0],\n\t\tscrollState,\n\t\tscrollToBottom,\n\t\tmessageIdGenerator,\n\t);\n\n\tconst handleScroll = useScrollHandler(\n\t\tscrollState,\n\t\tlistViewProps.onEndReached,\n\t\tlistViewProps.onScroll,\n\t\ttopThreshold,\n\t);\n\n\t// Check if a message belongs to the current user\n\tconst isUserMessage = useCallback(\n\t\t(message: IMessage) => {\n\t\t\treturn Boolean(message && user && message.user?._id === user._id);\n\t\t},\n\t\t[user],\n\t);\n\n\t// Determine if avatar should be shown for this message\n\tconst shouldShowAvatar = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage) => {\n\t\t\tif (!showUserAvatar) return false;\n\t\t\tif (showAvatarForEveryMessage) return true;\n\n\t\t\t// Show avatar on the first message in a consecutive sender stack,\n\t\t\t// or when an activity interrupts the stack, or when the current message itself is an activity\n\t\t\treturn (\n\t\t\t\t!previousMessage ||\n\t\t\t\t(isActivityMessage ? isActivityMessage(message) : false) ||\n\t\t\t\t(isActivityMessage ? isActivityMessage(previousMessage) : false) ||\n\t\t\t\tpreviousMessage.user._id !== message.user._id\n\t\t\t);\n\t\t},\n\t\t[showUserAvatar, showAvatarForEveryMessage, isActivityMessage],\n\t);\n\n\t// Render a message bubble (or call custom renderBubble)\n\tconst renderMessageBubble = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\t\t\tconst isTopOfStack = previousMessage?.user?._id !== message?.user?._id;\n\t\t\tconst isBottomOfStack = nextMessage?.user?._id !== message?.user?._id;\n\n\t\t\tconst bubbleProps: BubbleProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\t...extraProps,\n\t\t\t};\n\n\t\t\t// Use custom render function if provided\n\t\t\tif (renderBubble) {\n\t\t\t\treturn renderBubble(bubbleProps);\n\t\t\t}\n\n\t\t\t// Default bubble rendering\n\t\t\tconst messageId = message._id;\n\t\t\tconst isExpanded = expandedMessages.has(messageId);\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tmaxWidth: appType === GiftedChatAppType.Manifest ? '50%' : '70%',\n\t\t\t\t\t\twidth: 'fit-content',\n\t\t\t\t\t\t...(appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t? { minWidth: '130px' }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\tpadding: '8px 12px',\n\t\t\t\t\t\tborderTopLeftRadius:\n\t\t\t\t\t\t\tposition === 'left' ? (isTopOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\t\tposition === 'right' ? (isTopOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\t\tposition === 'left' ? (isBottomOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\t\tposition === 'right' ? (isBottomOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborder:\n\t\t\t\t\t\t\tposition === 'left' && appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? '1px solid rgb(224, 224, 224)'\n\t\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\t\tposition === 'right'\n\t\t\t\t\t\t\t\t? appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t? COLORS.background.brandTint\n\t\t\t\t\t\t\t\t\t: COLORS.background.brandLight\n\t\t\t\t\t\t\t\t: appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? COLORS.background.pureWhite\n\t\t\t\t\t\t\t\t: COLORS.background.inactive,\n\t\t\t\t\t\tcolor: COLORS.content.primary,\n\t\t\t\t\t\twordBreak: 'break-word',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<CollapsibleBubbleText\n\t\t\t\t\t\ttext={message.text ?? ''}\n\t\t\t\t\t\tisExpanded={isExpanded}\n\t\t\t\t\t\tonToggle={() =>\n\t\t\t\t\t\t\tsetExpandedMessages((prev) => {\n\t\t\t\t\t\t\t\tconst next = new Set(prev);\n\t\t\t\t\t\t\t\tif (isExpanded) next.delete(messageId);\n\t\t\t\t\t\t\t\telse next.add(messageId);\n\t\t\t\t\t\t\t\treturn next;\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\t[isUserMessage, user, renderBubble, extraProps, expandedMessages],\n\t);\n\n\t// Render a message avatar (or call custom renderAvatar)\n\tconst renderMessageAvatar = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst shouldShow = shouldShowAvatar(message, previousMessage);\n\n\t\t\tif (!shouldShow) return null;\n\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\n\t\t\tconst avatarProps: AvatarProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\trenderAvatarOnTop,\n\t\t\t\tshowUserAvatar,\n\t\t\t\tshowAvatarForEveryMessage,\n\t\t\t};\n\n\t\t\treturn renderAvatar ? renderAvatar(avatarProps) : null;\n\t\t},\n\t\t[\n\t\t\tshouldShowAvatar,\n\t\t\tisUserMessage,\n\t\t\tuser,\n\t\t\trenderAvatarOnTop,\n\t\t\tshowUserAvatar,\n\t\t\tshowAvatarForEveryMessage,\n\t\t\trenderAvatar,\n\t\t],\n\t);\n\n\t// Render: Empty State\n\tif (!messages || messages.length === 0) {\n\t\treturn renderChatEmpty ? <>{renderChatEmpty()}</> : null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={scrollRef as React.RefObject<HTMLDivElement>}\n\t\t\tstyle={{\n\t\t\t\tflex: 1,\n\t\t\t\toverflowY: 'auto',\n\t\t\t\toverflowX: 'hidden',\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\t...(maxHeight ? { maxHeight, height: maxHeight } : {}),\n\t\t\t\t...listViewProps.style,\n\t\t\t}}\n\t\t\tonScroll={handleScroll}\n\t\t>\n\t\t\t{/* Spacer to push messages to bottom (newest appears last in DOM) */}\n\t\t\t<div style={{ flex: '1 0 auto' }} />\n\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tflex: '0 0 auto',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{reversedMessages.map((message, index) => {\n\t\t\t\t\tconst isSmtp =\n\t\t\t\t\t\tmessage?.['channelId'] === MESSAGE_CHANNELS.SMTP ||\n\t\t\t\t\t\tmessage?.['channelName'] === MESSAGE_CHANNELS.SMTP;\n\t\t\t\t\tconst position = isSmtp\n\t\t\t\t\t\t? 'left'\n\t\t\t\t\t\t: isUserMessage(message)\n\t\t\t\t\t\t? 'right'\n\t\t\t\t\t\t: 'left';\n\t\t\t\t\tconst previousMessage = reversedMessages[index - 1];\n\t\t\t\t\tconst nextMessage = reversedMessages[index + 1];\n\t\t\t\t\tconst shouldShowDay = !isSameDay(message, previousMessage);\n\t\t\t\t\tconst placement = getMessagePlacement(message, position);\n\t\t\t\t\tconst isCentered = shouldCenterAlign(message);\n\t\t\t\t\t// Check if message is a private note\n\t\t\t\t\tconst isPrivateNote =\n\t\t\t\t\t\tmessage['category'] === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\t\t\t\tmessage['activityType'] ===\n\t\t\t\t\t\t\tConstants.ChatActivity.Type.PRIVATE_NOTE;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<React.Fragment\n\t\t\t\t\t\t\tkey={message._id ?? `${index}-${messageIdGenerator?.() ?? 'id'}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/* Day separator */}\n\t\t\t\t\t\t\t{shouldShowDay &&\n\t\t\t\t\t\t\t\t(renderDay ? (\n\t\t\t\t\t\t\t\t\trenderDay({ createdAt: message.createdAt })\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Day createdAt={message.createdAt} appType={appType} />\n\t\t\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t\t{/* Message container */}\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t...(isMobile ? { margin: '0 4px' } : {}),\n\t\t\t\t\t\t\t\t\t...(isCentered\n\t\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t\t: { display: 'flex', alignItems: 'flex-start' }),\n\t\t\t\t\t\t\t\t\t...(appType !== GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t? !isMobile && position === 'right'\n\t\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8 }\n\t\t\t\t\t\t\t\t\t\t\t: { marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t...(isSmtp && !isPrivateNote && isMobile\n\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8, marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\tjustifyContent: placement,\n\t\t\t\t\t\t\t\t\tmarginBottom: nextMessage\n\t\t\t\t\t\t\t\t\t\t? nextMessage?.user?._id === message?.user?._id\n\t\t\t\t\t\t\t\t\t\t\t? 4\n\t\t\t\t\t\t\t\t\t\t\t: 20\n\t\t\t\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/* Left avatar or placeholder (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t{!isMobile && position === 'left' && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tmarginRight: '4px',\n\t\t\t\t\t\t\t\t\t\t\twidth: '24px',\n\t\t\t\t\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* Message bubble */}\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tid={`message-bubble-${\n\t\t\t\t\t\t\t\t\t\tmessage._id ?? `${index}-${messageIdGenerator?.() ?? 'id'}`\n\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\tappType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t\t? { width: '100%' }\n\t\t\t\t\t\t\t\t\t\t\t: isMobile || isSmtp\n\t\t\t\t\t\t\t\t\t\t\t? { display: 'flex', flexGrow: 1, width: '100%' }\n\t\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderMessageBubble(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{/* Right avatar or placeholder (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t{!isMobile && position === 'right' && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tmarginLeft: '4px',\n\t\t\t\t\t\t\t\t\t\t\twidth: '24px',\n\t\t\t\t\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t\t\t\t\t\talignSelf: 'flex-start',\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default forwardRef<HTMLDivElement, GiftedChatProps<IMessage>>(\n\tGiftedChatInner,\n);\n"],"names":["CollapsibleBubbleText","_ref","text","isExpanded","onToggle","textRef","useRef","isOverflowing","setIsOverflowing","useState","useEffect","el","current","style","maxHeight","overflows","scrollHeight","_jsxs","_jsx","Object","assign","ref","overflow","children","BodySecondary","Button","buttonType","size","buttonText","onClick","GiftedChat","forwardRef","GiftedChatInner","props","forwardedRef","_b","messages","user","renderBubble","renderAvatar","renderDay","renderLoading","renderChatEmpty","listViewProps","renderAvatarOnTop","showUserAvatar","showAvatarForEveryMessage","inverted","messageIdGenerator","topThreshold","TOP_THRESHOLD","appType","GiftedChatAppType","Bik","isActivityMessage","extraProps","__rest","isMobile","useWindowSize","internalScrollRef","scrollRef","normalizeRef","scrollState","isInitialMount","isUserScrolling","isLoadingOldMessages","isAtBottom","hasTriggeredEndReached","lastMessagesLength","_a","length","previousScrollHeight","previousScrollTop","scrollTimeout","expandedMessages","setExpandedMessages","Set","reversedMessages","useMemo","reverse","scrollToBottom","useScrollToBottom","useImperativeHandle","useInitialMountScroll","useScrollCleanup","useRestoreScrollPosition","useAutoScrollOnNewMessages","useResizeObserverForFirstMessage","handleScroll","useScrollHandler","onEndReached","onScroll","isUserMessage","useCallback","message","Boolean","_id","shouldShowAvatar","previousMessage","renderMessageBubble","nextMessage","position","isTopOfStack","isBottomOfStack","_c","_d","bubbleProps","currentMessage","messageId","has","maxWidth","Manifest","width","minWidth","padding","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","border","backgroundColor","COLORS","background","brandTint","brandLight","pureWhite","inactive","color","content","primary","wordBreak","_e","prev","next","delete","add","renderMessageAvatar","flex","overflowY","overflowX","display","flexDirection","height","map","index","isSmtp","MESSAGE_CHANNELS","SMTP","shouldShowDay","isSameDay","placement","getMessagePlacement","isCentered","shouldCenterAlign","isPrivateNote","Constants","ChatActivity","Category","ACTIVITY","Type","PRIVATE_NOTE","React","Fragment","createdAt","Day","margin","alignItems","marginRight","marginLeft","justifyContent","marginBottom","flexShrink","id","flexGrow","alignSelf","_f","_Fragment"],"mappings":"y+BA8BA,MAEMA,EAIDC,IAAmC,IAAlCC,KAAEA,EAAIC,WAAEA,EAAUC,SAAEA,GAAUH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B,UAAb4C,GACbnF,EACC,MAAAC,OAAAC,OAAA,CAAAP,MAAO,CACN2J,WAAY,MACZxD,MAAO,OACP2D,WAAY,EACZG,UAAW,eACX,CAAAvJ,SAEAiH,GAAoB1C,EAASI,EAAiBE,YAxE9B,QAAf+B,EAAArC,EAAQE,WAAO,IAAAmC,EAAAA,EAAA,GAAGa,KAAmC,QAA1B+B,EAAA/H,aAAkB,EAAlBA,WAA0B,IAAA+H,EAAAA,EAAA,OA4E1C,WA5HdrI,EAAkBxB,EAAG8J,EAAA,CAAAzJ,SAAAmB,MAAwB,IAgI9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/types.ts"],"sourcesContent":["import React from 'react';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage, LeftRightStyle, User } from '../types';\n\nexport interface ListViewProps {\n\t/** Custom styles for the container. */\n\tstyle?: React.CSSProperties;\n\t/** Callback when end of list is reached. */\n\tonEndReached?: () => void;\n\t/** Threshold for triggering end reached. */\n\tonEndReachedThreshold?: number;\n\t/** Scroll event handler. */\n\tonScroll?: (event: React.UIEvent<HTMLDivElement>) => void;\n\t/** Ref for the scrollable container. */\n\tref?:\n\t\t| React.RefObject<HTMLDivElement>\n\t\t| React.MutableRefObject<HTMLDivElement | null>;\n}\n\nexport interface AvatarProps<TMessage extends IMessage = IMessage> {\n\t/** The current message for the avatar. */\n\tcurrentMessage: TMessage;\n\t/** The previous message. */\n\tpreviousMessage?: TMessage;\n\t/** The next message. */\n\tnextMessage?: TMessage;\n\t/** Position of the avatar ('left' or 'right'). */\n\tposition: 'left' | 'right';\n\t/** The user object. */\n\tuser: User;\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Custom styles for avatar image. */\n\timageStyle?: LeftRightStyle<React.CSSProperties>;\n\t/** Custom styles for avatar container. */\n\tcontainerStyle?: LeftRightStyle<React.CSSProperties>;\n\t[key: string]: any;\n}\n\nexport interface DayProps {\n\t/** Date/time for the separator. */\n\tcreatedAt?: Date | number | string;\n\t/** Format for displaying the date. */\n\tdateFormat?: string;\n\t/** Calendar format options. */\n\tdateFormatCalendar?: {\n\t\t/** Format for same day. */\n\t\tsameDay?: string;\n\t\t/** Format for next day. */\n\t\tnextDay?: string;\n\t\t/** Format for next week. */\n\t\tnextWeek?: string;\n\t\t/** Format for last day. */\n\t\tlastDay?: string;\n\t\t/** Format for last week. */\n\t\tlastWeek?: string;\n\t\t/** Format for other days. */\n\t\tsameElse?: string;\n\t};\n}\n\nexport interface GiftedChatProps<TMessage extends IMessage = IMessage> {\n\t/** Array of chat messages. */\n\tmessages: TMessage[];\n\t/** The current user object. */\n\tuser: User;\n\n\t/** Custom bubble renderer. */\n\trenderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode;\n\t/** Custom avatar renderer. */\n\trenderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode;\n\t/** Custom day separator renderer. */\n\trenderDay?: (props: DayProps) => React.ReactNode;\n\t/** Custom loading renderer. */\n\trenderLoading?: () => React.ReactNode;\n\t/** Custom empty chat renderer. */\n\trenderChatEmpty?: () => React.ReactNode;\n\n\t/** Props for the scrollable list view. */\n\tlistViewProps?: ListViewProps;\n\n\t/** Scroll threshold for loading old messages. */\n\ttopThreshold?: number;\n\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Whether to invert the message list. */\n\tinverted?: boolean;\n\n\t/** Handler for long press on message. */\n\tonLongPress?: (context?: any, message?: TMessage) => void;\n\t/** Handler for press on message. */\n\tonPress?: (context?: any, message?: TMessage) => void;\n\n\t/** Function to generate message IDs. */\n\tmessageIdGenerator?: (message?: TMessage) => string;\n\tappType?: GiftedChatAppType;\n\n\t[key: string]: any;\n}\n\nexport interface ScrollState {\n\t/** Is initial mount of the component. */\n\tisInitialMount: boolean;\n\t/** Is user currently scrolling. */\n\tisUserScrolling: boolean;\n\t/** Is loading old messages. */\n\tisLoadingOldMessages: boolean;\n\n\t/** Is scroll at bottom. */\n\tisAtBottom: boolean;\n\t/** Has end reached been triggered. */\n\thasTriggeredEndReached: boolean;\n\n\t/** Last known messages length. */\n\tlastMessagesLength: number;\n\n\t/** Previous scroll height. */\n\tpreviousScrollHeight: number;\n\t/** Previous scroll top position. */\n\tpreviousScrollTop: number;\n\n\t/** Debounce timer for scroll events. */\n\tscrollTimeout: number | null;\n}\n\nexport enum CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE {\n\t/** User is calling another user. */\n\tCALLING_CALL = 'CALLING_CALL',\n\t/** Call is ringing for the recipient. */\n\tRINGING_CALL = 'RINGING_CALL',\n\t/** Call is ongoing between users. */\n\tONGOING_CALL = 'ONGOING_CALL',\n\t/** Call has been completed. */\n\tCOMPLETED_CALL = 'COMPLETED_CALL',\n\t/** Call was missed by the recipient. */\n\tMISSED_CALL = 'MISSED_CALL',\n\t/** Callback was requested. */\n\tREQUESTED_CALLBACK = 'REQUESTED_CALLBACK',\n\t/** Call was declined by the recipient. */\n\tDECLINED_CALL = 'DECLINED_CALL',\n\t/** Call was disconnected. */\n\tDISCONNECTED_CALL = 'DISCONNECTED_CALL',\n\t/** Call was unanswered. */\n\tUNANSWERED_CALL = 'UNANSWERED_CALL',\n}\n\nexport const enum MESSAGE_CHANNELS {\n\tINSTAGRAM = 'instagram',\n\tMESSENGER = 'messenger',\n\tWHATSAPP = 'whatsapp',\n\tGMAIL = 'gmail',\n\tLIVECHAT = 'livechat',\n\tGOOGLE_BUSINESS_CHAT = 'gbm',\n\tSHOPIFY = 'shopify',\n\tFACEBOOK = 'facebook',\n\tEMAIL = 'email',\n\tSMTP = 'smtp',\n\tFACEBOOK_CATALOG = 'facebook-catalog',\n\tWHATSAPP_VOICE_CALL = 'whatsapp-voice-call',\n\tCREATE_SIGNATURE = 'create-signature',\n\tEDIT_SIGNATURE = 'edit-signature',\n\tWEBPUSH = 'webpush',\n\tTASKS = 'tasks',\n\tRCS = 'rcs',\n}\n"],"names":["CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE","MESSAGE_CHANNELS"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/types.ts"],"sourcesContent":["import React from 'react';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage, LeftRightStyle, User } from '../types';\n\nexport interface ListViewProps {\n\t/** Custom styles for the container. */\n\tstyle?: React.CSSProperties;\n\t/** Callback when end of list is reached. */\n\tonEndReached?: () => void;\n\t/** Threshold for triggering end reached. */\n\tonEndReachedThreshold?: number;\n\t/** Scroll event handler. */\n\tonScroll?: (event: React.UIEvent<HTMLDivElement>) => void;\n\t/** Ref for the scrollable container. */\n\tref?:\n\t\t| React.RefObject<HTMLDivElement>\n\t\t| React.MutableRefObject<HTMLDivElement | null>;\n}\n\nexport interface AvatarProps<TMessage extends IMessage = IMessage> {\n\t/** The current message for the avatar. */\n\tcurrentMessage: TMessage;\n\t/** The previous message. */\n\tpreviousMessage?: TMessage;\n\t/** The next message. */\n\tnextMessage?: TMessage;\n\t/** Position of the avatar ('left' or 'right'). */\n\tposition: 'left' | 'right';\n\t/** The user object. */\n\tuser: User;\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message; when false, show only on the first message of each consecutive sender group. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Custom styles for avatar image. */\n\timageStyle?: LeftRightStyle<React.CSSProperties>;\n\t/** Custom styles for avatar container. */\n\tcontainerStyle?: LeftRightStyle<React.CSSProperties>;\n\t[key: string]: any;\n}\n\nexport interface DayProps {\n\t/** Date/time for the separator. */\n\tcreatedAt?: Date | number | string;\n\t/** Format for displaying the date. */\n\tdateFormat?: string;\n\t/** Calendar format options. */\n\tdateFormatCalendar?: {\n\t\t/** Format for same day. */\n\t\tsameDay?: string;\n\t\t/** Format for next day. */\n\t\tnextDay?: string;\n\t\t/** Format for next week. */\n\t\tnextWeek?: string;\n\t\t/** Format for last day. */\n\t\tlastDay?: string;\n\t\t/** Format for last week. */\n\t\tlastWeek?: string;\n\t\t/** Format for other days. */\n\t\tsameElse?: string;\n\t};\n}\n\nexport interface GiftedChatProps<TMessage extends IMessage = IMessage> {\n\t/** Array of chat messages. */\n\tmessages: TMessage[];\n\t/** The current user object. */\n\tuser: User;\n\n\t/** Custom bubble renderer. */\n\trenderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode;\n\t/** Custom avatar renderer. */\n\trenderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode;\n\t/** Custom day separator renderer. */\n\trenderDay?: (props: DayProps) => React.ReactNode;\n\t/** Custom loading renderer. */\n\trenderLoading?: () => React.ReactNode;\n\t/** Custom empty chat renderer. */\n\trenderChatEmpty?: () => React.ReactNode;\n\n\t/** Props for the scrollable list view. */\n\tlistViewProps?: ListViewProps;\n\n\t/** Scroll threshold for loading old messages. */\n\ttopThreshold?: number;\n\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message; when false, show only on the first message of each consecutive sender group. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Whether to invert the message list. */\n\tinverted?: boolean;\n\n\t/** Handler for long press on message. */\n\tonLongPress?: (context?: any, message?: TMessage) => void;\n\t/** Handler for press on message. */\n\tonPress?: (context?: any, message?: TMessage) => void;\n\n\t/** Function to generate message IDs. */\n\tmessageIdGenerator?: (message?: TMessage) => string;\n\tappType?: GiftedChatAppType;\n\t/** Maximum height of the chat messages container in pixels. When set, the container clips overflow and scrolls within that height. */\n\tmaxHeight?: number;\n\t/** Returns true if a message is a non-chat activity (e.g. assignment, status change). Used to break sender stacks for avatar and border-radius logic. */\n\tisActivityMessage?: (message: TMessage) => boolean;\n\n\t[key: string]: any;\n}\n\nexport interface ScrollState {\n\t/** Is initial mount of the component. */\n\tisInitialMount: boolean;\n\t/** Is user currently scrolling. */\n\tisUserScrolling: boolean;\n\t/** Is loading old messages. */\n\tisLoadingOldMessages: boolean;\n\n\t/** Is scroll at bottom. */\n\tisAtBottom: boolean;\n\t/** Has end reached been triggered. */\n\thasTriggeredEndReached: boolean;\n\n\t/** Last known messages length. */\n\tlastMessagesLength: number;\n\n\t/** Previous scroll height. */\n\tpreviousScrollHeight: number;\n\t/** Previous scroll top position. */\n\tpreviousScrollTop: number;\n\n\t/** Debounce timer for scroll events. */\n\tscrollTimeout: number | null;\n}\n\nexport enum CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE {\n\t/** User is calling another user. */\n\tCALLING_CALL = 'CALLING_CALL',\n\t/** Call is ringing for the recipient. */\n\tRINGING_CALL = 'RINGING_CALL',\n\t/** Call is ongoing between users. */\n\tONGOING_CALL = 'ONGOING_CALL',\n\t/** Call has been completed. */\n\tCOMPLETED_CALL = 'COMPLETED_CALL',\n\t/** Call was missed by the recipient. */\n\tMISSED_CALL = 'MISSED_CALL',\n\t/** Callback was requested. */\n\tREQUESTED_CALLBACK = 'REQUESTED_CALLBACK',\n\t/** Call was declined by the recipient. */\n\tDECLINED_CALL = 'DECLINED_CALL',\n\t/** Call was disconnected. */\n\tDISCONNECTED_CALL = 'DISCONNECTED_CALL',\n\t/** Call was unanswered. */\n\tUNANSWERED_CALL = 'UNANSWERED_CALL',\n}\n\nexport const enum MESSAGE_CHANNELS {\n\tINSTAGRAM = 'instagram',\n\tMESSENGER = 'messenger',\n\tWHATSAPP = 'whatsapp',\n\tGMAIL = 'gmail',\n\tLIVECHAT = 'livechat',\n\tGOOGLE_BUSINESS_CHAT = 'gbm',\n\tSHOPIFY = 'shopify',\n\tFACEBOOK = 'facebook',\n\tEMAIL = 'email',\n\tSMTP = 'smtp',\n\tFACEBOOK_CATALOG = 'facebook-catalog',\n\tWHATSAPP_VOICE_CALL = 'whatsapp-voice-call',\n\tCREATE_SIGNATURE = 'create-signature',\n\tEDIT_SIGNATURE = 'edit-signature',\n\tWEBPUSH = 'webpush',\n\tTASKS = 'tasks',\n\tRCS = 'rcs',\n}\n"],"names":["CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE","MESSAGE_CHANNELS"],"mappings":"IA0IYA,EAqBMC,GArBlB,SAAYD,GAEXA,EAAA,aAAA,eAEAA,EAAA,aAAA,eAEAA,EAAA,aAAA,eAEAA,EAAA,eAAA,iBAEAA,EAAA,YAAA,cAEAA,EAAA,mBAAA,qBAEAA,EAAA,cAAA,gBAEAA,EAAA,kBAAA,oBAEAA,EAAA,gBAAA,iBACA,CAnBD,CAAYA,IAAAA,EAmBX,CAAA,IAED,SAAkBC,GACjBA,EAAA,UAAA,YACAA,EAAA,UAAA,YACAA,EAAA,SAAA,WACAA,EAAA,MAAA,QACAA,EAAA,SAAA,WACAA,EAAA,qBAAA,MACAA,EAAA,QAAA,UACAA,EAAA,SAAA,WACAA,EAAA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,iBAAA,mBACAA,EAAA,oBAAA,sBACAA,EAAA,iBAAA,mBACAA,EAAA,eAAA,iBACAA,EAAA,QAAA,UACAA,EAAA,MAAA,QACAA,EAAA,IAAA,KACA,CAlBD,CAAkBA,IAAAA,EAkBjB,CAAA"}
|