qlu-20-ui-library 1.7.91 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -0
- package/dist/Screen.d.ts +2 -0
- package/dist/Templates/index.d.ts +0 -0
- package/dist/build/index.css +1 -1
- package/dist/build/qlu-20-ui-library.cjs +399 -587
- package/dist/build/qlu-20-ui-library.js +54873 -54892
- package/dist/components/AIAnalysis/ProgressCard.d.ts +0 -1
- package/dist/components/AIAnalysis/index.d.ts +0 -1
- package/dist/components/AIAssistantCard/index.d.ts +4 -0
- package/dist/components/AIAssistantDetails/index.d.ts +0 -1
- package/dist/components/AIDeatilsCard/index.d.ts +0 -1
- package/dist/components/AdvanceFilterJobTItleWindow/index.d.ts +1 -1
- package/dist/components/AdvanceFilterJobTitleV2/index.d.ts +1 -1
- package/dist/components/AssignmentCreationCard/index.d.ts +0 -1
- package/dist/components/AssignmentIdealProfileSelectionCard/AssignmentTab/index.d.ts +7 -0
- package/dist/components/AssignmentIdealProfileSelectionCard/BageNonClickableList/index.d.ts +10 -0
- package/dist/components/AssignmentIdealProfileSelectionCard/NotesProspectiveList/index.d.ts +1 -1
- package/dist/components/AssignmentIdealProfileSelectionCard/ProfileCard/index.d.ts +1 -1
- package/dist/components/AssignmentIdealProfileSelectionCard/ProfileIstSection/index.d.ts +2 -2
- package/dist/components/AssignmentIdealProfileSelectionCard/VerticalBreadCream/index.d.ts +1 -1
- package/dist/components/AssignmentIdealProfileSelectionCard/index.d.ts +3 -3
- package/dist/components/BadgeNonClickable/index.d.ts +2 -2
- package/dist/components/BadgeWithCount/index.d.ts +2 -2
- package/dist/components/BusinessUnitView/BusinessUnitViewTabsComponent/BusinessUnitViewTabsComponent.d.ts +1 -1
- package/dist/components/BusinessUnitView/BusinessUnitViewTabsComponent/index.d.ts +1 -1
- package/dist/components/CampaignMessage/CampaignMessage.d.ts +8 -0
- package/dist/components/CampaignMessage/index.d.ts +1 -6
- package/dist/components/CampaignSubject/index.d.ts +1 -1
- package/dist/components/Charts/AreaChart/index.d.ts +1 -1
- package/dist/components/Charts/BarLineChart/index.d.ts +1 -1
- package/dist/components/Charts/DoughnutChart/index.d.ts +1 -1
- package/dist/components/Charts/StatsChart/index.d.ts +1 -1
- package/dist/components/ChatClickableCard/index.d.ts +0 -1
- package/dist/components/ChatDropDown/App1.d.ts +2 -0
- package/dist/components/ChatDropDown/index.d.ts +0 -1
- package/dist/components/ChatPopup/index.d.ts +0 -1
- package/dist/components/CheckboxComponent/index.d.ts +1 -1
- package/dist/components/CircularCardsRow/Card.d.ts +1 -1
- package/dist/components/CircularCardsRow/index.d.ts +1 -1
- package/dist/components/CircularIcon/index.d.ts +1 -1
- package/dist/components/ClickableCard/index.d.ts +0 -1
- package/dist/components/ClickableText/index.d.ts +1 -2
- package/dist/components/ColoredButton/index.d.ts +0 -1
- package/dist/components/CompanyDetailsCard/index.d.ts +1 -1
- package/dist/components/CompanyLikePillSelectable/index.d.ts +0 -1
- package/dist/components/CompanyLogoPillSelectable/index.d.ts +1 -2
- package/dist/components/CompanyPill/index.d.ts +0 -1
- package/dist/components/CompanyView/CompanyViewBody/index.d.ts +2 -2
- package/dist/components/CompanyView/CompanyViewBussinessUnitTab/index.d.ts +2 -2
- package/dist/components/CompanyView/CompanyViewFinancial/index.d.ts +2 -2
- package/dist/components/CompanyView/CompanyViewFinancialBody/index.d.ts +2 -2
- package/dist/components/CompanyView/CompanyViewFinancialIncomeStatement/RevenueTable/index.d.ts +1 -1
- package/dist/components/CompanyView/CompanyViewFinancialPrivateTabs/index.d.ts +1 -1
- package/dist/components/CompanyView/CompanyViewFinancialSummary/MultiChart/MultiChart.d.ts +1 -1
- package/dist/components/CompanyView/CompanyViewFinancialSummary/MultiChart/index.d.ts +1 -1
- package/dist/components/CompanyView/CompanyViewFinancialSummary/index.d.ts +3 -3
- package/dist/components/CompanyView/CompanyViewHeader/index.d.ts +1 -1
- package/dist/components/CompanyView/CompanyViewPeople/index.d.ts +1 -1
- package/dist/components/CompanyView/CompanyViewSidebar/index.d.ts +2 -0
- package/dist/components/CompanyView/CompanyViewSummary/index.d.ts +1 -1
- package/dist/components/CompanyView/CompanyViewSummaryNewsTabs/index.d.ts +2 -2
- package/dist/components/CompanyView/CompanyViewTabsComponent/index.d.ts +2 -2
- package/dist/components/ContinuousRangeComponent/ContinuousRangeComponent.d.ts +2 -1
- package/dist/components/ContinuousRangeComponent/index.d.ts +1 -1
- package/dist/components/CountCancelButton/index.d.ts +1 -1
- package/dist/components/CreditsManagementDropdownButton/CreditsManagementDatePicker/CustomDayContent.d.ts +1 -1
- package/dist/components/CreditsManagementDropdownButton/CreditsManagementDropdownButton/CreditsManagementDropdownItem/index.d.ts +1 -2
- package/dist/components/CreditsManagementDropdownButton/CreditsManagementDropdownButton/index.d.ts +1 -1
- package/dist/components/DatePicker/CustomDayContent.d.ts +1 -1
- package/dist/components/DateTimePicker/index.d.ts +1 -1
- package/dist/components/DropDownButton/index.d.ts +2 -2
- package/dist/components/DropDownForm/DropDownForm.d.ts +0 -1
- package/dist/components/DropDownForm/index.d.ts +1 -1
- package/dist/components/DropDownGeneric/index.d.ts +0 -1
- package/dist/components/DropDownWithSVG/index.d.ts +1 -2
- package/dist/components/DropdownChildButton/index.d.ts +1 -1
- package/dist/components/DropdownComponent/index.d.ts +1 -1
- package/dist/components/EllipsisPillNotClickable/index.d.ts +1 -1
- package/dist/components/EllipsisText/index.d.ts +1 -1
- package/dist/components/EmailDisconnectPopup/index.d.ts +25 -0
- package/dist/components/EnrichmentPersonTable/index.d.ts +1 -1
- package/dist/components/EnrichmentStatus/index.d.ts +1 -1
- package/dist/components/EntityTable/EntityTable.d.ts +1 -1
- package/dist/components/EntityTable/TableBody/TableBody.d.ts +1 -1
- package/dist/components/EntityTable/TableCell/TableCell.d.ts +1 -1
- package/dist/components/EntityTable/TableHeader/TableHeader.d.ts +1 -1
- package/dist/components/EntityTable/TableRow/TableRow.d.ts +1 -1
- package/dist/components/FeedbackButton/index.d.ts +0 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FilterAddRemoveBadge/index.d.ts +1 -1
- package/dist/components/FilterAndSortDropdown/index.d.ts +1 -1
- package/dist/components/GenericToast/index.d.ts +16 -0
- package/dist/components/GetLogoIcon/index.d.ts +1 -1
- package/dist/components/GetSvgIcon/index.d.ts +1 -1
- package/dist/components/IconButton/index.d.ts +2 -3
- package/dist/components/InputField/index.d.ts +0 -1
- package/dist/components/InputFieldForm/InputFieldForm.d.ts +0 -1
- package/dist/components/InputFieldForm/index.d.ts +1 -1
- package/dist/components/InputFieldWithSvg/index.d.ts +1 -1
- package/dist/components/Loader/index.d.ts +1 -1
- package/dist/components/LookAlikeProfiles/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/NoteEditor/FontSizeControl.d.ts +3 -5
- package/dist/components/NoteEditor/NoteEditor.d.ts +10 -0
- package/dist/components/NoteEditor/TextStyles.d.ts +5 -1
- package/dist/components/NoteEditor/ToolbarItem.d.ts +7 -1
- package/dist/components/NoteEditor/index.d.ts +1 -10
- package/dist/components/NotesProspectiveCard/index.d.ts +7 -0
- package/dist/components/NumberInputFieldWithLimit/index.d.ts +1 -1
- package/dist/components/PayChart/index.d.ts +1 -1
- package/dist/components/PeopleCard/index.d.ts +1 -1
- package/dist/components/PeopleCard/interface.d.ts +1 -1
- package/dist/components/PersonCompanyNameClickable/index.d.ts +1 -1
- package/dist/components/PersonView/PersonViewBody/index.d.ts +2 -2
- package/dist/components/PersonView/PersonViewEducationCard/index.d.ts +1 -1
- package/dist/components/PersonView/PersonViewExperienceCard/index.d.ts +2 -2
- package/dist/components/PersonView/PersonViewExperienceDetails/index.d.ts +2 -2
- package/dist/components/PersonView/PersonViewHeader/index.d.ts +1 -1
- package/dist/components/PersonView/PersonViewHeaderSummary/index.d.ts +1 -1
- package/dist/components/PersonView/PersonViewInfo/index.d.ts +1 -1
- package/dist/components/PersonView/PersonViewSidebar/index.d.ts +2 -0
- package/dist/components/PersonView/PersonViewSummary/index.d.ts +2 -2
- package/dist/components/PersonView/PersonViewTabsComponent/index.d.ts +2 -2
- package/dist/components/PrimaryButton/index.d.ts +1 -1
- package/dist/components/ProductDetailsView/ProductDetailsViewTabsComponent/ProductDetailsViewTabsComponent.d.ts +1 -1
- package/dist/components/ProductDetailsView/ProductDetailsViewTabsComponent/index.d.ts +1 -1
- package/dist/components/QuillTextArea/index.d.ts +0 -0
- package/dist/components/QuillTextArea/utils.d.ts +1 -0
- package/dist/components/RadioButton/index.d.ts +0 -1
- package/dist/components/RangeComponent/RangeComponent.d.ts +13 -0
- package/dist/components/RangeComponent/index.d.ts +2 -13
- package/dist/components/RectangularIcon/index.d.ts +1 -1
- package/dist/components/RectangularSvgButton/index.d.ts +1 -2
- package/dist/components/RichTextArea/index.d.ts +0 -0
- package/dist/components/RoundCard/index.d.ts +4 -0
- package/dist/components/SearchArrowButton/SearchSvgButton.d.ts +1 -2
- package/dist/components/SearchCheckboxComponent/index.d.ts +1 -1
- package/dist/components/SearchCompanyTable/index.d.ts +2 -2
- package/dist/components/SearchFilterButton/index.d.ts +1 -2
- package/dist/components/SearchFilterSideDrawer/SaveSearch/index.d.ts +1 -1
- package/dist/components/SearchLocationDropdown/index.d.ts +1 -1
- package/dist/components/SearchPersonTable/index.d.ts +2 -2
- package/dist/components/SecondaryButton/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/SelectItem/index.d.ts +1 -1
- package/dist/components/SelectablePill/index.d.ts +1 -1
- package/dist/components/SettingsNavbar/index.d.ts +0 -1
- package/dist/components/ShimmerLoaders/AISearchShimmer/index.d.ts +4 -0
- package/dist/components/ShimmerLoaders/TableShimmer/index.d.ts +1 -1
- package/dist/components/SkillIndustryBadge/index.d.ts +1 -1
- package/dist/components/StyleableTextAreaContainer/StyleableTextArea.d.ts +3 -7
- package/dist/components/StyleableTextAreaContainer/TagSpan.d.ts +3 -0
- package/dist/components/StyleableTextAreaContainer/TextStyles.d.ts +6 -1
- package/dist/components/Svg/Bold.d.ts +7 -0
- package/dist/components/Svg/Calender.d.ts +6 -0
- package/dist/components/Svg/CompanyPlaceHolder.d.ts +7 -0
- package/dist/components/Svg/Expand.d.ts +7 -0
- package/dist/components/SwitchLarge/index.d.ts +2 -2
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/TableNameCell/index.d.ts +1 -1
- package/dist/components/TablePagination/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/TemplateDetailCard/index.d.ts +0 -1
- package/dist/components/Templates/index.d.ts +0 -1
- package/dist/components/TertiaryButton/index.d.ts +1 -1
- package/dist/components/TextAreaWithTooltip/TextAreaWithTooltip.d.ts +17 -0
- package/dist/components/TextAreaWithTooltip/index.d.ts +1 -17
- package/dist/components/TextBoxWithSuggestions/TextBoxWithSuggestions.d.ts +13 -0
- package/dist/components/TextBoxWithSuggestions/index.d.ts +1 -13
- package/dist/components/TextButton/index.d.ts +0 -1
- package/dist/components/TextDropdown/TextDropdownItem/index.d.ts +1 -1
- package/dist/components/TextDropdown/index.d.ts +1 -2
- package/dist/components/TextWithSvgButton/index.d.ts +2 -2
- package/dist/components/ToggleComponent/index.d.ts +1 -1
- package/dist/components/Tooltip/index.d.ts +2 -2
- package/dist/components/TopNavbar/NavbarButton/index.d.ts +0 -1
- package/dist/components/TopNavbar/index.d.ts +1 -2
- package/dist/components/index.d.ts +193 -193
- package/dist/main.d.ts +0 -0
- package/dist/stories/AIAnalysisCard.stories.d.ts +6 -0
- package/dist/stories/AIAssistantCard.stories.d.ts +6 -0
- package/dist/stories/AIAssistantDetails.stories.d.ts +6 -0
- package/dist/stories/AIDetailsCard.stories.d.ts +6 -0
- package/dist/stories/AISearchShimmer.stories.d.ts +6 -0
- package/dist/stories/AdvanceFilterTitleV2.stories.d.ts +6 -0
- package/dist/stories/AreaChart.stories.d.ts +6 -0
- package/dist/stories/AssignmentBreadCrumb.stories.d.ts +6 -0
- package/dist/stories/AssignmentCreation.stories.d.ts +6 -0
- package/dist/stories/AssignmentIdealProfileCard.stories.d.ts +6 -0
- package/dist/stories/AssignmentInfoSubHeader.stories.d.ts +6 -0
- package/dist/stories/AssignmentShimmer.stories.d.ts +6 -0
- package/dist/stories/AuthNavBar.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup.stories.d.ts +6 -0
- package/dist/stories/BadgeNonClickable.stories.d.ts +6 -0
- package/dist/stories/BarLineChart.stories.d.ts +6 -0
- package/dist/stories/BusinessUnitViewTabsComponent.stories.d.ts +6 -0
- package/dist/stories/CampaignMessage.stories.d.ts +10 -0
- package/dist/stories/CampaignMessageV1.stories.d.ts +6 -0
- package/dist/stories/CampaignSubject.stories.d.ts +6 -0
- package/dist/stories/CampaignTableShimmer.stories.d.ts +6 -0
- package/dist/stories/ChatClickableCard.stories.d.ts +6 -0
- package/dist/stories/ChatDailogBox.stories.d.ts +6 -0
- package/dist/stories/ChatDropDown.stories.d.ts +6 -0
- package/dist/stories/ChatPeopleCard.stories.d.ts +6 -0
- package/dist/stories/CheckboxComponent.stories.d.ts +6 -0
- package/dist/stories/ChevronDropDown.stories.d.ts +6 -0
- package/dist/stories/CircularCards.stories.d.ts +6 -0
- package/dist/stories/CircularIcon.stories.d.ts +6 -0
- package/dist/stories/CircularSvgAndEmojiLabel.stories.d.ts +6 -0
- package/dist/stories/ClickableCard.stories.d.ts +6 -0
- package/dist/stories/ClickableFilterBadge.stories.d.ts +6 -0
- package/dist/stories/ClickableText.stories.d.ts +6 -0
- package/dist/stories/ColoredButton.stories.d.ts +6 -0
- package/dist/stories/CompantProductsTab.stories.d.ts +6 -0
- package/dist/stories/CompanyBarChartFinancialTab.stories.d.ts +6 -0
- package/dist/stories/CompanyCombinedChartFinancialTab.stories.d.ts +6 -0
- package/dist/stories/CompanyDetailsCard.stories.d.ts +6 -0
- package/dist/stories/CompanyLikePillSelectable.stories.d.ts +6 -0
- package/dist/stories/CompanyLineChartFinancialTab.stories.d.ts +6 -0
- package/dist/stories/CompanyLogoPillSelectable.stories.d.ts +6 -0
- package/dist/stories/CompanyPeopleTab.stories.d.ts +6 -0
- package/dist/stories/CompanyPill.stories.d.ts +6 -0
- package/dist/stories/CompanyReportsTabs.stories.d.ts +6 -0
- package/dist/stories/CompanyTableShimmer.stories.d.ts +6 -0
- package/dist/stories/CompanyViewBody.stories.d.ts +6 -0
- package/dist/stories/CompanyViewBussinessUnitTabs.stories.d.ts +6 -0
- package/dist/stories/CompanyViewFinancial.stories.d.ts +6 -0
- package/dist/stories/CompanyViewFinancialBody.stories.d.ts +6 -0
- package/dist/stories/CompanyViewFinancialGenericTable.stories.d.ts +6 -0
- package/dist/stories/CompanyViewFinancialPrivateTabs.stories.d.ts +6 -0
- package/dist/stories/CompanyViewFinancialSummary.stories.d.ts +6 -0
- package/dist/stories/CompanyViewHeader.stories.d.ts +6 -0
- package/dist/stories/CompanyViewLayout.stories.d.ts +6 -0
- package/dist/stories/CompanyViewPeople.stories.d.ts +6 -0
- package/dist/stories/CompanyViewSummary.stories.d.ts +6 -0
- package/dist/stories/CompanyViewSummaryNewsComponentTab.stories.d.ts +6 -0
- package/dist/stories/CompanyViewSummaryNewsTabs.stories.d.ts +6 -0
- package/dist/stories/CompanyViewTabsComponent.stories.d.ts +6 -0
- package/dist/stories/CompanyViewfinancialIncomeStatement.stories.d.ts +6 -0
- package/dist/stories/CompetitorCompanyTab.stories.d.ts +6 -0
- package/dist/stories/ConnectDropdown.stories.d.ts +6 -0
- package/dist/stories/ContinuousRangeComponent.stories.d.ts +8 -0
- package/dist/stories/CreditUsageChart.stories.d.ts +12 -0
- package/dist/stories/DatePicker.stories.d.ts +6 -0
- package/dist/stories/DateTimePicker.stories.d.ts +6 -0
- package/dist/stories/DoughnutChart.stories.d.ts +6 -0
- package/dist/stories/DropDown.stories.d.ts +6 -0
- package/dist/stories/DropDownButton.stories.d.ts +6 -0
- package/dist/stories/DropDownGeneric.stories.d.ts +6 -0
- package/dist/stories/DropDownWithSVG.stories.d.ts +6 -0
- package/dist/stories/DropdownComponent.stories.d.ts +6 -0
- package/dist/stories/EntityTable.stories.d.ts +6 -0
- package/dist/stories/FeedbackButton.stories.d.ts +6 -0
- package/dist/stories/FileUpload.stories.d.ts +6 -0
- package/dist/stories/FilterAddRemoveBadge.stories.d.ts +6 -0
- package/dist/stories/FilterAndSortDropdown.stories.d.ts +6 -0
- package/dist/stories/GetSvgIcon.stories.d.ts +6 -0
- package/dist/stories/InputField.stories.d.ts +6 -0
- package/dist/stories/InputFieldWithSvg.stories.d.ts +6 -0
- package/dist/stories/LineChart.stories.d.ts +6 -0
- package/dist/stories/Loader.stories.d.ts +6 -0
- package/dist/stories/LogoButton.stories.d.ts +6 -0
- package/dist/stories/Modal.stories.d.ts +6 -0
- package/dist/stories/NoteEditor.stories.d.ts +13 -0
- package/dist/stories/NumberInputField.stories.d.ts +6 -0
- package/dist/stories/NumberStringInput.stories.d.ts +6 -0
- package/dist/stories/OTP.stories.d.ts +6 -0
- package/dist/stories/PayChart.stories.d.ts +6 -0
- package/dist/stories/PeerSalaryChart.stories.d.ts +6 -0
- package/dist/stories/PeopleCard.stories.d.ts +6 -0
- package/dist/stories/PersonCompanyNameClickable.stories.d.ts +6 -0
- package/dist/stories/PersonViewBody.stories.d.ts +6 -0
- package/dist/stories/PersonViewExperienceCard.stories.d.ts +6 -0
- package/dist/stories/PersonViewExperienceDetails.stories.d.ts +6 -0
- package/dist/stories/PersonViewGrowthChart.stories.d.ts +6 -0
- package/dist/stories/PersonViewHeader.stories.d.ts +6 -0
- package/dist/stories/PersonViewHeaderSumary.stories.d.ts +6 -0
- package/dist/stories/PersonViewInfo.stories.d.ts +6 -0
- package/dist/stories/PersonViewSummary.stories.d.ts +6 -0
- package/dist/stories/PersonViewTabsComponent.stories.d.ts +6 -0
- package/dist/stories/PhoneNumberInput.stories.d.ts +6 -0
- package/dist/stories/Pill.stories.d.ts +6 -0
- package/dist/stories/PrimaryButton.stories.d.ts +6 -0
- package/dist/stories/PrimaryRadioButton.stories.d.ts +6 -0
- package/dist/stories/ProfileListShimmer.stories.d.ts +6 -0
- package/dist/stories/ProfileTableShimmer.stories.d.ts +6 -0
- package/dist/stories/ProgressBar.stories.d.ts +6 -0
- package/dist/stories/PromptField.stories.d.ts +6 -0
- package/dist/stories/QChatShimmer.stories.d.ts +6 -0
- package/dist/stories/RadarChart.stories.d.ts +6 -0
- package/dist/stories/RadioButton.stories.d.ts +6 -0
- package/dist/stories/RangeComponent.stories.d.ts +6 -0
- package/dist/stories/RectangularIcon.stories.d.ts +6 -0
- package/dist/stories/RectangularSvgButton.stories.d.ts +6 -0
- package/dist/stories/RoundDetailsShimmer.stories.d.ts +6 -0
- package/dist/stories/RoundSettingModal.stories.d.ts +6 -0
- package/dist/stories/SaveSearch.stories.d.ts +6 -0
- package/dist/stories/SearchCompanyTable.stories.d.ts +6 -0
- package/dist/stories/SearchCompanyTableContainer.stories.d.ts +6 -0
- package/dist/stories/SearchFilterButton.stories.d.ts +6 -0
- package/dist/stories/SearchLocationDropdown.stories.d.ts +6 -0
- package/dist/stories/SearchPersonTable.stories.d.ts +6 -0
- package/dist/stories/SearchPersonTableContainer.stories.d.ts +6 -0
- package/dist/stories/SearchScreen.stories.d.ts +6 -0
- package/dist/stories/SearchTabsBar.stories.d.ts +6 -0
- package/dist/stories/SecondaryButton.stories.d.ts +6 -0
- package/dist/stories/Select.stories.d.ts +6 -0
- package/dist/stories/SelectDropDown.stories.d.ts +6 -0
- package/dist/stories/SelectablePill.stories.d.ts +6 -0
- package/dist/stories/SelectionDropdown.stories.d.ts +6 -0
- package/dist/stories/Shimmer.stories.d.ts +6 -0
- package/dist/stories/Sidebar.stories.d.ts +6 -0
- package/dist/stories/SkillIndustryBadge.stories.d.ts +6 -0
- package/dist/stories/StatsChart.stories.d.ts +6 -0
- package/dist/stories/StickyNavigationFooter.stories.d.ts +6 -0
- package/dist/stories/StylableTextArea.stories.d.ts +6 -0
- package/dist/stories/SwitchLarge.stories.d.ts +6 -0
- package/dist/stories/Table.stories.d.ts +6 -0
- package/dist/stories/TableNameCell.stories.d.ts +6 -0
- package/dist/stories/TablePagination.stories.d.ts +6 -0
- package/dist/stories/TableShimmer.stories.d.ts +6 -0
- package/dist/stories/Tabs.stories.d.ts +6 -0
- package/dist/stories/TagButtonComponent.stories.d.ts +6 -0
- package/dist/stories/TemplateDetailsCard.stories.d.ts +6 -0
- package/dist/stories/TemplateTableShimmer.stories.d.ts +6 -0
- package/dist/stories/Templates.stories.d.ts +6 -0
- package/dist/stories/TertiaryButton.stories.d.ts +6 -0
- package/dist/stories/TextArea.stories.d.ts +6 -0
- package/dist/stories/TextAreaWithTooltip.stories.d.ts +10 -0
- package/dist/stories/TextAreaWithTooltipV1.stories.d.ts +6 -0
- package/dist/stories/TextBoxWithSuggestions.stories.d.ts +8 -0
- package/dist/stories/TextBoxWithSuggestionsV1.stories.d.ts +6 -0
- package/dist/stories/TextDropdown.stories.d.ts +6 -0
- package/dist/stories/TextPillNotClickable.stories.d.ts +6 -0
- package/dist/stories/TextWithSvgButton.stories.d.ts +6 -0
- package/dist/stories/TimePicker.stories.d.ts +6 -0
- package/dist/stories/ToastWithButton.stories.d.ts +6 -0
- package/dist/stories/ToggleComponent.stories.d.ts +6 -0
- package/dist/stories/TopNavbar.stories.d.ts +6 -0
- package/dist/stories/TruncateText.stories.d.ts +6 -0
- package/dist/stories/VariantsList.stories.d.ts +6 -0
- package/dist/stories/WelcomeToastComponent.stories.d.ts +6 -0
- package/dist/types/components/AIAnalysis/ProgressCard.d.ts +0 -1
- package/dist/types/components/AIAnalysis/index.d.ts +0 -1
- package/dist/types/components/AIAssistantCard/index.d.ts +0 -1
- package/dist/types/components/AIAssistantDetails/index.d.ts +0 -1
- package/dist/types/components/AIDeatilsCard/index.d.ts +0 -1
- package/dist/types/components/AssignmentCreationCard/index.d.ts +0 -1
- package/dist/types/components/CampaignMessage/CampaignMessage.d.ts +8 -0
- package/dist/types/components/CampaignMessage/CampaignMessage.js +127 -0
- package/dist/types/components/CampaignMessage/index.d.ts +1 -8
- package/dist/types/components/CampaignMessage/index.js +1 -67
- package/dist/types/components/Charts/AreaChart/AreaChart.js +3 -3
- package/dist/types/components/Charts/BarLineChart/BarLineChart.js +4 -4
- package/dist/types/components/Charts/StatsChart/StatsChart.js +3 -3
- package/dist/types/components/ChatClickableCard/index.d.ts +0 -1
- package/dist/types/components/ChatDropDown/index.d.ts +0 -1
- package/dist/types/components/ChatPopup/index.d.ts +0 -1
- package/dist/types/components/ClickableCard/index.d.ts +0 -1
- package/dist/types/components/ClickableText/index.d.ts +0 -1
- package/dist/types/components/ColoredButton/index.d.ts +0 -1
- package/dist/types/components/CompanyLikePillSelectable/index.d.ts +0 -1
- package/dist/types/components/CompanyLogoPillSelectable/index.d.ts +0 -1
- package/dist/types/components/CompanyPill/index.d.ts +0 -1
- package/dist/types/components/CompanyView/CompanyViewFinancial/index.d.ts +1 -1
- package/dist/types/components/ContinuousRangeComponent/ContinuousRangeComponent.d.ts +2 -2
- package/dist/types/components/ContinuousRangeComponent/ContinuousRangeComponent.js +262 -35
- package/dist/types/components/CreditsManagementDropdownButton/CreditsManagementDropdownButton/CreditsManagementDropdownItem/index.d.ts +0 -1
- package/dist/types/components/DropDownForm/DropDownForm.d.ts +0 -1
- package/dist/types/components/DropDownGeneric/index.d.ts +0 -1
- package/dist/types/components/DropDownWithSVG/index.d.ts +0 -1
- package/dist/types/components/EmailDisconnectPopup/index.d.ts +0 -1
- package/dist/types/components/FeedbackButton/index.d.ts +0 -1
- package/dist/types/components/GetSvgIcon/index.js +2 -1
- package/dist/types/components/InputField/index.d.ts +0 -1
- package/dist/types/components/InputFieldForm/InputFieldForm.d.ts +0 -1
- package/dist/types/components/NoteEditor/FontSizeControl.d.ts +3 -6
- package/dist/types/components/NoteEditor/FontSizeControl.js +38 -20
- package/dist/types/components/NoteEditor/NoteEditor.d.ts +10 -0
- package/dist/types/components/NoteEditor/NoteEditor.js +53 -0
- package/dist/types/components/NoteEditor/TextStyles.d.ts +5 -2
- package/dist/types/components/NoteEditor/TextStyles.js +25 -45
- package/dist/types/components/NoteEditor/ToolbarItem.d.ts +7 -2
- package/dist/types/components/NoteEditor/ToolbarItem.js +4 -16
- package/dist/types/components/NoteEditor/index.d.ts +1 -13
- package/dist/types/components/NoteEditor/index.js +1 -59
- package/dist/types/components/PayChart/index.js +2 -2
- package/dist/types/components/PersonView/PersonViewGrowthChart/index.js +1 -1
- package/dist/types/components/RadioButton/index.d.ts +0 -1
- package/dist/types/components/RangeComponent/RangeComponent.d.ts +13 -0
- package/dist/types/components/RangeComponent/RangeComponent.js +149 -0
- package/dist/types/components/RangeComponent/index.d.ts +2 -15
- package/dist/types/components/RangeComponent/index.js +1 -69
- package/dist/types/components/RectangularSvgButton/index.d.ts +0 -1
- package/dist/types/components/RoundCard/index.d.ts +0 -1
- package/dist/types/components/SearchArrowButton/SearchSvgButton.d.ts +0 -1
- package/dist/types/components/SearchFilterButton/index.d.ts +0 -1
- package/dist/types/components/SettingsNavbar/index.d.ts +0 -1
- package/dist/types/components/StyleableTextAreaContainer/StyleableTextArea.d.ts +3 -8
- package/dist/types/components/StyleableTextAreaContainer/StyleableTextArea.js +25 -77
- package/dist/types/components/StyleableTextAreaContainer/TagSpan.d.ts +3 -0
- package/dist/types/components/StyleableTextAreaContainer/TagSpan.js +113 -0
- package/dist/types/components/StyleableTextAreaContainer/TextStyles.d.ts +6 -1
- package/dist/types/components/StyleableTextAreaContainer/TextStyles.js +29 -38
- package/dist/types/components/StyleableTextAreaContainer/index.js +101 -107
- package/dist/types/components/StyleableTextAreaContainer/tags.js +1 -0
- package/dist/types/components/Svg/Expand.d.ts +7 -0
- package/dist/types/components/Svg/Expand.js +5 -0
- package/dist/types/components/Table/index.d.ts +1 -1
- package/dist/types/components/TemplateDetailCard/index.d.ts +0 -1
- package/dist/types/components/Templates/index.d.ts +0 -1
- package/dist/types/components/TextAreaWithTooltip/TextAreaWithTooltip.d.ts +17 -0
- package/dist/types/components/TextAreaWithTooltip/TextAreaWithTooltip.js +100 -0
- package/dist/types/components/TextAreaWithTooltip/index.d.ts +1 -19
- package/dist/types/components/TextAreaWithTooltip/index.js +1 -70
- package/dist/types/components/TextBoxWithSuggestions/TextBoxWithSuggestions.d.ts +13 -0
- package/dist/types/components/TextBoxWithSuggestions/TextBoxWithSuggestions.js +74 -0
- package/dist/types/components/TextBoxWithSuggestions/index.d.ts +1 -15
- package/dist/types/components/TextBoxWithSuggestions/index.js +1 -43
- package/dist/types/components/TextButton/index.d.ts +0 -1
- package/dist/types/components/TextDropdown/index.d.ts +0 -1
- package/dist/types/components/TopNavbar/NavbarButton/index.d.ts +0 -1
- package/dist/types/components/TopNavbar/index.d.ts +0 -1
- package/dist/types/stories/CampaignMessage.stories.d.ts +8 -4
- package/dist/types/stories/CampaignMessage.stories.js +73 -5
- package/dist/types/stories/CampaignMessageV1.stories.d.ts +6 -0
- package/dist/types/stories/CampaignMessageV1.stories.js +12 -0
- package/dist/types/stories/ContinuousRangeComponent.stories.d.ts +8 -0
- package/dist/types/stories/ContinuousRangeComponent.stories.js +37 -0
- package/dist/types/stories/NoteEditor.stories.d.ts +13 -0
- package/dist/types/stories/NoteEditor.stories.js +130 -0
- package/dist/types/stories/TextAreaWithTooltip.stories.d.ts +8 -4
- package/dist/types/stories/TextAreaWithTooltip.stories.js +77 -10
- package/dist/types/stories/TextAreaWithTooltipV1.stories.d.ts +6 -0
- package/dist/types/stories/TextAreaWithTooltipV1.stories.js +17 -0
- package/dist/types/stories/TextBoxWithSuggestions.stories.d.ts +6 -4
- package/dist/types/stories/TextBoxWithSuggestions.stories.js +55 -17
- package/dist/types/stories/TextBoxWithSuggestionsV1.stories.d.ts +6 -0
- package/dist/types/stories/TextBoxWithSuggestionsV1.stories.js +30 -0
- package/dist/types/types.d.ts +1 -2
- package/dist/types/utils.d.ts +2 -1
- package/dist/types.d.ts +6 -7
- package/dist/utils.d.ts +4 -3
- package/package.json +52 -63
|
@@ -1,50 +1,277 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
4
|
-
import styles from "./style.module.scss";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useCallback, useEffect } from "react";
|
|
3
|
+
import styles from "./ContinuousRangeComponent.module.scss";
|
|
5
4
|
import clsx from "clsx";
|
|
6
|
-
|
|
7
|
-
function ContinuousRangeComponent({ minValue, maxValue, getRange, initialMinValue = 0, initialMaxValue = 10001, disabled = false, displayLimit = 10000, }) {
|
|
5
|
+
const ContinuousRangeComponent = ({ minValue, maxValue, getRange, initialMinValue = 0, initialMaxValue = 10001, disabled = false, displayLimit = 10000, }) => {
|
|
8
6
|
const clampedMin = Math.max(initialMinValue, Math.min(minValue, initialMaxValue));
|
|
9
7
|
const clampedMax = Math.max(initialMinValue, Math.min(maxValue, initialMaxValue));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
// Ensure minimum gap of 1 between initial values
|
|
9
|
+
const adjustedMin = clampedMin;
|
|
10
|
+
const adjustedMax = Math.max(clampedMax, clampedMin + 1);
|
|
11
|
+
const [minSliderValue, setMinSliderValue] = useState(adjustedMin);
|
|
12
|
+
const [maxSliderValue, setMaxSliderValue] = useState(adjustedMax);
|
|
13
|
+
const [isDragging, setIsDragging] = useState(null);
|
|
14
|
+
const [isAnimating, setIsAnimating] = useState(false); // For smooth track click transitions
|
|
15
|
+
const [, forceUpdate] = useState({}); // For forcing re-renders during dragging
|
|
16
|
+
const sliderRef = useRef(null);
|
|
14
17
|
const isSliderMoving = useRef(false);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const isDraggingRef = useRef(false);
|
|
19
|
+
const animationFrameRef = useRef(null);
|
|
20
|
+
const lastUpdateTimeRef = useRef(0);
|
|
21
|
+
const animationTimeoutRef = useRef(null);
|
|
22
|
+
// Track visual positions for smooth active track rendering during drag
|
|
23
|
+
const visualMinValueRef = useRef(adjustedMin);
|
|
24
|
+
const visualMaxValueRef = useRef(adjustedMax);
|
|
25
|
+
// Throttling constants for smooth movement
|
|
26
|
+
const UPDATE_THROTTLE_MS = 32; // ~30fps for controlled dragging
|
|
23
27
|
const compositeClassNames = clsx({
|
|
24
28
|
[styles.discreteSliderGeneric]: true,
|
|
25
29
|
[styles.discreteSliderDisabled]: disabled,
|
|
26
30
|
});
|
|
27
|
-
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (!isSliderMoving.current) {
|
|
33
|
+
const newMinValue = Math.max(0, Math.max(initialMinValue, Math.min(minValue, initialMaxValue)));
|
|
34
|
+
const newMaxValue = Math.max(0, Math.max(initialMinValue, Math.min(maxValue, initialMaxValue)));
|
|
35
|
+
// Ensure minimum gap of 1 between thumbs
|
|
36
|
+
if (newMaxValue - newMinValue < 1) {
|
|
37
|
+
// If values are too close, adjust them to maintain minimum gap
|
|
38
|
+
const midPoint = (newMinValue + newMaxValue) / 2;
|
|
39
|
+
const adjustedMin = Math.max(0, Math.floor(midPoint - 0.5));
|
|
40
|
+
const adjustedMax = Math.min(initialMaxValue, Math.ceil(midPoint + 0.5));
|
|
41
|
+
setMinSliderValue(adjustedMin);
|
|
42
|
+
setMaxSliderValue(adjustedMax);
|
|
43
|
+
visualMinValueRef.current = adjustedMin;
|
|
44
|
+
visualMaxValueRef.current = adjustedMax;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
setMinSliderValue(newMinValue);
|
|
48
|
+
setMaxSliderValue(newMaxValue);
|
|
49
|
+
visualMinValueRef.current = newMinValue;
|
|
50
|
+
visualMaxValueRef.current = newMaxValue;
|
|
51
|
+
}
|
|
38
52
|
}
|
|
39
|
-
};
|
|
40
|
-
const handleChangeComplete = () => {
|
|
41
|
-
isSliderMoving.current = false;
|
|
42
|
-
};
|
|
53
|
+
}, [minValue, maxValue, initialMinValue, initialMaxValue]);
|
|
43
54
|
const formatLabel = (value) => {
|
|
44
55
|
if (disabled)
|
|
45
56
|
return "";
|
|
46
57
|
return `${value.toLocaleString()}`;
|
|
47
58
|
};
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
const getPercentage = (value) => {
|
|
60
|
+
return (((value - initialMinValue) / (initialMaxValue - initialMinValue)) * 100);
|
|
61
|
+
};
|
|
62
|
+
const getValueFromPercentage = (percentage) => {
|
|
63
|
+
return Math.round(initialMinValue + (percentage / 100) * (initialMaxValue - initialMinValue));
|
|
64
|
+
};
|
|
65
|
+
// Function to determine which thumb is closest to the clicked position
|
|
66
|
+
const getClosestThumb = (value) => {
|
|
67
|
+
const distanceToMin = Math.abs(value - minSliderValue);
|
|
68
|
+
const distanceToMax = Math.abs(value - maxSliderValue);
|
|
69
|
+
return distanceToMin <= distanceToMax ? "min" : "max";
|
|
70
|
+
};
|
|
71
|
+
// Handle track click to move closest thumb to clicked position with smooth animation
|
|
72
|
+
const handleTrackClick = useCallback((e) => {
|
|
73
|
+
if (disabled || isDragging)
|
|
74
|
+
return;
|
|
75
|
+
// Prevent event from bubbling to avoid conflicts with thumb events
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
if (!sliderRef.current)
|
|
79
|
+
return;
|
|
80
|
+
const rect = sliderRef.current.getBoundingClientRect();
|
|
81
|
+
const percentage = Math.max(0, Math.min(100, ((e.clientX - rect.left) / rect.width) * 100));
|
|
82
|
+
const value = getValueFromPercentage(percentage);
|
|
83
|
+
// Determine which thumb is closest and move it
|
|
84
|
+
const closestThumb = getClosestThumb(value);
|
|
85
|
+
// Enable smooth transition animation
|
|
86
|
+
setIsAnimating(true);
|
|
87
|
+
// Clear any existing animation timeout
|
|
88
|
+
if (animationTimeoutRef.current) {
|
|
89
|
+
clearTimeout(animationTimeoutRef.current);
|
|
90
|
+
}
|
|
91
|
+
if (closestThumb === "min") {
|
|
92
|
+
// Ensure minimum gap of 1 between thumbs
|
|
93
|
+
const newMinValue = Math.max(0, Math.min(value, maxSliderValue - 1));
|
|
94
|
+
if (newMinValue !== minSliderValue) {
|
|
95
|
+
setMinSliderValue(newMinValue);
|
|
96
|
+
visualMinValueRef.current = newMinValue;
|
|
97
|
+
getRange({
|
|
98
|
+
minRange: newMinValue,
|
|
99
|
+
maxRange: Math.min(displayLimit, Math.max(0, maxSliderValue)),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
// Ensure minimum gap of 1 between thumbs
|
|
105
|
+
const newMaxValue = Math.min(displayLimit, Math.max(minSliderValue + 1, Math.max(value, minSliderValue)));
|
|
106
|
+
if (newMaxValue !== maxSliderValue) {
|
|
107
|
+
setMaxSliderValue(newMaxValue);
|
|
108
|
+
visualMaxValueRef.current = newMaxValue;
|
|
109
|
+
getRange({
|
|
110
|
+
minRange: Math.max(0, minSliderValue),
|
|
111
|
+
maxRange: newMaxValue,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Disable animation after transition completes (300ms to match CSS transition)
|
|
116
|
+
animationTimeoutRef.current = window.setTimeout(() => {
|
|
117
|
+
setIsAnimating(false);
|
|
118
|
+
}, 300);
|
|
119
|
+
}, [
|
|
120
|
+
disabled,
|
|
121
|
+
isDragging,
|
|
122
|
+
minSliderValue,
|
|
123
|
+
maxSliderValue,
|
|
124
|
+
displayLimit,
|
|
125
|
+
getRange,
|
|
126
|
+
]);
|
|
127
|
+
const handleMouseDown = useCallback((type) => (e) => {
|
|
128
|
+
if (disabled)
|
|
129
|
+
return;
|
|
130
|
+
e.preventDefault();
|
|
131
|
+
e.stopPropagation(); // Prevent track click when clicking on thumb
|
|
132
|
+
// Clear any pending animation timeout and disable animation when starting drag
|
|
133
|
+
if (animationTimeoutRef.current) {
|
|
134
|
+
clearTimeout(animationTimeoutRef.current);
|
|
135
|
+
}
|
|
136
|
+
setIsAnimating(false);
|
|
137
|
+
// Initialize visual refs with current state values
|
|
138
|
+
visualMinValueRef.current = minSliderValue;
|
|
139
|
+
visualMaxValueRef.current = maxSliderValue;
|
|
140
|
+
setIsDragging(type);
|
|
141
|
+
isSliderMoving.current = true;
|
|
142
|
+
isDraggingRef.current = true;
|
|
143
|
+
}, [disabled, minSliderValue, maxSliderValue]);
|
|
144
|
+
const handleMouseMove = useCallback((e) => {
|
|
145
|
+
if (!isDragging ||
|
|
146
|
+
!sliderRef.current ||
|
|
147
|
+
disabled ||
|
|
148
|
+
!isDraggingRef.current)
|
|
149
|
+
return;
|
|
150
|
+
// Cancel any pending animation frame to prevent stacking
|
|
151
|
+
if (animationFrameRef.current) {
|
|
152
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
153
|
+
}
|
|
154
|
+
// Throttle updates similar to react-input-range approach
|
|
155
|
+
const now = Date.now();
|
|
156
|
+
const timeDiff = now - lastUpdateTimeRef.current;
|
|
157
|
+
if (timeDiff < UPDATE_THROTTLE_MS) {
|
|
158
|
+
// Schedule update for next frame if we're updating too frequently
|
|
159
|
+
animationFrameRef.current = requestAnimationFrame(() => {
|
|
160
|
+
handleMouseMove(e);
|
|
161
|
+
});
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
// Update last time here to ensure consistent throttling
|
|
165
|
+
lastUpdateTimeRef.current = now;
|
|
166
|
+
// Use requestAnimationFrame for smooth updates (similar to react-input-range)
|
|
167
|
+
animationFrameRef.current = requestAnimationFrame(() => {
|
|
168
|
+
if (!sliderRef.current || !isDraggingRef.current)
|
|
169
|
+
return;
|
|
170
|
+
const rect = sliderRef.current.getBoundingClientRect();
|
|
171
|
+
// Get clientX from either mouse or touch event
|
|
172
|
+
const clientX = 'touches' in e ? e.touches[0]?.clientX : e.clientX;
|
|
173
|
+
if (clientX === undefined)
|
|
174
|
+
return;
|
|
175
|
+
const percentage = Math.max(0, Math.min(100, ((clientX - rect.left) / rect.width) * 100));
|
|
176
|
+
const value = getValueFromPercentage(percentage);
|
|
177
|
+
if (isDragging === "min") {
|
|
178
|
+
// Ensure minimum gap of 1 between thumbs
|
|
179
|
+
const newMinValue = Math.max(0, Math.min(value, maxSliderValue - 1));
|
|
180
|
+
// Update visual ref for smooth active track rendering
|
|
181
|
+
visualMinValueRef.current = Math.max(0, Math.min(value, visualMaxValueRef.current - 1));
|
|
182
|
+
// Force re-render for smooth visual updates
|
|
183
|
+
forceUpdate({});
|
|
184
|
+
// Update state for callback when value actually changes
|
|
185
|
+
if (newMinValue !== minSliderValue) {
|
|
186
|
+
setMinSliderValue(newMinValue);
|
|
187
|
+
getRange({
|
|
188
|
+
minRange: newMinValue,
|
|
189
|
+
maxRange: Math.min(displayLimit, Math.max(0, maxSliderValue)),
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else if (isDragging === "max") {
|
|
194
|
+
// Ensure minimum gap of 1 between thumbs
|
|
195
|
+
const newMaxValue = Math.min(displayLimit, Math.max(minSliderValue + 1, Math.max(value, minSliderValue)));
|
|
196
|
+
// Update visual ref for smooth active track rendering
|
|
197
|
+
visualMaxValueRef.current = Math.min(displayLimit, Math.max(visualMinValueRef.current + 1, Math.max(value, visualMinValueRef.current)));
|
|
198
|
+
// Force re-render for smooth visual updates
|
|
199
|
+
forceUpdate({});
|
|
200
|
+
// Update state for callback when value actually changes
|
|
201
|
+
if (newMaxValue !== maxSliderValue) {
|
|
202
|
+
setMaxSliderValue(newMaxValue);
|
|
203
|
+
getRange({
|
|
204
|
+
minRange: Math.max(0, minSliderValue),
|
|
205
|
+
maxRange: newMaxValue,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}, [
|
|
211
|
+
isDragging,
|
|
212
|
+
maxSliderValue,
|
|
213
|
+
minSliderValue,
|
|
214
|
+
disabled,
|
|
215
|
+
getRange,
|
|
216
|
+
displayLimit,
|
|
217
|
+
]);
|
|
218
|
+
const handleMouseUp = useCallback(() => {
|
|
219
|
+
if (isDragging) {
|
|
220
|
+
isSliderMoving.current = false;
|
|
221
|
+
}
|
|
222
|
+
// Clean up any pending animation frames
|
|
223
|
+
if (animationFrameRef.current) {
|
|
224
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
225
|
+
animationFrameRef.current = null;
|
|
226
|
+
}
|
|
227
|
+
setIsDragging(null);
|
|
228
|
+
isDraggingRef.current = false;
|
|
229
|
+
// Sync visual refs with final state values
|
|
230
|
+
visualMinValueRef.current = minSliderValue;
|
|
231
|
+
visualMaxValueRef.current = maxSliderValue;
|
|
232
|
+
}, [isDragging, minSliderValue, maxSliderValue]);
|
|
233
|
+
useEffect(() => {
|
|
234
|
+
if (isDragging) {
|
|
235
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
236
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
237
|
+
document.addEventListener("touchmove", handleMouseMove, { passive: false });
|
|
238
|
+
document.addEventListener("touchend", handleMouseUp);
|
|
239
|
+
return () => {
|
|
240
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
241
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
242
|
+
document.removeEventListener("touchmove", handleMouseMove);
|
|
243
|
+
document.removeEventListener("touchend", handleMouseUp);
|
|
244
|
+
// Clean up any pending animation frames when effect unmounts
|
|
245
|
+
if (animationFrameRef.current) {
|
|
246
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
247
|
+
animationFrameRef.current = null;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
}, [isDragging, handleMouseMove, handleMouseUp]);
|
|
252
|
+
// Cleanup animation frames on component unmount
|
|
253
|
+
useEffect(() => {
|
|
254
|
+
return () => {
|
|
255
|
+
if (animationFrameRef.current) {
|
|
256
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
257
|
+
}
|
|
258
|
+
if (animationTimeoutRef.current) {
|
|
259
|
+
clearTimeout(animationTimeoutRef.current);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
}, []);
|
|
263
|
+
// Use visual refs during dragging for smooth active track, otherwise use state values
|
|
264
|
+
const currentMinValue = isDragging
|
|
265
|
+
? visualMinValueRef.current
|
|
266
|
+
: minSliderValue;
|
|
267
|
+
const currentMaxValue = isDragging
|
|
268
|
+
? visualMaxValueRef.current
|
|
269
|
+
: maxSliderValue;
|
|
270
|
+
const minPercentage = getPercentage(currentMinValue);
|
|
271
|
+
const maxPercentage = getPercentage(currentMaxValue);
|
|
272
|
+
return (_jsx("span", { className: compositeClassNames, children: _jsxs("div", { className: `${styles["range-slider-container"]} ${isDragging ? styles.dragging : ""}`, ref: sliderRef, onClick: handleTrackClick, children: [_jsx("div", { className: styles["range-slider-track"], children: _jsx("div", { className: styles["range-slider-track-active"], style: {
|
|
273
|
+
left: `${minPercentage}%`,
|
|
274
|
+
width: `${maxPercentage - minPercentage}%`,
|
|
275
|
+
} }) }), _jsx("div", { className: `${styles["range-slider-thumb"]} ${styles["range-slider-thumb--min"]} ${isDragging === "min" ? styles.dragging : ""} ${isAnimating ? styles.animating : ""}`, style: { left: `${minPercentage}%` }, onMouseDown: handleMouseDown("min"), onTouchStart: handleMouseDown("min"), children: _jsx("div", { className: styles["range-slider-tooltip"], children: formatLabel(Math.round(currentMinValue)) }) }), _jsx("div", { className: `${styles["range-slider-thumb"]} ${styles["range-slider-thumb--max"]} ${isDragging === "max" ? styles.dragging : ""} ${isAnimating ? styles.animating : ""}`, style: { left: `${maxPercentage}%` }, onMouseDown: handleMouseDown("max"), onTouchStart: handleMouseDown("max"), children: _jsx("div", { className: styles["range-slider-tooltip"], children: formatLabel(Math.round(currentMaxValue)) }) })] }) }));
|
|
276
|
+
};
|
|
50
277
|
export default ContinuousRangeComponent;
|
|
@@ -204,7 +204,8 @@ import AccessRevoke from "../Svg/AccessRevoke";
|
|
|
204
204
|
import Pipeline from "../Svg/Pipeline";
|
|
205
205
|
import ChatSend from "../Svg/ChatSend";
|
|
206
206
|
import Stopwatch from "../Svg/Stopwatch";
|
|
207
|
+
import Expand from "../Svg/Expand";
|
|
207
208
|
const GetSvgIcon = ({ iconType = "cross", iconSize = "24" }) => {
|
|
208
|
-
return iconType === "cross" ? (_jsx(Cross, { width: iconSize, height: iconSize })) : iconType === "plus" ? (_jsx(Plus, { width: iconSize, height: iconSize })) : iconType === "thumb" ? (_jsx(Thumb, { width: iconSize, height: iconSize })) : iconType === "clock" ? (_jsx(Clock, { width: iconSize, height: iconSize })) : iconType === "tick" ? (_jsx(Tick, { width: iconSize, height: iconSize })) : iconType === "linkedinLogo" ? (_jsx(LinkedinLogo, { width: iconSize, height: iconSize })) : iconType === "searchArrow" ? (_jsx(SearchArrow, { width: iconSize, height: iconSize })) : iconType === "excalamationCircle" ? (_jsx(ExclamationCircle, { width: iconSize, height: iconSize })) : iconType === "edit" ? (_jsx(Edit, { width: iconSize, height: iconSize })) : iconType === "delete" ? (_jsx(Delete, { width: iconSize, height: iconSize })) : iconType === "chatOneBallon" ? (_jsx(ChatOneballon, { width: iconSize, height: iconSize })) : iconType === "qluLogo" ? (_jsx(QluLogo, { width: iconSize, height: iconSize })) : iconType === "gear" ? (_jsx(Gear, { width: iconSize, height: iconSize })) : iconType === "home" ? (_jsx(Home, { width: iconSize, height: iconSize })) : iconType === "paperPlaneUpRight" ? (_jsx(PaperPlaneUpRight, { width: iconSize, height: iconSize })) : iconType === "search" ? (_jsx(Search, { width: iconSize, height: iconSize })) : iconType === "chat" ? (_jsx(Chat, { width: iconSize, height: iconSize })) : iconType === "briefcase" ? (_jsx(Briefcase, { width: iconSize, height: iconSize })) : iconType === "barGraph" ? (_jsx(BarGraph, { width: iconSize, height: iconSize })) : iconType === "book" ? (_jsx(Book, { width: iconSize, height: iconSize })) : iconType === "company" ? (_jsx(Company, { width: iconSize, height: iconSize })) : iconType === "dollarBriefcase" ? (_jsx(DollarBriefcase, { width: iconSize, height: iconSize })) : iconType === "industry" ? (_jsx(Industry, { width: iconSize, height: iconSize })) : iconType === "jobTitle" ? (_jsx(JobTitle, { width: iconSize, height: iconSize })) : iconType === "location" ? (_jsx(Location, { width: iconSize, height: iconSize })) : iconType === "strategyPath" ? (_jsx(StrategyPath, { width: iconSize, height: iconSize })) : iconType === "tools" ? (_jsx(Tools, { width: iconSize, height: iconSize })) : iconType === "management" ? (_jsx(Management, { width: iconSize, height: iconSize })) : iconType === "employees" ? (_jsx(Employees, { width: iconSize, height: iconSize })) : iconType === "cheveronDown" ? (_jsx(CheveronDown, { width: iconSize, height: iconSize })) : iconType === "cheveronUp" ? (_jsx(CheveronUp, { width: iconSize, height: iconSize })) : iconType === "arrowLeft" ? (_jsx(ArrowLeft, { width: iconSize, height: iconSize })) : iconType === "arrowRight" ? (_jsx(ArrowRight, { width: iconSize, height: iconSize })) : iconType === "passTick" ? (_jsx(PassTick, { width: iconSize, height: iconSize })) : iconType === "doNotInclude" ? (_jsx(DoNotInclude, { width: iconSize, height: iconSize })) : iconType === "tickCircle" ? (_jsx(TickCircle, { width: iconSize, height: iconSize })) : iconType === "phone" ? (_jsx(Phone, { width: iconSize, height: iconSize })) : iconType === "email" ? (_jsx(Email, { width: iconSize, height: iconSize })) : iconType === "eye" ? (_jsx(Eye, { width: iconSize, height: iconSize })) : iconType === "eyeOff" ? (_jsx(EyeOff, { width: iconSize, height: iconSize })) : iconType === "congratulations" ? (_jsx(Congratulations, {})) : iconType === "heart" ? (_jsx(Heart, { width: iconSize, height: iconSize })) : iconType === "questionMark" ? (_jsx(QuestionMark, { width: iconSize, height: iconSize })) : iconType === "kebab" ? (_jsx(Kebab, { width: iconSize, height: iconSize })) : iconType === "calendar" ? (_jsx(Calendar, { width: iconSize, height: iconSize })) : iconType === "officeBuilding" ? (_jsx(OfficeBuilding, { width: iconSize, height: iconSize })) : iconType === "notes" ? (_jsx(Notes, { width: iconSize, height: iconSize })) : iconType === "star" ? (_jsx(Star, { width: iconSize, height: iconSize })) : iconType === "filterFunel" ? (_jsx(FilterFunel, { width: iconSize, height: iconSize })) : iconType === "sortUpDownArrows" ? (_jsx(SortUpDownArrows, { width: iconSize, height: iconSize })) : iconType === "download" ? (_jsx(Download, { width: iconSize, height: iconSize })) : iconType === "sparkles" ? (_jsx(Sparkles, { width: iconSize, height: iconSize })) : iconType === "writeNotes" ? (_jsx(WriteNotes, { width: iconSize, height: iconSize })) : iconType === "undo" ? (_jsx(Undo, { width: iconSize, height: iconSize })) : iconType === "emailSend" ? (_jsx(EmailSend, { width: iconSize, height: iconSize })) : iconType === "copy" ? (_jsx(Copy, { width: iconSize, height: iconSize })) : iconType === "openLink" ? (_jsx(OpenLink, { width: iconSize, height: iconSize })) : iconType === "internalUser" ? (_jsx(InternalUser, { width: iconSize, height: iconSize })) : iconType === "link" ? (_jsx(Link, { width: iconSize, height: iconSize })) : iconType === "bell" ? (_jsx(Bell, { width: iconSize, height: iconSize })) : iconType === "graduationHat" ? (_jsx(GraduationHat, { width: iconSize, height: iconSize })) : iconType === "user" ? (_jsx(User, { width: iconSize, height: iconSize })) : iconType === "password" ? (_jsx(Password, { width: iconSize, height: iconSize })) : iconType === "emailDisconnected" ? (_jsx(EmailDisconnected, { width: iconSize, height: iconSize })) : iconType === "bolt" ? (_jsx(Bolt, { width: iconSize, height: iconSize })) : iconType === "images" ? (_jsx(Images, { width: iconSize, height: iconSize })) : iconType === "information" ? (_jsx(Information, { width: iconSize, height: iconSize })) : iconType === "inviteUser" ? (_jsx(InviteUser, { width: iconSize, height: iconSize })) : iconType === "list" ? (_jsx(List, { width: iconSize, height: iconSize })) : iconType === "table" ? (_jsx(Table, { width: iconSize, height: iconSize })) : iconType === "arrowDown" ? (_jsx(ArrowDown, { width: iconSize, height: iconSize })) : iconType === "arrowUp" ? (_jsx(ArrowUp, { width: iconSize, height: iconSize })) : iconType === "chevronLeft" ? (_jsx(ChevronLeft, { width: iconSize, height: iconSize })) : iconType === "chevronRight" ? (_jsx(ChevronRight, { width: iconSize, height: iconSize })) : iconType === "radio" ? (_jsx(Radio, { width: iconSize, height: iconSize })) : iconType === "like" ? (_jsx(Like, { width: iconSize, height: iconSize })) : iconType === "unlike" ? (_jsx(Unlike, { width: iconSize, height: iconSize })) : iconType === "refresh" ? (_jsx(Refresh, { width: iconSize, height: iconSize })) : iconType === "emailRound" ? (_jsx(EmailRound, { width: iconSize, height: iconSize })) : iconType === "abstractGeometric" ? (_jsx(AbstractGeometric, { width: iconSize, height: iconSize })) : iconType === "seo" ? (_jsx(Seo, { width: iconSize, height: iconSize })) : iconType === "abstractCircle" ? (_jsx(AbstractCircle, { width: iconSize, height: iconSize })) : iconType === "checkList" ? (_jsx(CheckList, { width: iconSize, height: iconSize })) : iconType === "penEdit" ? (_jsx(PenEdit, { width: iconSize, height: iconSize })) : iconType === "globeSearch" ? (_jsx(GlobeSearch, { width: iconSize, height: iconSize })) : iconType === "groupIcon" ? (_jsx(GroupIcon, { width: iconSize, height: iconSize })) : iconType === "jD" ? (_jsx(JD, {})) : iconType === "hiringCompany" ? (_jsx(HiringCompany, {})) : iconType === "sampleProfiles" ? (_jsx(SampleProfiles, {})) : iconType === "addToCollection" ? (_jsx(AddToCollection, { width: iconSize, height: iconSize })) : iconType === "pointingDown" ? (_jsx(PointingDown, { width: iconSize, height: iconSize })) : iconType === "pencilEdit" ? (_jsx(PencilEdit, { width: iconSize, height: iconSize })) : iconType === "matchingProfile" ? (_jsx(MatchingProfile, {})) : iconType === "stop" ? (_jsx(Stop, { width: iconSize, height: iconSize })) : iconType === "clipBoard" ? (_jsx(ClipBoard, { width: iconSize, height: iconSize })) : iconType === "sortascending" ? (_jsx(SortAscending, { width: iconSize, height: iconSize })) : iconType === "sortdescending" ? (_jsx(SortDescending, { width: iconSize, height: iconSize })) : iconType === "hourglass" ? (_jsx(HourGlass, { width: iconSize, height: iconSize })) : iconType === "exclamation" ? (_jsx(Exclamation, { width: iconSize, height: iconSize })) : iconType === "refresh-ccw" ? (_jsx(RefreshCounterClockWise, { width: iconSize, height: iconSize })) : iconType === "adjustment" ? (_jsx(Adjustment, { width: iconSize, height: iconSize })) : iconType === "outlook" ? (_jsx(Outlook, { width: iconSize, height: iconSize })) : iconType === "menu-alt" ? (_jsx(MenuAlt, { width: iconSize, height: iconSize })) : iconType === "simpler-tick" ? (_jsx(SimplerTick, { width: iconSize, height: iconSize })) : iconType === "menu-extended" ? (_jsx(MenuExtended, { width: iconSize, height: iconSize })) : iconType === "umberalla" ? (_jsx(Umberalla, { width: iconSize, height: iconSize })) : iconType === "sidebar" ? (_jsx(Sidebar, { width: iconSize, height: iconSize })) : iconType === "paperClip" ? (_jsx(PaperClip, { width: iconSize, height: iconSize })) : iconType === "document" ? (_jsx(Document, { width: iconSize, height: iconSize })) : iconType === "file" ? (_jsx(File, { width: iconSize, height: iconSize })) : iconType === "google" ? (_jsx(Google, { width: iconSize, height: iconSize })) : iconType === "pdf" ? (_jsx(PDF, { width: iconSize, height: iconSize })) : iconType === "enter" ? (_jsx(Enter, { width: iconSize, height: iconSize })) : iconType === "key" ? (_jsx(Key, { width: iconSize, height: iconSize })) : iconType === "cornerDown" ? (_jsx(CornerDown, { width: iconSize, height: iconSize })) : iconType === "notAllowed" ? (_jsx(NotAllowed, { width: iconSize, height: iconSize })) : iconType === "university" ? (_jsx(University, { width: iconSize, height: iconSize })) : iconType === "pause" ? (_jsx(Pause, { width: iconSize, height: iconSize })) : iconType === "resume" ? (_jsx(Resume, { width: iconSize, height: iconSize })) : iconType === "ascendingOrder" ? (_jsx(AscendingOrder, { width: iconSize, height: iconSize })) : iconType === "descendingOrder" ? (_jsx(DescendingOrder, { width: iconSize, height: iconSize })) : iconType === "userClock" ? (_jsx(UserClock, { width: iconSize, height: iconSize })) : iconType === "tickVerification" ? (_jsx(TickVerification, { width: iconSize, height: iconSize })) : iconType === "copied" ? (_jsx(Copied, { width: iconSize, height: iconSize })) : iconType === "archive" ? (_jsx(Archive, { width: iconSize, height: iconSize })) : iconType === "additionalInformation" ? (_jsx(AdditionalInformation, { width: iconSize, height: iconSize })) : iconType === "checkCircle" ? (_jsx(CheckCircle, { width: iconSize, height: iconSize })) : iconType === "companyClock" ? (_jsx(CompanyClock, { width: iconSize, height: iconSize })) : iconType === "boldPlus" ? (_jsx(BoldPlus, { width: iconSize, height: iconSize })) : iconType === "square" ? (_jsx(Square, { width: iconSize, height: iconSize })) : iconType === "boxPencil" ? (_jsx(BoxPencil, { width: iconSize, height: iconSize })) : iconType === "companyOwnership" ? (_jsx(CompanyOwnership, { width: iconSize, height: iconSize })) : iconType === "cutBriefcase" ? (_jsx(CutBriefcase, { width: iconSize, height: iconSize })) : iconType === "box" ? (_jsx(Box, { width: iconSize, height: iconSize })) : iconType === "googleLogo" ? (_jsx(GoogleLogo, { width: iconSize, height: iconSize })) : iconType === "microsoftLogo" ? (_jsx(MicrosoftLogo, { width: iconSize, height: iconSize })) : iconType === "people" ? (_jsx(People, { width: iconSize, height: iconSize })) : iconType === "crunchBaseLogo" ? (_jsx(CrunchBaseLogo, { width: iconSize, height: iconSize })) : iconType === "linkedinColoredLogo" ? (_jsx(LinkedinColoredLogo, { width: iconSize, height: iconSize })) : iconType === "googleColoredLogo" ? (_jsx(GoogleColoredLogo, { width: iconSize, height: iconSize })) : iconType === "websiteBadge" ? (_jsx(WebsiteBadge, { width: iconSize, height: iconSize })) : iconType === "arrowLeftShort" ? (_jsx(ArrowLeftShort, { width: iconSize, height: iconSize })) : iconType === "notDownloaded" ? (_jsx(NotDownloaded, { width: iconSize, height: iconSize })) : iconType === "lock" ? (_jsx(Lock, { width: iconSize, height: iconSize })) : iconType === "companyStrategy" ? (_jsx(CompanyStrategy, { width: iconSize, height: iconSize })) : iconType === "industryStrategy" ? (_jsx(IndustryStrategy, { width: iconSize, height: iconSize })) : iconType === "strategyUpdate" ? (_jsx(UpdateStrategy, { width: iconSize, height: iconSize })) : iconType === "unarchive" ? (_jsx(Unarchive, { width: iconSize, height: iconSize })) : iconType === "roundedDocument" ? (_jsx(RoundedDocument, { width: iconSize, height: iconSize })) : iconType === "marketMap" ? (_jsx(MarketMap, { width: iconSize, height: iconSize })) : iconType === "leadership" ? (_jsx(Leadership, { width: iconSize, height: iconSize })) : iconType === "fullScreen" ? (_jsx(FullScreen, { width: iconSize, height: iconSize })) : iconType === "exitFullScreen" ? (_jsx(ExitFullScreen, { width: iconSize, height: iconSize })) : iconType === "plannerTable" ? (_jsx(PlannerTable, { width: iconSize, height: iconSize })) : iconType === "upload" ? (_jsx(Upload, { width: iconSize, height: iconSize })) : iconType === "agent" ? (_jsx(Agent, { width: iconSize, height: iconSize })) : iconType === "doubleTick" ? (_jsx(DoubleTick, { width: iconSize, height: iconSize })) : iconType === "reply" ? (_jsx(Reply, { width: iconSize, height: iconSize })) : iconType === "lowCreditWarning" ? (_jsx(LowCreditWarning, { width: iconSize, height: iconSize })) : iconType === "threeDots" ? (_jsx(ThreeDots, { width: iconSize, height: iconSize })) : iconType === "creditAdmin" ? (_jsx(CreditAdmin, { width: iconSize, height: iconSize })) : iconType === "collection" ? (_jsx(Collection, { width: iconSize, height: iconSize })) : iconType === "save" ? (_jsx(Save, { width: iconSize, height: iconSize })) : iconType === "sidebarArrow" ? (_jsx(SidebarArrow, { width: iconSize, height: iconSize })) : iconType === "gradientSparkles" ? (_jsx(AiGradientSparkles, { width: iconSize, height: iconSize })) : iconType === "plusCircle" ? (_jsx(PlusCircle, { width: iconSize, height: iconSize })) : iconType === "incomingCall" ? (_jsx(IncomingCall, { width: iconSize, height: iconSize })) : iconType === "outgoingCall" ? (_jsx(OutGoingCall, { width: iconSize, height: iconSize })) : iconType === "message" ? (_jsx(Message, { width: iconSize, height: iconSize })) : iconType === "missedCall" ? (_jsx(MissedCall, { width: iconSize, height: iconSize })) : iconType === "filter" ? (_jsx(Filter, { width: iconSize, height: iconSize })) : iconType === "call" ? (_jsx(Call, { width: iconSize, height: iconSize })) : iconType === "voiceCall" ? (_jsx(VoiceCall, { width: iconSize, height: iconSize })) : iconType === "messageLogo" ? (_jsx(MessageLogo, { width: iconSize, height: iconSize })) : iconType === "requisitionLogo" ? (_jsx(RequisitionLogo, { width: iconSize, height: iconSize })) : iconType === "actionLogo" ? (_jsx(ActionLogo, { width: iconSize, height: iconSize })) : iconType === "organizationPlaceholder" ? (_jsx(OrganizationPlaceholder, { width: iconSize, height: iconSize })) : iconType === "approved" ? (_jsx(Approved, { width: iconSize, height: iconSize })) : iconType === "rejected" ? (_jsx(Reject, { width: iconSize, height: iconSize })) : iconType === "pending" ? (_jsx(Pending, { width: iconSize, height: iconSize })) : iconType === "default" ? (_jsx(Default, { width: iconSize, height: iconSize })) : iconType === "creditSystemUser" ? (_jsx(CreditSystemUser, { width: iconSize, height: iconSize })) : iconType === "usFlag" ? (_jsx(USFlag, { width: iconSize, height: iconSize })) : iconType === "canadaFlag" ? (_jsx(CanadaFlag, { width: iconSize, height: iconSize })) : iconType === "australiaFlag" ? (_jsx(AustraliaFlag, { width: iconSize, height: iconSize })) : iconType === "mexicoFlag" ? (_jsx(MexicoFlag, { width: iconSize, height: iconSize })) : iconType === "newZealandFlag" ? (_jsx(NewZealandFlag, { width: iconSize, height: iconSize })) : iconType === "inbox" ? (_jsx(Inbox, { width: iconSize, height: iconSize })) : iconType === "ukFlag" ? (_jsx(UkFlag, { width: iconSize, height: iconSize })) : iconType === "lightBulb" ? (_jsx(LightBulb, { width: iconSize, height: iconSize })) : iconType === "linkedin" ? (_jsx(LinkedinIcon, { width: iconSize, height: iconSize })) : iconType === "outlookColored" ? (_jsx(OutlookColored, { width: iconSize, height: iconSize })) : iconType === "googleColored" ? (_jsx(GoogleIcon, { width: iconSize, height: iconSize })) : iconType === "linkedinPremium" ? (_jsx(InmailIcon, { width: iconSize, height: iconSize })) : iconType === "text" ? (_jsx(TextIcon, { width: iconSize, height: iconSize })) : iconType === "telephone" ? (_jsx(PhoneIcon, { width: iconSize, height: iconSize })) : iconType === "welcomeAboard" ? (_jsx(WelcomeAboard, { width: iconSize, height: iconSize })) : iconType === "googleDriveLogo" ? (_jsx(GoogleDriveLogo, { width: iconSize, height: iconSize })) : iconType === "spreadsheet" ? (_jsx(Spreadsheet, { width: iconSize, height: iconSize })) : iconType === "sparklingStars" ? (_jsx(SparklingStars, { width: iconSize, height: iconSize })) : iconType === "syncLoader" ? (_jsx(SyncLoader, { width: iconSize, height: iconSize })) : iconType === "accessRevoke" ? (_jsx(AccessRevoke, { width: iconSize, height: iconSize })) : iconType === "pipeline" ? (_jsx(Pipeline, { width: iconSize, height: iconSize })) : iconType === "chatSend" ? (_jsx(ChatSend, { width: iconSize, height: iconSize })) : iconType === "stopwatch" ? (_jsx(Stopwatch, { width: iconSize, height: iconSize })) : null;
|
|
209
|
+
return iconType === "cross" ? (_jsx(Cross, { width: iconSize, height: iconSize })) : iconType === "plus" ? (_jsx(Plus, { width: iconSize, height: iconSize })) : iconType === "thumb" ? (_jsx(Thumb, { width: iconSize, height: iconSize })) : iconType === "clock" ? (_jsx(Clock, { width: iconSize, height: iconSize })) : iconType === "tick" ? (_jsx(Tick, { width: iconSize, height: iconSize })) : iconType === "linkedinLogo" ? (_jsx(LinkedinLogo, { width: iconSize, height: iconSize })) : iconType === "searchArrow" ? (_jsx(SearchArrow, { width: iconSize, height: iconSize })) : iconType === "excalamationCircle" ? (_jsx(ExclamationCircle, { width: iconSize, height: iconSize })) : iconType === "edit" ? (_jsx(Edit, { width: iconSize, height: iconSize })) : iconType === "delete" ? (_jsx(Delete, { width: iconSize, height: iconSize })) : iconType === "chatOneBallon" ? (_jsx(ChatOneballon, { width: iconSize, height: iconSize })) : iconType === "qluLogo" ? (_jsx(QluLogo, { width: iconSize, height: iconSize })) : iconType === "gear" ? (_jsx(Gear, { width: iconSize, height: iconSize })) : iconType === "home" ? (_jsx(Home, { width: iconSize, height: iconSize })) : iconType === "paperPlaneUpRight" ? (_jsx(PaperPlaneUpRight, { width: iconSize, height: iconSize })) : iconType === "search" ? (_jsx(Search, { width: iconSize, height: iconSize })) : iconType === "chat" ? (_jsx(Chat, { width: iconSize, height: iconSize })) : iconType === "briefcase" ? (_jsx(Briefcase, { width: iconSize, height: iconSize })) : iconType === "barGraph" ? (_jsx(BarGraph, { width: iconSize, height: iconSize })) : iconType === "book" ? (_jsx(Book, { width: iconSize, height: iconSize })) : iconType === "company" ? (_jsx(Company, { width: iconSize, height: iconSize })) : iconType === "dollarBriefcase" ? (_jsx(DollarBriefcase, { width: iconSize, height: iconSize })) : iconType === "industry" ? (_jsx(Industry, { width: iconSize, height: iconSize })) : iconType === "jobTitle" ? (_jsx(JobTitle, { width: iconSize, height: iconSize })) : iconType === "location" ? (_jsx(Location, { width: iconSize, height: iconSize })) : iconType === "strategyPath" ? (_jsx(StrategyPath, { width: iconSize, height: iconSize })) : iconType === "tools" ? (_jsx(Tools, { width: iconSize, height: iconSize })) : iconType === "management" ? (_jsx(Management, { width: iconSize, height: iconSize })) : iconType === "employees" ? (_jsx(Employees, { width: iconSize, height: iconSize })) : iconType === "cheveronDown" ? (_jsx(CheveronDown, { width: iconSize, height: iconSize })) : iconType === "cheveronUp" ? (_jsx(CheveronUp, { width: iconSize, height: iconSize })) : iconType === "arrowLeft" ? (_jsx(ArrowLeft, { width: iconSize, height: iconSize })) : iconType === "arrowRight" ? (_jsx(ArrowRight, { width: iconSize, height: iconSize })) : iconType === "passTick" ? (_jsx(PassTick, { width: iconSize, height: iconSize })) : iconType === "doNotInclude" ? (_jsx(DoNotInclude, { width: iconSize, height: iconSize })) : iconType === "tickCircle" ? (_jsx(TickCircle, { width: iconSize, height: iconSize })) : iconType === "phone" ? (_jsx(Phone, { width: iconSize, height: iconSize })) : iconType === "email" ? (_jsx(Email, { width: iconSize, height: iconSize })) : iconType === "eye" ? (_jsx(Eye, { width: iconSize, height: iconSize })) : iconType === "eyeOff" ? (_jsx(EyeOff, { width: iconSize, height: iconSize })) : iconType === "congratulations" ? (_jsx(Congratulations, {})) : iconType === "heart" ? (_jsx(Heart, { width: iconSize, height: iconSize })) : iconType === "questionMark" ? (_jsx(QuestionMark, { width: iconSize, height: iconSize })) : iconType === "kebab" ? (_jsx(Kebab, { width: iconSize, height: iconSize })) : iconType === "calendar" ? (_jsx(Calendar, { width: iconSize, height: iconSize })) : iconType === "officeBuilding" ? (_jsx(OfficeBuilding, { width: iconSize, height: iconSize })) : iconType === "notes" ? (_jsx(Notes, { width: iconSize, height: iconSize })) : iconType === "star" ? (_jsx(Star, { width: iconSize, height: iconSize })) : iconType === "filterFunel" ? (_jsx(FilterFunel, { width: iconSize, height: iconSize })) : iconType === "sortUpDownArrows" ? (_jsx(SortUpDownArrows, { width: iconSize, height: iconSize })) : iconType === "download" ? (_jsx(Download, { width: iconSize, height: iconSize })) : iconType === "sparkles" ? (_jsx(Sparkles, { width: iconSize, height: iconSize })) : iconType === "writeNotes" ? (_jsx(WriteNotes, { width: iconSize, height: iconSize })) : iconType === "undo" ? (_jsx(Undo, { width: iconSize, height: iconSize })) : iconType === "emailSend" ? (_jsx(EmailSend, { width: iconSize, height: iconSize })) : iconType === "copy" ? (_jsx(Copy, { width: iconSize, height: iconSize })) : iconType === "openLink" ? (_jsx(OpenLink, { width: iconSize, height: iconSize })) : iconType === "internalUser" ? (_jsx(InternalUser, { width: iconSize, height: iconSize })) : iconType === "link" ? (_jsx(Link, { width: iconSize, height: iconSize })) : iconType === "bell" ? (_jsx(Bell, { width: iconSize, height: iconSize })) : iconType === "graduationHat" ? (_jsx(GraduationHat, { width: iconSize, height: iconSize })) : iconType === "user" ? (_jsx(User, { width: iconSize, height: iconSize })) : iconType === "password" ? (_jsx(Password, { width: iconSize, height: iconSize })) : iconType === "emailDisconnected" ? (_jsx(EmailDisconnected, { width: iconSize, height: iconSize })) : iconType === "bolt" ? (_jsx(Bolt, { width: iconSize, height: iconSize })) : iconType === "images" ? (_jsx(Images, { width: iconSize, height: iconSize })) : iconType === "information" ? (_jsx(Information, { width: iconSize, height: iconSize })) : iconType === "inviteUser" ? (_jsx(InviteUser, { width: iconSize, height: iconSize })) : iconType === "list" ? (_jsx(List, { width: iconSize, height: iconSize })) : iconType === "table" ? (_jsx(Table, { width: iconSize, height: iconSize })) : iconType === "arrowDown" ? (_jsx(ArrowDown, { width: iconSize, height: iconSize })) : iconType === "arrowUp" ? (_jsx(ArrowUp, { width: iconSize, height: iconSize })) : iconType === "chevronLeft" ? (_jsx(ChevronLeft, { width: iconSize, height: iconSize })) : iconType === "chevronRight" ? (_jsx(ChevronRight, { width: iconSize, height: iconSize })) : iconType === "radio" ? (_jsx(Radio, { width: iconSize, height: iconSize })) : iconType === "like" ? (_jsx(Like, { width: iconSize, height: iconSize })) : iconType === "unlike" ? (_jsx(Unlike, { width: iconSize, height: iconSize })) : iconType === "refresh" ? (_jsx(Refresh, { width: iconSize, height: iconSize })) : iconType === "emailRound" ? (_jsx(EmailRound, { width: iconSize, height: iconSize })) : iconType === "abstractGeometric" ? (_jsx(AbstractGeometric, { width: iconSize, height: iconSize })) : iconType === "seo" ? (_jsx(Seo, { width: iconSize, height: iconSize })) : iconType === "abstractCircle" ? (_jsx(AbstractCircle, { width: iconSize, height: iconSize })) : iconType === "checkList" ? (_jsx(CheckList, { width: iconSize, height: iconSize })) : iconType === "penEdit" ? (_jsx(PenEdit, { width: iconSize, height: iconSize })) : iconType === "globeSearch" ? (_jsx(GlobeSearch, { width: iconSize, height: iconSize })) : iconType === "groupIcon" ? (_jsx(GroupIcon, { width: iconSize, height: iconSize })) : iconType === "jD" ? (_jsx(JD, {})) : iconType === "expand" ? (_jsx(Expand, { width: iconSize, height: iconSize })) : iconType === "hiringCompany" ? (_jsx(HiringCompany, {})) : iconType === "sampleProfiles" ? (_jsx(SampleProfiles, {})) : iconType === "addToCollection" ? (_jsx(AddToCollection, { width: iconSize, height: iconSize })) : iconType === "pointingDown" ? (_jsx(PointingDown, { width: iconSize, height: iconSize })) : iconType === "pencilEdit" ? (_jsx(PencilEdit, { width: iconSize, height: iconSize })) : iconType === "matchingProfile" ? (_jsx(MatchingProfile, {})) : iconType === "stop" ? (_jsx(Stop, { width: iconSize, height: iconSize })) : iconType === "clipBoard" ? (_jsx(ClipBoard, { width: iconSize, height: iconSize })) : iconType === "sortascending" ? (_jsx(SortAscending, { width: iconSize, height: iconSize })) : iconType === "sortdescending" ? (_jsx(SortDescending, { width: iconSize, height: iconSize })) : iconType === "hourglass" ? (_jsx(HourGlass, { width: iconSize, height: iconSize })) : iconType === "exclamation" ? (_jsx(Exclamation, { width: iconSize, height: iconSize })) : iconType === "refresh-ccw" ? (_jsx(RefreshCounterClockWise, { width: iconSize, height: iconSize })) : iconType === "adjustment" ? (_jsx(Adjustment, { width: iconSize, height: iconSize })) : iconType === "outlook" ? (_jsx(Outlook, { width: iconSize, height: iconSize })) : iconType === "menu-alt" ? (_jsx(MenuAlt, { width: iconSize, height: iconSize })) : iconType === "simpler-tick" ? (_jsx(SimplerTick, { width: iconSize, height: iconSize })) : iconType === "menu-extended" ? (_jsx(MenuExtended, { width: iconSize, height: iconSize })) : iconType === "umberalla" ? (_jsx(Umberalla, { width: iconSize, height: iconSize })) : iconType === "sidebar" ? (_jsx(Sidebar, { width: iconSize, height: iconSize })) : iconType === "paperClip" ? (_jsx(PaperClip, { width: iconSize, height: iconSize })) : iconType === "document" ? (_jsx(Document, { width: iconSize, height: iconSize })) : iconType === "file" ? (_jsx(File, { width: iconSize, height: iconSize })) : iconType === "google" ? (_jsx(Google, { width: iconSize, height: iconSize })) : iconType === "pdf" ? (_jsx(PDF, { width: iconSize, height: iconSize })) : iconType === "enter" ? (_jsx(Enter, { width: iconSize, height: iconSize })) : iconType === "key" ? (_jsx(Key, { width: iconSize, height: iconSize })) : iconType === "cornerDown" ? (_jsx(CornerDown, { width: iconSize, height: iconSize })) : iconType === "notAllowed" ? (_jsx(NotAllowed, { width: iconSize, height: iconSize })) : iconType === "university" ? (_jsx(University, { width: iconSize, height: iconSize })) : iconType === "pause" ? (_jsx(Pause, { width: iconSize, height: iconSize })) : iconType === "resume" ? (_jsx(Resume, { width: iconSize, height: iconSize })) : iconType === "ascendingOrder" ? (_jsx(AscendingOrder, { width: iconSize, height: iconSize })) : iconType === "descendingOrder" ? (_jsx(DescendingOrder, { width: iconSize, height: iconSize })) : iconType === "userClock" ? (_jsx(UserClock, { width: iconSize, height: iconSize })) : iconType === "tickVerification" ? (_jsx(TickVerification, { width: iconSize, height: iconSize })) : iconType === "copied" ? (_jsx(Copied, { width: iconSize, height: iconSize })) : iconType === "archive" ? (_jsx(Archive, { width: iconSize, height: iconSize })) : iconType === "additionalInformation" ? (_jsx(AdditionalInformation, { width: iconSize, height: iconSize })) : iconType === "checkCircle" ? (_jsx(CheckCircle, { width: iconSize, height: iconSize })) : iconType === "companyClock" ? (_jsx(CompanyClock, { width: iconSize, height: iconSize })) : iconType === "boldPlus" ? (_jsx(BoldPlus, { width: iconSize, height: iconSize })) : iconType === "square" ? (_jsx(Square, { width: iconSize, height: iconSize })) : iconType === "boxPencil" ? (_jsx(BoxPencil, { width: iconSize, height: iconSize })) : iconType === "companyOwnership" ? (_jsx(CompanyOwnership, { width: iconSize, height: iconSize })) : iconType === "cutBriefcase" ? (_jsx(CutBriefcase, { width: iconSize, height: iconSize })) : iconType === "box" ? (_jsx(Box, { width: iconSize, height: iconSize })) : iconType === "googleLogo" ? (_jsx(GoogleLogo, { width: iconSize, height: iconSize })) : iconType === "microsoftLogo" ? (_jsx(MicrosoftLogo, { width: iconSize, height: iconSize })) : iconType === "people" ? (_jsx(People, { width: iconSize, height: iconSize })) : iconType === "crunchBaseLogo" ? (_jsx(CrunchBaseLogo, { width: iconSize, height: iconSize })) : iconType === "linkedinColoredLogo" ? (_jsx(LinkedinColoredLogo, { width: iconSize, height: iconSize })) : iconType === "googleColoredLogo" ? (_jsx(GoogleColoredLogo, { width: iconSize, height: iconSize })) : iconType === "websiteBadge" ? (_jsx(WebsiteBadge, { width: iconSize, height: iconSize })) : iconType === "arrowLeftShort" ? (_jsx(ArrowLeftShort, { width: iconSize, height: iconSize })) : iconType === "notDownloaded" ? (_jsx(NotDownloaded, { width: iconSize, height: iconSize })) : iconType === "lock" ? (_jsx(Lock, { width: iconSize, height: iconSize })) : iconType === "companyStrategy" ? (_jsx(CompanyStrategy, { width: iconSize, height: iconSize })) : iconType === "industryStrategy" ? (_jsx(IndustryStrategy, { width: iconSize, height: iconSize })) : iconType === "strategyUpdate" ? (_jsx(UpdateStrategy, { width: iconSize, height: iconSize })) : iconType === "unarchive" ? (_jsx(Unarchive, { width: iconSize, height: iconSize })) : iconType === "roundedDocument" ? (_jsx(RoundedDocument, { width: iconSize, height: iconSize })) : iconType === "marketMap" ? (_jsx(MarketMap, { width: iconSize, height: iconSize })) : iconType === "leadership" ? (_jsx(Leadership, { width: iconSize, height: iconSize })) : iconType === "fullScreen" ? (_jsx(FullScreen, { width: iconSize, height: iconSize })) : iconType === "exitFullScreen" ? (_jsx(ExitFullScreen, { width: iconSize, height: iconSize })) : iconType === "plannerTable" ? (_jsx(PlannerTable, { width: iconSize, height: iconSize })) : iconType === "upload" ? (_jsx(Upload, { width: iconSize, height: iconSize })) : iconType === "agent" ? (_jsx(Agent, { width: iconSize, height: iconSize })) : iconType === "doubleTick" ? (_jsx(DoubleTick, { width: iconSize, height: iconSize })) : iconType === "reply" ? (_jsx(Reply, { width: iconSize, height: iconSize })) : iconType === "lowCreditWarning" ? (_jsx(LowCreditWarning, { width: iconSize, height: iconSize })) : iconType === "threeDots" ? (_jsx(ThreeDots, { width: iconSize, height: iconSize })) : iconType === "creditAdmin" ? (_jsx(CreditAdmin, { width: iconSize, height: iconSize })) : iconType === "collection" ? (_jsx(Collection, { width: iconSize, height: iconSize })) : iconType === "save" ? (_jsx(Save, { width: iconSize, height: iconSize })) : iconType === "sidebarArrow" ? (_jsx(SidebarArrow, { width: iconSize, height: iconSize })) : iconType === "gradientSparkles" ? (_jsx(AiGradientSparkles, { width: iconSize, height: iconSize })) : iconType === "plusCircle" ? (_jsx(PlusCircle, { width: iconSize, height: iconSize })) : iconType === "incomingCall" ? (_jsx(IncomingCall, { width: iconSize, height: iconSize })) : iconType === "outgoingCall" ? (_jsx(OutGoingCall, { width: iconSize, height: iconSize })) : iconType === "message" ? (_jsx(Message, { width: iconSize, height: iconSize })) : iconType === "missedCall" ? (_jsx(MissedCall, { width: iconSize, height: iconSize })) : iconType === "filter" ? (_jsx(Filter, { width: iconSize, height: iconSize })) : iconType === "call" ? (_jsx(Call, { width: iconSize, height: iconSize })) : iconType === "voiceCall" ? (_jsx(VoiceCall, { width: iconSize, height: iconSize })) : iconType === "messageLogo" ? (_jsx(MessageLogo, { width: iconSize, height: iconSize })) : iconType === "requisitionLogo" ? (_jsx(RequisitionLogo, { width: iconSize, height: iconSize })) : iconType === "actionLogo" ? (_jsx(ActionLogo, { width: iconSize, height: iconSize })) : iconType === "organizationPlaceholder" ? (_jsx(OrganizationPlaceholder, { width: iconSize, height: iconSize })) : iconType === "approved" ? (_jsx(Approved, { width: iconSize, height: iconSize })) : iconType === "rejected" ? (_jsx(Reject, { width: iconSize, height: iconSize })) : iconType === "pending" ? (_jsx(Pending, { width: iconSize, height: iconSize })) : iconType === "default" ? (_jsx(Default, { width: iconSize, height: iconSize })) : iconType === "creditSystemUser" ? (_jsx(CreditSystemUser, { width: iconSize, height: iconSize })) : iconType === "usFlag" ? (_jsx(USFlag, { width: iconSize, height: iconSize })) : iconType === "canadaFlag" ? (_jsx(CanadaFlag, { width: iconSize, height: iconSize })) : iconType === "australiaFlag" ? (_jsx(AustraliaFlag, { width: iconSize, height: iconSize })) : iconType === "mexicoFlag" ? (_jsx(MexicoFlag, { width: iconSize, height: iconSize })) : iconType === "newZealandFlag" ? (_jsx(NewZealandFlag, { width: iconSize, height: iconSize })) : iconType === "inbox" ? (_jsx(Inbox, { width: iconSize, height: iconSize })) : iconType === "ukFlag" ? (_jsx(UkFlag, { width: iconSize, height: iconSize })) : iconType === "lightBulb" ? (_jsx(LightBulb, { width: iconSize, height: iconSize })) : iconType === "linkedin" ? (_jsx(LinkedinIcon, { width: iconSize, height: iconSize })) : iconType === "outlookColored" ? (_jsx(OutlookColored, { width: iconSize, height: iconSize })) : iconType === "googleColored" ? (_jsx(GoogleIcon, { width: iconSize, height: iconSize })) : iconType === "linkedinPremium" ? (_jsx(InmailIcon, { width: iconSize, height: iconSize })) : iconType === "text" ? (_jsx(TextIcon, { width: iconSize, height: iconSize })) : iconType === "telephone" ? (_jsx(PhoneIcon, { width: iconSize, height: iconSize })) : iconType === "welcomeAboard" ? (_jsx(WelcomeAboard, { width: iconSize, height: iconSize })) : iconType === "googleDriveLogo" ? (_jsx(GoogleDriveLogo, { width: iconSize, height: iconSize })) : iconType === "spreadsheet" ? (_jsx(Spreadsheet, { width: iconSize, height: iconSize })) : iconType === "sparklingStars" ? (_jsx(SparklingStars, { width: iconSize, height: iconSize })) : iconType === "syncLoader" ? (_jsx(SyncLoader, { width: iconSize, height: iconSize })) : iconType === "accessRevoke" ? (_jsx(AccessRevoke, { width: iconSize, height: iconSize })) : iconType === "pipeline" ? (_jsx(Pipeline, { width: iconSize, height: iconSize })) : iconType === "chatSend" ? (_jsx(ChatSend, { width: iconSize, height: iconSize })) : iconType === "stopwatch" ? (_jsx(Stopwatch, { width: iconSize, height: iconSize })) : null;
|
|
209
210
|
};
|
|
210
211
|
export default GetSvgIcon;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { EditorState } from 'draft-js';
|
|
3
|
-
import "./FontSizeControl.scss";
|
|
1
|
+
import { Editor } from "@tiptap/react";
|
|
4
2
|
interface FontSizeControlProps {
|
|
5
|
-
|
|
6
|
-
updateEditorState: (newEditorState: EditorState) => void;
|
|
3
|
+
editor: Editor | null;
|
|
7
4
|
}
|
|
8
|
-
declare const FontSizeControl:
|
|
5
|
+
declare const FontSizeControl: ({ editor }: FontSizeControlProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
6
|
export default FontSizeControl;
|
|
@@ -1,33 +1,51 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const FontSizeControl = ({ editorState, updateEditorState }) => {
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import styles from "./FontSizeControl.module.scss";
|
|
4
|
+
const FontSizeControl = ({ editor }) => {
|
|
6
5
|
const fontSizes = ['12', '14', '16', '18', '20', '24', '32'];
|
|
7
|
-
const [fontIndex, setFontIndex] = useState(
|
|
6
|
+
const [fontIndex, setFontIndex] = useState(2); // Default to 16px (index 2)
|
|
8
7
|
const [currentFontSize, setCurrentFontSize] = useState(fontSizes[fontIndex]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
if (!editor) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
// Get current font size from editor
|
|
12
|
+
const getCurrentFontSize = () => {
|
|
13
|
+
const fontSize = editor.getAttributes('textStyle').fontSize;
|
|
14
|
+
if (fontSize) {
|
|
15
|
+
const numericSize = fontSize.replace('px', '');
|
|
16
|
+
const index = fontSizes.indexOf(numericSize);
|
|
17
|
+
return index !== -1 ? index : 2; // Default to 16px if not found
|
|
18
|
+
}
|
|
19
|
+
return 2; // Default to 16px
|
|
20
20
|
};
|
|
21
|
+
// Update font size state when editor selection changes
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (editor) {
|
|
24
|
+
const updateFontSize = () => {
|
|
25
|
+
const currentIndex = getCurrentFontSize();
|
|
26
|
+
setFontIndex(currentIndex);
|
|
27
|
+
setCurrentFontSize(fontSizes[currentIndex]);
|
|
28
|
+
};
|
|
29
|
+
editor.on('selectionUpdate', updateFontSize);
|
|
30
|
+
editor.on('transaction', updateFontSize);
|
|
31
|
+
return () => {
|
|
32
|
+
editor.off('selectionUpdate', updateFontSize);
|
|
33
|
+
editor.off('transaction', updateFontSize);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}, [editor]);
|
|
21
37
|
const handleFontDecrease = () => {
|
|
22
38
|
setFontIndex(prevIndex => (prevIndex > 0 ? prevIndex - 1 : prevIndex));
|
|
23
39
|
};
|
|
24
40
|
const handleFontIncrease = () => {
|
|
25
|
-
setFontIndex(prevIndex => (prevIndex <
|
|
41
|
+
setFontIndex(prevIndex => (prevIndex < fontSizes.length - 1 ? prevIndex + 1 : prevIndex));
|
|
26
42
|
};
|
|
27
43
|
useEffect(() => {
|
|
28
44
|
setCurrentFontSize(fontSizes[fontIndex]);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
// Apply the font size to the editor using the FontSize extension
|
|
46
|
+
const fontSize = fontSizes[fontIndex];
|
|
47
|
+
editor.chain().focus().setFontSize(`${fontSize}px`).run();
|
|
48
|
+
}, [fontIndex, editor]);
|
|
49
|
+
return (_jsx("div", { className: styles.fontSizeControl, children: _jsxs("span", { className: styles.fontSizeSpan, children: [_jsx("span", { className: styles.divider, children: "|" }), _jsx("span", { className: styles.btnSpan, onClick: handleFontDecrease, children: "-" }), _jsx("input", { className: styles.fontSizeInput, type: 'text', value: currentFontSize, disabled: true }), _jsx("span", { className: styles.btnSpan, onClick: handleFontIncrease, children: "+" }), _jsx("span", { className: styles.divider, children: "|" })] }) }));
|
|
32
50
|
};
|
|
33
51
|
export default FontSizeControl;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
value: string;
|
|
3
|
+
handleChange: (newTextValue: string) => void;
|
|
4
|
+
contributors?: string[];
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
notesLoading: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const NoteEditor: ({ value, handleChange, contributors, isDisabled, isLoading, notesLoading, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default NoteEditor;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { useEditor, EditorContent } from "@tiptap/react";
|
|
4
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
5
|
+
import TextStyle from "@tiptap/extension-text-style";
|
|
6
|
+
import Underline from "@tiptap/extension-underline";
|
|
7
|
+
import FontSize from "tiptap-extension-font-size";
|
|
8
|
+
import ToolbarItem from "./ToolbarItem";
|
|
9
|
+
import styles from "./NoteEditor.module.scss";
|
|
10
|
+
const NoteEditor = ({ value = "", handleChange = () => false, contributors, isDisabled = false, isLoading = false, notesLoading = false, }) => {
|
|
11
|
+
const editor = useEditor({
|
|
12
|
+
extensions: [
|
|
13
|
+
StarterKit.configure({
|
|
14
|
+
heading: {
|
|
15
|
+
levels: [1, 2, 3, 4, 5, 6],
|
|
16
|
+
},
|
|
17
|
+
bulletList: {
|
|
18
|
+
keepMarks: true,
|
|
19
|
+
keepAttributes: false,
|
|
20
|
+
},
|
|
21
|
+
orderedList: {
|
|
22
|
+
keepMarks: true,
|
|
23
|
+
keepAttributes: false,
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
TextStyle,
|
|
27
|
+
Underline,
|
|
28
|
+
FontSize.configure({
|
|
29
|
+
types: ['textStyle'],
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
content: value,
|
|
33
|
+
editable: !isDisabled,
|
|
34
|
+
onUpdate: ({ editor }) => {
|
|
35
|
+
if (!notesLoading) {
|
|
36
|
+
const text = editor.getText();
|
|
37
|
+
handleChange(text);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
editorProps: {
|
|
41
|
+
attributes: {
|
|
42
|
+
class: styles.proseMirror,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (editor && value !== editor.getText()) {
|
|
48
|
+
editor.commands.setContent(value);
|
|
49
|
+
}
|
|
50
|
+
}, [value, editor]);
|
|
51
|
+
return (_jsxs("div", { className: styles.noteEditorContainer, children: [_jsx(ToolbarItem, { editor: editor, contributors: contributors, isLoading: isLoading }), _jsx("div", { className: styles.editorContent, children: _jsx(EditorContent, { editor: editor }) })] }));
|
|
52
|
+
};
|
|
53
|
+
export default NoteEditor;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
1
|
+
import { Editor } from "@tiptap/react";
|
|
2
|
+
interface TextStylesProps {
|
|
3
|
+
editor: Editor | null;
|
|
4
|
+
}
|
|
5
|
+
declare const TextStyles: ({ editor }: TextStylesProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
6
|
export default TextStyles;
|