@pega/cosmos-react-work 5.0.0-dev.4.9 → 5.0.0-dev.5.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 +23 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.js +93 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -0
- package/lib/components/AppAnnouncement/index.d.ts +3 -0
- package/lib/components/AppAnnouncement/index.d.ts.map +1 -0
- package/lib/components/AppAnnouncement/index.js +2 -0
- package/lib/components/AppAnnouncement/index.js.map +1 -0
- package/lib/components/Article/Article.d.ts +60 -0
- package/lib/components/Article/Article.d.ts.map +1 -0
- package/lib/components/Article/Article.js +87 -0
- package/lib/components/Article/Article.js.map +1 -0
- package/lib/components/Article/ArticleFooter.d.ts +38 -0
- package/lib/components/Article/ArticleFooter.d.ts.map +1 -0
- package/lib/components/Article/ArticleFooter.js +58 -0
- package/lib/components/Article/ArticleFooter.js.map +1 -0
- package/lib/components/Article/ArticleMeta.d.ts +13 -0
- package/lib/components/Article/ArticleMeta.d.ts.map +1 -0
- package/lib/components/Article/ArticleMeta.js +27 -0
- package/lib/components/Article/ArticleMeta.js.map +1 -0
- package/lib/components/Article/ArticleRating.d.ts +13 -0
- package/lib/components/Article/ArticleRating.d.ts.map +1 -0
- package/lib/components/Article/ArticleRating.js +43 -0
- package/lib/components/Article/ArticleRating.js.map +1 -0
- package/lib/components/Article/index.d.ts +7 -0
- package/lib/components/Article/index.d.ts.map +1 -0
- package/lib/components/Article/index.js +4 -0
- package/lib/components/Article/index.js.map +1 -0
- package/lib/components/ArticleList/ArticleList.d.ts +6 -0
- package/lib/components/ArticleList/ArticleList.d.ts.map +1 -0
- package/lib/components/ArticleList/ArticleList.js +132 -0
- package/lib/components/ArticleList/ArticleList.js.map +1 -0
- package/lib/components/ArticleList/ArticleList.types.d.ts +92 -0
- package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -0
- package/lib/components/ArticleList/ArticleList.types.js +2 -0
- package/lib/components/ArticleList/ArticleList.types.js.map +1 -0
- package/lib/components/ArticleList/ArticleListFilter.d.ts +6 -0
- package/lib/components/ArticleList/ArticleListFilter.d.ts.map +1 -0
- package/lib/components/ArticleList/ArticleListFilter.js +67 -0
- package/lib/components/ArticleList/ArticleListFilter.js.map +1 -0
- package/lib/components/ArticleList/ArticleListHeader.d.ts +5 -0
- package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -0
- package/lib/components/ArticleList/ArticleListHeader.js +20 -0
- package/lib/components/ArticleList/ArticleListHeader.js.map +1 -0
- package/lib/components/ArticleList/ArticleSummary.d.ts +7 -0
- package/lib/components/ArticleList/ArticleSummary.d.ts.map +1 -0
- package/lib/components/ArticleList/ArticleSummary.js +63 -0
- package/lib/components/ArticleList/ArticleSummary.js.map +1 -0
- package/lib/components/ArticleList/index.d.ts +6 -0
- package/lib/components/ArticleList/index.d.ts.map +1 -0
- package/lib/components/ArticleList/index.js +4 -0
- package/lib/components/ArticleList/index.js.map +1 -0
- package/lib/components/Assignments/Assignments.d.ts +21 -0
- package/lib/components/Assignments/Assignments.d.ts.map +1 -0
- package/lib/components/Assignments/Assignments.js +20 -0
- package/lib/components/Assignments/Assignments.js.map +1 -0
- package/lib/components/Assignments/Assignments.styles.d.ts +8 -0
- package/lib/components/Assignments/Assignments.styles.d.ts.map +1 -0
- package/lib/components/Assignments/Assignments.styles.js +41 -0
- package/lib/components/Assignments/Assignments.styles.js.map +1 -0
- package/lib/components/Assignments/index.d.ts +2 -0
- package/lib/components/Assignments/index.d.ts.map +1 -0
- package/lib/components/Assignments/index.js +2 -0
- package/lib/components/Assignments/index.js.map +1 -0
- package/lib/components/CasePreview/CasePreview.d.ts +27 -0
- package/lib/components/CasePreview/CasePreview.d.ts.map +1 -0
- package/lib/components/CasePreview/CasePreview.js +82 -0
- package/lib/components/CasePreview/CasePreview.js.map +1 -0
- package/lib/components/CasePreview/CasePreview.test-ids.d.ts +2 -0
- package/lib/components/CasePreview/CasePreview.test-ids.d.ts.map +1 -0
- package/lib/components/CasePreview/CasePreview.test-ids.js +3 -0
- package/lib/components/CasePreview/CasePreview.test-ids.js.map +1 -0
- package/lib/components/CasePreview/index.d.ts +3 -0
- package/lib/components/CasePreview/index.d.ts.map +1 -0
- package/lib/components/CasePreview/index.js +2 -0
- package/lib/components/CasePreview/index.js.map +1 -0
- package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts +4 -0
- package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -0
- package/lib/components/CaseView/CaseHeader/CaseHeader.js +127 -0
- package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -0
- package/lib/components/CaseView/CaseHeader/Summary.d.ts +6 -0
- package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -0
- package/lib/components/CaseView/CaseHeader/Summary.js +182 -0
- package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -0
- package/lib/components/CaseView/CaseSummary.d.ts +4 -0
- package/lib/components/CaseView/CaseSummary.d.ts.map +1 -0
- package/lib/components/CaseView/CaseSummary.js +18 -0
- package/lib/components/CaseView/CaseSummary.js.map +1 -0
- package/lib/components/CaseView/CaseSummaryFields.d.ts +6 -0
- package/lib/components/CaseView/CaseSummaryFields.d.ts.map +1 -0
- package/lib/components/CaseView/CaseSummaryFields.js +18 -0
- package/lib/components/CaseView/CaseSummaryFields.js.map +1 -0
- package/lib/components/CaseView/CaseView.context.d.ts +5 -0
- package/lib/components/CaseView/CaseView.context.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.context.js +5 -0
- package/lib/components/CaseView/CaseView.context.js.map +1 -0
- package/lib/components/CaseView/CaseView.d.ts +8 -0
- package/lib/components/CaseView/CaseView.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.js +421 -0
- package/lib/components/CaseView/CaseView.js.map +1 -0
- package/lib/components/CaseView/CaseView.styles.d.ts +45 -0
- package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.styles.js +559 -0
- package/lib/components/CaseView/CaseView.styles.js.map +1 -0
- package/lib/components/CaseView/CaseView.test-ids.d.ts +2 -0
- package/lib/components/CaseView/CaseView.test-ids.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.test-ids.js +18 -0
- package/lib/components/CaseView/CaseView.test-ids.js.map +1 -0
- package/lib/components/CaseView/CaseView.types.d.ts +98 -0
- package/lib/components/CaseView/CaseView.types.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.types.js +2 -0
- package/lib/components/CaseView/CaseView.types.js.map +1 -0
- package/lib/components/CaseView/UtilitiesSummary.d.ts +9 -0
- package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -0
- package/lib/components/CaseView/UtilitiesSummary.js +53 -0
- package/lib/components/CaseView/UtilitiesSummary.js.map +1 -0
- package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts +9 -0
- package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -0
- package/lib/components/CaseView/UtilitySummaryItemDialog.js +29 -0
- package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -0
- package/lib/components/CaseView/index.d.ts +5 -0
- package/lib/components/CaseView/index.d.ts.map +1 -0
- package/lib/components/CaseView/index.js +4 -0
- package/lib/components/CaseView/index.js.map +1 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts +4 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts.map +1 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.js +86 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.js.map +1 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts +41 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts.map +1 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.types.js +2 -0
- package/lib/components/ConfigurableLayout/ConfigurableLayout.types.js.map +1 -0
- package/lib/components/ConfigurableLayout/LayoutCell.d.ts +6 -0
- package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +1 -0
- package/lib/components/ConfigurableLayout/LayoutCell.js +64 -0
- package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -0
- package/lib/components/ConfigurableLayout/defaults.d.ts +4 -0
- package/lib/components/ConfigurableLayout/defaults.d.ts.map +1 -0
- package/lib/components/ConfigurableLayout/defaults.js +4 -0
- package/lib/components/ConfigurableLayout/defaults.js.map +1 -0
- package/lib/components/ConfigurableLayout/index.d.ts +4 -0
- package/lib/components/ConfigurableLayout/index.d.ts.map +1 -0
- package/lib/components/ConfigurableLayout/index.js +3 -0
- package/lib/components/ConfigurableLayout/index.js.map +1 -0
- package/lib/components/ConfigurableLayout/options.d.ts +10 -0
- package/lib/components/ConfigurableLayout/options.d.ts.map +1 -0
- package/lib/components/ConfigurableLayout/options.js +10 -0
- package/lib/components/ConfigurableLayout/options.js.map +1 -0
- package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts +7 -0
- package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts.map +1 -0
- package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js +37 -0
- package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js.map +1 -0
- package/lib/components/Confirmation/Confirmation.d.ts +19 -0
- package/lib/components/Confirmation/Confirmation.d.ts.map +1 -0
- package/lib/components/Confirmation/Confirmation.js +29 -0
- package/lib/components/Confirmation/Confirmation.js.map +1 -0
- package/lib/components/Confirmation/index.d.ts +3 -0
- package/lib/components/Confirmation/index.d.ts.map +1 -0
- package/lib/components/Confirmation/index.js +2 -0
- package/lib/components/Confirmation/index.js.map +1 -0
- package/lib/components/Details/Details.d.ts +43 -0
- package/lib/components/Details/Details.d.ts.map +1 -0
- package/lib/components/Details/Details.js +95 -0
- package/lib/components/Details/Details.js.map +1 -0
- package/lib/components/Details/Details.styles.d.ts +50 -0
- package/lib/components/Details/Details.styles.d.ts.map +1 -0
- package/lib/components/Details/Details.styles.js +204 -0
- package/lib/components/Details/Details.styles.js.map +1 -0
- package/lib/components/Details/Details.test-ids.d.ts +2 -0
- package/lib/components/Details/Details.test-ids.d.ts.map +1 -0
- package/lib/components/Details/Details.test-ids.js +9 -0
- package/lib/components/Details/Details.test-ids.js.map +1 -0
- package/lib/components/Details/DetailsContext.d.ts +9 -0
- package/lib/components/Details/DetailsContext.d.ts.map +1 -0
- package/lib/components/Details/DetailsContext.js +9 -0
- package/lib/components/Details/DetailsContext.js.map +1 -0
- package/lib/components/Details/index.d.ts +4 -0
- package/lib/components/Details/index.d.ts.map +1 -0
- package/lib/components/Details/index.js +4 -0
- package/lib/components/Details/index.js.map +1 -0
- package/lib/components/Glimpse/Glimpse.d.ts +20 -0
- package/lib/components/Glimpse/Glimpse.d.ts.map +1 -0
- package/lib/components/Glimpse/Glimpse.js +12 -0
- package/lib/components/Glimpse/Glimpse.js.map +1 -0
- package/lib/components/Glimpse/index.d.ts +3 -0
- package/lib/components/Glimpse/index.d.ts.map +1 -0
- package/lib/components/Glimpse/index.js +2 -0
- package/lib/components/Glimpse/index.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts +6 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js +83 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +9 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +199 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +35 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js +2 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -0
- package/lib/components/IntelligentGuidance/index.d.ts +3 -0
- package/lib/components/IntelligentGuidance/index.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/index.js +2 -0
- package/lib/components/IntelligentGuidance/index.js.map +1 -0
- package/lib/components/Predictions/Predictions.d.ts +6 -0
- package/lib/components/Predictions/Predictions.d.ts.map +1 -0
- package/lib/components/Predictions/Predictions.js +68 -0
- package/lib/components/Predictions/Predictions.js.map +1 -0
- package/lib/components/Predictions/Predictions.types.d.ts +23 -0
- package/lib/components/Predictions/Predictions.types.d.ts.map +1 -0
- package/lib/components/Predictions/Predictions.types.js +2 -0
- package/lib/components/Predictions/Predictions.types.js.map +1 -0
- package/lib/components/Predictions/index.d.ts +3 -0
- package/lib/components/Predictions/index.d.ts.map +1 -0
- package/lib/components/Predictions/index.js +2 -0
- package/lib/components/Predictions/index.js.map +1 -0
- package/lib/components/SearchResults/Filter.d.ts +8 -0
- package/lib/components/SearchResults/Filter.d.ts.map +1 -0
- package/lib/components/SearchResults/Filter.js +45 -0
- package/lib/components/SearchResults/Filter.js.map +1 -0
- package/lib/components/SearchResults/SearchResult.d.ts +4 -0
- package/lib/components/SearchResults/SearchResult.d.ts.map +1 -0
- package/lib/components/SearchResults/SearchResult.js +27 -0
- package/lib/components/SearchResults/SearchResult.js.map +1 -0
- package/lib/components/SearchResults/SearchResults.d.ts +6 -0
- package/lib/components/SearchResults/SearchResults.d.ts.map +1 -0
- package/lib/components/SearchResults/SearchResults.js +121 -0
- package/lib/components/SearchResults/SearchResults.js.map +1 -0
- package/lib/components/SearchResults/SearchResults.styles.d.ts +11 -0
- package/lib/components/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/lib/components/SearchResults/SearchResults.styles.js +88 -0
- package/lib/components/SearchResults/SearchResults.styles.js.map +1 -0
- package/lib/components/SearchResults/SearchResults.types.d.ts +100 -0
- package/lib/components/SearchResults/SearchResults.types.d.ts.map +1 -0
- package/lib/components/SearchResults/SearchResults.types.js +2 -0
- package/lib/components/SearchResults/SearchResults.types.js.map +1 -0
- package/lib/components/SearchResults/index.d.ts +3 -0
- package/lib/components/SearchResults/index.d.ts.map +1 -0
- package/lib/components/SearchResults/index.js +2 -0
- package/lib/components/SearchResults/index.js.map +1 -0
- package/lib/components/Stages/StageGlimpse.d.ts +8 -0
- package/lib/components/Stages/StageGlimpse.d.ts.map +1 -0
- package/lib/components/Stages/StageGlimpse.js +11 -0
- package/lib/components/Stages/StageGlimpse.js.map +1 -0
- package/lib/components/Stages/Stages.d.ts +6 -0
- package/lib/components/Stages/Stages.d.ts.map +1 -0
- package/lib/components/Stages/Stages.js +107 -0
- package/lib/components/Stages/Stages.js.map +1 -0
- package/lib/components/Stages/Stages.styles.d.ts +14 -0
- package/lib/components/Stages/Stages.styles.d.ts.map +1 -0
- package/lib/components/Stages/Stages.styles.js +270 -0
- package/lib/components/Stages/Stages.styles.js.map +1 -0
- package/lib/components/Stages/Stages.types.d.ts +38 -0
- package/lib/components/Stages/Stages.types.d.ts.map +1 -0
- package/lib/components/Stages/Stages.types.js +2 -0
- package/lib/components/Stages/Stages.types.js.map +1 -0
- package/lib/components/Stages/index.d.ts +3 -0
- package/lib/components/Stages/index.d.ts.map +1 -0
- package/lib/components/Stages/index.js +2 -0
- package/lib/components/Stages/index.js.map +1 -0
- package/lib/components/Stakeholders/StakeholderForm.d.ts +7 -0
- package/lib/components/Stakeholders/StakeholderForm.d.ts.map +1 -0
- package/lib/components/Stakeholders/StakeholderForm.js +49 -0
- package/lib/components/Stakeholders/StakeholderForm.js.map +1 -0
- package/lib/components/Stakeholders/Stakeholders.d.ts +6 -0
- package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -0
- package/lib/components/Stakeholders/Stakeholders.js +220 -0
- package/lib/components/Stakeholders/Stakeholders.js.map +1 -0
- package/lib/components/Stakeholders/Stakeholders.types.d.ts +75 -0
- package/lib/components/Stakeholders/Stakeholders.types.d.ts.map +1 -0
- package/lib/components/Stakeholders/Stakeholders.types.js +2 -0
- package/lib/components/Stakeholders/Stakeholders.types.js.map +1 -0
- package/lib/components/Stakeholders/index.d.ts +3 -0
- package/lib/components/Stakeholders/index.d.ts.map +1 -0
- package/lib/components/Stakeholders/index.js +2 -0
- package/lib/components/Stakeholders/index.js.map +1 -0
- package/lib/components/Tags/Tags.d.ts +34 -0
- package/lib/components/Tags/Tags.d.ts.map +1 -0
- package/lib/components/Tags/Tags.js +230 -0
- package/lib/components/Tags/Tags.js.map +1 -0
- package/lib/components/Tags/index.d.ts +3 -0
- package/lib/components/Tags/index.d.ts.map +1 -0
- package/lib/components/Tags/index.js +2 -0
- package/lib/components/Tags/index.js.map +1 -0
- package/lib/components/Tasks/TaskList.d.ts +39 -0
- package/lib/components/Tasks/TaskList.d.ts.map +1 -0
- package/lib/components/Tasks/TaskList.js +71 -0
- package/lib/components/Tasks/TaskList.js.map +1 -0
- package/lib/components/Tasks/Tasks.d.ts +29 -0
- package/lib/components/Tasks/Tasks.d.ts.map +1 -0
- package/lib/components/Tasks/Tasks.js +52 -0
- package/lib/components/Tasks/Tasks.js.map +1 -0
- package/lib/components/Tasks/Tasks.test-ids.d.ts +4 -0
- package/lib/components/Tasks/Tasks.test-ids.d.ts.map +1 -0
- package/lib/components/Tasks/Tasks.test-ids.js +5 -0
- package/lib/components/Tasks/Tasks.test-ids.js.map +1 -0
- package/lib/components/Tasks/index.d.ts +4 -0
- package/lib/components/Tasks/index.d.ts.map +1 -0
- package/lib/components/Tasks/index.js +4 -0
- package/lib/components/Tasks/index.js.map +1 -0
- package/lib/components/Timeline/Timeline.d.ts +6 -0
- package/lib/components/Timeline/Timeline.d.ts.map +1 -0
- package/lib/components/Timeline/Timeline.js +26 -0
- package/lib/components/Timeline/Timeline.js.map +1 -0
- package/lib/components/Timeline/Timeline.styles.d.ts +21 -0
- package/lib/components/Timeline/Timeline.styles.d.ts.map +1 -0
- package/lib/components/Timeline/Timeline.styles.js +165 -0
- package/lib/components/Timeline/Timeline.styles.js.map +1 -0
- package/lib/components/Timeline/Timeline.types.d.ts +66 -0
- package/lib/components/Timeline/Timeline.types.d.ts.map +1 -0
- package/lib/components/Timeline/Timeline.types.js +2 -0
- package/lib/components/Timeline/Timeline.types.js.map +1 -0
- package/lib/components/Timeline/TimelineItem.d.ts +13 -0
- package/lib/components/Timeline/TimelineItem.d.ts.map +1 -0
- package/lib/components/Timeline/TimelineItem.js +33 -0
- package/lib/components/Timeline/TimelineItem.js.map +1 -0
- package/lib/components/Timeline/TimelineToolbar.d.ts +6 -0
- package/lib/components/Timeline/TimelineToolbar.d.ts.map +1 -0
- package/lib/components/Timeline/TimelineToolbar.js +68 -0
- package/lib/components/Timeline/TimelineToolbar.js.map +1 -0
- package/lib/components/Timeline/index.d.ts +4 -0
- package/lib/components/Timeline/index.d.ts.map +1 -0
- package/lib/components/Timeline/index.js +3 -0
- package/lib/components/Timeline/index.js.map +1 -0
- package/lib/components/Timeline/utils.d.ts +15 -0
- package/lib/components/Timeline/utils.d.ts.map +1 -0
- package/lib/components/Timeline/utils.js +75 -0
- package/lib/components/Timeline/utils.js.map +1 -0
- package/lib/index.d.ts +37 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +38 -0
- package/lib/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ReactNode, MouseEvent, MouseEventHandler } from 'react';
|
|
2
|
+
import { Tab, NoChildrenProp, FieldValueListItemProps, ForwardProps, MenuItemProps, Action, BaseProps, TestIdProp } from '@pega/cosmos-react-core';
|
|
3
|
+
import type { getCaseViewTestIds } from './CaseView.test-ids';
|
|
4
|
+
export type CaseSummaryFieldsProps = {
|
|
5
|
+
primary?: SummaryField[];
|
|
6
|
+
secondary?: SummaryField[];
|
|
7
|
+
inSummaryPanel?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type SummaryField = {
|
|
10
|
+
name: FieldValueListItemProps['name'];
|
|
11
|
+
value: FieldValueListItemProps['value'];
|
|
12
|
+
simpleValue?: string | number | ReactNode;
|
|
13
|
+
variant?: FieldValueListItemProps['variant'];
|
|
14
|
+
};
|
|
15
|
+
export type UtilitySummaryItem = {
|
|
16
|
+
iconName: string;
|
|
17
|
+
name: string;
|
|
18
|
+
count?: number;
|
|
19
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
20
|
+
};
|
|
21
|
+
export interface CaseViewProps extends NoChildrenProp, BaseProps, TestIdProp {
|
|
22
|
+
/** A unique identifier for the case instance. */
|
|
23
|
+
caseId: string;
|
|
24
|
+
/** Text to quickly identify a case instance. */
|
|
25
|
+
heading: string;
|
|
26
|
+
/** Supplemental text to identify a case instance. */
|
|
27
|
+
subheading?: string;
|
|
28
|
+
/** A set of Link props representing the case parents, rendered as Breadcrumbs. */
|
|
29
|
+
parentCases?: MenuItemProps[];
|
|
30
|
+
/** An icon name to render as a visual in the case view header. */
|
|
31
|
+
icon?: string;
|
|
32
|
+
/** Indicates if the current user is following the case. This should be updated based on onFollowedChange. */
|
|
33
|
+
followed?: boolean;
|
|
34
|
+
/** Called when user chooses to follow or unfollow the case. Use this to update followed. */
|
|
35
|
+
onFollowedChange?: (following: boolean) => void;
|
|
36
|
+
/** Case level actions available in an action menu. */
|
|
37
|
+
actions?: Action[];
|
|
38
|
+
/** Visually promoted case level actions available outside the menu. */
|
|
39
|
+
promotedActions?: Action[];
|
|
40
|
+
/** A callback for when the edit button is clicked */
|
|
41
|
+
onEdit?: () => void;
|
|
42
|
+
/** Field data to render in summary areas. */
|
|
43
|
+
summaryFields: CaseSummaryFieldsProps;
|
|
44
|
+
/**
|
|
45
|
+
* Determines the layout state of the summary region.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
summaryExpanded?: boolean;
|
|
49
|
+
/** Callback to toggle the case summary's layout. */
|
|
50
|
+
onToggleSummary?: () => void;
|
|
51
|
+
/** An object handling the rendering and functionality of the Tabs in CaseSummary. */
|
|
52
|
+
tabs: {
|
|
53
|
+
items: Tab[];
|
|
54
|
+
onClick: (id: string, event?: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
55
|
+
currentTabId: string;
|
|
56
|
+
};
|
|
57
|
+
/** A region within the center column that is controlled by tabs in CaseSummary. */
|
|
58
|
+
tabContent?: {
|
|
59
|
+
content: ReactNode;
|
|
60
|
+
id: string;
|
|
61
|
+
}[];
|
|
62
|
+
/** A region to hold a Stages component. */
|
|
63
|
+
stages?: ReactNode;
|
|
64
|
+
/** A region to hold a Tasks component. */
|
|
65
|
+
tasks?: ReactNode;
|
|
66
|
+
/** A region above the center column to display banners. */
|
|
67
|
+
banners?: ReactNode;
|
|
68
|
+
/** A region to the right reserved for persistent utilities. */
|
|
69
|
+
persistentUtility?: {
|
|
70
|
+
content: ReactNode;
|
|
71
|
+
title: string;
|
|
72
|
+
};
|
|
73
|
+
/** Provide an instance of IntelligentGuidance to be rendered for a case. */
|
|
74
|
+
intelligentGuidance?: ReactNode;
|
|
75
|
+
/** A region for case widgets. */
|
|
76
|
+
utilities?: ReactNode;
|
|
77
|
+
/** An indicator of case widgets when the utilities are collapsed. */
|
|
78
|
+
utilitiesSummaryItems?: UtilitySummaryItem[];
|
|
79
|
+
/**
|
|
80
|
+
* Determines the layout state of the utilities.
|
|
81
|
+
* @default true
|
|
82
|
+
*/
|
|
83
|
+
utilitiesExpanded?: boolean;
|
|
84
|
+
/** Callback to toggle the utilities. */
|
|
85
|
+
onToggleUtilities?: () => void;
|
|
86
|
+
}
|
|
87
|
+
export interface CaseViewContextValue extends Pick<CaseViewProps, 'caseId' | 'heading' | 'subheading' | 'parentCases' | 'icon' | 'followed' | 'onFollowedChange' | 'actions' | 'promotedActions' | 'onEdit' | 'tabs' | 'summaryExpanded' | 'summaryFields' | 'onToggleSummary' | 'utilitiesExpanded' | 'stages' | 'tasks' | 'persistentUtility' | 'intelligentGuidance'> {
|
|
88
|
+
testIds: Partial<ReturnType<typeof getCaseViewTestIds>>;
|
|
89
|
+
aboveSM: boolean;
|
|
90
|
+
aboveMD: boolean;
|
|
91
|
+
aboveLG: boolean;
|
|
92
|
+
aboveXL: boolean;
|
|
93
|
+
isPreview: boolean;
|
|
94
|
+
caseLink?: {
|
|
95
|
+
href: string;
|
|
96
|
+
} & ForwardProps;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=CaseView.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseView.types.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EACL,GAAG,EACH,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,aAAa,EACb,MAAM,EACN,SAAS,EACT,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,OAAO,CAAC,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,iBAAiB,CAA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A0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE;QAAE,OAAO,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAE1D,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAEhC,iCAAiC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,qEAAqE;IACrE,qBAAqB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAE7C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAOhC;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CACV,aAAa,EACX,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,aAAa,GACb,MAAM,GACN,UAAU,GACV,kBAAkB,GAClB,SAAS,GACT,iBAAiB,GACjB,QAAQ,GACR,MAAM,GACN,iBAAiB,GACjB,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,QAAQ,GACR,OAAO,GACP,mBAAmB,GACnB,qBAAqB,CACxB;IACD,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,YAAY,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseView.types.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode, MouseEvent, MouseEventHandler } from 'react';\n\nimport {\n Tab,\n NoChildrenProp,\n FieldValueListItemProps,\n ForwardProps,\n MenuItemProps,\n Action,\n BaseProps,\n TestIdProp\n} from '@pega/cosmos-react-core';\n\nimport type { getCaseViewTestIds } from './CaseView.test-ids';\n\nexport type CaseSummaryFieldsProps = {\n primary?: SummaryField[];\n secondary?: SummaryField[];\n inSummaryPanel?: boolean;\n};\n\nexport type SummaryField = {\n name: FieldValueListItemProps['name'];\n value: FieldValueListItemProps['value'];\n simpleValue?: string | number | ReactNode;\n variant?: FieldValueListItemProps['variant'];\n};\n\nexport type UtilitySummaryItem = {\n iconName: string;\n name: string;\n count?: number;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n};\n\nexport interface CaseViewProps extends NoChildrenProp, BaseProps, TestIdProp {\n /** A unique identifier for the case instance. */\n caseId: string;\n\n /** Text to quickly identify a case instance. */\n heading: string;\n\n /** Supplemental text to identify a case instance. */\n subheading?: string;\n\n /** @internal */\n caseLink?: CaseViewContextValue['caseLink'];\n\n /** A set of Link props representing the case parents, rendered as Breadcrumbs. */\n parentCases?: MenuItemProps[];\n\n /** An icon name to render as a visual in the case view header. */\n icon?: string;\n\n /** Indicates if the current user is following the case. This should be updated based on onFollowedChange. */\n followed?: boolean;\n\n /** Called when user chooses to follow or unfollow the case. Use this to update followed. */\n onFollowedChange?: (following: boolean) => void;\n\n /** Case level actions available in an action menu. */\n actions?: Action[];\n\n /** Visually promoted case level actions available outside the menu. */\n promotedActions?: Action[];\n\n /** A callback for when the edit button is clicked */\n onEdit?: () => void;\n\n /** Field data to render in summary areas. */\n summaryFields: CaseSummaryFieldsProps;\n\n /**\n * Determines the layout state of the summary region.\n * @default true\n */\n summaryExpanded?: boolean;\n\n /** Callback to toggle the case summary's layout. */\n onToggleSummary?: () => void;\n\n /** An object handling the rendering and functionality of the Tabs in CaseSummary. */\n tabs: {\n items: Tab[];\n onClick: (id: string, event?: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;\n currentTabId: string;\n };\n\n /** A region within the center column that is controlled by tabs in CaseSummary. */\n tabContent?: { content: ReactNode; id: string }[];\n\n /** A region to hold a Stages component. */\n stages?: ReactNode;\n\n /** A region to hold a Tasks component. */\n tasks?: ReactNode;\n\n /** A region above the center column to display banners. */\n banners?: ReactNode;\n\n /** A region to the right reserved for persistent utilities. */\n persistentUtility?: { content: ReactNode; title: string };\n\n /** Provide an instance of IntelligentGuidance to be rendered for a case. */\n intelligentGuidance?: ReactNode;\n\n /** A region for case widgets. */\n utilities?: ReactNode;\n\n /** An indicator of case widgets when the utilities are collapsed. */\n utilitiesSummaryItems?: UtilitySummaryItem[];\n\n /**\n * Determines the layout state of the utilities.\n * @default true\n */\n utilitiesExpanded?: boolean;\n\n /** Callback to toggle the utilities. */\n onToggleUtilities?: () => void;\n\n /**\n * Indicates CaseView is rendered within a CasePreview.\n * @internal\n */\n isPreview?: boolean;\n}\n\nexport interface CaseViewContextValue\n extends Pick<\n CaseViewProps,\n | 'caseId'\n | 'heading'\n | 'subheading'\n | 'parentCases'\n | 'icon'\n | 'followed'\n | 'onFollowedChange'\n | 'actions'\n | 'promotedActions'\n | 'onEdit'\n | 'tabs'\n | 'summaryExpanded'\n | 'summaryFields'\n | 'onToggleSummary'\n | 'utilitiesExpanded'\n | 'stages'\n | 'tasks'\n | 'persistentUtility'\n | 'intelligentGuidance'\n > {\n testIds: Partial<ReturnType<typeof getCaseViewTestIds>>;\n aboveSM: boolean;\n aboveMD: boolean;\n aboveLG: boolean;\n aboveXL: boolean;\n isPreview: boolean;\n caseLink?: { href: string } & ForwardProps;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { CaseViewProps } from './CaseView.types';
|
|
3
|
+
export interface UtilitiesSummaryProps {
|
|
4
|
+
items?: CaseViewProps['utilitiesSummaryItems'];
|
|
5
|
+
}
|
|
6
|
+
export declare const StyledUtilitiesSummary: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
declare const UtilitiesSummary: FunctionComponent<UtilitiesSummaryProps>;
|
|
8
|
+
export default UtilitiesSummary;
|
|
9
|
+
//# sourceMappingURL=UtilitiesSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UtilitiesSummary.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAe1C,OAAO,EAAE,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;CAChD;AAED,eAAO,MAAM,sBAAsB,yGAIjC,CAAC;AAkEH,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,CAe9D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { Button, Card, Count, Flex, Icon, Tooltip, useI18n, VisuallyHiddenText, useElement } from '@pega/cosmos-react-core';
|
|
5
|
+
export const StyledUtilitiesSummary = styled.div(() => {
|
|
6
|
+
return css `
|
|
7
|
+
width: 2.75rem;
|
|
8
|
+
`;
|
|
9
|
+
});
|
|
10
|
+
const StyledUtilitySummaryButton = styled(Button)(({ theme }) => css `
|
|
11
|
+
padding-block: ${theme.base.spacing};
|
|
12
|
+
padding-inline: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
color: currentColor;
|
|
15
|
+
border-radius: unset;
|
|
16
|
+
border: none;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
color: currentColor;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:focus {
|
|
23
|
+
z-index: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:first-child {
|
|
27
|
+
border-start-start-radius: inherit;
|
|
28
|
+
border-start-end-radius: inherit;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:last-child {
|
|
32
|
+
border-end-start-radius: inherit;
|
|
33
|
+
border-end-end-radius: inherit;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& + & {
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
`);
|
|
40
|
+
const UtilitySummary = ({ name, iconName, count, onClick }) => {
|
|
41
|
+
const [utilSummaryTooltip, setUtilSummaryTooltip] = useElement();
|
|
42
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Flex, { container: {
|
|
43
|
+
direction: 'column',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
gap: 0.5
|
|
46
|
+
}, onClick: onClick, ref: setUtilSummaryTooltip, as: StyledUtilitySummaryButton, children: [_jsx(Icon, { name: iconName }), count !== undefined && _jsx(Count, { "aria-hidden": true, children: count }), _jsx(VisuallyHiddenText, { role: 'listitem', children: `${count ?? ''} ${name}` })] }), _jsx(Tooltip, { target: utilSummaryTooltip, showDelay: 'none', hideDelay: 'none', children: name })] }));
|
|
47
|
+
};
|
|
48
|
+
const UtilitiesSummary = ({ items = [] }) => {
|
|
49
|
+
const t = useI18n();
|
|
50
|
+
return (_jsx(Card, { container: { direction: 'column', alignItems: 'center' }, as: StyledUtilitiesSummary, "aria-label": t('utilities_summary'), role: 'list', children: items.map(item => (_createElement(UtilitySummary, { ...item, key: item.iconName }))) }));
|
|
51
|
+
};
|
|
52
|
+
export default UtilitiesSummary;
|
|
53
|
+
//# sourceMappingURL=UtilitiesSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UtilitiesSummary.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"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AS,EAAC,MAAM,YACnE,IAAI,GACG,IACT,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAA6C,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,EAAE;IACpF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EACxD,EAAE,EAAE,sBAAsB,gBACd,CAAC,CAAC,mBAAmB,CAAC,EAClC,IAAI,EAAC,MAAM,YAEV,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACjB,eAAC,cAAc,OAAK,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,GAAI,CACjD,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n Count,\n Flex,\n Icon,\n Tooltip,\n useI18n,\n VisuallyHiddenText,\n useElement\n} from '@pega/cosmos-react-core';\n\nimport { CaseViewProps, UtilitySummaryItem } from './CaseView.types';\n\nexport interface UtilitiesSummaryProps {\n items?: CaseViewProps['utilitiesSummaryItems'];\n}\n\nexport const StyledUtilitiesSummary = styled.div(() => {\n return css`\n width: 2.75rem;\n `;\n});\n\nconst StyledUtilitySummaryButton = styled(Button)(\n ({ theme }) => css`\n padding-block: ${theme.base.spacing};\n padding-inline: 0;\n width: 100%;\n color: currentColor;\n border-radius: unset;\n border: none;\n\n &:hover {\n color: currentColor;\n }\n\n &:focus {\n z-index: 1;\n }\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n\n & + & {\n margin: 0;\n }\n `\n);\n\nconst UtilitySummary: FunctionComponent<UtilitySummaryItem> = ({\n name,\n iconName,\n count,\n onClick\n}) => {\n const [utilSummaryTooltip, setUtilSummaryTooltip] = useElement<HTMLElement>();\n return (\n <>\n <Flex\n container={{\n direction: 'column',\n alignItems: 'center',\n gap: 0.5\n }}\n onClick={onClick}\n ref={setUtilSummaryTooltip}\n as={StyledUtilitySummaryButton}\n >\n <Icon name={iconName} />\n {count !== undefined && <Count aria-hidden>{count}</Count>}\n <VisuallyHiddenText role='listitem'>{`${count ?? ''} ${name}`}</VisuallyHiddenText>\n </Flex>\n\n <Tooltip target={utilSummaryTooltip} showDelay='none' hideDelay='none'>\n {name}\n </Tooltip>\n </>\n );\n};\n\nconst UtilitiesSummary: FunctionComponent<UtilitiesSummaryProps> = ({ items = [] }) => {\n const t = useI18n();\n\n return (\n <Card\n container={{ direction: 'column', alignItems: 'center' }}\n as={StyledUtilitiesSummary}\n aria-label={t('utilities_summary')}\n role='list'\n >\n {items.map(item => (\n <UtilitySummary {...item} key={item.iconName} />\n ))}\n </Card>\n );\n};\n\nexport default UtilitiesSummary;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WithAttributes } from '@pega/cosmos-react-core';
|
|
2
|
+
import type { BaseDialogProps } from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.types';
|
|
3
|
+
type UtilitySummaryItemDialogProps = WithAttributes<'div', {
|
|
4
|
+
target: BaseDialogProps['target'];
|
|
5
|
+
onDismiss?: () => void;
|
|
6
|
+
}>;
|
|
7
|
+
declare const UtilitySummaryItemDialog: import("react").ForwardRefExoticComponent<Omit<UtilitySummaryItemDialogProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default UtilitySummaryItemDialog;
|
|
9
|
+
//# sourceMappingURL=UtilitySummaryItemDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UtilitySummaryItemDialog.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitySummaryItemDialog.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAC;AAQlG,KAAK,6BAA6B,GAAG,cAAc,CACjD,KAAK,EACL;IACE,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CACF,CAAC;AAEF,QAAA,MAAM,wBAAwB,uIAmC5B,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useEffect } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { defaultThemeProp, getFocusables, useConsolidatedRef, useDirection, useFocusTrap, useEscape, useOuterEvent } from '@pega/cosmos-react-core';
|
|
5
|
+
import Dialog from '@pega/cosmos-react-core/lib/components/Dialog/Dialog';
|
|
6
|
+
const StyledUtilitySummaryItemDialog = styled(Dialog) `
|
|
7
|
+
width: 25rem;
|
|
8
|
+
`;
|
|
9
|
+
StyledUtilitySummaryItemDialog.defaultProps = defaultThemeProp;
|
|
10
|
+
const UtilitySummaryItemDialog = forwardRef(function UtilitySummaryItemDialog({ children, target, onDismiss }, ref) {
|
|
11
|
+
const dialogRef = useConsolidatedRef(ref);
|
|
12
|
+
useOuterEvent('mousedown', [dialogRef], () => {
|
|
13
|
+
onDismiss?.();
|
|
14
|
+
target.focus();
|
|
15
|
+
});
|
|
16
|
+
useEscape(() => {
|
|
17
|
+
onDismiss?.();
|
|
18
|
+
target.focus();
|
|
19
|
+
}, dialogRef);
|
|
20
|
+
useFocusTrap(dialogRef, false);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const focusables = getFocusables(dialogRef);
|
|
23
|
+
focusables[0]?.focus();
|
|
24
|
+
}, []);
|
|
25
|
+
const { start } = useDirection();
|
|
26
|
+
return (_jsx(StyledUtilitySummaryItemDialog, { ref: dialogRef, target: target, arrow: true, placement: `${start}-start`, children: children }));
|
|
27
|
+
});
|
|
28
|
+
export default UtilitySummaryItemDialog;
|
|
29
|
+
//# sourceMappingURL=UtilitySummaryItemDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UtilitySummaryItemDialog.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitySummaryItemDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,MAAM,MAAM,sDAAsD,CAAC;AAG1E,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;CAEpD,CAAC;AAEF,8BAA8B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAU/D,MAAM,wBAAwB,GAAG,UAAU,CAGzC,SAAS,wBAAwB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,GAAG;IACtE,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE1C,aAAa,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE;QAC3C,SAAS,EAAE,EAAE,CAAC;QACd,MAAM,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,EAAE,EAAE,CAAC;QACd,MAAM,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC,EAAE,SAAS,CAAC,CAAC;IAEd,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAE/B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;QAC5C,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEjC,OAAO,CACL,KAAC,8BAA8B,IAC7B,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,MAAM,EACd,KAAK,QACL,SAAS,EAAE,GAAG,KAAK,QAAQ,YAE1B,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,wBAAwB,CAAC","sourcesContent":["import { forwardRef, useEffect } from 'react';\nimport type { PropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport {\n defaultThemeProp,\n getFocusables,\n useConsolidatedRef,\n useDirection,\n useFocusTrap,\n useEscape,\n useOuterEvent\n} from '@pega/cosmos-react-core';\nimport type { RefElement, WithAttributes } from '@pega/cosmos-react-core';\nimport Dialog from '@pega/cosmos-react-core/lib/components/Dialog/Dialog';\nimport type { BaseDialogProps } from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.types';\n\nconst StyledUtilitySummaryItemDialog = styled(Dialog)`\n width: 25rem;\n`;\n\nStyledUtilitySummaryItemDialog.defaultProps = defaultThemeProp;\n\ntype UtilitySummaryItemDialogProps = WithAttributes<\n 'div',\n {\n target: BaseDialogProps['target'];\n onDismiss?: () => void;\n }\n>;\n\nconst UtilitySummaryItemDialog = forwardRef<\n RefElement<UtilitySummaryItemDialogProps>,\n PropsWithoutRef<UtilitySummaryItemDialogProps>\n>(function UtilitySummaryItemDialog({ children, target, onDismiss }, ref) {\n const dialogRef = useConsolidatedRef(ref);\n\n useOuterEvent('mousedown', [dialogRef], () => {\n onDismiss?.();\n target.focus();\n });\n\n useEscape(() => {\n onDismiss?.();\n target.focus();\n }, dialogRef);\n\n useFocusTrap(dialogRef, false);\n\n useEffect(() => {\n const focusables = getFocusables(dialogRef);\n focusables[0]?.focus();\n }, []);\n\n const { start } = useDirection();\n\n return (\n <StyledUtilitySummaryItemDialog\n ref={dialogRef}\n target={target}\n arrow\n placement={`${start}-start`}\n >\n {children}\n </StyledUtilitySummaryItemDialog>\n );\n});\n\nexport default UtilitySummaryItemDialog;\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default } from './CaseView';
|
|
2
|
+
export type { CaseViewProps } from './CaseView.types';
|
|
3
|
+
export { StyledCaseView, StyledWorkArea as StyledCaseViewContent, StyledCaseDrawer, StyledCaseDrawerContent, StyledSummary as StyledSummaryRegion } from './CaseView.styles';
|
|
4
|
+
export { default as UtilitySummaryItemDialog } from './UtilitySummaryItemDialog';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,cAAc,IAAI,qBAAqB,EACvC,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,IAAI,mBAAmB,EACrC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default } from './CaseView';
|
|
2
|
+
export { StyledCaseView, StyledWorkArea as StyledCaseViewContent, StyledCaseDrawer, StyledCaseDrawerContent, StyledSummary as StyledSummaryRegion } from './CaseView.styles';
|
|
3
|
+
export { default as UtilitySummaryItemDialog } from './UtilitySummaryItemDialog';
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CaseView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EACL,cAAc,EACd,cAAc,IAAI,qBAAqB,EACvC,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,IAAI,mBAAmB,EACrC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export { default } from './CaseView';\nexport type { CaseViewProps } from './CaseView.types';\nexport {\n StyledCaseView,\n StyledWorkArea as StyledCaseViewContent,\n StyledCaseDrawer,\n StyledCaseDrawerContent,\n StyledSummary as StyledSummaryRegion\n} from './CaseView.styles';\nexport { default as UtilitySummaryItemDialog } from './UtilitySummaryItemDialog';\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConfigurableLayoutProps } from './ConfigurableLayout.types';
|
|
2
|
+
declare const ConfigurableLayout: import("react").ForwardRefExoticComponent<ConfigurableLayoutProps & import("react").RefAttributes<HTMLElement>>;
|
|
3
|
+
export default ConfigurableLayout;
|
|
4
|
+
//# sourceMappingURL=ConfigurableLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/ConfigurableLayout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AA+B1E,QAAA,MAAM,kBAAkB,iHA+EtB,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useRef, useMemo } from 'react';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { Flex, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
5
|
+
import { containerMinWidth, cellGap } from './defaults';
|
|
6
|
+
import LayoutCell from './LayoutCell';
|
|
7
|
+
const StyledConfigurableLayout = styled.div(() => {
|
|
8
|
+
return css `
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
`;
|
|
11
|
+
});
|
|
12
|
+
const StyledCellGrid = styled.div(({ theme }) => {
|
|
13
|
+
return css `
|
|
14
|
+
/* Note: inset position used to negate "column" inline margin on items */
|
|
15
|
+
position: relative;
|
|
16
|
+
width: calc(100% + ${cellGap * 2} * ${theme.base.spacing});
|
|
17
|
+
max-width: calc(100% + ${cellGap * 2} * ${theme.base.spacing});
|
|
18
|
+
inset-inline: calc(-${cellGap} * ${theme.base.spacing});
|
|
19
|
+
margin-block-end: calc(-2 * ${cellGap} * ${theme.base.spacing});
|
|
20
|
+
`;
|
|
21
|
+
});
|
|
22
|
+
StyledCellGrid.defaultProps = defaultThemeProp;
|
|
23
|
+
const StyledContainerRuler = styled.div(({ theme }) => {
|
|
24
|
+
return css `
|
|
25
|
+
margin-inline: calc(${cellGap} * ${theme.base.spacing});
|
|
26
|
+
width: calc(100% - ${cellGap * 2} * ${theme.base.spacing});
|
|
27
|
+
`;
|
|
28
|
+
});
|
|
29
|
+
StyledContainerRuler.defaultProps = defaultThemeProp;
|
|
30
|
+
const ConfigurableLayout = forwardRef(function ConfigurableLayout({ items, arrangement }, ref) {
|
|
31
|
+
const containerRulerRef = useRef(null);
|
|
32
|
+
const renderMode = useMemo(() => {
|
|
33
|
+
const activeArrangement = arrangement?.hasWrapped !== undefined && !arrangement.hasWrapped;
|
|
34
|
+
if (activeArrangement) {
|
|
35
|
+
switch (arrangement.size) {
|
|
36
|
+
case 'main':
|
|
37
|
+
return 'direct';
|
|
38
|
+
case 'half':
|
|
39
|
+
return 'double';
|
|
40
|
+
case 'narrow':
|
|
41
|
+
return 'full';
|
|
42
|
+
default:
|
|
43
|
+
return 'direct';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// Use direct by default
|
|
47
|
+
return 'direct';
|
|
48
|
+
}, [arrangement]);
|
|
49
|
+
const content = useMemo(() => {
|
|
50
|
+
if (items && !!items.length) {
|
|
51
|
+
return items.map(itemConfig => {
|
|
52
|
+
const config = {
|
|
53
|
+
...itemConfig,
|
|
54
|
+
layoutConfig: { ...itemConfig.layoutConfig }
|
|
55
|
+
};
|
|
56
|
+
if (renderMode !== 'direct') {
|
|
57
|
+
switch (renderMode) {
|
|
58
|
+
case 'double': {
|
|
59
|
+
const doubleWidth = {
|
|
60
|
+
'1/4': '1/2',
|
|
61
|
+
'1/3': '2/3',
|
|
62
|
+
'1/2': 'full',
|
|
63
|
+
'2/3': 'full',
|
|
64
|
+
'3/4': 'full',
|
|
65
|
+
full: 'full'
|
|
66
|
+
};
|
|
67
|
+
config.layoutConfig.width = doubleWidth[config.layoutConfig.width];
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 'full':
|
|
71
|
+
config.layoutConfig.width = 'full';
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
config.layoutConfig.width = 'full';
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return _jsx(LayoutCell, { config: config }, `${itemConfig.id}`);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}, [items, renderMode]);
|
|
83
|
+
return (_jsx(StyledConfigurableLayout, { children: _jsxs(Flex, { as: StyledCellGrid, container: { wrap: 'wrap', justify: 'stretch', alignItems: 'stretch' }, item: { basis: containerMinWidth, grow: 1 }, ref: ref, children: [_jsx(StyledContainerRuler, { ref: containerRulerRef }), content] }) }));
|
|
84
|
+
});
|
|
85
|
+
export default ConfigurableLayout;
|
|
86
|
+
//# sourceMappingURL=ConfigurableLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/ConfigurableLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,EAAE,OA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AAK,GAAG,MAAM,CAAC;4BACnC,MAAM;wBACR;4BACE,MAAM,CAAC,YAAY,CAAC,KAAK,GAAG,MAAM,CAAC;4BACnC,MAAM;qBACT;iBACF;gBAED,OAAO,KAAC,UAAU,IAA0B,MAAM,EAAE,MAAM,IAAlC,GAAG,UAAU,CAAC,EAAE,EAAE,CAAoB,CAAC;YACjE,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAExB,OAAO,CACL,KAAC,wBAAwB,cACvB,MAAC,IAAI,IACH,EAAE,EAAE,cAAc,EAClB,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,EACtE,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,EAAE,EAC3C,GAAG,EAAE,GAAG,aAER,KAAC,oBAAoB,IAAC,GAAG,EAAE,iBAAiB,GAAI,EAC/C,OAAO,IACH,GACkB,CAC5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, Ref, useRef, useMemo } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Flex, defaultThemeProp } from '@pega/cosmos-react-core';\n\nimport type { ConfigurableLayoutProps } from './ConfigurableLayout.types';\nimport { containerMinWidth, cellGap } from './defaults';\nimport widthConfigOptions from './options';\nimport LayoutCell from './LayoutCell';\n\nconst StyledConfigurableLayout = styled.div(() => {\n return css`\n overflow: hidden;\n `;\n});\n\nconst StyledCellGrid = styled.div(({ theme }) => {\n return css`\n /* Note: inset position used to negate \"column\" inline margin on items */\n position: relative;\n width: calc(100% + ${cellGap * 2} * ${theme.base.spacing});\n max-width: calc(100% + ${cellGap * 2} * ${theme.base.spacing});\n inset-inline: calc(-${cellGap} * ${theme.base.spacing});\n margin-block-end: calc(-2 * ${cellGap} * ${theme.base.spacing});\n `;\n});\nStyledCellGrid.defaultProps = defaultThemeProp;\n\nconst StyledContainerRuler = styled.div(({ theme }) => {\n return css`\n margin-inline: calc(${cellGap} * ${theme.base.spacing});\n width: calc(100% - ${cellGap * 2} * ${theme.base.spacing});\n `;\n});\nStyledContainerRuler.defaultProps = defaultThemeProp;\n\nconst ConfigurableLayout = forwardRef(function ConfigurableLayout(\n { items, arrangement }: PropsWithoutRef<ConfigurableLayoutProps>,\n ref: Ref<HTMLElement>\n) {\n const containerRulerRef = useRef<HTMLDivElement>(null);\n\n const renderMode = useMemo(() => {\n const activeArrangement = arrangement?.hasWrapped !== undefined && !arrangement.hasWrapped;\n\n if (activeArrangement) {\n switch (arrangement.size) {\n case 'main':\n return 'direct';\n case 'half':\n return 'double';\n case 'narrow':\n return 'full';\n default:\n return 'direct';\n }\n }\n\n // Use direct by default\n return 'direct';\n }, [arrangement]);\n\n const content = useMemo(() => {\n if (items && !!items.length) {\n return items.map(itemConfig => {\n const config = {\n ...itemConfig,\n layoutConfig: { ...itemConfig.layoutConfig }\n };\n\n if (renderMode !== 'direct') {\n switch (renderMode) {\n case 'double': {\n const doubleWidth: { [key: string]: keyof typeof widthConfigOptions } = {\n '1/4': '1/2',\n '1/3': '2/3',\n '1/2': 'full',\n '2/3': 'full',\n '3/4': 'full',\n full: 'full'\n };\n\n config.layoutConfig.width = doubleWidth[config.layoutConfig.width];\n\n break;\n }\n case 'full':\n config.layoutConfig.width = 'full';\n break;\n default:\n config.layoutConfig.width = 'full';\n break;\n }\n }\n\n return <LayoutCell key={`${itemConfig.id}`} config={config} />;\n });\n }\n\n return null;\n }, [items, renderMode]);\n\n return (\n <StyledConfigurableLayout>\n <Flex\n as={StyledCellGrid}\n container={{ wrap: 'wrap', justify: 'stretch', alignItems: 'stretch' }}\n item={{ basis: containerMinWidth, grow: 1 }}\n ref={ref}\n >\n <StyledContainerRuler ref={containerRulerRef} />\n {content}\n </Flex>\n </StyledConfigurableLayout>\n );\n});\n\nexport default ConfigurableLayout;\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type widthConfigOptions from './options';
|
|
2
|
+
/** Type for config of a single ConfigurableLayout item. */
|
|
3
|
+
export interface Config {
|
|
4
|
+
/** Unique identifier in render region */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Element to render */
|
|
7
|
+
content: JSX.Element;
|
|
8
|
+
/** Config for element */
|
|
9
|
+
layoutConfig: {
|
|
10
|
+
/** Responsive width option */
|
|
11
|
+
width: keyof typeof widthConfigOptions;
|
|
12
|
+
/**
|
|
13
|
+
* Fills remaining space if true, else does not grow beyond `width` value.
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
fillAvailable?: boolean;
|
|
17
|
+
/** Flex basis (minimum fixed width) of element as:
|
|
18
|
+
* - a numeric value to be applied in __pixels__
|
|
19
|
+
* - a tuple of a numeric value and string unit
|
|
20
|
+
*/
|
|
21
|
+
minWidth?: number | [number, 'px' | 'ch' | 'rem' | 'em'];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface ConfigurableLayoutProps {
|
|
25
|
+
/** Array of configs for individual layout cells */
|
|
26
|
+
items: Config[];
|
|
27
|
+
/** Arrangement properties */
|
|
28
|
+
arrangement?: {
|
|
29
|
+
/** Defines the arrangement size of the given ConfigurableLayout.
|
|
30
|
+
* Used to determine what width to apply to the given item when the arrangement is applied,
|
|
31
|
+
* with the following mapping:
|
|
32
|
+
* - 'narrow' --> applies 'full' width
|
|
33
|
+
* - 'main' --> applies configured width
|
|
34
|
+
* - 'half' --> applies double the configured width, or 'full' width (whichever is smaller)
|
|
35
|
+
*/
|
|
36
|
+
size: 'narrow' | 'main' | 'half';
|
|
37
|
+
/** Indicates when the ConfigurableLayout has wrapped to the full width of it's container */
|
|
38
|
+
hasWrapped: boolean;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=ConfigurableLayout.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.types.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/ConfigurableLayout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,WAAW,CAAC;AAEhD,2DAA2D;AAC3D,MAAM,WAAW,MAAM;IACrB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC;IACrB,yBAAyB;IACzB,YAAY,EAAE;QACZ,8BAA8B;QAC9B,KAAK,EAAE,MAAM,OAAO,kBAAkB,CAAC;QACvC;;;WAGG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC;KAC1D,CAAC;CACH;AAED,MAAM,WAAW,uBAAuB;IACtC,mDAAmD;IACnD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,6BAA6B;IAC7B,WAAW,CAAC,EAAE;QACZ;;;;;;WAMG;QACH,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;QACjC,4FAA4F;QAC5F,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.types.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/ConfigurableLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type widthConfigOptions from './options';\n\n/** Type for config of a single ConfigurableLayout item. */\nexport interface Config {\n /** Unique identifier in render region */\n id: string;\n /** Element to render */\n content: JSX.Element;\n /** Config for element */\n layoutConfig: {\n /** Responsive width option */\n width: keyof typeof widthConfigOptions;\n /**\n * Fills remaining space if true, else does not grow beyond `width` value.\n * @default true\n */\n fillAvailable?: boolean;\n /** Flex basis (minimum fixed width) of element as:\n * - a numeric value to be applied in __pixels__\n * - a tuple of a numeric value and string unit\n */\n minWidth?: number | [number, 'px' | 'ch' | 'rem' | 'em'];\n };\n}\n\nexport interface ConfigurableLayoutProps {\n /** Array of configs for individual layout cells */\n items: Config[];\n /** Arrangement properties */\n arrangement?: {\n /** Defines the arrangement size of the given ConfigurableLayout.\n * Used to determine what width to apply to the given item when the arrangement is applied,\n * with the following mapping:\n * - 'narrow' --> applies 'full' width\n * - 'main' --> applies configured width\n * - 'half' --> applies double the configured width, or 'full' width (whichever is smaller)\n */\n size: 'narrow' | 'main' | 'half';\n /** Indicates when the ConfigurableLayout has wrapped to the full width of it's container */\n hasWrapped: boolean;\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutCell.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/LayoutCell.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAoDzD,QAAA,MAAM,UAAU;YAA0B,MAAM;wBAoC/C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { Flex, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
5
|
+
import { StyledAppAnnouncement } from '../AppAnnouncement/AppAnnouncement';
|
|
6
|
+
import widthConfigOptions from './options';
|
|
7
|
+
import { itemMinWidth, cellGap } from './defaults';
|
|
8
|
+
const StyledCell = styled.div(({ fillAvailable = true, percentageWidth, minWidth, theme }) => {
|
|
9
|
+
return css `
|
|
10
|
+
/* variables */
|
|
11
|
+
--marginGap: calc(${cellGap} * ${theme.base.spacing});
|
|
12
|
+
--totalMargin: calc(2 * var(--marginGap));
|
|
13
|
+
--percentageBasis: calc(${percentageWidth} - var(--totalMargin));
|
|
14
|
+
--maxWidth: calc(100% - var(--totalMargin));
|
|
15
|
+
|
|
16
|
+
/* styles */
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
flex-basis: var(--percentageBasis);
|
|
19
|
+
min-width: min(var(--maxWidth), ${minWidth || itemMinWidth});
|
|
20
|
+
max-width: var(--maxWidth);
|
|
21
|
+
margin-block-end: var(--totalMargin);
|
|
22
|
+
margin-inline: var(--marginGap);
|
|
23
|
+
|
|
24
|
+
${!fillAvailable &&
|
|
25
|
+
css `
|
|
26
|
+
flex-grow: 0;
|
|
27
|
+
`}
|
|
28
|
+
|
|
29
|
+
${StyledAppAnnouncement} {
|
|
30
|
+
align-self: stretch;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> * {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: auto;
|
|
36
|
+
overflow-x: auto;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
});
|
|
40
|
+
StyledCell.defaultProps = defaultThemeProp;
|
|
41
|
+
const validWidthUnits = ['px', 'ch', 'rem', 'em'];
|
|
42
|
+
const LayoutCell = ({ config }) => {
|
|
43
|
+
const layoutConfig = useMemo(() => config.layoutConfig, [config]);
|
|
44
|
+
const percentageWidth = useMemo(() => {
|
|
45
|
+
return widthConfigOptions[layoutConfig.width] || '100%';
|
|
46
|
+
}, [layoutConfig.width]);
|
|
47
|
+
const minWidth = useMemo(() => {
|
|
48
|
+
const value = layoutConfig.minWidth;
|
|
49
|
+
if (typeof value === 'number') {
|
|
50
|
+
return `${value}px`;
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(value) &&
|
|
53
|
+
value.length >= 2 &&
|
|
54
|
+
typeof value[0] === 'number' &&
|
|
55
|
+
validWidthUnits.includes(value[1])) {
|
|
56
|
+
return `${value[0]}${value[1]}`;
|
|
57
|
+
}
|
|
58
|
+
}, [layoutConfig.minWidth]);
|
|
59
|
+
return config?.content ? (_jsx(Flex, { as: StyledCell, item: {
|
|
60
|
+
grow: 1
|
|
61
|
+
}, container: { justify: 'stretch', alignItems: 'start' }, fillAvailable: layoutConfig.fillAvailable, percentageWidth: percentageWidth, minWidth: minWidth, children: config.content })) : null;
|
|
62
|
+
};
|
|
63
|
+
export default LayoutCell;
|
|
64
|
+
//# sourceMappingURL=LayoutCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutCell.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/LayoutCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,OAAO,kBAAkB,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAC3B,CAAC,EACC,aAAa,GAAG,IAAI,EACpB,eAAe,EACf,QAAQ,EACR,KAAK,EAMN,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;0BAEY,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO;;gCAEzB,eAAe;;;;;;wCAMP,QAAQ,IAAI,YAAY;;;;;QAKxD,CAAC,aAAa;QAChB,GAAG,CAAA;;OAEF;;QAEC,qBAAqB;;;;;;;;;KASxB,CAAC;AACJ,CAAC,CACF,CAAC;AACF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAElD,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAsB,EAAE,EAAE;IACpD,MAA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from 'react';\nimport styled, { css, DefaultTheme } from 'styled-components';\n\nimport { Flex, defaultThemeProp } from '@pega/cosmos-react-core';\n\nimport { StyledAppAnnouncement } from '../AppAnnouncement/AppAnnouncement';\n\nimport type { Config } from './ConfigurableLayout.types';\nimport widthConfigOptions from './options';\nimport { itemMinWidth, cellGap } from './defaults';\n\nconst StyledCell = styled.div(\n ({\n fillAvailable = true,\n percentageWidth,\n minWidth,\n theme\n }: {\n fillAvailable: boolean;\n percentageWidth?: string;\n minWidth?: string | undefined;\n theme: DefaultTheme;\n }) => {\n return css`\n /* variables */\n --marginGap: calc(${cellGap} * ${theme.base.spacing});\n --totalMargin: calc(2 * var(--marginGap));\n --percentageBasis: calc(${percentageWidth} - var(--totalMargin));\n --maxWidth: calc(100% - var(--totalMargin));\n\n /* styles */\n flex-wrap: wrap;\n flex-basis: var(--percentageBasis);\n min-width: min(var(--maxWidth), ${minWidth || itemMinWidth});\n max-width: var(--maxWidth);\n margin-block-end: var(--totalMargin);\n margin-inline: var(--marginGap);\n\n ${!fillAvailable &&\n css`\n flex-grow: 0;\n `}\n\n ${StyledAppAnnouncement} {\n align-self: stretch;\n }\n\n > * {\n width: 100%;\n height: auto;\n overflow-x: auto;\n }\n `;\n }\n);\nStyledCell.defaultProps = defaultThemeProp;\n\nconst validWidthUnits = ['px', 'ch', 'rem', 'em'];\n\nconst LayoutCell = ({ config }: { config: Config }) => {\n const layoutConfig = useMemo(() => config.layoutConfig, [config]);\n const percentageWidth = useMemo(() => {\n return widthConfigOptions[layoutConfig.width as keyof typeof widthConfigOptions] || '100%';\n }, [layoutConfig.width]);\n const minWidth = useMemo(() => {\n const value = layoutConfig.minWidth;\n\n if (typeof value === 'number') {\n return `${value}px`;\n }\n\n if (\n Array.isArray(value) &&\n value.length >= 2 &&\n typeof value[0] === 'number' &&\n validWidthUnits.includes(value[1])\n ) {\n return `${value[0]}${value[1]}`;\n }\n }, [layoutConfig.minWidth]);\n\n return config?.content ? (\n <Flex\n as={StyledCell}\n item={{\n grow: 1\n }}\n container={{ justify: 'stretch', alignItems: 'start' }}\n fillAvailable={layoutConfig.fillAvailable}\n percentageWidth={percentageWidth}\n minWidth={minWidth}\n >\n {config.content}\n </Flex>\n ) : null;\n};\n\nexport default LayoutCell;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/defaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,YAAY,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/defaults.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AACzB,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AACzC,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC","sourcesContent":["export const cellGap = 1;\nexport const containerMinWidth = '450px';\nexport const itemMinWidth = '225px';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,YAAY,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export { default } from './ConfigurableLayout';\nexport { default as useTrackWrappedRegions } from './useTrackWrappedRegions';\nexport type { ConfigurableLayoutProps } from './ConfigurableLayout.types';\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const widthConfigOptions: {
|
|
2
|
+
readonly '1/4': "25%";
|
|
3
|
+
readonly '1/3': "33.3%";
|
|
4
|
+
readonly '1/2': "50%";
|
|
5
|
+
readonly '2/3': "66.6%";
|
|
6
|
+
readonly '3/4': "75%";
|
|
7
|
+
readonly full: "100%";
|
|
8
|
+
};
|
|
9
|
+
export default widthConfigOptions;
|
|
10
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/options.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB;;;;;;;CAOd,CAAC;AAEX,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/options.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG;IACzB,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,eAAe,kBAAkB,CAAC","sourcesContent":["const widthConfigOptions = {\n '1/4': '25%',\n '1/3': '33.3%',\n '1/2': '50%',\n '2/3': '66.6%',\n '3/4': '75%',\n full: '100%'\n} as const;\n\nexport default widthConfigOptions;\n"]}
|