@bikdotai/bik-component-library 0.0.805-beta.4 → 0.0.805-beta.5
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/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/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/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.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +7 -7
- 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.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/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
- package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -1
- package/dist/cjs/components/feature-announcements/MinorUpdatePopup.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/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 +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 +2 -2
- 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/MockMenus.d.ts +0 -1
- 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/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 +1 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +1 -1
- package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -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 +1 -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 +2 -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/feature-announcements/types/feature.types.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 +1 -1
- package/dist/cjs/src/components/list-item/ListItem.styled.d.ts +1 -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 +6 -0
- package/dist/cjs/src/icons/Arrows/Chevron/ChevronUp.d.ts +1 -2
- package/dist/cjs/src/index.d.ts +1 -0
- 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/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/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.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +1 -1
- 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.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/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
- package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +1 -1
- package/dist/esm/components/feature-announcements/MinorUpdatePopup.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/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 +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 +2 -2
- 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/MockMenus.d.ts +0 -1
- 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/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 +1 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +1 -1
- package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -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 +1 -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 +2 -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/feature-announcements/types/feature.types.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 +1 -1
- package/dist/esm/src/components/list-item/ListItem.styled.d.ts +1 -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 +6 -0
- package/dist/esm/src/icons/Arrows/Chevron/ChevronUp.d.ts +1 -2
- package/dist/esm/src/index.d.ts +1 -0
- package/package.json +1 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e);const i=r.default.div`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
background: ${e=>e.disabled?t.COLORS.background.inactive:t.COLORS.background.inverseLight};
|
|
7
|
+
`,o=r.default.button`
|
|
8
|
+
all: unset;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
width: 24px;
|
|
13
|
+
height: 24px;
|
|
14
|
+
padding: 4px;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
17
|
+
background: transparent;
|
|
18
|
+
|
|
19
|
+
${e=>e.disabled?"":`\n\t\t:hover {\n\t\t\tbackground-color: ${t.COLORS.background.inverse};\n\t\t}\n\t\t:active {\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t}\n\t`}
|
|
20
|
+
`,d=r.default.div`
|
|
21
|
+
width: 1px;
|
|
22
|
+
height: 12px;
|
|
23
|
+
background: rgba(255, 255, 255, 0.3);
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
`;exports.Container=i,exports.Divider=d,exports.IconHalf=o;
|
|
26
|
+
//# sourceMappingURL=DualIconButton.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DualIconButton.styled.js","sources":["../../../../src/components/dual-icon-button/DualIconButton.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport const Container = styled.div<{ disabled?: boolean }>`\n\tdisplay: inline-flex;\n\talign-items: center;\n\tborder-radius: 4px;\n\toverflow: hidden;\n\tbackground: ${(props) =>\n\t\tprops.disabled\n\t\t\t? COLORS.background.inactive\n\t\t\t: COLORS.background.inverseLight};\n`;\n\nexport const IconHalf = styled.button<{ disabled?: boolean }>`\n\tall: unset;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 24px;\n\theight: 24px;\n\tpadding: 4px;\n\tbox-sizing: border-box;\n\tcursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n\tbackground: transparent;\n\n\t${(props) =>\n\t\t!props.disabled\n\t\t\t? `\n\t\t:hover {\n\t\t\tbackground-color: ${COLORS.background.inverse};\n\t\t}\n\t\t:active {\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t}\n\t`\n\t\t\t: ''}\n`;\n\nexport const Divider = styled.div`\n\twidth: 1px;\n\theight: 12px;\n\tbackground: rgba(255, 255, 255, 0.3);\n\tflex-shrink: 0;\n`;\n"],"names":["Container","styled","div","props","disabled","COLORS","background","inactive","inverseLight","IconHalf","button","inverse","Divider"],"mappings":"gOAGaA,MAAAA,EAAYC,EAAM,QAACC,GAA2B;;;;;eAK3CC,GACdA,EAAMC,SACHC,EAAMA,OAACC,WAAWC,SAClBF,EAAAA,OAAOC,WAAWE;EAGVC,EAAWR,EAAM,QAACS,MAA8B;;;;;;;;;WASjDP,GAAWA,EAAMC,SAAW,cAAgB;;;GAGpDD,GACDA,EAAMC,SASJ,GARA,2CAEkBC,EAAMA,OAACC,WAAWK;EAS5BC,EAAUX,EAAM,QAACC,GAAG;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FABMenu.js","sources":["../../../../src/components/fab-menu/FABMenu.tsx"],"sourcesContent":["import React from 'react';\nimport { OpenedDropdown } from '../dropdown/OpenedDropdown';\nimport { DropdownOption } from '../dropdown/type';\nimport { FloatingActionButton } from '../floating-action-button';\nimport {\n\tDROP_POSITION,\n\tFAB_POSITION,\n\tMENU_ALIGNMENT,\n} from '../floating-action-button/FloatingActionButton.styles';\nimport { Placement } from '../tooltips';\n\nexport const FABMenu: React.FC<{\n\tonSelect: (selected: DropdownOption | DropdownOption[]) => void;\n\tmenuOptions: DropdownOption[];\n\tbuttonWidth?: number;\n\tbuttonHeight?: number;\n\tbuttonColor?: string;\n\tbuttonPosition?: FAB_POSITION;\n\tmenuWidth?: number;\n\tmenuHeight?: number;\n\tbuttonIcon?: JSX.Element;\n\tbuttonPaddingHorizontal?: number;\n\tbuttonPaddingVertical?: number;\n\ttooltipPlacement?: Placement;\n\ttooltipText?: string;\n\ttooltipWidth?: number;\n\tzIndex?: number;\n\tisRound?: boolean;\n\tdropPosition?: DROP_POSITION;\n\tmenuAligment?: MENU_ALIGNMENT;\n\tversion?: '1.0' | '2.0';\n}> = (props) => {\n\tconst {\n\t\tonSelect,\n\t\tmenuOptions,\n\t\tbuttonWidth,\n\t\tbuttonHeight,\n\t\tbuttonColor,\n\t\tbuttonPosition,\n\t\tmenuWidth,\n\t\tmenuHeight,\n\t\tbuttonIcon,\n\t\tbuttonPaddingHorizontal,\n\t\tbuttonPaddingVertical,\n\t\ttooltipPlacement,\n\t\ttooltipText,\n\t\tzIndex,\n\t\tisRound,\n\t\tdropPosition,\n\t\tmenuAligment,\n\t\ttooltipWidth,\n\t} = props;\n\treturn (\n\t\t<div>\n\t\t\t<FloatingActionButton\n\t\t\t\ticon={buttonIcon}\n\t\t\t\twidth={buttonWidth}\n\t\t\t\theight={buttonHeight}\n\t\t\t\tcolor={buttonColor}\n\t\t\t\tposition={buttonPosition}\n\t\t\t\tbuttonPaddingHorizontal={buttonPaddingHorizontal}\n\t\t\t\tbuttonPaddingVertical={buttonPaddingVertical}\n\t\t\t\ttooltipPlacement={tooltipPlacement}\n\t\t\t\ttooltipText={tooltipText}\n\t\t\t\tzIndex={zIndex}\n\t\t\t\tisRound={isRound}\n\t\t\t\tdropPosition={dropPosition}\n\t\t\t\tmenuAligment={menuAligment}\n\t\t\t\ttootipWidth={tooltipWidth}\n\t\t\t>\n\t\t\t\t<OpenedDropdown\n\t\t\t\t\toptions={menuOptions}\n\t\t\t\t\theight={menuHeight || 90}\n\t\t\t\t\twidth={`${menuWidth}px`}\n\t\t\t\t\tonSelect={onSelect}\n\t\t\t\t\tversion={props.version}\n\t\t\t\t/>\n\t\t\t</FloatingActionButton>\n\t\t</div>\n\t);\n};\n"],"names":["props","onSelect","menuOptions","buttonWidth","buttonHeight","buttonColor","buttonPosition","menuWidth","menuHeight","buttonIcon","buttonPaddingHorizontal","buttonPaddingVertical","tooltipPlacement","tooltipText","zIndex","isRound","dropPosition","menuAligment","tooltipWidth","_jsx","jsx","FloatingActionButton","icon","width","height","color","position","tootipWidth","children","OpenedDropdown","options","version"],"mappings":"gUA+BMA,IACL,MAAMC,SACLA,EAAQC,YACRA,EAAWC,YACXA,EAAWC,aACXA,EAAYC,YACZA,EAAWC,eACXA,EAAcC,UACdA,EAASC,WACTA,EAAUC,WACVA,EAAUC,wBACVA,EAAuBC,sBACvBA,EAAqBC,iBACrBA,EAAgBC,YAChBA,EAAWC,OACXA,EAAMC,QACNA,EAAOC,aACPA,EAAYC,aACZA,EAAYC,aACZA,GACGlB,EACJ,OACCmB,EAAAA,oBACCA,EAACC,IAAAC,sCACAC,KAAMb,EACNc,MAAOpB,EACPqB,OAAQpB,EACRqB,MAAOpB,EACPqB,SAAUpB,EACVI,wBAAyBA,EACzBC,sBAAuBA,EACvBC,iBAAkBA,EAClBC,YAAaA,EACbC,OAAQA,EACRC,QAASA,EACTC,aAAcA,EACdC,aAAcA,EACdU,YAAaT,GAAY,CAAAU,SAEzBT,MAACU,iBAAc,CACdC,QAAS5B,EACTsB,OAAQhB,GAAc,GACtBe,SAAUhB,MACVN,SAAUA,EACV8B,QAAS/B,EAAM+B,cAGZ"}
|
|
1
|
+
{"version":3,"file":"FABMenu.js","sources":["../../../../src/components/fab-menu/FABMenu.tsx"],"sourcesContent":["import React from 'react';\nimport { OpenedDropdown } from '../dropdown/OpenedDropdown';\nimport { DropdownOption } from '../dropdown/type';\nimport { FloatingActionButton } from '../floating-action-button';\nimport {\n\tDROP_POSITION,\n\tFAB_POSITION,\n\tMENU_ALIGNMENT,\n} from '../floating-action-button/FloatingActionButton.styles';\nimport { Placement } from '../tooltips';\n\nexport const FABMenu: React.FC<{\n\tonSelect: (selected: DropdownOption | DropdownOption[]) => void;\n\tmenuOptions: DropdownOption[];\n\tbuttonWidth?: number;\n\tbuttonHeight?: number;\n\tbuttonColor?: string;\n\tbuttonPosition?: FAB_POSITION;\n\tmenuWidth?: number;\n\tmenuHeight?: number;\n\tbuttonIcon?: JSX.Element;\n\tbuttonPaddingHorizontal?: number;\n\tbuttonPaddingVertical?: number;\n\ttooltipPlacement?: Placement;\n\ttooltipText?: string;\n\ttooltipWidth?: number;\n\tzIndex?: number;\n\tisRound?: boolean;\n\tdropPosition?: DROP_POSITION;\n\tmenuAligment?: MENU_ALIGNMENT;\n\tversion?: '1.0' | '2.0' | '3.0';\n}> = (props) => {\n\tconst {\n\t\tonSelect,\n\t\tmenuOptions,\n\t\tbuttonWidth,\n\t\tbuttonHeight,\n\t\tbuttonColor,\n\t\tbuttonPosition,\n\t\tmenuWidth,\n\t\tmenuHeight,\n\t\tbuttonIcon,\n\t\tbuttonPaddingHorizontal,\n\t\tbuttonPaddingVertical,\n\t\ttooltipPlacement,\n\t\ttooltipText,\n\t\tzIndex,\n\t\tisRound,\n\t\tdropPosition,\n\t\tmenuAligment,\n\t\ttooltipWidth,\n\t} = props;\n\treturn (\n\t\t<div>\n\t\t\t<FloatingActionButton\n\t\t\t\ticon={buttonIcon}\n\t\t\t\twidth={buttonWidth}\n\t\t\t\theight={buttonHeight}\n\t\t\t\tcolor={buttonColor}\n\t\t\t\tposition={buttonPosition}\n\t\t\t\tbuttonPaddingHorizontal={buttonPaddingHorizontal}\n\t\t\t\tbuttonPaddingVertical={buttonPaddingVertical}\n\t\t\t\ttooltipPlacement={tooltipPlacement}\n\t\t\t\ttooltipText={tooltipText}\n\t\t\t\tzIndex={zIndex}\n\t\t\t\tisRound={isRound}\n\t\t\t\tdropPosition={dropPosition}\n\t\t\t\tmenuAligment={menuAligment}\n\t\t\t\ttootipWidth={tooltipWidth}\n\t\t\t>\n\t\t\t\t<OpenedDropdown\n\t\t\t\t\toptions={menuOptions}\n\t\t\t\t\theight={menuHeight || 90}\n\t\t\t\t\twidth={`${menuWidth}px`}\n\t\t\t\t\tonSelect={onSelect}\n\t\t\t\t\tversion={props.version}\n\t\t\t\t/>\n\t\t\t</FloatingActionButton>\n\t\t</div>\n\t);\n};\n"],"names":["props","onSelect","menuOptions","buttonWidth","buttonHeight","buttonColor","buttonPosition","menuWidth","menuHeight","buttonIcon","buttonPaddingHorizontal","buttonPaddingVertical","tooltipPlacement","tooltipText","zIndex","isRound","dropPosition","menuAligment","tooltipWidth","_jsx","jsx","FloatingActionButton","icon","width","height","color","position","tootipWidth","children","OpenedDropdown","options","version"],"mappings":"gUA+BMA,IACL,MAAMC,SACLA,EAAQC,YACRA,EAAWC,YACXA,EAAWC,aACXA,EAAYC,YACZA,EAAWC,eACXA,EAAcC,UACdA,EAASC,WACTA,EAAUC,WACVA,EAAUC,wBACVA,EAAuBC,sBACvBA,EAAqBC,iBACrBA,EAAgBC,YAChBA,EAAWC,OACXA,EAAMC,QACNA,EAAOC,aACPA,EAAYC,aACZA,EAAYC,aACZA,GACGlB,EACJ,OACCmB,EAAAA,oBACCA,EAACC,IAAAC,sCACAC,KAAMb,EACNc,MAAOpB,EACPqB,OAAQpB,EACRqB,MAAOpB,EACPqB,SAAUpB,EACVI,wBAAyBA,EACzBC,sBAAuBA,EACvBC,iBAAkBA,EAClBC,YAAaA,EACbC,OAAQA,EACRC,QAASA,EACTC,aAAcA,EACdC,aAAcA,EACdU,YAAaT,GAAY,CAAAU,SAEzBT,MAACU,iBAAc,CACdC,QAAS5B,EACTsB,OAAQhB,GAAc,GACtBe,SAAUhB,MACVN,SAAUA,EACV8B,QAAS/B,EAAM+B,cAGZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),n=require("react-joyride");require("./constants/animations.js");var a=require("./constants/selectors.js"),r=require("./hooks/useFeatureAnnouncements.js"),i=require("./MajorUpdatePopup.js"),s=require("./MinorUpdatePopup.js"),l=require("./VideoModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n);exports.default=d=>{let{children:c,fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:m,module:h,router:y,storeId:S,onAnnouncementShown:x,onAnnouncementInteracted:C}=d;var k;const{majorUpdateFeatures:T,minorUpdateFeatures:v,isLoading:w,markFeatureAsViewed:I}=r.useFeatureAnnouncements({fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:m,module:h,router:y}),[B,j]=o.useState(null),[E,F]=o.useState(null),[N,q]=o.useState(!1),[P,_]=o.useState([]),[O,U]=o.useState(!1),[W,V]=o.useState([]),[M,A]=o.useState(!1),[L,R]=o.useState(!1),[$,z]=o.useState([]),[H,Z]=o.useState(!1),[D,G]=o.useState(!1),[J,K]=o.useState(!1),[Q,X]=o.useState(""),[Y,ee]=o.useState(!1),[te,oe]=o.useState(!1),[ne,ae]=o.useState(!1),[re,ie]=o.useState(0),[se,le]=o.useState(0),[de,ue]=o.useState(new Set);o.useEffect((()=>{const e="minor-spotlight-cutout-style";let t=document.getElementById(e);return t||(t=document.createElement("style"),t.id=e,document.head.appendChild(t)),t.textContent="\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t",()=>{const t=document.getElementById(e);t&&t.remove()}}),[]),o.useEffect((()=>{ie((e=>e+1)),le((e=>e+1)),oe(!1),ae(!1),ue(new Set)}),[null==y?void 0:y.pathname]),o.useEffect((()=>{if(!(T.length>0)||B||w||M||Y)0!==T.length||w||G(!0);else{G(!1),Z(!1),q(!1),_([]),F(null),z([]);let e=0;const t=10,o=()=>{e++;document.querySelector('[data-testid="whats-new-button"]')?ce(T[0]):e<t?setTimeout(o,1e3):G(!0)};o()}}),[T,B,w,M,Y]),o.useEffect((()=>{var e;const t=null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId;if(!t||w||0===v.length)return;const o=v.find((e=>e.id===t));if(!o||!o.featureTag)return;Z(!0),R(!0);let n=0;const a=setInterval((()=>{n++;const e=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`;if(document.querySelector(e)){const e=[o];z(e),Se(o,e),clearInterval(a)}else n>=25&&(R(!1),clearInterval(a))}),200);return()=>{clearInterval(a)}}),[v,null===(k=null==y?void 0:y.query)||void 0===k?void 0:k.featureId,w]),o.useEffect((()=>{var e;if(v.length>0&&!w&&!N&&!L&&!E&&!H&&D&&!Y){let e=null,t=null,o=null,n=!1;const a=()=>{if(n||L||E||H||!D)return;const a=v.filter((e=>{if(!e.featureTag||""===e.featureTag.trim())return!1;if(de.has(e.id))return!1;const t=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`;return null!==document.querySelector(t)}));a.length>0&&(z(a),Se(a[0],a),e&&(e.disconnect(),e=null),t&&(window.removeEventListener("scroll",t),t=null),o&&(clearTimeout(o),o=null))};return e=new MutationObserver((e=>{let t=!1;for(const o of e){if("childList"===o.type&&o.addedNodes.length>0)for(let e=0;e<o.addedNodes.length;e++){const n=o.addedNodes[e];if(n.nodeType===Node.ELEMENT_NODE){const e=n;if(e.id||e.querySelector("[id]")){t=!0;break}}}if(t)break}N||n||L||E||H||!D||!t||(o&&clearTimeout(o),o=setTimeout((()=>{n||L||E||H||!D||a()}),200))})),t=()=>{N||n||L||E||H||!D||(o&&clearTimeout(o),requestAnimationFrame((()=>{o=setTimeout((()=>{n||L||E||H||!D||a()}),300)})))},e&&e.observe(document.body,{childList:!0,subtree:!0}),t&&window.addEventListener("scroll",t,{passive:!0}),a(),setTimeout((()=>{n||L||E||H||!D||a()}),100),setTimeout((()=>{n||L||E||H||!D||a()}),1e3),setTimeout((()=>{n||L||E||H||!D||a()}),500),()=>{n=!0,e&&e.disconnect(),t&&window.removeEventListener("scroll",t),o&&clearTimeout(o)}}if(0===v.length||w){(null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId)&&E||(q(!1),_([]),F(null),z([]),Z(!1))}}),[v,w,N,L,E,H,D,I,Y]);const ce=e=>{j(e);const o=T.findIndex((t=>t.id===e.id)),n=T.length,r=[{target:a.SELECTORS.WHATS_NEW_BUTTON,content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:n,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r),U(!0),x&&S&&x({storeId:S,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo})},pe=o.useCallback((e=>{const t=e||B;t&&(A(!0),T.forEach((e=>{I(e.id)})),U(!1),j(null),V([]),G(!0),C&&S&&C({storeId:S,announcementId:t.id,announcementTitle:t.title,imageUrl:t.displayImage||t.image,videoUrl:t.productVideo,buttonClicked:"Skip",buttonName:"Skip",buttonUrl:void 0}),setTimeout((()=>{A(!1)}),500))}),[B,T,I]),fe=o.useCallback((e=>{A(!0),I(e.id),e.productVideo&&(X(e.productVideo),K(!0),ee(!0)),U(!1),j(null),V([]);T.findIndex((t=>t.id===e.id))===T.length-1&&G(!0),C&&S&&C({storeId:S,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo,buttonClicked:"Primary",buttonName:e.buttonText||"Explore",buttonUrl:e.redirectUrl||e.productVideo}),setTimeout((()=>{A(!1)}),500)}),[T,I]),be=o.useCallback((e=>{const o=e||B;if(!o)return;const n=T.findIndex((e=>e.id===o.id));if(n>0){const e=T[n-1];j(e);const o=n-1,a=T.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r)}}),[B,T]),ge=o.useCallback((e=>{const o=e||B;if(!o)return;const n=T.findIndex((e=>e.id===o.id));if(n<T.length-1){const e=T[n+1];j(e);const o=n+1,a=T.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r)}else A(!0),I(o.id),U(!1),j(null),V([]),G(!0),setTimeout((()=>{A(!1)}),500)}),[B,T,I]),me=()=>{if(T.length>0&&!B){document.querySelector('[data-testid="whats-new-button"]')&&ce(T[0])}};o.useEffect((()=>(window.showMajorUpdatePopup=me,()=>{delete window.showMajorUpdatePopup})),[T,B]);const he=o.useCallback((e=>{const{action:t}=e;t===n.ACTIONS.CLOSE&&(B&&(A(!0),T.forEach((e=>{I(e.id)})),G(!0),setTimeout((()=>{A(!1)}),500)),U(!1),j(null),V([]))}),[B,T,I]),ye=o.useCallback((e=>{const{action:t}=e;if(t===n.ACTIONS.CLOSE){if(E){R(!0),I(E.id);$.findIndex((e=>e.id===E.id))===$.length-1&&Z(!0),setTimeout((()=>{R(!1)}),500)}q(!1),F(null),_([])}}),[E,$,I]),Se=(o,n)=>e.__awaiter(void 0,void 0,void 0,(function*(){F(o);const e=n||$,a=e.findIndex((e=>e.id===o.id)),r=e.length,i=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,l=document.querySelector(i);if(l)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(l,120)}catch(e){}const d=[{target:i,content:t.jsx(s.default,{feature:o,currentIndex:a,totalFeatures:r,onSkip:()=>xe(o),onExplore:()=>Ce(o),onPrevious:()=>ke(o),onNext:()=>Te(o),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:o,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(d),q(!0)})),xe=o.useCallback((e=>{const t=e||E;if(t){R(!0),I(t.id),ue((e=>new Set(e).add(t.id))),q(!1),F(null),_([]);const e=$.find((e=>e.id!==t.id&&!de.has(e.id)));setTimeout((()=>{R(!1),e?Se(e,$):Z(!0)}),500)}}),[E,$,I,de]),Ce=o.useCallback((e=>{R(!0),I(e.id),ue((t=>new Set(t).add(e.id))),e.productVideo&&(X(e.productVideo),K(!0),ee(!0)),q(!1),F(null),_([]);const t=$.find((t=>t.id!==e.id&&!de.has(t.id)));setTimeout((()=>{R(!1),t&&!e.productVideo?Se(t,$):t||Z(!0)}),500)}),[$,I,de]),ke=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||E;if(!e)return;const n=$.findIndex((t=>t.id===e.id));if(n>0){const e=$[n-1];F(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n-1,i=$.length,l=[{target:o,content:t.jsx(s.default,{feature:e,currentIndex:r,totalFeatures:i,onSkip:()=>xe(e),onExplore:()=>Ce(e),onPrevious:()=>ke(e),onNext:()=>Te(e),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(l)}}))),[E,$]),Te=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||E;if(!e)return;const n=$.findIndex((t=>t.id===e.id));if(n<$.length-1){const e=$[n+1];F(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n+1,i=$.length,l=[{target:o,content:t.jsx(s.default,{feature:e,currentIndex:r,totalFeatures:i,onSkip:()=>xe(e),onExplore:()=>Ce(e),onPrevious:()=>ke(e),onNext:()=>Te(e),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(l)}else R(!0),Z(!0),I(e.id),q(!1),F(null),_([]),setTimeout((()=>{R(!1)}),500)}))),[E,$,I]);return t.jsxs(t.Fragment,{children:[c,W.length>0&&t.jsx(u.default,{steps:W,run:O,continuous:!1,showProgress:!1,showSkipButton:!1,callback:he,disableOverlayClose:!1,disableCloseOnEsc:!1,disableOverlay:!1,spotlightClicks:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:te?"transparent":"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none",boxShadow:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`major-joyride-${re}`),P.length>0&&t.jsx(u.default,{steps:P,run:N,continuous:!1,showProgress:!1,showSkipButton:!1,callback:ye,disableOverlayClose:!1,disableCloseOnEsc:!1,disableOverlay:!1,scrollToFirstStep:!0,scrollOffset:120,disableScrolling:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:ne?"transparent":"#ffffff"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",borderRadius:"8px",boxShadow:ne?"none":"0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`minor-joyride-${se}`),t.jsx(l.VideoModal,{isOpen:J,videoUrl:Q,onClose:()=>{K(!1),X(""),ee(!1);const e=$.find((e=>!de.has(e.id)));e?setTimeout((()=>{Se(e,$)}),300):Z(!0)}})]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),n=require("react-joyride");require("./constants/animations.js");var a=require("./constants/selectors.js"),r=require("./hooks/useFeatureAnnouncements.js"),i=require("./MajorUpdatePopup.js"),s=require("./MinorUpdatePopup.js"),l=require("./VideoModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n);exports.default=d=>{let{children:c,fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:m,module:h,router:y,storeId:S,onAnnouncementShown:x,onAnnouncementInteracted:C}=d;var k;const{majorUpdateFeatures:T,minorUpdateFeatures:v,isLoading:w,markFeatureAsViewed:I}=r.useFeatureAnnouncements({fetchVisibleFeatures:p,getStoreFeatureProgress:f,fetchFeatureById:b,markFeatureAsViewedForStore:g,isFeatureApplicableToCurrentPage:m,module:h,router:y}),[B,j]=o.useState(null),[E,F]=o.useState(null),[N,q]=o.useState(!1),[P,_]=o.useState([]),[O,U]=o.useState(!1),[W,V]=o.useState([]),[M,A]=o.useState(!1),[L,R]=o.useState(!1),[$,z]=o.useState([]),[H,Z]=o.useState(!1),[D,G]=o.useState(!1),[J,K]=o.useState(!1),[Q,X]=o.useState(""),[Y,ee]=o.useState(!1),[te,oe]=o.useState(!1),[ne,ae]=o.useState(!1),[re,ie]=o.useState(0),[se,le]=o.useState(0),[de,ue]=o.useState(new Set);o.useEffect((()=>{const e="minor-spotlight-cutout-style";let t=document.getElementById(e);return t||(t=document.createElement("style"),t.id=e,document.head.appendChild(t)),t.textContent="\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t",()=>{const t=document.getElementById(e);t&&t.remove()}}),[]),o.useEffect((()=>{ie((e=>e+1)),le((e=>e+1)),oe(!1),ae(!1),ue(new Set)}),[null==y?void 0:y.pathname]),o.useEffect((()=>{if(!(T.length>0)||B||w||M||Y)0!==T.length||w||G(!0);else{G(!1),Z(!1),q(!1),_([]),F(null),z([]);let e=0;const t=10,o=()=>{e++;document.querySelector('[data-testid="whats-new-button"]')?ce(T[0]):e<t?setTimeout(o,1e3):G(!0)};o()}}),[T,B,w,M,Y]),o.useEffect((()=>{var e;const t=null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId;if(!t||w||0===v.length)return;const o=v.find((e=>e.id===t));if(!o||!o.featureTag)return;Z(!0),R(!0);let n=0;const a=setInterval((()=>{n++;const e=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`;if(document.querySelector(e)){const e=[o];z(e),Se(o,e),clearInterval(a)}else n>=25&&(R(!1),clearInterval(a))}),200);return()=>{clearInterval(a)}}),[v,null===(k=null==y?void 0:y.query)||void 0===k?void 0:k.featureId,w]),o.useEffect((()=>{var e;if(v.length>0&&!w&&!N&&!L&&!E&&!H&&D&&!Y){let e=null,t=null,o=null,n=!1;const a=()=>{if(n||L||E||H||!D)return;const a=v.filter((e=>{if(!e.featureTag||""===e.featureTag.trim())return!1;if(de.has(e.id))return!1;const t=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`;return null!==document.querySelector(t)}));a.length>0&&(z(a),Se(a[0],a),e&&(e.disconnect(),e=null),t&&(window.removeEventListener("scroll",t),t=null),o&&(clearTimeout(o),o=null))};return e=new MutationObserver((e=>{let t=!1;for(const o of e){if("childList"===o.type&&o.addedNodes.length>0)for(let e=0;e<o.addedNodes.length;e++){const n=o.addedNodes[e];if(n.nodeType===Node.ELEMENT_NODE){const e=n;if(e.id||e.querySelector("[id]")){t=!0;break}}}if(t)break}N||n||L||E||H||!D||!t||(o&&clearTimeout(o),o=setTimeout((()=>{n||L||E||H||!D||a()}),200))})),t=()=>{N||n||L||E||H||!D||(o&&clearTimeout(o),requestAnimationFrame((()=>{o=setTimeout((()=>{n||L||E||H||!D||a()}),300)})))},e&&e.observe(document.body,{childList:!0,subtree:!0}),t&&window.addEventListener("scroll",t,{passive:!0}),a(),setTimeout((()=>{n||L||E||H||!D||a()}),100),setTimeout((()=>{n||L||E||H||!D||a()}),1e3),setTimeout((()=>{n||L||E||H||!D||a()}),500),()=>{n=!0,e&&e.disconnect(),t&&window.removeEventListener("scroll",t),o&&clearTimeout(o)}}if(0===v.length||w){(null===(e=null==y?void 0:y.query)||void 0===e?void 0:e.featureId)&&E||(q(!1),_([]),F(null),z([]),Z(!1))}}),[v,w,N,L,E,H,D,I,Y]);const ce=e=>{j(e);const o=T.findIndex((t=>t.id===e.id)),n=T.length,r=[{target:a.SELECTORS.WHATS_NEW_BUTTON,content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:n,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r),U(!0),x&&S&&x({storeId:S,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo})},pe=o.useCallback((e=>{const t=e||B;t&&(A(!0),T.forEach((e=>{I(e.id)})),U(!1),j(null),V([]),G(!0),C&&S&&C({storeId:S,announcementId:t.id,announcementTitle:t.title,imageUrl:t.displayImage||t.image,videoUrl:t.productVideo,buttonClicked:"Skip",buttonName:"Skip",buttonUrl:void 0}),setTimeout((()=>{A(!1)}),500))}),[B,T,I]),fe=o.useCallback((e=>{A(!0),I(e.id),e.productVideo&&(X(e.productVideo),K(!0),ee(!0)),U(!1),j(null),V([]);T.findIndex((t=>t.id===e.id))===T.length-1&&G(!0),C&&S&&C({storeId:S,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo,buttonClicked:"Primary",buttonName:e.buttonText||"Explore",buttonUrl:e.redirectUrl||e.productVideo}),setTimeout((()=>{A(!1)}),500)}),[T,I]),be=o.useCallback((e=>{const o=e||B;if(!o)return;const n=T.findIndex((e=>e.id===o.id));if(n>0){const e=T[n-1];j(e);const o=n-1,a=T.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r)}}),[B,T]),ge=o.useCallback((e=>{const o=e||B;if(!o)return;const n=T.findIndex((e=>e.id===o.id));if(n<T.length-1){const e=T[n+1];j(e);const o=n+1,a=T.length,r=[{target:'[data-testid="whats-new-button"]',content:t.jsx(i.default,{feature:e,currentIndex:o,totalFeatures:a,onSkip:()=>pe(e),onExplore:()=>fe(e),onPrevious:()=>be(e),onNext:()=>ge(e),setIsClosing:oe}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r)}else A(!0),I(o.id),U(!1),j(null),V([]),G(!0),setTimeout((()=>{A(!1)}),500)}),[B,T,I]),me=()=>{if(T.length>0&&!B){document.querySelector('[data-testid="whats-new-button"]')&&ce(T[0])}};o.useEffect((()=>(window.showMajorUpdatePopup=me,()=>{delete window.showMajorUpdatePopup})),[T,B]);const he=o.useCallback((e=>{const{action:t}=e;t===n.ACTIONS.CLOSE&&(B&&(A(!0),T.forEach((e=>{I(e.id)})),G(!0),setTimeout((()=>{A(!1)}),500)),U(!1),j(null),V([]))}),[B,T,I]),ye=o.useCallback((e=>{const{action:t}=e;if(t===n.ACTIONS.CLOSE){if(E){R(!0),I(E.id);$.findIndex((e=>e.id===E.id))===$.length-1&&Z(!0),setTimeout((()=>{R(!1)}),500)}q(!1),F(null),_([])}}),[E,$,I]),Se=(o,n)=>e.__awaiter(void 0,void 0,void 0,(function*(){F(o);const e=n||$,a=e.findIndex((e=>e.id===o.id)),r=e.length,i=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,l=document.querySelector(i);if(l)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(l,120)}catch(e){}const d=[{target:i,content:t.jsx(s.default,{feature:o,currentIndex:a,totalFeatures:r,onSkip:()=>xe(o),onExplore:()=>Ce(o),onPrevious:()=>ke(o),onNext:()=>Te(o),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:o,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(d),q(!0)})),xe=o.useCallback((e=>{const t=e||E;if(t){R(!0),I(t.id),ue((e=>new Set(e).add(t.id))),q(!1),F(null),_([]);const e=$.find((e=>e.id!==t.id&&!de.has(e.id)));setTimeout((()=>{R(!1),e?Se(e,$):Z(!0)}),500)}}),[E,$,I,de]),Ce=o.useCallback((e=>{R(!0),I(e.id),ue((t=>new Set(t).add(e.id))),e.productVideo&&(X(e.productVideo),K(!0),ee(!0)),q(!1),F(null),_([]);const t=$.find((t=>t.id!==e.id&&!de.has(t.id)));setTimeout((()=>{R(!1),t&&!e.productVideo?Se(t,$):t||Z(!0)}),500)}),[$,I,de]),ke=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||E;if(!e)return;const n=$.findIndex((t=>t.id===e.id));if(n>0){const e=$[n-1];F(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n-1,i=$.length,l=[{target:o,content:t.jsx(s.default,{feature:e,currentIndex:r,totalFeatures:i,onSkip:()=>xe(e),onExplore:()=>Ce(e),onPrevious:()=>ke(e),onNext:()=>Te(e),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(l)}}))),[E,$]),Te=o.useCallback((o=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=o||E;if(!e)return;const n=$.findIndex((t=>t.id===e.id));if(n<$.length-1){const e=$[n+1];F(e);const o=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,a=document.querySelector(o);if(a)try{const{scrollToElementSmooth:e}=yield Promise.resolve().then((function(){return require("./utils/elementHelpers.js")}));yield e(a,120)}catch(e){}const r=n+1,i=$.length,l=[{target:o,content:t.jsx(s.default,{feature:e,currentIndex:r,totalFeatures:i,onSkip:()=>xe(e),onExplore:()=>Ce(e),onPrevious:()=>ke(e),onNext:()=>Te(e),setIsClosing:ae}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:e,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];_(l)}else R(!0),Z(!0),I(e.id),q(!1),F(null),_([]),setTimeout((()=>{R(!1)}),500)}))),[E,$,I]);return t.jsxs(t.Fragment,{children:[c,W.length>0&&t.jsx(u.default,{steps:W,run:O,continuous:!1,showProgress:!1,showSkipButton:!1,callback:he,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,spotlightClicks:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:te?"transparent":"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none",boxShadow:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`major-joyride-${re}`),P.length>0&&t.jsx(u.default,{steps:P,run:N,continuous:!1,showProgress:!1,showSkipButton:!1,callback:ye,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,scrollToFirstStep:!0,scrollOffset:120,disableScrolling:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:ne?"transparent":"#ffffff"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",borderRadius:"8px",boxShadow:ne?"none":"0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`minor-joyride-${se}`),t.jsx(l.VideoModal,{isOpen:J,videoUrl:Q,onClose:()=>{K(!1),X(""),ee(!1);const e=$.find((e=>!de.has(e.id)));e?setTimeout((()=>{Se(e,$)}),300):Z(!0)}})]})};
|
|
2
2
|
//# sourceMappingURL=FeatureAnnouncementProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureAnnouncementProvider.js","sources":["../../../../src/components/feature-announcements/FeatureAnnouncementProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport Joyride, { ACTIONS } from 'react-joyride';\nimport { SELECTORS } from './constants';\nimport { useFeatureAnnouncements } from './hooks';\nimport MajorUpdatePopup from './MajorUpdatePopup';\nimport MinorUpdatePopup from './MinorUpdatePopup';\nimport { FeatureAnnouncement, FeatureAnnouncementProviderProps } from './types';\nimport { VideoModal } from './VideoModal';\n\nconst FeatureAnnouncementProvider: React.FC<\n\tFeatureAnnouncementProviderProps\n> = ({\n\tchildren,\n\tfetchVisibleFeatures,\n\tgetStoreFeatureProgress,\n\tfetchFeatureById,\n\tmarkFeatureAsViewedForStore,\n\tisFeatureApplicableToCurrentPage,\n\tmodule,\n\trouter,\n\tstoreId,\n\tonAnnouncementShown,\n\tonAnnouncementInteracted,\n}) => {\n\tconst {\n\t\tmajorUpdateFeatures,\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\tmarkFeatureAsViewed,\n\t} = useFeatureAnnouncements({\n\t\tfetchVisibleFeatures,\n\t\tgetStoreFeatureProgress,\n\t\tfetchFeatureById,\n\t\tmarkFeatureAsViewedForStore,\n\t\tisFeatureApplicableToCurrentPage,\n\t\tmodule,\n\t\trouter,\n\t});\n\n\tconst [currentMajorFeature, setCurrentMajorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [currentMinorFeature, setCurrentMinorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [runJoyride, setRunJoyride] = useState(false);\n\tconst [joyrideSteps, setJoyrideSteps] = useState<any[]>([]);\n\tconst [runMajorJoyride, setRunMajorJoyride] = useState(false);\n\tconst [majorJoyrideSteps, setMajorJoyrideSteps] = useState<any[]>([]);\n\tconst [isProcessingMajorUpdate, setIsProcessingMajorUpdate] = useState(false);\n\tconst [isProcessingMinorUpdate, setIsProcessingMinorUpdate] = useState(false);\n\tconst [availableMinorFeatures, setAvailableMinorFeatures] = useState<\n\t\tFeatureAnnouncement[]\n\t>([]);\n\tconst [minorFeaturesSkipped, setMinorFeaturesSkipped] = useState(false);\n\tconst [showMinorUpdates, setShowMinorUpdates] = useState(false);\n\tconst [isVideoModalOpen, setIsVideoModalOpen] = useState(false);\n\tconst [videoUrl, setVideoUrl] = useState('');\n\tconst [blockPopups, setBlockPopups] = useState(false);\n\tconst [isClosingMajor, setIsClosingMajor] = useState(false);\n\tconst [isClosingMinor, setIsClosingMinor] = useState(false);\n\tconst [majorJoyrideKey, setMajorJoyrideKey] = useState(0);\n\tconst [minorJoyrideKey, setMinorJoyrideKey] = useState(0);\n\tconst [shownMinorFeatureIds, setShownMinorFeatureIds] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\t// Add custom style for spotlight cutout effect\n\tuseEffect(() => {\n\t\tconst styleId = 'minor-spotlight-cutout-style';\n\t\tlet styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n\t\tif (!styleElement) {\n\t\t\tstyleElement = document.createElement('style');\n\t\t\tstyleElement.id = styleId;\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\n\t\tstyleElement.textContent = `\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t`;\n\n\t\treturn () => {\n\t\t\tconst el = document.getElementById(styleId);\n\t\t\tif (el) {\n\t\t\t\tel.remove();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// Force Joyride remount on navigation to prevent stale state\n\tuseEffect(() => {\n\t\tsetMajorJoyrideKey((prev) => prev + 1);\n\t\tsetMinorJoyrideKey((prev) => prev + 1);\n\t\tsetIsClosingMajor(false);\n\t\tsetIsClosingMinor(false);\n\t\t// Reset session tracking on navigation to allow features to show on new pages\n\t\tsetShownMinorFeatureIds(new Set());\n\t}, [router?.pathname]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tmajorUpdateFeatures.length > 0 &&\n\t\t\t!currentMajorFeature &&\n\t\t\t!isLoading &&\n\t\t\t!isProcessingMajorUpdate &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tsetShowMinorUpdates(false);\n\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\tsetRunJoyride(false);\n\t\t\tsetJoyrideSteps([]);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetAvailableMinorFeatures([]);\n\n\t\t\tlet attempts = 0;\n\t\t\tconst MAX_ATTEMPTS = 10;\n\n\t\t\tconst checkWhatsNewButton = () => {\n\t\t\t\tattempts++;\n\t\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t\t);\n\n\t\t\t\tif (whatsNewButton) {\n\t\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t\t} else if (attempts < MAX_ATTEMPTS) {\n\t\t\t\t\tsetTimeout(checkWhatsNewButton, 1000);\n\t\t\t\t} else {\n\t\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcheckWhatsNewButton();\n\t\t} else if (majorUpdateFeatures.length === 0 && !isLoading) {\n\t\t\tsetShowMinorUpdates(true);\n\t\t}\n\t}, [\n\t\tmajorUpdateFeatures,\n\t\tcurrentMajorFeature,\n\t\tisLoading,\n\t\tisProcessingMajorUpdate,\n\t\tblockPopups,\n\t]);\n\n\tuseEffect(() => {\n\t\t// Only run this special logic if a feature is being forced via URL\n\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\n\t\tif (!featureIdFromQuery || isLoading || minorUpdateFeatures.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst forcedFeature = minorUpdateFeatures.find(\n\t\t\t(f) => f.id === featureIdFromQuery,\n\t\t);\n\n\t\tif (!forcedFeature || !forcedFeature.featureTag) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent the standard flow from interfering\n\t\tsetMinorFeaturesSkipped(true);\n\t\t// Mark that we're processing to prevent other effects from interfering\n\t\tsetIsProcessingMinorUpdate(true);\n\n\t\tlet attempts = 0;\n\t\tconst maxAttempts = 25; // 5 seconds\n\t\tconst interval = setInterval(() => {\n\t\t\tattempts++;\n\t\t\tconst targetSelector =\n\t\t\t\tforcedFeature.featureTag.startsWith('#') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('.') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('[')\n\t\t\t\t\t? forcedFeature.featureTag\n\t\t\t\t\t: `#${forcedFeature.featureTag}`;\n\n\t\t\tconst element = document.querySelector(targetSelector);\n\n\t\t\tif (element) {\n\t\t\t\t// In test mode, pass the feature array directly to avoid async state issues\n\t\t\t\tconst testModeFeatures = [forcedFeature];\n\t\t\t\tsetAvailableMinorFeatures(testModeFeatures);\n\t\t\t\tshowMinorUpdateJoyride(forcedFeature, testModeFeatures);\n\t\t\t\t// Don't reset processing flag here - let user interaction handle it\n\t\t\t\t// This prevents auto-closing when multiple popups exist or when scrolling\n\t\t\t\tclearInterval(interval);\n\t\t\t} else if (attempts >= maxAttempts) {\n\t\t\t\t// Fallback for safety, though user expects it to be there.\n\t\t\t\t// We could log an error here.\n\t\t\t\t// Only reset on timeout (element not found)\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\tclearInterval(interval);\n\t\t\t}\n\t\t}, 200);\n\n\t\treturn () => {\n\t\t\tclearInterval(interval);\n\t\t\t// Don't reset processing flag on cleanup - it causes premature popup closure\n\t\t\t// The flag will be managed by user interactions (skip/explore handlers)\n\t\t};\n\t}, [minorUpdateFeatures, router?.query?.['featureId'], isLoading]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tminorUpdateFeatures.length > 0 &&\n\t\t\t!isLoading &&\n\t\t\t!runJoyride &&\n\t\t\t!isProcessingMinorUpdate &&\n\t\t\t!currentMinorFeature &&\n\t\t\t!minorFeaturesSkipped &&\n\t\t\tshowMinorUpdates &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tlet observer: MutationObserver | null = null;\n\t\t\tlet scrollListener: (() => void) | null = null;\n\t\t\tlet checkTimeout: ReturnType<typeof setTimeout> | null = null;\n\t\t\tlet isCleanedUp = false;\n\n\t\t\tconst checkElementsAndStartTour = () => {\n\t\t\t\tif (\n\t\t\t\t\tisCleanedUp ||\n\t\t\t\t\tisProcessingMinorUpdate ||\n\t\t\t\t\tcurrentMinorFeature ||\n\t\t\t\t\tminorFeaturesSkipped ||\n\t\t\t\t\t!showMinorUpdates\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tconst availableFeatures = minorUpdateFeatures.filter((feature) => {\n\t\t\t\t\tif (!feature.featureTag || feature.featureTag.trim() === '') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip features already shown in this session\n\t\t\t\t\tif (shownMinorFeatureIds.has(feature.id)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst targetSelector =\n\t\t\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t\t\t\tconst element = document.querySelector(targetSelector);\n\t\t\t\t\treturn element !== null;\n\t\t\t\t});\n\n\t\t\t\tif (availableFeatures.length > 0) {\n\t\t\t\t\tsetAvailableMinorFeatures(availableFeatures);\n\t\t\t\t\t// Pass features directly to avoid async state issues\n\t\t\t\t\tshowMinorUpdateJoyride(availableFeatures[0], availableFeatures);\n\n\t\t\t\t\tif (observer) {\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\tobserver = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (scrollListener) {\n\t\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t\t\tscrollListener = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t\tcheckTimeout = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tobserver = new MutationObserver((mutations) => {\n\t\t\t\tlet shouldCheck = false;\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < mutation.addedNodes.length; i++) {\n\t\t\t\t\t\t\tconst node = mutation.addedNodes[i];\n\t\t\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tconst element = node as Element;\n\t\t\t\t\t\t\t\tif (element.id || element.querySelector('[id]')) {\n\t\t\t\t\t\t\t\t\tshouldCheck = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\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\tif (shouldCheck) break;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates &&\n\t\t\t\t\tshouldCheck\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 200);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tscrollListener = () => {\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\t// Use RAF for smoother performance synced with browser paint\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (observer) {\n\t\t\t\tobserver.observe(document.body, {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (scrollListener) {\n\t\t\t\twindow.addEventListener('scroll', scrollListener, { passive: true });\n\t\t\t}\n\n\t\t\tcheckElementsAndStartTour();\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 100);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 1000);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 500);\n\n\t\t\treturn () => {\n\t\t\t\tisCleanedUp = true;\n\t\t\t\tif (observer) {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t\tif (scrollListener) {\n\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t}\n\t\t\t\tif (checkTimeout) {\n\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (minorUpdateFeatures.length === 0 || isLoading) {\n\t\t\t// Don't clear joyride if we're in test mode with an active feature\n\t\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\t\t\tconst isTestModeWithActiveFeature =\n\t\t\t\tfeatureIdFromQuery && currentMinorFeature;\n\n\t\t\tif (!isTestModeWithActiveFeature) {\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetAvailableMinorFeatures([]);\n\t\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\trunJoyride,\n\t\tisProcessingMinorUpdate,\n\t\tcurrentMinorFeature,\n\t\tminorFeaturesSkipped,\n\t\tshowMinorUpdates,\n\t\tmarkFeatureAsViewed,\n\t\tblockPopups,\n\t]);\n\n\tconst showMajorUpdateJoyride = (feature) => {\n\t\tsetCurrentMajorFeature(feature);\n\n\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t(f) => f.id === feature.id,\n\t\t);\n\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\tconst majorSteps = [\n\t\t\t{\n\t\t\t\ttarget: SELECTORS.WHATS_NEW_BUTTON,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(feature)}\n\t\t\t\t\t\tonExplore={() => handleExploreFeature(feature)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMajor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\n\t\tsetMajorJoyrideSteps(majorSteps);\n\t\tsetRunMajorJoyride(true);\n\n\t\t// Fire announcement shown callback\n\t\tif (onAnnouncementShown && storeId) {\n\t\t\tonAnnouncementShown({\n\t\t\t\tstoreId,\n\t\t\t\tannouncementId: feature.id,\n\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleSkipMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t});\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t// Fire announcement interacted callback for Skip\n\t\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\t\tstoreId,\n\t\t\t\t\t\tannouncementId: targetFeature.id,\n\t\t\t\t\t\tannouncementTitle: targetFeature.title,\n\t\t\t\t\t\timageUrl: targetFeature.displayImage || targetFeature.image,\n\t\t\t\t\t\tvideoUrl: targetFeature.productVideo,\n\t\t\t\t\t\tbuttonClicked: 'Skip',\n\t\t\t\t\t\tbuttonName: 'Skip',\n\t\t\t\t\t\tbuttonUrl: undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleExploreFeature = useCallback(\n\t\t(feature) => {\n\t\t\tsetIsProcessingMajorUpdate(true);\n\t\t\tmarkFeatureAsViewed(feature.id);\n\t\t\tif (feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\t\t\tsetRunMajorJoyride(false);\n\t\t\tsetCurrentMajorFeature(null);\n\t\t\tsetMajorJoyrideSteps([]);\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === feature.id,\n\t\t\t);\n\t\t\tconst isLastMajorUpdate = currentIndex === majorUpdateFeatures.length - 1;\n\t\t\tif (isLastMajorUpdate) {\n\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t}\n\n\t\t\t// Fire announcement interacted callback for Primary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Primary',\n\t\t\t\t\tbuttonName: feature.buttonText || 'Explore',\n\t\t\t\t\tbuttonUrl: feature.redirectUrl || feature.productVideo,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t}, 500);\n\t\t},\n\t\t[majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handlePreviousMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = majorUpdateFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMajorFeature(prevFeature);\n\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreFeature(prevFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures],\n\t);\n\n\tconst handleNextMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < majorUpdateFeatures.length - 1) {\n\t\t\t\tconst nextFeature = majorUpdateFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMajorFeature(nextFeature);\n\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreFeature(nextFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst showMajorUpdatePopup = () => {\n\t\tif (majorUpdateFeatures.length > 0 && !currentMajorFeature) {\n\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t);\n\n\t\t\tif (whatsNewButton) {\n\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t}\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\t(window as any).showMajorUpdatePopup = showMajorUpdatePopup;\n\t\treturn () => {\n\t\t\tdelete (window as any).showMajorUpdatePopup;\n\t\t};\n\t}, [majorUpdateFeatures, currentMajorFeature]);\n\tconst handleMajorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMajorFeature) {\n\t\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t\t});\n\n\t\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleMinorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMinorFeature) {\n\t\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\t\tmarkFeatureAsViewed(currentMinorFeature.id);\n\n\t\t\t\t\t// Check if there are more features to show\n\t\t\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t\t\t(f) => f.id === currentMinorFeature.id,\n\t\t\t\t\t);\n\t\t\t\t\tconst isLastFeature =\n\t\t\t\t\t\tcurrentIndex === availableMinorFeatures.length - 1;\n\n\t\t\t\t\tif (isLastFeature) {\n\t\t\t\t\t\t// Only skip remaining features if this was the last one\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\tconst showMinorUpdateJoyride = async (feature, featuresToUse?) => {\n\t\tsetCurrentMinorFeature(feature);\n\n\t\t// Use provided features array or fall back to state (for test mode)\n\t\tconst features = featuresToUse || availableMinorFeatures;\n\t\tconst currentIndex = features.findIndex((f) => f.id === feature.id);\n\t\tconst totalFeatures = features.length;\n\n\t\tconst targetSelector =\n\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t? feature.featureTag\n\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t// Scroll to target element smoothly before showing popup\n\t\tconst targetElement = document.querySelector(targetSelector);\n\t\tif (targetElement) {\n\t\t\ttry {\n\t\t\t\t// Dynamically import to avoid circular dependencies\n\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t);\n\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t} catch (error) {\n\t\t\t\t// Scroll failed silently\n\t\t\t}\n\t\t}\n\n\t\tconst minorSteps = [\n\t\t\t{\n\t\t\t\ttarget: targetSelector,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(feature)}\n\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(feature)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMinor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t\tsetJoyrideSteps(minorSteps);\n\t\tsetRunJoyride(true);\n\t};\n\n\tconst handleSkipMinorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\n\t\t\t\t// Add to session tracker to prevent re-showing\n\t\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(targetFeature.id));\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\t// Find next unshown feature\n\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t(f) => f.id !== targetFeature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t\t);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tcurrentMinorFeature,\n\t\t\tavailableMinorFeatures,\n\t\t\tmarkFeatureAsViewed,\n\t\t\tshownMinorFeatureIds,\n\t\t],\n\t);\n\n\tconst handleExploreMinorFeature = useCallback(\n\t\t(feature) => {\n\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t// Only mark the current feature as viewed\n\t\t\tmarkFeatureAsViewed(feature.id);\n\n\t\t\t// Add to session tracker to prevent re-showing\n\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(feature.id));\n\n\t\t\tif (feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tsetRunJoyride(false);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetJoyrideSteps([]);\n\n\t\t\t// Find next unshown feature (only auto-advance if no video modal)\n\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t(f) => f.id !== feature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t// Only auto-advance if no video modal is opened\n\t\t\t\tif (nextFeature && !feature.productVideo) {\n\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t} else if (!nextFeature) {\n\t\t\t\t\t// No more features to show\n\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t}\n\t\t\t\t// If video modal opened, wait for user to close it before advancing\n\t\t\t}, 500);\n\t\t},\n\t\t[availableMinorFeatures, markFeatureAsViewed, shownMinorFeatureIds],\n\t);\n\n\tconst handlePreviousMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = availableMinorFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMinorFeature(prevFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tprevFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? prevFeature.featureTag\n\t\t\t\t\t\t: `#${prevFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the previous feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(prevFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures],\n\t);\n\n\tconst handleNextMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < availableMinorFeatures.length - 1) {\n\t\t\t\tconst nextFeature = availableMinorFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMinorFeature(nextFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tnextFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? nextFeature.featureTag\n\t\t\t\t\t\t: `#${nextFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the next feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(nextFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\t\t\t\tsetMinorFeaturesSkipped(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{children}\n\n\t\t\t{majorJoyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`major-joyride-${majorJoyrideKey}`}\n\t\t\t\t\tsteps={majorJoyrideSteps}\n\t\t\t\t\trun={runMajorJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMajorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tspotlightClicks={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMajor ? 'transparent' : '#212121',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{joyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`minor-joyride-${minorJoyrideKey}`}\n\t\t\t\t\tsteps={joyrideSteps}\n\t\t\t\t\trun={runJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMinorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tscrollToFirstStep={true}\n\t\t\t\t\tscrollOffset={120}\n\t\t\t\t\tdisableScrolling={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMinor ? 'transparent' : '#ffffff',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\tboxShadow: isClosingMinor\n\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t: '0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t<VideoModal\n\t\t\t\tisOpen={isVideoModalOpen}\n\t\t\t\tvideoUrl={videoUrl}\n\t\t\t\tonClose={() => {\n\t\t\t\t\tsetIsVideoModalOpen(false);\n\t\t\t\t\tsetVideoUrl('');\n\t\t\t\t\tsetBlockPopups(false);\n\n\t\t\t\t\t// After video modal closes, check if there are more features to show\n\t\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t\t(f) => !shownMinorFeatureIds.has(f.id),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature after video\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t);\n\n};\n\nexport default FeatureAnnouncementProvider;\n"],"names":["_ref","children","fetchVisibleFeatures","getStoreFeatureProgress","fetchFeatureById","markFeatureAsViewedForStore","isFeatureApplicableToCurrentPage","module","router","storeId","onAnnouncementShown","onAnnouncementInteracted","majorUpdateFeatures","minorUpdateFeatures","isLoading","markFeatureAsViewed","useFeatureAnnouncements","currentMajorFeature","setCurrentMajorFeature","useState","currentMinorFeature","setCurrentMinorFeature","runJoyride","setRunJoyride","joyrideSteps","setJoyrideSteps","runMajorJoyride","setRunMajorJoyride","majorJoyrideSteps","setMajorJoyrideSteps","isProcessingMajorUpdate","setIsProcessingMajorUpdate","isProcessingMinorUpdate","setIsProcessingMinorUpdate","availableMinorFeatures","setAvailableMinorFeatures","minorFeaturesSkipped","setMinorFeaturesSkipped","showMinorUpdates","setShowMinorUpdates","isVideoModalOpen","setIsVideoModalOpen","videoUrl","setVideoUrl","blockPopups","setBlockPopups","isClosingMajor","setIsClosingMajor","isClosingMinor","setIsClosingMinor","majorJoyrideKey","setMajorJoyrideKey","minorJoyrideKey","setMinorJoyrideKey","shownMinorFeatureIds","setShownMinorFeatureIds","Set","useEffect","styleId","styleElement","document","getElementById","createElement","id","head","appendChild","textContent","el","remove","prev","pathname","length","attempts","MAX_ATTEMPTS","checkWhatsNewButton","querySelector","showMajorUpdateJoyride","setTimeout","featureIdFromQuery","_a","query","forcedFeature","find","f","featureTag","interval","setInterval","targetSelector","startsWith","testModeFeatures","showMinorUpdateJoyride","clearInterval","observer","scrollListener","checkTimeout","isCleanedUp","checkElementsAndStartTour","availableFeatures","filter","feature","trim","has","disconnect","window","removeEventListener","clearTimeout","MutationObserver","mutations","shouldCheck","mutation","type","addedNodes","i","node","nodeType","Node","ELEMENT_NODE","element","requestAnimationFrame","observe","body","childList","subtree","addEventListener","passive","currentIndex","findIndex","totalFeatures","majorSteps","target","SELECTORS","WHATS_NEW_BUTTON","content","_jsx","jsx","MajorUpdatePopup","onSkip","handleSkipMajorUpdate","onExplore","handleExploreFeature","onPrevious","handlePreviousMajorUpdate","onNext","handleNextMajorUpdate","setIsClosing","placement","placementBeacon","disableBeacon","hideCloseButton","hideSkipButton","hideFooter","offset","data","isMajor","styles","tooltip","padding","backgroundColor","borderRadius","border","boxShadow","tooltipContent","buttonNext","display","buttonBack","buttonClose","buttonSkip","announcementId","announcementTitle","title","imageUrl","displayImage","image","productVideo","useCallback","targetFeature","forEach","majorFeature","buttonClicked","buttonName","buttonUrl","undefined","buttonText","redirectUrl","prevFeature","prevIndex","updatedSteps","nextFeature","nextIndex","showMajorUpdatePopup","handleMajorJoyrideCallback","action","ACTIONS","CLOSE","handleMinorJoyrideCallback","featuresToUse","__awaiter","features","targetElement","scrollToElementSmooth","Promise","resolve","then","require","error","minorSteps","MinorUpdatePopup","handleSkipMinorUpdate","handleExploreMinorFeature","handlePreviousMinorUpdate","handleNextMinorUpdate","isMinor","add","_jsxs","_Fragment","Joyride","steps","run","continuous","showProgress","showSkipButton","callback","disableOverlayClose","disableCloseOnEsc","disableOverlay","spotlightClicks","options","primaryColor","zIndex","width","arrowColor","overlay","spotlight","fontSize","locale","back","close","last","next","skip","scrollToFirstStep","scrollOffset","disableScrolling","VideoModal","isOpen","onClose"],"mappings":"ggBAWIA,IAYC,IAZAC,SACJA,EAAQC,qBACRA,EAAoBC,wBACpBA,EAAuBC,iBACvBA,EAAgBC,4BAChBA,EAA2BC,iCAC3BA,EAAgCC,OAChCA,EAAMC,OACNA,EAAMC,QACNA,EAAOC,oBACPA,EAAmBC,yBACnBA,GACAX,QACA,MAAMY,oBACLA,EAAmBC,oBACnBA,EAAmBC,UACnBA,EAASC,oBACTA,GACGC,0BAAwB,CAC3Bd,uBACAC,0BACAC,mBACAC,8BACAC,mCACAC,SACAC,YAGMS,EAAqBC,GAC3BC,EAAQA,SAA6B,OAC/BC,EAAqBC,GAC3BF,EAAQA,SAA6B,O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,gBAAiB,cACjBE,OAAQ,OACR7D,OAAQ,OACR8D,UAAW,QAEZC,eAAgB,CACfL,QAAS,GAEVM,WAAY,CACXC,QAAS,QAEVC,WAAY,CACXD,QAAS,QAEVG,WAAY,CACXH,QAAS,QAEVE,YAAa,CACZF,QAAS,SAGXuE,OAAQ,CACPC,KAAM,OACNC,MAAO,QACPC,KAAM,QACNC,KAAM,OACNC,KAAM,SA5DF,iBAAiB3L,MAiExBiF,EAAAA,IAAC8G,EAAAA,WACA,CAAAC,OAAQ5M,EACRE,SAAUA,EACV2M,QAASA,KACR5M,GAAoB,GACpBE,EAAY,IACZE,IAAe,GAGf,MAAM8I,EAAczJ,EAAuBgD,MACzCC,IAAO7B,GAAqB+C,IAAIlB,EAAEpB,MAGhC4H,EAEH9G,YAAW,KACVa,GAAuBiG,EAAazJ,EAAuB,GACzD,KAGHG,GAAwB,EACxB,MAGD"}
|
|
1
|
+
{"version":3,"file":"FeatureAnnouncementProvider.js","sources":["../../../../src/components/feature-announcements/FeatureAnnouncementProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport Joyride, { ACTIONS } from 'react-joyride';\nimport { SELECTORS } from './constants';\nimport { useFeatureAnnouncements } from './hooks';\nimport MajorUpdatePopup from './MajorUpdatePopup';\nimport MinorUpdatePopup from './MinorUpdatePopup';\nimport { FeatureAnnouncement, FeatureAnnouncementProviderProps } from './types';\nimport { VideoModal } from './VideoModal';\n\nconst FeatureAnnouncementProvider: React.FC<\n\tFeatureAnnouncementProviderProps\n> = ({\n\tchildren,\n\tfetchVisibleFeatures,\n\tgetStoreFeatureProgress,\n\tfetchFeatureById,\n\tmarkFeatureAsViewedForStore,\n\tisFeatureApplicableToCurrentPage,\n\tmodule,\n\trouter,\n\tstoreId,\n\tonAnnouncementShown,\n\tonAnnouncementInteracted,\n}) => {\n\tconst {\n\t\tmajorUpdateFeatures,\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\tmarkFeatureAsViewed,\n\t} = useFeatureAnnouncements({\n\t\tfetchVisibleFeatures,\n\t\tgetStoreFeatureProgress,\n\t\tfetchFeatureById,\n\t\tmarkFeatureAsViewedForStore,\n\t\tisFeatureApplicableToCurrentPage,\n\t\tmodule,\n\t\trouter,\n\t});\n\n\tconst [currentMajorFeature, setCurrentMajorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [currentMinorFeature, setCurrentMinorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [runJoyride, setRunJoyride] = useState(false);\n\tconst [joyrideSteps, setJoyrideSteps] = useState<any[]>([]);\n\tconst [runMajorJoyride, setRunMajorJoyride] = useState(false);\n\tconst [majorJoyrideSteps, setMajorJoyrideSteps] = useState<any[]>([]);\n\tconst [isProcessingMajorUpdate, setIsProcessingMajorUpdate] = useState(false);\n\tconst [isProcessingMinorUpdate, setIsProcessingMinorUpdate] = useState(false);\n\tconst [availableMinorFeatures, setAvailableMinorFeatures] = useState<\n\t\tFeatureAnnouncement[]\n\t>([]);\n\tconst [minorFeaturesSkipped, setMinorFeaturesSkipped] = useState(false);\n\tconst [showMinorUpdates, setShowMinorUpdates] = useState(false);\n\tconst [isVideoModalOpen, setIsVideoModalOpen] = useState(false);\n\tconst [videoUrl, setVideoUrl] = useState('');\n\tconst [blockPopups, setBlockPopups] = useState(false);\n\tconst [isClosingMajor, setIsClosingMajor] = useState(false);\n\tconst [isClosingMinor, setIsClosingMinor] = useState(false);\n\tconst [majorJoyrideKey, setMajorJoyrideKey] = useState(0);\n\tconst [minorJoyrideKey, setMinorJoyrideKey] = useState(0);\n\tconst [shownMinorFeatureIds, setShownMinorFeatureIds] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\t// Add custom style for spotlight cutout effect\n\tuseEffect(() => {\n\t\tconst styleId = 'minor-spotlight-cutout-style';\n\t\tlet styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n\t\tif (!styleElement) {\n\t\t\tstyleElement = document.createElement('style');\n\t\t\tstyleElement.id = styleId;\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\n\t\tstyleElement.textContent = `\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t`;\n\n\t\treturn () => {\n\t\t\tconst el = document.getElementById(styleId);\n\t\t\tif (el) {\n\t\t\t\tel.remove();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// Force Joyride remount on navigation to prevent stale state\n\tuseEffect(() => {\n\t\tsetMajorJoyrideKey((prev) => prev + 1);\n\t\tsetMinorJoyrideKey((prev) => prev + 1);\n\t\tsetIsClosingMajor(false);\n\t\tsetIsClosingMinor(false);\n\t\t// Reset session tracking on navigation to allow features to show on new pages\n\t\tsetShownMinorFeatureIds(new Set());\n\t}, [router?.pathname]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tmajorUpdateFeatures.length > 0 &&\n\t\t\t!currentMajorFeature &&\n\t\t\t!isLoading &&\n\t\t\t!isProcessingMajorUpdate &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tsetShowMinorUpdates(false);\n\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\tsetRunJoyride(false);\n\t\t\tsetJoyrideSteps([]);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetAvailableMinorFeatures([]);\n\n\t\t\tlet attempts = 0;\n\t\t\tconst MAX_ATTEMPTS = 10;\n\n\t\t\tconst checkWhatsNewButton = () => {\n\t\t\t\tattempts++;\n\t\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t\t);\n\n\t\t\t\tif (whatsNewButton) {\n\t\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t\t} else if (attempts < MAX_ATTEMPTS) {\n\t\t\t\t\tsetTimeout(checkWhatsNewButton, 1000);\n\t\t\t\t} else {\n\t\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcheckWhatsNewButton();\n\t\t} else if (majorUpdateFeatures.length === 0 && !isLoading) {\n\t\t\tsetShowMinorUpdates(true);\n\t\t}\n\t}, [\n\t\tmajorUpdateFeatures,\n\t\tcurrentMajorFeature,\n\t\tisLoading,\n\t\tisProcessingMajorUpdate,\n\t\tblockPopups,\n\t]);\n\n\tuseEffect(() => {\n\t\t// Only run this special logic if a feature is being forced via URL\n\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\n\t\tif (!featureIdFromQuery || isLoading || minorUpdateFeatures.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst forcedFeature = minorUpdateFeatures.find(\n\t\t\t(f) => f.id === featureIdFromQuery,\n\t\t);\n\n\t\tif (!forcedFeature || !forcedFeature.featureTag) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent the standard flow from interfering\n\t\tsetMinorFeaturesSkipped(true);\n\t\t// Mark that we're processing to prevent other effects from interfering\n\t\tsetIsProcessingMinorUpdate(true);\n\n\t\tlet attempts = 0;\n\t\tconst maxAttempts = 25; // 5 seconds\n\t\tconst interval = setInterval(() => {\n\t\t\tattempts++;\n\t\t\tconst targetSelector =\n\t\t\t\tforcedFeature.featureTag.startsWith('#') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('.') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('[')\n\t\t\t\t\t? forcedFeature.featureTag\n\t\t\t\t\t: `#${forcedFeature.featureTag}`;\n\n\t\t\tconst element = document.querySelector(targetSelector);\n\n\t\t\tif (element) {\n\t\t\t\t// In test mode, pass the feature array directly to avoid async state issues\n\t\t\t\tconst testModeFeatures = [forcedFeature];\n\t\t\t\tsetAvailableMinorFeatures(testModeFeatures);\n\t\t\t\tshowMinorUpdateJoyride(forcedFeature, testModeFeatures);\n\t\t\t\t// Don't reset processing flag here - let user interaction handle it\n\t\t\t\t// This prevents auto-closing when multiple popups exist or when scrolling\n\t\t\t\tclearInterval(interval);\n\t\t\t} else if (attempts >= maxAttempts) {\n\t\t\t\t// Fallback for safety, though user expects it to be there.\n\t\t\t\t// We could log an error here.\n\t\t\t\t// Only reset on timeout (element not found)\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\tclearInterval(interval);\n\t\t\t}\n\t\t}, 200);\n\n\t\treturn () => {\n\t\t\tclearInterval(interval);\n\t\t\t// Don't reset processing flag on cleanup - it causes premature popup closure\n\t\t\t// The flag will be managed by user interactions (skip/explore handlers)\n\t\t};\n\t}, [minorUpdateFeatures, router?.query?.['featureId'], isLoading]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tminorUpdateFeatures.length > 0 &&\n\t\t\t!isLoading &&\n\t\t\t!runJoyride &&\n\t\t\t!isProcessingMinorUpdate &&\n\t\t\t!currentMinorFeature &&\n\t\t\t!minorFeaturesSkipped &&\n\t\t\tshowMinorUpdates &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tlet observer: MutationObserver | null = null;\n\t\t\tlet scrollListener: (() => void) | null = null;\n\t\t\tlet checkTimeout: ReturnType<typeof setTimeout> | null = null;\n\t\t\tlet isCleanedUp = false;\n\n\t\t\tconst checkElementsAndStartTour = () => {\n\t\t\t\tif (\n\t\t\t\t\tisCleanedUp ||\n\t\t\t\t\tisProcessingMinorUpdate ||\n\t\t\t\t\tcurrentMinorFeature ||\n\t\t\t\t\tminorFeaturesSkipped ||\n\t\t\t\t\t!showMinorUpdates\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tconst availableFeatures = minorUpdateFeatures.filter((feature) => {\n\t\t\t\t\tif (!feature.featureTag || feature.featureTag.trim() === '') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip features already shown in this session\n\t\t\t\t\tif (shownMinorFeatureIds.has(feature.id)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst targetSelector =\n\t\t\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t\t\t\tconst element = document.querySelector(targetSelector);\n\t\t\t\t\treturn element !== null;\n\t\t\t\t});\n\n\t\t\t\tif (availableFeatures.length > 0) {\n\t\t\t\t\tsetAvailableMinorFeatures(availableFeatures);\n\t\t\t\t\t// Pass features directly to avoid async state issues\n\t\t\t\t\tshowMinorUpdateJoyride(availableFeatures[0], availableFeatures);\n\n\t\t\t\t\tif (observer) {\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\tobserver = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (scrollListener) {\n\t\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t\t\tscrollListener = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t\tcheckTimeout = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tobserver = new MutationObserver((mutations) => {\n\t\t\t\tlet shouldCheck = false;\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < mutation.addedNodes.length; i++) {\n\t\t\t\t\t\t\tconst node = mutation.addedNodes[i];\n\t\t\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tconst element = node as Element;\n\t\t\t\t\t\t\t\tif (element.id || element.querySelector('[id]')) {\n\t\t\t\t\t\t\t\t\tshouldCheck = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\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\tif (shouldCheck) break;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates &&\n\t\t\t\t\tshouldCheck\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 200);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tscrollListener = () => {\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\t// Use RAF for smoother performance synced with browser paint\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (observer) {\n\t\t\t\tobserver.observe(document.body, {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (scrollListener) {\n\t\t\t\twindow.addEventListener('scroll', scrollListener, { passive: true });\n\t\t\t}\n\n\t\t\tcheckElementsAndStartTour();\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 100);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 1000);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 500);\n\n\t\t\treturn () => {\n\t\t\t\tisCleanedUp = true;\n\t\t\t\tif (observer) {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t\tif (scrollListener) {\n\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t}\n\t\t\t\tif (checkTimeout) {\n\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (minorUpdateFeatures.length === 0 || isLoading) {\n\t\t\t// Don't clear joyride if we're in test mode with an active feature\n\t\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\t\t\tconst isTestModeWithActiveFeature =\n\t\t\t\tfeatureIdFromQuery && currentMinorFeature;\n\n\t\t\tif (!isTestModeWithActiveFeature) {\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetAvailableMinorFeatures([]);\n\t\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\trunJoyride,\n\t\tisProcessingMinorUpdate,\n\t\tcurrentMinorFeature,\n\t\tminorFeaturesSkipped,\n\t\tshowMinorUpdates,\n\t\tmarkFeatureAsViewed,\n\t\tblockPopups,\n\t]);\n\n\tconst showMajorUpdateJoyride = (feature) => {\n\t\tsetCurrentMajorFeature(feature);\n\n\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t(f) => f.id === feature.id,\n\t\t);\n\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\tconst majorSteps = [\n\t\t\t{\n\t\t\t\ttarget: SELECTORS.WHATS_NEW_BUTTON,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(feature)}\n\t\t\t\t\t\tonExplore={() => handleExploreFeature(feature)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMajor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\n\t\tsetMajorJoyrideSteps(majorSteps);\n\t\tsetRunMajorJoyride(true);\n\n\t\t// Fire announcement shown callback\n\t\tif (onAnnouncementShown && storeId) {\n\t\t\tonAnnouncementShown({\n\t\t\t\tstoreId,\n\t\t\t\tannouncementId: feature.id,\n\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleSkipMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t});\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t// Fire announcement interacted callback for Skip\n\t\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\t\tstoreId,\n\t\t\t\t\t\tannouncementId: targetFeature.id,\n\t\t\t\t\t\tannouncementTitle: targetFeature.title,\n\t\t\t\t\t\timageUrl: targetFeature.displayImage || targetFeature.image,\n\t\t\t\t\t\tvideoUrl: targetFeature.productVideo,\n\t\t\t\t\t\tbuttonClicked: 'Skip',\n\t\t\t\t\t\tbuttonName: 'Skip',\n\t\t\t\t\t\tbuttonUrl: undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleExploreFeature = useCallback(\n\t\t(feature) => {\n\t\t\tsetIsProcessingMajorUpdate(true);\n\t\t\tmarkFeatureAsViewed(feature.id);\n\t\t\tif (feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\t\t\tsetRunMajorJoyride(false);\n\t\t\tsetCurrentMajorFeature(null);\n\t\t\tsetMajorJoyrideSteps([]);\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === feature.id,\n\t\t\t);\n\t\t\tconst isLastMajorUpdate = currentIndex === majorUpdateFeatures.length - 1;\n\t\t\tif (isLastMajorUpdate) {\n\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t}\n\n\t\t\t// Fire announcement interacted callback for Primary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Primary',\n\t\t\t\t\tbuttonName: feature.buttonText || 'Explore',\n\t\t\t\t\tbuttonUrl: feature.redirectUrl || feature.productVideo,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t}, 500);\n\t\t},\n\t\t[majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handlePreviousMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = majorUpdateFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMajorFeature(prevFeature);\n\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreFeature(prevFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures],\n\t);\n\n\tconst handleNextMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < majorUpdateFeatures.length - 1) {\n\t\t\t\tconst nextFeature = majorUpdateFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMajorFeature(nextFeature);\n\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreFeature(nextFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst showMajorUpdatePopup = () => {\n\t\tif (majorUpdateFeatures.length > 0 && !currentMajorFeature) {\n\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t);\n\n\t\t\tif (whatsNewButton) {\n\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t}\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\t(window as any).showMajorUpdatePopup = showMajorUpdatePopup;\n\t\treturn () => {\n\t\t\tdelete (window as any).showMajorUpdatePopup;\n\t\t};\n\t}, [majorUpdateFeatures, currentMajorFeature]);\n\tconst handleMajorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMajorFeature) {\n\t\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t\t});\n\n\t\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleMinorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMinorFeature) {\n\t\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\t\tmarkFeatureAsViewed(currentMinorFeature.id);\n\n\t\t\t\t\t// Check if there are more features to show\n\t\t\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t\t\t(f) => f.id === currentMinorFeature.id,\n\t\t\t\t\t);\n\t\t\t\t\tconst isLastFeature =\n\t\t\t\t\t\tcurrentIndex === availableMinorFeatures.length - 1;\n\n\t\t\t\t\tif (isLastFeature) {\n\t\t\t\t\t\t// Only skip remaining features if this was the last one\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\tconst showMinorUpdateJoyride = async (feature, featuresToUse?) => {\n\t\tsetCurrentMinorFeature(feature);\n\n\t\t// Use provided features array or fall back to state (for test mode)\n\t\tconst features = featuresToUse || availableMinorFeatures;\n\t\tconst currentIndex = features.findIndex((f) => f.id === feature.id);\n\t\tconst totalFeatures = features.length;\n\n\t\tconst targetSelector =\n\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t? feature.featureTag\n\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t// Scroll to target element smoothly before showing popup\n\t\tconst targetElement = document.querySelector(targetSelector);\n\t\tif (targetElement) {\n\t\t\ttry {\n\t\t\t\t// Dynamically import to avoid circular dependencies\n\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t);\n\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t} catch (error) {\n\t\t\t\t// Scroll failed silently\n\t\t\t}\n\t\t}\n\n\t\tconst minorSteps = [\n\t\t\t{\n\t\t\t\ttarget: targetSelector,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(feature)}\n\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(feature)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMinor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t\tsetJoyrideSteps(minorSteps);\n\t\tsetRunJoyride(true);\n\t};\n\n\tconst handleSkipMinorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\n\t\t\t\t// Add to session tracker to prevent re-showing\n\t\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(targetFeature.id));\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\t// Find next unshown feature\n\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t(f) => f.id !== targetFeature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t\t);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tcurrentMinorFeature,\n\t\t\tavailableMinorFeatures,\n\t\t\tmarkFeatureAsViewed,\n\t\t\tshownMinorFeatureIds,\n\t\t],\n\t);\n\n\tconst handleExploreMinorFeature = useCallback(\n\t\t(feature) => {\n\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t// Only mark the current feature as viewed\n\t\t\tmarkFeatureAsViewed(feature.id);\n\n\t\t\t// Add to session tracker to prevent re-showing\n\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(feature.id));\n\n\t\t\tif (feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tsetRunJoyride(false);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetJoyrideSteps([]);\n\n\t\t\t// Find next unshown feature (only auto-advance if no video modal)\n\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t(f) => f.id !== feature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t// Only auto-advance if no video modal is opened\n\t\t\t\tif (nextFeature && !feature.productVideo) {\n\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t} else if (!nextFeature) {\n\t\t\t\t\t// No more features to show\n\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t}\n\t\t\t\t// If video modal opened, wait for user to close it before advancing\n\t\t\t}, 500);\n\t\t},\n\t\t[availableMinorFeatures, markFeatureAsViewed, shownMinorFeatureIds],\n\t);\n\n\tconst handlePreviousMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = availableMinorFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMinorFeature(prevFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tprevFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? prevFeature.featureTag\n\t\t\t\t\t\t: `#${prevFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the previous feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(prevFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures],\n\t);\n\n\tconst handleNextMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < availableMinorFeatures.length - 1) {\n\t\t\t\tconst nextFeature = availableMinorFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMinorFeature(nextFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tnextFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? nextFeature.featureTag\n\t\t\t\t\t\t: `#${nextFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the next feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(nextFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\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];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\t\t\t\tsetMinorFeaturesSkipped(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{children}\n\n\t\t\t{majorJoyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`major-joyride-${majorJoyrideKey}`}\n\t\t\t\t\tsteps={majorJoyrideSteps}\n\t\t\t\t\trun={runMajorJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMajorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={true}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tspotlightClicks={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMajor ? 'transparent' : '#212121',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{joyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`minor-joyride-${minorJoyrideKey}`}\n\t\t\t\t\tsteps={joyrideSteps}\n\t\t\t\t\trun={runJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMinorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={true}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tscrollToFirstStep={true}\n\t\t\t\t\tscrollOffset={120}\n\t\t\t\t\tdisableScrolling={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMinor ? 'transparent' : '#ffffff',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\tboxShadow: isClosingMinor\n\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t: '0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t<VideoModal\n\t\t\t\tisOpen={isVideoModalOpen}\n\t\t\t\tvideoUrl={videoUrl}\n\t\t\t\tonClose={() => {\n\t\t\t\t\tsetIsVideoModalOpen(false);\n\t\t\t\t\tsetVideoUrl('');\n\t\t\t\t\tsetBlockPopups(false);\n\n\t\t\t\t\t// After video modal closes, check if there are more features to show\n\t\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t\t(f) => !shownMinorFeatureIds.has(f.id),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature after video\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t);\n\n};\n\nexport default FeatureAnnouncementProvider;\n"],"names":["_ref","children","fetchVisibleFeatures","getStoreFeatureProgress","fetchFeatureById","markFeatureAsViewedForStore","isFeatureApplicableToCurrentPage","module","router","storeId","onAnnouncementShown","onAnnouncementInteracted","majorUpdateFeatures","minorUpdateFeatures","isLoading","markFeatureAsViewed","useFeatureAnnouncements","currentMajorFeature","setCurrentMajorFeature","useState","currentMinorFeature","setCurrentMinorFeature","runJoyride","setRunJoyride","joyrideSteps","setJoyrideSteps","runMajorJoyride","setRunMajorJoyride","majorJoyrideSteps","setMajorJoyrideSteps","isProcessingMajorUpdate","setIsProcessingMajorUpdate","isProcessingMinorUpdate","setIsProcessingMinorUpdate","availableMinorFeatures","setAvailableMinorFeatures","minorFeaturesSkipped","setMinorFeaturesSkipped","showMinorUpdates","setShowMinorUpdates","isVideoModalOpen","setIsVideoModalOpen","videoUrl","setVideoUrl","blockPopups","setBlockPopups","isClosingMajor","setIsClosingMajor","isClosingMinor","setIsClosingMinor","majorJoyrideKey","setMajorJoyrideKey","minorJoyrideKey","setMinorJoyrideKey","shownMinorFeatureIds","setShownMinorFeatureIds","Set","useEffect","styleId","styleElement","document","getElementById","createElement","id","head","appendChild","textContent","el","remove","prev","pathname","length","attempts","MAX_ATTEMPTS","checkWhatsNewButton","querySelector","showMajorUpdateJoyride","setTimeout","featureIdFromQuery","_a","query","forcedFeature","find","f","featureTag","interval","setInterval","targetSelector","startsWith","testModeFeatures","showMinorUpdateJoyride","clearInterval","observer","scrollListener","checkTimeout","isCleanedUp","checkElementsAndStartTour","availableFeatures","filter","feature","trim","has","disconnect","window","removeEventListener","clearTimeout","MutationObserver","mutations","shouldCheck","mutation","type","addedNodes","i","node","nodeType","Node","ELEMENT_NODE","element","requestAnimationFrame","observe","body","childList","subtree","addEventListener","passive","currentIndex","findIndex","totalFeatures","majorSteps","target","SELECTORS","WHATS_NEW_BUTTON","content","_jsx","jsx","MajorUpdatePopup","onSkip","handleSkipMajorUpdate","onExplore","handleExploreFeature","onPrevious","handlePreviousMajorUpdate","onNext","handleNextMajorUpdate","setIsClosing","placement","placementBeacon","disableBeacon","hideCloseButton","hideSkipButton","hideFooter","offset","data","isMajor","styles","tooltip","padding","backgroundColor","borderRadius","border","boxShadow","tooltipContent","buttonNext","display","buttonBack","buttonClose","buttonSkip","announcementId","announcementTitle","title","imageUrl","displayImage","image","productVideo","useCallback","targetFeature","forEach","majorFeature","buttonClicked","buttonName","buttonUrl","undefined","buttonText","redirectUrl","prevFeature","prevIndex","updatedSteps","nextFeature","nextIndex","showMajorUpdatePopup","handleMajorJoyrideCallback","action","ACTIONS","CLOSE","handleMinorJoyrideCallback","featuresToUse","__awaiter","features","targetElement","scrollToElementSmooth","Promise","resolve","then","require","error","minorSteps","MinorUpdatePopup","handleSkipMinorUpdate","handleExploreMinorFeature","handlePreviousMinorUpdate","handleNextMinorUpdate","isMinor","add","_jsxs","_Fragment","Joyride","steps","run","continuous","showProgress","showSkipButton","callback","disableOverlayClose","disableCloseOnEsc","disableOverlay","spotlightClicks","options","primaryColor","zIndex","width","arrowColor","overlay","spotlight","fontSize","locale","back","close","last","next","skip","scrollToFirst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C,IAAAiF,UAEA,CAAAC,MAAOhM,EACPiM,IAAKnM,EACLoM,YAAY,EACZC,cAAc,EACdC,gBAAgB,EAChBC,SAAU3B,GACV4B,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBgB,mBAAmB,EACnBC,aAAc,IACdC,kBAAkB,EAClBxF,OAAQ,CACPwE,QAAS,CACRC,aAAc,UACdC,OAAQ,IACRC,MAAO,OACPC,WAAYtL,GAAiB,cAAgB,WAE9CuL,QAAS,CACR1E,gBAAiB,eAElB2E,UAAW,CACV3E,gBAAiB,cACjBC,aAAc,MACdE,UAAWhH,GACR,OACA,8GAEJ2G,QAAS,CACRG,aAAc,MACd2E,SAAU,OACV7E,QAAS,EACTC,gBAAiB,cACjBE,OAAQ,OACR7D,OAAQ,OACR8D,UAAW,QAEZC,eAAgB,CACfL,QAAS,GAEVM,WAAY,CACXC,QAAS,QAEVC,WAAY,CACXD,QAAS,QAEVG,WAAY,CACXH,QAAS,QAEVE,YAAa,CACZF,QAAS,SAGXuE,OAAQ,CACPC,KAAM,OACNC,MAAO,QACPC,KAAM,QACNC,KAAM,OACNC,KAAM,SA5DF,iBAAiB3L,MAiExBiF,EAAAA,IAAC8G,EAAAA,WACA,CAAAC,OAAQ5M,EACRE,SAAUA,EACV2M,QAASA,KACR5M,GAAoB,GACpBE,EAAY,IACZE,IAAe,GAGf,MAAM8I,EAAczJ,EAAuBgD,MACzCC,IAAO7B,GAAqB+C,IAAIlB,EAAEpB,MAGhC4H,EAEH9G,YAAW,KACVa,GAAuBiG,EAAazJ,EAAuB,GACzD,KAGHG,GAAwB,EACxB,MAGD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("react"),n=require("../../assets/icons/chevronRight2.svg.js"),s=require("../../assets/icons/play.svg.js"),r=require("./constants/index.js"),o=require("./styles/majorPopup.styles.js");require("../../constants/Theme.js"),require("./constants/animations.js");var a=require("./utils/htmlHelpers.js"),i=require("./utils/animationHelpers.js"),l=require("./utils/elementHelpers.js");exports.default=c=>{let{feature:u,currentIndex:d,totalFeatures:p,onSkip:g,onExplore:y,onPrevious:v,onNext:b,setIsClosing:j,onSecondaryAction:h,ratio:f="16:9",padding:x}=c;var O,B,m,T,M;const[k,E]=e.useState(!1),[P,w]=e.useState(!1),[C,L]=e.useState(""),W=e.useRef(null),[S,_]=e.useState(!1),[q,A]=e.useState(!0),U=e.useRef(null),[I,D]=e.useState(f),H=e.useRef(null);e.useEffect((()=>{k&&w(!0)}),[k]);const R=t=>{var e,n;t.preventDefault(),t.stopPropagation();const s=null===(e=u.secondaryButton)||void 0===e?void 0:e.action,r=h||g;if("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("react"),n=require("../../assets/icons/chevronRight2.svg.js"),s=require("../../assets/icons/play.svg.js"),r=require("./constants/index.js"),o=require("./styles/majorPopup.styles.js");require("../../constants/Theme.js"),require("./constants/animations.js");var a=require("./utils/htmlHelpers.js"),i=require("./utils/animationHelpers.js"),l=require("./utils/elementHelpers.js");exports.default=c=>{let{feature:u,currentIndex:d,totalFeatures:p,onSkip:g,onExplore:y,onPrevious:v,onNext:b,setIsClosing:j,onSecondaryAction:h,ratio:f="16:9",padding:x}=c;var O,B,m,T,M;const[k,E]=e.useState(!1),[P,w]=e.useState(!1),[C,L]=e.useState(""),W=e.useRef(null),[S,_]=e.useState(!1),[q,A]=e.useState(!0),U=e.useRef(null),[I,D]=e.useState(f),H=e.useRef(null);e.useEffect((()=>{k&&w(!0)}),[k]);const R=t=>{var e,n;t.preventDefault(),t.stopPropagation();const s=null===(e=u.secondaryButton)||void 0===e?void 0:e.action,r=h||g;if("Open link"===s){const t=null===(n=u.secondaryButton)||void 0===n?void 0:n.redirectionUrl;if(t){t.startsWith("http")?window.open(t,"_blank","noopener,noreferrer"):window.location.href=t}}i.hideJoyrideArrow(W.current);const o=l.findWhatsNewButton();if(o&&W.current){const t=i.calculateCloseTransform(W.current,o);L(t)}else L("scale(0)");null==j||j(!0),E(!0),i.executeAfterAnimation(r)},N=o.getMajorPopupStyles(P,C,I,x||u.padding,null===(O=u.primaryButton)||void 0===O?void 0:O.style,null===(B=u.secondaryButton)||void 0===B?void 0:B.style);return t.jsx("div",Object.assign({style:N.outerWrapper},{children:t.jsxs("div",Object.assign({ref:W,style:Object.assign(Object.assign({},N.container),{opacity:P?0:1,transition:"opacity 0.2s ease-in-out, transform 0.3s ease"})},{children:[t.jsx("style",{children:"\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t"}),t.jsxs("div",Object.assign({style:N.contentWrapper},{children:[t.jsx("div",Object.assign({style:N.imageContainer},{children:u.productVideo?t.jsxs(t.Fragment,{children:[t.jsx("video",{ref:U,src:u.productVideo,style:N.image,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,controls:!0,"aria-label":`Product video for ${u.title}`,onLoadedMetadata:t=>{const e=t.currentTarget,n=e.videoWidth,s=e.videoHeight;if(n&&s){const t=n/s;Math.abs(t-16/9)<.1?D("16:9"):Math.abs(t-1)<.1?D("1:1"):Math.abs(t-4/3)<.1?D("4:3"):D(t>1.5?"16:9":t<.9?"4:3":"1:1")}}}),(S||q)&&t.jsx("div",Object.assign({style:N.videoOverlay,onClick:t=>{t.stopPropagation(),U.current&&(U.current.paused?(U.current.play(),_(!1),A(!1)):(U.current.pause(),_(!0),A(!0)))},role:"button",tabIndex:0,"aria-label":S?"Play video":"Pause video",onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),U.current&&(U.current.paused?(U.current.play(),_(!1),A(!1)):(U.current.pause(),_(!0),A(!0))))}},{children:t.jsx(s.default,{width:20,height:20})}))]}):u.displayImage?t.jsx("img",{ref:H,src:u.displayImage,alt:u.title,style:N.image,onLoad:t=>{const e=t.currentTarget,n=e.naturalWidth,s=e.naturalHeight;if(n&&s){const t=n/s;Math.abs(t-16/9)<.1?D("16:9"):Math.abs(t-1)<.1?D("1:1"):Math.abs(t-4/3)<.1?D("4:3"):D(t>1.5?"16:9":t<.9?"4:3":"1:1")}},onError:t=>{u.image&&(t.target.src=u.image)}}):t.jsx("div",Object.assign({style:N.imagePlaceholder},{children:r.TEXT.FEATURE_PREVIEW_PLACEHOLDER}))})),t.jsxs("div",Object.assign({style:N.contentContainer},{children:[t.jsx("div",Object.assign({style:N.skipButtonContainer},{children:t.jsx("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),(t=>{i.hideJoyrideArrow(W.current);const e=l.findWhatsNewButton();if(e&&W.current){const t=i.calculateCloseTransform(W.current,e);L(t)}else L("scale(0)");null==j||j(!0),E(!0),i.executeAfterAnimation(t)})(g)},style:N.skipButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,N.skipButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,N.skipButton.base),"aria-label":"Skip feature announcement"},{children:"Skip"}))})),t.jsx("h3",Object.assign({style:N.title},{children:u.title})),t.jsx("div",{"data-popup-content":!0,style:N.content,dangerouslySetInnerHTML:{__html:a.decodeHTMLEntities(u.content||u.body||"")}}),t.jsxs("div",Object.assign({style:N.actionsWrapper},{children:[t.jsxs("div",Object.assign({style:N.buttonsGroup},{children:[t.jsx("button",Object.assign({onClick:()=>{var t,e;const n=null===(t=u.primaryButton)||void 0===t?void 0:t.action;if("Play Video"===n)y();else if("Open link"===n){const t=(null===(e=u.primaryButton)||void 0===e?void 0:e.redirectionUrl)||u.redirectUrl;if(t){t.startsWith("http")?window.open(t,"_blank","noopener,noreferrer"):window.location.href=t}y()}else y();i.hideJoyrideArrow(W.current);const s=l.findWhatsNewButton();if(s&&W.current){const t=i.calculateCloseTransform(W.current,s);L(t)}else L("scale(0)");null==j||j(!0),E(!0)},style:N.exploreButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,N.exploreButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,N.exploreButton.base)},{children:(null===(m=u.primaryButton)||void 0===m?void 0:m.text)||u.buttonText||r.TEXT.DEFAULT_BUTTON_TEXT})),(null===(T=u.secondaryButton)||void 0===T?void 0:T.text)&&((null===(M=u.secondaryButton)||void 0===M?void 0:M.redirectionUrl)?t.jsx("a",Object.assign({href:u.secondaryButton.redirectionUrl,target:u.secondaryButton.redirectionUrl.startsWith("http")?"_blank":"_self",rel:u.secondaryButton.redirectionUrl.startsWith("http")?"noopener noreferrer":void 0,onClick:R,style:N.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,N.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,N.secondaryButton.base)},{children:u.secondaryButton.text})):t.jsx("button",Object.assign({onClick:R,style:N.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,N.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,N.secondaryButton.base)},{children:u.secondaryButton.text})))]})),p>1&&t.jsxs("div",Object.assign({style:N.navigationContainer},{children:[t.jsx("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),v()},disabled:0===d,style:N.navigationButton(0===d).base,onMouseEnter:t=>{0!==d&&Object.assign(t.currentTarget.style,N.navigationButton(!1).hover)},onMouseLeave:t=>{0!==d&&Object.assign(t.currentTarget.style,N.navigationButton(!1).base)},"aria-label":"Previous feature"},{children:t.jsx(n.default,{style:{transform:"rotate(180deg)"}})})),t.jsx("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),b()},disabled:d===p-1,style:N.navigationButton(d===p-1).base,onMouseEnter:t=>{d!==p-1&&Object.assign(t.currentTarget.style,N.navigationButton(!1).hover)},onMouseLeave:t=>{d!==p-1&&Object.assign(t.currentTarget.style,N.navigationButton(d===p-1).base)},"aria-label":"Next feature"},{children:t.jsx(n.default,{})}))]}))]}))]}))]}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=MajorUpdatePopup.js.map
|