@e-llm-studio/requirement-ai 0.0.249 → 0.0.251
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/CitationRenderer/CitationRenderer.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/Icons/Icon.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 +1 -1
- 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/theme/theme.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
- 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/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/CitationPdfRendererWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.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/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 +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
- 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/DeleteSegmentsDialog.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/EditSegmentDialog.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/story-screen/BigEnoughPanel.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- 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/UserStoryApprovalScreen.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-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 +1 -1
- 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/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 +1 -1
- 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/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/store/markdown-context.js +1 -1
- package/dist/cjs/features/RequirementAI/store/ref.context.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/learned-tag.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
- package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
- package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.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/hooks/useUSPData.js +1 -1
- package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.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/dialog.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/features/CitationRenderer/CitationRenderer.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/Icons/Icon.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 +1 -1
- 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/theme/theme.css.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
- 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/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/CitationPdfRendererWrapper.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.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/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/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 +1 -1
- package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
- 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/DeleteSegmentsDialog.js +1 -1
- package/dist/features/RequirementAI/components/segment/EditSegmentDialog.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/story-screen/BigEnoughPanel.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- 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/UserStoryApprovalScreen.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-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 +1 -1
- 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/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 +1 -1
- 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/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/store/markdown-context.js +1 -1
- package/dist/features/RequirementAI/store/ref.context.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/learned-tag.utils.js +1 -1
- package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
- package/dist/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
- package/dist/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
- package/dist/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.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/hooks/useUSPData.js +1 -1
- package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.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/dialog.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +9 -50
- 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 +1 -2
- 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 +4 -1
- 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/InitialHtml.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +3 -4
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts +0 -8
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +4 -9
- 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 +11 -45
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts +13 -17
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +5 -29
- 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 +11 -17
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts +2 -3
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +0 -4
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts +1 -2
- package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +1 -7
- 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/InlineUpdatedComponent.d.ts +1 -4
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +13 -24
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +1 -7
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -24
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsx as t,jsxs as n,Fragment as i}from"react/jsx-runtime";import s,{useContext as o,useMemo as a}from"react";import{Pencil as l,Check as c,X as r,ArrowUpRight as d,Trash2 as m}from"lucide-react";import{cn as g}from"../../../UserStoryImport/lib/cn.js";import p from"./segment.module.css.js";import u from"./deleteSegmentDialog.module.css.js";import b from"./ExampleComponentWrapper.js";import j from"../ai-reasoning/AiReasoningCitationContent.js";import v from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as y}from"../../store/markdown-context.js";import h from"@mui/material/Dialog";import O from"@mui/material/IconButton";import f from"./DeleteSegmentsDialog.js";import C from"@mui/material/Tooltip";import S from"./EditSegmentDialog.js";const x=({id:x="Segment",label:I,children:E,segmentUUID:D,decisionStrength:N=80,aiReason:k,customStyles:w,customIcons:B,aiReasoningCitationCustomStyles:$,segmentExampleComponent:z,handleViewGlossary:L,isUpdatedSegment:W,onOpen:R,onDelete:A,onEdit:U,customDeleteStyles:M,customDeleteIcons:T})=>{var G,V;const{citationsMetadata:F,updateCitationsMetadata:H}=o(y),[K,q]=s.useState(!1),[J,P]=s.useState(!1),[Q,X]=s.useState(!1),[Y,Z]=s.useState(""),[_,ee]=s.useState(!1),{prefix:te,inner:ne}=a(()=>(e=>{const t=e.match(/^(.*?)\s*\{([^}]+)\}\s*$/);return!t||t.length<3?{prefix:"",inner:e}:{prefix:t[1].trim(),inner:t[2].trim()}})(null!=I?I:""),[I]);s.useEffect(()=>{Q||Z(ne)},[Q,ne]);const ie=()=>e(void 0,void 0,void 0,function*(){if(U){const e=Y.toLowerCase();yield U(e)}X(!1),ee(!1)}),se=()=>X(!1),oe=(null==T?void 0:T.editIcon)||t(l,{size:14}),ae=(null==T?void 0:T.checkIcon)||t(c,{size:16,color:"#16A34A"}),le=(null==T?void 0:T.crossIcon)||t(r,{size:16,color:"#DC2626"}),ce=a(()=>F.get(D),[F,D]),re=a(()=>(null==ce?void 0:ce.open)||!1,[ce]),de=a(()=>ce&&"loading"===ce.state,[ce]),me=()=>e(void 0,void 0,void 0,function*(){const e=!re;if(q(!1),console.log("citation metadata::",e,k),e&&!(null==k?void 0:k.reason)){H(D,t=>{if(t){const e=Object.assign({},t);return e.state="loading",e}return{open:e,state:"loading"}});try{console.log("citation metadata:: onopen"),yield null==R?void 0:R()}finally{H(D,t=>{if(t){const n=Object.assign({},t);return n.state="ready",n.open=e,n}return{open:e,state:"ready"}})}}else console.log("citation metadata:: else block"),H(D,t=>{if(t){const n=Object.assign({},t);return n.open=e,n}return{open:e,state:de?"loading":"ready"}})});return n("div",Object.assign({className:`segment-wrapper-${x} ${p.segmentWrapper}`,style:Object.assign(Object.assign({},null==w?void 0:w.segmentWrapper),{display:"inline-flex",verticalAlign:"middle"})},{children:[n("div",Object.assign({className:`segment-${x}-container segmentContainer ${W?"updatedSegmentContainer":""}`,style:Object.assign({},null==w?void 0:w.container)},{children:[t("span",Object.assign({className:`segment-${x} segmentLabel ${W?"updatedSegmentLabel":""}`,style:Object.assign({},null==w?void 0:w.label)},{children:W?E:I})),t("button",Object.assign({className:`${p.segmentExplanationButtonContainer}`,style:Object.assign({},null==w?void 0:w.buttonContainer),onClick:me},{children:t(d,{className:g(W&&p.updatedChevronIcon,p.cheveronIcon),style:Object.assign({},null==w?void 0:w.cheveronIcon)})}))]})),re&&t(h,Object.assign({open:!0,onClose:me,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root")},{children:n("div",Object.assign({style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24}},{children:[n("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16}},{children:[n("div",Q?Object.assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[te&&t("span",Object.assign({className:"segmentLabel",style:Object.assign({fontSize:18,fontWeight:600},null==w?void 0:w.label)},{children:te})),n("div",Object.assign({className:p.editInputWrapper,style:null==w?void 0:w.editInputWrapper},{children:[t("input",{value:Y,onChange:e=>Z(e.target.value),className:p.editInput,style:Object.assign(Object.assign({},null==w?void 0:w.editInput),{color:(null===(G=null==w?void 0:w.label)||void 0===G?void 0:G.color)?String(w.label.color):"#3B82F6",textTransform:"uppercase"}),autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&ie(),"Escape"===e.key&&se()}}),t(O,Object.assign({onClick:()=>{Y!==ne?(H(D,e=>e?Object.assign(Object.assign({},e),{open:!1}):{open:!1,state:de?"loading":"ready"}),ee(!0)):X(!1)},size:"small",style:null==w?void 0:w.editCheckIcon},{children:ae})),t(O,Object.assign({onClick:se,size:"small",style:null==w?void 0:w.editCrossIcon},{children:le}))]}))]}):Object.assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[t("span",Object.assign({className:"segmentLabel",style:Object.assign({fontSize:18,fontWeight:600},null==w?void 0:w.label)},{children:null!=I?I:"SEGMENT NAME"})),t(C,Object.assign({title:"Edit segment",placement:"top",arrow:!0},{children:t("button",Object.assign({onClick:()=>X(!0),className:p.headerEditButton,style:null==w?void 0:w.editIconButton},{children:oe}))}))]})),n("div",Object.assign({style:Object.assign({display:"flex",alignItems:"center",gap:"6px",flexShrink:0},null==w?void 0:w.headerActionsContainer)},{children:[t(C,Object.assign({title:"Delete segment",placement:"top",arrow:!0},{children:n("button",Object.assign({onClick:()=>{q(!1),P(!0),H(D,e=>{if(e){const t=Object.assign({},e);return t.open=!1,t}return{open:!1,state:de?"loading":"ready"}})},className:u.headerDeleteButton},{children:[t(m,{size:14}),"Delete"]}))})),t(O,Object.assign({"aria-label":"close",onClick:me,sx:e=>({padding:"4px",color:e.palette.grey[500]})},{children:t(r,{size:20})}))]}))]})),de?t(v,{customStyles:null==w?void 0:w.loadingSkeleton}):n(i,{children:[K&&!W&&t("div",Object.assign({style:{marginBottom:16}},{children:t(b,{label:null!=I?I:"",segmentExampleComponent:z,customStyles:Object.assign(Object.assign({},null==w?void 0:w.segmentExample),{exampleContainer:Object.assign(Object.assign({},null===(V=null==w?void 0:w.segmentExample)||void 0===V?void 0:V.exampleContainer),{width:"100%"})}),handleCancelExample:()=>{q(!1)}})})),W&&t("div",Object.assign({style:{marginBottom:16}},{children:t("div",Object.assign({className:`segment-${x}-container segmentContainer updatedSegmentContainer`,style:Object.assign({},null==w?void 0:w.container)},{children:t("span",Object.assign({className:`segment-${x} segmentLabel updatedSegmentLabel`,style:Object.assign({},null==w?void 0:w.label)},{children:E}))}))})),t("div",{children:t(j,{aiReason:k,customStyles:Object.assign(Object.assign({},$),{aiReasoningContent:Object.assign(Object.assign({},null==$?void 0:$.aiReasoningContent),{headerBar:{width:"auto"}}),aiReasoningAccordion:{header:{width:"auto"}}}),customIcons:B,isSegmentExplanation:!0,handleViewGlossary:L?()=>{H(D,e=>{if(e){const t=Object.assign({},e);return t.open=!1,t}return{open:!1,state:de?"loading":"ready"}}),null==L||L(x)}:void 0,handleViewExample:z?()=>{q(!0)}:void 0,isUpdatedSegment:W})})]})]}))})),t(f,{open:J,onHide:()=>{P(!1)},customDeleteStyles:M,customDeleteIcons:T,onDelete:t=>e(void 0,void 0,void 0,function*(){yield null==A?void 0:A(t)})}),t(S,{open:_,onHide:()=>{ee(!1),X(!1)},customStyles:M,customIcons:T,onConfirm:ie})]}))};export{x as default};
|
|
2
2
|
//# sourceMappingURL=Segment.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as l}from"react/jsx-runtime";import s from"./segment.module.css.js";const i=({customStyles:i})=>e("div",Object.assign({className:s.loaderWrapper,style:null==i?void 0:i.wrapper},{children:l("div",Object.assign({className:s.loaderContainer,style:null==i?void 0:i.container},{children:[l("div",Object.assign({className:s.loaderHeader,style:null==i?void 0:i.header},{children:[e("div",{className:`${s.skeleton} ${s.title}`,style:null==i?void 0:i.titleSkeleton}),e("div",{className:`${s.skeleton} ${s.icon}`,style:null==i?void 0:i.iconSkeleton})]})),e("div",{className:`${s.skeleton} ${s.lineFull}`,style:null==i?void 0:i.lineFull}),e("div",{className:`${s.skeleton} ${s.line90}`,style:null==i?void 0:i.line90}),e("div",{className:`${s.skeleton} ${s.line75}`,style:null==i?void 0:i.line75}),e("div",{className:`${s.skeleton} ${s.line60}`,style:null==i?void 0:i.line60})]}))}));export{i as default};
|
|
2
2
|
//# sourceMappingURL=SegmentLoader.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsx as n}from"react/jsx-runtime";import t from"./Segment.js";import o from"dompurify";const l=({id:l,children:i,props:d,segmentComponentConfig:s,customStyles:a,customIcons:u,extractText:v,isUpdatedSegment:r=!1,blockId:m,customDeleteStyles:g,customDeleteIcons:c})=>{var p,S,h,I,C,f,y,D,b,x,_,E,U,W,k,F,L,j,O;const R=(null==d?void 0:d.id)||"Segment",w=(null==d?void 0:d.decisionstrength)||"80",{segmentDataList:A,getSegmentExampleComponent:B,handleViewGlossary:G,upadatedSegmentDataList:T,handleFetchUpdatedSegmentDetails:V,handleFetchSegmentDetails:z,handleDeleteSegment:H,handleEditSegment:M}=s||{},q=r?null==T?void 0:T.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==R?void 0:R.split("-"))||void 0===n?void 0:n[0])}):null==A?void 0:A.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==R?void 0:R.split("-"))||void 0===n?void 0:n[0])}),J={id:R,reason:null!==(p=null==q?void 0:q.reason)&&void 0!==p?p:"",gap:null!==(S=null==q?void 0:q.gap)&&void 0!==S?S:"",explanation:null!==(h=null==q?void 0:q.explanation)&&void 0!==h?h:"",relevance_score:null!==(I=null==q?void 0:q.relevance_score)&&void 0!==I?I:0,isOpen:!1};let K;const N=v(i),P=d["data-table"];let Q="";if(P&&!r)try{Q=decodeURIComponent(atob(P))}catch(e){console.error("Failed to decode data-table for segment",R,e)}const X=o.sanitize(Q),Y=()=>n("div",{dangerouslySetInnerHTML:{__html:X}});return q||!z||r||null==z||z(R),R&&q&&B&&!r&&(K=P?n(Y,{}):B(R,N,q.segment_type)),n(t,Object.assign({id:R,segmentUUID:l,label:null!==(C=null==q?void 0:q.label)&&void 0!==C?C:null==q?void 0:q.segment_name,decisionStrength:w,aiReason:J,customIcons:u,aiReasoningCitationCustomStyles:a,segmentExampleComponent:K,handleViewGlossary:G,customStyles:{segmentWrapper:null===(f=null==a?void 0:a.segment)||void 0===f?void 0:f.segmentWrapper,container:null===(y=null==a?void 0:a.segment)||void 0===y?void 0:y.container,label:null===(D=null==a?void 0:a.segment)||void 0===D?void 0:D.label,decisionStrength:null===(b=null==a?void 0:a.segment)||void 0===b?void 0:b.decisionStrength,buttonContainer:null===(x=null==a?void 0:a.segment)||void 0===x?void 0:x.buttonContainer,cheveronIcon:null===(_=null==a?void 0:a.segment)||void 0===_?void 0:_.cheveronIcon,segmentExample:null===(E=null==a?void 0:a.segment)||void 0===E?void 0:E.segmentExample,loadingSkeleton:null===(U=null==a?void 0:a.segment)||void 0===U?void 0:U.SegmentLoadingSkeletonStyles,editInputWrapper:null===(W=null==a?void 0:a.segment)||void 0===W?void 0:W.editInputWrapper,editInput:null===(k=null==a?void 0:a.segment)||void 0===k?void 0:k.editInput,editCheckIcon:null===(F=null==a?void 0:a.segment)||void 0===F?void 0:F.editCheckIcon,editCrossIcon:null===(L=null==a?void 0:a.segment)||void 0===L?void 0:L.editCrossIcon,headerActionsContainer:null===(j=null==a?void 0:a.segment)||void 0===j?void 0:j.headerActionsContainer,editIconButton:null===(O=null==a?void 0:a.segment)||void 0===O?void 0:O.editIconButton},isUpdatedSegment:r,onOpen:()=>e(void 0,void 0,void 0,function*(){!q&&r&&(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),yield null==V?void 0:V(R))}),onDelete:e=>{if(console.log("SegmentWrapper: onDelete",e,q,m),q)return null==H?void 0:H(e,q,m)},onEdit:e=>{if(console.log("SegmentWrapper: onEdit",q,e),q&&M)return null==M?void 0:M(q,e)},customDeleteStyles:g,customDeleteIcons:c},{children:i}),R)};export{l as default};
|
|
2
2
|
//# sourceMappingURL=SegmentWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as o,jsx as e,Fragment as n}from"react/jsx-runtime";import{useState as i,useRef as l}from"react";import
|
|
1
|
+
import{jsxs as o,jsx as e,Fragment as n}from"react/jsx-runtime";import{useState as i,useRef as l}from"react";import s from"../../icons/BigEnoughIcon.js";import r from"../ai-reasoning/AiReasoningCitationContent.js";import{useRequirementAI as t}from"../RequirementAIWrapper/RequirementAIWrapper.js";import a from"./BigEnoughPanel.module.css.js";const c=({customIcons:c,customStyles:d,currentUserStory:u,panelStyles:g,showPanel:p=!1})=>{var v,m,_,b;t();const[h,f]=i(!!p),y=l(null);return o("div",Object.assign({onClick:o=>o.stopPropagation()},{children:[!p&&e("button",Object.assign({ref:y,className:a.developerEffortButton,style:null==g?void 0:g.buttonStyle,onClick:o=>{o.stopPropagation(),f(o=>!o)}},{children:e(s,{color:null==g?void 0:g.iconColor,size:null==g?void 0:g.iconSize})})),h&&o(n,{children:[e("div",{className:null==a?void 0:a.backdrop,style:p?null==g?void 0:g.showPanelBackdropStyles:null==g?void 0:g.backdropStyle,onClick:o=>{o.stopPropagation(),f(!1)},onWheel:o=>o.stopPropagation()}),e("div",Object.assign({className:`${a.dropdown} ${p?a.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==g?void 0:g.dropdownStyle),p?null==g?void 0:g.showPanelDropdownStyle:{})},{children:e(r,{cognitiveDecisionHeaders:{mainHeader:`Feature Implementation Score - ${(null==u?void 0:u.big_enough)||0}`},big_enough_block:null===(v=u.big_enough_decision_factors)||void 0===v?void 0:v.big_enough_block,aiReason:{relevance_score:(null===(m=null==u?void 0:u.big_enough_decision_factors)||void 0===m?void 0:m.relevance_score)||0,reason:(null===(_=null==u?void 0:u.big_enough_decision_factors)||void 0===_?void 0:_.score_reason)||"",gap:(null===(b=null==u?void 0:u.big_enough_decision_factors)||void 0===b?void 0:b.gap)||"",id:"big-enough-cd"},customIcons:c,customStyles:d})}))]})]}))};export{c as BigEnoughPanel};
|
|
2
2
|
//# sourceMappingURL=BigEnoughPanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as t,useRef as
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as s}from"react";import l from"../ai-reasoning/AiReasoningCitationContent.js";import a from"./CompletionPanel.module.css.js";import r from"../../icons/CDIcon.js";import{Loader2 as c,Check as m}from"lucide-react";const d=({customIcons:d,customStyles:p,currentUserStory:u,panelStyles:g,showPanel:v=!1,children:C,onToggleStateChange:h,completionPanelConfig:k})=>{var f,y,j,w,b;const[_,P]=t(!!v),S=null!==(f=null==u?void 0:u.completion_percentage)&&void 0!==f?f:0,N=i(null),O=i(null),{isMarkingComplete:I=!1,markedComplete:D=!1,onMarkAsComplete:M}=null!=k?k:{},B=()=>{P(!1),null==h||h(!1)},E=e=>{e.stopPropagation(),P(e=>{const o=!e;return null==h||h(o),o})};return s(()=>{if(!_)return;const e=e=>{O.current&&!O.current.contains(e.target)&&B()},o=e=>{"Escape"===e.key&&(P(!1),null==h||h(!1))};return document.addEventListener("mousedown",e,!0),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",o)}},[_,h]),e("div",Object.assign({ref:O,className:a.triggerWrapper,style:null==g?void 0:g.triggerWrapperStyle},{children:[!v&&o(n,{children:C?o("div",Object.assign({className:a.completionButton,style:null==g?void 0:g.completionButtonStyle,onClick:E},{children:C})):o("button",Object.assign({ref:N,className:a.completionIconButton,style:null==g?void 0:g.completionIconButtonStyle,onClick:E},{children:o(r,{})}))}),_&&o("div",Object.assign({className:`${a.dropdown} ${v?a.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==g?void 0:g.dropdownStyle),v?null==g?void 0:g.showPanelDropdownStyle:{}),onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()},{children:o(l,{aiReason:{explanation:(null===(y=u.completion_decision_factors)||void 0===y?void 0:y.explanation)||"",relevance_score:(null===(j=u.completion_decision_factors)||void 0===j?void 0:j.relevance_score)||0,reason:(null===(w=u.completion_decision_factors)||void 0===w?void 0:w.score_reason)||"",gap:(null===(b=u.completion_decision_factors)||void 0===b?void 0:b.gap)||"",id:"completion-cd"},customIcons:d,customStyles:p,footer:e("div",Object.assign({className:a.markCompleteContainer},{children:[o("h4",Object.assign({className:a.markCompleteTitle},{children:"Mark this section as complete?"})),e("p",Object.assign({className:a.markCompleteDescription},{children:["AI estimates this section is"," ",S,"% complete. If you're satisfied with the content, you can mark it as complete."]})),e("button",Object.assign({className:a.markCompleteButton,disabled:I||D,onClick:e=>{e.stopPropagation(),null==M||M(),B()}},{children:[I?o(c,{size:18,className:a.markCompleteSpinner}):o(m,{size:18,strokeWidth:3,className:a.markCompleteIcon}),o("span",{children:D?"Marked Complete":"Mark as Complete"})]}))]}))})}))]}))};export{d as CompletionPanel,d as default};
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Info as t}from"lucide-react";import{v4 as r}from"uuid";import{Tooltip as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Info as t}from"lucide-react";import{v4 as r}from"uuid";import{Tooltip as i}from"@mui/material";import l from"./ReplaceLearnedTags.module.css.js";function n(n){const o=[],s=/<learned>(.*?)<\/learned>/g;let c,p=0,a=0;for(;null!==(c=s.exec(n));){const[m,u]=c,d=c.index;d>p&&o.push(e("span",{children:n.slice(p,d)},"text-pre-"+a++)),o.push(e(i,Object.assign({title:u,placement:"top"},{children:e(t,{size:16,className:l.linkText})}),`tooltip-${r()}`)),p=s.lastIndex}return p<(null==n?void 0:n.length)&&o.push(e("span",{children:n.slice(p)},"text-post-"+a++)),o}export{n as replaceLearnedTagsWithInfo};
|
|
2
2
|
//# sourceMappingURL=ReplaceLearnedTags.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{useRequirementAI as i}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{Bookmark as n}from"lucide-react";import{useState as a}from"react";import{replaceLearnedTagsWithInfo as l}from"./ReplaceLearnedTags.js";import r from"./StreamingScreenSidebar.module.css.js";import{extractAllAiReasoningIds as o,stripAiReasoningAnchors as c}from"../../utils/helpers.js";import d from"../ai-reasoning/AiReasoningCitation.js";const m=({customStyles:s})=>t("div",Object.assign({className:r.skeleton,style:s},{children:[e("div",{className:r.skeletonLineSmall,style:null==s?void 0:s.skeletonLine}),e("div",{className:r.skeletonLineLarge,style:null==s?void 0:s.skeletonLine})]})),g=({isSidebarExpanded:g,selectedStreamingStoryIndex:u,setSelectedStreamingStoryIndex:p,streamingUserStories:v,isStreamingScreen:y,artifactTitleIds:b})=>{var h,j;const{customStyles:S,aiReasoning:f}=i(),O=null===(h=null==S?void 0:S.userStoryScreenStyles)||void 0===h?void 0:h.streamingSidebar,[N,I]=a({}),k=null===(j=v||[])||void 0===j?void 0:j.map((e,t)=>({artifactTitleId:b[t]||"",artifactId:e.artifactId,title:e.title,description:(null==e?void 0:e.description)||""})),C=(e,t)=>{const s=N[e],i=c(t);return s?i:i.length>116?i.slice(0,116)+"...":i};return e("div",Object.assign({className:`${r.container} ${g?r.expanded:r.collapsed}`,style:null==O?void 0:O.container},{children:t("div",Object.assign({className:r.sidebar,style:null==O?void 0:O.sidebarInner},{children:[e("div",Object.assign({className:r.header,style:null==O?void 0:O.header},{children:e("h2",Object.assign({className:r.title,style:null==O?void 0:O.title},{children:"User stories"}))})),e("div",Object.assign({className:r.storiesContainer,style:null==O?void 0:O.storiesContainer},{children:k.length>0?e(s,{children:k.map((s,i)=>{const a=o(s.description).map(e=>f.find(t=>t.id.toString()===e)).filter(Boolean);return e("div",Object.assign({onClick:()=>{p(i)},className:`${r.storyItem} ${i===k.length-1?r.borderBottom:""} ${u===i?r.activeStory:""}`,style:Object.assign(Object.assign({},null==O?void 0:O.storyItem),u===i?null==O?void 0:O.activeStory:{})},{children:t("div",Object.assign({className:r.storyContent,style:null==O?void 0:O.storyContent},{children:[t("div",Object.assign({className:r.storyHeader,style:null==O?void 0:O.storyHeader},{children:[e("span",Object.assign({className:r.iconGroup},{children:e(n,{className:r.bookmarkIcon,style:null==O?void 0:O.bookmarkIcon})})),y&&e("span",Object.assign({className:r.badge,style:null==O?void 0:O.badge},{children:"Generating..."}))]})),t("span",Object.assign({className:r.storyTitle,style:null==O?void 0:O.storyTitle},{children:[t("span",{children:[i+1,"."]}),l(s.title)]})),t("span",Object.assign({className:r.description,style:null==O?void 0:O.description},{children:[C(s.artifactId,s.description),s.description.length>116&&e("button",Object.assign({onClick:e=>{var t;e.stopPropagation(),t=s.artifactId,I(e=>Object.assign(Object.assign({},e),{[t]:!e[t]}))},className:r.moreButton,style:null==O?void 0:O.moreButton},{children:N[s.artifactId]?"less":"more"})),a.length>0&&e("span",Object.assign({className:r.aiReasoningContainer,onClick:e=>e.stopPropagation(),"data-sidebar-citation-streaming":"true"},{children:a.map(t=>e(d,{aiReason:t,isSourceHasHighlight:!1},null==t?void 0:t.id))}))]}))]}))}),s.artifactId)})}):e(m,{customStyles:null==O?void 0:O.skeleton})}))]}))}))};export{g as default};
|
|
2
2
|
//# sourceMappingURL=StreamingScreenSidebar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e,Fragment as
|
|
1
|
+
import{jsxs as t,jsx as e,Fragment as i}from"react/jsx-runtime";import{useState as s,useEffect as o}from"react";import{PencilIcon as n,ChevronDown as r}from"lucide-react";import{useRequirementAI as a}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{formatMarkdown as l,indentMarkdown as c}from"../../utils/helpers.js";import d from"../RichTextEditor/RichTextEditor.js";import u from"../userstory-with-citation/UserStoryWithCitation.js";import m from"../../shared/AtomicButton.js";import p from"./SubfeatureBlock.module.css.js";const g=({parentArtifactId:g,artifactId:v,title:h,content:y,isEditingModeOn:b,setIsEditingModeOn:f,isCitationLoadingDisplay:j=!1})=>{var O,S;const{userStory:I,setUserStory:N,customStyles:B,customIcons:C,segmentComponentConfig:W}=a(),k=null===(O=null==B?void 0:B.userStoryScreenStyles)||void 0===O?void 0:O.subFeatureBlock,x=null===(S=null==B?void 0:B.userStoryScreenStyles)||void 0===S?void 0:S.userStoryContentStyles,[A,w]=s(!0),[E,R]=s(!1),[T,F]=s(I);o(()=>{F(I)},[I]);return t("div",Object.assign({className:p.container,style:null==k?void 0:k.container},{children:[t("button",Object.assign({onClick:()=>{w(t=>!t)},className:p.toggleButton,style:null==k?void 0:k.toggleButton},{children:[e("h1",Object.assign({className:p.title,style:null==k?void 0:k.title},{children:h})),t("div",Object.assign({className:p.subFeatureToolbar,style:null==k?void 0:k.subFeatureToolbar},{children:[A&&e("div",Object.assign({className:p.actionBar,style:null==k?void 0:k.actionBar},{children:E?t("div",Object.assign({className:p.editingActions},{children:[e(m,{type:"outline",children:"Cancel",onClick:t=>{t.stopPropagation(),R(!1),f(!1)}}),e(m,{type:"fill",children:"Save",onClick:t=>{t.stopPropagation(),N(T),R(!1),f(!1)}})]})):!b&&e("div",Object.assign({className:p.viewActions},{children:e("button",Object.assign({className:p.editButton,style:null==k?void 0:k.editButton,onClick:t=>{t.stopPropagation(),R(!0),f(!0)}},{children:e(n,{size:16})}))}))})),e(r,{className:`${p.chevron} ${A?p.chevronOpen:""}`,style:null==k?void 0:k.chevron})]}))]})),A&&e(i,{children:e("div",E?Object.assign({className:p.editorWrapper,style:null==k?void 0:k.editorWrapper},{children:e(d,{minHeight:"100%",height:"100%",type:"string",value:l(y)||"",handleUpdateState:(t,e)=>{const i=c(e);F(t=>{const e=[...t],s=e.findIndex(t=>t.artifactId===g);if(-1===s)return e;const o=e[s].sub_features;if(o){const t=o.findIndex(t=>t.artifactId===v);-1!==t&&(e[s]=Object.assign(Object.assign({},e[s]),{sub_features:o.map((e,s)=>s===t?Object.assign(Object.assign({},e),{value:i}):e)}))}return e})},doNotShowBorderInViewMode:!1,onBlur:()=>{},mode:"edit"})}):Object.assign({className:p.contentWrapper,style:null==k?void 0:k.contentWrapper},{children:e(u,{message:y,isCitationLoadingDisplay:j,customStyles:Object.assign({},x),customIcons:Object.assign({},null==C?void 0:C.userStoryIcons)})}))})]}),v)};export{g as default};
|
|
2
2
|
//# sourceMappingURL=SubfeatureBlock.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{createContext as s,useState as l,useRef as i,useEffect as r,useContext as o}from"react";import{PanelGroup as a,Panel as d,PanelResizeHandle as c}from"react-resizable-panels";import{PencilIcon as u,ChevronDown as S}from"lucide-react";import{formatMarkdown as v,indentMarkdown as m}from"../../utils/helpers.js";import g from"./SubfeatureBlock.js";import y from"./UserStoryScreen.module.css.js";import{useRequirementAI as p}from"../RequirementAIWrapper/RequirementAIWrapper.js";const b=s(null),h=()=>{const e=o(b);if(!e)throw new Error("UserStoryScreen must be used inside its provider");return e},N=({AtomicButton:n})=>{var s,l;const{selectedStreamingStoryIndex:i,isCitationLoadingNotStarted:r,classNames:o,scenario:a}=h(),{userStory:d,customStyles:c}=p(),u=null==c?void 0:c.userStoryScreenStyles;return(null==d?void 0:d.length)?t("div",Object.assign({className:`${y.header} ${null!==(s=null==o?void 0:o.header)&&void 0!==s?s:""}`,style:null==u?void 0:u.header},{children:[t("div",Object.assign({className:y.headerLeftContainer},{children:[e("span",Object.assign({className:y.headerTitle,style:null==u?void 0:u.headerTitle},{children:null===(l=d[i])||void 0===l?void 0:l.title})),"streaming"===a&&t("span",Object.assign({className:y.headerSubtitle,style:null==u?void 0:u.headerSubtitle},{children:[e("span",Object.assign({className:y.streamingText,style:null==u?void 0:u.streamingText},{children:r?"Generating Requirement Doc":"Hang tight! We're loading the citations."}))," • Review & edit blocks as we build"]}))]})),e(O,{AtomicButton:n})]})):e(f,{classNames:o})},O=({AtomicButton:n})=>{const{isEditing:s,isEditingModeOn:l,setIsEditing:i,setIsEditingModeOn:r,userStoryCopy:o}=h(),{userStory:a,setUserStory:d,customStyles:c}=p(),S=null==c?void 0:c.userStoryScreenStyles;return(null==a?void 0:a.length)?s?t("div",Object.assign({className:y.actions,style:null==S?void 0:S.actions},{children:[e(n,Object.assign({type:"outline",onClick:()=>{i(!1),r(!1)},style:null==S?void 0:S.cancelAtomicButton},{children:"Cancel"})),e(n,Object.assign({type:"fill",onClick:()=>{d(o),i(!1),r(!1)},style:null==S?void 0:S.saveAtomicButton},{children:"Save"}))]})):l?null:e("div",Object.assign({className:y.editToggleWrapper},{children:e("button",Object.assign({className:y.editToggleBtn,style:null==S?void 0:S.editToggleBtn,onClick:()=>{i(!0),r(!0)}},{children:e(u,{size:16})}))})):null},f=({classNames:n})=>{var s;return t("div",Object.assign({className:`${y.header} ${null!==(s=null==n?void 0:n.header)&&void 0!==s?s:""}`},{children:[e("div",{className:y.skeletonTitle}),e("div",{className:y.skeletonSubtitle})]}))},I=()=>{var n;const{customStyles:s}=p(),l=null===(n=null==s?void 0:s.userStoryScreenStyles)||void 0===n?void 0:n.accordionSkeleton;return t("div",Object.assign({className:y.accordionSkeleton,style:null==l?void 0:l.wrapper},{children:[e("div",{className:y.skeletonLine,style:null==l?void 0:l.line}),e("div",{className:y.skeletonBox,style:null==l?void 0:l.box})]}))},j=()=>{var n;const{customStyles:s}=p(),l=null===(n=null==s?void 0:s.userStoryScreenStyles)||void 0===n?void 0:n.subFeatureSkeleton;return t("div",Object.assign({className:y.subFeatureSkeleton,style:null==l?void 0:l.wrapper},{children:[e("div",{className:y.skeletonLine,style:null==l?void 0:l.line}),e("div",{className:y.skeletonLine,style:null==l?void 0:l.line}),e("div",{className:y.skeletonLine,style:null==l?void 0:l.line})]}))},C=Object.assign(({scenario:t,isCitationLoadingNotStarted:n,children:s,classNames:o,artifactTitleIds:d})=>{var c,u,S,v,m;const{userStory:g,customStyles:h}=p(),[N,O]=l(0),[f,I]=l(!0),[j,C]=l(!1),[B,x]=l(!1),[E,T]=l(!1),[k,L]=l(!1),[R,A]=l(g),$=i(null),w=i(null);return r(()=>{A(g)},[g]),r(()=>{C(!0);const e=setTimeout(()=>C(!1),2e3);return()=>clearTimeout(e)},[null===(u=null===(c=null==g?void 0:g[N])||void 0===c?void 0:c.sub_features)||void 0===u?void 0:u.length]),r(()=>{const e=w.current;if(!e)return;const t=()=>{x(e.scrollHeight-e.scrollTop-e.clientHeight<20)};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[null==g?void 0:g[N]]),e(b.Provider,Object.assign({value:{scenario:t,isCitationLoadingNotStarted:n,selectedStreamingStoryIndex:N,setSelectedStreamingStoryIndex:O,isSidebarExpanded:f,setIsSidebarExpanded:I,sidebarPanelRef:$,isEditing:E,setIsEditing:T,isEditingModeOn:k,setIsEditingModeOn:L,userStoryCopy:R,setUserStoryCopy:A,scrollContainerRef:w,isAtBottom:B,isScrollBtnBouncing:j,scrollToBottom:()=>{w.current&&w.current.scrollTo({top:w.current.scrollHeight,behavior:"smooth"})},classNames:o,artifactTitleIds:d}},{children:e("div",Object.assign({className:`${y.container} ${null!==(S=null==o?void 0:o.container)&&void 0!==S?S:""}`,style:Object.assign({},null===(v=null==h?void 0:h.userStoryScreenStyles)||void 0===v?void 0:v.wrapperContainer)},{children:e(a,Object.assign({direction:"horizontal",className:y.panelGroup,style:null===(m=null==h?void 0:h.userStoryScreenStyles)||void 0===m?void 0:m.panelGroup},{children:s}))}))}))},{Sidebar:({Component:t})=>{var n;const{selectedStreamingStoryIndex:s,setSelectedStreamingStoryIndex:l,isSidebarExpanded:i,setIsSidebarExpanded:r,sidebarPanelRef:o,scenario:a,artifactTitleIds:c}=h(),{userStory:u,customStyles:S}=p();return e(d,Object.assign({ref:o,defaultSize:25,minSize:15,collapsible:!0,collapsedSize:0,onCollapse:()=>r(!1),onExpand:()=>r(!0),id:"streaming-sidebar",order:1,className:y.sidebarPanel,style:null===(n=null==S?void 0:S.userStoryScreenStyles)||void 0===n?void 0:n.sidebarPanel},{children:e(t,{streamingUserStories:u,selectedStreamingStoryIndex:s,setSelectedStreamingStoryIndex:l,isSidebarExpanded:i,isStreamingScreen:"streaming"===a,artifactTitleIds:c})}))},SidebarToggle:({OpenIcon:t,CloseIcon:n})=>{const{isSidebarExpanded:s,setIsSidebarExpanded:l,sidebarPanelRef:i}=h(),{customStyles:r}=p(),o=null==r?void 0:r.userStoryScreenStyles;return e(c,Object.assign({className:y.resizeHandle,style:null==o?void 0:o.resizeHandle},{children:e("button",Object.assign({className:y.sidebarToggleBtn,onClick:e=>{var t,n;e.stopPropagation(),s?null===(t=i.current)||void 0===t||t.collapse():null===(n=i.current)||void 0===n||n.expand()},style:null==o?void 0:o.sidebarToggleBtn},{children:e(s?n:t,{})}))}))},Content:({children:n,AtomicButton:s})=>{var l;const{scrollContainerRef:i,classNames:r}=h(),{customStyles:o}=p(),a=null==o?void 0:o.userStoryScreenStyles;return e(d,Object.assign({minSize:0,id:"streaming-content",order:2,className:y.contentPanel,style:null==a?void 0:a.contentPanel},{children:t("div",Object.assign({ref:i,className:`${y.scrollContainer} ${null!==(l=null==r?void 0:r.scrollContainer)&&void 0!==l?l:""}`,style:null==a?void 0:a.scrollContainer},{children:[e(N,{AtomicButton:s}),n]}))}))},Body:({children:t})=>{const{userStory:s,setUserStory:l}=p();return(null==s?void 0:s.length)?e(n,{children:t}):null},Story:({Component:t})=>{var n,s,l;const{selectedStreamingStoryIndex:i,isEditing:r,scenario:o}=h(),{userStory:a,customStyles:d,customIcons:c,segmentComponentConfig:u}=p(),S=null==d?void 0:d.userStoryScreenStyles,v=null==S?void 0:S.userStoryContentStyles;return r?null:e("div",Object.assign({className:y.storyWrapper,style:null==S?void 0:S.storyWrapper},{children:e(t,{message:null===(n=a[i])||void 0===n?void 0:n.value,aiReasoningsForBlock:(null===(s=a[i])||void 0===s?void 0:s.aiReasoning)||[],isCitationLoadingDisplay:"streaming"===o,customStyles:Object.assign({},v),customIcons:Object.assign({},null==c?void 0:c.userStoryIcons),artifactId:null===(l=a[i])||void 0===l?void 0:l.artifactId,segmentComponentConfig:u})}))},Editor:({Component:t,onBlur:n})=>{var s;const{selectedStreamingStoryIndex:l,isEditing:i,setUserStoryCopy:r}=h(),{userStory:o,customStyles:a}=p(),d=null==a?void 0:a.textEditorStyles;if(!i)return null;return e("div",Object.assign({className:y.editorWrapper,style:null==d?void 0:d.wrapper},{children:e(t,{minHeight:"100%",height:"100%",type:"string",value:v(null===(s=o[l])||void 0===s?void 0:s.value)||"",handleUpdateState:(e,t)=>{var n;const s=m(t),i=null===(n=o[l])||void 0===n?void 0:n.storyNumber;r(e=>{const t=[...e],n=t.findIndex(e=>e.storyNumber===i);return-1===n||(t[n]=Object.assign(Object.assign({},t[n]),{value:s})),t})},doNotShowBorderInViewMode:!1,onBlur:n,mode:"edit",customStyles:d})}))},SubFeatures:()=>{var s;const{selectedStreamingStoryIndex:l,isEditingModeOn:i,setIsEditingModeOn:r,scenario:o,isCitationLoadingNotStarted:a}=h(),{userStory:d}=p(),c=(null===(s=null==d?void 0:d[l])||void 0===s?void 0:s.sub_features)||[];return 0===c.length&&"streaming"===o?e(I,{}):t(n,{children:[c.map(t=>e(g,{parentArtifactId:null==d?void 0:d[l].artifactId,artifactId:t.artifactId,title:t.title,content:t.value,aiReasoning:t.aiReasoning||[],isEditingModeOn:i,setIsEditingModeOn:r,isCitationLoadingDisplay:"streaming"===o},t.artifactId)),"streaming"===o&&a&&e("div",Object.assign({className:y.subFeatureSkeletonWrapper},{children:e(j,{})}))]})},ScrollButton:()=>{const{isAtBottom:t,isSidebarExpanded:n,scrollToBottom:s,isScrollBtnBouncing:l}=h(),{userStory:i,customStyles:r}=p(),o=null==r?void 0:r.userStoryScreenStyles;return!(null==i?void 0:i.length)||t?null:e("div",Object.assign({className:`${y.scrollBtnWrapper} ${n?y.scrollExpanded:y.scrollCollapsed}`,style:null==o?void 0:o.scrollBtnWrapper},{children:e("button",Object.assign({onClick:s,className:`${y.scrollBtn} ${l?y.bounce:""}`,style:null==o?void 0:o.scrollBtn,"aria-label":"Scroll to bottom"},{children:e(S,{size:20})}))}))}});export{C as default};
|
|
2
2
|
//# sourceMappingURL=UserStoryScreen.js.map
|
package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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)}`},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};
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsx as t,jsxs as o,Fragment as n}from"react/jsx-runtime";import{useState as l,useRef as i,useCallback as r,useMemo as a,useEffect as s}from"react";import d from"showdown";import{useRequirementAI as c}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{createUserStoriesForApproval as u,cloneUserStories as v}from"../../utils/userstory-approval-transform.utils.js";import{getFirstNonApprovedSegmentId as p,getFirstUnapprovedStoryId as m,approveAllSegments as g}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 b}from"./components/ApprovalBadge/ApprovalBadge.js";import y from"./UserStoryApprovalScreen.module.css.js";import{CheckIcon as f}from"../../icons/CheckIcon.js";import{BookmarkIcon as I}from"../../icons/BookmarkIcon.js";import{ApprovalSidebar as j}from"./components/ApprovalSidebar/ApprovalSidebar.js";import{ExternalLink as C,Download as A,Share2 as O,Copy as w,SidebarOpenIcon as E,SidebarCloseIcon as N}from"lucide-react";import{UserStoryApprovalScreenContext as U,useUserStoryApprovalScreen as x}from"./UserStoryApprovalContext.js";import{BigEnoughPanel as T}from"../story-screen/BigEnoughPanel.js";import k from"../../icons/BigEnoughIcon.js";import{Menu as B,MenuItem as D}from"@mui/material";import{formatMarkdown as F}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:e,config:o={},callbacks:n={},labels:d={},isDisabled:g=!1,children:S,classNames:b,selectedArtifactId:f})=>{var I;const{userStory:j,customStyles:C}=c(),A=Object.assign(Object.assign({},M),o),O=Object.assign(Object.assign({},_),d),[w,E]=l([]),[N,x]=l(""),[T,k]=l(""),[B,D]=l(!1),[F,P]=l(!0),R=i(void 0),z=r((e,t,o,l)=>{n.onShowNotification?n.onShowNotification(e,t,o,l):console.log(`[${e.toUpperCase()}] ${t}: ${o}`)},[n]),W=r(e=>{n.onScrollToElement?n.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[n]),$=a(()=>{const e=w.findIndex(e=>e.artifactId===N);return e>=0?e:0},[w,N]),L=w[$];s(()=>{R.current=L},[L]),s(()=>{var e;if(!(null==j?void 0:j.length))return;null===(e=n.onInitialize)||void 0===e||e.call(n),1===j.length&&P(!1),j.length>0&&!N&&x(f||j[0].artifactId);const t=u(v(j));E(t)},[j,f]),s(()=>{f&&f!==N&&x(f)},[f,N]),s(()=>{if(!L)return;const e=p(L,"");k(e)},[null==L?void 0:L.artifactId]);const V=r((e,t)=>{E(o=>{const n=[...o];if("APPROVED"===t.approval_status&&"APPROVED"!==o[e].approval_status){const e=m(o,t.artifactId);e&&x(e)}return n[e]=t,n})},[]),q=r(e=>{const t=R.current;if(!t)return;const o=p(t,e);"NA"!==o&&(k(""),setTimeout(()=>{k(o)},0))},[]);h({userStoryForApproval:w,selectedUserStoryForApproval:L,userStoryIndex:$,callbacks:n,labels:O,onSaveUserStory:V});const H=Object.assign({height:A.containerHeight},A.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}),G={userStoryForApproval:w,setUserStoryForApproval:E,selectedStoryArtifactId:N,setSelectedStoryArtifactId:x,selectedUserStoryIndex:$,selectedUserStoryForApproval:L,currentContentId:T,setCurrentContentId:k,isEditingSegment:B,setIsEditingSegment:D,isSidebarExpanded:F,setIsSidebarExpanded:P,artifactTitleIds:e,config:A,labels:O,callbacks:n,isDisabled:g,handleSaveUserStory:V,handleUpdateContentId:q,showNotification:z,scrollToElement:W};return t(U.Provider,Object.assign({value:G},{children:t("div",Object.assign({className:`${y.container} ${(null==b?void 0:b.container)||""}`,style:Object.assign(Object.assign({},H),null===(I=null==C?void 0:C.approvalScreen)||void 0===I?void 0:I.wrapperContainer)},{children:S}))}))},{Sidebar:({Component:e,config:o,className:n})=>{const{isSidebarExpanded:l,selectedStoryArtifactId:i,setSelectedStoryArtifactId:r,userStoryForApproval:a,isEditingSegment:s,artifactTitleIds:d}=x();return e?t(e,{isSidebarExpanded:l,selectedStoryArtifactId:i,setSelectedStoryArtifactId:r,userStoryForApproval:a,isEditingAnUserStorySegment:s,artifactTitleIds:d}):t(j,{config:o,className:n})},SidebarToggle:({OpenIcon:e,CloseIcon:o,className:n=""})=>{const{isSidebarExpanded:l,setIsSidebarExpanded:i}=x(),r=e||E,a=o||N;return t("div",Object.assign({className:`${y.sidebarToggleWrapper} ${n}`},{children:t("button",Object.assign({onClick:()=>i(e=>!e),className:y.sidebarToggleBtn,"aria-label":l?"Collapse sidebar":"Expand sidebar",type:"button"},{children:t(l?a:r,{})}))}))},Content:({children:a,ButtonComponent:s,hideApproveAll:u=!1,pageTitle:v="Review Generated Requirements",showShareIcon:p=!1,handleDownloadUserStory:m,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 j,E,N,U,M,_,R,z,W,$,L,V,q,H,G,Y,J,K,Q,X,Z,ee,te,oe,ne,le,ie,re,ae,se,de;const{selectedUserStoryForApproval:ce,selectedUserStoryIndex:ue,artifactTitleIds:ve,labels:pe,config:me,isDisabled:ge,isEditingSegment:he,handleSaveUserStory:Se,setCurrentContentId:be,showNotification:ye}=x(),{userStory:fe,setUserStory:Ie}=c(),je=fe[0],[Ce,Ae]=l(null),Oe=()=>{Ae(null)},we=i(null),[Ee,Ne]=l(!1),{customStyles:Ue,customIcons:xe}=c(),Te=null==Ue?void 0:Ue.userStoryCardStyles,[ke,Be]=l(!1),De=r(()=>{if(!ce)return;if(he)return void ye("warn","Warning!",pe.unsavedChangesWarning,3e3);const e=g(ce);Se(ue,e),be("")},[ce,ue,he,pe,Se,be,ye]);if(!ce)return null;const Fe=ve[ue]||"",Pe="APPROVED"===ce.approval_status,Me=null!=(null==ce?void 0:ce.big_enough)&&!Number.isNaN(ce.big_enough)&&!!(null==ce?void 0:ce.big_enough_decision_factors);return o("div",Object.assign({className:y.content,style:Object.assign({},null===(E=null===(j=null==Ue?void 0:Ue.approvalScreen)||void 0===j?void 0:j.content)||void 0===E?void 0:E.content),"data-lsc-ui-page-title":v,"data-lsc-ui-page-description":S},{children:[o("div",Object.assign({className:y.header,style:Object.assign({},null===(M=null===(U=null===(N=null==Ue?void 0:Ue.approvalScreen)||void 0===N?void 0:N.body)||void 0===U?void 0:U.contentSegment)||void 0===M?void 0:M.header)},{children:[o("div",Object.assign({className:y.headerLeft,style:Object.assign({},null===(R=null===(_=null==Ue?void 0:Ue.approvalScreen)||void 0===_?void 0:_.content)||void 0===R?void 0:R.headerLeft)},{children:[o("div",Object.assign({className:y.headerMeta,style:Object.assign({},null===($=null===(W=null===(z=null==Ue?void 0:Ue.approvalScreen)||void 0===z?void 0:z.body)||void 0===W?void 0:W.contentSegment)||void 0===$?void 0:$.headerMeta)},{children:[t(I,{size:16,color:(null===(q=null===(V=null===(L=null==Ue?void 0:Ue.approvalScreen)||void 0===L?void 0:L.body)||void 0===V?void 0:V.contentSegment)||void 0===q?void 0:q.bookMarkColor)||"#8C8C8C"}),t("h2",Object.assign({className:y.headerArtifactId,style:Object.assign({},null===(Y=null===(G=null===(H=null==Ue?void 0:Ue.approvalScreen)||void 0===H?void 0:H.body)||void 0===G?void 0:G.contentSegment)||void 0===Y?void 0:Y.headerArtifactId)},{children:Fe}))]})),t("p",Object.assign({className:y.headerTitle,style:Object.assign({},null===(Q=null===(K=null===(J=null==Ue?void 0:Ue.approvalScreen)||void 0===J?void 0:J.body)||void 0===K?void 0:K.contentSegment)||void 0===Q?void 0:Q.headerTitle)},{children:null==ce?void 0:ce.title}))]})),o("div",Object.assign({className:null==y?void 0:y.containerStyle,style:null===(Z=null===(X=null==Ue?void 0:Ue.approvalScreen)||void 0===X?void 0:X.BigEnoughStyles)||void 0===Z?void 0:Z.containerStyle},{children:[Me&&t("button",Object.assign({className:y.developerEffortButton,style:null===(te=null===(ee=null==Ue?void 0:Ue.approvalScreen)||void 0===ee?void 0:ee.BigEnoughStyles)||void 0===te?void 0:te.buttonStyle,onClick:()=>Be(!ke)},{children:t(k,{color:null===(ne=null===(oe=null==Ue?void 0:Ue.approvalScreen)||void 0===oe?void 0:oe.BigEnoughStyles)||void 0===ne?void 0:ne.iconColor,size:null===(ie=null===(le=null==Ue?void 0:Ue.approvalScreen)||void 0===le?void 0:le.BigEnoughStyles)||void 0===ie?void 0:ie.iconSize})})),p&&o(n,{children:[t("button",Object.assign({className:y.iconButton,style:null==Te?void 0:Te.iconButton,onClick:e=>{Ae(e.currentTarget)}},{children:t(C,{size:16})})),o(B,Object.assign({id:"user-story-share-menu",anchorEl:Ce,open:!!Ce,onClose:()=>Ae(null),style:null==Te?void 0:Te.userStoryShareMenu},{children:[t(D,Object.assign({style:null==Te?void 0:Te.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){Ne(!0),m&&(yield Promise.all([m("pdf"),m("doc")]),Ne(!1))})},{children:o("div",Object.assign({ref:we,className:y.menuItemContent,style:null==Te?void 0:Te.menuItemContent},{children:[t(A,{size:16,color:null==Te?void 0:Te.menuIconColor}),t("p",Object.assign({style:null==Te?void 0:Te.menuLabel},{children:"Download"}))]}))})),t(D,Object.assign({style:null==Te?void 0:Te.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){let e=je;e=Object.assign(Object.assign({},je),{value:`${P(null==je?void 0:je.value,je.title)}`}),null==h||h(!0,[e],je.artifactId),Oe()})},{children:o("div",Object.assign({style:null==Te?void 0:Te.menuItemContent,className:y.menuItemContentPadded},{children:[t(O,{size:16,color:null==Te?void 0:Te.menuIconColor}),t("p",Object.assign({style:null==Te?void 0:Te.menuLabel},{children:"Send"}))]}))})),t(D,Object.assign({style:null==Te?void 0:Te.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){const e=(new d.Converter).makeHtml(F(je.value)||je.value),t=function(e){const t=(new d.Converter).makeHtml(e),o=document.createElement("div");return o.innerHTML=t,o.textContent||o.innerText||""}(F(je.value)||je.value),o=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{yield navigator.clipboard.write([o]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{Oe()}})},{children:o("div",Object.assign({style:null==Te?void 0:Te.menuItemContent,className:y.menuItemContentPadded},{children:[t(w,{size:16,color:null==Te?void 0:Te.menuIconColor}),t("p",Object.assign({style:null==Te?void 0:Te.menuLabel},{children:"Copy"}))]}))}))]}))]}),!u&&me.showApproveAllButton&&t("div",Object.assign({className:y.headerRight},{children:Pe?t(b,{status:"APPROVED",label:pe.approved}):s?t(s,Object.assign({type:"fill",onClick:De,isDisable:ge,className:y.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:pe.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",Object.assign({className:y.approveAllContent},{children:[t(f,{size:16,color:"white"}),t("span",{children:pe.approveAll})]}))})):o("button",Object.assign({onClick:De,disabled:ge,className:y.approveAllButtonDefault,style:Object.assign({},null===(ae=null===(re=null==Ue?void 0:Ue.approvalScreen)||void 0===re?void 0:re.content)||void 0===ae?void 0:ae.approveAllButtonDefault)},{children:[t(f,{size:16,color:"white"}),t("span",{children:pe.approveAll})]}))}))]}))]})),ke&&Me&&t("div",Object.assign({className:y.bigEnoughWrapper},{children:t(T,{customIcons:null==xe?void 0:xe.userStoryIcons,customStyles:null===(se=null==Ue?void 0:Ue.approvalScreen)||void 0===se?void 0:se.aiReasoningCitaionStyles,currentUserStory:ce,panelStyles:null===(de=null==Ue?void 0:Ue.approvalScreen)||void 0===de?void 0:de.BigEnoughStyles,showPanel:ke})})),a]}))},Body:({children:e,EditorComponent:n,ViewerComponent:l,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s=!1})=>{var d,u,v;const{selectedUserStoryForApproval:p,selectedUserStoryIndex:m,artifactTitleIds:g,handleSaveUserStory:h}=x(),{customStyles:b}=c(),f=r(e=>{h(m,e)},[m,h]),I=r((e,t)=>{var o;if(!p)return;const n=Object.assign(Object.assign({},p),{sub_features:null===(o=p.sub_features)||void 0===o?void 0:o.map((o,n)=>n===e?t:o)});h(m,n)},[p,m,h]),j=r(e=>{var t;if(!p)return;const o=Object.assign(Object.assign({},p),{sub_features:null===(t=p.sub_features)||void 0===t?void 0:t.filter((t,o)=>o!==e)});h(m,o)},[p,m,h]);if(!p)return null;const C=g[m]||"";return o("div",Object.assign({className:y.body,style:Object.assign({},null===(u=null===(d=null==b?void 0:b.approvalScreen)||void 0===d?void 0:d.body)||void 0===u?void 0:u.container)},{children:[t(S,{userStoryForApproval:p,artifactTitleId:C,onSaveMainStoryContent:f,EditorComponent:n,ViewerComponent:l}),null===(v=p.sub_features)||void 0===v?void 0:v.map((e,o)=>t(S,{userStoryForApproval:e,artifactTitleId:`${C} - ${String.fromCharCode(65+o)}`,isSubFeature:!0,subFeatureIndex:o,onSaveSubFeature:I,onDeleteSubFeature:j,EditorComponent:n,ViewerComponent:l,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s},e.artifactId)),e]}))}});export{R as default};
|
|
2
2
|
//# sourceMappingURL=UserStoryApprovalScreen.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as s}from"react/jsx-runtime";import r from"./ApprovalBadge.module.css.js";import{CheckIcon as l}from"../../../../icons/CheckIcon.js";import{useRequirementAI as a}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const o=({status:o,label:t="Approved",size:i="medium",className:m})=>{var n,p;const{customStyles:c}=a();if("APPROVED"!==o)return null;const d="small"===i?r.small:r.medium;return e("div",Object.assign({className:`${r.badge} ${d} ${m||""}`,style:Object.assign({},null===(p=null===(n=null==c?void 0:c.approvalScreen)||void 0===n?void 0:n.content)||void 0===p?void 0:p.approvalBadge)},{children:[s(l,{size:"small"===i?14:16}),s("span",{children:t})]}))};export{o as ApprovalBadge,o as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalBadge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useMemo as t,useCallback as
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useMemo as t,useCallback as a}from"react";import o from"../../../../icons/MenuUnfoldIcon.js";import{ApprovalSidebarItem as r}from"../ApprovalSidebarItem/ApprovalSidebarItem.js";import n from"./ApprovalSidebar.module.css.js";import{useUserStoryApprovalScreen as s}from"../../UserStoryApprovalContext.js";import{useRequirementAI as l}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const d={descriptionCharLimit:116,sidebarTitle:"Generated User Stories",TooltipComponent:void 0,InfoIconComponent:void 0,HeaderIconComponent:void 0},c=({config:c={},className:p=""})=>{var v,m,u,b,f,g,I,S,h,j,O,y;const{customIcons:A,customStyles:N}=l(),{isSidebarExpanded:T,selectedStoryArtifactId:x,setSelectedStoryArtifactId:C,userStoryForApproval:E,isEditingSegment:L,artifactTitleIds:w,showNotification:P,labels:R}=s(),U=t(()=>Object.assign(Object.assign({},d),c),[c]),{sidebarTitle:W,HeaderIconComponent:q}=U,B=t(()=>E.map((e,i)=>({artifactTitleId:w&&w[i]||"",artifactId:e.artifactId,title:e.title,description:e.description||"",approvalStatus:e.approval_status||"NOT_APPROVED",index:i})),[E,w]),H=a(e=>{C(e)},[C]),_=a(()=>{P("warn","Warning!","Please save the latest changes to proceed with the other segment.",3e3)},[P]),k=[n.container,T?n.containerExpanded:n.containerCollapsed,p].filter(Boolean).join(" "),z=q||o;return e("div",Object.assign({className:k,style:Object.assign({},null===(m=null===(v=null==N?void 0:N.approvalScreen)||void 0===v?void 0:v.sidebar)||void 0===m?void 0:m.container)},{children:i("div",Object.assign({className:n.inner,style:Object.assign({},null===(b=null===(u=null==N?void 0:N.approvalScreen)||void 0===u?void 0:u.sidebar)||void 0===b?void 0:b.innerContainer)},{children:[i("div",Object.assign({className:n.header,style:Object.assign({},null===(g=null===(f=null==N?void 0:N.approvalScreen)||void 0===f?void 0:f.sidebar)||void 0===g?void 0:g.header)},{children:[e("div",Object.assign({className:n.headerIcon,style:Object.assign({},null===(S=null===(I=null==N?void 0:N.approvalScreen)||void 0===I?void 0:I.sidebar)||void 0===S?void 0:S.headerIcon)},{children:e(z,{size:20})})),e("h2",Object.assign({className:n.headerTitle,style:Object.assign({},null===(j=null===(h=null==N?void 0:N.approvalScreen)||void 0===h?void 0:h.sidebar)||void 0===j?void 0:j.headerTitle)},{children:W}))]})),e("div",Object.assign({className:n.storyList,style:Object.assign({},null===(y=null===(O=null==N?void 0:N.approvalScreen)||void 0===O?void 0:O.sidebar)||void 0===y?void 0:y.storyList),role:"listbox"},{children:B.map((i,t)=>e(r,{artifactTitleId:i.artifactTitleId,artifactId:i.artifactId,title:i.title,description:i.description,approvalStatus:i.approvalStatus,index:i.index,isLast:t===B.length-1,isSelected:x===i.artifactId,isEditingSegment:L,onSelect:H,onNavigationBlocked:_,sidebarConfig:U},i.artifactId))}))]}))}))};export{c as ApprovalSidebar,c as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalSidebar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i,jsxs as
|
|
1
|
+
import{jsx as i,jsxs as e}from"react/jsx-runtime";import{useState as o,useCallback as l}from"react";import{BookmarkIcon as n}from"../../../../icons/BookmarkIcon.js";import{ApprovalStatusBadge as a}from"../ApprovalStatusBadge/ApprovalStatusBadge.js";import{replaceLearnedTagsWithInfo as s}from"../../../../utils/learned-tag.utils.js";import d from"./ApprovalSidebarItem.module.css.js";import{useRequirementAI as t}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";import r 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:b,description:g,approvalStatus:S,index:j,isLast:I,isSelected:f,isEditingSegment:h,onSelect:O,onNavigationBlocked:C,sidebarConfig:N,className:y=""})=>{var R,B,k,A,w,x,L,q,z,G,H,P,T,W,E,F,M,$,D,J,K,Q,U,V,X,Y,Z,_,ii,ei,oi,li,ni,ai;const[si,di]=o(!1),{customStyles:ti,getAvgScoreForStory:ri,aiReasoning:vi}=t(),ci=ri(m),{descriptionCharLimit:pi,TooltipComponent:ui,InfoIconComponent:mi}=N,bi=l(()=>{h?null==C||C():O(m)},[m,h,O,C]),gi=l(i=>{i.stopPropagation(),di(i=>!i)},[]),Si=v(g),ji=si?Si:Si.length>pi?Si.slice(0,pi):Si,Ii=Si.length>pi,fi=[d.item,I?d.itemLast:"",f?d.itemSelected:"",y].filter(Boolean).join(" "),hi=c(g).map(i=>vi.find(e=>e.id.toString()===i)).filter(Boolean);return i("div",Object.assign({className:fi,style:Object.assign({},null===(k=null===(B=null===(R=null==ti?void 0:ti.approvalScreen)||void 0===R?void 0:R.sidebar)||void 0===B?void 0:B.sidebarItem)||void 0===k?void 0:k.container),onClick:bi,role:"option","aria-selected":f},{children:e("div",Object.assign({className:d.itemContent,style:Object.assign({},null===(x=null===(w=null===(A=null==ti?void 0:ti.approvalScreen)||void 0===A?void 0:A.sidebar)||void 0===w?void 0:w.sidebarItem)||void 0===x?void 0:x.itemContent)},{children:[e("div",Object.assign({className:d.topRow,style:Object.assign({},null===(z=null===(q=null===(L=null==ti?void 0:ti.approvalScreen)||void 0===L?void 0:L.sidebar)||void 0===q?void 0:q.sidebarItem)||void 0===z?void 0:z.topRow)},{children:[e("span",Object.assign({className:d.artifactIdGroup,style:Object.assign({},null===(P=null===(H=null===(G=null==ti?void 0:ti.approvalScreen)||void 0===G?void 0:G.sidebar)||void 0===H?void 0:H.sidebarItem)||void 0===P?void 0:P.artifactIdGroup)},{children:[i(n,{size:20,color:(null===(E=null===(W=null===(T=null==ti?void 0:ti.approvalScreen)||void 0===T?void 0:T.sidebar)||void 0===W?void 0:W.sidebarItem)||void 0===E?void 0:E.bookMarkColor)||"#8C8C8C"}),i("span",{children:u})]})),e("div",Object.assign({className:d.scoreBadgeContainer},{children:[ci>0&&e("span",Object.assign({className:d.confidenceScore,style:null===($=null===(M=null===(F=null==ti?void 0:ti.approvalScreen)||void 0===F?void 0:F.sidebar)||void 0===M?void 0:M.sidebarItem)||void 0===$?void 0:$.confidenceScore},{children:[i(r,{size:14,color:(null===(Q=null===(K=null===(J=null===(D=null==ti?void 0:ti.approvalScreen)||void 0===D?void 0:D.sidebar)||void 0===J?void 0:J.sidebarItem)||void 0===K?void 0:K.confidenceScoreIcon)||void 0===Q?void 0:Q.color)||"#166534"}),ci,"%"]})),i(a,{status:S})]}))]})),e("span",Object.assign({className:d.titleRow,style:Object.assign({},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",Object.assign({className:d.titleIndex,style:Object.assign({},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:`${j+1}.`})),i("span",{children:s(b,ui,mi)})]})),g&&e("span",Object.assign({className:d.description,style:Object.assign({},null===(oi=null===(ei=null===(ii=null==ti?void 0:ti.approvalScreen)||void 0===ii?void 0:ii.sidebar)||void 0===ei?void 0:ei.sidebarItem)||void 0===oi?void 0:oi.description)},{children:[ji,Ii&&i("button",Object.assign({onClick:gi,className:d.moreButton,style:Object.assign({},null===(ai=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===ai?void 0:ai.moreButton),"aria-label":si?"Show less":"Show more"},{children:si?"less":"more"})),hi.length>0&&i("span",Object.assign({className:d.aiReasoningContainer,onClick:i=>i.stopPropagation()},{children:null==hi?void 0:hi.map(e=>i(p,{aiReason:e,isSourceHasHighlight:!1},null==e?void 0:e.id))}))]}))]}))}))};export{u as ApprovalSidebarItem,u as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalSidebarItem.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import s from"./ApprovalStatusBadge.module.css.js";import{useRequirementAI as a}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const o={approved:"Approved",inProgress:"In Progress",notApproved:"Not Approved"},r=({status:r,labels:d={},className:l=""})=>{var i,n,t,p,v,u,c,g,b,m,A,O;const j=Object.assign(Object.assign({},o),d),{customStyles:P}=a();switch(r){case"APPROVED":return e("span",Object.assign({className:`${s.badgeApproved} ${l}`,style:Object.assign({},null===(p=null===(t=null===(n=null===(i=null==P?void 0:P.approvalScreen)||void 0===i?void 0:i.sidebar)||void 0===n?void 0:n.sidebarItem)||void 0===t?void 0:t.approvalStatusBadge)||void 0===p?void 0:p.badgeApproved)},{children:j.approved}));case"IN_PROGRESS":return e("span",Object.assign({className:`${s.badgeInProgress} ${l}`,style:Object.assign({},null===(g=null===(c=null===(u=null===(v=null==P?void 0:P.approvalScreen)||void 0===v?void 0:v.sidebar)||void 0===u?void 0:u.sidebarItem)||void 0===c?void 0:c.approvalStatusBadge)||void 0===g?void 0:g.badgeInProgress)},{children:j.inProgress}));case"NOT_APPROVED":return e("span",Object.assign({className:`${s.badgeNotApproved} ${l}`,style:Object.assign({},null===(O=null===(A=null===(m=null===(b=null==P?void 0:P.approvalScreen)||void 0===b?void 0:b.sidebar)||void 0===m?void 0:m.sidebarItem)||void 0===A?void 0:A.approvalStatusBadge)||void 0===O?void 0:O.badgeNotApproved)},{children:j.notApproved}));default:return null}};export{r as ApprovalStatusBadge,r as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalStatusBadge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as o,jsx as n}from"react/jsx-runtime";import{useState as e,useRef as
|
|
1
|
+
import{jsxs as o,jsx as n}from"react/jsx-runtime";import{useState as e,useRef as t,useCallback as l,useEffect as i}from"react";import d from"./ContentBlock.module.css.js";import{CheckIcon as c}from"../../../../icons/CheckIcon.js";import{PencilIcon as v}from"../../../../icons/PencilIcon.js";import{TrashIcon as r}from"../../../../icons/TrashIcon.js";import{useUserStoryApprovalScreen as a}from"../../UserStoryApprovalContext.js";import{useRequirementAI as s}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";const u=({segment:u,segmentIndex:p,isSubFeature:m=!1,onSaveContent:g,onApproveContent:b,onDeleteContent:S,EditorComponent:y,ViewerComponent:j})=>{var B,h,k,O,C,I,x,f,N,A,T,w,D,E,M,W,z,R,V,F,U,q,H,$,_,L,P,G,J,K,Q,X,Y,Z,oo,no,eo,to,lo,io,co,vo,ro,ao,so,uo,po,mo,go,bo,So,yo,jo,Bo,ho,ko,Oo,Co,Io,xo,fo,No,Ao,To,wo,Do,Eo,Mo,Wo,zo,Ro,Vo,Fo,Uo,qo,Ho,$o,_o,Lo,Po;const{currentContentId:Go,handleUpdateContentId:Jo,isDisabled:Ko,isEditingSegment:Qo,setIsEditingSegment:Xo,config:Yo,labels:Zo,showNotification:on}=a(),{customStyles:nn,customIcons:en}=s(),[tn,ln]=e(!1),dn=t(u.content),cn=t(null),[vn,rn]=e(0),an=u.contentId===Go,sn=l(()=>{if(!cn.current)return;const o=cn.current;o.style.scrollMarginTop="90px",o.scrollIntoView({behavior:"smooth",block:"start"})},[]),un=l(()=>{if(!cn.current)return;const o=cn.current;o.style.scrollMarginBottom="90px",o.scrollIntoView({behavior:"smooth",block:"end"})},[]);i(()=>{if(!an||!cn.current||tn)return;const o=setTimeout(()=>{un()},200);return()=>clearTimeout(o)},[Go,an,tn,un]),i(()=>{if(0===vn)return;const o=setTimeout(()=>{sn()},150);return()=>clearTimeout(o)},[vn,sn]),i(()=>{dn.current=u.content},[u.content]);const pn=l(()=>{dn.current=u.content,ln(!0),Xo(!0),rn(o=>o+1)},[u.content,Xo]),mn=l(()=>{dn.current=u.content,ln(!1),Xo(!1)},[u.content,Xo]),gn=l((o,n)=>{dn.current=n},[]),bn=l(()=>{const o=dn.current;(null==o?void 0:o.trim())?(ln(!1),Xo(!1),g(p,o)):on("warn","Warning!",Zo.emptyContentWarning,3e3)},[p,g,Xo,on,Zo.emptyContentWarning]),Sn=l(()=>{b(p),Jo(u.contentId)},[p,u.contentId,b,Jo]),yn=l(()=>{null==S||S(p)},[p,S]),jn=[d.container,an?d.containerActive:d.containerDefault].join(" "),Bn=null===(k=null===(h=null===(B=null==nn?void 0:nn.approvalScreen)||void 0===B?void 0:B.body)||void 0===h?void 0:h.contentSegment)||void 0===k?void 0:k.contentBlock,hn=an?(null==Bn?void 0:Bn.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==Bn?void 0:Bn.containerDefault)||{};return o("div",Object.assign({className:jn,style:hn,ref:cn},{children:[u.isApproved&&o("div",Object.assign({className:d.approvedBadge,style:Object.assign({},null===(x=null===(I=null===(C=null===(O=null==nn?void 0:nn.approvalScreen)||void 0===O?void 0:O.body)||void 0===C?void 0:C.contentSegment)||void 0===I?void 0:I.contentBlock)||void 0===x?void 0:x.approvedBadge)},{children:[n("span",{children:Zo.approved}),n(c,{size:16,color:null===(T=null===(A=null===(N=null===(f=null==nn?void 0:nn.approvalScreen)||void 0===f?void 0:f.body)||void 0===N?void 0:N.contentSegment)||void 0===A?void 0:A.contentBlock)||void 0===T?void 0:T.checkIconColor})]})),n("div",Object.assign({className:d.contentArea,style:Object.assign({},null===(M=null===(E=null===(D=null===(w=null==nn?void 0:nn.approvalScreen)||void 0===w?void 0:w.body)||void 0===D?void 0:D.contentSegment)||void 0===E?void 0:E.contentBlock)||void 0===M?void 0:M.contentArea)},{children:tn&&y?n(y,{minHeight:"100%",height:"100%",type:"string",value:u.content||"",handleUpdateState:gn,doNotShowBorderInViewMode:!1,mode:"edit"}):j?n(j,{message:u.content||"",scenario:"approving",customStyles:Object.assign({},null===(W=null==nn?void 0:nn.userStoryScreenStyles)||void 0===W?void 0:W.userStoryContentStyles),customIcons:Object.assign({},null==en?void 0:en.userStoryIcons)}):n("div",{className:d.contentFallback,dangerouslySetInnerHTML:{__html:u.content||""}})})),tn?o("div",Object.assign({className:d.editActionsContainer,style:Object.assign({},null===(To=null===(Ao=null===(No=null===(fo=null==nn?void 0:nn.approvalScreen)||void 0===fo?void 0:fo.body)||void 0===No?void 0:No.contentSegment)||void 0===Ao?void 0:Ao.contentBlock)||void 0===To?void 0:To.editActionsContainer)},{children:[n("button",Object.assign({onClick:mn,className:d.outlineButton,style:Object.assign(Object.assign({},null===(Mo=null===(Eo=null===(Do=null===(wo=null==nn?void 0:nn.approvalScreen)||void 0===wo?void 0:wo.body)||void 0===Do?void 0:Do.contentSegment)||void 0===Eo?void 0:Eo.contentBlock)||void 0===Mo?void 0:Mo.outlineButton),null===(Vo=null===(Ro=null===(zo=null===(Wo=null==nn?void 0:nn.approvalScreen)||void 0===Wo?void 0:Wo.body)||void 0===zo?void 0:zo.contentSegment)||void 0===Ro?void 0:Ro.contentBlock)||void 0===Vo?void 0:Vo.cancelButton)},{children:Zo.cancel})),n("button",Object.assign({onClick:bn,className:d.outlineButton,style:Object.assign(Object.assign({},null===(Ho=null===(qo=null===(Uo=null===(Fo=null==nn?void 0:nn.approvalScreen)||void 0===Fo?void 0:Fo.body)||void 0===Uo?void 0:Uo.contentSegment)||void 0===qo?void 0:qo.contentBlock)||void 0===Ho?void 0:Ho.outlineButton),null===(Po=null===(Lo=null===(_o=null===($o=null==nn?void 0:nn.approvalScreen)||void 0===$o?void 0:$o.body)||void 0===_o?void 0:_o.contentSegment)||void 0===Lo?void 0:Lo.contentBlock)||void 0===Po?void 0:Po.saveButton)},{children:Zo.save}))]})):n("div",Object.assign({className:d.actionsContainer,style:Object.assign({},null===(F=null===(V=null===(R=null===(z=null==nn?void 0:nn.approvalScreen)||void 0===z?void 0:z.body)||void 0===R?void 0:R.contentSegment)||void 0===V?void 0:V.contentBlock)||void 0===F?void 0:F.actionsContainer)},{children:o("div",Object.assign({className:d.actionsRow,style:Object.assign({},null===($=null===(H=null===(q=null===(U=null==nn?void 0:nn.approvalScreen)||void 0===U?void 0:U.body)||void 0===q?void 0:q.contentSegment)||void 0===H?void 0:H.contentBlock)||void 0===$?void 0:$.actionsRow)},{children:[!Qo&&Yo.allowEditing&&o("button",Object.assign({onClick:pn,className:d.actionButton,style:Object.assign({},null===(G=null===(P=null===(L=null===(_=null==nn?void 0:nn.approvalScreen)||void 0===_?void 0:_.body)||void 0===L?void 0:L.contentSegment)||void 0===P?void 0:P.contentBlock)||void 0===G?void 0:G.actionButton)},{children:[n("span",Object.assign({className:d.actionText,style:Object.assign({},null===(X=null===(Q=null===(K=null===(J=null==nn?void 0:nn.approvalScreen)||void 0===J?void 0:J.body)||void 0===K?void 0:K.contentSegment)||void 0===Q?void 0:Q.contentBlock)||void 0===X?void 0:X.actionText)},{children:Zo.correctMe})),n(v,{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"})]})),!u.isApproved&&o("button",Object.assign({disabled:Ko,onClick:Sn,style:Object.assign({},null===(io=null===(lo=null===(to=null===(eo=null==nn?void 0:nn.approvalScreen)||void 0===eo?void 0:eo.body)||void 0===to?void 0:to.contentSegment)||void 0===lo?void 0:lo.contentBlock)||void 0===io?void 0:io.approveButton),className:`${d.actionButton} ${Ko?d.actionDisabled:""}`},{children:[n("span",Object.assign({className:(null==Bn?void 0:Bn.approveText)?"":Ko?d.actionTextDisabled:d.actionText,style:Object.assign({},null==Bn?void 0:Bn.approveText)},{children:Zo.approve})),n("span",Object.assign({style:Object.assign({},null===(ao=null===(ro=null===(vo=null===(co=null==nn?void 0:nn.approvalScreen)||void 0===co?void 0:co.body)||void 0===vo?void 0:vo.contentSegment)||void 0===ro?void 0:ro.contentBlock)||void 0===ao?void 0:ao.approveIconStyle)},{children:n(c,{size:16,color:Ko?(null===(mo=null===(po=null===(uo=null===(so=null==nn?void 0:nn.approvalScreen)||void 0===so?void 0:so.body)||void 0===uo?void 0:uo.contentSegment)||void 0===po?void 0:po.contentBlock)||void 0===mo?void 0:mo.disableApproveIconColor)||"#9CA3AF":(null===(yo=null===(So=null===(bo=null===(go=null==nn?void 0:nn.approvalScreen)||void 0===go?void 0:go.body)||void 0===bo?void 0:bo.contentSegment)||void 0===So?void 0:So.contentBlock)||void 0===yo?void 0:yo.approveIconColor)||"#5928ED"})}))]})),m&&Yo.allowDeletion&&o("button",Object.assign({onClick:yn,className:d.deleteButton,style:Object.assign({},null===(ko=null===(ho=null===(Bo=null===(jo=null==nn?void 0:nn.approvalScreen)||void 0===jo?void 0:jo.body)||void 0===Bo?void 0:Bo.contentSegment)||void 0===ho?void 0:ho.contentBlock)||void 0===ko?void 0:ko.deleteButton)},{children:[n("span",{children:Zo.delete}),n(r,{size:16,color:(null===(xo=null===(Io=null===(Co=null===(Oo=null==nn?void 0:nn.approvalScreen)||void 0===Oo?void 0:Oo.body)||void 0===Co?void 0:Co.contentSegment)||void 0===Io?void 0:Io.contentBlock)||void 0===xo?void 0:xo.deleteIconColor)||"#ed3f28"})]}))]}))}))]}))};export{u as ContentBlock,u as default};
|
|
2
2
|
//# sourceMappingURL=ContentBlock.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsxs as n,jsx as o,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as i,useCallback as s}from"react";import{ContentBlock as r}from"../ContentBlock/ContentBlock.js";import a from"./ContentSegment.module.css.js";import{ChevronUpIcon as d}from"../../../../icons/ChevronUpIcon.js";import{BookmarkIcon as c}from"../../../../icons/BookmarkIcon.js";import{ChevronDownIcon as u}from"../../../../icons/ChevronDownIcon.js";import{useRequirementAI as v}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as m}from"../../../story-screen/BigEnoughPanel.js";import{Menu as p,MenuItem as g}from"@mui/material";import{ExternalLink as b,Download as j,Share2 as y,Copy as h}from"lucide-react";import S from"showdown";import{formatMarkdown as O}from"../../../../utils/helpers.js";const C=({userStoryForApproval:C,artifactTitleId:f,isSubFeature:I=!1,subFeatureIndex:N,onSaveSubFeature:w,onDeleteSubFeature:k,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,G,J,K,Q,X,Y,Z,$,ee,ne,oe,te,le,ie,se,re,ae;const[de,ce]=l(!0),{customStyles:ue,customIcons:ve}=v(),me=null==ue?void 0:ue.userStoryCardStyles,[pe,ge]=l(null),[be,je]=l(!1),ye=i(null),he=s(()=>{ce(e=>!e)},[]),Se=s(e=>{if(void 0===N)return;const n=Object.assign(Object.assign({},C),{value:C.value.map((n,o)=>o===e?Object.assign(Object.assign({},n),{isApproved:!0}):n)});null==w||w(N,n)},[C,N,w]),Oe=s((e,n)=>{if(void 0===N)return;const o=Object.assign(Object.assign({},C),{value:C.value.map((o,t)=>t===e?Object.assign(Object.assign({},o),{content:n}):o)});null==w||w(N,o)},[C,N,w]),Ce=s(e=>{if(void 0===N)return;const n=Object.assign(Object.assign({},C),{value:C.value.filter((n,o)=>o!==e)});0!==n.value.length?null==w||w(N,n):null==k||k(N)},[C,N,w,k]),fe=s((e,n)=>{var o;if(I)return;const t=null===(o=C.value[e])||void 0===o?void 0:o.contentId;if(!t)return;const l=Object.assign(Object.assign({},C),{value:C.value.map(e=>e.contentId===t?Object.assign(Object.assign({},e),{content:n}):e)});null==x||x(l)},[C,I,x]),Ie=s(e=>{var n;if(I)return;const o=null===(n=C.value[e])||void 0===n?void 0:n.contentId;if(!o)return;const t=Object.assign(Object.assign({},C),{value:C.value.map(e=>e.contentId===o?Object.assign(Object.assign({},e),{isApproved:!0}):e)});null==x||x(t)},[C,I,x]),Ne=()=>{ge(null)},we=e=>{var n;const o=e.value.map(e=>e.content).join("");return Object.assign(Object.assign({},e),{value:o,sub_features:null===(n=e.sub_features)||void 0===n?void 0:n.map(we)})},ke=null!=(null==C?void 0:C.big_enough)&&!Number.isNaN(C.big_enough)&&!!(null==C?void 0:C.big_enough_decision_factors);return n("div",Object.assign({className:a.container,style:Object.assign({},null===(D=null===(z=null===(_=null==ue?void 0:ue.approvalScreen)||void 0===_?void 0:_.body)||void 0===z?void 0:z.contentSegment)||void 0===D?void 0:D.container)},{children:[I&&n("button",Object.assign({onClick:he,className:a.header,style:Object.assign({},null===(P=null===(L=null===(E=null==ue?void 0:ue.approvalScreen)||void 0===E?void 0:E.body)||void 0===L?void 0:L.contentSegment)||void 0===P?void 0:P.header)},{children:[n("div",Object.assign({className:a.headerContent,style:Object.assign({},null===(H=null===(W=null===(U=null==ue?void 0:ue.approvalScreen)||void 0===U?void 0:U.body)||void 0===W?void 0:W.contentSegment)||void 0===H?void 0:H.headerContent)},{children:[n("div",Object.assign({className:a.headerMeta,style:Object.assign({},null===(V=null===(q=null===(R=null==ue?void 0:ue.approvalScreen)||void 0===R?void 0:R.body)||void 0===q?void 0:q.contentSegment)||void 0===V?void 0:V.headerMeta)},{children:[o(c,{size:16,color:(null===(K=null===(J=null===(G=null==ue?void 0:ue.approvalScreen)||void 0===G?void 0:G.body)||void 0===J?void 0:J.contentSegment)||void 0===K?void 0:K.bookMarkColor)||"#8C8C8C"}),o("h2",Object.assign({className:a.headerArtifactId,style:Object.assign({},null===(Y=null===(X=null===(Q=null==ue?void 0:ue.approvalScreen)||void 0===Q?void 0:Q.body)||void 0===X?void 0:X.contentSegment)||void 0===Y?void 0:Y.headerArtifactId)},{children:f}))]})),o("p",Object.assign({className:a.headerTitle,style:Object.assign({},null===(ee=null===($=null===(Z=null==ue?void 0:ue.approvalScreen)||void 0===Z?void 0:Z.body)||void 0===$?void 0:$.contentSegment)||void 0===ee?void 0:ee.headerTitle)},{children:null==C?void 0:C.title}))]})),n("div",Object.assign({className:a.headerToggle,style:Object.assign({},null===(te=null===(oe=null===(ne=null==ue?void 0:ue.approvalScreen)||void 0===ne?void 0:ne.body)||void 0===oe?void 0:oe.contentSegment)||void 0===te?void 0:te.headerToggle)},{children:[ke&&o(m,{customIcons:null==ve?void 0:ve.userStoryIcons,customStyles:null===(le=null==ue?void 0:ue.approvalScreen)||void 0===le?void 0:le.aiReasoningCitaionStyles,currentUserStory:C,panelStyles:null===(ie=null==ue?void 0:ue.approvalScreen)||void 0===ie?void 0:ie.BigEnoughStyles}),F&&n(t,{children:[o("button",Object.assign({className:a.iconButton,style:null==me?void 0:me.iconButton,onClick:e=>{ge(e.currentTarget)}},{children:o(b,{size:16})})),n(p,Object.assign({id:"user-story-share-menu",anchorEl:pe,open:!!pe,onClose:()=>ge(null),style:null==me?void 0:me.userStoryShareMenu},{children:[o(g,Object.assign({style:null==me?void 0:me.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){je(!0),M&&(yield Promise.all([M("pdf"),M("doc")]),je(!1))})},{children:n("div",Object.assign({ref:ye,className:a.menuItemContent,style:null==me?void 0:me.menuItemContent},{children:[o(j,{size:16,color:null==me?void 0:me.menuIconColor}),o("p",Object.assign({style:null==me?void 0:me.menuLabel},{children:"Download"}))]}))})),o(g,Object.assign({style:null==me?void 0:me.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){const e=we(C);null==T||T(!0,[e],C.artifactId),Ne()})},{children:n("div",Object.assign({style:null==me?void 0:me.menuItemContent,className:a.menuItemContentPadded},{children:[o(y,{size:16,color:null==me?void 0:me.menuIconColor}),o("p",Object.assign({style:null==me?void 0:me.menuLabel},{children:"Send"}))]}))})),o(g,Object.assign({style:null==me?void 0:me.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){const e=new S.Converter,n=C.value.map(e=>e.content).join(""),o=e.makeHtml(O(n)||n),t=(e=>{const n=(new S.Converter).makeHtml(e),o=document.createElement("div");return o.innerHTML=n,o.textContent||o.innerText||""})(O(n)||n),l=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([o],{type:"text/html"})});try{yield navigator.clipboard.write([l]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{Ne()}})},{children:n("div",Object.assign({style:null==me?void 0:me.menuItemContent,className:a.menuItemContentPadded},{children:[o(h,{size:16,color:null==me?void 0:me.menuIconColor}),o("p",Object.assign({style:null==me?void 0:me.menuLabel},{children:"Copy"}))]}))}))]}))]}),o(de?d:u,{size:16})]}))]})),de&&o("div",Object.assign({className:a.contentWrapper,style:Object.assign({},null===(ae=null===(re=null===(se=null==ue?void 0:ue.approvalScreen)||void 0===se?void 0:se.body)||void 0===re?void 0:re.contentSegment)||void 0===ae?void 0:ae.contentWrapper)},{children:Array.isArray(null==C?void 0:C.value)&&C.value.map((e,n)=>o(r,{segment:e,segmentIndex:n,isSubFeature:I,onSaveContent:I?Oe:fe,onApproveContent:I?Se:Ie,onDeleteContent:I?Ce:void 0,EditorComponent:A,ViewerComponent:B},e.contentId))}))]}))};export{C as ContentSegment,C as default};
|
|
2
2
|
//# sourceMappingURL=ContentSegment.js.map
|