@cratis/showrunner.usher.react 0.0.0-bootstrap.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/Buttons/MyIssuesButton.tsx +78 -0
- package/Buttons/ReportButton.tsx +51 -0
- package/Buttons/buttonModels.ts +55 -0
- package/Buttons/index.ts +6 -0
- package/Correlation/CorrelationTracker.ts +51 -0
- package/Correlation/index.ts +5 -0
- package/Correlation/withCorrelationIdHeader.ts +44 -0
- package/Icons.tsx +29 -0
- package/Issues/IssueView/AccessPanel.tsx +85 -0
- package/Issues/IssueView/GrantAccessDialog.tsx +56 -0
- package/Issues/IssueView/IdentityPanel.tsx +38 -0
- package/Issues/IssueView/IssueActions.tsx +52 -0
- package/Issues/IssueView/IssueConversationPanel.tsx +89 -0
- package/Issues/IssueView/IssueHeader.tsx +69 -0
- package/Issues/IssueView/IssueView.tsx +74 -0
- package/Issues/IssueView/QuestionBanner.tsx +27 -0
- package/Issues/IssueView/ReopenIssueDialog.tsx +37 -0
- package/Issues/IssueView/ShareIdentityDialog.tsx +37 -0
- package/Issues/IssueView/StatusStrip.tsx +42 -0
- package/Issues/IssueView/SupportSessions.tsx +59 -0
- package/Issues/IssueView/index.ts +15 -0
- package/Issues/MyIssues/IssueList.tsx +78 -0
- package/Issues/MyIssues/MyIssuesDialog.tsx +64 -0
- package/Issues/MyIssues/MyIssuesNavigation.ts +61 -0
- package/Issues/MyIssues/index.ts +6 -0
- package/Issues/MyIssuesList.ts +33 -0
- package/Issues/accessStatus.ts +68 -0
- package/Issues/conversationMessages.ts +136 -0
- package/Issues/index.ts +12 -0
- package/Issues/issueStates.ts +69 -0
- package/Issues/sessionActivity.ts +43 -0
- package/Issues/useAccessStatus.ts +24 -0
- package/Issues/webAddress.ts +22 -0
- package/Labels/UsherLabels.ts +365 -0
- package/Labels/defaultUsherLabels.ts +178 -0
- package/Labels/format.ts +13 -0
- package/Labels/index.ts +7 -0
- package/Labels/resolveLabels.ts +36 -0
- package/Provider/UsherBoundary.tsx +30 -0
- package/Provider/UsherContext.ts +109 -0
- package/Provider/UsherProvider.tsx +134 -0
- package/Provider/index.ts +7 -0
- package/Provider/useUsher.ts +72 -0
- package/README.md +72 -0
- package/Reporting/AccessChoice.ts +107 -0
- package/Reporting/AccessFields.tsx +74 -0
- package/Reporting/AccessNotice.tsx +33 -0
- package/Reporting/ReportErrorDialog.tsx +94 -0
- package/Reporting/ReportIssueDialog.tsx +80 -0
- package/Reporting/ReportLimits.ts +24 -0
- package/Reporting/ReportSent.ts +12 -0
- package/Reporting/SentWithReport.tsx +37 -0
- package/Reporting/TechnicalDetails.tsx +60 -0
- package/Reporting/durationOptions.ts +31 -0
- package/Reporting/formatLocation.ts +27 -0
- package/Reporting/index.ts +16 -0
- package/Reporting/reportValues.ts +150 -0
- package/Reporting/useAccessChoice.ts +53 -0
- package/dist/cjs/Buttons/MyIssuesButton.d.ts +14 -0
- package/dist/cjs/Buttons/MyIssuesButton.d.ts.map +1 -0
- package/dist/cjs/Buttons/MyIssuesButton.js +76 -0
- package/dist/cjs/Buttons/MyIssuesButton.js.map +1 -0
- package/dist/cjs/Buttons/ReportButton.d.ts +8 -0
- package/dist/cjs/Buttons/ReportButton.d.ts.map +1 -0
- package/dist/cjs/Buttons/ReportButton.js +34 -0
- package/dist/cjs/Buttons/ReportButton.js.map +1 -0
- package/dist/cjs/Buttons/buttonModels.d.ts +10 -0
- package/dist/cjs/Buttons/buttonModels.d.ts.map +1 -0
- package/dist/cjs/Buttons/buttonModels.js +44 -0
- package/dist/cjs/Buttons/buttonModels.js.map +1 -0
- package/dist/cjs/Buttons/index.d.ts +4 -0
- package/dist/cjs/Buttons/index.d.ts.map +1 -0
- package/dist/cjs/Correlation/CorrelationTracker.d.ts +10 -0
- package/dist/cjs/Correlation/CorrelationTracker.d.ts.map +1 -0
- package/dist/cjs/Correlation/CorrelationTracker.js +50 -0
- package/dist/cjs/Correlation/CorrelationTracker.js.map +1 -0
- package/dist/cjs/Correlation/index.d.ts +3 -0
- package/dist/cjs/Correlation/index.d.ts.map +1 -0
- package/dist/cjs/Correlation/withCorrelationIdHeader.d.ts +6 -0
- package/dist/cjs/Correlation/withCorrelationIdHeader.d.ts.map +1 -0
- package/dist/cjs/Correlation/withCorrelationIdHeader.js +39 -0
- package/dist/cjs/Correlation/withCorrelationIdHeader.js.map +1 -0
- package/dist/cjs/Icons.d.ts +4 -0
- package/dist/cjs/Icons.d.ts.map +1 -0
- package/dist/cjs/Icons.js +53 -0
- package/dist/cjs/Icons.js.map +1 -0
- package/dist/cjs/Issues/IssueView/AccessPanel.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/AccessPanel.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/AccessPanel.js +124 -0
- package/dist/cjs/Issues/IssueView/AccessPanel.js.map +1 -0
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.js +56 -0
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.js.map +1 -0
- package/dist/cjs/Issues/IssueView/IdentityPanel.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/IdentityPanel.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/IdentityPanel.js +45 -0
- package/dist/cjs/Issues/IssueView/IdentityPanel.js.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueActions.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/IssueActions.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueActions.js +58 -0
- package/dist/cjs/Issues/IssueView/IssueActions.js.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.js +97 -0
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.js.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueHeader.d.ts +7 -0
- package/dist/cjs/Issues/IssueView/IssueHeader.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueHeader.js +94 -0
- package/dist/cjs/Issues/IssueView/IssueHeader.js.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueView.d.ts +7 -0
- package/dist/cjs/Issues/IssueView/IssueView.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/IssueView.js +85 -0
- package/dist/cjs/Issues/IssueView/IssueView.js.map +1 -0
- package/dist/cjs/Issues/IssueView/QuestionBanner.d.ts +5 -0
- package/dist/cjs/Issues/IssueView/QuestionBanner.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/QuestionBanner.js +24 -0
- package/dist/cjs/Issues/IssueView/QuestionBanner.js.map +1 -0
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.js +34 -0
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.js.map +1 -0
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.js +32 -0
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.js.map +1 -0
- package/dist/cjs/Issues/IssueView/StatusStrip.d.ts +6 -0
- package/dist/cjs/Issues/IssueView/StatusStrip.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/StatusStrip.js +31 -0
- package/dist/cjs/Issues/IssueView/StatusStrip.js.map +1 -0
- package/dist/cjs/Issues/IssueView/SupportSessions.d.ts +7 -0
- package/dist/cjs/Issues/IssueView/SupportSessions.d.ts.map +1 -0
- package/dist/cjs/Issues/IssueView/SupportSessions.js +62 -0
- package/dist/cjs/Issues/IssueView/SupportSessions.js.map +1 -0
- package/dist/cjs/Issues/IssueView/index.d.ts +13 -0
- package/dist/cjs/Issues/IssueView/index.d.ts.map +1 -0
- package/dist/cjs/Issues/MyIssues/IssueList.d.ts +7 -0
- package/dist/cjs/Issues/MyIssues/IssueList.d.ts.map +1 -0
- package/dist/cjs/Issues/MyIssues/IssueList.js +92 -0
- package/dist/cjs/Issues/MyIssues/IssueList.js.map +1 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.d.ts +7 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.d.ts.map +1 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.js +79 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.js.map +1 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.d.ts +21 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.d.ts.map +1 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.js +52 -0
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.js.map +1 -0
- package/dist/cjs/Issues/MyIssues/index.d.ts +4 -0
- package/dist/cjs/Issues/MyIssues/index.d.ts.map +1 -0
- package/dist/cjs/Issues/MyIssuesList.d.ts +7 -0
- package/dist/cjs/Issues/MyIssuesList.d.ts.map +1 -0
- package/dist/cjs/Issues/MyIssuesList.js +33 -0
- package/dist/cjs/Issues/MyIssuesList.js.map +1 -0
- package/dist/cjs/Issues/accessStatus.d.ts +13 -0
- package/dist/cjs/Issues/accessStatus.d.ts.map +1 -0
- package/dist/cjs/Issues/accessStatus.js +60 -0
- package/dist/cjs/Issues/accessStatus.js.map +1 -0
- package/dist/cjs/Issues/conversationMessages.d.ts +14 -0
- package/dist/cjs/Issues/conversationMessages.d.ts.map +1 -0
- package/dist/cjs/Issues/conversationMessages.js +131 -0
- package/dist/cjs/Issues/conversationMessages.js.map +1 -0
- package/dist/cjs/Issues/index.d.ts +10 -0
- package/dist/cjs/Issues/index.d.ts.map +1 -0
- package/dist/cjs/Issues/issueStates.d.ts +12 -0
- package/dist/cjs/Issues/issueStates.d.ts.map +1 -0
- package/dist/cjs/Issues/issueStates.js +86 -0
- package/dist/cjs/Issues/issueStates.js.map +1 -0
- package/dist/cjs/Issues/sessionActivity.d.ts +8 -0
- package/dist/cjs/Issues/sessionActivity.d.ts.map +1 -0
- package/dist/cjs/Issues/sessionActivity.js +39 -0
- package/dist/cjs/Issues/sessionActivity.js.map +1 -0
- package/dist/cjs/Issues/useAccessStatus.d.ts +4 -0
- package/dist/cjs/Issues/useAccessStatus.d.ts.map +1 -0
- package/dist/cjs/Issues/useAccessStatus.js +30 -0
- package/dist/cjs/Issues/useAccessStatus.js.map +1 -0
- package/dist/cjs/Issues/webAddress.d.ts +2 -0
- package/dist/cjs/Issues/webAddress.d.ts.map +1 -0
- package/dist/cjs/Issues/webAddress.js +24 -0
- package/dist/cjs/Issues/webAddress.js.map +1 -0
- package/dist/cjs/Labels/UsherLabels.d.ts +177 -0
- package/dist/cjs/Labels/UsherLabels.d.ts.map +1 -0
- package/dist/cjs/Labels/defaultUsherLabels.d.ts +3 -0
- package/dist/cjs/Labels/defaultUsherLabels.d.ts.map +1 -0
- package/dist/cjs/Labels/defaultUsherLabels.js +179 -0
- package/dist/cjs/Labels/defaultUsherLabels.js.map +1 -0
- package/dist/cjs/Labels/format.d.ts +2 -0
- package/dist/cjs/Labels/format.d.ts.map +1 -0
- package/dist/cjs/Labels/format.js +15 -0
- package/dist/cjs/Labels/format.js.map +1 -0
- package/dist/cjs/Labels/index.d.ts +5 -0
- package/dist/cjs/Labels/index.d.ts.map +1 -0
- package/dist/cjs/Labels/resolveLabels.d.ts +3 -0
- package/dist/cjs/Labels/resolveLabels.d.ts.map +1 -0
- package/dist/cjs/Labels/resolveLabels.js +35 -0
- package/dist/cjs/Labels/resolveLabels.js.map +1 -0
- package/dist/cjs/Provider/UsherBoundary.d.ts +6 -0
- package/dist/cjs/Provider/UsherBoundary.d.ts.map +1 -0
- package/dist/cjs/Provider/UsherBoundary.js +24 -0
- package/dist/cjs/Provider/UsherBoundary.js.map +1 -0
- package/dist/cjs/Provider/UsherContext.d.ts +24 -0
- package/dist/cjs/Provider/UsherContext.d.ts.map +1 -0
- package/dist/cjs/Provider/UsherContext.js +41 -0
- package/dist/cjs/Provider/UsherContext.js.map +1 -0
- package/dist/cjs/Provider/UsherProvider.d.ts +14 -0
- package/dist/cjs/Provider/UsherProvider.d.ts.map +1 -0
- package/dist/cjs/Provider/UsherProvider.js +122 -0
- package/dist/cjs/Provider/UsherProvider.js.map +1 -0
- package/dist/cjs/Provider/index.d.ts +5 -0
- package/dist/cjs/Provider/index.d.ts.map +1 -0
- package/dist/cjs/Provider/useUsher.d.ts +13 -0
- package/dist/cjs/Provider/useUsher.d.ts.map +1 -0
- package/dist/cjs/Provider/useUsher.js +31 -0
- package/dist/cjs/Provider/useUsher.js.map +1 -0
- package/dist/cjs/Reporting/AccessChoice.d.ts +13 -0
- package/dist/cjs/Reporting/AccessChoice.d.ts.map +1 -0
- package/dist/cjs/Reporting/AccessChoice.js +113 -0
- package/dist/cjs/Reporting/AccessChoice.js.map +1 -0
- package/dist/cjs/Reporting/AccessFields.d.ts +12 -0
- package/dist/cjs/Reporting/AccessFields.d.ts.map +1 -0
- package/dist/cjs/Reporting/AccessFields.js +79 -0
- package/dist/cjs/Reporting/AccessFields.js.map +1 -0
- package/dist/cjs/Reporting/AccessNotice.d.ts +7 -0
- package/dist/cjs/Reporting/AccessNotice.d.ts.map +1 -0
- package/dist/cjs/Reporting/AccessNotice.js +28 -0
- package/dist/cjs/Reporting/AccessNotice.js.map +1 -0
- package/dist/cjs/Reporting/ReportErrorDialog.d.ts +9 -0
- package/dist/cjs/Reporting/ReportErrorDialog.d.ts.map +1 -0
- package/dist/cjs/Reporting/ReportErrorDialog.js +87 -0
- package/dist/cjs/Reporting/ReportErrorDialog.js.map +1 -0
- package/dist/cjs/Reporting/ReportIssueDialog.d.ts +8 -0
- package/dist/cjs/Reporting/ReportIssueDialog.d.ts.map +1 -0
- package/dist/cjs/Reporting/ReportIssueDialog.js +81 -0
- package/dist/cjs/Reporting/ReportIssueDialog.js.map +1 -0
- package/dist/cjs/Reporting/ReportLimits.d.ts +8 -0
- package/dist/cjs/Reporting/ReportLimits.d.ts.map +1 -0
- package/dist/cjs/Reporting/ReportLimits.js +19 -0
- package/dist/cjs/Reporting/ReportLimits.js.map +1 -0
- package/dist/cjs/Reporting/ReportSent.d.ts +5 -0
- package/dist/cjs/Reporting/ReportSent.d.ts.map +1 -0
- package/dist/cjs/Reporting/SentWithReport.d.ts +7 -0
- package/dist/cjs/Reporting/SentWithReport.d.ts.map +1 -0
- package/dist/cjs/Reporting/SentWithReport.js +40 -0
- package/dist/cjs/Reporting/SentWithReport.js.map +1 -0
- package/dist/cjs/Reporting/TechnicalDetails.d.ts +9 -0
- package/dist/cjs/Reporting/TechnicalDetails.d.ts.map +1 -0
- package/dist/cjs/Reporting/TechnicalDetails.js +75 -0
- package/dist/cjs/Reporting/TechnicalDetails.js.map +1 -0
- package/dist/cjs/Reporting/durationOptions.d.ts +9 -0
- package/dist/cjs/Reporting/durationOptions.d.ts.map +1 -0
- package/dist/cjs/Reporting/durationOptions.js +29 -0
- package/dist/cjs/Reporting/durationOptions.js.map +1 -0
- package/dist/cjs/Reporting/formatLocation.d.ts +7 -0
- package/dist/cjs/Reporting/formatLocation.d.ts.map +1 -0
- package/dist/cjs/Reporting/formatLocation.js +23 -0
- package/dist/cjs/Reporting/formatLocation.js.map +1 -0
- package/dist/cjs/Reporting/index.d.ts +14 -0
- package/dist/cjs/Reporting/index.d.ts.map +1 -0
- package/dist/cjs/Reporting/reportValues.d.ts +22 -0
- package/dist/cjs/Reporting/reportValues.d.ts.map +1 -0
- package/dist/cjs/Reporting/reportValues.js +124 -0
- package/dist/cjs/Reporting/reportValues.js.map +1 -0
- package/dist/cjs/Reporting/useAccessChoice.d.ts +13 -0
- package/dist/cjs/Reporting/useAccessChoice.d.ts.map +1 -0
- package/dist/cjs/Reporting/useAccessChoice.js +41 -0
- package/dist/cjs/Reporting/useAccessChoice.js.map +1 -0
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +133 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/esm/Buttons/MyIssuesButton.d.ts +14 -0
- package/dist/esm/Buttons/MyIssuesButton.d.ts.map +1 -0
- package/dist/esm/Buttons/MyIssuesButton.js +73 -0
- package/dist/esm/Buttons/MyIssuesButton.js.map +1 -0
- package/dist/esm/Buttons/ReportButton.d.ts +8 -0
- package/dist/esm/Buttons/ReportButton.d.ts.map +1 -0
- package/dist/esm/Buttons/ReportButton.js +32 -0
- package/dist/esm/Buttons/ReportButton.js.map +1 -0
- package/dist/esm/Buttons/buttonModels.d.ts +10 -0
- package/dist/esm/Buttons/buttonModels.d.ts.map +1 -0
- package/dist/esm/Buttons/buttonModels.js +41 -0
- package/dist/esm/Buttons/buttonModels.js.map +1 -0
- package/dist/esm/Buttons/index.d.ts +4 -0
- package/dist/esm/Buttons/index.d.ts.map +1 -0
- package/dist/esm/Buttons/index.js +4 -0
- package/dist/esm/Buttons/index.js.map +1 -0
- package/dist/esm/Correlation/CorrelationTracker.d.ts +10 -0
- package/dist/esm/Correlation/CorrelationTracker.d.ts.map +1 -0
- package/dist/esm/Correlation/CorrelationTracker.js +48 -0
- package/dist/esm/Correlation/CorrelationTracker.js.map +1 -0
- package/dist/esm/Correlation/index.d.ts +3 -0
- package/dist/esm/Correlation/index.d.ts.map +1 -0
- package/dist/esm/Correlation/index.js +3 -0
- package/dist/esm/Correlation/index.js.map +1 -0
- package/dist/esm/Correlation/withCorrelationIdHeader.d.ts +6 -0
- package/dist/esm/Correlation/withCorrelationIdHeader.d.ts.map +1 -0
- package/dist/esm/Correlation/withCorrelationIdHeader.js +36 -0
- package/dist/esm/Correlation/withCorrelationIdHeader.js.map +1 -0
- package/dist/esm/Icons.d.ts +4 -0
- package/dist/esm/Icons.d.ts.map +1 -0
- package/dist/esm/Icons.js +49 -0
- package/dist/esm/Icons.js.map +1 -0
- package/dist/esm/Issues/IssueView/AccessPanel.d.ts +6 -0
- package/dist/esm/Issues/IssueView/AccessPanel.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/AccessPanel.js +122 -0
- package/dist/esm/Issues/IssueView/AccessPanel.js.map +1 -0
- package/dist/esm/Issues/IssueView/GrantAccessDialog.d.ts +6 -0
- package/dist/esm/Issues/IssueView/GrantAccessDialog.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/GrantAccessDialog.js +54 -0
- package/dist/esm/Issues/IssueView/GrantAccessDialog.js.map +1 -0
- package/dist/esm/Issues/IssueView/IdentityPanel.d.ts +6 -0
- package/dist/esm/Issues/IssueView/IdentityPanel.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/IdentityPanel.js +43 -0
- package/dist/esm/Issues/IssueView/IdentityPanel.js.map +1 -0
- package/dist/esm/Issues/IssueView/IssueActions.d.ts +6 -0
- package/dist/esm/Issues/IssueView/IssueActions.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/IssueActions.js +56 -0
- package/dist/esm/Issues/IssueView/IssueActions.js.map +1 -0
- package/dist/esm/Issues/IssueView/IssueConversationPanel.d.ts +6 -0
- package/dist/esm/Issues/IssueView/IssueConversationPanel.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/IssueConversationPanel.js +95 -0
- package/dist/esm/Issues/IssueView/IssueConversationPanel.js.map +1 -0
- package/dist/esm/Issues/IssueView/IssueHeader.d.ts +7 -0
- package/dist/esm/Issues/IssueView/IssueHeader.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/IssueHeader.js +92 -0
- package/dist/esm/Issues/IssueView/IssueHeader.js.map +1 -0
- package/dist/esm/Issues/IssueView/IssueView.d.ts +7 -0
- package/dist/esm/Issues/IssueView/IssueView.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/IssueView.js +83 -0
- package/dist/esm/Issues/IssueView/IssueView.js.map +1 -0
- package/dist/esm/Issues/IssueView/QuestionBanner.d.ts +5 -0
- package/dist/esm/Issues/IssueView/QuestionBanner.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/QuestionBanner.js +22 -0
- package/dist/esm/Issues/IssueView/QuestionBanner.js.map +1 -0
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.d.ts +6 -0
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.js +32 -0
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.js.map +1 -0
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.d.ts +6 -0
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.js +30 -0
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.js.map +1 -0
- package/dist/esm/Issues/IssueView/StatusStrip.d.ts +6 -0
- package/dist/esm/Issues/IssueView/StatusStrip.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/StatusStrip.js +29 -0
- package/dist/esm/Issues/IssueView/StatusStrip.js.map +1 -0
- package/dist/esm/Issues/IssueView/SupportSessions.d.ts +7 -0
- package/dist/esm/Issues/IssueView/SupportSessions.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/SupportSessions.js +60 -0
- package/dist/esm/Issues/IssueView/SupportSessions.js.map +1 -0
- package/dist/esm/Issues/IssueView/index.d.ts +13 -0
- package/dist/esm/Issues/IssueView/index.d.ts.map +1 -0
- package/dist/esm/Issues/IssueView/index.js +13 -0
- package/dist/esm/Issues/IssueView/index.js.map +1 -0
- package/dist/esm/Issues/MyIssues/IssueList.d.ts +7 -0
- package/dist/esm/Issues/MyIssues/IssueList.d.ts.map +1 -0
- package/dist/esm/Issues/MyIssues/IssueList.js +90 -0
- package/dist/esm/Issues/MyIssues/IssueList.js.map +1 -0
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.d.ts +7 -0
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.d.ts.map +1 -0
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.js +77 -0
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.js.map +1 -0
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.d.ts +21 -0
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.d.ts.map +1 -0
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.js +49 -0
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.js.map +1 -0
- package/dist/esm/Issues/MyIssues/index.d.ts +4 -0
- package/dist/esm/Issues/MyIssues/index.d.ts.map +1 -0
- package/dist/esm/Issues/MyIssues/index.js +4 -0
- package/dist/esm/Issues/MyIssues/index.js.map +1 -0
- package/dist/esm/Issues/MyIssuesList.d.ts +7 -0
- package/dist/esm/Issues/MyIssuesList.d.ts.map +1 -0
- package/dist/esm/Issues/MyIssuesList.js +29 -0
- package/dist/esm/Issues/MyIssuesList.js.map +1 -0
- package/dist/esm/Issues/accessStatus.d.ts +13 -0
- package/dist/esm/Issues/accessStatus.d.ts.map +1 -0
- package/dist/esm/Issues/accessStatus.js +54 -0
- package/dist/esm/Issues/accessStatus.js.map +1 -0
- package/dist/esm/Issues/conversationMessages.d.ts +14 -0
- package/dist/esm/Issues/conversationMessages.d.ts.map +1 -0
- package/dist/esm/Issues/conversationMessages.js +125 -0
- package/dist/esm/Issues/conversationMessages.js.map +1 -0
- package/dist/esm/Issues/index.d.ts +10 -0
- package/dist/esm/Issues/index.d.ts.map +1 -0
- package/dist/esm/Issues/index.js +10 -0
- package/dist/esm/Issues/index.js.map +1 -0
- package/dist/esm/Issues/issueStates.d.ts +12 -0
- package/dist/esm/Issues/issueStates.d.ts.map +1 -0
- package/dist/esm/Issues/issueStates.js +81 -0
- package/dist/esm/Issues/issueStates.js.map +1 -0
- package/dist/esm/Issues/sessionActivity.d.ts +8 -0
- package/dist/esm/Issues/sessionActivity.d.ts.map +1 -0
- package/dist/esm/Issues/sessionActivity.js +37 -0
- package/dist/esm/Issues/sessionActivity.js.map +1 -0
- package/dist/esm/Issues/useAccessStatus.d.ts +4 -0
- package/dist/esm/Issues/useAccessStatus.d.ts.map +1 -0
- package/dist/esm/Issues/useAccessStatus.js +28 -0
- package/dist/esm/Issues/useAccessStatus.js.map +1 -0
- package/dist/esm/Issues/webAddress.d.ts +2 -0
- package/dist/esm/Issues/webAddress.d.ts.map +1 -0
- package/dist/esm/Issues/webAddress.js +22 -0
- package/dist/esm/Issues/webAddress.js.map +1 -0
- package/dist/esm/Labels/UsherLabels.d.ts +177 -0
- package/dist/esm/Labels/UsherLabels.d.ts.map +1 -0
- package/dist/esm/Labels/UsherLabels.js +2 -0
- package/dist/esm/Labels/UsherLabels.js.map +1 -0
- package/dist/esm/Labels/defaultUsherLabels.d.ts +3 -0
- package/dist/esm/Labels/defaultUsherLabels.d.ts.map +1 -0
- package/dist/esm/Labels/defaultUsherLabels.js +177 -0
- package/dist/esm/Labels/defaultUsherLabels.js.map +1 -0
- package/dist/esm/Labels/format.d.ts +2 -0
- package/dist/esm/Labels/format.d.ts.map +1 -0
- package/dist/esm/Labels/format.js +13 -0
- package/dist/esm/Labels/format.js.map +1 -0
- package/dist/esm/Labels/index.d.ts +5 -0
- package/dist/esm/Labels/index.d.ts.map +1 -0
- package/dist/esm/Labels/index.js +5 -0
- package/dist/esm/Labels/index.js.map +1 -0
- package/dist/esm/Labels/resolveLabels.d.ts +3 -0
- package/dist/esm/Labels/resolveLabels.d.ts.map +1 -0
- package/dist/esm/Labels/resolveLabels.js +33 -0
- package/dist/esm/Labels/resolveLabels.js.map +1 -0
- package/dist/esm/Provider/UsherBoundary.d.ts +6 -0
- package/dist/esm/Provider/UsherBoundary.d.ts.map +1 -0
- package/dist/esm/Provider/UsherBoundary.js +22 -0
- package/dist/esm/Provider/UsherBoundary.js.map +1 -0
- package/dist/esm/Provider/UsherContext.d.ts +24 -0
- package/dist/esm/Provider/UsherContext.d.ts.map +1 -0
- package/dist/esm/Provider/UsherContext.js +36 -0
- package/dist/esm/Provider/UsherContext.js.map +1 -0
- package/dist/esm/Provider/UsherProvider.d.ts +14 -0
- package/dist/esm/Provider/UsherProvider.d.ts.map +1 -0
- package/dist/esm/Provider/UsherProvider.js +120 -0
- package/dist/esm/Provider/UsherProvider.js.map +1 -0
- package/dist/esm/Provider/index.d.ts +5 -0
- package/dist/esm/Provider/index.d.ts.map +1 -0
- package/dist/esm/Provider/index.js +5 -0
- package/dist/esm/Provider/index.js.map +1 -0
- package/dist/esm/Provider/useUsher.d.ts +13 -0
- package/dist/esm/Provider/useUsher.d.ts.map +1 -0
- package/dist/esm/Provider/useUsher.js +29 -0
- package/dist/esm/Provider/useUsher.js.map +1 -0
- package/dist/esm/Reporting/AccessChoice.d.ts +13 -0
- package/dist/esm/Reporting/AccessChoice.d.ts.map +1 -0
- package/dist/esm/Reporting/AccessChoice.js +106 -0
- package/dist/esm/Reporting/AccessChoice.js.map +1 -0
- package/dist/esm/Reporting/AccessFields.d.ts +12 -0
- package/dist/esm/Reporting/AccessFields.d.ts.map +1 -0
- package/dist/esm/Reporting/AccessFields.js +77 -0
- package/dist/esm/Reporting/AccessFields.js.map +1 -0
- package/dist/esm/Reporting/AccessNotice.d.ts +7 -0
- package/dist/esm/Reporting/AccessNotice.d.ts.map +1 -0
- package/dist/esm/Reporting/AccessNotice.js +26 -0
- package/dist/esm/Reporting/AccessNotice.js.map +1 -0
- package/dist/esm/Reporting/ReportErrorDialog.d.ts +9 -0
- package/dist/esm/Reporting/ReportErrorDialog.d.ts.map +1 -0
- package/dist/esm/Reporting/ReportErrorDialog.js +85 -0
- package/dist/esm/Reporting/ReportErrorDialog.js.map +1 -0
- package/dist/esm/Reporting/ReportIssueDialog.d.ts +8 -0
- package/dist/esm/Reporting/ReportIssueDialog.d.ts.map +1 -0
- package/dist/esm/Reporting/ReportIssueDialog.js +79 -0
- package/dist/esm/Reporting/ReportIssueDialog.js.map +1 -0
- package/dist/esm/Reporting/ReportLimits.d.ts +8 -0
- package/dist/esm/Reporting/ReportLimits.d.ts.map +1 -0
- package/dist/esm/Reporting/ReportLimits.js +17 -0
- package/dist/esm/Reporting/ReportLimits.js.map +1 -0
- package/dist/esm/Reporting/ReportSent.d.ts +5 -0
- package/dist/esm/Reporting/ReportSent.d.ts.map +1 -0
- package/dist/esm/Reporting/ReportSent.js +2 -0
- package/dist/esm/Reporting/ReportSent.js.map +1 -0
- package/dist/esm/Reporting/SentWithReport.d.ts +7 -0
- package/dist/esm/Reporting/SentWithReport.d.ts.map +1 -0
- package/dist/esm/Reporting/SentWithReport.js +38 -0
- package/dist/esm/Reporting/SentWithReport.js.map +1 -0
- package/dist/esm/Reporting/TechnicalDetails.d.ts +9 -0
- package/dist/esm/Reporting/TechnicalDetails.d.ts.map +1 -0
- package/dist/esm/Reporting/TechnicalDetails.js +73 -0
- package/dist/esm/Reporting/TechnicalDetails.js.map +1 -0
- package/dist/esm/Reporting/durationOptions.d.ts +9 -0
- package/dist/esm/Reporting/durationOptions.d.ts.map +1 -0
- package/dist/esm/Reporting/durationOptions.js +27 -0
- package/dist/esm/Reporting/durationOptions.js.map +1 -0
- package/dist/esm/Reporting/formatLocation.d.ts +7 -0
- package/dist/esm/Reporting/formatLocation.d.ts.map +1 -0
- package/dist/esm/Reporting/formatLocation.js +21 -0
- package/dist/esm/Reporting/formatLocation.js.map +1 -0
- package/dist/esm/Reporting/index.d.ts +14 -0
- package/dist/esm/Reporting/index.d.ts.map +1 -0
- package/dist/esm/Reporting/index.js +14 -0
- package/dist/esm/Reporting/index.js.map +1 -0
- package/dist/esm/Reporting/reportValues.d.ts +22 -0
- package/dist/esm/Reporting/reportValues.d.ts.map +1 -0
- package/dist/esm/Reporting/reportValues.js +116 -0
- package/dist/esm/Reporting/reportValues.js.map +1 -0
- package/dist/esm/Reporting/useAccessChoice.d.ts +13 -0
- package/dist/esm/Reporting/useAccessChoice.d.ts.map +1 -0
- package/dist/esm/Reporting/useAccessChoice.js +39 -0
- package/dist/esm/Reporting/useAccessChoice.js.map +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +48 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/index.ts +10 -0
- package/package.json +85 -0
- package/styles.css +320 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ChatConversation } from '@cratis/components/Chat';
|
|
3
|
+
import { Message, Tag } from '@cratis/components/Display';
|
|
4
|
+
import { toastCommandResult } from '@cratis/components/Notifications';
|
|
5
|
+
import { AddDetails, AnswerQuestion, IssueState, ConversationEntryKind } from '@cratis/showrunner.usher';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
import { useUsherLabels } from '../../Provider/UsherContext.js';
|
|
8
|
+
import { conversationMessages, authorOf, isOpenQuestion } from '../conversationMessages.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The conversation on an issue. A message the reporter sends answers support's open question, or adds details when
|
|
12
|
+
* there is none. Once the reporter withdrew the issue, the composer is disabled: nothing more can be added to it.
|
|
13
|
+
*/ const IssueConversationPanel = ({ issue })=>{
|
|
14
|
+
const labels = useUsherLabels();
|
|
15
|
+
const [addDetails] = AddDetails.use();
|
|
16
|
+
const [answerQuestion] = AnswerQuestion.use();
|
|
17
|
+
const messages = useMemo(()=>conversationMessages(issue.id, issue.entries ?? [], labels), [
|
|
18
|
+
issue.id,
|
|
19
|
+
issue.entries,
|
|
20
|
+
labels
|
|
21
|
+
]);
|
|
22
|
+
const openQuestionId = issue.openQuestion?.questionId;
|
|
23
|
+
const isWithdrawn = issue.state === IssueState.withdrawn;
|
|
24
|
+
const send = async (body)=>{
|
|
25
|
+
if (isWithdrawn) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (isOpenQuestion(openQuestionId)) {
|
|
29
|
+
answerQuestion.issueId = issue.id;
|
|
30
|
+
answerQuestion.questionId = openQuestionId;
|
|
31
|
+
answerQuestion.answer = body;
|
|
32
|
+
toastCommandResult(await answerQuestion.execute(), {
|
|
33
|
+
showSuccess: false
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
addDetails.issueId = issue.id;
|
|
38
|
+
addDetails.details = body;
|
|
39
|
+
toastCommandResult(await addDetails.execute(), {
|
|
40
|
+
showSuccess: false
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const renderMessageExtra = (message)=>{
|
|
44
|
+
if (message.kind !== ConversationEntryKind.questionAsked) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
const isOpen = isOpenQuestion(openQuestionId) && openQuestionId.equals(message.questionId);
|
|
48
|
+
return /*#__PURE__*/ jsx("span", {
|
|
49
|
+
className: "usher-conversation__question-state",
|
|
50
|
+
children: /*#__PURE__*/ jsx(Tag, {
|
|
51
|
+
value: isOpen ? labels.issue.waitingForAnswer : labels.issue.answered,
|
|
52
|
+
severity: isOpen ? 'warn' : 'success'
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/ jsxs("section", {
|
|
57
|
+
className: "usher-conversation",
|
|
58
|
+
"data-closed": isWithdrawn || undefined,
|
|
59
|
+
"aria-label": issue.title,
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ jsx("fieldset", {
|
|
62
|
+
className: "usher-conversation__fieldset",
|
|
63
|
+
disabled: isWithdrawn,
|
|
64
|
+
children: /*#__PURE__*/ jsx(ChatConversation, {
|
|
65
|
+
messages: messages,
|
|
66
|
+
onSendMessage: (body)=>void send(body),
|
|
67
|
+
authorOf: (authorId)=>authorOf(authorId, labels),
|
|
68
|
+
renderMessageExtra: renderMessageExtra,
|
|
69
|
+
quickReply: false,
|
|
70
|
+
labels: {
|
|
71
|
+
empty: labels.conversation.empty,
|
|
72
|
+
timestamps: {
|
|
73
|
+
justNow: labels.conversation.justNow,
|
|
74
|
+
minutesAgo: labels.conversation.minutesAgo,
|
|
75
|
+
hoursAgo: labels.conversation.hoursAgo
|
|
76
|
+
},
|
|
77
|
+
composer: {
|
|
78
|
+
placeholder: isWithdrawn ? labels.issue.withdrawnPlaceholder : labels.issue.composerPlaceholder,
|
|
79
|
+
send: labels.conversation.send,
|
|
80
|
+
sendMessage: labels.conversation.send
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
isWithdrawn && /*#__PURE__*/ jsx(Message, {
|
|
86
|
+
severity: "secondary",
|
|
87
|
+
text: labels.issue.withdrawnNotice,
|
|
88
|
+
live: false
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { IssueConversationPanel };
|
|
95
|
+
//# sourceMappingURL=IssueConversationPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueConversationPanel.js","sources":["../../../../Issues/IssueView/IssueConversationPanel.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ChatConversation } from '@cratis/components/Chat';\nimport { Message, Tag } from '@cratis/components/Display';\nimport { toastCommandResult } from '@cratis/components/Notifications';\nimport { AddDetails, AnswerQuestion, ConversationEntryKind, IssueConversation, IssueState } from '@cratis/showrunner.usher';\nimport { useMemo } from 'react';\nimport { useUsherLabels } from '../../Provider/UsherContext.js';\nimport { authorOf, ConversationMessage, conversationMessages, isOpenQuestion } from '../conversationMessages.js';\n\n/**\n * Props for {@link IssueConversationPanel}.\n */\nexport interface IssueConversationPanelProps {\n /** The issue. */\n issue: IssueConversation;\n}\n\n/**\n * The conversation on an issue. A message the reporter sends answers support's open question, or adds details when\n * there is none. Once the reporter withdrew the issue, the composer is disabled: nothing more can be added to it.\n */\nexport const IssueConversationPanel = ({ issue }: IssueConversationPanelProps) => {\n const labels = useUsherLabels();\n const [addDetails] = AddDetails.use();\n const [answerQuestion] = AnswerQuestion.use();\n const messages = useMemo(() => conversationMessages(issue.id, issue.entries ?? [], labels), [issue.id, issue.entries, labels]);\n const openQuestionId = issue.openQuestion?.questionId;\n const isWithdrawn = issue.state === IssueState.withdrawn;\n\n const send = async (body: string) => {\n if (isWithdrawn) {\n return;\n }\n\n if (isOpenQuestion(openQuestionId)) {\n answerQuestion.issueId = issue.id;\n answerQuestion.questionId = openQuestionId;\n answerQuestion.answer = body;\n toastCommandResult(await answerQuestion.execute(), { showSuccess: false });\n return;\n }\n\n addDetails.issueId = issue.id;\n addDetails.details = body;\n toastCommandResult(await addDetails.execute(), { showSuccess: false });\n };\n\n const renderMessageExtra = (message: ConversationMessage) => {\n if (message.kind !== ConversationEntryKind.questionAsked) {\n return undefined;\n }\n\n const isOpen = isOpenQuestion(openQuestionId) && openQuestionId.equals(message.questionId);\n return (\n <span className='usher-conversation__question-state'>\n <Tag value={isOpen ? labels.issue.waitingForAnswer : labels.issue.answered} severity={isOpen ? 'warn' : 'success'} />\n </span>\n );\n };\n\n return (\n <section className='usher-conversation' data-closed={isWithdrawn || undefined} aria-label={issue.title}>\n <fieldset className='usher-conversation__fieldset' disabled={isWithdrawn}>\n <ChatConversation<ConversationMessage>\n messages={messages}\n onSendMessage={body => void send(body)}\n authorOf={authorId => authorOf(authorId, labels)}\n renderMessageExtra={renderMessageExtra}\n quickReply={false}\n labels={{\n empty: labels.conversation.empty,\n timestamps: {\n justNow: labels.conversation.justNow,\n minutesAgo: labels.conversation.minutesAgo,\n hoursAgo: labels.conversation.hoursAgo\n },\n composer: {\n placeholder: isWithdrawn ? labels.issue.withdrawnPlaceholder : labels.issue.composerPlaceholder,\n send: labels.conversation.send,\n sendMessage: labels.conversation.send\n }\n }} />\n </fieldset>\n {isWithdrawn && <Message severity='secondary' text={labels.issue.withdrawnNotice} live={false} />}\n </section>\n );\n};\n"],"names":["IssueConversationPanel","issue","labels","useUsherLabels","addDetails","AddDetails","use","answerQuestion","AnswerQuestion","messages","useMemo","conversationMessages","id","entries","openQuestionId","openQuestion","questionId","isWithdrawn","state","IssueState","withdrawn","send","body","isOpenQuestion","issueId","answer","toastCommandResult","execute","showSuccess","details","renderMessageExtra","message","kind","ConversationEntryKind","questionAsked","undefined","isOpen","equals","_jsx","span","className","Tag","value","waitingForAnswer","answered","severity","_jsxs","section","data-closed","aria-label","title","fieldset","disabled","ChatConversation","onSendMessage","authorOf","authorId","quickReply","empty","conversation","timestamps","justNow","minutesAgo","hoursAgo","composer","placeholder","withdrawnPlaceholder","composerPlaceholder","sendMessage","Message","text","withdrawnNotice","live"],"mappings":";;;;;;;;;AAmBA;;;AAGC,IACM,MAAMA,sBAAAA,GAAyB,CAAC,EAAEC,KAAK,EAA+B,GAAA;AACzE,IAAA,MAAMC,MAAAA,GAASC,cAAAA,EAAAA;AACf,IAAA,MAAM,CAACC,UAAAA,CAAW,GAAGC,UAAAA,CAAWC,GAAG,EAAA;AACnC,IAAA,MAAM,CAACC,cAAAA,CAAe,GAAGC,cAAAA,CAAeF,GAAG,EAAA;AAC3C,IAAA,MAAMG,QAAAA,GAAWC,OAAAA,CAAQ,IAAMC,oBAAAA,CAAqBV,KAAAA,CAAMW,EAAE,EAAEX,KAAAA,CAAMY,OAAO,IAAI,EAAE,EAAEX,MAAAA,CAAAA,EAAS;AAACD,QAAAA,KAAAA,CAAMW,EAAE;AAAEX,QAAAA,KAAAA,CAAMY,OAAO;AAAEX,QAAAA;AAAO,KAAA,CAAA;IAC7H,MAAMY,cAAAA,GAAiBb,KAAAA,CAAMc,YAAY,EAAEC,UAAAA;AAC3C,IAAA,MAAMC,WAAAA,GAAchB,KAAAA,CAAMiB,KAAK,KAAKC,WAAWC,SAAS;AAExD,IAAA,MAAMC,OAAO,OAAOC,IAAAA,GAAAA;AAChB,QAAA,IAAIL,WAAAA,EAAa;AACb,YAAA;AACJ,QAAA;AAEA,QAAA,IAAIM,eAAeT,cAAAA,CAAAA,EAAiB;YAChCP,cAAAA,CAAeiB,OAAO,GAAGvB,KAAAA,CAAMW,EAAE;AACjCL,YAAAA,cAAAA,CAAeS,UAAU,GAAGF,cAAAA;AAC5BP,YAAAA,cAAAA,CAAekB,MAAM,GAAGH,IAAAA;YACxBI,kBAAAA,CAAmB,MAAMnB,cAAAA,CAAeoB,OAAO,EAAA,EAAI;gBAAEC,WAAAA,EAAa;AAAM,aAAA,CAAA;AACxE,YAAA;AACJ,QAAA;QAEAxB,UAAAA,CAAWoB,OAAO,GAAGvB,KAAAA,CAAMW,EAAE;AAC7BR,QAAAA,UAAAA,CAAWyB,OAAO,GAAGP,IAAAA;QACrBI,kBAAAA,CAAmB,MAAMtB,UAAAA,CAAWuB,OAAO,EAAA,EAAI;YAAEC,WAAAA,EAAa;AAAM,SAAA,CAAA;AACxE,IAAA,CAAA;AAEA,IAAA,MAAME,qBAAqB,CAACC,OAAAA,GAAAA;AACxB,QAAA,IAAIA,OAAAA,CAAQC,IAAI,KAAKC,qBAAAA,CAAsBC,aAAa,EAAE;YACtD,OAAOC,SAAAA;AACX,QAAA;AAEA,QAAA,MAAMC,SAASb,cAAAA,CAAeT,cAAAA,CAAAA,IAAmBA,eAAeuB,MAAM,CAACN,QAAQf,UAAU,CAAA;AACzF,QAAA,qBACIsB,GAAA,CAACC,MAAAA,EAAAA;YAAKC,SAAAA,EAAU,oCAAA;AACZ,YAAA,QAAA,gBAAAF,GAAA,CAACG,GAAAA,EAAAA;gBAAIC,KAAAA,EAAON,MAAAA,GAASlC,OAAOD,KAAK,CAAC0C,gBAAgB,GAAGzC,MAAAA,CAAOD,KAAK,CAAC2C,QAAQ;AAAEC,gBAAAA,QAAAA,EAAUT,SAAS,MAAA,GAAS;;;AAGpH,IAAA,CAAA;AAEA,IAAA,qBACIU,IAAA,CAACC,SAAAA,EAAAA;QAAQP,SAAAA,EAAU,oBAAA;AAAqBQ,QAAAA,aAAAA,EAAa/B,WAAAA,IAAekB,SAAAA;AAAWc,QAAAA,YAAAA,EAAYhD,MAAMiD,KAAK;;0BAClGZ,GAAA,CAACa,UAAAA,EAAAA;gBAASX,SAAAA,EAAU,8BAAA;gBAA+BY,QAAAA,EAAUnC,WAAAA;AACzD,gBAAA,QAAA,gBAAAqB,GAAA,CAACe,gBAAAA,EAAAA;oBACG5C,QAAAA,EAAUA,QAAAA;oBACV6C,aAAAA,EAAehC,CAAAA,IAAAA,GAAQ,KAAKD,IAAAA,CAAKC,IAAAA,CAAAA;oBACjCiC,QAAAA,EAAUC,CAAAA,QAAAA,GAAYD,QAAAA,CAASC,QAAAA,EAAUtD,MAAAA,CAAAA;oBACzC4B,kBAAAA,EAAoBA,kBAAAA;oBACpB2B,UAAAA,EAAY,KAAA;oBACZvD,MAAAA,EAAQ;wBACJwD,KAAAA,EAAOxD,MAAAA,CAAOyD,YAAY,CAACD,KAAK;wBAChCE,UAAAA,EAAY;4BACRC,OAAAA,EAAS3D,MAAAA,CAAOyD,YAAY,CAACE,OAAO;4BACpCC,UAAAA,EAAY5D,MAAAA,CAAOyD,YAAY,CAACG,UAAU;4BAC1CC,QAAAA,EAAU7D,MAAAA,CAAOyD,YAAY,CAACI;AAClC,yBAAA;wBACAC,QAAAA,EAAU;4BACNC,WAAAA,EAAahD,WAAAA,GAAcf,OAAOD,KAAK,CAACiE,oBAAoB,GAAGhE,MAAAA,CAAOD,KAAK,CAACkE,mBAAmB;4BAC/F9C,IAAAA,EAAMnB,MAAAA,CAAOyD,YAAY,CAACtC,IAAI;4BAC9B+C,WAAAA,EAAalE,MAAAA,CAAOyD,YAAY,CAACtC;AACrC;AACJ;;;AAEPJ,YAAAA,WAAAA,kBAAeqB,GAAA,CAAC+B,OAAAA,EAAAA;gBAAQxB,QAAAA,EAAS,WAAA;gBAAYyB,IAAAA,EAAMpE,MAAAA,CAAOD,KAAK,CAACsE,eAAe;gBAAEC,IAAAA,EAAM;;;;AAGpG;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IssueConversation } from '@cratis/showrunner.usher';
|
|
2
|
+
export interface IssueHeaderProps {
|
|
3
|
+
issue: IssueConversation;
|
|
4
|
+
onBack?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const IssueHeader: ({ issue, onBack }: IssueHeaderProps) => import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=IssueHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueHeader.d.ts","sourceRoot":"","sources":["../../../../Issues/IssueView/IssueHeader.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAa7D,MAAM,WAAW,gBAAgB;IAE7B,KAAK,EAAE,iBAAiB,CAAC;IAGzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAKD,eAAO,MAAM,WAAW,GAAI,mBAAmB,gBAAgB,gCAuC9D,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@cratis/components/Common';
|
|
3
|
+
import { Tag } from '@cratis/components/Display';
|
|
4
|
+
import { format } from '../../Labels/format.js';
|
|
5
|
+
import { useUsherContext } from '../../Provider/UsherContext.js';
|
|
6
|
+
import { formatTime } from '../../Reporting/AccessChoice.js';
|
|
7
|
+
import { formatLocation } from '../../Reporting/formatLocation.js';
|
|
8
|
+
import { BackIcon } from '../../Icons.js';
|
|
9
|
+
import { stateBadgeFor } from '../issueStates.js';
|
|
10
|
+
import { isFixReleased } from '../MyIssuesList.js';
|
|
11
|
+
import { isWebAddress } from '../webAddress.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The header of an issue: its title and state, when and where it was reported, and what it is linked to.
|
|
15
|
+
*/ const IssueHeader = ({ issue, onBack })=>{
|
|
16
|
+
const { labels, locale } = useUsherContext();
|
|
17
|
+
const badge = stateBadgeFor(issue.state, labels);
|
|
18
|
+
const reportedAt = issue.reportedAt instanceof Date ? issue.reportedAt : new Date(issue.reportedAt);
|
|
19
|
+
const location = formatLocation(issue.location, labels.common.locationSeparator, labels.common.unknownLocation);
|
|
20
|
+
const workItem = issue.workItem;
|
|
21
|
+
const hasWorkItem = (workItem?.reference ?? '').length > 0;
|
|
22
|
+
return /*#__PURE__*/ jsxs("header", {
|
|
23
|
+
className: "usher-issue-header",
|
|
24
|
+
children: [
|
|
25
|
+
onBack && /*#__PURE__*/ jsx(Button, {
|
|
26
|
+
variant: "ghost",
|
|
27
|
+
size: "small",
|
|
28
|
+
icon: /*#__PURE__*/ jsx(BackIcon, {}),
|
|
29
|
+
onClick: onBack,
|
|
30
|
+
label: labels.issue.back
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ jsxs("div", {
|
|
33
|
+
className: "usher-issue-header__title-row",
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ jsx("h3", {
|
|
36
|
+
className: "usher-issue-header__title",
|
|
37
|
+
children: issue.title
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ jsx(Tag, {
|
|
40
|
+
value: badge.label,
|
|
41
|
+
severity: badge.severity
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/ jsxs("p", {
|
|
46
|
+
className: "usher-issue-header__meta",
|
|
47
|
+
children: [
|
|
48
|
+
format(labels.issue.reported, {
|
|
49
|
+
date: formatTime(reportedAt, locale)
|
|
50
|
+
}),
|
|
51
|
+
" · ",
|
|
52
|
+
location
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
(issue.knownIssueTitle?.length > 0 || hasWorkItem) && /*#__PURE__*/ jsxs("p", {
|
|
56
|
+
className: "usher-issue-header__links",
|
|
57
|
+
children: [
|
|
58
|
+
issue.knownIssueTitle?.length > 0 && /*#__PURE__*/ jsxs("span", {
|
|
59
|
+
children: [
|
|
60
|
+
labels.issue.knownIssue,
|
|
61
|
+
" ",
|
|
62
|
+
/*#__PURE__*/ jsx("strong", {
|
|
63
|
+
children: issue.knownIssueTitle
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}),
|
|
67
|
+
hasWorkItem && /*#__PURE__*/ jsxs("span", {
|
|
68
|
+
children: [
|
|
69
|
+
labels.issue.trackedIn,
|
|
70
|
+
' ',
|
|
71
|
+
isWebAddress(workItem.url) ? /*#__PURE__*/ jsx("a", {
|
|
72
|
+
href: workItem.url,
|
|
73
|
+
target: "_blank",
|
|
74
|
+
rel: "noreferrer",
|
|
75
|
+
children: workItem.reference
|
|
76
|
+
}) : /*#__PURE__*/ jsx("strong", {
|
|
77
|
+
children: workItem.reference
|
|
78
|
+
}),
|
|
79
|
+
' · ',
|
|
80
|
+
isFixReleased(issue) ? format(labels.issue.fixedIn, {
|
|
81
|
+
version: issue.fixedInVersion
|
|
82
|
+
}) : labels.issue.notReleased
|
|
83
|
+
]
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export { IssueHeader };
|
|
92
|
+
//# sourceMappingURL=IssueHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueHeader.js","sources":["../../../../Issues/IssueView/IssueHeader.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Button } from '@cratis/components/Common';\nimport { Tag } from '@cratis/components/Display';\nimport { IssueConversation } from '@cratis/showrunner.usher';\nimport { format } from '../../Labels/index.js';\nimport { useUsherContext } from '../../Provider/UsherContext.js';\nimport { formatTime } from '../../Reporting/AccessChoice.js';\nimport { formatLocation } from '../../Reporting/formatLocation.js';\nimport { BackIcon } from '../../Icons.js';\nimport { stateBadgeFor } from '../issueStates.js';\nimport { isFixReleased } from '../MyIssuesList.js';\nimport { isWebAddress } from '../webAddress.js';\n\n/**\n * Props for {@link IssueHeader}.\n */\nexport interface IssueHeaderProps {\n /** The issue. */\n issue: IssueConversation;\n\n /** Goes back to the list of issues; no back button when not given. */\n onBack?: () => void;\n}\n\n/**\n * The header of an issue: its title and state, when and where it was reported, and what it is linked to.\n */\nexport const IssueHeader = ({ issue, onBack }: IssueHeaderProps) => {\n const { labels, locale } = useUsherContext();\n const badge = stateBadgeFor(issue.state, labels);\n const reportedAt = issue.reportedAt instanceof Date ? issue.reportedAt : new Date(issue.reportedAt);\n const location = formatLocation(issue.location, labels.common.locationSeparator, labels.common.unknownLocation);\n const workItem = issue.workItem;\n const hasWorkItem = (workItem?.reference ?? '').length > 0;\n\n return (\n <header className='usher-issue-header'>\n {onBack && (\n <Button variant='ghost' size='small' icon={<BackIcon />} onClick={onBack} label={labels.issue.back} />\n )}\n <div className='usher-issue-header__title-row'>\n <h3 className='usher-issue-header__title'>{issue.title}</h3>\n <Tag value={badge.label} severity={badge.severity} />\n </div>\n <p className='usher-issue-header__meta'>\n {format(labels.issue.reported, { date: formatTime(reportedAt, locale) })} · {location}\n </p>\n {(issue.knownIssueTitle?.length > 0 || hasWorkItem) && (\n <p className='usher-issue-header__links'>\n {issue.knownIssueTitle?.length > 0 && (\n <span>{labels.issue.knownIssue} <strong>{issue.knownIssueTitle}</strong></span>\n )}\n {hasWorkItem && (\n <span>\n {labels.issue.trackedIn}{' '}\n {isWebAddress(workItem.url)\n ? <a href={workItem.url} target='_blank' rel='noreferrer'>{workItem.reference}</a>\n : <strong>{workItem.reference}</strong>}\n {' · '}\n {isFixReleased(issue) ? format(labels.issue.fixedIn, { version: issue.fixedInVersion }) : labels.issue.notReleased}\n </span>\n )}\n </p>\n )}\n </header>\n );\n};\n"],"names":["IssueHeader","issue","onBack","labels","locale","useUsherContext","badge","stateBadgeFor","state","reportedAt","Date","location","formatLocation","common","locationSeparator","unknownLocation","workItem","hasWorkItem","reference","length","_jsxs","header","className","_jsx","Button","variant","size","icon","BackIcon","onClick","label","back","div","h3","title","Tag","value","severity","p","format","reported","date","formatTime","knownIssueTitle","span","knownIssue","strong","trackedIn","isWebAddress","url","a","href","target","rel","isFixReleased","fixedIn","version","fixedInVersion","notReleased"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueView.d.ts","sourceRoot":"","sources":["../../../../Issues/IssueView/IssueView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAgB5C,MAAM,WAAW,cAAc;IAE3B,OAAO,EAAE,IAAI,CAAC;IAGd,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAOD,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,gCAI9C,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Message } from '@cratis/components/Display';
|
|
3
|
+
import { ForIssue } from '@cratis/showrunner.usher';
|
|
4
|
+
import { UsherBoundary } from '../../Provider/UsherBoundary.js';
|
|
5
|
+
import { useUsherLabels } from '../../Provider/UsherContext.js';
|
|
6
|
+
import { isOpenQuestion } from '../conversationMessages.js';
|
|
7
|
+
import { AccessPanel } from './AccessPanel.js';
|
|
8
|
+
import { IdentityPanel } from './IdentityPanel.js';
|
|
9
|
+
import { IssueActions } from './IssueActions.js';
|
|
10
|
+
import { IssueConversationPanel } from './IssueConversationPanel.js';
|
|
11
|
+
import { IssueHeader } from './IssueHeader.js';
|
|
12
|
+
import { QuestionBanner } from './QuestionBanner.js';
|
|
13
|
+
import { StatusStrip } from './StatusStrip.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* One of the signed-in reporter's issues: its state, the conversation with support, who support knows the reporter
|
|
17
|
+
* is, support's access, and what the reporter can do with it. It stays current as support works on the issue.
|
|
18
|
+
* Usable on its own, such as on a page of the solution, or inside the my issues side sheet.
|
|
19
|
+
*/ const IssueView = (props)=>/*#__PURE__*/ jsx(UsherBoundary, {
|
|
20
|
+
children: /*#__PURE__*/ jsx(IssueViewContent, {
|
|
21
|
+
...props
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
const IssueViewContent = ({ issueId, onBack })=>{
|
|
25
|
+
const labels = useUsherLabels();
|
|
26
|
+
const [result] = ForIssue.use({
|
|
27
|
+
issueId
|
|
28
|
+
});
|
|
29
|
+
// The query answers with the issue or with nothing: an issue the reporter did not report, or one support's session
|
|
30
|
+
// is not for, is never sent.
|
|
31
|
+
const issue = result.data?.[0];
|
|
32
|
+
const isLoaded = result.hasData && issue?.id !== undefined;
|
|
33
|
+
if (!isLoaded) {
|
|
34
|
+
return /*#__PURE__*/ jsx("div", {
|
|
35
|
+
className: "usher-issue-view",
|
|
36
|
+
children: /*#__PURE__*/ jsx(Message, {
|
|
37
|
+
severity: result.isPerforming ? 'info' : 'secondary',
|
|
38
|
+
text: result.isPerforming ? labels.issue.loading : labels.issue.notFound
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const openQuestion = issue.openQuestion;
|
|
43
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
44
|
+
className: "usher-issue-view",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsx(IssueHeader, {
|
|
47
|
+
issue: issue,
|
|
48
|
+
onBack: onBack
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ jsx(StatusStrip, {
|
|
51
|
+
state: issue.state
|
|
52
|
+
}),
|
|
53
|
+
isOpenQuestion(openQuestion?.questionId) && /*#__PURE__*/ jsx(QuestionBanner, {
|
|
54
|
+
question: openQuestion.question
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ jsxs("div", {
|
|
57
|
+
className: "usher-issue-view__body",
|
|
58
|
+
children: [
|
|
59
|
+
/*#__PURE__*/ jsx(IssueConversationPanel, {
|
|
60
|
+
issue: issue
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ jsxs("aside", {
|
|
63
|
+
className: "usher-issue-view__side",
|
|
64
|
+
children: [
|
|
65
|
+
/*#__PURE__*/ jsx(IdentityPanel, {
|
|
66
|
+
issue: issue
|
|
67
|
+
}),
|
|
68
|
+
/*#__PURE__*/ jsx(AccessPanel, {
|
|
69
|
+
issue: issue
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ jsx(IssueActions, {
|
|
72
|
+
issue: issue
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export { IssueView };
|
|
83
|
+
//# sourceMappingURL=IssueView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueView.js","sources":["../../../../Issues/IssueView/IssueView.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Message } from '@cratis/components/Display';\nimport { Guid } from '@cratis/fundamentals';\nimport { ForIssue } from '@cratis/showrunner.usher';\nimport { UsherBoundary } from '../../Provider/UsherBoundary.js';\nimport { useUsherLabels } from '../../Provider/UsherContext.js';\nimport { isOpenQuestion } from '../conversationMessages.js';\nimport { AccessPanel } from './AccessPanel.js';\nimport { IdentityPanel } from './IdentityPanel.js';\nimport { IssueActions } from './IssueActions.js';\nimport { IssueConversationPanel } from './IssueConversationPanel.js';\nimport { IssueHeader } from './IssueHeader.js';\nimport { QuestionBanner } from './QuestionBanner.js';\nimport { StatusStrip } from './StatusStrip.js';\n\n/**\n * Props for {@link IssueView}.\n */\nexport interface IssueViewProps {\n /** The issue to show. */\n issueId: Guid;\n\n /** Goes back to the list of issues; no back button when not given. */\n onBack?: () => void;\n}\n\n/**\n * One of the signed-in reporter's issues: its state, the conversation with support, who support knows the reporter\n * is, support's access, and what the reporter can do with it. It stays current as support works on the issue.\n * Usable on its own, such as on a page of the solution, or inside the my issues side sheet.\n */\nexport const IssueView = (props: IssueViewProps) => (\n <UsherBoundary>\n <IssueViewContent {...props} />\n </UsherBoundary>\n);\n\nconst IssueViewContent = ({ issueId, onBack }: IssueViewProps) => {\n const labels = useUsherLabels();\n const [result] = ForIssue.use({ issueId });\n\n // The query answers with the issue or with nothing: an issue the reporter did not report, or one support's session\n // is not for, is never sent.\n const issue = result.data?.[0];\n const isLoaded = result.hasData && issue?.id !== undefined;\n\n if (!isLoaded) {\n return (\n <div className='usher-issue-view'>\n <Message severity={result.isPerforming ? 'info' : 'secondary'} text={result.isPerforming ? labels.issue.loading : labels.issue.notFound} />\n </div>\n );\n }\n\n const openQuestion = issue.openQuestion;\n\n return (\n <div className='usher-issue-view'>\n <IssueHeader issue={issue} onBack={onBack} />\n <StatusStrip state={issue.state} />\n {isOpenQuestion(openQuestion?.questionId) && <QuestionBanner question={openQuestion.question} />}\n <div className='usher-issue-view__body'>\n <IssueConversationPanel issue={issue} />\n <aside className='usher-issue-view__side'>\n <IdentityPanel issue={issue} />\n <AccessPanel issue={issue} />\n <IssueActions issue={issue} />\n </aside>\n </div>\n </div>\n );\n};\n"],"names":["IssueView","props","_jsx","UsherBoundary","IssueViewContent","issueId","onBack","labels","useUsherLabels","result","ForIssue","use","issue","data","isLoaded","hasData","id","undefined","div","className","Message","severity","isPerforming","text","loading","notFound","openQuestion","_jsxs","IssueHeader","StatusStrip","state","isOpenQuestion","questionId","QuestionBanner","question","IssueConversationPanel","aside","IdentityPanel","AccessPanel","IssueActions"],"mappings":";;;;;;;;;;;;;;AA4BA;;;;AAIC,IACM,MAAMA,SAAAA,GAAY,CAACC,sBACtBC,GAAA,CAACC,aAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,GAAA,CAACE,gBAAAA,EAAAA;AAAkB,YAAA,GAAGH;;AAE5B,KAAA;AAEF,MAAMG,mBAAmB,CAAC,EAAEC,OAAO,EAAEC,MAAM,EAAkB,GAAA;AACzD,IAAA,MAAMC,MAAAA,GAASC,cAAAA,EAAAA;AACf,IAAA,MAAM,CAACC,MAAAA,CAAO,GAAGC,QAAAA,CAASC,GAAG,CAAC;AAAEN,QAAAA;AAAQ,KAAA,CAAA;;;AAIxC,IAAA,MAAMO,KAAAA,GAAQH,MAAAA,CAAOI,IAAI,GAAG,CAAA,CAAE;AAC9B,IAAA,MAAMC,QAAAA,GAAWL,MAAAA,CAAOM,OAAO,IAAIH,OAAOI,EAAAA,KAAOC,SAAAA;AAEjD,IAAA,IAAI,CAACH,QAAAA,EAAU;AACX,QAAA,qBACIZ,GAAA,CAACgB,KAAAA,EAAAA;YAAIC,SAAAA,EAAU,kBAAA;AACX,YAAA,QAAA,gBAAAjB,GAAA,CAACkB,OAAAA,EAAAA;gBAAQC,QAAAA,EAAUZ,MAAAA,CAAOa,YAAY,GAAG,MAAA,GAAS,WAAA;gBAAaC,IAAAA,EAAMd,MAAAA,CAAOa,YAAY,GAAGf,MAAAA,CAAOK,KAAK,CAACY,OAAO,GAAGjB,MAAAA,CAAOK,KAAK,CAACa;;;AAG3I,IAAA;IAEA,MAAMC,YAAAA,GAAed,MAAMc,YAAY;AAEvC,IAAA,qBACIC,IAAA,CAACT,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,kBAAA;;0BACXjB,GAAA,CAAC0B,WAAAA,EAAAA;gBAAYhB,KAAAA,EAAOA,KAAAA;gBAAON,MAAAA,EAAQA;;0BACnCJ,GAAA,CAAC2B,WAAAA,EAAAA;AAAYC,gBAAAA,KAAAA,EAAOlB,MAAMkB;;YACzBC,cAAAA,CAAeL,YAAAA,EAAcM,6BAAe9B,GAAA,CAAC+B,cAAAA,EAAAA;AAAeC,gBAAAA,QAAAA,EAAUR,aAAaQ;;0BACpFP,IAAA,CAACT,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,wBAAA;;kCACXjB,GAAA,CAACiC,sBAAAA,EAAAA;wBAAuBvB,KAAAA,EAAOA;;kCAC/Be,IAAA,CAACS,OAAAA,EAAAA;wBAAMjB,SAAAA,EAAU,wBAAA;;0CACbjB,GAAA,CAACmC,aAAAA,EAAAA;gCAAczB,KAAAA,EAAOA;;0CACtBV,GAAA,CAACoC,WAAAA,EAAAA;gCAAY1B,KAAAA,EAAOA;;0CACpBV,GAAA,CAACqC,YAAAA,EAAAA;gCAAa3B,KAAAA,EAAOA;;;;;;;;AAKzC,CAAA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuestionBanner.d.ts","sourceRoot":"","sources":["../../../../Issues/IssueView/QuestionBanner.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,mBAAmB;IAEhC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAKD,eAAO,MAAM,cAAc,GAAI,cAAc,mBAAmB,gCAQ/D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Message } from '@cratis/components/Display';
|
|
3
|
+
import { format } from '../../Labels/format.js';
|
|
4
|
+
import { useUsherLabels } from '../../Provider/UsherContext.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Tells the reporter that support waits for an answer, and that their next message answers it.
|
|
8
|
+
*/ const QuestionBanner = ({ question })=>{
|
|
9
|
+
const labels = useUsherLabels();
|
|
10
|
+
return /*#__PURE__*/ jsx("div", {
|
|
11
|
+
className: "usher-question-banner",
|
|
12
|
+
children: /*#__PURE__*/ jsx(Message, {
|
|
13
|
+
severity: "warn",
|
|
14
|
+
text: format(labels.issue.questionBanner, {
|
|
15
|
+
question
|
|
16
|
+
})
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { QuestionBanner };
|
|
22
|
+
//# sourceMappingURL=QuestionBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuestionBanner.js","sources":["../../../../Issues/IssueView/QuestionBanner.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Message } from '@cratis/components/Display';\nimport { format } from '../../Labels/index.js';\nimport { useUsherLabels } from '../../Provider/UsherContext.js';\n\n/**\n * Props for {@link QuestionBanner}.\n */\nexport interface QuestionBannerProps {\n /** What support asked. */\n question: string;\n}\n\n/**\n * Tells the reporter that support waits for an answer, and that their next message answers it.\n */\nexport const QuestionBanner = ({ question }: QuestionBannerProps) => {\n const labels = useUsherLabels();\n\n return (\n <div className='usher-question-banner'>\n <Message severity='warn' text={format(labels.issue.questionBanner, { question })} />\n </div>\n );\n};\n"],"names":["QuestionBanner","question","labels","useUsherLabels","_jsx","div","className","Message","severity","text","format","issue","questionBanner"],"mappings":";;;;;AAeA;;AAEC,IACM,MAAMA,cAAAA,GAAiB,CAAC,EAAEC,QAAQ,EAAuB,GAAA;AAC5D,IAAA,MAAMC,MAAAA,GAASC,cAAAA,EAAAA;AAEf,IAAA,qBACIC,GAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,uBAAA;AACX,QAAA,QAAA,gBAAAF,GAAA,CAACG,OAAAA,EAAAA;YAAQC,QAAAA,EAAS,MAAA;AAAOC,YAAAA,IAAAA,EAAMC,MAAAA,CAAOR,MAAAA,CAAOS,KAAK,CAACC,cAAc,EAAE;AAAEX,gBAAAA;AAAS,aAAA;;;AAG1F;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Guid } from '@cratis/fundamentals';
|
|
2
|
+
export interface ReopenIssueDialogProps {
|
|
3
|
+
issueId: Guid;
|
|
4
|
+
}
|
|
5
|
+
export declare const ReopenIssueDialog: ({ issueId }: ReopenIssueDialogProps) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ReopenIssueDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReopenIssueDialog.d.ts","sourceRoot":"","sources":["../../../../Issues/IssueView/ReopenIssueDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAO5C,MAAM,WAAW,sBAAsB;IAEnC,OAAO,EAAE,IAAI,CAAC;CACjB;AAKD,eAAO,MAAM,iBAAiB,GAAI,aAAa,sBAAsB,gCAepE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { CommandDialog } from '@cratis/components/CommandDialog';
|
|
3
|
+
import { TextAreaField } from '@cratis/components/CommandForm';
|
|
4
|
+
import { DialogInitialFocus } from '@cratis/components/Dialogs';
|
|
5
|
+
import { ReopenIssue } from '@cratis/showrunner.usher';
|
|
6
|
+
import { useUsherLabels } from '../../Provider/UsherContext.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Lets the reporter reopen a resolved issue, saying why it is not fixed.
|
|
10
|
+
*/ const ReopenIssueDialog = ({ issueId })=>{
|
|
11
|
+
const labels = useUsherLabels();
|
|
12
|
+
return /*#__PURE__*/ jsx(CommandDialog, {
|
|
13
|
+
command: ReopenIssue,
|
|
14
|
+
title: labels.actions.reopenTitle,
|
|
15
|
+
okLabel: labels.actions.reopen,
|
|
16
|
+
cancelLabel: labels.common.cancel,
|
|
17
|
+
closeAriaLabel: labels.common.close,
|
|
18
|
+
initialFocus: DialogInitialFocus.Content,
|
|
19
|
+
initialValues: {
|
|
20
|
+
issueId,
|
|
21
|
+
reason: ''
|
|
22
|
+
},
|
|
23
|
+
children: /*#__PURE__*/ jsx(TextAreaField, {
|
|
24
|
+
value: (command)=>command.reason,
|
|
25
|
+
title: labels.actions.reopenReason,
|
|
26
|
+
rows: 4
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { ReopenIssueDialog };
|
|
32
|
+
//# sourceMappingURL=ReopenIssueDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReopenIssueDialog.js","sources":["../../../../Issues/IssueView/ReopenIssueDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CommandDialog } from '@cratis/components/CommandDialog';\nimport { TextAreaField } from '@cratis/components/CommandForm';\nimport { DialogInitialFocus } from '@cratis/components/Dialogs';\nimport { Guid } from '@cratis/fundamentals';\nimport { ReopenIssue } from '@cratis/showrunner.usher';\nimport { useUsherLabels } from '../../Provider/UsherContext.js';\n\n/**\n * Props for {@link ReopenIssueDialog}.\n */\nexport interface ReopenIssueDialogProps {\n /** The issue. */\n issueId: Guid;\n}\n\n/**\n * Lets the reporter reopen a resolved issue, saying why it is not fixed.\n */\nexport const ReopenIssueDialog = ({ issueId }: ReopenIssueDialogProps) => {\n const labels = useUsherLabels();\n\n return (\n <CommandDialog<ReopenIssue>\n command={ReopenIssue}\n title={labels.actions.reopenTitle}\n okLabel={labels.actions.reopen}\n cancelLabel={labels.common.cancel}\n closeAriaLabel={labels.common.close}\n initialFocus={DialogInitialFocus.Content}\n initialValues={{ issueId, reason: '' }}>\n <TextAreaField<ReopenIssue> value={command => command.reason} title={labels.actions.reopenReason} rows={4} />\n </CommandDialog>\n );\n};\n"],"names":["ReopenIssueDialog","issueId","labels","useUsherLabels","_jsx","CommandDialog","command","ReopenIssue","title","actions","reopenTitle","okLabel","reopen","cancelLabel","common","cancel","closeAriaLabel","close","initialFocus","DialogInitialFocus","Content","initialValues","reason","TextAreaField","value","reopenReason","rows"],"mappings":";;;;;;;AAkBA;;AAEC,IACM,MAAMA,iBAAAA,GAAoB,CAAC,EAAEC,OAAO,EAA0B,GAAA;AACjE,IAAA,MAAMC,MAAAA,GAASC,cAAAA,EAAAA;AAEf,IAAA,qBACIC,GAAA,CAACC,aAAAA,EAAAA;QACGC,OAAAA,EAASC,WAAAA;QACTC,KAAAA,EAAON,MAAAA,CAAOO,OAAO,CAACC,WAAW;QACjCC,OAAAA,EAAST,MAAAA,CAAOO,OAAO,CAACG,MAAM;QAC9BC,WAAAA,EAAaX,MAAAA,CAAOY,MAAM,CAACC,MAAM;QACjCC,cAAAA,EAAgBd,MAAAA,CAAOY,MAAM,CAACG,KAAK;AACnCC,QAAAA,YAAAA,EAAcC,mBAAmBC,OAAO;QACxCC,aAAAA,EAAe;AAAEpB,YAAAA,OAAAA;YAASqB,MAAAA,EAAQ;AAAG,SAAA;AACrC,QAAA,QAAA,gBAAAlB,GAAA,CAACmB,aAAAA,EAAAA;YAA2BC,KAAAA,EAAOlB,CAAAA,OAAAA,GAAWA,OAAAA,CAAQgB,MAAM;YAAEd,KAAAA,EAAON,MAAAA,CAAOO,OAAO,CAACgB,YAAY;YAAEC,IAAAA,EAAM;;;AAGpH;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Guid } from '@cratis/fundamentals';
|
|
2
|
+
export interface ShareIdentityDialogProps {
|
|
3
|
+
issueId: Guid;
|
|
4
|
+
}
|
|
5
|
+
export declare const ShareIdentityDialog: ({ issueId }: ShareIdentityDialogProps) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ShareIdentityDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareIdentityDialog.d.ts","sourceRoot":"","sources":["../../../../Issues/IssueView/ShareIdentityDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAO5C,MAAM,WAAW,wBAAwB;IAErC,OAAO,EAAE,IAAI,CAAC;CACjB;AAMD,eAAO,MAAM,mBAAmB,GAAI,aAAa,wBAAwB,gCAexE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { CommandDialog } from '@cratis/components/CommandDialog';
|
|
3
|
+
import { DialogInitialFocus } from '@cratis/components/Dialogs';
|
|
4
|
+
import { ShareIdentity } from '@cratis/showrunner.usher';
|
|
5
|
+
import { useUsherLabels } from '../../Provider/UsherContext.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Asks the reporter to confirm that support may know who they are on an issue. Sharing cannot be undone, so the
|
|
9
|
+
* dialog opens with focus on cancel.
|
|
10
|
+
*/ const ShareIdentityDialog = ({ issueId })=>{
|
|
11
|
+
const labels = useUsherLabels();
|
|
12
|
+
return /*#__PURE__*/ jsx(CommandDialog, {
|
|
13
|
+
command: ShareIdentity,
|
|
14
|
+
title: labels.identity.shareTitle,
|
|
15
|
+
okLabel: labels.identity.shareConfirm,
|
|
16
|
+
cancelLabel: labels.common.cancel,
|
|
17
|
+
closeAriaLabel: labels.common.close,
|
|
18
|
+
initialFocus: DialogInitialFocus.Cancel,
|
|
19
|
+
initialValues: {
|
|
20
|
+
issueId
|
|
21
|
+
},
|
|
22
|
+
children: /*#__PURE__*/ jsx("p", {
|
|
23
|
+
className: "usher-dialog-text",
|
|
24
|
+
children: labels.identity.shareDescription
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { ShareIdentityDialog };
|
|
30
|
+
//# sourceMappingURL=ShareIdentityDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareIdentityDialog.js","sources":["../../../../Issues/IssueView/ShareIdentityDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CommandDialog } from '@cratis/components/CommandDialog';\nimport { DialogInitialFocus } from '@cratis/components/Dialogs';\nimport { Guid } from '@cratis/fundamentals';\nimport { ShareIdentity } from '@cratis/showrunner.usher';\nimport { useUsherLabels } from '../../Provider/UsherContext.js';\n\n/**\n * Props for {@link ShareIdentityDialog}.\n */\nexport interface ShareIdentityDialogProps {\n /** The issue. */\n issueId: Guid;\n}\n\n/**\n * Asks the reporter to confirm that support may know who they are on an issue. Sharing cannot be undone, so the\n * dialog opens with focus on cancel.\n */\nexport const ShareIdentityDialog = ({ issueId }: ShareIdentityDialogProps) => {\n const labels = useUsherLabels();\n\n return (\n <CommandDialog<ShareIdentity>\n command={ShareIdentity}\n title={labels.identity.shareTitle}\n okLabel={labels.identity.shareConfirm}\n cancelLabel={labels.common.cancel}\n closeAriaLabel={labels.common.close}\n initialFocus={DialogInitialFocus.Cancel}\n initialValues={{ issueId }}>\n <p className='usher-dialog-text'>{labels.identity.shareDescription}</p>\n </CommandDialog>\n );\n};\n"],"names":["ShareIdentityDialog","issueId","labels","useUsherLabels","_jsx","CommandDialog","command","ShareIdentity","title","identity","shareTitle","okLabel","shareConfirm","cancelLabel","common","cancel","closeAriaLabel","close","initialFocus","DialogInitialFocus","Cancel","initialValues","p","className","shareDescription"],"mappings":";;;;;;AAiBA;;;AAGC,IACM,MAAMA,mBAAAA,GAAsB,CAAC,EAAEC,OAAO,EAA4B,GAAA;AACrE,IAAA,MAAMC,MAAAA,GAASC,cAAAA,EAAAA;AAEf,IAAA,qBACIC,GAAA,CAACC,aAAAA,EAAAA;QACGC,OAAAA,EAASC,aAAAA;QACTC,KAAAA,EAAON,MAAAA,CAAOO,QAAQ,CAACC,UAAU;QACjCC,OAAAA,EAAST,MAAAA,CAAOO,QAAQ,CAACG,YAAY;QACrCC,WAAAA,EAAaX,MAAAA,CAAOY,MAAM,CAACC,MAAM;QACjCC,cAAAA,EAAgBd,MAAAA,CAAOY,MAAM,CAACG,KAAK;AACnCC,QAAAA,YAAAA,EAAcC,mBAAmBC,MAAM;QACvCC,aAAAA,EAAe;AAAEpB,YAAAA;AAAQ,SAAA;AACzB,QAAA,QAAA,gBAAAG,GAAA,CAACkB,GAAAA,EAAAA;YAAEC,SAAAA,EAAU,mBAAA;sBAAqBrB,MAAAA,CAAOO,QAAQ,CAACe;;;AAG9D;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusStrip.d.ts","sourceRoot":"","sources":["../../../../Issues/IssueView/StatusStrip.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAOtD,MAAM,WAAW,gBAAgB;IAE7B,KAAK,EAAE,UAAU,CAAC;CACrB;AAKD,eAAO,MAAM,WAAW,GAAI,WAAW,gBAAgB,gCAuBtD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { IssueState } from '@cratis/showrunner.usher';
|
|
3
|
+
import { useUsherLabels } from '../../Provider/UsherContext.js';
|
|
4
|
+
import { statusStepOf, statusSteps, stateBadgeFor } from '../issueStates.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shows how far along an issue is, from reported to resolved. The step reached is marked as the current step.
|
|
8
|
+
*/ const StatusStrip = ({ state })=>{
|
|
9
|
+
const labels = useUsherLabels();
|
|
10
|
+
const reached = statusStepOf(state);
|
|
11
|
+
const closedOtherwise = state === IssueState.wontFix || state === IssueState.withdrawn;
|
|
12
|
+
return /*#__PURE__*/ jsx("ol", {
|
|
13
|
+
className: "usher-status-strip",
|
|
14
|
+
children: statusSteps.map((step, index)=>{
|
|
15
|
+
const isCurrent = index === reached;
|
|
16
|
+
const label = isCurrent && closedOtherwise ? stateBadgeFor(state, labels).label : stateBadgeFor(step, labels).label;
|
|
17
|
+
return /*#__PURE__*/ jsx("li", {
|
|
18
|
+
className: "usher-status-strip__step",
|
|
19
|
+
"data-reached": index <= reached || undefined,
|
|
20
|
+
"data-current": isCurrent || undefined,
|
|
21
|
+
"aria-current": isCurrent ? 'step' : undefined,
|
|
22
|
+
children: label
|
|
23
|
+
}, step);
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { StatusStrip };
|
|
29
|
+
//# sourceMappingURL=StatusStrip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusStrip.js","sources":["../../../../Issues/IssueView/StatusStrip.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IssueState } from '@cratis/showrunner.usher';\nimport { useUsherLabels } from '../../Provider/UsherContext.js';\nimport { stateBadgeFor, statusStepOf, statusSteps } from '../issueStates.js';\n\n/**\n * Props for {@link StatusStrip}.\n */\nexport interface StatusStripProps {\n /** The state the issue is in. */\n state: IssueState;\n}\n\n/**\n * Shows how far along an issue is, from reported to resolved. The step reached is marked as the current step.\n */\nexport const StatusStrip = ({ state }: StatusStripProps) => {\n const labels = useUsherLabels();\n const reached = statusStepOf(state);\n const closedOtherwise = state === IssueState.wontFix || state === IssueState.withdrawn;\n\n return (\n <ol className='usher-status-strip'>\n {statusSteps.map((step, index) => {\n const isCurrent = index === reached;\n const label = isCurrent && closedOtherwise ? stateBadgeFor(state, labels).label : stateBadgeFor(step, labels).label;\n return (\n <li\n key={step}\n className='usher-status-strip__step'\n data-reached={index <= reached || undefined}\n data-current={isCurrent || undefined}\n aria-current={isCurrent ? 'step' : undefined}>\n {label}\n </li>\n );\n })}\n </ol>\n );\n};\n"],"names":["StatusStrip","state","labels","useUsherLabels","reached","statusStepOf","closedOtherwise","IssueState","wontFix","withdrawn","_jsx","ol","className","statusSteps","map","step","index","isCurrent","label","stateBadgeFor","li","data-reached","undefined","data-current","aria-current"],"mappings":";;;;;AAeA;;AAEC,IACM,MAAMA,WAAAA,GAAc,CAAC,EAAEC,KAAK,EAAoB,GAAA;AACnD,IAAA,MAAMC,MAAAA,GAASC,cAAAA,EAAAA;AACf,IAAA,MAAMC,UAAUC,YAAAA,CAAaJ,KAAAA,CAAAA;AAC7B,IAAA,MAAMK,kBAAkBL,KAAAA,KAAUM,UAAAA,CAAWC,OAAO,IAAIP,KAAAA,KAAUM,WAAWE,SAAS;AAEtF,IAAA,qBACIC,GAAA,CAACC,IAAAA,EAAAA;QAAGC,SAAAA,EAAU,oBAAA;kBACTC,WAAAA,CAAYC,GAAG,CAAC,CAACC,IAAAA,EAAMC,KAAAA,GAAAA;AACpB,YAAA,MAAMC,YAAYD,KAAAA,KAAUZ,OAAAA;YAC5B,MAAMc,KAAAA,GAAQD,SAAAA,IAAaX,eAAAA,GAAkBa,aAAAA,CAAclB,KAAAA,EAAOC,MAAAA,CAAAA,CAAQgB,KAAK,GAAGC,aAAAA,CAAcJ,IAAAA,EAAMb,MAAAA,CAAAA,CAAQgB,KAAK;AACnH,YAAA,qBACIR,GAAA,CAACU,IAAAA,EAAAA;gBAEGR,SAAAA,EAAU,0BAAA;AACVS,gBAAAA,cAAAA,EAAcL,SAASZ,OAAAA,IAAWkB,SAAAA;AAClCC,gBAAAA,cAAAA,EAAcN,SAAAA,IAAaK,SAAAA;AAC3BE,gBAAAA,cAAAA,EAAcP,YAAY,MAAA,GAASK,SAAAA;AAClCJ,gBAAAA,QAAAA,EAAAA;AALIH,aAAAA,EAAAA,IAAAA,CAAAA;AAQjB,QAAA,CAAA;;AAGZ;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConversationEntry, SupportSession } from '@cratis/showrunner.usher';
|
|
2
|
+
export interface SupportSessionsProps {
|
|
3
|
+
sessions: SupportSession[];
|
|
4
|
+
entries: ConversationEntry[];
|
|
5
|
+
}
|
|
6
|
+
export declare const SupportSessions: ({ sessions, entries }: SupportSessionsProps) => import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=SupportSessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SupportSessions.d.ts","sourceRoot":"","sources":["../../../../Issues/IssueView/SupportSessions.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU7E,MAAM,WAAW,oBAAoB;IAEjC,QAAQ,EAAE,cAAc,EAAE,CAAC;IAG3B,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAKD,eAAO,MAAM,eAAe,GAAI,uBAAuB,oBAAoB,gCAgC1E,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { format } from '../../Labels/format.js';
|
|
3
|
+
import { useUsherContext } from '../../Provider/UsherContext.js';
|
|
4
|
+
import { formatTime, formatClock } from '../../Reporting/AccessChoice.js';
|
|
5
|
+
import { isSessionRunning } from '../accessStatus.js';
|
|
6
|
+
import { sessionActivityOf } from '../sessionActivity.js';
|
|
7
|
+
|
|
8
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
9
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
10
|
+
/**
|
|
11
|
+
* Lists the sessions in which support signed in as the reporter, each with what support did as the reporter in it.
|
|
12
|
+
*/ const SupportSessions = ({ sessions, entries })=>{
|
|
13
|
+
const { labels, locale } = useUsherContext();
|
|
14
|
+
if (sessions.length === 0) {
|
|
15
|
+
return /*#__PURE__*/ jsx("p", {
|
|
16
|
+
className: "usher-panel__text usher-panel__text--secondary",
|
|
17
|
+
children: labels.accessPanel.noSessions
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
21
|
+
className: "usher-sessions",
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ jsx("span", {
|
|
24
|
+
className: "usher-sessions__heading",
|
|
25
|
+
children: labels.accessPanel.sessionsHeading
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ jsx("ul", {
|
|
28
|
+
className: "usher-sessions__list",
|
|
29
|
+
children: sessions.map((session)=>{
|
|
30
|
+
const start = formatTime(asDate(session.startedAt), locale);
|
|
31
|
+
const end = isSessionRunning(session) ? labels.accessPanel.sessionRunning : formatClock(asDate(session.endedAt), locale);
|
|
32
|
+
const name = (session.author?.name ?? '').length > 0 ? session.author.name : labels.conversation.support;
|
|
33
|
+
const activity = sessionActivityOf(session, entries, labels.accessPanel.sessionActions);
|
|
34
|
+
return /*#__PURE__*/ jsxs("li", {
|
|
35
|
+
children: [
|
|
36
|
+
format(labels.accessPanel.session, {
|
|
37
|
+
name,
|
|
38
|
+
start,
|
|
39
|
+
end
|
|
40
|
+
}),
|
|
41
|
+
activity.length > 0 ? /*#__PURE__*/ jsx("ul", {
|
|
42
|
+
className: "usher-sessions__activity",
|
|
43
|
+
children: activity.map((action)=>/*#__PURE__*/ jsx("li", {
|
|
44
|
+
children: action.text
|
|
45
|
+
}, action.entryId))
|
|
46
|
+
}) : /*#__PURE__*/ jsx("p", {
|
|
47
|
+
className: "usher-sessions__activity usher-panel__text--secondary",
|
|
48
|
+
children: labels.accessPanel.sessionDidNothing
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}, session.sessionId.toString());
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const asDate = (value)=>value instanceof Date ? value : new Date(value);
|
|
58
|
+
|
|
59
|
+
export { SupportSessions };
|
|
60
|
+
//# sourceMappingURL=SupportSessions.js.map
|