@pega/cosmos-react-work 8.0.0-build.4.3 → 8.0.0-build.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +8 -4
- package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/AppAnnouncement/AppAnnouncement.js +6 -4
- package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/Article/Article.d.ts +2 -6
- package/lib/components/Article/Article.d.ts.map +1 -1
- package/lib/components/Article/Article.js +2 -7
- package/lib/components/Article/Article.js.map +1 -1
- package/lib/components/Article/ArticleMeta.js.map +1 -1
- package/lib/components/ArticleList/AIArticleSummary.d.ts +1 -2
- package/lib/components/ArticleList/AIArticleSummary.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddy.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddy.js +6 -2
- package/lib/components/ArticleList/ArticleBuddy.js.map +1 -1
- package/lib/components/ArticleList/ArticleBuddyList.d.ts +0 -1
- package/lib/components/ArticleList/ArticleBuddyList.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddyResponse.d.ts +3 -3
- package/lib/components/ArticleList/ArticleBuddyResponse.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddyResponse.js +7 -8
- package/lib/components/ArticleList/ArticleBuddyResponse.js.map +1 -1
- package/lib/components/ArticleList/ArticleFeedback.d.ts +1 -2
- package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleFeedback.js.map +1 -1
- package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.js +4 -4
- package/lib/components/ArticleList/ArticleList.js.map +1 -1
- package/lib/components/ArticleList/ArticleList.types.d.ts +9 -5
- package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.types.js.map +1 -1
- package/lib/components/ArticleList/ArticleListFilter.js.map +1 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts +1 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleListHeader.js +9 -6
- package/lib/components/ArticleList/ArticleListHeader.js.map +1 -1
- package/lib/components/ArticleList/ArticleSemanticSearch.d.ts +0 -1
- package/lib/components/ArticleList/ArticleSemanticSearch.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleSemanticSearch.js +11 -4
- package/lib/components/ArticleList/ArticleSemanticSearch.js.map +1 -1
- package/lib/components/ArticleList/ArticleSummaryHeader.js +1 -1
- package/lib/components/ArticleList/ArticleSummaryHeader.js.map +1 -1
- package/lib/components/ArticleList/ArticleTag.d.ts +0 -1
- package/lib/components/ArticleList/ArticleTag.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleTag.js +3 -3
- package/lib/components/ArticleList/ArticleTag.js.map +1 -1
- package/lib/components/ArticleList/QuestionList.d.ts +1 -2
- package/lib/components/ArticleList/QuestionList.d.ts.map +1 -1
- package/lib/components/ArticleList/QuestionList.js +1 -1
- package/lib/components/ArticleList/QuestionList.js.map +1 -1
- package/lib/components/ArticleList/RelatedQuestions.d.ts +19 -0
- package/lib/components/ArticleList/RelatedQuestions.d.ts.map +1 -0
- package/lib/components/ArticleList/RelatedQuestions.js +40 -0
- package/lib/components/ArticleList/RelatedQuestions.js.map +1 -0
- package/lib/components/ArticleList/index.d.ts +1 -0
- package/lib/components/ArticleList/index.d.ts.map +1 -1
- package/lib/components/ArticleList/index.js +1 -0
- package/lib/components/ArticleList/index.js.map +1 -1
- package/lib/components/Assignments/Assignments.js +2 -2
- package/lib/components/Assignments/Assignments.js.map +1 -1
- package/lib/components/Assignments/Assignments.styles.d.ts +3 -4
- package/lib/components/Assignments/Assignments.styles.d.ts.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.d.ts +6 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.d.ts.map +1 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.js +24 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.js.map +1 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts +6 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts.map +1 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.js +51 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.js.map +1 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.d.ts +2 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.d.ts.map +1 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.js +6 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.js.map +1 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.types.d.ts +23 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.types.d.ts.map +1 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.types.js +2 -0
- package/lib/components/CaseHierarchy/CaseHierarchy.types.js.map +1 -0
- package/lib/components/CaseHierarchy/index.d.ts +4 -0
- package/lib/components/CaseHierarchy/index.d.ts.map +1 -0
- package/lib/components/CaseHierarchy/index.js +3 -0
- package/lib/components/CaseHierarchy/index.js.map +1 -0
- package/lib/components/CasePreview/CasePreview.d.ts +4 -4
- package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
- package/lib/components/CasePreview/CasePreview.js +7 -6
- package/lib/components/CasePreview/CasePreview.js.map +1 -1
- package/lib/components/CasePreview/CasePreview.test-ids.d.ts +1 -1
- package/lib/components/CasePreview/CasePreview.test-ids.d.ts.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.js +4 -3
- package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
- package/lib/components/CaseView/CaseHeader/Summary.d.ts +1 -1
- package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -1
- package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -1
- package/lib/components/CaseView/CaseView.context.d.ts +0 -1
- package/lib/components/CaseView/CaseView.context.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.d.ts +1 -1
- package/lib/components/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.js +65 -24
- package/lib/components/CaseView/CaseView.js.map +1 -1
- package/lib/components/CaseView/CaseView.styles.d.ts +19 -15
- package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.styles.js +287 -110
- package/lib/components/CaseView/CaseView.styles.js.map +1 -1
- package/lib/components/CaseView/CaseView.test-ids.d.ts +1 -1
- package/lib/components/CaseView/CaseView.test-ids.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.types.d.ts +8 -2
- package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.types.js.map +1 -1
- package/lib/components/CaseView/UtilitiesSummary.d.ts +1 -0
- package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
- package/lib/components/CaseView/UtilitiesSummary.js +85 -19
- package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts +0 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.js +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
- package/lib/components/CaseView/index.d.ts +1 -1
- package/lib/components/CaseView/index.d.ts.map +1 -1
- package/lib/components/CaseView/index.js.map +1 -1
- package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts +0 -1
- package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts.map +1 -1
- package/lib/components/ConfigurableLayout/ConfigurableLayout.js.map +1 -1
- package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts +0 -1
- package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts.map +1 -1
- package/lib/components/ConfigurableLayout/LayoutCell.d.ts +1 -2
- package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +1 -1
- package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -1
- package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts.map +1 -1
- package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js.map +1 -1
- package/lib/components/Confirmation/Confirmation.d.ts +3 -3
- package/lib/components/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/Details/Details.d.ts +6 -4
- package/lib/components/Details/Details.d.ts.map +1 -1
- package/lib/components/Details/Details.js +4 -4
- package/lib/components/Details/Details.js.map +1 -1
- package/lib/components/Details/Details.styles.d.ts +1 -1
- package/lib/components/Details/Details.styles.d.ts.map +1 -1
- package/lib/components/Details/Details.styles.js +17 -4
- package/lib/components/Details/Details.styles.js.map +1 -1
- package/lib/components/Details/Details.test-ids.d.ts +1 -1
- package/lib/components/Details/Details.test-ids.d.ts.map +1 -1
- package/lib/components/Details/DetailsContext.d.ts +0 -1
- package/lib/components/Details/DetailsContext.d.ts.map +1 -1
- package/lib/components/GenAICoach/ConversationHistory.d.ts +5 -0
- package/lib/components/GenAICoach/ConversationHistory.d.ts.map +1 -0
- package/lib/components/GenAICoach/ConversationHistory.js +73 -0
- package/lib/components/GenAICoach/ConversationHistory.js.map +1 -0
- package/lib/components/GenAICoach/GenAICoach.d.ts +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +178 -140
- package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts +24 -14
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +106 -57
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +2 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js +9 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.d.ts +49 -8
- package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.utils.d.ts +1 -1
- package/lib/components/GenAICoach/GenAICoach.utils.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.js +77 -13
- package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
- package/lib/components/GenAICoach/InitialSuggestedMessage.js +1 -1
- package/lib/components/GenAICoach/InitialSuggestedMessage.js.map +1 -1
- package/lib/components/GenAICoach/index.d.ts +1 -1
- package/lib/components/GenAICoach/index.d.ts.map +1 -1
- package/lib/components/GenAICoach/index.js.map +1 -1
- package/lib/components/Glimpse/Glimpse.d.ts +3 -3
- package/lib/components/Glimpse/Glimpse.d.ts.map +1 -1
- package/lib/components/Glimpse/Glimpse.js.map +1 -1
- package/lib/components/HierarchicalAssignments/AssignmentContext.d.ts +28 -0
- package/lib/components/HierarchicalAssignments/AssignmentContext.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentContext.js +14 -0
- package/lib/components/HierarchicalAssignments/AssignmentContext.js.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentDetail.d.ts +4 -2
- package/lib/components/HierarchicalAssignments/AssignmentDetail.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/AssignmentDetail.js +2 -2
- package/lib/components/HierarchicalAssignments/AssignmentDetail.js.map +1 -1
- package/lib/components/HierarchicalAssignments/AssignmentNode.d.ts +19 -0
- package/lib/components/HierarchicalAssignments/AssignmentNode.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentNode.js +33 -0
- package/lib/components/HierarchicalAssignments/AssignmentNode.js.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentTree.d.ts +15 -0
- package/lib/components/HierarchicalAssignments/AssignmentTree.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/AssignmentTree.js +21 -0
- package/lib/components/HierarchicalAssignments/AssignmentTree.js.map +1 -0
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts +31 -31
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/Assignments.styles.js +85 -69
- package/lib/components/HierarchicalAssignments/Assignments.styles.js.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.d.ts +2 -3
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.js +117 -9
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.js.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.d.ts +3 -3
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.js +2 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.test-ids.js.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts +12 -12
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.js.map +1 -1
- package/lib/components/HierarchicalAssignments/helpers.d.ts +23 -0
- package/lib/components/HierarchicalAssignments/helpers.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/helpers.js +167 -0
- package/lib/components/HierarchicalAssignments/helpers.js.map +1 -0
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts +18 -0
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js +105 -0
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js.map +1 -0
- package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.d.ts +23 -0
- package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js +105 -0
- package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js.map +1 -0
- package/lib/components/HierarchicalAssignments/nodeItems/useNodeFocus.d.ts +23 -0
- package/lib/components/HierarchicalAssignments/nodeItems/useNodeFocus.d.ts.map +1 -0
- package/lib/components/HierarchicalAssignments/nodeItems/useNodeFocus.js +42 -0
- package/lib/components/HierarchicalAssignments/nodeItems/useNodeFocus.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts +2 -3
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js +5 -2
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +2 -3
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +32 -21
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
- package/lib/components/InteractionNotification/CountdownButton.d.ts +3 -3
- package/lib/components/InteractionNotification/CountdownButton.d.ts.map +1 -1
- package/lib/components/InteractionNotification/CountdownButton.js +1 -1
- package/lib/components/InteractionNotification/CountdownButton.js.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.d.ts +3 -3
- package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.js +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
- package/lib/components/Predictions/Predictions.d.ts +2 -3
- package/lib/components/Predictions/Predictions.d.ts.map +1 -1
- package/lib/components/Predictions/Predictions.js +1 -0
- package/lib/components/Predictions/Predictions.js.map +1 -1
- package/lib/components/SearchResults/ActiveFilter.d.ts +1 -2
- package/lib/components/SearchResults/ActiveFilter.d.ts.map +1 -1
- package/lib/components/SearchResults/Filter.d.ts.map +1 -1
- package/lib/components/SearchResults/Filter.js.map +1 -1
- package/lib/components/SearchResults/SearchResult.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.d.ts +2 -3
- package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.js +1 -2
- package/lib/components/SearchResults/SearchResults.js.map +1 -1
- package/lib/components/SearchResults/SearchResults.styles.d.ts +1 -2
- package/lib/components/SearchResults/SearchResults.styles.d.ts.map +1 -1
- package/lib/components/Stages/StageGlimpse.js +1 -1
- package/lib/components/Stages/StageGlimpse.js.map +1 -1
- package/lib/components/Stages/Stages.d.ts +2 -3
- package/lib/components/Stages/Stages.d.ts.map +1 -1
- package/lib/components/Stages/Stages.js +4 -1
- package/lib/components/Stages/Stages.js.map +1 -1
- package/lib/components/Stages/Stages.styles.d.ts +7 -6
- package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
- package/lib/components/Stages/Stages.styles.js +6 -10
- package/lib/components/Stages/Stages.styles.js.map +1 -1
- package/lib/components/Stakeholders/StakeholderForm.d.ts +1 -2
- package/lib/components/Stakeholders/StakeholderForm.d.ts.map +1 -1
- package/lib/components/Stakeholders/StakeholderForm.js.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.d.ts +2 -3
- package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.js +37 -26
- package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
- package/lib/components/Tags/Tags.d.ts +5 -5
- package/lib/components/Tags/Tags.d.ts.map +1 -1
- package/lib/components/Tags/Tags.js.map +1 -1
- package/lib/components/Tasks/TaskList.d.ts +13 -8
- package/lib/components/Tasks/TaskList.d.ts.map +1 -1
- package/lib/components/Tasks/TaskList.js +15 -7
- package/lib/components/Tasks/TaskList.js.map +1 -1
- package/lib/components/Tasks/Tasks.d.ts +8 -3
- package/lib/components/Tasks/Tasks.d.ts.map +1 -1
- package/lib/components/Tasks/Tasks.js +14 -4
- package/lib/components/Tasks/Tasks.js.map +1 -1
- package/lib/components/Tasks/Tasks.test-ids.d.ts +3 -3
- package/lib/components/Tasks/Tasks.test-ids.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.d.ts +3 -3
- package/lib/components/Timeline/Timeline.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.js +9 -2
- package/lib/components/Timeline/Timeline.js.map +1 -1
- package/lib/components/Timeline/Timeline.styles.d.ts +5 -6
- package/lib/components/Timeline/Timeline.styles.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.styles.js +10 -3
- package/lib/components/Timeline/Timeline.styles.js.map +1 -1
- package/lib/components/Timeline/Timeline.types.d.ts +11 -1
- package/lib/components/Timeline/Timeline.types.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.types.js.map +1 -1
- package/lib/components/Timeline/TimelineItem.d.ts +1 -2
- package/lib/components/Timeline/TimelineItem.d.ts.map +1 -1
- package/lib/components/Timeline/TimelineItem.js +10 -9
- package/lib/components/Timeline/TimelineItem.js.map +1 -1
- package/lib/components/Timeline/TimelineToolbar.d.ts +2 -3
- package/lib/components/Timeline/TimelineToolbar.d.ts.map +1 -1
- package/lib/components/Timeline/TimelineToolbar.js.map +1 -1
- package/lib/components/Timeline/utils.js.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.d.ts +5 -0
- package/lib/components/UtilitiesLayout/UtilitiesLayout.d.ts.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.js +3 -3
- package/lib/components/UtilitiesLayout/UtilitiesLayout.js.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts +2 -4
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js +2 -5
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +10 -9
- package/lib/components/HierarchicalAssignments/AssignmentContainer.d.ts +0 -33
- package/lib/components/HierarchicalAssignments/AssignmentContainer.d.ts.map +0 -1
- package/lib/components/HierarchicalAssignments/AssignmentContainer.js +0 -46
- package/lib/components/HierarchicalAssignments/AssignmentContainer.js.map +0 -1
- package/lib/components/HierarchicalAssignments/AssignmentItem.d.ts +0 -11
- package/lib/components/HierarchicalAssignments/AssignmentItem.d.ts.map +0 -1
- package/lib/components/HierarchicalAssignments/AssignmentItem.js +0 -22
- package/lib/components/HierarchicalAssignments/AssignmentItem.js.map +0 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { NoChildrenProp, WithAttributes } from '@pega/cosmos-react-core';
|
|
3
2
|
import type { AutoAnsweredItem, DetectedItem } from './ArticleList.types';
|
|
4
3
|
export declare const StyledListItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
|
|
5
4
|
export declare const StyledList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
-
export declare const StyledAbstract: import("styled-components").StyledComponent<import("
|
|
5
|
+
export declare const StyledAbstract: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
7
6
|
type List = AutoAnsweredItem[] | DetectedItem[] | string[];
|
|
8
7
|
type QuestionListProps = WithAttributes<'div', NoChildrenProp & {
|
|
9
8
|
list: List;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionList.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/QuestionList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QuestionList.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/QuestionList.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAI1E,eAAO,MAAM,cAAc,wGAU1B,CAAC;AAIF,eAAO,MAAM,UAAU,wGAUtB,CAAC;AAIF,eAAO,MAAM,cAAc,kNAIzB,CAAC;AAIH,KAAK,IAAI,GAAG,gBAAgB,EAAE,GAAG,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC;AAgB3D,KAAK,iBAAiB,GAAG,cAAc,CACrC,KAAK,EACL,cAAc,GAAG;IACf,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,eAAe,GAAG,UAAU,GAAG,gBAAgB,GAAG,cAAc,CAAC;CAChF,CACF,CAAC;;AAEF,wBAyHE"}
|
|
@@ -52,7 +52,7 @@ export default forwardRef(function QuestionList({ list, questionType }, ref) {
|
|
|
52
52
|
pad: [undefined, undefined, 0.5]
|
|
53
53
|
}, item: { grow: 1 }, children: _jsx(Button, { variant: 'link', onClick: () => {
|
|
54
54
|
onTitleClick(id);
|
|
55
|
-
}, children: query }) }), actions && _jsx(Actions, {
|
|
55
|
+
}, children: query }) }), actions && _jsx(Actions, { ...actions, compact: true })] }), abstract && _jsx(StyledAbstract, { children: abstract }), confidence && (_jsxs(Text, { variant: 'secondary', children: [t('confidence'), ":", formatNumber(confidence, {
|
|
56
56
|
locale,
|
|
57
57
|
options: {
|
|
58
58
|
style: 'unit',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionList.js","sourceRoot":"","sources":["../../../src/components/ArticleList/QuestionList.tsx"],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CAAC,YAAY,CAAC,OACf,YAAY,CAAC,UAAU,EAAE;wDACxB,MAAM;wDACN,OAAO,EAAE;4DACP,KAAK,EAAE,MAAM;4DACb,IAAI,EAAE,SAAS;4DACf,qBAAqB,EAAE,CAAC;yDACzB;qDACF,CAAC,IACG,CACR,KAnCI,EAAE,CAoCF,CACR,GACA,CACJ,CAAC;6BACH;4BACD,OAAO,IAAI,CAAC;wBACd,CAAC,CAAC,GACG,IACN,CACJ,CAAC;QAEJ,KAAK,gBAAgB,CAAC;QACtB,KAAK,cAAc;YACjB,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,aAChD,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAQ,EACpD,IAAI,CAAC,MAAM,IAAI,CACd,KAAC,UAAU,cACR,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;4BACf,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gCAC5B,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EACvD,EAAE,EAAC,IAAI,YAGN,IAAI,IAFA,IAAI,CAGJ,CACR,CAAC;6BACH;4BACD,OAAO,IAAI,CAAC;wBACd,CAAC,CAAC,GACS,CACd,IACI,CACR,CAAC;QAEJ;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CACF,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Text,\n Actions,\n Flex,\n defaultThemeProp,\n Button,\n Icon,\n registerIcon,\n createUID,\n useTheme,\n formatNumber,\n useConfiguration,\n useI18n,\n VisuallyHiddenText\n} from '@pega/cosmos-react-core';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport * as PolarisIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';\nimport type { NoChildrenProp, RefElement, WithAttributes } from '@pega/cosmos-react-core';\n\nimport type { AutoAnsweredItem, DetectedItem } from './ArticleList.types';\n\nregisterIcon(PolarisIcon);\n\nexport const StyledListItem = styled.li(\n ({\n theme: {\n base: { palette }\n }\n }) => {\n return css`\n border-block-end: 0.0625rem solid ${palette['border-line']};\n `;\n }\n);\n\nStyledListItem.defaultProps = defaultThemeProp;\n\nexport const StyledList = styled.ul(\n ({\n theme: {\n base: { palette }\n }\n }) => {\n return css`\n border-block-end: 0.0625rem solid ${palette['border-line']};\n `;\n }\n);\n\nStyledList.defaultProps = defaultThemeProp;\n\nexport const StyledAbstract = styled(Text)(() => {\n return css`\n ${lineClamp(3)}\n `;\n});\n\nStyledAbstract.defaultProps = defaultThemeProp;\n\ntype List = AutoAnsweredItem[] | DetectedItem[] | string[];\n\ntype QuestionTypeI18NKeys =\n | 'auto_answered'\n | 'questions_detected'\n | 'past_answered_questions'\n | 'not_relevant_questions';\n\nfunction isAutoAnsweredItem(item: AutoAnsweredItem | DetectedItem): item is AutoAnsweredItem {\n return 'abstract' in item;\n}\n\nfunction isDetectedItem(item: AutoAnsweredItem | DetectedItem): item is DetectedItem {\n return 'confidence' in item;\n}\n\ntype QuestionListProps = WithAttributes<\n 'div',\n NoChildrenProp & {\n list: List;\n questionType: 'AUTO_ANSWERED' | 'DETECTED' | 'PAST_QUESTIONS' | 'NOT_RELEVANT';\n }\n>;\n\nexport default forwardRef<RefElement<QuestionListProps>, PropsWithoutRef<QuestionListProps>>(\n function QuestionList({ list, questionType }, ref) {\n const theme = useTheme();\n const t = useI18n();\n const { locale } = useConfiguration();\n const listHeaderId = createUID();\n\n const titleMap: {\n [key in QuestionListProps['questionType']]: QuestionTypeI18NKeys;\n } = {\n AUTO_ANSWERED: 'auto_answered',\n DETECTED: 'questions_detected',\n PAST_QUESTIONS: 'past_answered_questions',\n NOT_RELEVANT: 'not_relevant_questions'\n };\n\n switch (questionType) {\n case 'AUTO_ANSWERED':\n case 'DETECTED':\n return (\n <>\n <Flex container={{ gap: 0.5, pad: [0.5, undefined, undefined] }} ref={ref}>\n <Icon name='polaris-solid' color={theme.base.palette.ai} />\n <Text variant='h3' aria-describedby={listHeaderId}>\n {t(titleMap[questionType])}\n </Text>\n <VisuallyHiddenText id={listHeaderId}>{`${t(\n titleMap[questionType]\n )} ${t('ai_generated')}`}</VisuallyHiddenText>\n </Flex>\n <Flex container={{ direction: 'column' }}>\n {list.map((item: AutoAnsweredItem | DetectedItem | string) => {\n if (typeof item !== 'string') {\n const { id, query, actions, onTitleClick } = item;\n\n const abstract = isAutoAnsweredItem(item) ? item.abstract : undefined;\n const confidence = isDetectedItem(item) && item.confidence;\n\n return (\n <>\n {(questionType === 'AUTO_ANSWERED' || questionType === 'DETECTED') && (\n <Flex\n container={{ direction: 'column', pad: [1, undefined] }}\n as={StyledListItem}\n key={id}\n >\n <Flex container={{ alignItems: 'start' }} item={{ grow: 1 }}>\n <Flex\n container={{\n pad: [undefined, undefined, 0.5]\n }}\n item={{ grow: 1 }}\n >\n <Button\n variant='link'\n onClick={() => {\n onTitleClick(id);\n }}\n >\n {query}\n </Button>\n </Flex>\n\n {actions && <Actions items={actions} compact />}\n </Flex>\n {abstract && <StyledAbstract>{abstract}</StyledAbstract>}\n\n {confidence && (\n <Text variant='secondary'>\n {t('confidence')}:\n {formatNumber(confidence, {\n locale,\n options: {\n style: 'unit',\n unit: 'percent',\n maximumFractionDigits: 0\n }\n })}\n </Text>\n )}\n </Flex>\n )}\n </>\n );\n }\n return null;\n })}\n </Flex>\n </>\n );\n\n case 'PAST_QUESTIONS':\n case 'NOT_RELEVANT':\n return (\n <Flex container={{ direction: 'column', gap: 0.5 }}>\n <Text variant='h3'>{t(titleMap[questionType])}</Text>\n {list.length && (\n <StyledList>\n {list.map(item => {\n if (typeof item === 'string') {\n return (\n <Flex\n container={{ direction: 'column', pad: [1, undefined] }}\n as='li'\n key={item}\n >\n {item}\n </Flex>\n );\n }\n return null;\n })}\n </StyledList>\n )}\n </Flex>\n );\n\n default:\n return null;\n }\n }\n);\n"]}
|
|
1
|
+
{"version":3,"file":"QuestionList.js","sourceRoot":"","sources":["../../../src/components/ArticleList/QuestionList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AACtE,OAAO,KAAK,WAAW,MAAM,sEAAsE,CAAC;AAKpG,YAAY,CAAC,WAAW,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CACrC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;0CAC4B,OAAO,CAAC,aAAa,CAAC;KAC3D,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CACjC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;0CAC4B,OAAO,CAAC,aAAa,CAAC;KAC3D,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC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,CAAC,CACF,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Text,\n Actions,\n Flex,\n defaultThemeProp,\n Button,\n Icon,\n registerIcon,\n createUID,\n useTheme,\n formatNumber,\n useConfiguration,\n useI18n,\n VisuallyHiddenText\n} from '@pega/cosmos-react-core';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport * as PolarisIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';\nimport type { NoChildrenProp, RefElement, WithAttributes } from '@pega/cosmos-react-core';\n\nimport type { AutoAnsweredItem, DetectedItem } from './ArticleList.types';\n\nregisterIcon(PolarisIcon);\n\nexport const StyledListItem = styled.li(\n ({\n theme: {\n base: { palette }\n }\n }) => {\n return css`\n border-block-end: 0.0625rem solid ${palette['border-line']};\n `;\n }\n);\n\nStyledListItem.defaultProps = defaultThemeProp;\n\nexport const StyledList = styled.ul(\n ({\n theme: {\n base: { palette }\n }\n }) => {\n return css`\n border-block-end: 0.0625rem solid ${palette['border-line']};\n `;\n }\n);\n\nStyledList.defaultProps = defaultThemeProp;\n\nexport const StyledAbstract = styled(Text)(() => {\n return css`\n ${lineClamp(3)}\n `;\n});\n\nStyledAbstract.defaultProps = defaultThemeProp;\n\ntype List = AutoAnsweredItem[] | DetectedItem[] | string[];\n\ntype QuestionTypeI18NKeys =\n | 'auto_answered'\n | 'questions_detected'\n | 'past_answered_questions'\n | 'not_relevant_questions';\n\nfunction isAutoAnsweredItem(item: AutoAnsweredItem | DetectedItem): item is AutoAnsweredItem {\n return 'abstract' in item;\n}\n\nfunction isDetectedItem(item: AutoAnsweredItem | DetectedItem): item is DetectedItem {\n return 'confidence' in item;\n}\n\ntype QuestionListProps = WithAttributes<\n 'div',\n NoChildrenProp & {\n list: List;\n questionType: 'AUTO_ANSWERED' | 'DETECTED' | 'PAST_QUESTIONS' | 'NOT_RELEVANT';\n }\n>;\n\nexport default forwardRef<RefElement<QuestionListProps>, PropsWithoutRef<QuestionListProps>>(\n function QuestionList({ list, questionType }, ref) {\n const theme = useTheme();\n const t = useI18n();\n const { locale } = useConfiguration();\n const listHeaderId = createUID();\n\n const titleMap: {\n [key in QuestionListProps['questionType']]: QuestionTypeI18NKeys;\n } = {\n AUTO_ANSWERED: 'auto_answered',\n DETECTED: 'questions_detected',\n PAST_QUESTIONS: 'past_answered_questions',\n NOT_RELEVANT: 'not_relevant_questions'\n };\n\n switch (questionType) {\n case 'AUTO_ANSWERED':\n case 'DETECTED':\n return (\n <>\n <Flex container={{ gap: 0.5, pad: [0.5, undefined, undefined] }} ref={ref}>\n <Icon name='polaris-solid' color={theme.base.palette.ai} />\n <Text variant='h3' aria-describedby={listHeaderId}>\n {t(titleMap[questionType])}\n </Text>\n <VisuallyHiddenText id={listHeaderId}>{`${t(\n titleMap[questionType]\n )} ${t('ai_generated')}`}</VisuallyHiddenText>\n </Flex>\n <Flex container={{ direction: 'column' }}>\n {list.map((item: AutoAnsweredItem | DetectedItem | string) => {\n if (typeof item !== 'string') {\n const { id, query, actions, onTitleClick } = item;\n\n const abstract = isAutoAnsweredItem(item) ? item.abstract : undefined;\n const confidence = isDetectedItem(item) && item.confidence;\n\n return (\n <>\n {(questionType === 'AUTO_ANSWERED' || questionType === 'DETECTED') && (\n <Flex\n container={{ direction: 'column', pad: [1, undefined] }}\n as={StyledListItem}\n key={id}\n >\n <Flex container={{ alignItems: 'start' }} item={{ grow: 1 }}>\n <Flex\n container={{\n pad: [undefined, undefined, 0.5]\n }}\n item={{ grow: 1 }}\n >\n <Button\n variant='link'\n onClick={() => {\n onTitleClick(id);\n }}\n >\n {query}\n </Button>\n </Flex>\n\n {actions && <Actions {...actions} compact />}\n </Flex>\n {abstract && <StyledAbstract>{abstract}</StyledAbstract>}\n\n {confidence && (\n <Text variant='secondary'>\n {t('confidence')}:\n {formatNumber(confidence, {\n locale,\n options: {\n style: 'unit',\n unit: 'percent',\n maximumFractionDigits: 0\n }\n })}\n </Text>\n )}\n </Flex>\n )}\n </>\n );\n }\n return null;\n })}\n </Flex>\n </>\n );\n\n case 'PAST_QUESTIONS':\n case 'NOT_RELEVANT':\n return (\n <Flex container={{ direction: 'column', gap: 0.5 }}>\n <Text variant='h3'>{t(titleMap[questionType])}</Text>\n {list.length && (\n <StyledList>\n {list.map(item => {\n if (typeof item === 'string') {\n return (\n <Flex\n container={{ direction: 'column', pad: [1, undefined] }}\n as='li'\n key={item}\n >\n {item}\n </Flex>\n );\n }\n return null;\n })}\n </StyledList>\n )}\n </Flex>\n );\n\n default:\n return null;\n }\n }\n);\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { MouseEvent } from 'react';
|
|
2
|
+
import type { NoChildrenProp, WithAttributes } from '@pega/cosmos-react-core';
|
|
3
|
+
export declare const StyledRelatedQuestions: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TagProps> & {
|
|
4
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
|
|
5
|
+
}, import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export type RelatedQuestionsProps = WithAttributes<'div', NoChildrenProp & {
|
|
7
|
+
title: string;
|
|
8
|
+
items: {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
onClick: (item: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}, e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
15
|
+
}[];
|
|
16
|
+
}>;
|
|
17
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<RelatedQuestionsProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=RelatedQuestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelatedQuestions.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/RelatedQuestions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,OAAO,CAAC;AAazD,OAAO,KAAK,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG1F,eAAO,MAAM,sBAAsB;2BAqB1B,CAAC,oEACkB,yBAAY;uDAZtC,CAAC;AAIH,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAChD,KAAK,EACL,cAAc,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,CACP,IAAI,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAClC,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KAClD,IAAI,CAAC;KACX,EAAE,CAAC;CACL,CACF,CAAC;;AAEF,wBAwDG"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { Flex, Text, Tag, defaultThemeProp, Tooltip, useRefMap, ThemeOverride, useTheme } from '@pega/cosmos-react-core';
|
|
5
|
+
import { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
6
|
+
export const StyledRelatedQuestions = styled(Tag)(({ theme: { base } }) => {
|
|
7
|
+
return css `
|
|
8
|
+
border-radius: ${base['border-radius']};
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
${ellipsisOverflow}
|
|
11
|
+
|
|
12
|
+
& + & {
|
|
13
|
+
margin-inline-start: 0;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
});
|
|
17
|
+
StyledRelatedQuestions.defaultProps = defaultThemeProp;
|
|
18
|
+
export default forwardRef(function RelatedQuestions({ title, items, ...restProps }, ref) {
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
const [elMap, getCallbackRef] = useRefMap();
|
|
21
|
+
return (_jsxs(Flex, { ...restProps, container: {
|
|
22
|
+
direction: 'column',
|
|
23
|
+
gap: 1,
|
|
24
|
+
pad: [1.5, undefined],
|
|
25
|
+
alignItems: 'start'
|
|
26
|
+
}, ref: ref, children: [_jsx(Text, { variant: 'h4', children: title }), items && (_jsx(ThemeOverride, { theme: {
|
|
27
|
+
components: {
|
|
28
|
+
badges: {
|
|
29
|
+
tag: {
|
|
30
|
+
foreground: theme.base.palette.ai,
|
|
31
|
+
background: theme.base.palette.ai
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}, children: items.map(({ id, name, onClick }) => {
|
|
36
|
+
const relatedEl = elMap.get(id);
|
|
37
|
+
return (_jsxs(_Fragment, { children: [_jsx(StyledRelatedQuestions, { ref: getCallbackRef(id), onClick: (e) => onClick({ id, name }, e), children: name }), relatedEl && (_jsx(Tooltip, { smart: true, target: relatedEl, children: name }))] }));
|
|
38
|
+
}) }))] }));
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=RelatedQuestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelatedQuestions.js","sourceRoot":"","sources":["../../../src/components/ArticleList/RelatedQuestions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE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,KAAC,sBAAsB,IACrB,GAAG,EAAE,cAAc,CAAC,EAAE,CAAC,EACvB,OAAO,EAAE,CAAC,CAAoD,EAAE,EAAE,CAChE,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,YAGzB,IAAI,GACkB,EACxB,SAAS,IAAI,CACZ,KAAC,OAAO,IAAC,KAAK,QAAC,MAAM,EAAE,SAAS,YAC7B,IAAI,GACG,CACX,IACA,CACJ,CAAC;gBACJ,CAAC,CAAC,GACY,CACjB,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Flex,\n Text,\n Tag,\n defaultThemeProp,\n Tooltip,\n useRefMap,\n ThemeOverride,\n useTheme\n} from '@pega/cosmos-react-core';\nimport type { NoChildrenProp, RefElement, WithAttributes } from '@pega/cosmos-react-core';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\n\nexport const StyledRelatedQuestions = styled(Tag)(({ theme: { base } }) => {\n return css`\n border-radius: ${base['border-radius']};\n max-width: 100%;\n ${ellipsisOverflow}\n\n & + & {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledRelatedQuestions.defaultProps = defaultThemeProp;\n\nexport type RelatedQuestionsProps = WithAttributes<\n 'div',\n NoChildrenProp & {\n title: string;\n items: {\n id: string;\n name: string;\n onClick: (\n item: { id: string; name: string },\n e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>\n ) => void;\n }[];\n }\n>;\n\nexport default forwardRef<\n RefElement<RelatedQuestionsProps>,\n PropsWithoutRef<RelatedQuestionsProps>\n>(function RelatedQuestions({ title, items, ...restProps }, ref) {\n const theme = useTheme();\n const [elMap, getCallbackRef] = useRefMap<HTMLButtonElement | null>();\n\n return (\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n gap: 1,\n pad: [1.5, undefined],\n alignItems: 'start'\n }}\n ref={ref}\n >\n <Text variant='h4'>{title}</Text>\n {items && (\n <ThemeOverride\n theme={{\n components: {\n badges: {\n tag: {\n foreground: theme.base.palette.ai,\n background: theme.base.palette.ai\n }\n }\n }\n }}\n >\n {items.map(({ id, name, onClick }) => {\n const relatedEl = elMap.get(id);\n return (\n <>\n <StyledRelatedQuestions\n ref={getCallbackRef(id)}\n onClick={(e: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n onClick({ id, name }, e)\n }\n >\n {name}\n </StyledRelatedQuestions>\n {relatedEl && (\n <Tooltip smart target={relatedEl}>\n {name}\n </Tooltip>\n )}\n </>\n );\n })}\n </ThemeOverride>\n )}\n </Flex>\n );\n});\n"]}
|
|
@@ -6,4 +6,5 @@ export { default as ArticleListFilter } from './ArticleListFilter';
|
|
|
6
6
|
export type { ArticleBuddyProps, Reaction, BuddySuggestedArticlesProps, BuddyResponseProps, AutoAnsweredItem, DetectedItem, ArticleFeedbackProps, SearchArticle, SemanticSearchArticles } from './ArticleList.types';
|
|
7
7
|
export { default as ArticleBuddy } from './ArticleBuddy';
|
|
8
8
|
export { default as ArticleSemanticSearch } from './ArticleSemanticSearch';
|
|
9
|
+
export { default as ArticleFeedback } from './ArticleFeedback';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,QAAQ,EACR,2BAA2B,EAC3B,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,QAAQ,EACR,2BAA2B,EAC3B,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -3,4 +3,5 @@ export { default as ArticleSummary } from './ArticleSummary';
|
|
|
3
3
|
export { default as ArticleListFilter } from './ArticleListFilter';
|
|
4
4
|
export { default as ArticleBuddy } from './ArticleBuddy';
|
|
5
5
|
export { default as ArticleSemanticSearch } from './ArticleSemanticSearch';
|
|
6
|
+
export { default as ArticleFeedback } from './ArticleFeedback';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAYnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { default } from './ArticleList';\nexport type { ArticleListProps } from './ArticleList.types';\nexport { default as ArticleSummary } from './ArticleSummary';\nexport type {\n ArticleSummaryProps,\n AIArticleSummaryProps,\n Articles,\n QuickFilter\n} from './ArticleList.types';\nexport { default as ArticleListFilter } from './ArticleListFilter';\nexport type {\n ArticleBuddyProps,\n Reaction,\n BuddySuggestedArticlesProps,\n BuddyResponseProps,\n AutoAnsweredItem,\n DetectedItem,\n ArticleFeedbackProps,\n SearchArticle,\n SemanticSearchArticles\n} from './ArticleList.types';\nexport { default as ArticleBuddy } from './ArticleBuddy';\nexport { default as ArticleSemanticSearch } from './ArticleSemanticSearch';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ArticleList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAYnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { default } from './ArticleList';\nexport type { ArticleListProps } from './ArticleList.types';\nexport { default as ArticleSummary } from './ArticleSummary';\nexport type {\n ArticleSummaryProps,\n AIArticleSummaryProps,\n Articles,\n QuickFilter\n} from './ArticleList.types';\nexport { default as ArticleListFilter } from './ArticleListFilter';\nexport type {\n ArticleBuddyProps,\n Reaction,\n BuddySuggestedArticlesProps,\n BuddyResponseProps,\n AutoAnsweredItem,\n DetectedItem,\n ArticleFeedbackProps,\n SearchArticle,\n SemanticSearchArticles\n} from './ArticleList.types';\nexport { default as ArticleBuddy } from './ArticleBuddy';\nexport { default as ArticleSemanticSearch } from './ArticleSemanticSearch';\nexport { default as ArticleFeedback } from './ArticleFeedback';\n"]}
|
|
@@ -8,13 +8,13 @@ const Assignments = ({ items, count, collapsed, onToggleCollapsed, ...restProps
|
|
|
8
8
|
const t = useI18n();
|
|
9
9
|
const assignmentsId = useUID();
|
|
10
10
|
const TaskItems = useMemo(() => {
|
|
11
|
-
return openItem ? _jsx(TaskItem, { ...openItem }) : _jsx(TaskList, { items: items });
|
|
11
|
+
return openItem ? _jsx(TaskItem, { ...openItem, headingTag: 'h2' }) : _jsx(TaskList, { items: items });
|
|
12
12
|
}, [items, openItem]);
|
|
13
13
|
const tasks = _jsx(CardContent, { children: items.length > 0 ? TaskItems : _jsx(EmptyState, {}) });
|
|
14
14
|
const header = (_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [typeof collapsed === 'boolean' && _jsx(Icon, { name: 'caret-right' }), _jsx(Text, { variant: 'h2', children: t('assignments') }), _jsx(Count, { children: count })] }));
|
|
15
15
|
return (_jsxs(StyledAssignments, { ...restProps, openItem: !!openItem, "data-app-region": true, children: [!openItem && (_jsxs(CardHeader, { container: { justify: 'start', alignItems: 'center', gap: 1 }, children: [typeof collapsed === 'boolean' && onToggleCollapsed && (_jsx(StyledExpandButton, { type: 'button', variant: 'text', onClick: () => {
|
|
16
16
|
onToggleCollapsed();
|
|
17
|
-
}, "aria-controls": assignmentsId, "aria-expanded": !collapsed
|
|
17
|
+
}, "aria-controls": assignmentsId, "aria-expanded": !collapsed, "aria-label": t('assignments'), children: header })), collapsed === undefined && header] })), typeof collapsed === 'boolean' && onToggleCollapsed && !openItem ? (_jsx(ExpandCollapse, { collapsed: collapsed, children: tasks })) : (tasks)] }));
|
|
18
18
|
};
|
|
19
19
|
export default Assignments;
|
|
20
20
|
//# sourceMappingURL=Assignments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Assignments.js","sourceRoot":"","sources":["../../../src/components/Assignments/Assignments.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EACL,UAAU,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAGjC,OAAO,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAkB7E,MAAM,WAAW,GAAwC,CAAC,EACxD,KAAK,EACL,KAAK,EACL,SAAS,EACT,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,aAAa,GAAG,MAAM,EAAE,CAAC;IAE/B,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,OAAO,QAAQ,CAAC,CAAC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,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,OAAO,SAAS,KAAK,SAAS,IAAI,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,GAAG,EAC9D,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,aAAa,CAAC,GAAQ,EAC5C,KAAC,KAAK,cAAE,KAAK,GAAS,IACjB,CACR,CAAC;IAEF,OAAO,CACL,MAAC,iBAAiB,OAAK,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,sCACnD,CAAC,QAAQ,IAAI,CACZ,MAAC,UAAU,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aACtE,OAAO,SAAS,KAAK,SAAS,IAAI,iBAAiB,IAAI,CACtD,KAAC,kBAAkB,IACjB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;4BACZ,iBAAiB,EAAE,CAAC;wBACtB,CAAC,mBACc,aAAa,mBACb,CAAC,SAAS,gBACb,CAAC,CAAC,aAAa,CAAC,YAE3B,MAAM,GACY,CACtB,EACA,SAAS,KAAK,SAAS,IAAI,MAAM,IACvB,CACd,EAEA,OAAO,SAAS,KAAK,SAAS,IAAI,iBAAiB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAClE,KAAC,cAAc,IAAC,SAAS,EAAE,SAAS,YAAG,KAAK,GAAkB,CAC/D,CAAC,CAAC,CAAC,CACF,KAAK,CACN,IACiB,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport type { FC } from 'react';\n\nimport {\n CardHeader,\n useI18n,\n EmptyState,\n ExpandCollapse,\n Icon,\n Text,\n Count,\n Flex,\n useUID,\n CardContent\n} from '@pega/cosmos-react-core';\nimport type { ForwardProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nimport TaskList, { TaskItem } from '../Tasks/TaskList';\nimport type { TaskItemProps } from '../Tasks/TaskList';\n\nimport { StyledAssignments, StyledExpandButton } from './Assignments.styles';\n\nexport interface AssignmentsProps extends NoChildrenProp {\n /** An array of TaskItemProps to generate the list. */\n items: TaskItemProps[];\n /** Integer representing the total count of tasks. */\n count: number;\n /**\n * Controls the collapsed state of the assignments list.\n * @default false\n */\n collapsed?: boolean;\n /**\n * Call when the user clicks the collapsed element.\n */\n onToggleCollapsed?: () => void;\n}\n\nconst Assignments: FC<ForwardProps & AssignmentsProps> = ({\n items,\n count,\n collapsed,\n onToggleCollapsed,\n ...restProps\n}) => {\n const openItem = items.find(item => item.content);\n const t = useI18n();\n const assignmentsId = useUID();\n\n const TaskItems = useMemo(() => {\n return openItem ? <TaskItem {...openItem} headingTag='h2' /> : <TaskList items={items} />;\n }, [items, openItem]);\n\n const tasks = <CardContent>{items.length > 0 ? TaskItems : <EmptyState />}</CardContent>;\n\n const header = (\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {typeof collapsed === 'boolean' && <Icon name='caret-right' />}\n <Text variant='h2'>{t('assignments')}</Text>\n <Count>{count}</Count>\n </Flex>\n );\n\n return (\n <StyledAssignments {...restProps} openItem={!!openItem} data-app-region>\n {!openItem && (\n <CardHeader container={{ justify: 'start', alignItems: 'center', gap: 1 }}>\n {typeof collapsed === 'boolean' && onToggleCollapsed && (\n <StyledExpandButton\n type='button'\n variant='text'\n onClick={() => {\n onToggleCollapsed();\n }}\n aria-controls={assignmentsId}\n aria-expanded={!collapsed}\n aria-label={t('assignments')}\n >\n {header}\n </StyledExpandButton>\n )}\n {collapsed === undefined && header}\n </CardHeader>\n )}\n\n {typeof collapsed === 'boolean' && onToggleCollapsed && !openItem ? (\n <ExpandCollapse collapsed={collapsed}>{tasks}</ExpandCollapse>\n ) : (\n tasks\n )}\n </StyledAssignments>\n );\n};\n\nexport default Assignments;\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
openItem?: boolean | undefined;
|
|
1
|
+
export declare const StyledExpandButton: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const StyledAssignments: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").CardProps>, import("styled-components").DefaultTheme, {
|
|
3
|
+
openItem?: boolean;
|
|
5
4
|
}, never>;
|
|
6
5
|
//# sourceMappingURL=Assignments.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Assignments.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Assignments/Assignments.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Assignments.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Assignments/Assignments.styles.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,kBAAkB,oNAwB7B,CAAC;AAIH,eAAO,MAAM,iBAAiB;eAA6B,OAAO;SAchE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CaseHierarchyProps } from './CaseHierarchy.types';
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<CaseHierarchyProps, "ref"> & import("react").RefAttributes<HTMLUListElement>> & {
|
|
3
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["heading", "icon"]>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=CaseHierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.d.ts","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;;;;AA0DhE,wBAAmE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Count, EmptyState, ErrorState, Flex, Icon, Progress, Text, useI18n, useTestIds, withTestIds } from '@pega/cosmos-react-core';
|
|
4
|
+
import { StyledCaseHierarchy, StyledCaseHierarchyHeader, StyledCaseHierarchyTree, StyledOverflowContainer } from './CaseHierarchy.styles';
|
|
5
|
+
import { getCaseHierarchyTestIds } from './CaseHierarchy.test-ids';
|
|
6
|
+
const CaseHierarchy = forwardRef(function CaseHierarchy({ testId, heading, icon, loading, error, count, nodes, currentCaseId, ...restProps }, ref) {
|
|
7
|
+
const t = useI18n();
|
|
8
|
+
const testIds = useTestIds(testId, getCaseHierarchyTestIds);
|
|
9
|
+
const content = (() => {
|
|
10
|
+
if (error) {
|
|
11
|
+
return _jsx(ErrorState, { message: t('error') });
|
|
12
|
+
}
|
|
13
|
+
if (loading) {
|
|
14
|
+
return _jsx(Progress, { placement: 'block' });
|
|
15
|
+
}
|
|
16
|
+
if (nodes.length === 0) {
|
|
17
|
+
return _jsx(EmptyState, {});
|
|
18
|
+
}
|
|
19
|
+
return _jsx(StyledCaseHierarchyTree, { ...restProps, currentNodeId: currentCaseId, nodes: nodes });
|
|
20
|
+
})();
|
|
21
|
+
return (_jsxs(StyledCaseHierarchy, { "data-testid": testIds.root, ref: ref, children: [_jsx(StyledCaseHierarchyHeader, { children: _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { "data-testid": testIds.icon, name: icon ?? 'folder-nested', size: 's' }), _jsx(Text, { "data-testid": testIds.heading, variant: 'h3', children: heading }), !loading && count && count > 0 && _jsx(Count, { children: count })] }) }), _jsx(StyledOverflowContainer, { children: content })] }));
|
|
22
|
+
});
|
|
23
|
+
export default withTestIds(CaseHierarchy, getCaseHierarchyTestIds);
|
|
24
|
+
//# sourceMappingURL=CaseHierarchy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.js","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EACL,KAAK,EACL,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,MAAM,aAAa,GAAG,UAAU,CAAC,SAAS,aAAa,CACrD,EACE,MAAM,EACN,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,EACL,KAAK,EACL,aAAa,EACb,GAAG,SAAS,EACwB,EACtC,GAA0B;IAE1B,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IAE5D,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE;QACpB,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,GAAI,CAAC;QAC7C,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,KAAC,QAAQ,IAAC,SAAS,EAAC,OAAO,GAAG,CAAC;QACxC,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,KAAC,UAAU,KAAG,CAAC;QACxB,CAAC;QAED,OAAO,KAAC,uBAAuB,OAAK,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;IAChG,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,CACL,MAAC,mBAAmB,mBAAc,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,aACtD,KAAC,yBAAyB,cACxB,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC/C,KAAC,IAAI,mBAAc,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,eAAe,EAAE,IAAI,EAAC,GAAG,GAAG,EAC3E,KAAC,IAAI,mBAAc,OAAO,CAAC,OAAO,EAAE,OAAO,EAAC,IAAI,YAC7C,OAAO,GACH,EACN,CAAC,OAAO,IAAI,KAAK,IAAI,KAAK,GAAG,CAAC,IAAI,KAAC,KAAK,cAAE,KAAK,GAAS,IACpD,GACmB,EAC5B,KAAC,uBAAuB,cAAE,OAAO,GAA2B,IACxC,CACvB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, Ref } from 'react';\n\nimport {\n Count,\n EmptyState,\n ErrorState,\n Flex,\n Icon,\n Progress,\n Text,\n useI18n,\n useTestIds,\n withTestIds\n} from '@pega/cosmos-react-core';\n\nimport type { CaseHierarchyProps } from './CaseHierarchy.types';\nimport {\n StyledCaseHierarchy,\n StyledCaseHierarchyHeader,\n StyledCaseHierarchyTree,\n StyledOverflowContainer\n} from './CaseHierarchy.styles';\nimport { getCaseHierarchyTestIds } from './CaseHierarchy.test-ids';\n\nconst CaseHierarchy = forwardRef(function CaseHierarchy(\n {\n testId,\n heading,\n icon,\n loading,\n error,\n count,\n nodes,\n currentCaseId,\n ...restProps\n }: PropsWithoutRef<CaseHierarchyProps>,\n ref: Ref<HTMLUListElement>\n) {\n const t = useI18n();\n const testIds = useTestIds(testId, getCaseHierarchyTestIds);\n\n const content = (() => {\n if (error) {\n return <ErrorState message={t('error')} />;\n }\n\n if (loading) {\n return <Progress placement='block' />;\n }\n\n if (nodes.length === 0) {\n return <EmptyState />;\n }\n\n return <StyledCaseHierarchyTree {...restProps} currentNodeId={currentCaseId} nodes={nodes} />;\n })();\n\n return (\n <StyledCaseHierarchy data-testid={testIds.root} ref={ref}>\n <StyledCaseHierarchyHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Icon data-testid={testIds.icon} name={icon ?? 'folder-nested'} size='s' />\n <Text data-testid={testIds.heading} variant='h3'>\n {heading}\n </Text>\n {!loading && count && count > 0 && <Count>{count}</Count>}\n </Flex>\n </StyledCaseHierarchyHeader>\n <StyledOverflowContainer>{content}</StyledOverflowContainer>\n </StyledCaseHierarchy>\n );\n});\n\nexport default withTestIds(CaseHierarchy, getCaseHierarchyTestIds);\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StandardTree } from '@pega/cosmos-react-core';
|
|
2
|
+
export declare const StyledCaseHierarchyTree: typeof StandardTree;
|
|
3
|
+
export declare const StyledOverflowContainer: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardContentProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const StyledCaseHierarchyHeader: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").CardHeaderProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const StyledCaseHierarchy: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").CardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
//# sourceMappingURL=CaseHierarchy.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAK5F,eAAO,MAAM,uBAAuB,EAAE,OAAO,YAU3C,CAAC;AAIH,eAAO,MAAM,uBAAuB,0OAoBnC,CAAC;AAIF,eAAO,MAAM,yBAAyB,wNAIpC,CAAC;AAIH,eAAO,MAAM,mBAAmB,kNAK/B,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { defaultThemeProp, StandardTree, Card, CardContent } from '@pega/cosmos-react-core';
|
|
3
|
+
import { StyledSummaryListHeader } from '@pega/cosmos-react-core/lib/components/SummaryList/SummaryList';
|
|
4
|
+
import { StyledDialog } from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.styles';
|
|
5
|
+
import { StyledNodeInteraction } from '@pega/cosmos-react-core/lib/components/Tree/StandardTree.styles';
|
|
6
|
+
export const StyledCaseHierarchyTree = styled(StandardTree)(({ theme }) => {
|
|
7
|
+
return css `
|
|
8
|
+
display: table;
|
|
9
|
+
width: 100%;
|
|
10
|
+
|
|
11
|
+
[aria-current='true'],
|
|
12
|
+
[aria-current='page'] {
|
|
13
|
+
font-weight: ${theme.base['font-weight']['semi-bold']};
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
});
|
|
17
|
+
StyledCaseHierarchyTree.defaultProps = defaultThemeProp;
|
|
18
|
+
export const StyledOverflowContainer = styled(CardContent)(({ theme }) => css `
|
|
19
|
+
overflow: auto;
|
|
20
|
+
max-height: inherit;
|
|
21
|
+
|
|
22
|
+
${StyledNodeInteraction} {
|
|
23
|
+
border-top-right-radius: calc(
|
|
24
|
+
var(--first-visible) * var(--border-radius, ${theme.base['border-radius']})
|
|
25
|
+
);
|
|
26
|
+
border-top-left-radius: calc(
|
|
27
|
+
var(--first-visible) * var(--border-radius, ${theme.base['border-radius']})
|
|
28
|
+
);
|
|
29
|
+
border-bottom-left-radius: calc(
|
|
30
|
+
var(--last-visible) * var(--border-radius, ${theme.base['border-radius']})
|
|
31
|
+
);
|
|
32
|
+
border-bottom-right-radius: calc(
|
|
33
|
+
var(--last-visible) * var(--border-radius, ${theme.base['border-radius']})
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
`);
|
|
37
|
+
StyledOverflowContainer.defaultProps = defaultThemeProp;
|
|
38
|
+
export const StyledCaseHierarchyHeader = styled(StyledSummaryListHeader)(({ theme }) => {
|
|
39
|
+
return css `
|
|
40
|
+
padding-block-end: calc(${theme.base.spacing} / 2);
|
|
41
|
+
`;
|
|
42
|
+
});
|
|
43
|
+
StyledCaseHierarchyHeader.defaultProps = defaultThemeProp;
|
|
44
|
+
export const StyledCaseHierarchy = styled(Card) `
|
|
45
|
+
${StyledDialog} & {
|
|
46
|
+
/* stylelint-disable-next-line unit-allowed-list */
|
|
47
|
+
max-height: calc(100dvh - 5rem);
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
StyledCaseHierarchy.defaultProps = defaultThemeProp;
|
|
51
|
+
//# sourceMappingURL=CaseHierarchy.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.styles.js","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAC;AACzG,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,iEAAiE,CAAC;AAExG,MAAM,CAAC,MAAM,uBAAuB,GAAwB,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7F,OAAO,GAAG,CAAA;;;;;;qBAMS,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC;;GAExD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,WAAW,CAAC,CACxD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;;MAId,qBAAqB;;sDAE2B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;;sDAG3B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;;qDAG5B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;;qDAG3B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;;GAG7E,CACF,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrF,OAAO,GAAG,CAAA;8BACkB,KAAK,CAAC,IAAI,CAAC,OAAO;GAC7C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3C,YAAY;;;;CAIf,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, StandardTree, Card, CardContent } from '@pega/cosmos-react-core';\nimport { StyledSummaryListHeader } from '@pega/cosmos-react-core/lib/components/SummaryList/SummaryList';\nimport { StyledDialog } from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.styles';\nimport { StyledNodeInteraction } from '@pega/cosmos-react-core/lib/components/Tree/StandardTree.styles';\n\nexport const StyledCaseHierarchyTree: typeof StandardTree = styled(StandardTree)(({ theme }) => {\n return css`\n display: table;\n width: 100%;\n\n [aria-current='true'],\n [aria-current='page'] {\n font-weight: ${theme.base['font-weight']['semi-bold']};\n }\n `;\n});\n\nStyledCaseHierarchyTree.defaultProps = defaultThemeProp;\n\nexport const StyledOverflowContainer = styled(CardContent)(\n ({ theme }) => css`\n overflow: auto;\n max-height: inherit;\n\n ${StyledNodeInteraction} {\n border-top-right-radius: calc(\n var(--first-visible) * var(--border-radius, ${theme.base['border-radius']})\n );\n border-top-left-radius: calc(\n var(--first-visible) * var(--border-radius, ${theme.base['border-radius']})\n );\n border-bottom-left-radius: calc(\n var(--last-visible) * var(--border-radius, ${theme.base['border-radius']})\n );\n border-bottom-right-radius: calc(\n var(--last-visible) * var(--border-radius, ${theme.base['border-radius']})\n );\n }\n `\n);\n\nStyledOverflowContainer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHierarchyHeader = styled(StyledSummaryListHeader)(({ theme }) => {\n return css`\n padding-block-end: calc(${theme.base.spacing} / 2);\n `;\n});\n\nStyledCaseHierarchyHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHierarchy = styled(Card)`\n ${StyledDialog} & {\n /* stylelint-disable-next-line unit-allowed-list */\n max-height: calc(100dvh - 5rem);\n }\n`;\n\nStyledCaseHierarchy.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,wJAGzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.test-ids.js","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC,gBAAgB,EAAE;IACrE,SAAS;IACT,MAAM;CACE,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getCaseHierarchyTestIds = createTestIds('case-hierarchy', [\n 'heading',\n 'icon'\n] as const);\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { IconProps, OmitStrict, StandardTreeNode, StandardTreeProps, TestIdProp, TreeNode } from '@pega/cosmos-react-core';
|
|
3
|
+
export interface CaseHierarchyNode extends OmitStrict<StandardTreeNode, 'nodes'> {
|
|
4
|
+
nodes?: CaseHierarchyNode[];
|
|
5
|
+
caseTypeId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CaseHierarchyProps extends OmitStrict<StandardTreeProps, 'currentNodeId' | 'ref'>, TestIdProp {
|
|
8
|
+
/** Heading shown on the Card wrapping the component. */
|
|
9
|
+
heading: string;
|
|
10
|
+
/** The icon rendered as part of the header. If not set will default to 'folder-nested'. */
|
|
11
|
+
icon?: IconProps['name'];
|
|
12
|
+
/** The currently selected case, will be highlighted by default. */
|
|
13
|
+
currentCaseId?: TreeNode['id'];
|
|
14
|
+
/** If set, a progress indicator will render in place of the component. */
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
/** If set, an error state will render in place of the component. */
|
|
17
|
+
error?: boolean;
|
|
18
|
+
/** Will render the provided number in a count badge next to the heading. */
|
|
19
|
+
count?: number;
|
|
20
|
+
/** A ref to the wrapping element. */
|
|
21
|
+
ref?: Ref<HTMLDivElement>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=CaseHierarchy.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.types.d.ts","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,iBAAkB,SAAQ,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAC9E,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBACf,SAAQ,UAAU,CAAC,iBAAiB,EAAE,eAAe,GAAG,KAAK,CAAC,EAC5D,UAAU;IACZ,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,mEAAmE;IACnE,aAAa,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oEAAoE;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseHierarchy.types.js","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/CaseHierarchy.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref } from 'react';\n\nimport type {\n IconProps,\n OmitStrict,\n StandardTreeNode,\n StandardTreeProps,\n TestIdProp,\n TreeNode\n} from '@pega/cosmos-react-core';\n\nexport interface CaseHierarchyNode extends OmitStrict<StandardTreeNode, 'nodes'> {\n nodes?: CaseHierarchyNode[];\n caseTypeId?: string;\n}\n\nexport interface CaseHierarchyProps\n extends OmitStrict<StandardTreeProps, 'currentNodeId' | 'ref'>,\n TestIdProp {\n /** Heading shown on the Card wrapping the component. */\n heading: string;\n /** The icon rendered as part of the header. If not set will default to 'folder-nested'. */\n icon?: IconProps['name'];\n /** The currently selected case, will be highlighted by default. */\n currentCaseId?: TreeNode['id'];\n /** If set, a progress indicator will render in place of the component. */\n loading?: boolean;\n /** If set, an error state will render in place of the component. */\n error?: boolean;\n /** Will render the provided number in a count badge next to the heading. */\n count?: number;\n /** A ref to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CaseHierarchy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export { default } from './CaseHierarchy';\nexport type { CaseHierarchyProps, CaseHierarchyNode } from './CaseHierarchy.types';\nexport { getCaseHierarchyTestIds } from './CaseHierarchy.test-ids';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { ForwardRefForwardPropsComponent, BaseProps, TestIdProp, NoChildrenProp, ErrorStateProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { CaseViewProps } from '../CaseView';
|
|
4
4
|
import type { CaseViewContextValue } from '../CaseView/CaseView.types';
|
|
5
5
|
export interface CasePreviewProps extends Pick<CaseViewProps, 'caseId' | 'heading' | 'subheading' | 'parentCases' | 'icon' | 'followed' | 'onFollowedChange' | 'actions' | 'promotedActions' | 'onEdit' | 'summaryFields' | 'tabs' | 'tabContent' | 'stages' | 'tasks' | 'banners' | 'utilities' | 'utilitiesSummaryItems'>, NoChildrenProp, TestIdProp, BaseProps {
|
|
@@ -26,8 +26,8 @@ export interface CasePreviewProps extends Pick<CaseViewProps, 'caseId' | 'headin
|
|
|
26
26
|
/** Reference to the wrapping element. */
|
|
27
27
|
ref?: Ref<HTMLDivElement>;
|
|
28
28
|
}
|
|
29
|
-
declare const _default:
|
|
30
|
-
getTestIds: (testIdProp?:
|
|
29
|
+
declare const _default: ForwardRefForwardPropsComponent<CasePreviewProps> & {
|
|
30
|
+
getTestIds: (testIdProp?: TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["close"]>;
|
|
31
31
|
};
|
|
32
32
|
export default _default;
|
|
33
33
|
//# sourceMappingURL=CasePreview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CasePreview.d.ts","sourceRoot":"","sources":["../../../src/components/CasePreview/CasePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CasePreview.d.ts","sourceRoot":"","sources":["../../../src/components/CasePreview/CasePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAwBlD,OAAO,KAAK,EACV,+BAA+B,EAC/B,SAAS,EACT,UAAU,EACV,cAAc,EACd,eAAe,EAChB,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAMvE,MAAM,WAAW,gBACf,SAAQ,IAAI,CACR,aAAa,EACX,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,aAAa,GACb,MAAM,GACN,UAAU,GACV,kBAAkB,GAClB,SAAS,GACT,iBAAiB,GACjB,QAAQ,GACR,eAAe,GACf,MAAM,GACN,YAAY,GACZ,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,uBAAuB,CAC1B,EACD,cAAc,EACd,UAAU,EACV,SAAS;IACX,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC5C,iDAAiD;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IAC1C,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,yCAAyC;IACzC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;;;;AAmQD,wBAA+D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useState, useCallback, useEffect, useContext } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
-
import { Drawer, Icon, registerIcon, Button, Flex,
|
|
4
|
+
import { Drawer, Icon, registerIcon, Button, Flex, defaultThemeProp, useBreakpoint, useElement, useDirection, useI18n, AppShellContext, useTestIds, withTestIds, Progress, ErrorState, getFocusables, useConsolidatedRef, StyledButton, calculateForegroundColor } from '@pega/cosmos-react-core';
|
|
5
5
|
import * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';
|
|
6
6
|
import CaseView, { StyledCaseView, StyledCaseViewContent, StyledCaseDrawer, StyledSummaryRegion } from '../CaseView';
|
|
7
7
|
import { getCasePreviewTestIds } from './CasePreview.test-ids';
|
|
@@ -13,19 +13,20 @@ const StyledPreviewHeader = styled.div(({ theme }) => {
|
|
|
13
13
|
`;
|
|
14
14
|
});
|
|
15
15
|
StyledPreviewHeader.defaultProps = defaultThemeProp;
|
|
16
|
-
const StyledPreviewActions = styled.div(({ theme: { base: { spacing,
|
|
17
|
-
const
|
|
16
|
+
const StyledPreviewActions = styled.div(({ theme: { base: { spacing, 'z-index': { backdrop } }, components: { 'case-view': { header: { background, 'foreground-color': color } } } }, fixedHeaderHeight, progressActive }) => {
|
|
17
|
+
const foregroundColor = calculateForegroundColor(background, color);
|
|
18
18
|
return css `
|
|
19
|
-
background
|
|
19
|
+
background: ${background};
|
|
20
|
+
color: ${foregroundColor};
|
|
20
21
|
padding: ${spacing} calc(2 * ${spacing}) calc(0.25 * ${spacing});
|
|
21
22
|
|
|
22
23
|
${StyledButton} {
|
|
23
|
-
color: ${
|
|
24
|
+
color: ${foregroundColor};
|
|
24
25
|
|
|
25
26
|
${progressActive &&
|
|
26
27
|
css `
|
|
27
28
|
z-index: ${backdrop + 1};
|
|
28
|
-
color: ${
|
|
29
|
+
color: ${foregroundColor};
|
|
29
30
|
`}
|
|
30
31
|
}
|
|
31
32
|
|