frst-components 0.36.9 → 0.38.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/README.md +52 -52
- package/dist/esm/index.js +154 -0
- package/dist/esm/node_modules/style-inject/dist/style-inject.es.js +28 -0
- package/dist/esm/public/customIcons/CircledAlert.js +7 -0
- package/dist/esm/public/customIcons/CircledCheck.js +7 -0
- package/dist/esm/public/customIcons/DefaultProfile.js +7 -0
- package/dist/esm/public/customIcons/ExcludeVoteIcon.js +7 -0
- package/dist/esm/public/customIcons/LanguageIcon.js +7 -0
- package/dist/esm/public/customIcons/SmallTrash.js +7 -0
- package/dist/esm/public/customIcons/SwitchVoteIcon.js +7 -0
- package/dist/esm/public/customIcons/TagAlert.js +7 -0
- package/dist/esm/public/customIcons/VoteCurrentIcon.js +7 -0
- package/dist/esm/public/customIcons/VoteIcon.js +7 -0
- package/dist/esm/public/customIcons/WarningIcon.js +7 -0
- package/dist/esm/public/customIcons/newVoteIcon.js +7 -0
- package/dist/esm/public/img/Nonotification.png.js +3 -0
- package/dist/esm/public/img/TargetIcon.png.js +3 -0
- package/dist/esm/src/components/DS/CardJourney/index.js +12 -0
- package/dist/esm/src/components/DS/CardJourney/style.js +123 -0
- package/dist/esm/src/components/DS/ConfirmationModal/ComfirmModalDownload/ComfirmModalDownload.js +20 -0
- package/dist/esm/src/components/DS/ConfirmationModal/ConfirmationModal.js +10 -0
- package/dist/esm/src/components/DS/ConfirmationModal/styles.js +56 -0
- package/dist/esm/src/components/DS/LightTooltip/index.js +24 -0
- package/dist/esm/src/components/DS/admButton/admButton.styles.js +52 -0
- package/dist/esm/src/components/DS/admButton/index.js +17 -0
- package/dist/esm/src/components/DS/cardPeople/cardPeople.styles.js +71 -0
- package/dist/esm/src/components/DS/cardPeople/index.js +63 -0
- package/dist/esm/src/components/DS/cardUser/cardUser.styles.js +70 -0
- package/dist/esm/src/components/DS/cardUser/index.js +14 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/index.js +186 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/styles/multiselectStyles.js +214 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/styles/primereact.css.js +6 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/styles/stylesMulti.css.js +6 -0
- package/dist/esm/src/components/DS/groups-table/groupTableStyles.js +95 -0
- package/dist/esm/src/components/DS/groups-table/index.js +113 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/UpDownButtons/index.js +8 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/UpDownButtons/upDownButtons.styles.js +43 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/Voting/index.js +40 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/Voting/voting.styles.js +126 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/hypothesisAndImpediment.style.js +115 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/index.js +161 -0
- package/dist/esm/src/components/DS/impedimentosTab/addImpedimentoModal/index.js +35 -0
- package/dist/esm/src/components/DS/impedimentosTab/addImpedimentoModal/styles.js +14 -0
- package/dist/esm/src/components/DS/impedimentosTab/dropDown/index.js +20 -0
- package/dist/esm/src/components/DS/impedimentosTab/dropDown/styles.js +38 -0
- package/dist/esm/src/components/DS/impedimentosTab/index.js +180 -0
- package/dist/esm/src/components/DS/impedimentosTab/styles.js +178 -0
- package/dist/esm/src/components/DS/loading/index.js +45 -0
- package/dist/esm/src/components/DS/loading/loadingStyle.js +39 -0
- package/dist/esm/src/components/DS/modal/index.js +55 -0
- package/dist/esm/src/components/DS/modal/styles.js +86 -0
- package/dist/esm/src/components/DS/newCards/articles/index.js +12 -0
- package/dist/esm/src/components/DS/newCards/articles/styles.js +92 -0
- package/dist/esm/src/components/DS/newCards/challenge/index.js +82 -0
- package/dist/esm/src/components/DS/newCards/challenge/styles.js +198 -0
- package/dist/esm/src/components/DS/newCards/channels/index.js +10 -0
- package/dist/esm/src/components/DS/newCards/channels/styles.js +46 -0
- package/dist/esm/src/components/DS/newCards/content/index.js +16 -0
- package/dist/esm/src/components/DS/newCards/content/styles.js +103 -0
- package/dist/esm/src/components/DS/newCards/mentoring/index.js +38 -0
- package/dist/esm/src/components/DS/newCards/mentoring/styles.js +37 -0
- package/dist/esm/src/components/DS/newCards/people/index.js +120 -0
- package/dist/esm/src/components/DS/newCards/people/styles.js +75 -0
- package/dist/esm/src/components/DS/newCards/trail/index.js +10 -0
- package/dist/esm/src/components/DS/newCards/trail/styles.js +60 -0
- package/dist/esm/src/components/DS/onboarding-progress-menu/index.js +56 -0
- package/dist/esm/src/components/DS/onboarding-progress-menu/onboardingProgressMenuStyles.js +98 -0
- package/dist/esm/src/components/DS/progressGoalBar/index.js +29 -0
- package/dist/esm/src/components/DS/progressGoalBar/progressGoalBarStyles.js +183 -0
- package/dist/esm/src/components/DS/progressGoalBar/progressTexts.js +17 -0
- package/dist/esm/src/components/DS/progressGoalBar/useProgressGoalBar.js +232 -0
- package/dist/esm/src/components/DS/resourceInfoDrop/index.js +53 -0
- package/dist/esm/src/components/DS/resourceInfoDrop/styles.js +142 -0
- package/dist/esm/src/components/DS/resultFilterTabs/dropDownResult/index.js +20 -0
- package/dist/esm/src/components/DS/resultFilterTabs/dropDownResult/styles.js +38 -0
- package/dist/esm/src/components/DS/resultFilterTabs/index.js +162 -0
- package/dist/esm/src/components/DS/resultFilterTabs/resultFilterTabsStyles.js +167 -0
- package/dist/esm/src/components/DS/resultFilterTabs/rsuite.min.css.js +6 -0
- package/dist/esm/src/components/DS/scroll-container-v2/ButtonControl/buttonControlStyles.js +65 -0
- package/dist/esm/src/components/DS/scroll-container-v2/ButtonControl/index.js +19 -0
- package/dist/esm/src/components/DS/scroll-container-v2/ButtonControl/useLongPress.js +26 -0
- package/dist/esm/src/components/DS/scroll-container-v2/index.js +29 -0
- package/dist/esm/src/components/DS/scroll-container-v2/scrollContainerStyles.js +51 -0
- package/dist/esm/src/components/DS/scroll-container-v2/useScroll.js +85 -0
- package/dist/esm/src/components/DS/select/Select.js +50 -0
- package/dist/esm/src/components/DS/select/SelectContext.js +6 -0
- package/dist/esm/src/components/DS/select/SelectItem.js +46 -0
- package/dist/esm/src/components/DS/select/index.js +9 -0
- package/dist/esm/src/components/DS/select/styles/StylesSelect.js +107 -0
- package/dist/esm/src/components/DS/steps-progress/index.js +27 -0
- package/dist/esm/src/components/DS/steps-progress/stepsProgressStyles.js +85 -0
- package/dist/esm/src/components/DS/toast/index.js +35 -0
- package/dist/esm/src/components/DS/toast/toast.styles.js +68 -0
- package/dist/esm/src/components/DS/toast-v2/index.js +76 -0
- package/dist/esm/src/components/DS/toast-v2/toast-v2.styles.js +18 -0
- package/dist/esm/src/components/DS/tooltip/index.js +98 -0
- package/dist/esm/src/components/DS/tooltip/styles.js +146 -0
- package/dist/esm/src/components/EBR/buttons-group/index.js +17 -0
- package/dist/esm/src/components/EBR/buttons-group/styles.js +9 -0
- package/dist/esm/src/components/EBR/group-statistics/groupStatisticsStyles.js +56 -0
- package/dist/esm/src/components/EBR/group-statistics/index.js +61 -0
- package/dist/esm/src/components/EBR/objective-step/index.js +8 -0
- package/dist/esm/src/components/EBR/objective-step/objectiveStepStyles.js +36 -0
- package/dist/esm/src/components/EBR/rating/index.js +78 -0
- package/dist/esm/src/components/EBR/rating/ratingStyles.js +25 -0
- package/dist/esm/src/components/EBR/specialist-contact/index.js +11 -0
- package/dist/esm/src/components/EBR/specialist-contact/specialistContactStyles.js +91 -0
- package/dist/esm/src/components/EBR/stepper/stepper.js +8 -0
- package/dist/esm/src/components/EBR/stepper/stepperItem.js +13 -0
- package/dist/esm/src/components/EBR/stepper/styles.js +137 -0
- package/dist/esm/src/components/EBR/trail-list/index.js +57 -0
- package/dist/esm/src/components/EBR/trail-list/trailListStyles.js +51 -0
- package/dist/esm/src/components/FI/ThreadComments/index.js +45 -0
- package/dist/esm/src/components/FI/ThreadComments/threadComments.styles.js +51 -0
- package/dist/esm/src/components/FI/ThreadComments/utilitiesComponents/commentaryBoxReply/index.js +20 -0
- package/dist/esm/src/components/FI/ThreadComments/utilitiesComponents/inputReply/index.js +67 -0
- package/dist/esm/src/components/FI/ThreadComments/utilitiesComponents/inputReply/inputReply.styles.js +39 -0
- package/dist/esm/src/components/FI/bannerProblemFeed/bannerProblemFeedStyles.js +156 -0
- package/dist/esm/src/components/FI/bannerProblemFeed/index.js +161 -0
- package/dist/esm/src/components/FI/bannerSRG/bannerSRGStyle.js +217 -0
- package/dist/esm/src/components/FI/bannerSRG/index.js +15 -0
- package/dist/esm/src/components/FI/feedInteraction/feedInteractionStyles.js +137 -0
- package/dist/esm/src/components/FI/feedInteraction/index.js +88 -0
- package/dist/esm/src/components/FI/feedInteractionV2/feedInteractionStyles.js +52 -0
- package/dist/esm/src/components/FI/feedInteractionV2/index.js +22 -0
- package/dist/esm/src/components/FI/feedInteractionV3/feedInteractionV3Styles.js +49 -0
- package/dist/esm/src/components/FI/feedInteractionV3/index.js +29 -0
- package/dist/esm/src/components/FI/inputCommentPost-it/index.js +118 -0
- package/dist/esm/src/components/FI/inputCommentPost-it/inputCommentPost-It.utils.js +20 -0
- package/dist/esm/src/components/FI/inputCommentPost-it/inputCommentPost-ItStyles.js +190 -0
- package/dist/esm/src/components/FI/interactionsModal/InteractionsModalStyles.js +152 -0
- package/dist/esm/src/components/FI/interactionsModal/index.js +43 -0
- package/dist/esm/src/components/FI/modal-invite/index.js +146 -0
- package/dist/esm/src/components/FI/modal-invite/modalInviteStyles.js +115 -0
- package/dist/esm/src/components/FI/notificationCard/index.js +41 -0
- package/dist/esm/src/components/FI/notificationCard/notificationCardStyles.js +84 -0
- package/dist/esm/src/components/FI/notificationPopOver/index.js +59 -0
- package/dist/esm/src/components/FI/notificationPopOver/notificationPopOverStyles.js +112 -0
- package/dist/esm/src/components/FI/postFeed/index.js +53 -0
- package/dist/esm/src/components/FI/postFeed/postFeedStyles.js +181 -0
- package/dist/esm/src/components/FI/searchBox/SearchBoxStyles.js +23 -0
- package/dist/esm/src/components/FI/searchBox/index.js +11 -0
- package/dist/esm/src/components/FI/sessionFilters/index.js +72 -0
- package/dist/esm/src/components/FI/sessionFilters/sessionFiltersStyle.js +80 -0
- package/dist/esm/src/components/FI/smallSRGBanner/frstFundo.png.js +3 -0
- package/dist/esm/src/components/FI/smallSRGBanner/g12.png.js +3 -0
- package/dist/esm/src/components/FI/smallSRGBanner/index.js +12 -0
- package/dist/esm/src/components/FI/smallSRGBanner/smallSRGBannerStyles.js +61 -0
- package/dist/esm/src/components/IJ/ContentCycle/ContentCycleStyles.js +146 -0
- package/dist/esm/src/components/IJ/ContentCycle/index.js +21 -0
- package/dist/esm/src/components/IJ/ListContentCycle/ListContentCycleStyles.js +12 -0
- package/dist/esm/src/components/IJ/ListContentCycle/index.js +11 -0
- package/dist/esm/src/components/IJ/StepLearningCycle/StepLearningCycleStyle.js +94 -0
- package/dist/esm/src/components/IJ/StepLearningCycle/index.js +117 -0
- package/dist/esm/src/components/IJ/favorite/favoriteStyles.js +17 -0
- package/dist/esm/src/components/IJ/favorite/index.js +36 -0
- package/dist/esm/src/components/IJ/learningCycleCard/components/menu/index.js +49 -0
- package/dist/esm/src/components/IJ/learningCycleCard/components/menu/menuStyle.js +28 -0
- package/dist/esm/src/components/IJ/learningCycleCard/index.js +36 -0
- package/dist/esm/src/components/IJ/learningCycleCard/learningCycleCardStyle.js +153 -0
- package/dist/esm/src/components/IJ/listSelector/index.js +39 -0
- package/dist/esm/src/components/IJ/listSelector/listSelectorStyles.js +46 -0
- package/dist/esm/src/components/IJ/pagination/index.js +82 -0
- package/dist/esm/src/components/IJ/pagination/paginationStyles.js +59 -0
- package/dist/esm/src/components/IJ/participantCard/index.js +37 -0
- package/dist/esm/src/components/IJ/participantCard/participantCardStyle.js +273 -0
- package/dist/esm/src/components/IJ/participantCardOld/index.js +58 -0
- package/dist/esm/src/components/IJ/participantCardOld/participantCardStyle.js +293 -0
- package/dist/esm/src/components/IJ/thumbListContent/index.js +28 -0
- package/dist/esm/src/components/IJ/thumbListContent/thumbListContentStyles.js +250 -0
- package/dist/esm/src/components/IncrementarIdeia/icrementarIdeiaStyles.js +115 -0
- package/dist/esm/src/components/IncrementarIdeia/index.js +98 -0
- package/dist/esm/src/components/IncrementarIdeia/useAutosizeTextArea.js +13 -0
- package/dist/esm/src/components/LXP/AccordionList/AccordionList.styles.js +101 -0
- package/dist/esm/src/components/LXP/AccordionList/index.js +26 -0
- package/dist/esm/src/components/LXP/accordionTrack/accordionTrack.js +179 -0
- package/dist/esm/src/components/LXP/accordionTrack/accordionTrackList.js +187 -0
- package/dist/esm/src/components/LXP/accordionTrack/accordionTrackStyle.js +194 -0
- package/dist/esm/src/components/LXP/accordionTrack/contentCourses.js +8 -0
- package/dist/esm/src/components/LXP/accordionTrack/contentCoursesTrails.js +189 -0
- package/dist/esm/src/components/LXP/accordionTrack/vectorDown.js +13 -0
- package/dist/esm/src/components/LXP/accordionTrack/vectorUp.js +13 -0
- package/dist/esm/src/components/LXP/avatarAssociatedChannel/avatarAssociatedChannelStyles.js +83 -0
- package/dist/esm/src/components/LXP/avatarAssociatedChannel/index.js +11 -0
- package/dist/esm/src/components/LXP/avatarChannel/avatarChannelStyles.js +106 -0
- package/dist/esm/src/components/LXP/avatarChannel/index.js +32 -0
- package/dist/esm/src/components/LXP/bannerLxp/bannerLxp.js +150 -0
- package/dist/esm/src/components/LXP/bannerLxp/index.js +124 -0
- package/dist/esm/src/components/LXP/buttonContent/buttonContentStyle.js +63 -0
- package/dist/esm/src/components/LXP/buttonContent/index.js +11 -0
- package/dist/esm/src/components/LXP/calendarLxp/calendar.css.js +6 -0
- package/dist/esm/src/components/LXP/calendarLxp/calendarLxp.module.css.js +7 -0
- package/dist/esm/src/components/LXP/calendarLxp/defaultRanges.js +79 -0
- package/dist/esm/src/components/LXP/calendarLxp/index.js +26 -0
- package/dist/esm/src/components/LXP/colorpicker/colorpickerStyles.js +43 -0
- package/dist/esm/src/components/LXP/colorpicker/index.js +20 -0
- package/dist/esm/src/components/LXP/contentSwitcher/contentSwitcherStyle.js +94 -0
- package/dist/esm/src/components/LXP/contentSwitcher/index.js +10 -0
- package/dist/esm/src/components/LXP/contentThumbnails/contentThumbnailsStyle.js +184 -0
- package/dist/esm/src/components/LXP/contentThumbnails/index.js +77 -0
- package/dist/esm/src/components/LXP/contentThumbnails/vectorDown.js +13 -0
- package/dist/esm/src/components/LXP/contentThumbnails/vectorUp.js +13 -0
- package/dist/esm/src/components/LXP/fileUpload/fileUploadStyles.js +88 -0
- package/dist/esm/src/components/LXP/fileUpload/index.js +21 -0
- package/dist/esm/src/components/LXP/headerContent/headerContent.js +218 -0
- package/dist/esm/src/components/LXP/headerContent/index.js +45 -0
- package/dist/esm/src/components/LXP/login/index.js +157 -0
- package/dist/esm/src/components/LXP/login/loginStyle.js +271 -0
- package/dist/esm/src/components/LXP/manageLerningCicles/index.js +40 -0
- package/dist/esm/src/components/LXP/manageLerningCicles/manageLearningCicles.Style.js +84 -0
- package/dist/esm/src/components/LXP/modalNewFeatures/ModalNewFeatures.style.js +204 -0
- package/dist/esm/src/components/LXP/modalNewFeatures/index.js +41 -0
- package/dist/esm/src/components/LXP/participantThumbnails/index.js +20 -0
- package/dist/esm/src/components/LXP/participantThumbnails/participantThumbnails.js +94 -0
- package/dist/esm/src/components/LXP/participantThumbnailsList/index.js +35 -0
- package/dist/esm/src/components/LXP/popOver/index.js +68 -0
- package/dist/esm/src/components/LXP/popOver/popOverStyle.js +130 -0
- package/dist/esm/src/components/LXP/popOverLXP-antigo/index.js +23 -0
- package/dist/esm/src/components/LXP/popOverLXP-antigo/popOverLXPStyles.js +123 -0
- package/dist/esm/src/components/LXP/progressBar/index.js +11 -0
- package/dist/esm/src/components/LXP/progressBar/progressStyle.js +32 -0
- package/dist/esm/src/components/LXP/searchResults/index.js +15 -0
- package/dist/esm/src/components/LXP/searchResults/searchResultsStyles.js +63 -0
- package/dist/esm/src/components/LXP/selectLXP/SelectLXP.js +128 -0
- package/dist/esm/src/components/LXP/selectLXP/SelectLXPContext.js +6 -0
- package/dist/esm/src/components/LXP/selectLXP/SelectLXPItem.js +40 -0
- package/dist/esm/src/components/LXP/selectLXP/index.js +9 -0
- package/dist/esm/src/components/LXP/star-metric/index.js +13 -0
- package/dist/esm/src/components/LXP/star-metric/starMetricStyles.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/headerVectorElipses.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/loadingThumbnails.js +9 -0
- package/dist/esm/src/components/LXP/thumbnails/thumbnails.js +119 -0
- package/dist/esm/src/components/LXP/thumbnails/thumbnailsDraggable.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/thumbnailsStyle.js +188 -0
- package/dist/esm/src/components/LXP/thumbnails/vectorCross.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/vectorEllipse.js +13 -0
- package/dist/esm/src/components/LXP/tooltip/index.js +11 -0
- package/dist/esm/src/components/LXP/tooltip/tooltipStyle.js +131 -0
- package/dist/esm/src/components/LXP/video/index.js +10 -0
- package/dist/esm/src/components/LogoFRST/index.js +13 -0
- package/dist/esm/src/components/LogoFRST/logoFRST.module.css.js +7 -0
- package/dist/esm/src/components/ModalConfirme/index.js +10 -0
- package/dist/esm/src/components/ModalConfirme/styles.js +51 -0
- package/dist/esm/src/components/accordion-tabs/accordionTabsStyles.js +100 -0
- package/dist/esm/src/components/accordion-tabs/index.js +34 -0
- package/dist/esm/src/components/actioExperience/actioExperience.styles.js +163 -0
- package/dist/esm/src/components/actioExperience/icons.js +19 -0
- package/dist/esm/src/components/actioExperience/index.js +20 -0
- package/dist/esm/src/components/audio-player/audioPlayerStyles.js +329 -0
- package/dist/esm/src/components/audio-player/index.js +110 -0
- package/dist/esm/src/components/avatar/avatarStyles.js +24 -0
- package/dist/esm/src/components/avatar/index.js +17 -0
- package/dist/esm/src/components/brainstorming-votar/index.js +10 -0
- package/dist/esm/src/components/brainstorming-votar/votarStyles.js +85 -0
- package/dist/esm/src/components/buttons/buttonStyle.js +389 -0
- package/dist/esm/src/components/buttons/index.js +31 -0
- package/dist/esm/src/components/calendar/calendarStyle.js +185 -0
- package/dist/esm/src/components/calendar/index.js +60 -0
- package/dist/esm/src/components/card-trail/cardTrailStyle.js +29 -0
- package/dist/esm/src/components/card-trail/index.js +50 -0
- package/dist/esm/src/components/card-trail/moduleStyle.js +92 -0
- package/dist/esm/src/components/card-trail-carousel/index.js +15 -0
- package/dist/esm/src/components/cardLT/AvatarWithInfo/avatarWithInfo.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/AvatarWithInfo/index.js +16 -0
- package/dist/esm/src/components/cardLT/AvatarWithInfo/vector.js +13 -0
- package/dist/esm/src/components/cardLT/BannerProblem/BannerProblem.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/BannerProblem/index.js +312 -0
- package/dist/esm/src/components/cardLT/BannerProblem/styles.js +30 -0
- package/dist/esm/src/components/cardLT/MessageBox/MessageBox.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/MessageBox/icons/errorIcon.js +13 -0
- package/dist/esm/src/components/cardLT/MessageBox/icons/successIcon.js +13 -0
- package/dist/esm/src/components/cardLT/MessageBox/icons/warningIcon.js +13 -0
- package/dist/esm/src/components/cardLT/MessageBox/index.js +59 -0
- package/dist/esm/src/components/cardLT/Rating/Rating.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/Rating/index.js +26 -0
- package/dist/esm/src/components/cardLT/Rating/starIcon.js +13 -0
- package/dist/esm/src/components/cardLT/RatingCurtidas/RatingCurtidas.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/RatingCurtidas/index.js +15 -0
- package/dist/esm/src/components/cardLT/RocketButton/RocketButtonIcon.js +13 -0
- package/dist/esm/src/components/cardLT/RocketButton/index.js +26 -0
- package/dist/esm/src/components/cardLT/StepsMission/Planet.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/StepsMission/StepMission.js +108 -0
- package/dist/esm/src/components/cardLT/StepsMission/Steps.js +68 -0
- package/dist/esm/src/components/cardLT/TextIcon/TextIcon.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/TextIcon/index.js +14 -0
- package/dist/esm/src/components/cards/base/index.js +8 -0
- package/dist/esm/src/components/cards/cardDefinicaoFase/cardDefinicaoFase.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardDefinicaoFase/index.js +30 -0
- package/dist/esm/src/components/cards/cardFaseDesafios/index.js +30 -0
- package/dist/esm/src/components/cards/cardFaseDesafios/styles.js +160 -0
- package/dist/esm/src/components/cards/cardProblem/cardProblem.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardProblem/index.js +144 -0
- package/dist/esm/src/components/cards/cardProblemGestor/cardProblemaGestor.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardProblemGestor/index.js +26 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/Aprendizado.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/AprendizadoPressed.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/Conquista.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/ConquistaPressed.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/cardResultConquista.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardResultConquista/index.js +40 -0
- package/dist/esm/src/components/cards/user/index.js +85 -0
- package/dist/esm/src/components/challenge-cards/challengeCardStyles.js +246 -0
- package/dist/esm/src/components/challenge-cards/dropdownMenuStyle.js +85 -0
- package/dist/esm/src/components/challenge-cards/index.js +174 -0
- package/dist/esm/src/components/checkmark/checkmarkStyles.js +24 -0
- package/dist/esm/src/components/checkmark/index.js +32 -0
- package/dist/esm/src/components/comment-post/commentPostStyles.js +23 -0
- package/dist/esm/src/components/comment-post/index.js +16 -0
- package/dist/esm/src/components/commentary-box/commentaryBox.utils.js +24 -0
- package/dist/esm/src/components/commentary-box/commentaryBoxStyles.js +240 -0
- package/dist/esm/src/components/commentary-box/index.js +104 -0
- package/dist/esm/src/components/commentaryBoxV2/CommentaryBoxV2.styles.js +282 -0
- package/dist/esm/src/components/commentaryBoxV2/index.js +157 -0
- package/dist/esm/src/components/commentaryBoxV2/utilitiesComponents/inputEdit/index.js +45 -0
- package/dist/esm/src/components/commentaryBoxV2/utilitiesComponents/inputEdit/inputEdit.styles.js +54 -0
- package/dist/esm/src/components/conquistaCarrossel/index.js +26 -0
- package/dist/esm/src/components/counter-like/counterLikeStyles.js +26 -0
- package/dist/esm/src/components/counter-like/index.js +28 -0
- package/dist/esm/src/components/criar-ideia/criarIdeiaStyles.js +144 -0
- package/dist/esm/src/components/criar-ideia/index.js +58 -0
- package/dist/esm/src/components/criar-ideia/useAutosizeTextArea.js +13 -0
- package/dist/esm/src/components/demo/stepController/StepControllerStyle.js +47 -0
- package/dist/esm/src/components/demo/stepController/index.js +12 -0
- package/dist/esm/src/components/dropdown-profile-menu/dropdownProfileMenuStyle.js +162 -0
- package/dist/esm/src/components/dropdown-profile-menu/index.js +84 -0
- package/dist/esm/src/components/emoji-picker/emojiPickerStyles.js +61 -0
- package/dist/esm/src/components/emoji-picker/index.js +87 -0
- package/dist/esm/src/components/exclusive-class/exclusiveClassStyles.js +32 -0
- package/dist/esm/src/components/exclusive-class/index.js +13 -0
- package/dist/esm/src/components/expand-button/expandButtonStyle.js +47 -0
- package/dist/esm/src/components/expand-button/index.js +23 -0
- package/dist/esm/src/components/field-search-dropdown/fieldSearchStyle.js +139 -0
- package/dist/esm/src/components/field-search-dropdown/index.js +105 -0
- package/dist/esm/src/components/filter-accordion-checkbox/filterAccordionCheckbox.utils.js +7 -0
- package/dist/esm/src/components/filter-accordion-checkbox/index.js +135 -0
- package/dist/esm/src/components/filtro-galeria-desafio/index.js +59 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/MultiSelectDemo.js +245 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/icons/arrowCarrosselDown.png.js +3 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/icons/arrow_carrossel_down.png.js +3 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/primeflex.css.js +6 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/primereact.css.js +6 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/theme.css.js +6 -0
- package/dist/esm/src/components/form-elements/checkbox/checkboxStyle.js +36 -0
- package/dist/esm/src/components/form-elements/checkbox/index.js +16 -0
- package/dist/esm/src/components/form-elements/helperTextBox/helperTextBox.js +9 -0
- package/dist/esm/src/components/form-elements/helperTextBox/styles.js +20 -0
- package/dist/esm/src/components/form-elements/table/index.js +37 -0
- package/dist/esm/src/components/form-elements/table/parts/TableBody/index.js +22 -0
- package/dist/esm/src/components/form-elements/table/parts/TableBody/tableStyle.js +50 -0
- package/dist/esm/src/components/form-elements/table/parts/TableHead/index.js +11 -0
- package/dist/esm/src/components/form-elements/table/parts/TableHead/tableStyle.js +24 -0
- package/dist/esm/src/components/form-elements/table/tableStyle.js +49 -0
- package/dist/esm/src/components/form-elements/table-actions/index.js +82 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/CollaboratorAvatar/collaboratorAvatarStyle.js +12 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/CollaboratorAvatar/index.js +23 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/DateLimit/dateLimitStyle.js +28 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/DateLimit/index.js +8 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/EmptyState/emptyStateStyle.js +57 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/EmptyState/index.js +22 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/TagStatus/index.js +8 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/TagStatus/tagStatusStyle.js +58 -0
- package/dist/esm/src/components/form-elements/table-actions/tableActionsStyle.js +110 -0
- package/dist/esm/src/components/form-elements/textarea/index.js +8 -0
- package/dist/esm/src/components/form-elements/textfield/index.js +42 -0
- package/dist/esm/src/components/form-elements/textfield/textFieldStyle.js +169 -0
- package/dist/esm/src/components/global-menu/globalMenuStyles.js +385 -0
- package/dist/esm/src/components/global-menu/index.js +181 -0
- package/dist/esm/src/components/header-improvement-idea/headerImprovementIdeaStyles.js +18 -0
- package/dist/esm/src/components/header-improvement-idea/index.js +24 -0
- package/dist/esm/src/components/header-user/headerUserStyles.js +50 -0
- package/dist/esm/src/components/header-user/index.js +13 -0
- package/dist/esm/src/components/headerChallenge/headerChallengeStyle.js +104 -0
- package/dist/esm/src/components/headerChallenge/index.js +9 -0
- package/dist/esm/src/components/hypothesisComponent/hypothesisComponent.style.js +220 -0
- package/dist/esm/src/components/hypothesisComponent/index.js +145 -0
- package/dist/esm/src/components/hypothesisComponent/types.js +8 -0
- package/dist/esm/src/components/input-comment/index.js +69 -0
- package/dist/esm/src/components/input-comment/inputCommentStyles.js +142 -0
- package/dist/esm/src/components/input-comment/mentions.js +18 -0
- package/dist/esm/src/components/input-comment/mentionsStyle.js +126 -0
- package/dist/esm/src/components/input-comment/useInputHook.js +375 -0
- package/dist/esm/src/components/input-comment/useMentions.js +39 -0
- package/dist/esm/src/components/input-comment-v2/index.js +81 -0
- package/dist/esm/src/components/input-comment-v2/inputCommentStyles.js +101 -0
- package/dist/esm/src/components/item-lateral-menu/index.js +34 -0
- package/dist/esm/src/components/item-lateral-menu/itemLateralMenuStyles.js +110 -0
- package/dist/esm/src/components/item-menu-global/index.js +11 -0
- package/dist/esm/src/components/item-menu-global/itemMenuGlobalStyles.js +74 -0
- package/dist/esm/src/components/lateral-menu/index.js +21 -0
- package/dist/esm/src/components/lateral-menu/lateralMenuStyles.js +65 -0
- package/dist/esm/src/components/learning-steps/index.js +23 -0
- package/dist/esm/src/components/learning-steps/learningStepsStyles.js +39 -0
- package/dist/esm/src/components/menu-more/index.js +31 -0
- package/dist/esm/src/components/menu-more/menuMoreStyles.js +136 -0
- package/dist/esm/src/components/mini-button/index.js +15 -0
- package/dist/esm/src/components/mini-button/miniButtonStyle.js +108 -0
- package/dist/esm/src/components/modal/modalBase/index.js +31 -0
- package/dist/esm/src/components/modal/modalBase/modalBase.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalLXP/Modal.js +24 -0
- package/dist/esm/src/components/modal/modalLXP/modal.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalLearningTech/index.js +17 -0
- package/dist/esm/src/components/modal/modalLearningTech/modalLearningTech.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalShowUsers/index.js +11 -0
- package/dist/esm/src/components/modal/modalShowUsers/styles.js +122 -0
- package/dist/esm/src/components/modal/modalVideo/index.js +56 -0
- package/dist/esm/src/components/modal/modalVideo/modalVideo.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalWelcome/index.js +43 -0
- package/dist/esm/src/components/modal/modalWelcome/styles.js +38 -0
- package/dist/esm/src/components/modal/statusProblema/index.js +33 -0
- package/dist/esm/src/components/modal/statusProblema/problemaFRST.png.js +3 -0
- package/dist/esm/src/components/modal/statusProblema/statusProblema.module.css.js +7 -0
- package/dist/esm/src/components/quantidadeDesafios/index.js +73 -0
- package/dist/esm/src/components/quantidadeDesafios/quantidadeDesafios.js +95 -0
- package/dist/esm/src/components/quantidadeDesafios/stats.js +8 -0
- package/dist/esm/src/components/quantidadeDesafios/statsWithResult.js +8 -0
- package/dist/esm/src/components/scroll-container/index.js +90 -0
- package/dist/esm/src/components/scroll-container/scrollContainer.utils.js +7 -0
- package/dist/esm/src/components/scroll-container/scrollContainerStyles.js +85 -0
- package/dist/esm/src/components/search-field/index.js +19 -0
- package/dist/esm/src/components/search-field/searchFieldStyles.js +87 -0
- package/dist/esm/src/components/show-more/index.js +20 -0
- package/dist/esm/src/components/show-more/showMoreStyles.js +26 -0
- package/dist/esm/src/components/speech-bubble/index.js +11 -0
- package/dist/esm/src/components/speech-bubble/speechBubbleStyles.js +100 -0
- package/dist/esm/src/components/step-card/index.js +13 -0
- package/dist/esm/src/components/step-card/stepCardStyles.js +90 -0
- package/dist/esm/src/components/tag/index.js +22 -0
- package/dist/esm/src/components/totalizer-card/index.js +16 -0
- package/dist/esm/src/components/totalizer-card/totalizerCardStyles.js +84 -0
- package/dist/esm/src/components/users-challenge/index.js +13 -0
- package/dist/esm/src/components/users-challenge/styles.js +125 -0
- package/dist/esm/src/components/users-challenge/variant-feed/index.js +34 -0
- package/dist/esm/src/components/users-challenge/variant-feed/styles.js +125 -0
- package/dist/esm/src/components/users-challenge/variant-form/index.js +23 -0
- package/dist/esm/src/components/users-challenge/variant-form/styles.js +125 -0
- package/dist/esm/src/components/users-challenge/variant-lxp/index.js +21 -0
- package/dist/esm/src/components/users-challenge/variant-lxp/styles.js +122 -0
- package/dist/esm/src/components/users-challenge/variant-vitrine/index.js +34 -0
- package/dist/esm/src/components/users-challenge/variant-vitrine/styles.js +123 -0
- package/dist/esm/src/shared/global.css.js +6 -0
- package/dist/esm/src/shared/globalComponentsStyle.js +83 -0
- package/dist/esm/src/shared/icons.js +531 -0
- package/dist/esm/src/theme/index.js +7 -0
- package/dist/esm/src/theme/tokens.js +235 -0
- package/dist/esm/src/utilityFunctions/abbreviateMiddleSurnames.js +23 -0
- package/dist/esm/src/utilityFunctions/buildStringWithHTML.js +10 -0
- package/dist/esm/src/utilityFunctions/createUUID.js +11 -0
- package/dist/index.js +15175 -15175
- package/dist/src/components/mini-button/index.d.ts +1 -1
- package/dist/src/components/mini-button/index.d.ts.map +1 -1
- package/package.json +120 -116
- package/public/customIcons/CheckIcon.tsx +16 -16
- package/public/customIcons/CircledAlert.tsx +21 -21
- package/public/customIcons/CircledCheck.tsx +20 -20
- package/public/customIcons/CloseIcon.tsx +23 -23
- package/public/customIcons/DefaultProfile.tsx +15 -15
- package/public/customIcons/ExcludeVoteIcon.tsx +40 -40
- package/public/customIcons/FrstLogoChallengeIcon.tsx +20 -20
- package/public/customIcons/FrstLogoIcon.tsx +8 -8
- package/public/customIcons/LanguageIcon.tsx +24 -24
- package/public/customIcons/SmallTrash.tsx +20 -20
- package/public/customIcons/SwitchVoteIcon.tsx +22 -22
- package/public/customIcons/TagAlert.tsx +10 -10
- package/public/customIcons/VoteCurrentIcon.tsx +22 -22
- package/public/customIcons/VoteIcon.tsx +41 -41
- package/public/customIcons/WarningIcon.tsx +21 -21
- package/public/customIcons/index.ts +15 -15
- package/public/customIcons/newVoteIcon.tsx +36 -36
- package/public/index.html +43 -43
- package/public/locales/en-US.json +33 -33
- package/public/locales/es.json +34 -34
- package/public/locales/pt-BR.json +41 -41
- package/public/manifest.json +15 -15
- package/public/robots.txt +3 -3
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const Container = styled.div `
|
|
4
|
+
padding: 1px 24px 0px 24px;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
background-color: ${({ theme }) => theme.colors.shadeWhite};
|
|
8
|
+
border-bottom-left-radius: 8px;
|
|
9
|
+
border-bottom-right-radius: 8px;
|
|
10
|
+
border: 1px solid ${({ theme }) => theme.colors.borderPrimary};
|
|
11
|
+
border-top: 0px !important;
|
|
12
|
+
`;
|
|
13
|
+
const infoContent = styled.div `
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
position: relative;
|
|
19
|
+
border-bottom: 1px solid ${({ theme }) => theme.colors.borderPrimary};
|
|
20
|
+
font-family: 'Work Sans';
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
padding: 12px;
|
|
24
|
+
padding-top: 24px;
|
|
25
|
+
`;
|
|
26
|
+
const infoContentWithView = styled.div `
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
align-items: center;
|
|
31
|
+
border-bottom: 1px solid ${({ theme }) => theme.colors.borderPrimary};
|
|
32
|
+
font-family: 'Work Sans';
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
padding-top: 12px;
|
|
36
|
+
position: static !important;
|
|
37
|
+
`;
|
|
38
|
+
const info = styled.div `
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
position: absolute;
|
|
44
|
+
margin-bottom: 12px;
|
|
45
|
+
${({ theme }) => theme.fonts.textMessageComponentsBodyRegular};
|
|
46
|
+
`;
|
|
47
|
+
const infoWithView = styled.div `
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
flex-direction: row;
|
|
52
|
+
margin-bottom: 12px;
|
|
53
|
+
font-family: PT Sans;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
line-height: 110%;
|
|
57
|
+
letter-spacing: 0%;
|
|
58
|
+
position: static !important;
|
|
59
|
+
`;
|
|
60
|
+
const buttonsContent = styled.div `
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: row;
|
|
63
|
+
justify-content: space-around;
|
|
64
|
+
align-items: center;
|
|
65
|
+
padding: 16px;
|
|
66
|
+
`;
|
|
67
|
+
const buttons = styled.button `
|
|
68
|
+
display: flex;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
align-items: center;
|
|
71
|
+
flex-direction: row;
|
|
72
|
+
border: none;
|
|
73
|
+
background-color: inherit;
|
|
74
|
+
${({ theme }) => theme.fonts.textMessageComponentsBodyBold};
|
|
75
|
+
color: ${({ theme }) => theme.colors.neutralsGrey2};
|
|
76
|
+
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
gap: 8px;
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
color: ${({ theme }) => theme.colors.linkHover};
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
const reviewContainer = styled.div `
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
align-items: center;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
margin-top: 28px;
|
|
90
|
+
${({ theme }) => theme.fonts.textMessageComponentsBodyBold};
|
|
91
|
+
`;
|
|
92
|
+
const reviewContent = styled.div `
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: space-around;
|
|
95
|
+
align-items: center;
|
|
96
|
+
flex-direction: row;
|
|
97
|
+
margin-top: 16px;
|
|
98
|
+
margin-bottom: 32px;
|
|
99
|
+
`;
|
|
100
|
+
styled.div `
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
align-items: center;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
padding-bottom: 32px;
|
|
106
|
+
`;
|
|
107
|
+
styled.div `
|
|
108
|
+
display: flex;
|
|
109
|
+
justify-content: flex-start;
|
|
110
|
+
align-items: flex-start;
|
|
111
|
+
flex-direction: row;
|
|
112
|
+
width: 100%;
|
|
113
|
+
margin-top: 28px;
|
|
114
|
+
`;
|
|
115
|
+
styled.div `
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: flex-start;
|
|
118
|
+
align-items: center;
|
|
119
|
+
flex-direction: row;
|
|
120
|
+
width: 100%;
|
|
121
|
+
margin-top: 12px;
|
|
122
|
+
`;
|
|
123
|
+
styled.div `
|
|
124
|
+
border: none;
|
|
125
|
+
background: none;
|
|
126
|
+
margin-left: 8px;
|
|
127
|
+
`;
|
|
128
|
+
styled.div `
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: flex-start;
|
|
131
|
+
align-items: flex-start;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
width: 100%;
|
|
134
|
+
margin-top: 16px;
|
|
135
|
+
`;
|
|
136
|
+
|
|
137
|
+
export { Container, buttons, buttonsContent, info, infoContent, infoContentWithView, infoWithView, reviewContainer, reviewContent };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import Rating from '../../EBR/rating/index.js';
|
|
3
|
+
import { ThumbsUpCovered2, ThumbsUpIcon2, TalkIcon, StarOutlined2 } from '../../../shared/icons.js';
|
|
4
|
+
import { useState, useEffect } from 'react';
|
|
5
|
+
import { ThemeProvider } from 'styled-components';
|
|
6
|
+
import { FRSTTheme } from '../../../theme/index.js';
|
|
7
|
+
import { Container, infoContent, info, infoContentWithView, infoWithView, buttonsContent, buttons, reviewContainer, reviewContent } from './feedInteractionStyles.js';
|
|
8
|
+
|
|
9
|
+
function FeedInteraction(props) {
|
|
10
|
+
const [openReview, setOpenReview] = useState(false);
|
|
11
|
+
const [openComments, setOpenComments] = useState(false);
|
|
12
|
+
const [isVisibleComments, setIsVisibleComments] = useState(!props?.hideComments);
|
|
13
|
+
const [stateTotalComments, setStateTotalComments] = useState(props.qtdComments);
|
|
14
|
+
const [ratingImpacto, setRatingImpacto] = useState(props.ratingImpacto || 0);
|
|
15
|
+
const [ratingRelevancia, setRatingRelevancia] = useState(props.ratingRelevancia || 0);
|
|
16
|
+
const [ratingPostReview, setRatingPostReview] = useState(props.ratingPostReview || 0);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
setIsVisibleComments(!props?.hideComments);
|
|
19
|
+
}, [props?.hideComments]);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setStateTotalComments(props.qtdComments);
|
|
22
|
+
}, [props.qtdComments]);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setRatingImpacto(props.ratingImpacto || 0);
|
|
25
|
+
}, [props.ratingImpacto]);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
setRatingRelevancia(props.ratingRelevancia || 0);
|
|
28
|
+
}, [props.ratingRelevancia]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
setRatingPostReview(props.ratingPostReview || 0);
|
|
31
|
+
}, [props.ratingPostReview]);
|
|
32
|
+
const OnReviewClick = () => {
|
|
33
|
+
setOpenReview(!openReview);
|
|
34
|
+
setOpenComments(false);
|
|
35
|
+
};
|
|
36
|
+
const OnCommentsClick = () => {
|
|
37
|
+
setOpenComments(!openComments);
|
|
38
|
+
setOpenReview(false);
|
|
39
|
+
};
|
|
40
|
+
const handleImpactoChangeClick = (value) => {
|
|
41
|
+
setRatingImpacto(value);
|
|
42
|
+
props?.handleImpactoChange(value);
|
|
43
|
+
};
|
|
44
|
+
const handleRelevanciaChangeClick = (value) => {
|
|
45
|
+
setRatingRelevancia(value);
|
|
46
|
+
props?.handleRelevanciaChange(value);
|
|
47
|
+
};
|
|
48
|
+
const handlePostReviewChangeClick = (value) => {
|
|
49
|
+
setRatingPostReview(value);
|
|
50
|
+
props?.handlePostReviewChange(value);
|
|
51
|
+
};
|
|
52
|
+
const { isVisibleAvaliations = true } = props;
|
|
53
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: jsxs(Container, { style: { ...props.style }, id: props.id, children: [!props.textTotalView && (props.qtdLikes || stateTotalComments) ? (jsxs(infoContent, { children: [props?.qtdLikes ? (jsxs(info, { style: { left: 0 }, children: [jsx(ThumbsUpCovered2, {}), " \u00A0", jsx("span", { onClick: () => props?.handleShowLikes?.(), style: {
|
|
54
|
+
cursor: 'pointer',
|
|
55
|
+
color: '#222222',
|
|
56
|
+
fontFamily: 'PT Sans',
|
|
57
|
+
fontSize: '16px',
|
|
58
|
+
lineHeight: '16x',
|
|
59
|
+
fontWeight: 400,
|
|
60
|
+
textDecoration: 'underline'
|
|
61
|
+
}, children: props.qtdLikes })] })) : null, stateTotalComments ? (jsx(info, { style: { right: 0 }, children: stateTotalComments })) : null] })) : (jsx(Fragment, { children: (props.textTotalView || props.qtdLikes || stateTotalComments) && (jsxs(infoContentWithView, { children: [jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px' }, children: [props.qtdLikes && (jsxs(infoWithView, { onClick: () => props?.handleShowLikes?.(), children: [jsx(ThumbsUpCovered2, {}), " \u00A0", jsx("span", { onClick: () => props?.handleShowLikes?.(), style: {
|
|
62
|
+
cursor: 'pointer',
|
|
63
|
+
color: '#222222',
|
|
64
|
+
fontFamily: 'PT Sans',
|
|
65
|
+
fontSize: '16px',
|
|
66
|
+
lineHeight: '16x',
|
|
67
|
+
fontWeight: 400,
|
|
68
|
+
textDecoration: 'underline'
|
|
69
|
+
}, children: props.qtdLikes })] })), props?.qtdLikes && stateTotalComments && jsx("div", { children: "\u2022" }), stateTotalComments && (jsxs(infoWithView, { children: [" ", stateTotalComments, " "] }))] }), props.textTotalView && (jsx(infoWithView, { style: { color: '#222', cursor: 'pointer' }, onClick: () => props.handleClickTextTotalViews?.(), children: props.textTotalView }))] })) })), jsxs(buttonsContent, { children: [props.isLiked ? (jsxs(buttons, { onClick: () => props.handleLikeClick(), style: { color: '#444' }, children: [jsx(ThumbsUpIcon2, {}), props.textDeslike] })) : (jsxs(buttons, { onClick: () => props.handleLikeClick(), style: { color: '#444' }, children: [jsx(ThumbsUpIcon2, {}), props.textLikes] })), isVisibleComments && (jsxs(buttons, { onClick: OnCommentsClick, style: { color: '#444' }, children: [jsx(TalkIcon, { fill: 'currentColor' }), " ", props.textComments] })), isVisibleAvaliations && (jsxs(buttons, { onClick: OnReviewClick, style: { color: '#444' }, children: [jsx(StarOutlined2, { fill: 'currentColor' }), " ", props.textAvaluation] }))] }), openReview && (jsxs(reviewContainer, { children: [props.textAvaluationTitle, jsxs(reviewContent, { children: [props.isChallengeReview && (jsxs("div", { style: {
|
|
70
|
+
display: 'flex',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
flexDirection: 'column'
|
|
74
|
+
}, children: [jsx(Rating, { isVisibleNumberRating: false, orientation: "horizontal", qtdStars: 5, sizeStars: 20, marginStars: '3.5px', disabled: props.isDisabledAvaluation, rating: ratingImpacto, handleRating: handleImpactoChangeClick, removeEvaluation: props?.removeEvaluation, evaluationType: "impact", isUserLoggedChallenge: props?.isUserLoggedChallenge, valueRatingOwner: props?.valueRatingImpacto }), jsx("span", { children: props.textImpacto })] })), props.isChallengeReview && (jsxs("div", { style: {
|
|
75
|
+
display: 'flex',
|
|
76
|
+
justifyContent: 'center',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
flexDirection: 'column',
|
|
79
|
+
marginLeft: 24
|
|
80
|
+
}, children: [jsx(Rating, { isVisibleNumberRating: false, orientation: "horizontal", qtdStars: 5, sizeStars: 20, marginStars: '3.5px', disabled: props.isDisabledAvaluation, rating: ratingRelevancia, handleRating: handleRelevanciaChangeClick, removeEvaluation: props?.removeEvaluation, evaluationType: "relevance", isUserLoggedChallenge: props?.isUserLoggedChallenge, valueRatingOwner: props?.valueRatingRelevancia }), jsx("span", { children: props.textRelevancia })] })), props.isPostReview && (jsx("div", { style: {
|
|
81
|
+
display: 'flex',
|
|
82
|
+
justifyContent: 'center',
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
flexDirection: 'column'
|
|
85
|
+
}, children: jsx(Rating, { isVisibleNumberRating: false, orientation: "horizontal", qtdStars: 5, sizeStars: 20, marginStars: '3.5px', disabled: props.isDisabledAvaluation, rating: ratingPostReview, handleRating: handlePostReviewChangeClick, removeEvaluation: props?.removeEvaluation }) }))] })] })), openComments && props?.isCommentV2 && jsx("div", { children: props?.childrenCommentV2 })] }) }));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { FeedInteraction as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const Container = styled.div `
|
|
4
|
+
width: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
`;
|
|
9
|
+
const TopBar = styled.div `
|
|
10
|
+
display: flex;
|
|
11
|
+
width: 100%;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding: 8px 0;
|
|
15
|
+
`;
|
|
16
|
+
const LeftAction = styled.button `
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: 6px;
|
|
20
|
+
border: none;
|
|
21
|
+
background: transparent;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
color: #444;
|
|
25
|
+
`;
|
|
26
|
+
const RightInfo = styled.div `
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 20px;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
color: #444;
|
|
32
|
+
`;
|
|
33
|
+
const Divider = styled.div `
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 1px;
|
|
36
|
+
background: #e0e0e0;
|
|
37
|
+
`;
|
|
38
|
+
const BottomInfo = styled.div `
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 6px;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
color: #f58634;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
|
|
46
|
+
span {
|
|
47
|
+
color: #222;
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
export { BottomInfo, Container, Divider, LeftAction, RightInfo, TopBar };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { ThumbsUpIcon2, ThumbsUpCovered2 } from '../../../shared/icons.js';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
import { FRSTTheme } from '../../../theme/index.js';
|
|
6
|
+
import { Container, TopBar, LeftAction, RightInfo, Divider, BottomInfo } from './feedInteractionStyles.js';
|
|
7
|
+
|
|
8
|
+
function FeedInteractionV2(props) {
|
|
9
|
+
const [openComments, setOpenComments] = useState(false);
|
|
10
|
+
const [isVisibleComments, setIsVisibleComments] = useState(!props?.hideComments);
|
|
11
|
+
const [stateTotalComments, setStateTotalComments] = useState(props.qtdComments);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
setIsVisibleComments(!props?.hideComments);
|
|
14
|
+
}, [props?.hideComments]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
setStateTotalComments(props.qtdComments);
|
|
17
|
+
}, [props.qtdComments]);
|
|
18
|
+
const qtdLikesText = props?.qtdLikes !== "1" ? `${props.qtdLikes} pessoas curtiram esse desafio` : '1 pessoa curtiu esse desafio';
|
|
19
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: jsxs(Container, { style: { ...props.style }, id: props.id, children: [jsxs(TopBar, { children: [jsxs(LeftAction, { onClick: () => props.handleLikeClick?.(), children: [jsx(ThumbsUpIcon2, {}), jsxs("span", { style: { marginTop: '2px' }, children: [" ", props.isLiked ? props.textDeslike : props.textLikes] })] }), jsxs(RightInfo, { children: [stateTotalComments && (jsx("span", { children: stateTotalComments })), props.textTotalView && (jsx("span", { style: { cursor: 'pointer' }, onClick: () => props.handleClickTextTotalViews?.(), children: props.textTotalView }))] })] }), jsx(Divider, {}), props.qtdLikes && (jsxs(BottomInfo, { onClick: () => props.handleShowLikes?.(), children: [jsx(ThumbsUpCovered2, {}), jsx("span", { children: qtdLikesText })] })), openComments && props.isCommentV2 && (jsx("div", { children: props.childrenCommentV2 }))] }) }));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { FeedInteractionV2 as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const Container = styled.div `
|
|
4
|
+
padding: 16px 24px 20px;
|
|
5
|
+
border-top: 1px solid ${({ theme }) => theme.colors.borderPrimary};
|
|
6
|
+
background: ${({ theme }) => theme.colors.shadeWhite};
|
|
7
|
+
`;
|
|
8
|
+
const InteractionRow = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 24px;
|
|
12
|
+
`;
|
|
13
|
+
const InteractionButton = styled.button `
|
|
14
|
+
border: 0;
|
|
15
|
+
background: transparent;
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 8px;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
padding: 0;
|
|
21
|
+
color: ${({ theme, $active, $primaryColor }) => ($active ? $primaryColor : theme.colors.neutralsGrey3)};
|
|
22
|
+
transition: transform 150ms ease-in-out;
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
transform: scale(1.04);
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
styled.div `
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
color: ${({ theme }) => theme.colors.neutralsGrey3};
|
|
33
|
+
`;
|
|
34
|
+
const IconBubble = styled.div `
|
|
35
|
+
width: 34px;
|
|
36
|
+
height: 34px;
|
|
37
|
+
border-radius: 999px;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
background: ${({ theme, $active, $primaryColor }) => $active ? `${($primaryColor || theme.colors.primary1)}1a` : theme.colors.neutralsGrey6};
|
|
42
|
+
`;
|
|
43
|
+
const InteractionValue = styled.span `
|
|
44
|
+
font-family: 'Work Sans';
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
export { Container, IconBubble, InteractionButton, InteractionRow, InteractionValue };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { ThumbsUp, Eye, MessageCircle } from 'lucide-react';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
import { FRSTTheme } from '../../../theme/index.js';
|
|
6
|
+
import { Container, InteractionRow, InteractionButton, IconBubble, InteractionValue } from './feedInteractionV3Styles.js';
|
|
7
|
+
|
|
8
|
+
const DEFAULT_PRIMARY_COLOR = '#FF8A15';
|
|
9
|
+
function FeedInteractionV3(props) {
|
|
10
|
+
const { style, primaryColor = DEFAULT_PRIMARY_COLOR, initialIsLiked = false, likeCount = 0, viewCount = 0, commentCount = 0, onLikeToggle, handleLikeClick, hiddenViewButton = false, hiddenCommentButton = false, hiddenLikeButton = false, handleViewLikesClick = () => { }, handleCommentsClick = () => { }, handleViewsClick = () => { } } = props;
|
|
11
|
+
const [isLiked, setIsLiked] = useState(Boolean(initialIsLiked));
|
|
12
|
+
const [likes, setLikes] = useState(Number.isFinite(likeCount) ? likeCount : 0);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setLikes(Number.isFinite(likeCount) ? likeCount : 0);
|
|
15
|
+
}, [likeCount]);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setIsLiked(Boolean(initialIsLiked));
|
|
18
|
+
}, [initialIsLiked]);
|
|
19
|
+
const handleLike = () => {
|
|
20
|
+
const next = !isLiked;
|
|
21
|
+
setIsLiked(next);
|
|
22
|
+
setLikes((prev) => (next ? prev + 1 : Math.max(0, prev - 1)));
|
|
23
|
+
onLikeToggle?.(next);
|
|
24
|
+
handleLikeClick?.();
|
|
25
|
+
};
|
|
26
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: jsx(Container, { style: style, children: jsxs(InteractionRow, { children: [!hiddenLikeButton && (jsxs(InteractionButton, { "$primaryColor": primaryColor, type: "button", onClick: () => { }, "$active": isLiked, children: [jsx(IconBubble, { onClick: handleLike, "$primaryColor": primaryColor, "$active": isLiked, children: jsx(ThumbsUp, { size: 18, fill: isLiked ? primaryColor : 'none' }) }), jsx(InteractionValue, { onClick: handleViewLikesClick, children: likes })] })), !hiddenViewButton && (jsxs(InteractionButton, { "$primaryColor": primaryColor, type: "button", onClick: handleViewsClick, children: [jsx(IconBubble, { children: jsx(Eye, { size: 18 }) }), jsx(InteractionValue, { children: viewCount })] })), !hiddenCommentButton && (jsxs(InteractionButton, { "$primaryColor": primaryColor, type: "button", onClick: handleCommentsClick, children: [jsx(IconBubble, { children: jsx(MessageCircle, { size: 18 }) }), commentCount && jsx(InteractionValue, { children: commentCount })] }))] }) }) }));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { FeedInteractionV3 as default };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import '../../../shared/global.css.js';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
import { FRSTTheme } from '../../../theme/index.js';
|
|
6
|
+
import { InputWrapper, InputText, TextLimitTx, AlertManyChars, WrapperBtn, Or } from './inputCommentPost-ItStyles.js';
|
|
7
|
+
import Avatar from '../../avatar/index.js';
|
|
8
|
+
import EmojiPicker from '../../emoji-picker/index.js';
|
|
9
|
+
import { recalcRemain } from './inputCommentPost-It.utils.js';
|
|
10
|
+
import { AlertCicle } from '../../../shared/icons.js';
|
|
11
|
+
import MiniButton from '../../mini-button/index.js';
|
|
12
|
+
|
|
13
|
+
function InputCommentPostIt({ placeholder, avatar, value, onChange, limit, hasEmoji, labels, styles, disabled, onClickPublish, onClickCancel }) {
|
|
14
|
+
const [focus, setFocus] = useState(false);
|
|
15
|
+
const [isActiveEdit, setIsActiveEdit] = useState(false);
|
|
16
|
+
const [isErrorManyChars, setErrorManyChars] = useState(false);
|
|
17
|
+
const [isAllowPusblish, setIsAllowPublish] = useState(false);
|
|
18
|
+
const refInput = useRef(null);
|
|
19
|
+
const [isOpenPicker, setIsOpenPicker] = useState(false);
|
|
20
|
+
const [stringValueTextArea, setStringValueTextArea] = useState('');
|
|
21
|
+
const [isChangedInput, setIsChangedInput] = useState(false);
|
|
22
|
+
const [remain, setRemain] = useState(limit);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (stringValueTextArea) {
|
|
25
|
+
resizeTextArea(refInput);
|
|
26
|
+
onChange(stringValueTextArea);
|
|
27
|
+
if (stringValueTextArea?.length > 0)
|
|
28
|
+
setIsChangedInput(true);
|
|
29
|
+
let newRemain = recalcRemain(stringValueTextArea, limit);
|
|
30
|
+
setRemain(newRemain);
|
|
31
|
+
setErrorManyChars(newRemain < 0);
|
|
32
|
+
setIsAllowPublish(stringValueTextArea?.length > 0);
|
|
33
|
+
}
|
|
34
|
+
}, [stringValueTextArea]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
setStringValueTextArea(value);
|
|
37
|
+
if (value?.length > 0) {
|
|
38
|
+
setIsActiveEdit(true);
|
|
39
|
+
}
|
|
40
|
+
}, [value]);
|
|
41
|
+
const onEmojiClick = (emojiObject) => {
|
|
42
|
+
setIsOpenPicker(false);
|
|
43
|
+
let lastPositionStart = refInput.current.selectionStart;
|
|
44
|
+
let lastPositionEnd = refInput.current.selectionEnd;
|
|
45
|
+
let newStringWithEmoji = handleStringToIncluedEmoji([lastPositionStart, lastPositionEnd], emojiObject.native, refInput.current.innerHTML);
|
|
46
|
+
let remainPosInsertEmoji = (newStringWithEmoji?.length + emojiObject?.native?.length);
|
|
47
|
+
if (remainPosInsertEmoji <= limit) {
|
|
48
|
+
setStringValueTextArea(newStringWithEmoji + '');
|
|
49
|
+
repositionCursorAfterNewEmojiInTextArea([lastPositionStart, lastPositionEnd], emojiObject?.native?.length);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const onClickCancelIntern = () => {
|
|
53
|
+
setStringValueTextArea('');
|
|
54
|
+
onChange('');
|
|
55
|
+
setErrorManyChars(false);
|
|
56
|
+
setIsActiveEdit(false);
|
|
57
|
+
setRemain(limit);
|
|
58
|
+
onClickCancel();
|
|
59
|
+
};
|
|
60
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: jsxs("div", { style: { ...styles }, children: [jsxs(InputWrapper, { active: isActiveEdit, isOnEditing: isChangedInput, isError: isErrorManyChars, children: [!isActiveEdit &&
|
|
61
|
+
jsx("div", { style: { alignSelf: 'center', marginLeft: '4px' }, children: jsx(Avatar, { ...avatar, size: '32px' }) }), jsx(InputText, { ref: refInput, onFocus: () => {
|
|
62
|
+
setFocus(true);
|
|
63
|
+
setIsActiveEdit(true);
|
|
64
|
+
}, onBlur: () => {
|
|
65
|
+
setFocus(false);
|
|
66
|
+
}, onChange: (e) => setStringValueTextArea(e.target.value), value: stringValueTextArea, placeholder: !isActiveEdit ? placeholder : '', maxLength: limit + 1, disabled: disabled, isError: isErrorManyChars }), isActiveEdit &&
|
|
67
|
+
jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', width: '100%' }, children: [jsxs(TextLimitTx, { children: [limit - remain, "/", limit] }), jsx(EmojiPicker, { isOpenPicker: isOpenPicker, setIsOpenPicker: setIsOpenPicker, onEmojiSelect: (emoji) => onEmojiClick(emoji), configPicker: {
|
|
68
|
+
title: 'FRST FALCONI',
|
|
69
|
+
perLine: 8,
|
|
70
|
+
sheetSize: 6,
|
|
71
|
+
language: 'pt',
|
|
72
|
+
emojiSize: 20
|
|
73
|
+
}, styles: { width: '318px' } })] })] }), isErrorManyChars &&
|
|
74
|
+
jsxs(AlertManyChars, { children: [jsx(AlertCicle, { fill: '#923534' }), labels?.errorManyChars] }), isActiveEdit && jsx(Fragment, { children: jsxs(WrapperBtn, { children: [jsx(MiniButton, { label: labels?.cancel, variant: 'secondary', onClick: (e) => onClickCancelIntern(), disabled: false }), jsx(Or, { children: labels?.or }), jsx(MiniButton, { label: stringValueTextArea?.length > 0 ? labels?.save : labels?.publish, variant: 'primary', onClick: () => {
|
|
75
|
+
if (stringValueTextArea?.length > 0 && !isErrorManyChars)
|
|
76
|
+
onClickPublish(stringValueTextArea);
|
|
77
|
+
}, disabled: !(stringValueTextArea?.length > 0) || isErrorManyChars })] }) })] }) }));
|
|
78
|
+
function resizeTextArea(refInput) {
|
|
79
|
+
const txResize = (tx) => {
|
|
80
|
+
tx.style.height = '20px';
|
|
81
|
+
tx.style.height = tx.scrollHeight + 'px';
|
|
82
|
+
// setHeightPositionWindowEmoji(tx.scrollHeight - 350 + 'px')
|
|
83
|
+
};
|
|
84
|
+
{
|
|
85
|
+
refInput.current && refInput.current.style && txResize(refInput.current);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function handleStringToIncluedEmoji(pos, emojiObject, stringValueTextArea) {
|
|
89
|
+
let finalString = '';
|
|
90
|
+
if (stringValueTextArea) {
|
|
91
|
+
if (pos[0] == pos[1]) {
|
|
92
|
+
finalString = stringValueTextArea.substr(0, pos[0]) + emojiObject + stringValueTextArea.substr(pos[1]);
|
|
93
|
+
}
|
|
94
|
+
else if (pos[0] < pos[1]) {
|
|
95
|
+
finalString = stringValueTextArea.substr(0, pos[0]) + emojiObject + stringValueTextArea.substr(pos[1], stringValueTextArea.length);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
finalString = stringValueTextArea + emojiObject;
|
|
99
|
+
}
|
|
100
|
+
return finalString;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return emojiObject;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function repositionCursorAfterNewEmojiInTextArea(pos, lenghtEmoji) {
|
|
107
|
+
let newPos = 0;
|
|
108
|
+
if (pos[0] != pos[1]) { // Cursor in multiple chars selected
|
|
109
|
+
newPos = pos[0] + (lenghtEmoji ? lenghtEmoji : 0);
|
|
110
|
+
}
|
|
111
|
+
else { // Cursor text in specific point
|
|
112
|
+
newPos = pos[1] + (lenghtEmoji ? lenghtEmoji : 0);
|
|
113
|
+
}
|
|
114
|
+
refInput.current.setSelectionRange(newPos, newPos);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export { InputCommentPostIt as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function recalcRemain(string, limit) {
|
|
2
|
+
if (string)
|
|
3
|
+
return limit - string.length;
|
|
4
|
+
else
|
|
5
|
+
return limit;
|
|
6
|
+
}
|
|
7
|
+
// function countEmojis(str) {
|
|
8
|
+
// let match;
|
|
9
|
+
// let count = 0;
|
|
10
|
+
// let length = 0;
|
|
11
|
+
// const regex = emojiRegex();
|
|
12
|
+
// while (match = regex.exec(str)) {
|
|
13
|
+
// const emoji = match[0];
|
|
14
|
+
// count++;
|
|
15
|
+
// length += Array.from(emoji).length;
|
|
16
|
+
// }
|
|
17
|
+
// return {count, length};
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
export { recalcRemain };
|