@viswa-test/test-citation 0.0.228 → 0.0.230
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 +284 -45
- package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitation.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
- package/dist/cjs/features/GptWebCitation/types.js +2 -0
- package/dist/cjs/features/GptWebCitation/types.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js +1 -1
- package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
- package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
- package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
- package/dist/cjs/features/IngestionStatus/IngestionStatusComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +2 -0
- package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +2 -0
- package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/segment-common.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +2 -0
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js +2 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
- package/dist/cjs/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
- package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/AiGapIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/BookmarkIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/BrainRed.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/CDIcon.js +2 -0
- package/dist/cjs/features/RequirementAI/icons/CDIcon.js.map +1 -0
- package/dist/cjs/features/RequirementAI/icons/CheckIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/Illustration.svg.js +2 -0
- package/dist/cjs/features/RequirementAI/icons/Illustration.svg.js.map +1 -0
- package/dist/cjs/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/PencilIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/TrashIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/Accordian.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/AtomicButton.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/CodeViewer.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/ExpandableOl.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
- package/dist/cjs/features/RequirementAI/store/markdown-context.js +1 -1
- package/dist/cjs/features/RequirementAI/store/ref.context.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/css.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/diff-edit.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/json-helper.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/learned-tag.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/user-story.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
- package/dist/cjs/features/RulebookCitations/RuleBookCitationApi.js +1 -1
- package/dist/cjs/features/RulebookCitations/RuleBookCitationWrapper.js +1 -1
- package/dist/cjs/features/UserStoryImport/UserStoryPicker.context.js +1 -1
- package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
- package/dist/cjs/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/BackNav.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Badge.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/CardGrid.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/CardProceedButton.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ContentArea.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Footer.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Header.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/NavRow.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ProceedButton.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ResizeHandle.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ScopeDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SearchInput.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SectionHeading.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ShowMore.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Sidebar.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SidebarProjectList.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SidebarSection.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SortDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SplitLayout.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Toolbar.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/usePanelResize.js +1 -1
- package/dist/cjs/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
- package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
- package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
- package/dist/cjs/features/UserStoryImport/index.js +1 -1
- package/dist/cjs/features/UserStoryImport/lib/CustomTooltip.js +1 -1
- package/dist/cjs/features/UserStoryImport/lib/Tooltip.js +1 -1
- package/dist/cjs/features/UserStoryImport/lib/cn.js +1 -1
- package/dist/cjs/features/UserStoryImport/lib/dialog.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/service/redlineService.js +2 -0
- package/dist/cjs/service/redlineService.js.map +1 -0
- package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
- package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
- package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
- package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitation.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
- package/dist/features/GptWebCitation/types.js +2 -0
- package/dist/features/GptWebCitation/types.js.map +1 -0
- package/dist/features/GptWebCitation/utils/citationData.utils.js +1 -1
- package/dist/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
- package/dist/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
- package/dist/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
- package/dist/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
- package/dist/features/IngestionStatus/IngestionStatusComponent.js +1 -1
- package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
- package/dist/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
- package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/objects.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/types.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
- package/dist/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
- package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +2 -0
- package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js.map +1 -0
- package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +2 -0
- package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js.map +1 -0
- package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
- package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
- package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
- package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/segment/segment-common.css.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +2 -0
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js.map +1 -0
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +2 -0
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js.map +1 -0
- package/dist/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js +2 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js.map +1 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js +2 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js.map +1 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
- package/dist/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
- package/dist/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
- package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
- package/dist/features/RequirementAI/icons/AiGapIcon.js +1 -1
- package/dist/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
- package/dist/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
- package/dist/features/RequirementAI/icons/BookmarkIcon.js +1 -1
- package/dist/features/RequirementAI/icons/BrainRed.js +1 -1
- package/dist/features/RequirementAI/icons/CDIcon.js +2 -0
- package/dist/features/RequirementAI/icons/CDIcon.js.map +1 -0
- package/dist/features/RequirementAI/icons/CheckIcon.js +1 -1
- package/dist/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
- package/dist/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
- package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
- package/dist/features/RequirementAI/icons/Illustration.svg.js +2 -0
- package/dist/features/RequirementAI/icons/Illustration.svg.js.map +1 -0
- package/dist/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
- package/dist/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
- package/dist/features/RequirementAI/icons/PencilIcon.js +1 -1
- package/dist/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
- package/dist/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
- package/dist/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
- package/dist/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
- package/dist/features/RequirementAI/icons/TrashIcon.js +1 -1
- package/dist/features/RequirementAI/shared/Accordian.js +1 -1
- package/dist/features/RequirementAI/shared/AtomicButton.js +1 -1
- package/dist/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
- package/dist/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
- package/dist/features/RequirementAI/shared/CodeViewer.js +1 -1
- package/dist/features/RequirementAI/shared/ExpandableOl.js +1 -1
- package/dist/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
- package/dist/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
- package/dist/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
- package/dist/features/RequirementAI/store/markdown-context.js +1 -1
- package/dist/features/RequirementAI/store/ref.context.js +1 -1
- package/dist/features/RequirementAI/utils/css.utils.js +1 -1
- package/dist/features/RequirementAI/utils/diff-edit.utils.js +1 -1
- package/dist/features/RequirementAI/utils/helpers.js +1 -1
- package/dist/features/RequirementAI/utils/json-helper.js +1 -1
- package/dist/features/RequirementAI/utils/learned-tag.utils.js +1 -1
- package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
- package/dist/features/RequirementAI/utils/user-story.utils.js +1 -1
- package/dist/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
- package/dist/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
- package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
- package/dist/features/RulebookCitations/RuleBookCitationApi.js +1 -1
- package/dist/features/RulebookCitations/RuleBookCitationWrapper.js +1 -1
- package/dist/features/UserStoryImport/UserStoryPicker.context.js +1 -1
- package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
- package/dist/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
- package/dist/features/UserStoryImport/components/BackNav.js +1 -1
- package/dist/features/UserStoryImport/components/Badge.js +1 -1
- package/dist/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
- package/dist/features/UserStoryImport/components/CardGrid.js +1 -1
- package/dist/features/UserStoryImport/components/CardProceedButton.js +1 -1
- package/dist/features/UserStoryImport/components/ContentArea.js +1 -1
- package/dist/features/UserStoryImport/components/Footer.js +1 -1
- package/dist/features/UserStoryImport/components/Header.js +1 -1
- package/dist/features/UserStoryImport/components/NavRow.js +1 -1
- package/dist/features/UserStoryImport/components/ProceedButton.js +1 -1
- package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
- package/dist/features/UserStoryImport/components/ResizeHandle.js +1 -1
- package/dist/features/UserStoryImport/components/ScopeDropdown.js +1 -1
- package/dist/features/UserStoryImport/components/SearchInput.js +1 -1
- package/dist/features/UserStoryImport/components/SectionHeading.js +1 -1
- package/dist/features/UserStoryImport/components/ShowMore.js +1 -1
- package/dist/features/UserStoryImport/components/Sidebar.js +1 -1
- package/dist/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
- package/dist/features/UserStoryImport/components/SidebarProjectList.js +1 -1
- package/dist/features/UserStoryImport/components/SidebarSection.js +1 -1
- package/dist/features/UserStoryImport/components/SortDropdown.js +1 -1
- package/dist/features/UserStoryImport/components/SplitLayout.js +1 -1
- package/dist/features/UserStoryImport/components/Toolbar.js +1 -1
- package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
- package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
- package/dist/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
- package/dist/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
- package/dist/features/UserStoryImport/components/usePanelResize.js +1 -1
- package/dist/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
- package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
- package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
- package/dist/features/UserStoryImport/index.js +1 -1
- package/dist/features/UserStoryImport/lib/CustomTooltip.js +1 -1
- package/dist/features/UserStoryImport/lib/Tooltip.js +1 -1
- package/dist/features/UserStoryImport/lib/cn.js +1 -1
- package/dist/features/UserStoryImport/lib/dialog.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/redlineService.js +2 -0
- package/dist/service/redlineService.js.map +1 -0
- package/dist/types/src/Background.d.ts +7 -0
- package/dist/types/src/Background.d.ts.map +1 -0
- package/dist/types/src/DeviationSummaryTest.d.ts +2 -0
- package/dist/types/src/DeviationSummaryTest.d.ts.map +1 -0
- package/dist/types/src/RedlineEditorTest.d.ts +3 -0
- package/dist/types/src/RedlineEditorTest.d.ts.map +1 -0
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +5 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +9 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts +10 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +9 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts +3 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts +12 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/types.d.ts +313 -20
- package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts +2 -0
- package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts +10 -0
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts +6 -0
- package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts.map +1 -0
- package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts +2 -0
- package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts.map +1 -1
- package/dist/types/src/features/IngestionStatus/IngestionStatusComponentTest.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +156 -3
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts +1 -4
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts +44 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +4 -3
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.d.ts +35 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts +25 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.d.ts +23 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts +25 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/PlaygroundEditorTheme.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts +9 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts +8 -0
- package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.d.ts +29 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +8 -3
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +44 -4
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts +25 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +17 -3
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +35 -2
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.d.ts +12 -0
- package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.d.ts +6 -0
- package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts +1 -0
- package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts +15 -0
- package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +7 -1
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts +4 -1
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +14 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts +11 -0
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.d.ts +10 -0
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/icons/CDIcon.d.ts +4 -1
- package/dist/types/src/features/RequirementAI/icons/CDIcon.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts +17 -2
- package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +10 -0
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts +4 -1
- package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +22 -12
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/citation.type.d.ts +20 -0
- package/dist/types/src/features/RequirementAI/types/citation.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/utils/userStoryAttachedContext.utils.d.ts.map +1 -1
- package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts +2 -2
- package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts.map +1 -1
- package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts +1 -0
- package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapperTest.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/service/redlineService.d.ts +33 -0
- package/dist/types/src/service/redlineService.d.ts.map +1 -0
- package/package.json +9 -6
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as o}from"tslib";import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useState as n,useRef as i,useCallback as l,useMemo as a,useEffect as d}from"react";import{useRequirementAI as s}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{createUserStoriesForApproval as c,cloneUserStories as v}from"../../utils/userstory-approval-transform.utils.js";import{getFirstNonApprovedSegmentId as u,getFirstUnapprovedStoryId as p,approveAllSegments as f}from"../../utils/userstory-approval.utils.js";import{useApprovalStatus as S}from"../../hooks/useApprovalStatus.js";import{ContentSegment as m}from"./components/ContentSegment/ContentSegment.js";import{ApprovalBadge as h}from"./components/ApprovalBadge/ApprovalBadge.js";import g from"./UserStoryApprovalScreen.module.css.js";import{CheckIcon as y}from"../../icons/CheckIcon.js";import{BookmarkIcon as b}from"../../icons/BookmarkIcon.js";import{ApprovalSidebar as A}from"./components/ApprovalSidebar/ApprovalSidebar.js";import{SidebarOpenIcon as I,SidebarCloseIcon as C}from"lucide-react";import{UserStoryApprovalScreenContext as E,useUserStoryApprovalScreen as w}from"./UserStoryApprovalContext.js";import{BigEnoughPanel as N}from"../story-screen/BigEnoughPanel.js";import T from"../../icons/BigEnoughIcon.js";var U={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},x={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},F=Object.assign(function(r){var f,m=r.artifactTitleIds,h=r.config,y=void 0===h?{}:h,b=r.callbacks,A=void 0===b?{}:b,I=r.labels,C=void 0===I?{}:I,w=r.isDisabled,N=void 0!==w&&w,T=r.children,F=r.classNames,B=r.selectedArtifactId,k=s(),j=k.userStory,D=k.customStyles,_=e(e({},U),y),P=e(e({},x),C),R=n([]),W=R[0],M=R[1],V=n(""),q=V[0],z=V[1],O=n(""),L=O[0],H=O[1],G=n(!1),Y=G[0],J=G[1],K=n(!0),Q=K[0],X=K[1],Z=i(void 0),$=l(function(e,o,t,r){A.onShowNotification?A.onShowNotification(e,o,t,r):console.log("[".concat(e.toUpperCase(),"] ").concat(o,": ").concat(t))},[A]),ee=l(function(e){A.onScrollToElement?A.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[A]),oe=a(function(){var e=W.findIndex(function(e){return e.artifactId===q});return e>=0?e:0},[W,q]),te=W[oe];d(function(){Z.current=te},[te]),d(function(){var e;if(null==j?void 0:j.length){null===(e=A.onInitialize)||void 0===e||e.call(A),1===j.length&&X(!1),j.length>0&&!q&&z(B||j[0].artifactId);var o=c(v(j));M(o)}},[j,B]),d(function(){B&&B!==q&&z(B)},[B,q]),d(function(){if(te){var e=u(te,"");H(e)}},[null==te?void 0:te.artifactId]);var re=l(function(e,t){M(function(r){var n=o([],r,!0);if("APPROVED"===t.approval_status&&"APPROVED"!==r[e].approval_status){var i=p(r,t.artifactId);i&&z(i)}return n[e]=t,n})},[]),ne=l(function(e){var o=Z.current;if(o){var t=u(o,e);"NA"!==t&&(H(""),setTimeout(function(){H(t)},0))}},[]);S({userStoryForApproval:W,selectedUserStoryForApproval:te,userStoryIndex:oe,callbacks:A,labels:P,onSaveUserStory:re});var ie=e({height:_.containerHeight},_.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}),le={userStoryForApproval:W,setUserStoryForApproval:M,selectedStoryArtifactId:q,setSelectedStoryArtifactId:z,selectedUserStoryIndex:oe,selectedUserStoryForApproval:te,currentContentId:L,setCurrentContentId:H,isEditingSegment:Y,setIsEditingSegment:J,isSidebarExpanded:Q,setIsSidebarExpanded:X,artifactTitleIds:m,config:_,labels:P,callbacks:A,isDisabled:N,handleSaveUserStory:re,handleUpdateContentId:ne,showNotification:$,scrollToElement:ee};return t(E.Provider,e({value:le},{children:t("div",e({className:"".concat(g.container," ").concat((null==F?void 0:F.container)||""),style:e(e({},ie),null===(f=null==D?void 0:D.approvalScreen)||void 0===f?void 0:f.wrapperContainer)},{children:T}))}))},{Sidebar:function(e){var o=e.Component,r=e.config,n=e.className,i=w(),l=i.isSidebarExpanded,a=i.selectedStoryArtifactId,d=i.setSelectedStoryArtifactId,s=i.userStoryForApproval,c=i.isEditingSegment,v=i.artifactTitleIds;return o?t(o,{isSidebarExpanded:l,selectedStoryArtifactId:a,setSelectedStoryArtifactId:d,userStoryForApproval:s,isEditingAnUserStorySegment:c,artifactTitleIds:v}):t(A,{config:r,className:n})},SidebarToggle:function(o){var r=o.OpenIcon,n=o.CloseIcon,i=o.className,l=void 0===i?"":i,a=w(),d=a.isSidebarExpanded,s=a.setIsSidebarExpanded,c=r||I,v=n||C;return t("div",e({className:"".concat(g.sidebarToggleWrapper," ").concat(l)},{children:t("button",e({onClick:function(){return s(function(e){return!e})},className:g.sidebarToggleBtn,"aria-label":d?"Collapse sidebar":"Expand sidebar",type:"button"},{children:t(d?v:c,{})}))}))},Content:function(o){var i,a,d,c,v,u,p,S,m,A,I,C,E,U,x,F,B,k,j,D,_,P,R,W,M,V,q,z,O,L,H,G=o.children,Y=o.ButtonComponent,J=o.hideApproveAll,K=void 0!==J&&J,Q=o.pageTitle,X=void 0===Q?"Review Generated Requirements":Q,Z=o.pageDescription,$=void 0===Z?"This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements.":Z,ee=w(),oe=ee.selectedUserStoryForApproval,te=ee.selectedUserStoryIndex,re=ee.artifactTitleIds,ne=ee.labels,ie=ee.config,le=ee.isDisabled,ae=ee.isEditingSegment,de=ee.handleSaveUserStory,se=ee.setCurrentContentId,ce=ee.showNotification,ve=s(),ue=ve.customStyles,pe=ve.customIcons,fe=n(!1),Se=fe[0],me=fe[1],he=l(function(){if(oe)if(ae)ce("warn","Warning!",ne.unsavedChangesWarning,3e3);else{var e=f(oe);de(te,e),se("")}},[oe,te,ae,ne,de,se,ce]);if(!oe)return null;var ge=re[te]||"",ye="APPROVED"===oe.approval_status,be=null!=(null==oe?void 0:oe.big_enough)&&!Number.isNaN(oe.big_enough)&&!!(null==oe?void 0:oe.big_enough_decision_factors);return r("div",e({className:g.content,style:e({},null===(a=null===(i=null==ue?void 0:ue.approvalScreen)||void 0===i?void 0:i.content)||void 0===a?void 0:a.content),"data-lsc-ui-page-title":X,"data-lsc-ui-page-description":$},{children:[r("div",e({className:g.header,style:e({},null===(v=null===(c=null===(d=null==ue?void 0:ue.approvalScreen)||void 0===d?void 0:d.body)||void 0===c?void 0:c.contentSegment)||void 0===v?void 0:v.header)},{children:[r("div",e({className:g.headerLeft,style:e({},null===(p=null===(u=null==ue?void 0:ue.approvalScreen)||void 0===u?void 0:u.content)||void 0===p?void 0:p.headerLeft)},{children:[r("div",e({className:g.headerMeta,style:e({},null===(A=null===(m=null===(S=null==ue?void 0:ue.approvalScreen)||void 0===S?void 0:S.body)||void 0===m?void 0:m.contentSegment)||void 0===A?void 0:A.headerMeta)},{children:[t(b,{size:16,color:(null===(E=null===(C=null===(I=null==ue?void 0:ue.approvalScreen)||void 0===I?void 0:I.body)||void 0===C?void 0:C.contentSegment)||void 0===E?void 0:E.bookMarkColor)||"#8C8C8C"}),t("h2",e({className:g.headerArtifactId,style:e({},null===(F=null===(x=null===(U=null==ue?void 0:ue.approvalScreen)||void 0===U?void 0:U.body)||void 0===x?void 0:x.contentSegment)||void 0===F?void 0:F.headerArtifactId)},{children:ge}))]})),t("p",e({className:g.headerTitle,style:e({},null===(j=null===(k=null===(B=null==ue?void 0:ue.approvalScreen)||void 0===B?void 0:B.body)||void 0===k?void 0:k.contentSegment)||void 0===j?void 0:j.headerTitle)},{children:null==oe?void 0:oe.title}))]})),r("div",e({className:null==g?void 0:g.containerStyle,style:null===(_=null===(D=null==ue?void 0:ue.approvalScreen)||void 0===D?void 0:D.BigEnoughStyles)||void 0===_?void 0:_.containerStyle},{children:[be&&t("button",e({className:g.developerEffortButton,style:null===(R=null===(P=null==ue?void 0:ue.approvalScreen)||void 0===P?void 0:P.BigEnoughStyles)||void 0===R?void 0:R.buttonStyle,onClick:function(){return me(!Se)}},{children:t(T,{color:null===(M=null===(W=null==ue?void 0:ue.approvalScreen)||void 0===W?void 0:W.BigEnoughStyles)||void 0===M?void 0:M.iconColor,size:null===(q=null===(V=null==ue?void 0:ue.approvalScreen)||void 0===V?void 0:V.BigEnoughStyles)||void 0===q?void 0:q.iconSize})})),!K&&ie.showApproveAllButton&&t("div",e({className:g.headerRight},{children:ye?t(h,{status:"APPROVED",label:ne.approved}):Y?t(Y,e({type:"fill",onClick:he,isDisable:le,className:g.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:ne.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."}},{children:r("div",e({className:g.approveAllContent},{children:[t(y,{size:16,color:"white"}),t("span",{children:ne.approveAll})]}))})):r("button",e({onClick:he,disabled:le,className:g.approveAllButtonDefault,style:e({},null===(O=null===(z=null==ue?void 0:ue.approvalScreen)||void 0===z?void 0:z.content)||void 0===O?void 0:O.approveAllButtonDefault)},{children:[t(y,{size:16,color:"white"}),t("span",{children:ne.approveAll})]}))}))]}))]})),Se&&be&&t("div",e({className:g.bigEnoughWrapper},{children:t(N,{customIcons:null==pe?void 0:pe.userStoryIcons,customStyles:null===(L=null==ue?void 0:ue.approvalScreen)||void 0===L?void 0:L.aiReasoningCitaionStyles,currentUserStory:oe,panelStyles:null===(H=null==ue?void 0:ue.approvalScreen)||void 0===H?void 0:H.BigEnoughStyles,showPanel:Se})})),G]}))},Body:function(o){var n,i,a,d=o.children,c=o.EditorComponent,v=o.ViewerComponent,u=w(),p=u.selectedUserStoryForApproval,f=u.selectedUserStoryIndex,S=u.artifactTitleIds,h=u.handleSaveUserStory,y=s().customStyles,b=l(function(e){h(f,e)},[f,h]),A=l(function(o,t){var r;if(p){var n=e(e({},p),{sub_features:null===(r=p.sub_features)||void 0===r?void 0:r.map(function(e,r){return r===o?t:e})});h(f,n)}},[p,f,h]),I=l(function(o){var t;if(p){var r=e(e({},p),{sub_features:null===(t=p.sub_features)||void 0===t?void 0:t.filter(function(e,t){return t!==o})});h(f,r)}},[p,f,h]);if(!p)return null;var C=S[f]||"";return r("div",e({className:g.body,style:e({},null===(i=null===(n=null==y?void 0:y.approvalScreen)||void 0===n?void 0:n.body)||void 0===i?void 0:i.container)},{children:[t(m,{userStoryForApproval:p,artifactTitleId:C,onSaveMainStoryContent:b,EditorComponent:c,ViewerComponent:v}),null===(a=p.sub_features)||void 0===a?void 0:a.map(function(e,o){return t(m,{userStoryForApproval:e,artifactTitleId:"".concat(C," - ").concat(String.fromCharCode(65+o)),isSubFeature:!0,subFeatureIndex:o,onSaveSubFeature:A,onDeleteSubFeature:I,EditorComponent:c,ViewerComponent:v},e.artifactId)}),d]}))}});export{F as default};
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as n,useCallback as r,useMemo as i,useEffect as a}from"react";import s from"showdown";import{useRequirementAI as d}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{createUserStoriesForApproval as c,cloneUserStories as u}from"../../utils/userstory-approval-transform.utils.js";import{getFirstNonApprovedSegmentId as v,getFirstUnapprovedStoryId as p,approveAllSegments as m}from"../../utils/userstory-approval.utils.js";import{useApprovalStatus as h}from"../../hooks/useApprovalStatus.js";import{ContentSegment as S}from"./components/ContentSegment/ContentSegment.js";import{ApprovalBadge as y}from"./components/ApprovalBadge/ApprovalBadge.js";import g from"./UserStoryApprovalScreen.module.css.js";import{CheckIcon as f}from"../../icons/CheckIcon.js";import{BookmarkIcon as b}from"../../icons/BookmarkIcon.js";import{ApprovalSidebar as I}from"./components/ApprovalSidebar/ApprovalSidebar.js";import{ExternalLink as C,Download as A,Share2 as w,Copy as E,SidebarOpenIcon as N,SidebarCloseIcon as U}from"lucide-react";import{UserStoryApprovalScreenContext as x,useUserStoryApprovalScreen as T}from"./UserStoryApprovalContext.js";import{BigEnoughPanel as k}from"../story-screen/BigEnoughPanel.js";import B from"../../icons/BigEnoughIcon.js";import{Menu as D,MenuItem as F}from"@mui/material";import{formatMarkdown as j}from"../../utils/helpers.js";import{replaceTitleSection as P}from"../../utils/user-story.utils.js";const M={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},_={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},R=Object.assign(({artifactTitleIds:o,config:t={},callbacks:s={},labels:m={},isDisabled:S=!1,children:y,classNames:f,selectedArtifactId:b})=>{var I;const{userStory:C,customStyles:A}=d(),w={...M,...t},E={..._,...m},[N,U]=l([]),[T,k]=l(""),[B,D]=l(""),[F,j]=l(!1),[P,R]=l(!0),z=n(void 0),W=r((e,o,t,l)=>{s.onShowNotification?s.onShowNotification(e,o,t,l):console.log(`[${e.toUpperCase()}] ${o}: ${t}`)},[s]),$=r(e=>{s.onScrollToElement?s.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[s]),L=i(()=>{const e=N.findIndex(e=>e.artifactId===T);return e>=0?e:0},[N,T]),O=N[L];a(()=>{z.current=O},[O]),a(()=>{var e;if(!(null==C?void 0:C.length))return;null===(e=s.onInitialize)||void 0===e||e.call(s),1===C.length&&R(!1),C.length>0&&!T&&k(b||C[0].artifactId);const o=c(u(C));U(o)},[C,b]),a(()=>{b&&b!==T&&k(b)},[b,T]),a(()=>{if(!O)return;const e=v(O,"");D(e)},[null==O?void 0:O.artifactId]);const V=r((e,o)=>{U(t=>{const l=[...t];if("APPROVED"===o.approval_status&&"APPROVED"!==t[e].approval_status){const e=p(t,o.artifactId);e&&k(e)}return l[e]=o,l})},[]),q=r(e=>{const o=z.current;if(!o)return;const t=v(o,e);"NA"!==t&&(D(""),setTimeout(()=>{D(t)},0))},[]);h({userStoryForApproval:N,selectedUserStoryForApproval:O,userStoryIndex:L,callbacks:s,labels:E,onSaveUserStory:V});const H={height:w.containerHeight,...w.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}},G={userStoryForApproval:N,setUserStoryForApproval:U,selectedStoryArtifactId:T,setSelectedStoryArtifactId:k,selectedUserStoryIndex:L,selectedUserStoryForApproval:O,currentContentId:B,setCurrentContentId:D,isEditingSegment:F,setIsEditingSegment:j,isSidebarExpanded:P,setIsSidebarExpanded:R,artifactTitleIds:o,config:w,labels:E,callbacks:s,isDisabled:S,handleSaveUserStory:V,handleUpdateContentId:q,showNotification:W,scrollToElement:$};return e(x.Provider,{value:G,children:e("div",{className:`${g.container} ${(null==f?void 0:f.container)||""}`,style:{...H,...null===(I=null==A?void 0:A.approvalScreen)||void 0===I?void 0:I.wrapperContainer},children:y})})},{Sidebar:({Component:o,config:t,className:l})=>{const{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:i,userStoryForApproval:a,isEditingSegment:s,artifactTitleIds:d}=T();return o?e(o,{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:i,userStoryForApproval:a,isEditingAnUserStorySegment:s,artifactTitleIds:d}):e(I,{config:t,className:l})},SidebarToggle:({OpenIcon:o,CloseIcon:t,className:l=""})=>{const{isSidebarExpanded:n,setIsSidebarExpanded:r}=T(),i=o||N,a=t||U;return e("div",{className:`${g.sidebarToggleWrapper} ${l}`,children:e("button",{onClick:()=>r(e=>!e),className:g.sidebarToggleBtn,"aria-label":n?"Collapse sidebar":"Expand sidebar",type:"button",children:e(n?a:i,{})})})},Content:({children:i,ButtonComponent:a,hideApproveAll:c=!1,pageTitle:u="Review Generated Requirements",showShareIcon:v=!1,handleDownloadUserStory:p,handleOpenSendDialog:h,pageDescription:S="This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements."})=>{var I,N,U,x,M,_,R,z,W,$,L,O,V,q,H,G,Y,J,K,Q,X,Z,ee,oe,te,le,ne,re,ie,ae,se;const{selectedUserStoryForApproval:de,selectedUserStoryIndex:ce,artifactTitleIds:ue,labels:ve,config:pe,isDisabled:me,isEditingSegment:he,handleSaveUserStory:Se,setCurrentContentId:ye,showNotification:ge}=T(),{userStory:fe,setUserStory:be}=d(),Ie=fe[0],[Ce,Ae]=l(null),we=()=>{Ae(null)},Ee=n(null),[Ne,Ue]=l(!1),{customStyles:xe,customIcons:Te}=d(),ke=null==xe?void 0:xe.userStoryCardStyles,[Be,De]=l(!1),Fe=r(()=>{if(!de)return;if(he)return void ge("warn","Warning!",ve.unsavedChangesWarning,3e3);const e=m(de);Se(ce,e),ye("")},[de,ce,he,ve,Se,ye,ge]);if(!de)return null;const je=ue[ce]||"",Pe="APPROVED"===de.approval_status,Me=null!=(null==de?void 0:de.big_enough)&&!Number.isNaN(de.big_enough)&&!!(null==de?void 0:de.big_enough_decision_factors);return o("div",{className:g.content,style:{...null===(N=null===(I=null==xe?void 0:xe.approvalScreen)||void 0===I?void 0:I.content)||void 0===N?void 0:N.content},"data-lsc-ui-page-title":u,"data-lsc-ui-page-description":S,children:[o("div",{className:g.header,style:{...null===(M=null===(x=null===(U=null==xe?void 0:xe.approvalScreen)||void 0===U?void 0:U.body)||void 0===x?void 0:x.contentSegment)||void 0===M?void 0:M.header},children:[o("div",{className:g.headerLeft,style:{...null===(R=null===(_=null==xe?void 0:xe.approvalScreen)||void 0===_?void 0:_.content)||void 0===R?void 0:R.headerLeft},children:[o("div",{className:g.headerMeta,style:{...null===($=null===(W=null===(z=null==xe?void 0:xe.approvalScreen)||void 0===z?void 0:z.body)||void 0===W?void 0:W.contentSegment)||void 0===$?void 0:$.headerMeta},children:[e(b,{size:16,color:(null===(V=null===(O=null===(L=null==xe?void 0:xe.approvalScreen)||void 0===L?void 0:L.body)||void 0===O?void 0:O.contentSegment)||void 0===V?void 0:V.bookMarkColor)||"#8C8C8C"}),e("h2",{className:g.headerArtifactId,style:{...null===(G=null===(H=null===(q=null==xe?void 0:xe.approvalScreen)||void 0===q?void 0:q.body)||void 0===H?void 0:H.contentSegment)||void 0===G?void 0:G.headerArtifactId},children:je})]}),e("p",{className:g.headerTitle,style:{...null===(K=null===(J=null===(Y=null==xe?void 0:xe.approvalScreen)||void 0===Y?void 0:Y.body)||void 0===J?void 0:J.contentSegment)||void 0===K?void 0:K.headerTitle},children:null==de?void 0:de.title})]}),o("div",{className:null==g?void 0:g.containerStyle,style:null===(X=null===(Q=null==xe?void 0:xe.approvalScreen)||void 0===Q?void 0:Q.BigEnoughStyles)||void 0===X?void 0:X.containerStyle,children:[Me&&e("button",{className:g.developerEffortButton,style:null===(ee=null===(Z=null==xe?void 0:xe.approvalScreen)||void 0===Z?void 0:Z.BigEnoughStyles)||void 0===ee?void 0:ee.buttonStyle,onClick:()=>De(!Be),children:e(B,{color:null===(te=null===(oe=null==xe?void 0:xe.approvalScreen)||void 0===oe?void 0:oe.BigEnoughStyles)||void 0===te?void 0:te.iconColor,size:null===(ne=null===(le=null==xe?void 0:xe.approvalScreen)||void 0===le?void 0:le.BigEnoughStyles)||void 0===ne?void 0:ne.iconSize})}),v&&o(t,{children:[e("button",{className:g.iconButton,style:null==ke?void 0:ke.iconButton,onClick:e=>{Ae(e.currentTarget)},children:e(C,{size:16})}),o(D,{id:"user-story-share-menu",anchorEl:Ce,open:!!Ce,onClose:()=>Ae(null),style:null==ke?void 0:ke.userStoryShareMenu,children:[e(F,{style:null==ke?void 0:ke.userStoryMenuItem,onClick:async()=>{Ue(!0),p&&(await Promise.all([p("pdf"),p("doc")]),Ue(!1))},children:o("div",{ref:Ee,className:g.menuItemContent,style:null==ke?void 0:ke.menuItemContent,children:[e(A,{size:16,color:null==ke?void 0:ke.menuIconColor}),e("p",{style:null==ke?void 0:ke.menuLabel,children:"Download"})]})}),e(F,{style:null==ke?void 0:ke.userStoryMenuItem,onClick:async()=>{let e=Ie;e={...Ie,value:`${P(null==Ie?void 0:Ie.value,Ie.title)} \n${Ie.value}`},null==h||h(!0,[e],Ie.artifactId),we()},children:o("div",{style:null==ke?void 0:ke.menuItemContent,className:g.menuItemContentPadded,children:[e(w,{size:16,color:null==ke?void 0:ke.menuIconColor}),e("p",{style:null==ke?void 0:ke.menuLabel,children:"Send"})]})}),e(F,{style:null==ke?void 0:ke.userStoryMenuItem,onClick:async()=>{const e=(new s.Converter).makeHtml(j(Ie.value)||Ie.value),o=function(e){const o=(new s.Converter).makeHtml(e),t=document.createElement("div");return t.innerHTML=o,t.textContent||t.innerText||""}(j(Ie.value)||Ie.value),t=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{await navigator.clipboard.write([t]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{we()}},children:o("div",{style:null==ke?void 0:ke.menuItemContent,className:g.menuItemContentPadded,children:[e(E,{size:16,color:null==ke?void 0:ke.menuIconColor}),e("p",{style:null==ke?void 0:ke.menuLabel,children:"Copy"})]})})]})]}),!c&&pe.showApproveAllButton&&e("div",{className:g.headerRight,children:Pe?e(y,{status:"APPROVED",label:ve.approved}):a?e(a,{type:"fill",onClick:Fe,isDisable:me,className:g.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:ve.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."},children:o("div",{className:g.approveAllContent,children:[e(f,{size:16,color:"white"}),e("span",{children:ve.approveAll})]})}):o("button",{onClick:Fe,disabled:me,className:g.approveAllButtonDefault,style:{...null===(ie=null===(re=null==xe?void 0:xe.approvalScreen)||void 0===re?void 0:re.content)||void 0===ie?void 0:ie.approveAllButtonDefault},children:[e(f,{size:16,color:"white"}),e("span",{children:ve.approveAll})]})})]})]}),Be&&Me&&e("div",{className:g.bigEnoughWrapper,children:e(k,{customIcons:null==Te?void 0:Te.userStoryIcons,customStyles:null===(ae=null==xe?void 0:xe.approvalScreen)||void 0===ae?void 0:ae.aiReasoningCitaionStyles,currentUserStory:de,panelStyles:null===(se=null==xe?void 0:xe.approvalScreen)||void 0===se?void 0:se.BigEnoughStyles,showPanel:Be})}),i]})},Body:({children:t,EditorComponent:l,ViewerComponent:n,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s=!1})=>{var c,u,v;const{selectedUserStoryForApproval:p,selectedUserStoryIndex:m,artifactTitleIds:h,handleSaveUserStory:y}=T(),{customStyles:f}=d(),b=r(e=>{y(m,e)},[m,y]),I=r((e,o)=>{var t;if(!p)return;const l={...p,sub_features:null===(t=p.sub_features)||void 0===t?void 0:t.map((t,l)=>l===e?o:t)};y(m,l)},[p,m,y]),C=r(e=>{var o;if(!p)return;const t={...p,sub_features:null===(o=p.sub_features)||void 0===o?void 0:o.filter((o,t)=>t!==e)};y(m,t)},[p,m,y]);if(!p)return null;const A=h[m]||"";return o("div",{className:g.body,style:{...null===(u=null===(c=null==f?void 0:f.approvalScreen)||void 0===c?void 0:c.body)||void 0===u?void 0:u.container},children:[e(S,{userStoryForApproval:p,artifactTitleId:A,onSaveMainStoryContent:b,EditorComponent:l,ViewerComponent:n}),null===(v=p.sub_features)||void 0===v?void 0:v.map((o,t)=>e(S,{userStoryForApproval:o,artifactTitleId:`${A} - ${String.fromCharCode(65+t)}`,isSubFeature:!0,subFeatureIndex:t,onSaveSubFeature:I,onDeleteSubFeature:C,EditorComponent:l,ViewerComponent:n,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s},o.artifactId)),t]})}});export{R as default};
|
|
2
2
|
//# sourceMappingURL=UserStoryApprovalScreen.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={container:"UserStoryApprovalScreen-module_container__Hy5uc",sidebarToggleWrapper:"UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4",developerEffortButton:"UserStoryApprovalScreen-module_developerEffortButton__9EfUX",containerStyle:"UserStoryApprovalScreen-module_containerStyle__PS6Gn",sidebarToggleBtn:"UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf",content:"UserStoryApprovalScreen-module_content__VQ6Z9",header:"UserStoryApprovalScreen-module_header__zsOki",headerLeft:"UserStoryApprovalScreen-module_headerLeft__s-1Eq",headerMeta:"UserStoryApprovalScreen-module_headerMeta__3JPhW",headerArtifactId:"UserStoryApprovalScreen-module_headerArtifactId__xjOR9",headerTitle:"UserStoryApprovalScreen-module_headerTitle__xxkv-",headerRight:"UserStoryApprovalScreen-module_headerRight__BWc-W",approveAllButton:"UserStoryApprovalScreen-module_approveAllButton__HkH1f",approveAllContent:"UserStoryApprovalScreen-module_approveAllContent__-UTDs",approveAllButtonDefault:"UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR",body:"UserStoryApprovalScreen-module_body__aAJwQ"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryApprovalScreen-module_container__Hy5uc{border:1px solid #d1d5db;display:flex;flex-direction:row;font-family:Inter,sans-serif;min-height:100vh}.UserStoryApprovalScreen-module_container__Hy5uc *{font-family:inherit}.UserStoryApprovalScreen-module_developerEffortButton__9EfUX{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.UserStoryApprovalScreen-module_containerStyle__PS6Gn{align-items:center;display:flex;gap:3px}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{transition:color .2s ease}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:hover{opacity:.8}.UserStoryApprovalScreen-module_content__VQ6Z9{display:flex;flex:1;flex-direction:column;min-height:100%;overflow-y:auto;position:relative;width:100%}.UserStoryApprovalScreen-module_header__zsOki{align-items:center;background-color:#fff;border-bottom:1px solid #d1d5db;display:flex;flex-direction:row;justify-content:space-between;padding:16px 32px;position:sticky;top:0;z-index:50}.UserStoryApprovalScreen-module_headerLeft__s-1Eq{display:flex;flex-direction:column;gap:4px}.UserStoryApprovalScreen-module_headerMeta__3JPhW{align-items:center;color:#6932e2;display:flex;flex-direction:row;gap:8px}.UserStoryApprovalScreen-module_headerArtifactId__xjOR9{font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.UserStoryApprovalScreen-module_headerTitle__xxkv-{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.UserStoryApprovalScreen-module_headerRight__BWc-W{align-items:center;display:flex}.UserStoryApprovalScreen-module_approveAllButton__HkH1f{height:40px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs{align-items:center;display:flex;flex-direction:row;gap:4px;height:32px;padding:0 2px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs span{color:#fff;font-family:Inter,sans-serif;font-size:14px;text-transform:none}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR{align-items:center;background:linear-gradient(115.1deg,#2546f0 -23.58%,#5928ed 74.92%);border:none;border-radius:8px;color:#fff;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;font-size:14px;gap:4px;height:40px;padding:0 16px;transition:opacity .2s ease}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:hover{opacity:.9}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:disabled{cursor:not-allowed;opacity:.5}.UserStoryApprovalScreen-module_body__aAJwQ{display:flex;flex-direction:column;width:100%}.UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4{flex-shrink:0;height:100%;position:relative;width:0}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;left:0;margin:0;padding:0;position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s ease;z-index:10}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:focus{outline:none}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
|
|
1
|
+
var e={container:"UserStoryApprovalScreen-module_container__Hy5uc",sidebarToggleWrapper:"UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4",developerEffortButton:"UserStoryApprovalScreen-module_developerEffortButton__9EfUX",containerStyle:"UserStoryApprovalScreen-module_containerStyle__PS6Gn",sidebarToggleBtn:"UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf",content:"UserStoryApprovalScreen-module_content__VQ6Z9",header:"UserStoryApprovalScreen-module_header__zsOki",headerLeft:"UserStoryApprovalScreen-module_headerLeft__s-1Eq",headerMeta:"UserStoryApprovalScreen-module_headerMeta__3JPhW",headerArtifactId:"UserStoryApprovalScreen-module_headerArtifactId__xjOR9",headerTitle:"UserStoryApprovalScreen-module_headerTitle__xxkv-",headerRight:"UserStoryApprovalScreen-module_headerRight__BWc-W",approveAllButton:"UserStoryApprovalScreen-module_approveAllButton__HkH1f",approveAllContent:"UserStoryApprovalScreen-module_approveAllContent__-UTDs",approveAllButtonDefault:"UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR",body:"UserStoryApprovalScreen-module_body__aAJwQ",iconButton:"UserStoryApprovalScreen-module_iconButton__PGTVl",menuItemContent:"UserStoryApprovalScreen-module_menuItemContent__SCM6V",menuItemContentPadded:"UserStoryApprovalScreen-module_menuItemContentPadded__3UjuU"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryApprovalScreen-module_container__Hy5uc{border:1px solid #d1d5db;display:flex;flex-direction:row;font-family:Inter,sans-serif;min-height:100vh}.UserStoryApprovalScreen-module_container__Hy5uc *{font-family:inherit}.UserStoryApprovalScreen-module_developerEffortButton__9EfUX{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.UserStoryApprovalScreen-module_containerStyle__PS6Gn{align-items:center;display:flex;gap:3px}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{transition:color .2s ease}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:hover{opacity:.8}.UserStoryApprovalScreen-module_content__VQ6Z9{display:flex;flex:1;flex-direction:column;min-height:100%;overflow-y:auto;position:relative;width:100%}.UserStoryApprovalScreen-module_header__zsOki{align-items:center;background-color:#fff;border-bottom:1px solid #d1d5db;display:flex;flex-direction:row;justify-content:space-between;padding:16px 32px;position:sticky;top:0;z-index:50}.UserStoryApprovalScreen-module_headerLeft__s-1Eq{display:flex;flex-direction:column;gap:4px}.UserStoryApprovalScreen-module_headerMeta__3JPhW{align-items:center;color:#6932e2;display:flex;flex-direction:row;gap:8px}.UserStoryApprovalScreen-module_headerArtifactId__xjOR9{font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.UserStoryApprovalScreen-module_headerTitle__xxkv-{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.UserStoryApprovalScreen-module_headerRight__BWc-W{align-items:center;display:flex}.UserStoryApprovalScreen-module_approveAllButton__HkH1f{height:40px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs{align-items:center;display:flex;flex-direction:row;gap:4px;height:32px;padding:0 2px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs span{color:#fff;font-family:Inter,sans-serif;font-size:14px;text-transform:none}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR{align-items:center;background:linear-gradient(115.1deg,#2546f0 -23.58%,#5928ed 74.92%);border:none;border-radius:8px;color:#fff;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;font-size:14px;gap:4px;height:40px;padding:0 16px;transition:opacity .2s ease}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:hover{opacity:.9}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:disabled{cursor:not-allowed;opacity:.5}.UserStoryApprovalScreen-module_body__aAJwQ{display:flex;flex-direction:column;width:100%}.UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4{flex-shrink:0;height:100%;position:relative;width:0}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;left:0;margin:0;padding:0;position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s ease;z-index:10}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:focus{outline:none}.UserStoryApprovalScreen-module_iconButton__PGTVl{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryApprovalScreen-module_menuItemContent__SCM6V{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryApprovalScreen-module_menuItemContentPadded__3UjuU{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=UserStoryApprovalScreen.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import l from"./ApprovalBadge.module.css.js";import{CheckIcon as o}from"../../../../icons/CheckIcon.js";import{useRequirementAI as s}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const a=({status:a,label:m="Approved",size:t="medium",className:i})=>{var n,p;const{customStyles:d}=s();if("APPROVED"!==a)return null;const c="small"===t?l.small:l.medium;return e("div",{className:`${l.badge} ${c} ${i||""}`,style:{...null===(p=null===(n=null==d?void 0:d.approvalScreen)||void 0===n?void 0:n.content)||void 0===p?void 0:p.approvalBadge},children:[r(o,{size:"small"===t?14:16}),r("span",{children:m})]})};export{a as ApprovalBadge,a as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalBadge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useMemo as t,useCallback as o}from"react";import r from"../../../../icons/MenuUnfoldIcon.js";import{ApprovalSidebarItem as a}from"../ApprovalSidebarItem/ApprovalSidebarItem.js";import l from"./ApprovalSidebar.module.css.js";import{useUserStoryApprovalScreen as d}from"../../UserStoryApprovalContext.js";import{useRequirementAI as n}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const s={descriptionCharLimit:116,sidebarTitle:"Generated User Stories",TooltipComponent:void 0,InfoIconComponent:void 0,HeaderIconComponent:void 0},c=({config:c={},className:p=""})=>{var v,m,u,f,I,S,h,b,y,g,A,N;const{customIcons:T,customStyles:x}=n(),{isSidebarExpanded:C,selectedStoryArtifactId:j,setSelectedStoryArtifactId:E,userStoryForApproval:L,isEditingSegment:w,artifactTitleIds:P,showNotification:R,labels:U}=d(),W=t(()=>({...s,...c}),[c]),{sidebarTitle:q,HeaderIconComponent:B}=W,H=t(()=>L.map((e,i)=>({artifactTitleId:P&&P[i]||"",artifactId:e.artifactId,title:e.title,description:e.description||"",approvalStatus:e.approval_status||"NOT_APPROVED",index:i})),[L,P]),O=o(e=>{E(e)},[E]),_=o(()=>{R("warn","Warning!","Please save the latest changes to proceed with the other segment.",3e3)},[R]),k=[l.container,C?l.containerExpanded:l.containerCollapsed,p].filter(Boolean).join(" "),z=B||r;return e("div",{className:k,style:{...null===(m=null===(v=null==x?void 0:x.approvalScreen)||void 0===v?void 0:v.sidebar)||void 0===m?void 0:m.container},children:i("div",{className:l.inner,style:{...null===(f=null===(u=null==x?void 0:x.approvalScreen)||void 0===u?void 0:u.sidebar)||void 0===f?void 0:f.innerContainer},children:[i("div",{className:l.header,style:{...null===(S=null===(I=null==x?void 0:x.approvalScreen)||void 0===I?void 0:I.sidebar)||void 0===S?void 0:S.header},children:[e("div",{className:l.headerIcon,style:{...null===(b=null===(h=null==x?void 0:x.approvalScreen)||void 0===h?void 0:h.sidebar)||void 0===b?void 0:b.headerIcon},children:e(z,{size:20})}),e("h2",{className:l.headerTitle,style:{...null===(g=null===(y=null==x?void 0:x.approvalScreen)||void 0===y?void 0:y.sidebar)||void 0===g?void 0:g.headerTitle},children:q})]}),e("div",{className:l.storyList,style:{...null===(N=null===(A=null==x?void 0:x.approvalScreen)||void 0===A?void 0:A.sidebar)||void 0===N?void 0:N.storyList},role:"listbox",children:H.map((i,t)=>e(a,{artifactTitleId:i.artifactTitleId,artifactId:i.artifactId,title:i.title,description:i.description,approvalStatus:i.approvalStatus,index:i.index,isLast:t===H.length-1,isSelected:j===i.artifactId,isEditingSegment:w,onSelect:O,onNavigationBlocked:_,sidebarConfig:W},i.artifactId))})]})})};export{c as ApprovalSidebar,c as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalSidebar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as i,jsxs as o}from"react/jsx-runtime";import{useState as e,useCallback as l}from"react";import{BookmarkIcon as n}from"../../../../icons/BookmarkIcon.js";import{ApprovalStatusBadge as d}from"../ApprovalStatusBadge/ApprovalStatusBadge.js";import{replaceLearnedTagsWithInfo as a}from"../../../../utils/learned-tag.utils.js";import r from"./ApprovalSidebarItem.module.css.js";import{useRequirementAI as t}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";import s from"../../../../icons/RelevanceScoreIcon.js";import{stripAiReasoningAnchors as v,extractAllAiReasoningIds as c}from"../../../../utils/helpers.js";import p from"../../../ai-reasoning/AiReasoningCitation.js";const u=({artifactTitleId:u,artifactId:m,title:S,description:b,approvalStatus:I,index:f,isLast:g,isSelected:h,isEditingSegment:C,onSelect:N,onNavigationBlocked:y,sidebarConfig:R,className:j=""})=>{var B,k,A,w,x,L,q,z,G,H,P,T,W,E,F,M,$,D,J,K,O,Q,U,V,X,Y,Z,_,ii,oi,ei,li,ni,di;const[ai,ri]=e(!1),{customStyles:ti,getAvgScoreForStory:si,aiReasoning:vi}=t(),ci=si(m),{descriptionCharLimit:pi,TooltipComponent:ui,InfoIconComponent:mi}=R,Si=l(()=>{C?null==y||y():N(m)},[m,C,N,y]),bi=l(i=>{i.stopPropagation(),ri(i=>!i)},[]),Ii=v(b),fi=ai?Ii:Ii.length>pi?Ii.slice(0,pi):Ii,gi=Ii.length>pi,hi=[r.item,g?r.itemLast:"",h?r.itemSelected:"",j].filter(Boolean).join(" "),Ci=c(b).map(i=>vi.find(o=>o.id.toString()===i)).filter(Boolean);return i("div",{className:hi,style:{...null===(A=null===(k=null===(B=null==ti?void 0:ti.approvalScreen)||void 0===B?void 0:B.sidebar)||void 0===k?void 0:k.sidebarItem)||void 0===A?void 0:A.container},onClick:Si,role:"option","aria-selected":h,children:o("div",{className:r.itemContent,style:{...null===(L=null===(x=null===(w=null==ti?void 0:ti.approvalScreen)||void 0===w?void 0:w.sidebar)||void 0===x?void 0:x.sidebarItem)||void 0===L?void 0:L.itemContent},children:[o("div",{className:r.topRow,style:{...null===(G=null===(z=null===(q=null==ti?void 0:ti.approvalScreen)||void 0===q?void 0:q.sidebar)||void 0===z?void 0:z.sidebarItem)||void 0===G?void 0:G.topRow},children:[o("span",{className:r.artifactIdGroup,style:{...null===(T=null===(P=null===(H=null==ti?void 0:ti.approvalScreen)||void 0===H?void 0:H.sidebar)||void 0===P?void 0:P.sidebarItem)||void 0===T?void 0:T.artifactIdGroup},children:[i(n,{size:20,color:(null===(F=null===(E=null===(W=null==ti?void 0:ti.approvalScreen)||void 0===W?void 0:W.sidebar)||void 0===E?void 0:E.sidebarItem)||void 0===F?void 0:F.bookMarkColor)||"#8C8C8C"}),i("span",{children:u})]}),o("div",{className:r.scoreBadgeContainer,children:[ci>0&&o("span",{className:r.confidenceScore,style:null===(D=null===($=null===(M=null==ti?void 0:ti.approvalScreen)||void 0===M?void 0:M.sidebar)||void 0===$?void 0:$.sidebarItem)||void 0===D?void 0:D.confidenceScore,children:[i(s,{size:14,color:(null===(Q=null===(O=null===(K=null===(J=null==ti?void 0:ti.approvalScreen)||void 0===J?void 0:J.sidebar)||void 0===K?void 0:K.sidebarItem)||void 0===O?void 0:O.confidenceScoreIcon)||void 0===Q?void 0:Q.color)||"#166534"}),ci,"%"]}),i(d,{status:I})]})]}),o("span",{className:r.titleRow,style:{...null===(X=null===(V=null===(U=null==ti?void 0:ti.approvalScreen)||void 0===U?void 0:U.sidebar)||void 0===V?void 0:V.sidebarItem)||void 0===X?void 0:X.titleRow},children:[i("span",{className:r.titleIndex,style:{...null===(_=null===(Z=null===(Y=null==ti?void 0:ti.approvalScreen)||void 0===Y?void 0:Y.sidebar)||void 0===Z?void 0:Z.sidebarItem)||void 0===_?void 0:_.titleIndex},children:`${f+1}.`}),i("span",{children:a(S,ui,mi)})]}),b&&o("span",{className:r.description,style:{...null===(ei=null===(oi=null===(ii=null==ti?void 0:ti.approvalScreen)||void 0===ii?void 0:ii.sidebar)||void 0===oi?void 0:oi.sidebarItem)||void 0===ei?void 0:ei.description},children:[fi,gi&&i("button",{onClick:bi,className:r.moreButton,style:{...null===(di=null===(ni=null===(li=null==ti?void 0:ti.approvalScreen)||void 0===li?void 0:li.sidebar)||void 0===ni?void 0:ni.sidebarItem)||void 0===di?void 0:di.moreButton},"aria-label":ai?"Show less":"Show more",children:ai?"less":"more"}),Ci.length>0&&i("span",{className:r.aiReasoningContainer,onClick:i=>i.stopPropagation(),children:null==Ci?void 0:Ci.map(o=>i(p,{aiReason:o,isSourceHasHighlight:!1},null==o?void 0:o.id))})]})]})})};export{u as ApprovalSidebarItem,u as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalSidebarItem.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import o from"./ApprovalStatusBadge.module.css.js";import{useRequirementAI as r}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const d={approved:"Approved",inProgress:"In Progress",notApproved:"Not Approved"},a=({status:a,labels:l={},className:s=""})=>{var i,p,v,n,t,u,c,m,g,b,A,P;const S={...d,...l},{customStyles:I}=r();switch(a){case"APPROVED":return e("span",{className:`${o.badgeApproved} ${s}`,style:{...null===(n=null===(v=null===(p=null===(i=null==I?void 0:I.approvalScreen)||void 0===i?void 0:i.sidebar)||void 0===p?void 0:p.sidebarItem)||void 0===v?void 0:v.approvalStatusBadge)||void 0===n?void 0:n.badgeApproved},children:S.approved});case"IN_PROGRESS":return e("span",{className:`${o.badgeInProgress} ${s}`,style:{...null===(m=null===(c=null===(u=null===(t=null==I?void 0:I.approvalScreen)||void 0===t?void 0:t.sidebar)||void 0===u?void 0:u.sidebarItem)||void 0===c?void 0:c.approvalStatusBadge)||void 0===m?void 0:m.badgeInProgress},children:S.inProgress});case"NOT_APPROVED":return e("span",{className:`${o.badgeNotApproved} ${s}`,style:{...null===(P=null===(A=null===(b=null===(g=null==I?void 0:I.approvalScreen)||void 0===g?void 0:g.sidebar)||void 0===b?void 0:b.sidebarItem)||void 0===A?void 0:A.approvalStatusBadge)||void 0===P?void 0:P.badgeNotApproved},children:S.notApproved});default:return null}};export{a as ApprovalStatusBadge,a as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalStatusBadge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as o,jsx as n}from"react/jsx-runtime";import{useState as e,useRef as l,useCallback as t,useEffect as i}from"react";import d from"./ContentBlock.module.css.js";import{CheckIcon as v}from"../../../../icons/CheckIcon.js";import{PencilIcon as c}from"../../../../icons/PencilIcon.js";import{TrashIcon as r}from"../../../../icons/TrashIcon.js";import{useUserStoryApprovalScreen as u}from"../../UserStoryApprovalContext.js";import{useRequirementAI as a}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const s=({segment:s,segmentIndex:p,isSubFeature:m=!1,onSaveContent:S,onApproveContent:y,onDeleteContent:g,EditorComponent:b,ViewerComponent:B})=>{var h,k,C,I,x,f,N,A,T,w,D,j,E,M,W,z,R,V,F,U,q,H,$,_,L,P,G,J,K,O,Q,X,Y,Z,oo,no,eo,lo,to,io,vo,co,ro,uo,ao,so,po,mo,So,yo,go,bo,Bo,ho,ko,Co,Io,xo,fo,No,Ao,To,wo,Do,jo,Eo,Mo,Wo,zo,Ro,Vo,Fo,Uo,qo,Ho,$o,_o,Lo,Po,Go;const{currentContentId:Jo,handleUpdateContentId:Ko,isDisabled:Oo,isEditingSegment:Qo,setIsEditingSegment:Xo,config:Yo,labels:Zo,showNotification:on}=u(),{customStyles:nn,customIcons:en}=a(),[ln,tn]=e(!1),dn=l(s.content),vn=l(null),[cn,rn]=e(0),un=s.contentId===Jo,an=t(()=>{if(!vn.current)return;const o=vn.current;o.style.scrollMarginTop="90px",o.scrollIntoView({behavior:"smooth",block:"start"})},[]),sn=t(()=>{if(!vn.current)return;const o=vn.current;o.style.scrollMarginBottom="90px",o.scrollIntoView({behavior:"smooth",block:"end"})},[]);i(()=>{if(!un||!vn.current||ln)return;const o=setTimeout(()=>{sn()},200);return()=>clearTimeout(o)},[Jo,un,ln,sn]),i(()=>{if(0===cn)return;const o=setTimeout(()=>{an()},150);return()=>clearTimeout(o)},[cn,an]),i(()=>{dn.current=s.content},[s.content]);const pn=t(()=>{dn.current=s.content,tn(!0),Xo(!0),rn(o=>o+1)},[s.content,Xo]),mn=t(()=>{dn.current=s.content,tn(!1),Xo(!1)},[s.content,Xo]),Sn=t((o,n)=>{dn.current=n},[]),yn=t(()=>{const o=dn.current;(null==o?void 0:o.trim())?(tn(!1),Xo(!1),S(p,o)):on("warn","Warning!",Zo.emptyContentWarning,3e3)},[p,S,Xo,on,Zo.emptyContentWarning]),gn=t(()=>{y(p),Ko(s.contentId)},[p,s.contentId,y,Ko]),bn=t(()=>{null==g||g(p)},[p,g]),Bn=[d.container,un?d.containerActive:d.containerDefault].join(" "),hn=null===(C=null===(k=null===(h=null==nn?void 0:nn.approvalScreen)||void 0===h?void 0:h.body)||void 0===k?void 0:k.contentSegment)||void 0===C?void 0:C.contentBlock,kn=un?(null==hn?void 0:hn.currentSegementContainer)||{boxShadow:"0px 4px 14.3px 0px rgba(151, 71, 255, 0.3), 0px -4px 34.7px 0px rgba(51, 210, 255, 0.05)"}:(null==hn?void 0:hn.containerDefault)||{};return o("div",{className:Bn,style:kn,ref:vn,children:[s.isApproved&&o("div",{className:d.approvedBadge,style:{...null===(N=null===(f=null===(x=null===(I=null==nn?void 0:nn.approvalScreen)||void 0===I?void 0:I.body)||void 0===x?void 0:x.contentSegment)||void 0===f?void 0:f.contentBlock)||void 0===N?void 0:N.approvedBadge},children:[n("span",{children:Zo.approved}),n(v,{size:16,color:null===(D=null===(w=null===(T=null===(A=null==nn?void 0:nn.approvalScreen)||void 0===A?void 0:A.body)||void 0===T?void 0:T.contentSegment)||void 0===w?void 0:w.contentBlock)||void 0===D?void 0:D.checkIconColor})]}),n("div",{className:d.contentArea,style:{...null===(W=null===(M=null===(E=null===(j=null==nn?void 0:nn.approvalScreen)||void 0===j?void 0:j.body)||void 0===E?void 0:E.contentSegment)||void 0===M?void 0:M.contentBlock)||void 0===W?void 0:W.contentArea},children:ln&&b?n(b,{minHeight:"100%",height:"100%",type:"string",value:s.content||"",handleUpdateState:Sn,doNotShowBorderInViewMode:!1,mode:"edit"}):B?n(B,{message:s.content||"",scenario:"approving",customStyles:{...null===(z=null==nn?void 0:nn.userStoryScreenStyles)||void 0===z?void 0:z.userStoryContentStyles},customIcons:{...null==en?void 0:en.userStoryIcons}}):n("div",{className:d.contentFallback,dangerouslySetInnerHTML:{__html:s.content||""}})}),ln?o("div",{className:d.editActionsContainer,style:{...null===(Do=null===(wo=null===(To=null===(Ao=null==nn?void 0:nn.approvalScreen)||void 0===Ao?void 0:Ao.body)||void 0===To?void 0:To.contentSegment)||void 0===wo?void 0:wo.contentBlock)||void 0===Do?void 0:Do.editActionsContainer},children:[n("button",{onClick:mn,className:d.outlineButton,style:{...null===(Wo=null===(Mo=null===(Eo=null===(jo=null==nn?void 0:nn.approvalScreen)||void 0===jo?void 0:jo.body)||void 0===Eo?void 0:Eo.contentSegment)||void 0===Mo?void 0:Mo.contentBlock)||void 0===Wo?void 0:Wo.outlineButton,...null===(Fo=null===(Vo=null===(Ro=null===(zo=null==nn?void 0:nn.approvalScreen)||void 0===zo?void 0:zo.body)||void 0===Ro?void 0:Ro.contentSegment)||void 0===Vo?void 0:Vo.contentBlock)||void 0===Fo?void 0:Fo.cancelButton},children:Zo.cancel}),n("button",{onClick:yn,className:d.outlineButton,style:{...null===($o=null===(Ho=null===(qo=null===(Uo=null==nn?void 0:nn.approvalScreen)||void 0===Uo?void 0:Uo.body)||void 0===qo?void 0:qo.contentSegment)||void 0===Ho?void 0:Ho.contentBlock)||void 0===$o?void 0:$o.outlineButton,...null===(Go=null===(Po=null===(Lo=null===(_o=null==nn?void 0:nn.approvalScreen)||void 0===_o?void 0:_o.body)||void 0===Lo?void 0:Lo.contentSegment)||void 0===Po?void 0:Po.contentBlock)||void 0===Go?void 0:Go.saveButton},children:Zo.save})]}):n("div",{className:d.actionsContainer,style:{...null===(U=null===(F=null===(V=null===(R=null==nn?void 0:nn.approvalScreen)||void 0===R?void 0:R.body)||void 0===V?void 0:V.contentSegment)||void 0===F?void 0:F.contentBlock)||void 0===U?void 0:U.actionsContainer},children:o("div",{className:d.actionsRow,style:{...null===(_=null===($=null===(H=null===(q=null==nn?void 0:nn.approvalScreen)||void 0===q?void 0:q.body)||void 0===H?void 0:H.contentSegment)||void 0===$?void 0:$.contentBlock)||void 0===_?void 0:_.actionsRow},children:[!Qo&&Yo.allowEditing&&o("button",{onClick:pn,className:d.actionButton,style:{...null===(J=null===(G=null===(P=null===(L=null==nn?void 0:nn.approvalScreen)||void 0===L?void 0:L.body)||void 0===P?void 0:P.contentSegment)||void 0===G?void 0:G.contentBlock)||void 0===J?void 0:J.actionButton},children:[n("span",{className:d.actionText,style:{...null===(X=null===(Q=null===(O=null===(K=null==nn?void 0:nn.approvalScreen)||void 0===K?void 0:K.body)||void 0===O?void 0:O.contentSegment)||void 0===Q?void 0:Q.contentBlock)||void 0===X?void 0:X.actionText},children:Zo.correctMe}),n(c,{size:16,color:(null===(no=null===(oo=null===(Z=null===(Y=null==nn?void 0:nn.approvalScreen)||void 0===Y?void 0:Y.body)||void 0===Z?void 0:Z.contentSegment)||void 0===oo?void 0:oo.contentBlock)||void 0===no?void 0:no.pencilIcon)||"#5928ED"})]}),!s.isApproved&&o("button",{disabled:Oo,onClick:gn,style:{...null===(io=null===(to=null===(lo=null===(eo=null==nn?void 0:nn.approvalScreen)||void 0===eo?void 0:eo.body)||void 0===lo?void 0:lo.contentSegment)||void 0===to?void 0:to.contentBlock)||void 0===io?void 0:io.approveButton},className:`${d.actionButton} ${Oo?d.actionDisabled:""}`,children:[n("span",{className:(null==hn?void 0:hn.approveText)?"":Oo?d.actionTextDisabled:d.actionText,style:{...null==hn?void 0:hn.approveText},children:Zo.approve}),n("span",{style:{...null===(uo=null===(ro=null===(co=null===(vo=null==nn?void 0:nn.approvalScreen)||void 0===vo?void 0:vo.body)||void 0===co?void 0:co.contentSegment)||void 0===ro?void 0:ro.contentBlock)||void 0===uo?void 0:uo.approveIconStyle},children:n(v,{size:16,color:Oo?(null===(mo=null===(po=null===(so=null===(ao=null==nn?void 0:nn.approvalScreen)||void 0===ao?void 0:ao.body)||void 0===so?void 0:so.contentSegment)||void 0===po?void 0:po.contentBlock)||void 0===mo?void 0:mo.disableApproveIconColor)||"#9CA3AF":(null===(bo=null===(go=null===(yo=null===(So=null==nn?void 0:nn.approvalScreen)||void 0===So?void 0:So.body)||void 0===yo?void 0:yo.contentSegment)||void 0===go?void 0:go.contentBlock)||void 0===bo?void 0:bo.approveIconColor)||"#5928ED"})})]}),m&&Yo.allowDeletion&&o("button",{onClick:bn,className:d.deleteButton,style:{...null===(Co=null===(ko=null===(ho=null===(Bo=null==nn?void 0:nn.approvalScreen)||void 0===Bo?void 0:Bo.body)||void 0===ho?void 0:ho.contentSegment)||void 0===ko?void 0:ko.contentBlock)||void 0===Co?void 0:Co.deleteButton},children:[n("span",{children:Zo.delete}),n(r,{size:16,color:(null===(No=null===(fo=null===(xo=null===(Io=null==nn?void 0:nn.approvalScreen)||void 0===Io?void 0:Io.body)||void 0===xo?void 0:xo.contentSegment)||void 0===fo?void 0:fo.contentBlock)||void 0===No?void 0:No.deleteIconColor)||"#ed3f28"})]})]})})]})};export{s as ContentBlock,s as default};
|
|
2
2
|
//# sourceMappingURL=ContentBlock.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as o}from"react/jsx-runtime";import{useState as l,useRef as t,useCallback as i}from"react";import{ContentBlock as r}from"../ContentBlock/ContentBlock.js";import d from"./ContentSegment.module.css.js";import{ChevronUpIcon as a}from"../../../../icons/ChevronUpIcon.js";import{BookmarkIcon as u}from"../../../../icons/BookmarkIcon.js";import{ChevronDownIcon as v}from"../../../../icons/ChevronDownIcon.js";import{useRequirementAI as c}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as s}from"../../../story-screen/BigEnoughPanel.js";import{Menu as m,MenuItem as p}from"@mui/material";import{ExternalLink as y,Download as h,Share2 as S,Copy as C}from"lucide-react";import I from"showdown";import{formatMarkdown as f}from"../../../../utils/helpers.js";const g=({userStoryForApproval:g,artifactTitleId:b,isSubFeature:w=!1,subFeatureIndex:N,onSaveSubFeature:k,onDeleteSubFeature:j,onSaveMainStoryContent:x,EditorComponent:A,ViewerComponent:B,handleDownloadUserStory:M,handleOpenSendDialog:T,showShareIcon:F=!1})=>{var _,z,D,E,L,P,U,W,H,R,q,V,O,G,J,K,Q,X,Y,Z,$,ee,ne,oe,le,te,ie,re,de;const[ae,ue]=l(!0),{customStyles:ve,customIcons:ce}=c(),se=null==ve?void 0:ve.userStoryCardStyles,[me,pe]=l(null),[ye,he]=l(!1),Se=t(null),Ce=i(()=>{ue(e=>!e)},[]),Ie=i(e=>{if(void 0===N)return;const n={...g,value:g.value.map((n,o)=>o===e?{...n,isApproved:!0}:n)};null==k||k(N,n)},[g,N,k]),fe=i((e,n)=>{if(void 0===N)return;const o={...g,value:g.value.map((o,l)=>l===e?{...o,content:n}:o)};null==k||k(N,o)},[g,N,k]),ge=i(e=>{if(void 0===N)return;const n={...g,value:g.value.filter((n,o)=>o!==e)};0!==n.value.length?null==k||k(N,n):null==j||j(N)},[g,N,k,j]),be=i((e,n)=>{var o;if(w)return;const l=null===(o=g.value[e])||void 0===o?void 0:o.contentId;if(!l)return;const t={...g,value:g.value.map(e=>e.contentId===l?{...e,content:n}:e)};null==x||x(t)},[g,w,x]),we=i(e=>{var n;if(w)return;const o=null===(n=g.value[e])||void 0===n?void 0:n.contentId;if(!o)return;const l={...g,value:g.value.map(e=>e.contentId===o?{...e,isApproved:!0}:e)};null==x||x(l)},[g,w,x]),Ne=()=>{pe(null)},ke=e=>{var n;const o=e.value.map(e=>e.content).join("");return{...e,value:o,sub_features:null===(n=e.sub_features)||void 0===n?void 0:n.map(ke)}},je=null!=(null==g?void 0:g.big_enough)&&!Number.isNaN(g.big_enough)&&!!(null==g?void 0:g.big_enough_decision_factors);return e("div",{className:d.container,style:{...null===(D=null===(z=null===(_=null==ve?void 0:ve.approvalScreen)||void 0===_?void 0:_.body)||void 0===z?void 0:z.contentSegment)||void 0===D?void 0:D.container},children:[w&&e("button",{onClick:Ce,className:d.header,style:{...null===(P=null===(L=null===(E=null==ve?void 0:ve.approvalScreen)||void 0===E?void 0:E.body)||void 0===L?void 0:L.contentSegment)||void 0===P?void 0:P.header},children:[e("div",{className:d.headerContent,style:{...null===(H=null===(W=null===(U=null==ve?void 0:ve.approvalScreen)||void 0===U?void 0:U.body)||void 0===W?void 0:W.contentSegment)||void 0===H?void 0:H.headerContent},children:[e("div",{className:d.headerMeta,style:{...null===(V=null===(q=null===(R=null==ve?void 0:ve.approvalScreen)||void 0===R?void 0:R.body)||void 0===q?void 0:q.contentSegment)||void 0===V?void 0:V.headerMeta},children:[n(u,{size:16,color:(null===(J=null===(G=null===(O=null==ve?void 0:ve.approvalScreen)||void 0===O?void 0:O.body)||void 0===G?void 0:G.contentSegment)||void 0===J?void 0:J.bookMarkColor)||"#8C8C8C"}),n("h2",{className:d.headerArtifactId,style:{...null===(X=null===(Q=null===(K=null==ve?void 0:ve.approvalScreen)||void 0===K?void 0:K.body)||void 0===Q?void 0:Q.contentSegment)||void 0===X?void 0:X.headerArtifactId},children:b})]}),n("p",{className:d.headerTitle,style:{...null===($=null===(Z=null===(Y=null==ve?void 0:ve.approvalScreen)||void 0===Y?void 0:Y.body)||void 0===Z?void 0:Z.contentSegment)||void 0===$?void 0:$.headerTitle},children:null==g?void 0:g.title})]}),e("div",{className:d.headerToggle,style:{...null===(oe=null===(ne=null===(ee=null==ve?void 0:ve.approvalScreen)||void 0===ee?void 0:ee.body)||void 0===ne?void 0:ne.contentSegment)||void 0===oe?void 0:oe.headerToggle},children:[je&&n(s,{customIcons:null==ce?void 0:ce.userStoryIcons,customStyles:null===(le=null==ve?void 0:ve.approvalScreen)||void 0===le?void 0:le.aiReasoningCitaionStyles,currentUserStory:g,panelStyles:null===(te=null==ve?void 0:ve.approvalScreen)||void 0===te?void 0:te.BigEnoughStyles}),F&&e(o,{children:[n("button",{className:d.iconButton,style:null==se?void 0:se.iconButton,onClick:e=>{pe(e.currentTarget)},children:n(y,{size:16})}),e(m,{id:"user-story-share-menu",anchorEl:me,open:!!me,onClose:()=>pe(null),style:null==se?void 0:se.userStoryShareMenu,children:[n(p,{style:null==se?void 0:se.userStoryMenuItem,onClick:async()=>{he(!0),M&&(await Promise.all([M("pdf"),M("doc")]),he(!1))},children:e("div",{ref:Se,className:d.menuItemContent,style:null==se?void 0:se.menuItemContent,children:[n(h,{size:16,color:null==se?void 0:se.menuIconColor}),n("p",{style:null==se?void 0:se.menuLabel,children:"Download"})]})}),n(p,{style:null==se?void 0:se.userStoryMenuItem,onClick:async()=>{const e=ke(g);null==T||T(!0,[e],g.artifactId),Ne()},children:e("div",{style:null==se?void 0:se.menuItemContent,className:d.menuItemContentPadded,children:[n(S,{size:16,color:null==se?void 0:se.menuIconColor}),n("p",{style:null==se?void 0:se.menuLabel,children:"Send"})]})}),n(p,{style:null==se?void 0:se.userStoryMenuItem,onClick:async()=>{const e=new I.Converter,n=g.value.map(e=>e.content).join(""),o=e.makeHtml(f(n)||n),l=(e=>{const n=(new I.Converter).makeHtml(e),o=document.createElement("div");return o.innerHTML=n,o.textContent||o.innerText||""})(f(n)||n),t=new ClipboardItem({"text/plain":new Blob([l],{type:"text/plain"}),"text/html":new Blob([o],{type:"text/html"})});try{await navigator.clipboard.write([t]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{Ne()}},children:e("div",{style:null==se?void 0:se.menuItemContent,className:d.menuItemContentPadded,children:[n(C,{size:16,color:null==se?void 0:se.menuIconColor}),n("p",{style:null==se?void 0:se.menuLabel,children:"Copy"})]})})]})]}),n(ae?a:v,{size:16})]})]}),ae&&n("div",{className:d.contentWrapper,style:{...null===(de=null===(re=null===(ie=null==ve?void 0:ve.approvalScreen)||void 0===ie?void 0:ie.body)||void 0===re?void 0:re.contentSegment)||void 0===de?void 0:de.contentWrapper},children:Array.isArray(null==g?void 0:g.value)&&g.value.map((e,o)=>n(r,{segment:e,segmentIndex:o,isSubFeature:w,onSaveContent:w?fe:be,onApproveContent:w?Ie:we,onDeleteContent:w?ge:void 0,EditorComponent:A,ViewerComponent:B},e.contentId))})]})};export{g as ContentSegment,g as default};
|
|
2
2
|
//# sourceMappingURL=ContentSegment.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={container:"ContentSegment-module_container__pZD9O",header:"ContentSegment-module_header__zzh-M",headerContent:"ContentSegment-module_headerContent__o77O4",headerMeta:"ContentSegment-module_headerMeta__Iv4Wf",headerArtifactId:"ContentSegment-module_headerArtifactId__Gr4B2",headerTitle:"ContentSegment-module_headerTitle__U7nsT",headerToggle:"ContentSegment-module_headerToggle__45got",contentWrapper:"ContentSegment-module_contentWrapper__eIUig"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".ContentSegment-module_container__pZD9O{display:flex;flex-direction:column;font-family:Inter,sans-serif}.ContentSegment-module_header__zzh-M{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-left:none;border-right:none;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;justify-content:space-between;padding:1rem 2rem;position:relative}.ContentSegment-module_headerContent__o77O4{display:flex;flex-direction:column;gap:.5rem}.ContentSegment-module_headerMeta__Iv4Wf{align-items:center;color:#8c8c8c;display:flex;flex-direction:row;gap:8px}.ContentSegment-module_headerArtifactId__Gr4B2{color:#6932e2;font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.ContentSegment-module_headerTitle__U7nsT{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.ContentSegment-module_headerToggle__45got{align-items:center;display:flex;justify-content:center}.ContentSegment-module_contentWrapper__eIUig{display:flex;flex-direction:column;gap:16px;padding:16px 32px}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
|
|
1
|
+
var e={container:"ContentSegment-module_container__pZD9O",header:"ContentSegment-module_header__zzh-M",headerContent:"ContentSegment-module_headerContent__o77O4",headerMeta:"ContentSegment-module_headerMeta__Iv4Wf",headerArtifactId:"ContentSegment-module_headerArtifactId__Gr4B2",headerTitle:"ContentSegment-module_headerTitle__U7nsT",headerToggle:"ContentSegment-module_headerToggle__45got",contentWrapper:"ContentSegment-module_contentWrapper__eIUig",iconButton:"ContentSegment-module_iconButton__0F6ls",menuItemContent:"ContentSegment-module_menuItemContent__39-so",menuItemContentPadded:"ContentSegment-module_menuItemContentPadded__CP7YL"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".ContentSegment-module_container__pZD9O{display:flex;flex-direction:column;font-family:Inter,sans-serif}.ContentSegment-module_header__zzh-M{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-left:none;border-right:none;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;justify-content:space-between;padding:1rem 2rem;position:relative}.ContentSegment-module_headerContent__o77O4{display:flex;flex-direction:column;gap:.5rem}.ContentSegment-module_headerMeta__Iv4Wf{align-items:center;color:#8c8c8c;display:flex;flex-direction:row;gap:8px}.ContentSegment-module_headerArtifactId__Gr4B2{color:#6932e2;font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.ContentSegment-module_headerTitle__U7nsT{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.ContentSegment-module_headerToggle__45got{align-items:center;display:flex;justify-content:center}.ContentSegment-module_contentWrapper__eIUig{display:flex;flex-direction:column;gap:16px;padding:16px 32px}.ContentSegment-module_iconButton__0F6ls{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.ContentSegment-module_menuItemContent__39-so{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.ContentSegment-module_menuItemContentPadded__CP7YL{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=ContentSegment.module.css.js.map
|
package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as n,__assign as e}from"tslib";import{jsx as o,jsxs as i}from"react/jsx-runtime";import t,{createContext as r,useRef as l,useState as a,useCallback as d,useMemo as c,useEffect as s,useContext as u}from"react";import v from"react-markdown";import g from"rehype-raw";import m from"./UserStoryWithCitation.module.css.js";import{useMarkdownSearch as p}from"../../shared/useMarkdownSearch.js";import{Info as h}from"lucide-react";import{Tooltip as f}from"@mui/material";import C from"dompurify";import y from"../../shared/UpdatedAnimationContent.js";import S from"../../shared/GeneratedCodeCitation.js";import w from"../../shared/CitationLoadingIndicator.js";import{useRequirementAI as R}from"../RequirementAIWrapper/RequirementAIWrapper.js";import I from"../../icons/CognitiveDecision.js";import b from"../../icons/BrainRed.js";import x,{SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING as N}from"../ai-reasoning/AiReasoningCitation.js";import k from"../../icons/RelevanceScoreIcon.js";import A from"../RecommendationBlock/RecommendationBlock.js";import j from"../UserStoryCard/AttachedContext.js";import U from"../ai-reasoning/AiReasoningCitationContent.js";import T from"./components/InlineUpdatedComponent.js";import L from"../segment/SegmentWrapper.js";import{MarkdownContextProvider as _}from"../../store/markdown-context.js";var M=r(!1),P=r({expandedInfo:null,setExpanded:function(){},reasonToRow:{current:new Map}}),E=r({rowId:""}),$=function(n){var t,r=n.aiReason,l=n.isHighConfidence,a=n.customStyle,d=n.customIcons,c=u(P),s=c.expandedInfo,v=c.setExpanded,g=c.reasonToRow,p=u(E).rowId,h=String(r.id);p&&g.current.set(h,p);var f=(null===(t=null==s?void 0:s.aiReason)||void 0===t?void 0:t.id)===r.id,C=l?(null==d?void 0:d.highConfidence)||o(I,{}):(null==d?void 0:d.lowConfidence)||o(b,{});return i("button",e({className:m.aiReasoningButton,style:a,onClick:function(n){n.stopPropagation(),n.preventDefault(),v(f?null:p,f?null:r)}},{children:[C,o("i",f?{className:"pi pi-angle-up ".concat(l?m.aiReasoningIconHighConfidence:m.aiReasoningIconLowConfidence)}:{className:"pi pi-angle-down ".concat(l?m.aiReasoningIconHighConfidence:m.aiReasoningIconLowConfidence)})]}))},D=function(n){var t,r,a=n.children,d=n.node,c=n.customStyles,s=n.customIcons,v=l(Math.random().toString(36).slice(2)).current,g=u(P).expandedInfo,p=(null==g?void 0:g.rowId)===v,h=Array.isArray(null==d?void 0:d.children)?d.children.filter(function(n){return"element"===n.type}).length:1,f=null!==(r=null===(t=null==d?void 0:d.properties)||void 0===t?void 0:t.style)&&void 0!==r?r:void 0;return i(E.Provider,e({value:{rowId:v}},{children:[o("tr",e({style:f?{cssText:f}:void 0},{children:a})),p&&(null==g?void 0:g.aiReason)&&o("tr",e({style:{width:"100%"}},{children:o("td",e({colSpan:h||1,className:m.tableExpandedCell},{children:o("div",e({className:m.tableExpandedCellInner},{children:o("div",e({className:m.tableExpandedCellContent},{children:o(U,{aiReason:g.aiReason,customIcons:s,customStyles:{aiReasoningContent:null==c?void 0:c.aiReasoningContent,aiReasoningAccordion:null==c?void 0:c.aiReasoningAccordion,aiReasoningMarkdown:null==c?void 0:c.aiReasoningMarkdown,aiReasoningPill:null==c?void 0:c.aiReasoningPill,webCitation:null==c?void 0:c.webCitation,stormeeCitation:null==c?void 0:c.stormeeCitation,waveformCitation:null==c?void 0:c.waveformCitation,imageCitation:null==c?void 0:c.imageCitation,fileCitation:null==c?void 0:c.fileCitation,appModCitation:null==c?void 0:c.appModCitation,rcaCitation:null==c?void 0:c.rcaCitation,readFileCitation:null==c?void 0:c.readFileCitation,loadingCitations:null==c?void 0:c.loadingCitations,chatCitation:null==c?void 0:c.chatCitation}})}))}))}))}))]}))};var F=["del","ins"];function H(n){return function(n,e,o){var i=e.join("|");return n.replace(new RegExp("<(".concat(i,")>([\\s\\S]*?)<\\/\\1>"),"gi"),function(n,e,i){return"<".concat(e,">").concat(o(i),"</").concat(e,">")})}(n,F,function(n){return n.split(/(<[^>]+>)/g).map(function(n){return!n||/^<[^>]+>$/.test(n)?n:function(n){if(!n)return n;var e=[];return n.replace(/`([^`\n]+)`/g,function(n,o){var i=e.push(o)-1;return"@@CODE_SPAN_".concat(i,"@@")}).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,function(n,o){var i,t=null!==(i=e[Number(o)])&&void 0!==i?i:"";return"<code>".concat(t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),"</code>")})}(n)}).join("")})}var z=function(r){var I,b=r.message,U=r.noMarkdownContent,E=r.useMarkdown,F=void 0===E||E,z=r.isParent,B=r.scenario,O=r.showUserStoryDiff,q=void 0!==O&&O,V=r.aiReasoningsForBlock,W=r.isCitationLoadingDisplay,G=void 0!==W&&W,Q=r.className;r.highConfidenceIcon,r.lowConfidenceIcon;var J=r.customStyles,K=r.customIcons,X=r.contextVariant,Y=r.aiReasoningDiffView,Z=r.userStoryCitations,nn=r.artifactId,en=r.isCraflow,on=r.onCraAccept,tn=r.onCraReject,rn=r.craFlowConfig,ln=r.isDisplayHighlightControl,an=void 0!==ln&&ln,dn=l(null),cn=R(),sn=cn.userStory,un=cn.inlineUpdateComponentConfig,vn=cn.getAvgScoreForStory,gn=cn.setUserStory,mn=cn.aiReasoning,pn=cn.setAiReasoning,hn=cn.customIcons,fn=cn.searchQueryList,Cn=cn.searchQueryReasoningIdList,yn=cn.currentHighlightIndex,Sn=cn.segmentComponentConfig,wn=null!=K?K:null==hn?void 0:hn.userStoryIcons;null==J||J.searchHighlight;var Rn=p(dn),In=Rn.search,bn=Rn.clear,xn=a("1"),Nn=xn[0],kn=xn[1],An=a(null),jn=An[0],Un=An[1],Tn=l(new Map),Ln=d(function(n,e){Un(n&&e?{rowId:n,aiReason:e}:null)},[]),_n=nn?vn(nn):0,Mn=a([]),Pn=Mn[0],En=Mn[1],$n=function(n){return null==n?"":"string"==typeof n?n:"number"==typeof n?String(n):Array.isArray(n)?n.map($n).join(""):t.isValidElement(n)?$n(n.props.children):""},Dn=function(n){var e=n;return e=function(n){for(var e,o=/<updated[^>]*>[\s\S]*?<\/updated>/gi,i=[],t=new RegExp(o.source,o.flags);null!==(e=t.exec(n));){var r=e[0],l=r.match(/<deleted>([\s\S]*?)<\/deleted>/i),a=r.match(/<changed>([\s\S]*?)<\/changed>/i),d=function(n){return(n.match(/^\s*\d+\.\s/gm)||[]).length};i.push({index:e.index,endIndex:e.index+e[0].length,deletedItemCount:d((null==l?void 0:l[1])||""),changedItemCount:d((null==a?void 0:a[1])||"")})}if(0===i.length)return n;for(var c=n,s=function(n){var e=i[n],o=e.changedItemCount-e.deletedItemCount;if(0===o)return"continue";for(var t=!1,r=0,l=c.substring(0,e.index).split("\n").reverse();r<l.length;r++){var a=l[r].trim();if(""!==a){/^\d+\.\s/.test(a)&&(t=!0);break}}if(!t)return"continue";var d=e.endIndex,s=n+1<i.length?i[n+1].index:c.length,u=c.substring(d,s);u=u.replace(/^(\s*)(\d+)\.\s/gm,function(n,e,i){return"".concat(e).concat(parseInt(i,10)+o,". ")}),c=c.substring(0,d)+u+c.substring(s)},u=i.length-1;u>=0;u--)s(u);return c}(e=(e=(e=(e=(e=(e=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(n,e){var o=e.replace(/ai_reasoning\$(\d+)/g,function(n,e){return"ai_reasoning$".concat(e,"-legacy")});return"<deleted>".concat(o,"</deleted>")})).replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,function(n,e,o){var i=btoa(encodeURIComponent(o.trim()));return"\n\n<generatedCode".concat(e,' data-raw="').concat(i,'"></generatedCode>\n\n')})).replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2")).replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,function(n,e,o,i,t){var r=i.match(/<table[\s\S]*?<\/table>/i);if(r){var l=btoa(encodeURIComponent(r[0]));return"<segment".concat(o,' data-table="').concat(l,'"></segment>')}return n})).replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,function(n,e,o){if(/<table[\s>]/i.test(o)){var i=btoa(encodeURIComponent(o));return"<updatedsegment".concat(e,' data-raw="').concat(i,'"></updatedsegment>')}return n})).replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,function(n,o,i,t){var r=e.substring(0,t),l=r.lastIndexOf("\n"),a=/^\s+[-*]\s/.test(r.substring(l+1))||/^\s+\d+\.\s/.test(r.substring(l+1)),d=/^\s*(\d+\.|\s*[-*])\s+$/.test(r.substring(l+1));if(a||d){var c=i;return c=(c=(c=(c=c.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),"<updated".concat(o,">").concat(c,"</updated>")}return n})),e=function(n){var e=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(n,e){var o=e.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:o!==e}),"<deleted>".concat(o,"</deleted>")});return e.replace(/<changed>([\s\S]*?)<\/changed>/gi,function(n,e){var o=e.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:o!==e,preview:e.substring(0,120)}),"<changed>".concat(o,"</changed>")})}(e),e=H(e)},Fn=c(function(){return b?Dn(b):b},[b]);s(function(){En(V||mn)},[V,mn]);var Hn=c(function(){return{upt:function(i){var t;i.node;var r=i.children,l=n(i,["node","children"]),a=null==l?void 0:l.id,d=a?null===(t=a.split("$"))||void 0===t?void 0:t[1]:null,c=mn.find(function(n){return n.id.toString()===d});return c?o(T,e({aiReason:c,customStyles:null==J?void 0:J.inlineUpdatedComponent,handleClickCognitiveDecision:null==un?void 0:un.handleClickCognitiveDecision,handleClickUpdatedPill:null==un?void 0:un.handleClickUpdatedPill,handleClickOutputValue:null==un?void 0:un.handleClickOutputValue,customIcons:null==un?void 0:un.customIcons},{children:r})):r},del:function(i){var t,r,l,a;i.node;var d=i.children,c=n(i,["node","children"]),s=c.aireason,u=s&&(null===(t=s.deviation_details)||void 0===t?void 0:t.resolved)&&("rejected"===(null===(r=s.deviation_details)||void 0===r?void 0:r.resolved)||"reverted"===(null===(l=s.deviation_details)||void 0===l?void 0:l.resolved));return o("span",e({className:m.deleted,style:e(e({},null!==(a=null==J?void 0:J.deleted)&&void 0!==a?a:{}),{textDecoration:u?"none":"line-through"})},c,{onClick:c.onclick},{children:d}))},ins:function(i){var t=i.children,r=n(i,["children"]);return o("span",e({className:m.inserted,style:null==J?void 0:J.inserted},r,{onClick:r.onclick},{children:t}))},preserved:function(i){var t=i.children,r=n(i,["children"]);return o("span",e({className:m.preserved,style:null==J?void 0:J.preserved},r,{onClick:r.onclick},{children:t}))},h1:function(i){i.node;var t=n(i,["node"]);return o("h1",e({className:m.heading1,style:null==J?void 0:J.heading1},{children:t.children}))},h2:function(i){i.node;var t=n(i,["node"]);return o("h2",e({className:m.heading2,style:null==J?void 0:J.heading2},{children:t.children}))},h3:function(i){i.node;var t=n(i,["node"]);return o("h3",e({className:m.heading3,style:null==J?void 0:J.heading3},{children:t.children}))},b:function(i){i.node;var t=n(i,["node"]);return o("b",e({className:m.bold,style:null==J?void 0:J.bold},{children:null==t?void 0:t.children}))},p:function(i){i.node;var t=n(i,["node"]);return o("p",e({},t,{className:m.paragraph,style:null==J?void 0:J.paragraph},{children:t.children}))},updated:function(i){var t=i.node,r=n(i,["node"]);return o(y,e({},r,{showUserStoryDiff:q,currentUpdatedTagId:Nn,setCurrentUpdatedTagId:kn,userStory:sn,setUserStory:gn,setAiReasoning:pn,node:t,isCraflow:en,onCraAccept:on,onCraReject:tn,customStyles:null==J?void 0:J.updatedContent,craFlowConfig:rn}))},ol:function(i){var t,r,l,a=i.node,d=n(i,["node"]),c=null!==(l=null!==(r=null===(t=null==a?void 0:a.properties)||void 0===t?void 0:t.start)&&void 0!==r?r:null==d?void 0:d.start)&&void 0!==l?l:void 0;return o("ol",e({className:m.orderedList,style:null==J?void 0:J.olist},c?{start:Number(c)}:{},{children:null==d?void 0:d.children}))},ul:function(i){i.node;var t=n(i,["node"]);return o("ul",e({className:m.unorderedList,style:null==J?void 0:J.ulist},{children:null==t?void 0:t.children}))},table:function(n){var i=n.children;return o("div",e({className:m.tableWrapper},{children:o("table",e({className:m.table,style:null==J?void 0:J.table},{children:i}))}))},tr:function(n){var e=n.node,i=n.children;return o(D,{node:e,children:i,customStyles:J})},td:function(i){var t,r=i.node,l=i.children,a=null!==(t=null==r?void 0:r.properties)&&void 0!==t?t:{},d=a.style,c=n(a,["style"]);return o(M.Provider,e({value:!0},{children:o("td",e({},c,{style:d?{cssText:d}:void 0},{children:l}))}))},th:function(i){var t,r=i.node,l=i.children,a=null!==(t=null==r?void 0:r.properties)&&void 0!==t?t:{},d=a.style,c=n(a,["style"]);return o(M.Provider,e({value:!0},{children:o("th",e({},c,{style:d?{cssText:d}:void 0},{children:l}))}))},recommendation:function(i){var t;i.node;var r=n(i,["node"]),l="The AI has selected this content based on: ".concat((null===(t=null==r?void 0:r.children)||void 0===t?void 0:t[0])||"");return o(A,e({},r,{customStyles:null==J?void 0:J.recommendationBlock,label:l}))},a:function(e){var i,r,l;e.inline;var a=e.children;e.node;var d=n(e,["inline","children","node"]),c=u(M)||"true"==(null==d?void 0:d.table),s="".concat(null==d?void 0:d.href),v=null===(i=s.split("$"))||void 0===i?void 0:i[0],g=null===(r=s.split("$"))||void 0===r?void 0:r[1];if("ai_reasoning"===v){var m=(null!==(l=q?Y:mn)&&void 0!==l?l:[]).find(function(n){return n.id.toString()===decodeURIComponent(g)}),p=Cn.includes(g);if(m){if(c)return o($,{aiReason:m,customStyle:null==J?void 0:J.tableAiReasoning,customIcons:wn,isHighConfidence:m.relevance_score>=N});var h="source"!==t.Children.toArray(a).join("").trim().toLowerCase();return o(x,{aiReason:m,isSourceHasHighlight:p,inlineLabel:a,isInlineCitation:h,customIcons:wn,customStyles:{aiReasoningContent:null==J?void 0:J.aiReasoningContent,aiReasoningAccordion:null==J?void 0:J.aiReasoningAccordion,aiReasoningMarkdown:null==J?void 0:J.aiReasoningMarkdown,aiReasoningPill:null==J?void 0:J.aiReasoningPill,webCitation:null==J?void 0:J.webCitation,stormeeCitation:null==J?void 0:J.stormeeCitation,waveformCitation:null==J?void 0:J.waveformCitation,imageCitation:null==J?void 0:J.imageCitation,fileCitation:null==J?void 0:J.fileCitation,appModCitation:null==J?void 0:J.appModCitation,rcaCitation:null==J?void 0:J.rcaCitation,readFileCitation:null==J?void 0:J.readFileCitation,loadingCitations:null==J?void 0:J.loadingCitations,chatCitation:null==J?void 0:J.chatCitation,bigEnoughCitation:null==J?void 0:J.bigEnoughCitation}})}}return null},code:function(i){i.inline;var t=i.children,r=i.className;return i.node,n(i,["inline","children","className","node"]),/language-(\w+)/.exec(r||"")||(null==r?void 0:r.includes("language-"))?o("div",{children:o("code",e({className:m.blockCode,style:null==J?void 0:J.code},{children:t}))}):o("code",e({className:m.inlineCode,style:null==J?void 0:J.code},{children:t}))},learned:function(n){var i=n.children;return o(f,e({title:i,placement:"top"},{children:o(h,{size:16,className:m.learned})}))},generatedcode:function(e){e.node;var i=n(e,["node"]),t=(null==i?void 0:i.language)||"python",r=function(n){var e="";try{if(n["data-raw"])e=decodeURIComponent(atob(n["data-raw"]));else{var o=function(n){var e;return"string"==typeof n?n:Array.isArray(n)?n.map(o).join(""):(null===(e=null==n?void 0:n.props)||void 0===e?void 0:e.children)?o(n.props.children):""};e=o(n.children)}}catch(o){console.error("Error decoding generated code:",o),e=String(n.children)}return e}(i);return o(S,{title:"Generated Code",code:r,language:t,customStyles:{pill:null==J?void 0:J.generatedCodePill,content:null==J?void 0:J.generatedCodeContent}})},updatedsegment:function(e){var i,t,r,l,a=e.node,d=e.children,c=n(e,["node","children"]),s="".concat(null===(i=a.position)||void 0===i?void 0:i.start.line,"-").concat(null===(t=a.position)||void 0===t?void 0:t.start.column,"-").concat(null===(r=a.position)||void 0===r?void 0:r.end.line,"-").concat(null===(l=a.position)||void 0===l?void 0:l.end.column),u=function(n){if(!n["data-raw"])return null;try{return decodeURIComponent(atob(n["data-raw"]))}catch(n){return console.error("Error decoding segment raw content:",n),null}}(c),v=o("div",u?{dangerouslySetInnerHTML:{__html:C.sanitize(u)}}:{children:d});return o(L,{id:s,node:a,children:v,props:c,segmentComponentConfig:Sn,customStyles:J,customIcons:K,extractText:$n,isUpdatedSegment:!0})},segment:function(e){var i,t,r,l,a=e.node,d=e.children,c=n(e,["node","children"]),s="".concat(null===(i=a.position)||void 0===i?void 0:i.start.line,"-").concat(null===(t=a.position)||void 0===t?void 0:t.start.column,"-").concat(null===(r=a.position)||void 0===r?void 0:r.end.line,"-").concat(null===(l=a.position)||void 0===l?void 0:l.end.column);return o(L,{id:s,node:a,children:d,props:c,segmentComponentConfig:Sn,customStyles:J,customIcons:K,extractText:$n})}}},[Pn,rn,mn,Z,Nn,q,b,K,fn,Cn,J,Sn]);return console.log("normalized markdown ",Fn),s(function(){if(dn.current){if(fn.length){var n;if(0===Cn.length||an)requestAnimationFrame(function(){In([fn[yn].replace(/\*/g,"")])});else{var e=dn.current,o=new MutationObserver(function(){clearTimeout(n),n=setTimeout(function(){o.disconnect(),requestAnimationFrame(function(){In([fn[yn].replace(/\*/g,"")])})},50)});o.observe(e,{childList:!0,subtree:!0})}return function(){clearTimeout(n)}}bn()}},[fn,Cn,yn,an]),o(P.Provider,e({value:{expandedInfo:jn,setExpanded:Ln,reasonToRow:Tn}},{children:i("div",e({ref:dn,className:"".concat(m.container," ").concat("approving"!==B?m.wrapper:""," ").concat(Q||""),style:null==J?void 0:J.container},{children:[F?o(_,{children:o(v,e({components:Hn,rehypePlugins:[g]},{children:Fn}))}):U,_n>0&&o("div",e({className:m.confidenceScoreContainer,style:null==J?void 0:J.confidenceScoreContainer},{children:i("span",e({className:m.confidenceScore,style:null==J?void 0:J.confidenceScore},{children:[o(k,{size:14,color:(null==J?void 0:J.confidenceScoreIconColor)||"#166534"}),_n,"%"]}))})),G&&o("div",e({className:m.citationLoader,style:null==J?void 0:J.citationLoaderContainer},{children:o(w,{customStyles:{container:null==J?void 0:J.citationLoadingContainer,icon:null==J?void 0:J.citationLoadingIcon,text:null==J?void 0:J.citationLoadingText}})})),z&&o("div",e({style:e({},null===(I=null==J?void 0:J.attachedContext)||void 0===I?void 0:I.wrapper),className:"flex mt-5"},{children:o(j,{customStyles:null==J?void 0:J.attachedContext,variant:X})}))]}))}))};export{z as default};
|
|
1
|
+
import{jsx as e,Fragment as n,jsxs as i}from"react/jsx-runtime";import o,{createContext as t,useRef as l,useState as d,useCallback as r,useMemo as a,useEffect as s,useContext as c}from"react";import u from"react-markdown";import p from"rehype-raw";import g from"./UserStoryWithCitation.module.css.js";import{useMarkdownSearch as h}from"../../shared/useMarkdownSearch.js";import{Info as v}from"lucide-react";import{Tooltip as m}from"@mui/material";import C from"dompurify";import f from"../../shared/UpdatedAnimationContent.js";import y from"../../shared/GeneratedCodeCitation.js";import w from"../../shared/CitationLoadingIndicator.js";import{useRequirementAI as S}from"../RequirementAIWrapper/RequirementAIWrapper.js";import b from"../../icons/CognitiveDecision.js";import I from"../../icons/BrainRed.js";import R,{SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING as $}from"../ai-reasoning/AiReasoningCitation.js";import x from"../../icons/RelevanceScoreIcon.js";import N from"../RecommendationBlock/RecommendationBlock.js";import k from"../UserStoryCard/AttachedContext.js";import A from"../ai-reasoning/AiReasoningCitationContent.js";import j from"./components/InlineUpdatedComponent.js";import U from"../segment/SegmentWrapper.js";import{MarkdownContextProvider as E}from"../../store/markdown-context.js";import L from"./components/InlineManualComponent.js";import M from"./components/HighlightButtonComponent.js";const T=t(!1),P=t({expandedInfo:null,setExpanded:()=>{},reasonToRow:{current:new Map}}),D=t({rowId:""}),_=({aiReason:n,isHighConfidence:o,customStyle:t,customIcons:l})=>{var d;const{expandedInfo:r,setExpanded:a,reasonToRow:s}=c(P),{rowId:u}=c(D),p=String(n.id);u&&s.current.set(p,u);const h=(null===(d=null==r?void 0:r.aiReason)||void 0===d?void 0:d.id)===n.id,v=o?(null==l?void 0:l.highConfidence)||e(b,{}):(null==l?void 0:l.lowConfidence)||e(I,{});return i("button",{className:g.aiReasoningButton,style:t,onClick:e=>{e.stopPropagation(),e.preventDefault(),a(h?null:u,h?null:n)},children:[v,e("i",h?{className:`pi pi-angle-up ${o?g.aiReasoningIconHighConfidence:g.aiReasoningIconLowConfidence}`}:{className:`pi pi-angle-down ${o?g.aiReasoningIconHighConfidence:g.aiReasoningIconLowConfidence}`})]})},H=({children:n,node:o,customStyles:t,customIcons:d})=>{var r,a;const s=l(Math.random().toString(36).slice(2)).current,{expandedInfo:u}=c(P),p=(null==u?void 0:u.rowId)===s,h=Array.isArray(null==o?void 0:o.children)?o.children.filter(e=>"element"===e.type).length:1,v=null!==(a=null===(r=null==o?void 0:o.properties)||void 0===r?void 0:r.style)&&void 0!==a?a:void 0;return i(D.Provider,{value:{rowId:s},children:[e("tr",{style:v?{cssText:v}:void 0,children:n}),p&&(null==u?void 0:u.aiReason)&&e("tr",{style:{width:"100%"},children:e("td",{colSpan:h||1,className:g.tableExpandedCell,children:e("div",{className:g.tableExpandedCellInner,children:e("div",{className:g.tableExpandedCellContent,children:e(A,{aiReason:u.aiReason,customIcons:d,customStyles:{aiReasoningContent:null==t?void 0:t.aiReasoningContent,aiReasoningAccordion:null==t?void 0:t.aiReasoningAccordion,aiReasoningMarkdown:null==t?void 0:t.aiReasoningMarkdown,aiReasoningPill:null==t?void 0:t.aiReasoningPill,webCitation:null==t?void 0:t.webCitation,stormeeCitation:null==t?void 0:t.stormeeCitation,waveformCitation:null==t?void 0:t.waveformCitation,imageCitation:null==t?void 0:t.imageCitation,fileCitation:null==t?void 0:t.fileCitation,appModCitation:null==t?void 0:t.appModCitation,rcaCitation:null==t?void 0:t.rcaCitation,readFileCitation:null==t?void 0:t.readFileCitation,loadingCitations:null==t?void 0:t.loadingCitations,chatCitation:null==t?void 0:t.chatCitation}})})})})})]})};const F=["del","ins"];function B(e){return function(e,n,i){const o=n.join("|");return e.replace(new RegExp(`<(${o})>([\\s\\S]*?)<\\/\\1>`,"gi"),(e,n,o)=>`<${n}>${i(o)}</${n}>`)}(e,F,e=>e.split(/(<[^>]+>)/g).map(e=>!e||/^<[^>]+>$/.test(e)?e:function(e){if(!e)return e;const n=[];return e.replace(/`([^`\n]+)`/g,(e,i)=>`@@CODE_SPAN_${n.push(i)-1}@@`).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,(e,i)=>{var o;return`<code>${t=null!==(o=n[Number(i)])&&void 0!==o?o:"",t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}</code>`;var t})}(e)).join(""))}const O=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function V(e,n){const i=[],t=new Set(n.map(e=>e.toLowerCase())),l=e=>{var n,d;try{if(null==e||"boolean"==typeof e)return null;if("string"==typeof e||"number"==typeof e)return e;if(Array.isArray(e))return e.map(e=>l(e)).flat().filter(e=>null!=e);if(!o.isValidElement(e))return e;const r="string"==typeof e.type?e.type.toLowerCase():"";if(t.has(r))return i.push(e),null;if(O.has(r))return e;const a=null===(d=o.Children.map(null===(n=e.props)||void 0===n?void 0:n.children,l))||void 0===d?void 0:d.flat().filter(e=>null!=e);return a&&0!==a.length?o.cloneElement(e,void 0,a):null}catch(n){return console.error("splitNestedDiffNodes failed while processing node:",n),e}};try{return{cleanedChildren:l(e),extractedNodes:i}}catch(n){return console.error("splitNestedDiffNodes failed:",n),{cleanedChildren:e,extractedNodes:[]}}}const q=({message:t,noMarkdownContent:b,useMarkdown:I=!0,isParent:A,scenario:D,showUserStoryDiff:F=!1,aiReasoningsForBlock:O,isCitationLoadingDisplay:q=!1,className:z,highConfidenceIcon:W,lowConfidenceIcon:G,customStyles:Q,customIcons:J,contextVariant:K,aiReasoningDiffView:X,userStoryCitations:Y,artifactId:Z,isCraflow:ee,onCraAccept:ne,onCraReject:ie,craFlowConfig:oe,isDisplayHighlightControl:te=!1,showConfidenceScore:le=!0,CDNeededInChip:de})=>{var re;const ae=l(null),{userStory:se,inlineUpdateComponentConfig:ce,getAvgScoreForStory:ue,setUserStory:pe,aiReasoning:ge,setAiReasoning:he,customIcons:ve,searchQueryList:me,searchQueryReasoningIdList:Ce,currentHighlightIndex:fe,segmentComponentConfig:ye,inlineManualComponentConfig:we,diffEditConfig:Se}=S(),be=null!=J?J:null==ve?void 0:ve.userStoryIcons;null==Q||Q.searchHighlight;const{search:Ie,clear:Re}=h(ae),[$e,xe]=d("1"),[Ne,ke]=d(null),Ae=l(new Map),[je,Ue]=d(new Set),Ee=r((e,n)=>{ke(e&&n?{rowId:e,aiReason:n}:null)},[]),Le=Z?ue(Z):0,[Me,Te]=d([]),Pe=r(e=>{Ue(n=>{const i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i})},[]),De=e=>null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(De).join(""):o.isValidElement(e)?De(e.props.children):"",_e=e=>{let n=e;return n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>`<deleted>${n.replace(/ai_reasoning\$(\d+)/g,(e,n)=>`ai_reasoning$${n}-legacy`)}</deleted>`),n=n.replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,(e,n,i)=>`\n\n<generatedCode${n} data-raw="${btoa(encodeURIComponent(i.trim()))}"></generatedCode>\n\n`),n=n.replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2"),n=n.replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,(e,n,i,o,t)=>{const l=o.match(/<table[\s\S]*?<\/table>/i);if(l){return`<segment${i} data-table="${btoa(encodeURIComponent(l[0]))}"></segment>`}return e}),n=n.replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,(e,n,i)=>{if(/<table[\s>]/i.test(i)){return`<updatedsegment${n} data-raw="${btoa(encodeURIComponent(i))}"></updatedsegment>`}return e}),n=n.replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,(e,i,o,t)=>{const l=n.substring(0,t),d=l.lastIndexOf("\n"),r=/^\s+[-*]\s/.test(l.substring(d+1))||/^\s+\d+\.\s/.test(l.substring(d+1)),a=/^\s*(\d+\.|\s*[-*])\s+$/.test(l.substring(d+1));if(r||a){let e=o;return e=e.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),`<updated${i}>${e}</updated>`}return e}),n=function(e){const n=/<updated[^>]*>[\s\S]*?<\/updated>/gi,i=[];let o;const t=new RegExp(n.source,n.flags);for(;null!==(o=t.exec(e));){const e=o[0],n=e.match(/<deleted>([\s\S]*?)<\/deleted>/i),t=e.match(/<changed>([\s\S]*?)<\/changed>/i),l=e=>(e.match(/^\s*\d+\.\s/gm)||[]).length;i.push({index:o.index,endIndex:o.index+o[0].length,deletedItemCount:l((null==n?void 0:n[1])||""),changedItemCount:l((null==t?void 0:t[1])||"")})}if(0===i.length)return e;let l=e;for(let e=i.length-1;e>=0;e--){const n=i[e],o=n.changedItemCount-n.deletedItemCount;if(0===o)continue;const t=l.substring(0,n.index).split("\n").reverse();let d=!1;for(const e of t){const n=e.trim();if(""!==n){/^\d+\.\s/.test(n)&&(d=!0);break}}if(!d)continue;const r=n.endIndex,a=e+1<i.length?i[e+1].index:l.length;let s=l.substring(r,a);s=s.replace(/^(\s*)(\d+)\.\s/gm,(e,n,i)=>`${n}${parseInt(i,10)+o}. `),l=l.substring(0,r)+s+l.substring(a)}return l}(n),n=function(e){let n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),`<deleted>${i}</deleted>`});return n=n.replace(/<changed>([\s\S]*?)<\/changed>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),`<changed>${i}</changed>`}),n}(n),n=B(n),n},He=a(()=>t?_e(t):t,[t]);s(()=>{Te(O||ge)},[O,ge]);const Fe=a(()=>({span:({node:n,children:i,...o})=>{var t,l,d,r,a;const s=null!==(l=null===(t=null==n?void 0:n.properties)||void 0===t?void 0:t["highlight-id"])&&void 0!==l?l:null==o?void 0:o["highlight-id"],c="string"==typeof s&&je.has(s),u=null!==(r=null===(d=null==n?void 0:n.properties)||void 0===d?void 0:d["highlight-color"])&&void 0!==r?r:null==o?void 0:o["highlight-color"];return e("span",{style:{...null!==(a=null==Q?void 0:Q.span)&&void 0!==a?a:{},...c?{backgroundColor:u||"#fef08a"}:{}},children:i})},button:({node:i,children:o,...t})=>{var l,d,r,a,s,c;const u=null!==(d=null===(l=null==i?void 0:i.properties)||void 0===l?void 0:l.action)&&void 0!==d?d:null==t?void 0:t.action,p=null!==(a=null===(r=null==i?void 0:i.properties)||void 0===r?void 0:r["highlight-id"])&&void 0!==a?a:null==t?void 0:t["highlight-id"],g=null!==(c=null===(s=null==i?void 0:i.properties)||void 0===s?void 0:s["highlight-type"])&&void 0!==c?c:null==t?void 0:t["highlight-type"];return"highlight"===u?e(M,{highlightId:p,handleHighlightSpan:Pe,icon:"web"===g?null==be?void 0:be.webCitationIcon:"doc"===g?null==be?void 0:be.fileCitationIcon:e(n,{}),customStyles:"web"===g?null==Q?void 0:Q.webButton:"doc"===g?null==Q?void 0:Q.docButton:{}}):null},upt:({node:i,children:o,...t})=>{var l;const d=null==t?void 0:t.id,r=d?null===(l=d.split("$"))||void 0===l?void 0:l[1]:null,a=ge.find(e=>e.id.toString()===r);return a?e(n,{children:e(j,{aiReason:a,customStyles:null==Q?void 0:Q.inlineUpdatedComponent,handleClickCognitiveDecision:null==ce?void 0:ce.handleClickCognitiveDecision,handleClickUpdatedPill:null==ce?void 0:ce.handleClickUpdatedPill,handleClickOutputValue:null==ce?void 0:ce.handleClickOutputValue,customIcons:null==ce?void 0:ce.customIcons,CDNeededInChip:de,children:o||e(n,{})})}):o||e(n,{})},del:({node:o,children:t,...l})=>{var d;const{cleanedChildren:r,extractedNodes:a}=V(t,["ins"]);return i(n,{children:[e("span",{className:g.deleted,style:null!==(d=null==Q?void 0:Q.deleted)&&void 0!==d?d:{},...l,onClick:()=>{l.onclick&&l.onclick()},children:r}),a]})},ins:({children:o,...t})=>{var l;const{cleanedChildren:d,extractedNodes:r}=V(o,["del"]);return i(n,{children:[e("span",{className:g.inserted,style:null!==(l=null==Q?void 0:Q.inserted)&&void 0!==l?l:{},...t,onClick:()=>{t.onclick&&t.onclick()},children:d}),r]})},preserved:({children:n,...i})=>e("span",{className:g.preserved,style:null==Q?void 0:Q.preserved,...i,children:n}),manual:({children:n,...i})=>{const o=null==i?void 0:i.id,t=ge.find(e=>e.id.toString()===o);return t?e(L,{aiReason:t,handleClick:null==we?void 0:we.handleClick,children:n}):n},invisible:({children:i,...o})=>e(n,{}),h1:({node:n,...i})=>e("h1",{className:g.heading1,style:null==Q?void 0:Q.heading1,children:i.children}),h2:({node:n,...i})=>e("h2",{className:g.heading2,style:null==Q?void 0:Q.heading2,children:i.children}),h3:({node:n,...i})=>e("h3",{className:g.heading3,style:null==Q?void 0:Q.heading3,children:i.children}),b:({node:n,...i})=>e("b",{className:g.bold,style:null==Q?void 0:Q.bold,children:null==i?void 0:i.children}),p:({node:n,...i})=>e("p",{...i,className:g.paragraph,style:null==Q?void 0:Q.paragraph,children:i.children}),updated:({node:n,...i})=>e(f,{...i,showUserStoryDiff:F,currentUpdatedTagId:$e,setCurrentUpdatedTagId:xe,userStory:se,setUserStory:pe,setAiReasoning:he,node:n,isCraflow:ee,onCraAccept:ne,onCraReject:ie,diffEditConfig:Se,customStyles:null==Q?void 0:Q.updatedContent,craFlowConfig:oe}),ol:({node:n,...i})=>{var o,t,l;const d=null!==(l=null!==(t=null===(o=null==n?void 0:n.properties)||void 0===o?void 0:o.start)&&void 0!==t?t:null==i?void 0:i.start)&&void 0!==l?l:void 0;return e("ol",{className:g.orderedList,style:null==Q?void 0:Q.olist,...d?{start:Number(d)}:{},children:null==i?void 0:i.children})},ul:({node:n,...i})=>e("ul",{className:g.unorderedList,style:null==Q?void 0:Q.ulist,children:null==i?void 0:i.children}),table:({children:n})=>e("div",{className:g.tableWrapper,children:e("table",{className:g.table,style:null==Q?void 0:Q.table,children:n})}),tr:({node:n,children:i})=>e(H,{node:n,children:i,customStyles:Q}),td:({node:n,children:i})=>{var o;const{style:t,...l}=null!==(o=null==n?void 0:n.properties)&&void 0!==o?o:{};return e(T.Provider,{value:!0,children:e("td",{...l,style:t?{cssText:t}:void 0,children:i})})},th:({node:n,children:i})=>{var o;const{style:t,...l}=null!==(o=null==n?void 0:n.properties)&&void 0!==o?o:{};return e(T.Provider,{value:!0,children:e("th",{...l,style:t?{cssText:t}:void 0,children:i})})},recommendation:({node:n,...i})=>{var o;const t=`The AI has selected this content based on: ${(null===(o=null==i?void 0:i.children)||void 0===o?void 0:o[0])||""}`;return e(N,{...i,customStyles:null==Q?void 0:Q.recommendationBlock,label:t})},a:({inline:n,children:i,node:o,...t})=>{var l,d,r;const a=c(T)||"true"==(null==t?void 0:t.table),s=`${null==t?void 0:t.href}`,u=null===(l=s.split("$"))||void 0===l?void 0:l[0],p=null===(d=s.split("$"))||void 0===d?void 0:d[1];if("ai_reasoning"===u){const n=(null!==(r=F?X:ge)&&void 0!==r?r:[]).find(e=>e.id.toString()===decodeURIComponent(p)),o=Ce.includes(p);if(n){if(a)return e(_,{aiReason:n,customStyle:null==Q?void 0:Q.tableAiReasoning,customIcons:be,isHighConfidence:n.relevance_score>=$});const t=De(i),l="source"!==t.trim().toLowerCase();return e(R,{aiReason:n,isSourceHasHighlight:o,inlineLabel:t,isInlineCitation:l,customIcons:be,customStyles:{aiReasoningContent:null==Q?void 0:Q.aiReasoningContent,aiReasoningAccordion:null==Q?void 0:Q.aiReasoningAccordion,aiReasoningMarkdown:null==Q?void 0:Q.aiReasoningMarkdown,aiReasoningPill:null==Q?void 0:Q.aiReasoningPill,webCitation:null==Q?void 0:Q.webCitation,stormeeCitation:null==Q?void 0:Q.stormeeCitation,waveformCitation:null==Q?void 0:Q.waveformCitation,imageCitation:null==Q?void 0:Q.imageCitation,fileCitation:null==Q?void 0:Q.fileCitation,appModCitation:null==Q?void 0:Q.appModCitation,rcaCitation:null==Q?void 0:Q.rcaCitation,readFileCitation:null==Q?void 0:Q.readFileCitation,loadingCitations:null==Q?void 0:Q.loadingCitations,chatCitation:null==Q?void 0:Q.chatCitation,bigEnoughCitation:null==Q?void 0:Q.bigEnoughCitation}})}}return null},code:({inline:n,children:i,className:o,node:t,...l})=>/language-(\w+)/.exec(o||"")||(null==o?void 0:o.includes("language-"))?e("div",{children:e("code",{className:g.blockCode,style:null==Q?void 0:Q.code,children:i})}):e("code",{className:g.inlineCode,style:null==Q?void 0:Q.code,children:i}),learned:({children:n})=>e(m,{title:n,placement:"top",children:e(v,{size:16,className:g.learned})}),generatedcode:({node:n,...i})=>{const o=(null==i?void 0:i.language)||"python",t=(e=>{let n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{const i=e=>{var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n})(i);return e(y,{title:"Generated Code",code:t,language:o,customStyles:{pill:null==Q?void 0:Q.generatedCodePill,content:null==Q?void 0:Q.generatedCodeContent}})},updatedsegment:({node:n,children:i,...o})=>{var t,l,d,r;const a=`${null===(t=n.position)||void 0===t?void 0:t.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(d=n.position)||void 0===d?void 0:d.end.line}-${null===(r=n.position)||void 0===r?void 0:r.end.column}`,s=(e=>{if(!e["data-raw"])return null;try{return decodeURIComponent(atob(e["data-raw"]))}catch(e){return console.error("Error decoding segment raw content:",e),null}})(o),c=e("div",s?{dangerouslySetInnerHTML:{__html:C.sanitize(s)}}:{children:i});return e(U,{id:a,node:n,children:c,props:o,segmentComponentConfig:ye,customStyles:Q,customIcons:J,extractText:De,isUpdatedSegment:!0})},segment:({node:n,children:i,...o})=>{var t,l,d,r;const a=`${null===(t=n.position)||void 0===t?void 0:t.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(d=n.position)||void 0===d?void 0:d.end.line}-${null===(r=n.position)||void 0===r?void 0:r.end.column}`;return e(U,{id:a,node:n,children:i,props:o,segmentComponentConfig:ye,customStyles:Q,customIcons:J,extractText:De})}}),[Me,oe,ge,Y,$e,F,t,J,me,Ce,Q,ye,je,Pe]);return s(()=>{if(!ae.current)return;if(!me.length)return void Re();let e;if(0===Ce.length||te)requestAnimationFrame(()=>{Ie([me[fe].replace(/\*/g,"")])});else{const n=ae.current,i=new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{i.disconnect(),requestAnimationFrame(()=>{Ie([me[fe].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return()=>{clearTimeout(e)}},[me,Ce,fe,te]),e(P.Provider,{value:{expandedInfo:Ne,setExpanded:Ee,reasonToRow:Ae},children:i("div",{ref:ae,className:`${g.container} ${"approving"!==D?g.wrapper:""} ${z||""}`,style:null==Q?void 0:Q.container,children:[I?e(E,{children:e(u,{components:Fe,rehypePlugins:[p],children:He})}):b,Le>0&&le&&e("div",{className:g.confidenceScoreContainer,style:null==Q?void 0:Q.confidenceScoreContainer,children:i("span",{className:g.confidenceScore,style:null==Q?void 0:Q.confidenceScore,children:[e(x,{size:14,color:(null==Q?void 0:Q.confidenceScoreIconColor)||"#166534"}),Le,"%"]})}),q&&e("div",{className:g.citationLoader,style:null==Q?void 0:Q.citationLoaderContainer,children:e(w,{customStyles:{container:null==Q?void 0:Q.citationLoadingContainer,icon:null==Q?void 0:Q.citationLoadingIcon,text:null==Q?void 0:Q.citationLoadingText}})}),A&&e("div",{style:{...null===(re=null==Q?void 0:Q.attachedContext)||void 0===re?void 0:re.wrapper},className:"flex mt-5",children:e(k,{customStyles:null==Q?void 0:Q.attachedContext,variant:K})})]})})};export{q as default,V as splitNestedDiffNodes};
|
|
2
2
|
//# sourceMappingURL=UserStoryWithCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#d633840d;border-radius:.3rem;box-sizing:border-box;color:#d63384;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{box-sizing:border-box;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border-collapse:collapse;box-sizing:border-box;margin:20px 0;table-layout:fixed;width:100%}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff
|
|
1
|
+
var e={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#d633840d;border-radius:.3rem;box-sizing:border-box;color:#d63384;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{box-sizing:border-box;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border-collapse:collapse;box-sizing:border-box;margin:20px 0;table-layout:fixed;width:100%}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=UserStoryWithCitation.module.css.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";const t=({props:t,highlightId:i,handleHighlightSpan:o,customStyles:n,icon:c})=>l("button",{...t,onClick:l=>{var n;null===(n=null==t?void 0:t.onClick)||void 0===n||n.call(t,l),o(i)},style:{...n},children:c});export{t as default};
|
|
2
|
+
//# sourceMappingURL=HighlightButtonComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HighlightButtonComponent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import n from"./InlineManualComponent.module.css.js";function i(i){var a,o,e,r;return l("span",{className:n[`manual-${null===(a=i.aiReason.redlining_details)||void 0===a?void 0:a.status}`],id:null===(r=null===(e=null===(o=null==i?void 0:i.aiReason)||void 0===o?void 0:o.id)||void 0===e?void 0:e.toString)||void 0===r?void 0:r.call(e),onClick:l=>{var n;l.stopPropagation(),l.preventDefault(),null===(n=i.handleClick)||void 0===n||n.call(i,l.currentTarget,i.aiReason)},children:i.children})}export{i as default};
|
|
2
|
+
//# sourceMappingURL=InlineManualComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineManualComponent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={"manual-accepted":"InlineManualComponent-module_manual-accepted__PqLRJ","manual-rejected":"InlineManualComponent-module_manual-rejected__lxkt4","manual-reverted":"InlineManualComponent-module_manual-reverted__FDvXt","manual-pending":"InlineManualComponent-module_manual-pending__wMuwx"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode(".InlineManualComponent-module_manual-accepted__PqLRJ{background-color:#8cbeff;cursor:pointer}.InlineManualComponent-module_manual-rejected__lxkt4{cursor:pointer;text-decoration:underline;text-decoration-color:red}.InlineManualComponent-module_manual-pending__wMuwx,.InlineManualComponent-module_manual-reverted__FDvXt{cursor:pointer}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(e)}();export{e as default};
|
|
2
|
+
//# sourceMappingURL=InlineManualComponent.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineManualComponent.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as l,jsxs as e,Fragment as n}from"react/jsx-runtime";import{Divider as o,CircularProgress as i}from"@mui/material";import{hexToOpacity as t}from"../../../utils/css.utils.js";import r from"./InlineUpdatedComponent.module.css.js";import d from"../../../icons/CognitiveDecision.js";import{Check as a,X as s,Undo2 as u,ChevronDown as c}from"lucide-react";import{useRef as v,useState as p,useCallback as m,useLayoutEffect as g}from"react";const f=({aiReason:f,children:h,customStyles:C,handleClickCognitiveDecision:y,handleClickUpdatedPill:b,handleClickOutputValue:w,customIcons:_,CDNeededInChip:k=!0})=>{var N,D,P,S,$,I,j,x,z,A,L,R,T,W,E,M,O,U,B,F,H,q,V;const G=v(null),J=v(null),[K,Q]=p(null),X=m(()=>{var l;const e=J.current,n=(null===(l=G.current)||void 0===l?void 0:l.offsetParent)||(null==e?void 0:e.offsetParent);if(!(e&&n instanceof HTMLElement))return;const o=e.getBoundingClientRect(),i=n.getBoundingClientRect(),t=o.top-i.top+o.height/2;Q(l=>null!==l&&Math.abs(l-t)<.5?l:t)},[]);g(()=>{X()}),g(()=>{var l,e;if("undefined"==typeof window)return;const n=window.requestAnimationFrame(X);window.addEventListener("resize",X);const o="undefined"!=typeof ResizeObserver?new ResizeObserver(X):null;J.current&&(null==o||o.observe(J.current));const i=(null===(l=G.current)||void 0===l?void 0:l.offsetParent)||(null===(e=J.current)||void 0===e?void 0:e.offsetParent);return i instanceof HTMLElement&&(null==o||o.observe(i)),()=>{window.cancelAnimationFrame(n),window.removeEventListener("resize",X),null==o||o.disconnect()}},[X]);const Y="pending"!==(null===(N=f.redlining_details)||void 0===N?void 0:N.status)?"#303030":null===(S=null===(P=null===(D=f.redlining_details)||void 0===D?void 0:D.evaluation_outputs)||void 0===P?void 0:P.metadata)||void 0===S?void 0:S.label_color,Z={color:Y||"#000000",background:t(Y||"#000000",25),border:`1px solid ${t(Y||"#000000",75)}`},ll=Y||"#000000",el=t(Y||"#000000",25),nl={background:t(Y||"#000000",75),...null==C?void 0:C.dividerStyle};let ol=null;const il=null===($=f.redlining_details)||void 0===$?void 0:$.status;"accepted"===il?ol=null!==(I=null==_?void 0:_.accepted)&&void 0!==I?I:l(a,{color:"#16A34A"}):"rejected"===il?ol=null!==(j=null==_?void 0:_.rejected)&&void 0!==j?j:l(s,{color:"#DC2626"}):"reverted"===il&&(ol=null!==(x=null==_?void 0:_.reverted)&&void 0!==x?x:l(u,{color:"#475569"}));const tl=null===K?{}:{"--inline-update-anchor-top":`${K}px`},rl=null===K?"":` ${r.anchorAligned}`;return e("span",{className:r.inlineUpdatedWrapper,children:[ol&&l("span",{className:`${r.resolvedStatus}${rl}`,style:{...tl,...null==C?void 0:C.resolvedIcon},children:ol}),l("span",{ref:G,id:f.id.toString(),onClick:l=>{l.stopPropagation(),null==b||b(l.currentTarget,f)},className:`${r.pillWrapper}${rl}`,style:{...tl,...null==C?void 0:C.pillStyleWrapper},children:e("span",{className:r.pillComponent,style:{...Z,...null===(z=null==C?void 0:C.pillComponent)||void 0===z?void 0:z.commonStyle},children:[l("span",{children:(null===(R=null===(L=null===(A=f.redlining_details)||void 0===A?void 0:A.evaluation_outputs)||void 0===L?void 0:L.metadata)||void 0===R?void 0:R.label_text)||""}),l(o,{className:r.dividerStyle,style:nl}),l("span",{className:r["output-container"],onClick:l=>{w&&(l.stopPropagation(),null==w||w(l.currentTarget,f))},children:f.resolving?l(i,{size:(null===(T=null==C?void 0:C.loader)||void 0===T?void 0:T.size)||18,"aria-label":"Loading…",sx:{color:(null===(W=null==C?void 0:C.loader)||void 0===W?void 0:W.color)||Y}}):"pending"!==(null===(E=f.redlining_details)||void 0===E?void 0:E.status)?ol:null===(O=null===(M=null==f?void 0:f.redlining_details)||void 0===M?void 0:M.evaluation_outputs)||void 0===O?void 0:O.output_value}),k&&e(n,{children:[l(o,{className:r.dividerStyle,style:nl}),l("span",{onClick:l=>{l.stopPropagation(),null==y||y(l.currentTarget,f)},className:r.cognitiveDecisionWrapper,style:null===(U=null==C?void 0:C.cognitiveDecisionIcon)||void 0===U?void 0:U.wrapper,children:l(d,{color:(null===(B=null==C?void 0:C.cognitiveDecisionIcon)||void 0===B?void 0:B.color)||ll,backgroundColor:(null===(F=null==C?void 0:C.cognitiveDecisionIcon)||void 0===F?void 0:F.backgroundColor)||el})}),l("span",{className:r.chevronWrapper,style:null===(H=null==C?void 0:C.Chevron)||void 0===H?void 0:H.wrapper,children:l(c,{color:(null===(q=null==C?void 0:C.Chevron)||void 0===q?void 0:q.color)||Y})})]})]})}),l("span",{ref:J,className:r[`upt-${null===(V=f.redlining_details)||void 0===V?void 0:V.status}`],onClick:l=>{l.preventDefault(),l.stopPropagation(),G.current&&(null==b||b(G.current,f))},children:h})]})};export{f as default};
|
|
2
2
|
//# sourceMappingURL=InlineUpdatedComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={insertedComponentText:"InlineUpdatedComponent-module_insertedComponentText__kzsSI",pillWrapper:"InlineUpdatedComponent-module_pillWrapper__QRLYT",resolvedStatus:"InlineUpdatedComponent-module_resolvedStatus__aqmur",pillComponent:"InlineUpdatedComponent-module_pillComponent__otvgL",cognitiveDecisionWrapper:"InlineUpdatedComponent-module_cognitiveDecisionWrapper__Jw0UK",chevronWrapper:"InlineUpdatedComponent-module_chevronWrapper__bncFg",dividerStyle:"InlineUpdatedComponent-module_dividerStyle__MFuEO"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode(".InlineUpdatedComponent-module_insertedComponentText__kzsSI{background-color:#dbeafe;color:#1e40af}.InlineUpdatedComponent-module_pillWrapper__QRLYT{align-items:flex-end;display:flex;flex-direction:column;gap:4px;position:absolute;right:-165px}.InlineUpdatedComponent-module_resolvedStatus__aqmur{align-items:center;display:flex;justify-content:center;position:absolute;right:-6px}.InlineUpdatedComponent-module_pillComponent__otvgL{align-items:center;background:#fff0f0;border:1.5px solid #f5b8b8;border-radius:100px;color:#c0392b;cursor:pointer;display:flex;font-size:14;font-weight:500;gap:6px;outline:none;padding:6px 14px;width:fit-content}.InlineUpdatedComponent-module_cognitiveDecisionWrapper__Jw0UK{align-items:center;display:flex;margin-left:2px}.InlineUpdatedComponent-module_chevronWrapper__bncFg{align-items:center;display:flex;margin-left:4px}.InlineUpdatedComponent-module_dividerStyle__MFuEO{background:#fca5a5;height:20px;width:1px}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(e)}();export{e as default};
|
|
1
|
+
var e={insertedComponentText:"InlineUpdatedComponent-module_insertedComponentText__kzsSI",inlineUpdatedWrapper:"InlineUpdatedComponent-module_inlineUpdatedWrapper__aFuzM",pillWrapper:"InlineUpdatedComponent-module_pillWrapper__QRLYT",resolvedStatus:"InlineUpdatedComponent-module_resolvedStatus__aqmur",anchorAligned:"InlineUpdatedComponent-module_anchorAligned__Mj2dK",pillComponent:"InlineUpdatedComponent-module_pillComponent__otvgL",cognitiveDecisionWrapper:"InlineUpdatedComponent-module_cognitiveDecisionWrapper__Jw0UK",chevronWrapper:"InlineUpdatedComponent-module_chevronWrapper__bncFg",dividerStyle:"InlineUpdatedComponent-module_dividerStyle__MFuEO","upt-accepted":"InlineUpdatedComponent-module_upt-accepted__6OTYS","upt-rejected":"InlineUpdatedComponent-module_upt-rejected__yvaiJ","upt-reverted":"InlineUpdatedComponent-module_upt-reverted__s-l-4","upt-pending":"InlineUpdatedComponent-module_upt-pending__sLKuc","output-container":"InlineUpdatedComponent-module_output-container__ATdUF"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode(".InlineUpdatedComponent-module_insertedComponentText__kzsSI{background-color:#dbeafe;color:#1e40af}.InlineUpdatedComponent-module_inlineUpdatedWrapper__aFuzM{display:inline}.InlineUpdatedComponent-module_pillWrapper__QRLYT{align-items:flex-end;display:flex;flex-direction:column;gap:4px;position:absolute;right:-165px}.InlineUpdatedComponent-module_resolvedStatus__aqmur{align-items:center;display:flex;justify-content:center;position:absolute;right:-6px}.InlineUpdatedComponent-module_anchorAligned__Mj2dK{top:var(--inline-update-anchor-top);transform:translateY(-50%)}.InlineUpdatedComponent-module_pillComponent__otvgL{align-items:center;background:#fff0f0;border:1.5px solid #f5b8b8;border-radius:100px;color:#c0392b;cursor:pointer;display:flex;font-size:14;font-weight:500;gap:6px;outline:none;padding:6px 14px;width:fit-content}.InlineUpdatedComponent-module_cognitiveDecisionWrapper__Jw0UK{align-items:center;display:flex;margin-left:2px}.InlineUpdatedComponent-module_chevronWrapper__bncFg{align-items:center;display:flex;margin-left:4px}.InlineUpdatedComponent-module_dividerStyle__MFuEO{background:#fca5a5;height:20px;width:1px}.InlineUpdatedComponent-module_upt-accepted__6OTYS{background-color:#f3e8ff;-webkit-box-decoration-break:clone;box-decoration-break:clone;display:inline}.InlineUpdatedComponent-module_upt-pending__sLKuc,.InlineUpdatedComponent-module_upt-rejected__yvaiJ,.InlineUpdatedComponent-module_upt-reverted__s-l-4{cursor:pointer}.InlineUpdatedComponent-module_output-container__ATdUF{align-items:center;display:flex;justify-content:center}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=InlineUpdatedComponent.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCallback as a,useEffect as o}from"react";import{getApprovalStatus as t,areAllUserStoriesApproved as e}from"../utils/userstory-approval.utils.js";const l=({userStoryForApproval:l,selectedUserStoryForApproval:r,userStoryIndex:s,callbacks:i,labels:n,onSaveUserStory:c})=>{const v=a((a,o,t,e)=>{i.onShowNotification?i.onShowNotification(a,o,t,e):console.log(`[${a.toUpperCase()}] ${o}: ${t}`)},[i]);o(()=>{var a;if(!r)return;const o=t(r);if(r.approval_status!==o){const t={...r,approval_status:o};c(s,t),null===(a=i.onApprovalStatusChange)||void 0===a||a.call(i,s,o)}},[r,s,i]),o(()=>{(null==l?void 0:l.length)&&e(l)&&p()},[l]),o(()=>{var a;null===(a=i.onSaveState)||void 0===a||a.call(i,l)},[]);const p=a(async()=>{var a;v("info",n.savingArtifact,"Please wait while we save the artifact",3e3);try{await(null===(a=i.onAllApproved)||void 0===a?void 0:a.call(i,l)),v("success",n.artifactSavedTitle,n.artifactSavedMessage,3e3)}catch(a){v("error",n.saveFailedTitle,n.saveFailedMessage,3e3)}},[l,i,n,v]);return{handleAllApproved:p,showNotification:v}};export{l as default,l as useApprovalStatus};
|
|
2
2
|
//# sourceMappingURL=useApprovalStatus.js.map
|