@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 @@
|
|
|
1
|
+
{"version":3,"file":"MyIssuesList.d.ts","sourceRoot":"","sources":["../../../Issues/MyIssuesList.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAQzD,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAE5D;AAQD,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,GAAG,aAAa,EAAE,CAE3F;AAOD,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAExE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var issueStates = require('./issueStates.js');
|
|
4
|
+
|
|
5
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
6
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
7
|
+
/**
|
|
8
|
+
* Counts the issues support waits for the reporter on.
|
|
9
|
+
* @param issues The reporter's issues.
|
|
10
|
+
* @returns How many issues support waits for the reporter on.
|
|
11
|
+
*/ function waitingCount(issues) {
|
|
12
|
+
return issues.filter((issue)=>issue.waitingOnReporter).length;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Gets the issues to list.
|
|
16
|
+
* @param issues The reporter's issues, most recent activity first.
|
|
17
|
+
* @param showClosed Whether to list closed issues too.
|
|
18
|
+
* @returns The issues to list, in the order given.
|
|
19
|
+
*/ function visibleIssues(issues, showClosed) {
|
|
20
|
+
return showClosed ? issues : issues.filter((issue)=>!issueStates.isClosed(issue.state));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Checks whether a release has the fix for an issue.
|
|
24
|
+
* @param issue The issue.
|
|
25
|
+
* @returns True when a release has the fix.
|
|
26
|
+
*/ function isFixReleased(issue) {
|
|
27
|
+
return typeof issue.fixedInVersion === 'string' && issue.fixedInVersion.length > 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.isFixReleased = isFixReleased;
|
|
31
|
+
exports.visibleIssues = visibleIssues;
|
|
32
|
+
exports.waitingCount = waitingCount;
|
|
33
|
+
//# sourceMappingURL=MyIssuesList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyIssuesList.js","sources":["../../../Issues/MyIssuesList.ts"],"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 { ReportedIssue } from '@cratis/showrunner.usher';\nimport { isClosed } from './issueStates.js';\n\n/**\n * Counts the issues support waits for the reporter on.\n * @param issues The reporter's issues.\n * @returns How many issues support waits for the reporter on.\n */\nexport function waitingCount(issues: ReportedIssue[]): number {\n return issues.filter(issue => issue.waitingOnReporter).length;\n}\n\n/**\n * Gets the issues to list.\n * @param issues The reporter's issues, most recent activity first.\n * @param showClosed Whether to list closed issues too.\n * @returns The issues to list, in the order given.\n */\nexport function visibleIssues(issues: ReportedIssue[], showClosed: boolean): ReportedIssue[] {\n return showClosed ? issues : issues.filter(issue => !isClosed(issue.state));\n}\n\n/**\n * Checks whether a release has the fix for an issue.\n * @param issue The issue.\n * @returns True when a release has the fix.\n */\nexport function isFixReleased(issue: { fixedInVersion: string }): boolean {\n return typeof issue.fixedInVersion === 'string' && issue.fixedInVersion.length > 0;\n}\n"],"names":["waitingCount","issues","filter","issue","waitingOnReporter","length","visibleIssues","showClosed","isClosed","state","isFixReleased","fixedInVersion"],"mappings":";;;;AAAA;AACA;AAKA;;;;IAKO,SAASA,YAAAA,CAAaC,MAAuB,EAAA;IAChD,OAAOA,MAAAA,CAAOC,MAAM,CAACC,CAAAA,QAASA,KAAAA,CAAMC,iBAAiB,EAAEC,MAAM;AACjE;AAEA;;;;;AAKC,IACM,SAASC,aAAAA,CAAcL,MAAuB,EAAEM,UAAmB,EAAA;IACtE,OAAOA,UAAAA,GAAaN,MAAAA,GAASA,MAAAA,CAAOC,MAAM,CAACC,CAAAA,KAAAA,GAAS,CAACK,oBAAAA,CAASL,KAAAA,CAAMM,KAAK,CAAA,CAAA;AAC7E;AAEA;;;;IAKO,SAASC,aAAAA,CAAcP,KAAiC,EAAA;IAC3D,OAAO,OAAOA,MAAMQ,cAAc,KAAK,YAAYR,KAAAA,CAAMQ,cAAc,CAACN,MAAM,GAAG,CAAA;AACrF;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IssueAccess } from '@cratis/showrunner.usher';
|
|
2
|
+
export declare enum AccessStatus {
|
|
3
|
+
notGranted = "notGranted",
|
|
4
|
+
requested = "requested",
|
|
5
|
+
granted = "granted"
|
|
6
|
+
}
|
|
7
|
+
export declare function accessStatusOf(access: IssueAccess | undefined, now: Date): AccessStatus;
|
|
8
|
+
export declare const AccessStatusRefreshInterval = 60000;
|
|
9
|
+
export declare function nextAccessStatusCheckIn(access: IssueAccess | undefined, now: Date): number;
|
|
10
|
+
export declare function isSessionRunning(session: {
|
|
11
|
+
ended: boolean;
|
|
12
|
+
}): boolean;
|
|
13
|
+
//# sourceMappingURL=accessStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessStatus.d.ts","sourceRoot":"","sources":["../../../Issues/accessStatus.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKpE,oBAAY,YAAY;IAEpB,UAAU,eAAe;IAGzB,SAAS,cAAc;IAGvB,OAAO,YAAY;CACtB;AASD,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,GAAG,EAAE,IAAI,GAAG,YAAY,CAWvF;AAKD,eAAO,MAAM,2BAA2B,QAAS,CAAC;AASlD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,GAAG,EAAE,IAAI,GAAG,MAAM,CAO1F;AAOD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAErE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
4
|
+
|
|
5
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
6
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
7
|
+
/**
|
|
8
|
+
* Whether support may sign in as the reporter on an issue, as the access panel shows it.
|
|
9
|
+
*/ var AccessStatus = /*#__PURE__*/ function(AccessStatus) {
|
|
10
|
+
/** Support may not sign in, and does not ask to. */ AccessStatus["notGranted"] = "notGranted";
|
|
11
|
+
/** Support asks to sign in. */ AccessStatus["requested"] = "requested";
|
|
12
|
+
/** Support may sign in until the grant ends. */ AccessStatus["granted"] = "granted";
|
|
13
|
+
return AccessStatus;
|
|
14
|
+
}({});
|
|
15
|
+
/**
|
|
16
|
+
* Decides whether support may sign in as the reporter, against the clock: a grant that has passed its end is over,
|
|
17
|
+
* even before the backend records that it lapsed.
|
|
18
|
+
* @param access The {@link IssueAccess}; nothing when the issue has none yet.
|
|
19
|
+
* @param now What time it is.
|
|
20
|
+
* @returns The {@link AccessStatus}.
|
|
21
|
+
*/ function accessStatusOf(access, now) {
|
|
22
|
+
if (!access) {
|
|
23
|
+
return "notGranted";
|
|
24
|
+
}
|
|
25
|
+
const validUntil = access.validUntil instanceof Date ? access.validUntil : new Date(access.validUntil);
|
|
26
|
+
if (access.state === showrunner_usher.AccessState.granted && validUntil.getTime() > now.getTime()) {
|
|
27
|
+
return "granted";
|
|
28
|
+
}
|
|
29
|
+
return access.request?.pending ? "requested" : "notGranted";
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The longest the access panel waits before it decides the status again, so it stays right even when the clock jumps.
|
|
33
|
+
*/ const AccessStatusRefreshInterval = 60_000;
|
|
34
|
+
/**
|
|
35
|
+
* Gets how long until the status changes by itself: a live grant ends at its end. Nothing else changes the status
|
|
36
|
+
* without a new fact from the backend.
|
|
37
|
+
* @param access The {@link IssueAccess}; nothing when the issue has none yet.
|
|
38
|
+
* @param now What time it is.
|
|
39
|
+
* @returns How many milliseconds until the status is decided again, at most {@link AccessStatusRefreshInterval}.
|
|
40
|
+
*/ function nextAccessStatusCheckIn(access, now) {
|
|
41
|
+
if (accessStatusOf(access, now) !== "granted") {
|
|
42
|
+
return AccessStatusRefreshInterval;
|
|
43
|
+
}
|
|
44
|
+
const validUntil = access.validUntil instanceof Date ? access.validUntil : new Date(access.validUntil);
|
|
45
|
+
return Math.min(Math.max(validUntil.getTime() - now.getTime(), 0), AccessStatusRefreshInterval);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Checks whether a support session is still running.
|
|
49
|
+
* @param session The session.
|
|
50
|
+
* @returns True while it runs.
|
|
51
|
+
*/ function isSessionRunning(session) {
|
|
52
|
+
return !session.ended;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exports.AccessStatus = AccessStatus;
|
|
56
|
+
exports.AccessStatusRefreshInterval = AccessStatusRefreshInterval;
|
|
57
|
+
exports.accessStatusOf = accessStatusOf;
|
|
58
|
+
exports.isSessionRunning = isSessionRunning;
|
|
59
|
+
exports.nextAccessStatusCheckIn = nextAccessStatusCheckIn;
|
|
60
|
+
//# sourceMappingURL=accessStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessStatus.js","sources":["../../../Issues/accessStatus.ts"],"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 { AccessState, IssueAccess } from '@cratis/showrunner.usher';\n\n/**\n * Whether support may sign in as the reporter on an issue, as the access panel shows it.\n */\nexport enum AccessStatus {\n /** Support may not sign in, and does not ask to. */\n notGranted = 'notGranted',\n\n /** Support asks to sign in. */\n requested = 'requested',\n\n /** Support may sign in until the grant ends. */\n granted = 'granted'\n}\n\n/**\n * Decides whether support may sign in as the reporter, against the clock: a grant that has passed its end is over,\n * even before the backend records that it lapsed.\n * @param access The {@link IssueAccess}; nothing when the issue has none yet.\n * @param now What time it is.\n * @returns The {@link AccessStatus}.\n */\nexport function accessStatusOf(access: IssueAccess | undefined, now: Date): AccessStatus {\n if (!access) {\n return AccessStatus.notGranted;\n }\n\n const validUntil = access.validUntil instanceof Date ? access.validUntil : new Date(access.validUntil);\n if (access.state === AccessState.granted && validUntil.getTime() > now.getTime()) {\n return AccessStatus.granted;\n }\n\n return access.request?.pending ? AccessStatus.requested : AccessStatus.notGranted;\n}\n\n/**\n * The longest the access panel waits before it decides the status again, so it stays right even when the clock jumps.\n */\nexport const AccessStatusRefreshInterval = 60_000;\n\n/**\n * Gets how long until the status changes by itself: a live grant ends at its end. Nothing else changes the status\n * without a new fact from the backend.\n * @param access The {@link IssueAccess}; nothing when the issue has none yet.\n * @param now What time it is.\n * @returns How many milliseconds until the status is decided again, at most {@link AccessStatusRefreshInterval}.\n */\nexport function nextAccessStatusCheckIn(access: IssueAccess | undefined, now: Date): number {\n if (accessStatusOf(access, now) !== AccessStatus.granted) {\n return AccessStatusRefreshInterval;\n }\n\n const validUntil = access!.validUntil instanceof Date ? access!.validUntil : new Date(access!.validUntil);\n return Math.min(Math.max(validUntil.getTime() - now.getTime(), 0), AccessStatusRefreshInterval);\n}\n\n/**\n * Checks whether a support session is still running.\n * @param session The session.\n * @returns True while it runs.\n */\nexport function isSessionRunning(session: { ended: boolean }): boolean {\n return !session.ended;\n}\n"],"names":["AccessStatus","accessStatusOf","access","now","validUntil","Date","state","AccessState","granted","getTime","request","pending","AccessStatusRefreshInterval","nextAccessStatusCheckIn","Math","min","max","isSessionRunning","session","ended"],"mappings":";;;;AAAA;AACA;AAIA;;IAGO,IAAKA,YAAAA,iBAAAA,SAAAA,YAAAA,EAAAA;yDAC0C,YAAA,CAAA,YAAA,CAAA,GAAA,YAAA;oCAGrB,YAAA,CAAA,WAAA,CAAA,GAAA,WAAA;qDAGiB,YAAA,CAAA,SAAA,CAAA,GAAA,SAAA;AAPtCA,IAAAA,OAAAA,YAAAA;AASX,CAAA,CAAA,EAAA;AAED;;;;;;AAMC,IACM,SAASC,cAAAA,CAAeC,MAA+B,EAAEC,GAAS,EAAA;AACrE,IAAA,IAAI,CAACD,MAAAA,EAAQ;AACT,QAAA,OAAA,YAAA;AACJ,IAAA;IAEA,MAAME,UAAAA,GAAaF,MAAAA,CAAOE,UAAU,YAAYC,IAAAA,GAAOH,MAAAA,CAAOE,UAAU,GAAG,IAAIC,IAAAA,CAAKH,MAAAA,CAAOE,UAAU,CAAA;IACrG,IAAIF,MAAAA,CAAOI,KAAK,KAAKC,4BAAAA,CAAYC,OAAO,IAAIJ,UAAAA,CAAWK,OAAO,EAAA,GAAKN,GAAAA,CAAIM,OAAO,EAAA,EAAI;AAC9E,QAAA,OAAA,SAAA;AACJ,IAAA;IAEA,OAAOP,MAAAA,CAAOQ,OAAO,EAAEC,OAAAA,GAAAA,WAAAA,GAAAA,YAAAA;AAC3B;AAEA;;IAGO,MAAMC,2BAAAA,GAA8B;AAE3C;;;;;;AAMC,IACM,SAASC,uBAAAA,CAAwBX,MAA+B,EAAEC,GAAS,EAAA;IAC9E,IAAIF,cAAAA,CAAeC,QAAQC,GAAAA,CAAAA,KAAAA,SAAAA,EAA+B;QACtD,OAAOS,2BAAAA;AACX,IAAA;IAEA,MAAMR,UAAAA,GAAaF,MAAAA,CAAQE,UAAU,YAAYC,IAAAA,GAAOH,MAAAA,CAAQE,UAAU,GAAG,IAAIC,IAAAA,CAAKH,MAAAA,CAAQE,UAAU,CAAA;AACxG,IAAA,OAAOU,IAAAA,CAAKC,GAAG,CAACD,IAAAA,CAAKE,GAAG,CAACZ,UAAAA,CAAWK,OAAO,EAAA,GAAKN,GAAAA,CAAIM,OAAO,EAAA,EAAI,CAAA,CAAA,EAAIG,2BAAAA,CAAAA;AACvE;AAEA;;;;IAKO,SAASK,gBAAAA,CAAiBC,OAA2B,EAAA;IACxD,OAAO,CAACA,QAAQC,KAAK;AACzB;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChatAuthor, ChatIdentifier, ChatMessage } from '@cratis/components/Chat';
|
|
2
|
+
import { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import { ConversationAuthorKind, ConversationEntry, ConversationEntryKind } from '@cratis/showrunner.usher';
|
|
4
|
+
import { UsherLabels } from '../Labels/index.js';
|
|
5
|
+
export interface ConversationMessage extends ChatMessage {
|
|
6
|
+
readonly kind: ConversationEntryKind;
|
|
7
|
+
readonly questionId: Guid;
|
|
8
|
+
}
|
|
9
|
+
export declare function authorIdFor(authorKind: ConversationAuthorKind, authorName: string): string;
|
|
10
|
+
export declare function authorOf(authorId: ChatIdentifier, labels: UsherLabels): ChatAuthor;
|
|
11
|
+
export declare function bodyOf(entry: ConversationEntry, labels: UsherLabels): string;
|
|
12
|
+
export declare function conversationMessages(issueId: Guid, entries: ConversationEntry[], labels: UsherLabels): ConversationMessage[];
|
|
13
|
+
export declare function isOpenQuestion(questionId: Guid | undefined): questionId is Guid;
|
|
14
|
+
//# sourceMappingURL=conversationMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversationMessages.d.ts","sourceRoot":"","sources":["../../../Issues/conversationMessages.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC5G,OAAO,EAAmC,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKlF,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IAEpD,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IAGrC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;CAC7B;AA8CD,wBAAgB,WAAW,CAAC,UAAU,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAK1F;AAQD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,GAAG,UAAU,CAgBlF;AAQD,wBAAgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAO5E;AASD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAU5H;AAOD,wBAAgB,cAAc,CAAC,UAAU,EAAE,IAAI,GAAG,SAAS,GAAG,UAAU,IAAI,IAAI,CAE/E"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Chat = require('@cratis/components/Chat');
|
|
4
|
+
var fundamentals = require('@cratis/fundamentals');
|
|
5
|
+
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
6
|
+
var format = require('../Labels/format.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
|
+
const textKinds = new Set([
|
|
11
|
+
showrunner_usher.ConversationEntryKind.errorReported,
|
|
12
|
+
showrunner_usher.ConversationEntryKind.issueDescribed,
|
|
13
|
+
showrunner_usher.ConversationEntryKind.detailsAdded,
|
|
14
|
+
showrunner_usher.ConversationEntryKind.questionAsked,
|
|
15
|
+
showrunner_usher.ConversationEntryKind.questionAnswered,
|
|
16
|
+
showrunner_usher.ConversationEntryKind.replied
|
|
17
|
+
]);
|
|
18
|
+
const eventLabelKeys = {
|
|
19
|
+
[showrunner_usher.ConversationEntryKind.identityShared]: 'identityShared',
|
|
20
|
+
[showrunner_usher.ConversationEntryKind.accessGranted]: 'accessGranted',
|
|
21
|
+
[showrunner_usher.ConversationEntryKind.accessRevoked]: 'accessRevoked',
|
|
22
|
+
[showrunner_usher.ConversationEntryKind.accessLapsed]: 'accessLapsed',
|
|
23
|
+
[showrunner_usher.ConversationEntryKind.accessRequested]: 'accessRequested',
|
|
24
|
+
[showrunner_usher.ConversationEntryKind.supportSignedIn]: 'supportSignedIn',
|
|
25
|
+
[showrunner_usher.ConversationEntryKind.supportSessionEnded]: 'supportSessionEnded',
|
|
26
|
+
[showrunner_usher.ConversationEntryKind.triaged]: 'triaged',
|
|
27
|
+
[showrunner_usher.ConversationEntryKind.accepted]: 'accepted',
|
|
28
|
+
[showrunner_usher.ConversationEntryKind.declinedToFix]: 'declinedToFix',
|
|
29
|
+
[showrunner_usher.ConversationEntryKind.workStarted]: 'workStarted',
|
|
30
|
+
[showrunner_usher.ConversationEntryKind.resolved]: 'resolved',
|
|
31
|
+
[showrunner_usher.ConversationEntryKind.reopened]: 'reopened',
|
|
32
|
+
[showrunner_usher.ConversationEntryKind.withdrawn]: 'withdrawn',
|
|
33
|
+
[showrunner_usher.ConversationEntryKind.linkedToKnownIssue]: 'linkedToKnownIssue',
|
|
34
|
+
[showrunner_usher.ConversationEntryKind.unlinkedFromKnownIssue]: 'unlinkedFromKnownIssue',
|
|
35
|
+
[showrunner_usher.ConversationEntryKind.linkedToWorkItem]: 'linkedToWorkItem',
|
|
36
|
+
[showrunner_usher.ConversationEntryKind.unlinkedFromWorkItem]: 'unlinkedFromWorkItem',
|
|
37
|
+
[showrunner_usher.ConversationEntryKind.fixReleased]: 'fixReleased'
|
|
38
|
+
};
|
|
39
|
+
const authorKindNames = {
|
|
40
|
+
[showrunner_usher.ConversationAuthorKind.reporter]: 'reporter',
|
|
41
|
+
[showrunner_usher.ConversationAuthorKind.support]: 'support',
|
|
42
|
+
[showrunner_usher.ConversationAuthorKind.agent]: 'agent',
|
|
43
|
+
[showrunner_usher.ConversationAuthorKind.system]: 'system'
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Gets the author id a conversation entry is shown under: who it is from and, for support and agents, their name.
|
|
47
|
+
* @param authorKind Who the entry is from.
|
|
48
|
+
* @param authorName The name of the support person or agent; empty when the desk hides it.
|
|
49
|
+
* @returns The author id.
|
|
50
|
+
*/ function authorIdFor(authorKind, authorName) {
|
|
51
|
+
const kind = authorKindNames[authorKind] ?? authorKindNames[showrunner_usher.ConversationAuthorKind.system];
|
|
52
|
+
return authorKind === showrunner_usher.ConversationAuthorKind.support || authorKind === showrunner_usher.ConversationAuthorKind.agent ? `${kind}:${authorName ?? ''}` : kind;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Resolves an author id of the conversation to who the chat shows.
|
|
56
|
+
* @param authorId The author id, as {@link authorIdFor} gives it.
|
|
57
|
+
* @param labels The labels to show.
|
|
58
|
+
* @returns The {@link ChatAuthor}.
|
|
59
|
+
*/ function authorOf(authorId, labels) {
|
|
60
|
+
const id = authorId.toString();
|
|
61
|
+
const separator = id.indexOf(':');
|
|
62
|
+
const kind = separator >= 0 ? id.substring(0, separator) : id;
|
|
63
|
+
const name = separator >= 0 ? id.substring(separator + 1) : '';
|
|
64
|
+
switch(kind){
|
|
65
|
+
case 'reporter':
|
|
66
|
+
return {
|
|
67
|
+
name: labels.conversation.you,
|
|
68
|
+
kind: Chat.ChatAuthorKind.User
|
|
69
|
+
};
|
|
70
|
+
case 'support':
|
|
71
|
+
return {
|
|
72
|
+
name: name.length > 0 ? name : labels.conversation.support,
|
|
73
|
+
kind: Chat.ChatAuthorKind.User
|
|
74
|
+
};
|
|
75
|
+
case 'agent':
|
|
76
|
+
return {
|
|
77
|
+
name: name.length > 0 ? name : labels.conversation.support,
|
|
78
|
+
kind: Chat.ChatAuthorKind.Agent
|
|
79
|
+
};
|
|
80
|
+
default:
|
|
81
|
+
return {
|
|
82
|
+
name: labels.conversation.update,
|
|
83
|
+
kind: Chat.ChatAuthorKind.Agent
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Gets what the chat shows for an entry: its text for what someone wrote, and a sentence for what happened.
|
|
89
|
+
* @param entry The {@link ConversationEntry}.
|
|
90
|
+
* @param labels The labels to show.
|
|
91
|
+
* @returns The body of the message.
|
|
92
|
+
*/ function bodyOf(entry, labels) {
|
|
93
|
+
if (textKinds.has(entry.kind)) {
|
|
94
|
+
return entry.text;
|
|
95
|
+
}
|
|
96
|
+
const key = eventLabelKeys[entry.kind];
|
|
97
|
+
return key ? format.format(labels.conversation.events[key], {
|
|
98
|
+
text: entry.text ?? ''
|
|
99
|
+
}) : entry.text;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Converts the entries of the conversation on an issue to the messages the chat shows.
|
|
103
|
+
* @param issueId The issue.
|
|
104
|
+
* @param entries The entries, oldest first.
|
|
105
|
+
* @param labels The labels to show.
|
|
106
|
+
* @returns The {@link ConversationMessage} for every entry, oldest first.
|
|
107
|
+
*/ function conversationMessages(issueId, entries, labels) {
|
|
108
|
+
return entries.map((entry)=>({
|
|
109
|
+
id: `${entry.entryId}`,
|
|
110
|
+
topicId: issueId,
|
|
111
|
+
authorId: authorIdFor(entry.authorKind, entry.authorName),
|
|
112
|
+
body: bodyOf(entry, labels),
|
|
113
|
+
timestamp: entry.at instanceof Date ? entry.at : new Date(entry.at),
|
|
114
|
+
kind: entry.kind,
|
|
115
|
+
questionId: entry.questionId ?? fundamentals.Guid.empty
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Checks whether a question is open: there is one, and the reporter has not answered it.
|
|
120
|
+
* @param questionId The question; empty when there is none.
|
|
121
|
+
* @returns True when there is a question to answer.
|
|
122
|
+
*/ function isOpenQuestion(questionId) {
|
|
123
|
+
return questionId !== undefined && !fundamentals.Guid.empty.equals(questionId);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
exports.authorIdFor = authorIdFor;
|
|
127
|
+
exports.authorOf = authorOf;
|
|
128
|
+
exports.bodyOf = bodyOf;
|
|
129
|
+
exports.conversationMessages = conversationMessages;
|
|
130
|
+
exports.isOpenQuestion = isOpenQuestion;
|
|
131
|
+
//# sourceMappingURL=conversationMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversationMessages.js","sources":["../../../Issues/conversationMessages.ts"],"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 { ChatAuthor, ChatAuthorKind, ChatIdentifier, ChatMessage } from '@cratis/components/Chat';\nimport { Guid } from '@cratis/fundamentals';\nimport { ConversationAuthorKind, ConversationEntry, ConversationEntryKind } from '@cratis/showrunner.usher';\nimport { ConversationEventLabels, format, UsherLabels } from '../Labels/index.js';\n\n/**\n * A message in the conversation on an issue, as the chat shows it.\n */\nexport interface ConversationMessage extends ChatMessage {\n /** What the entry records. */\n readonly kind: ConversationEntryKind;\n\n /** The question a question or an answer is about; empty for other entries. */\n readonly questionId: Guid;\n}\n\nconst textKinds = new Set<ConversationEntryKind>([\n ConversationEntryKind.errorReported,\n ConversationEntryKind.issueDescribed,\n ConversationEntryKind.detailsAdded,\n ConversationEntryKind.questionAsked,\n ConversationEntryKind.questionAnswered,\n ConversationEntryKind.replied\n]);\n\nconst eventLabelKeys: Partial<Record<ConversationEntryKind, keyof ConversationEventLabels>> = {\n [ConversationEntryKind.identityShared]: 'identityShared',\n [ConversationEntryKind.accessGranted]: 'accessGranted',\n [ConversationEntryKind.accessRevoked]: 'accessRevoked',\n [ConversationEntryKind.accessLapsed]: 'accessLapsed',\n [ConversationEntryKind.accessRequested]: 'accessRequested',\n [ConversationEntryKind.supportSignedIn]: 'supportSignedIn',\n [ConversationEntryKind.supportSessionEnded]: 'supportSessionEnded',\n [ConversationEntryKind.triaged]: 'triaged',\n [ConversationEntryKind.accepted]: 'accepted',\n [ConversationEntryKind.declinedToFix]: 'declinedToFix',\n [ConversationEntryKind.workStarted]: 'workStarted',\n [ConversationEntryKind.resolved]: 'resolved',\n [ConversationEntryKind.reopened]: 'reopened',\n [ConversationEntryKind.withdrawn]: 'withdrawn',\n [ConversationEntryKind.linkedToKnownIssue]: 'linkedToKnownIssue',\n [ConversationEntryKind.unlinkedFromKnownIssue]: 'unlinkedFromKnownIssue',\n [ConversationEntryKind.linkedToWorkItem]: 'linkedToWorkItem',\n [ConversationEntryKind.unlinkedFromWorkItem]: 'unlinkedFromWorkItem',\n [ConversationEntryKind.fixReleased]: 'fixReleased'\n};\n\nconst authorKindNames: Record<ConversationAuthorKind, string> = {\n [ConversationAuthorKind.reporter]: 'reporter',\n [ConversationAuthorKind.support]: 'support',\n [ConversationAuthorKind.agent]: 'agent',\n [ConversationAuthorKind.system]: 'system'\n};\n\n/**\n * Gets the author id a conversation entry is shown under: who it is from and, for support and agents, their name.\n * @param authorKind Who the entry is from.\n * @param authorName The name of the support person or agent; empty when the desk hides it.\n * @returns The author id.\n */\nexport function authorIdFor(authorKind: ConversationAuthorKind, authorName: string): string {\n const kind = authorKindNames[authorKind] ?? authorKindNames[ConversationAuthorKind.system];\n return authorKind === ConversationAuthorKind.support || authorKind === ConversationAuthorKind.agent\n ? `${kind}:${authorName ?? ''}`\n : kind;\n}\n\n/**\n * Resolves an author id of the conversation to who the chat shows.\n * @param authorId The author id, as {@link authorIdFor} gives it.\n * @param labels The labels to show.\n * @returns The {@link ChatAuthor}.\n */\nexport function authorOf(authorId: ChatIdentifier, labels: UsherLabels): ChatAuthor {\n const id = authorId.toString();\n const separator = id.indexOf(':');\n const kind = separator >= 0 ? id.substring(0, separator) : id;\n const name = separator >= 0 ? id.substring(separator + 1) : '';\n\n switch (kind) {\n case 'reporter':\n return { name: labels.conversation.you, kind: ChatAuthorKind.User };\n case 'support':\n return { name: name.length > 0 ? name : labels.conversation.support, kind: ChatAuthorKind.User };\n case 'agent':\n return { name: name.length > 0 ? name : labels.conversation.support, kind: ChatAuthorKind.Agent };\n default:\n return { name: labels.conversation.update, kind: ChatAuthorKind.Agent };\n }\n}\n\n/**\n * Gets what the chat shows for an entry: its text for what someone wrote, and a sentence for what happened.\n * @param entry The {@link ConversationEntry}.\n * @param labels The labels to show.\n * @returns The body of the message.\n */\nexport function bodyOf(entry: ConversationEntry, labels: UsherLabels): string {\n if (textKinds.has(entry.kind)) {\n return entry.text;\n }\n\n const key = eventLabelKeys[entry.kind];\n return key ? format(labels.conversation.events[key], { text: entry.text ?? '' }) : entry.text;\n}\n\n/**\n * Converts the entries of the conversation on an issue to the messages the chat shows.\n * @param issueId The issue.\n * @param entries The entries, oldest first.\n * @param labels The labels to show.\n * @returns The {@link ConversationMessage} for every entry, oldest first.\n */\nexport function conversationMessages(issueId: Guid, entries: ConversationEntry[], labels: UsherLabels): ConversationMessage[] {\n return entries.map(entry => ({\n id: `${entry.entryId}`,\n topicId: issueId,\n authorId: authorIdFor(entry.authorKind, entry.authorName),\n body: bodyOf(entry, labels),\n timestamp: entry.at instanceof Date ? entry.at : new Date(entry.at),\n kind: entry.kind,\n questionId: entry.questionId ?? Guid.empty\n }));\n}\n\n/**\n * Checks whether a question is open: there is one, and the reporter has not answered it.\n * @param questionId The question; empty when there is none.\n * @returns True when there is a question to answer.\n */\nexport function isOpenQuestion(questionId: Guid | undefined): questionId is Guid {\n return questionId !== undefined && !Guid.empty.equals(questionId);\n}\n"],"names":["textKinds","Set","ConversationEntryKind","errorReported","issueDescribed","detailsAdded","questionAsked","questionAnswered","replied","eventLabelKeys","identityShared","accessGranted","accessRevoked","accessLapsed","accessRequested","supportSignedIn","supportSessionEnded","triaged","accepted","declinedToFix","workStarted","resolved","reopened","withdrawn","linkedToKnownIssue","unlinkedFromKnownIssue","linkedToWorkItem","unlinkedFromWorkItem","fixReleased","authorKindNames","ConversationAuthorKind","reporter","support","agent","system","authorIdFor","authorKind","authorName","kind","authorOf","authorId","labels","id","toString","separator","indexOf","substring","name","conversation","you","ChatAuthorKind","User","length","Agent","update","bodyOf","entry","has","text","key","format","events","conversationMessages","issueId","entries","map","entryId","topicId","body","timestamp","at","Date","questionId","Guid","empty","isOpenQuestion","undefined","equals"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './accessStatus.js';
|
|
2
|
+
export * from './conversationMessages.js';
|
|
3
|
+
export * from './issueStates.js';
|
|
4
|
+
export * from './IssueView/index.js';
|
|
5
|
+
export * from './MyIssues/index.js';
|
|
6
|
+
export * from './MyIssuesList.js';
|
|
7
|
+
export * from './webAddress.js';
|
|
8
|
+
export * from './useAccessStatus.js';
|
|
9
|
+
export * from './sessionActivity.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Issues/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TagSeverity } from '@cratis/components/Display';
|
|
2
|
+
import { IssueState } from '@cratis/showrunner.usher';
|
|
3
|
+
import { UsherLabels } from '../Labels/index.js';
|
|
4
|
+
export interface StateBadge {
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly severity: TagSeverity;
|
|
7
|
+
}
|
|
8
|
+
export declare function stateBadgeFor(state: IssueState, labels: UsherLabels): StateBadge;
|
|
9
|
+
export declare function isClosed(state: IssueState): boolean;
|
|
10
|
+
export declare const statusSteps: IssueState[];
|
|
11
|
+
export declare function statusStepOf(state: IssueState): number;
|
|
12
|
+
//# sourceMappingURL=issueStates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issueStates.d.ts","sourceRoot":"","sources":["../../../Issues/issueStates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,MAAM,WAAW,UAAU;IAEvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAGvB,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;CAClC;AAQD,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,UAAU,CAmBhF;AAOD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAEnD;AAKD,eAAO,MAAM,WAAW,EAAE,UAAU,EAA+G,CAAC;AAQpJ,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAGtD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
4
|
+
|
|
5
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
6
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
7
|
+
/**
|
|
8
|
+
* Gets how the state of an issue is shown.
|
|
9
|
+
* @param state The {@link IssueState}.
|
|
10
|
+
* @param labels The labels to show.
|
|
11
|
+
* @returns The {@link StateBadge}.
|
|
12
|
+
*/ function stateBadgeFor(state, labels) {
|
|
13
|
+
switch(state){
|
|
14
|
+
case showrunner_usher.IssueState.reported:
|
|
15
|
+
return {
|
|
16
|
+
label: labels.states.reported,
|
|
17
|
+
severity: 'secondary'
|
|
18
|
+
};
|
|
19
|
+
case showrunner_usher.IssueState.triaged:
|
|
20
|
+
return {
|
|
21
|
+
label: labels.states.triaged,
|
|
22
|
+
severity: 'info'
|
|
23
|
+
};
|
|
24
|
+
case showrunner_usher.IssueState.accepted:
|
|
25
|
+
return {
|
|
26
|
+
label: labels.states.accepted,
|
|
27
|
+
severity: 'info'
|
|
28
|
+
};
|
|
29
|
+
case showrunner_usher.IssueState.inProgress:
|
|
30
|
+
return {
|
|
31
|
+
label: labels.states.inProgress,
|
|
32
|
+
severity: 'warn'
|
|
33
|
+
};
|
|
34
|
+
case showrunner_usher.IssueState.resolved:
|
|
35
|
+
return {
|
|
36
|
+
label: labels.states.resolved,
|
|
37
|
+
severity: 'success'
|
|
38
|
+
};
|
|
39
|
+
case showrunner_usher.IssueState.wontFix:
|
|
40
|
+
return {
|
|
41
|
+
label: labels.states.wontFix,
|
|
42
|
+
severity: 'contrast'
|
|
43
|
+
};
|
|
44
|
+
case showrunner_usher.IssueState.withdrawn:
|
|
45
|
+
return {
|
|
46
|
+
label: labels.states.withdrawn,
|
|
47
|
+
severity: 'secondary'
|
|
48
|
+
};
|
|
49
|
+
default:
|
|
50
|
+
return {
|
|
51
|
+
label: labels.states.reported,
|
|
52
|
+
severity: 'secondary'
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Checks whether an issue is closed: resolved, won't fix or withdrawn.
|
|
58
|
+
* @param state The {@link IssueState}.
|
|
59
|
+
* @returns True when closed.
|
|
60
|
+
*/ function isClosed(state) {
|
|
61
|
+
return state === showrunner_usher.IssueState.resolved || state === showrunner_usher.IssueState.wontFix || state === showrunner_usher.IssueState.withdrawn;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The steps of the status strip of an issue, in order.
|
|
65
|
+
*/ const statusSteps = [
|
|
66
|
+
showrunner_usher.IssueState.reported,
|
|
67
|
+
showrunner_usher.IssueState.triaged,
|
|
68
|
+
showrunner_usher.IssueState.accepted,
|
|
69
|
+
showrunner_usher.IssueState.inProgress,
|
|
70
|
+
showrunner_usher.IssueState.resolved
|
|
71
|
+
];
|
|
72
|
+
/**
|
|
73
|
+
* Gets how far along the status strip an issue is.
|
|
74
|
+
* @param state The {@link IssueState}.
|
|
75
|
+
* @returns The index of the step reached; the last step for an issue support will not fix or the reporter
|
|
76
|
+
* withdrew, as nothing more happens on it.
|
|
77
|
+
*/ function statusStepOf(state) {
|
|
78
|
+
const index = statusSteps.indexOf(state);
|
|
79
|
+
return index >= 0 ? index : statusSteps.length - 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
exports.isClosed = isClosed;
|
|
83
|
+
exports.stateBadgeFor = stateBadgeFor;
|
|
84
|
+
exports.statusStepOf = statusStepOf;
|
|
85
|
+
exports.statusSteps = statusSteps;
|
|
86
|
+
//# sourceMappingURL=issueStates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issueStates.js","sources":["../../../Issues/issueStates.ts"],"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 { TagSeverity } from '@cratis/components/Display';\nimport { IssueState } from '@cratis/showrunner.usher';\nimport { UsherLabels } from '../Labels/index.js';\n\n/**\n * How the state of an issue is shown.\n */\nexport interface StateBadge {\n /** The text. */\n readonly label: string;\n\n /** The severity of the tag that shows it. */\n readonly severity: TagSeverity;\n}\n\n/**\n * Gets how the state of an issue is shown.\n * @param state The {@link IssueState}.\n * @param labels The labels to show.\n * @returns The {@link StateBadge}.\n */\nexport function stateBadgeFor(state: IssueState, labels: UsherLabels): StateBadge {\n switch (state) {\n case IssueState.reported:\n return { label: labels.states.reported, severity: 'secondary' };\n case IssueState.triaged:\n return { label: labels.states.triaged, severity: 'info' };\n case IssueState.accepted:\n return { label: labels.states.accepted, severity: 'info' };\n case IssueState.inProgress:\n return { label: labels.states.inProgress, severity: 'warn' };\n case IssueState.resolved:\n return { label: labels.states.resolved, severity: 'success' };\n case IssueState.wontFix:\n return { label: labels.states.wontFix, severity: 'contrast' };\n case IssueState.withdrawn:\n return { label: labels.states.withdrawn, severity: 'secondary' };\n default:\n return { label: labels.states.reported, severity: 'secondary' };\n }\n}\n\n/**\n * Checks whether an issue is closed: resolved, won't fix or withdrawn.\n * @param state The {@link IssueState}.\n * @returns True when closed.\n */\nexport function isClosed(state: IssueState): boolean {\n return state === IssueState.resolved || state === IssueState.wontFix || state === IssueState.withdrawn;\n}\n\n/**\n * The steps of the status strip of an issue, in order.\n */\nexport const statusSteps: IssueState[] = [IssueState.reported, IssueState.triaged, IssueState.accepted, IssueState.inProgress, IssueState.resolved];\n\n/**\n * Gets how far along the status strip an issue is.\n * @param state The {@link IssueState}.\n * @returns The index of the step reached; the last step for an issue support will not fix or the reporter\n * withdrew, as nothing more happens on it.\n */\nexport function statusStepOf(state: IssueState): number {\n const index = statusSteps.indexOf(state);\n return index >= 0 ? index : statusSteps.length - 1;\n}\n"],"names":["stateBadgeFor","state","labels","IssueState","reported","label","states","severity","triaged","accepted","inProgress","resolved","wontFix","withdrawn","isClosed","statusSteps","statusStepOf","index","indexOf","length"],"mappings":";;;;AAAA;AACA;AAiBA;;;;;AAKC,IACM,SAASA,aAAAA,CAAcC,KAAiB,EAAEC,MAAmB,EAAA;IAChE,OAAQD,KAAAA;AACJ,QAAA,KAAKE,4BAAWC,QAAQ;YACpB,OAAO;gBAAEC,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACF,QAAQ;gBAAEG,QAAAA,EAAU;AAAY,aAAA;AAClE,QAAA,KAAKJ,4BAAWK,OAAO;YACnB,OAAO;gBAAEH,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACE,OAAO;gBAAED,QAAAA,EAAU;AAAO,aAAA;AAC5D,QAAA,KAAKJ,4BAAWM,QAAQ;YACpB,OAAO;gBAAEJ,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACG,QAAQ;gBAAEF,QAAAA,EAAU;AAAO,aAAA;AAC7D,QAAA,KAAKJ,4BAAWO,UAAU;YACtB,OAAO;gBAAEL,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACI,UAAU;gBAAEH,QAAAA,EAAU;AAAO,aAAA;AAC/D,QAAA,KAAKJ,4BAAWQ,QAAQ;YACpB,OAAO;gBAAEN,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACK,QAAQ;gBAAEJ,QAAAA,EAAU;AAAU,aAAA;AAChE,QAAA,KAAKJ,4BAAWS,OAAO;YACnB,OAAO;gBAAEP,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACM,OAAO;gBAAEL,QAAAA,EAAU;AAAW,aAAA;AAChE,QAAA,KAAKJ,4BAAWU,SAAS;YACrB,OAAO;gBAAER,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACO,SAAS;gBAAEN,QAAAA,EAAU;AAAY,aAAA;AACnE,QAAA;YACI,OAAO;gBAAEF,KAAAA,EAAOH,MAAAA,CAAOI,MAAM,CAACF,QAAQ;gBAAEG,QAAAA,EAAU;AAAY,aAAA;AACtE;AACJ;AAEA;;;;IAKO,SAASO,QAAAA,CAASb,KAAiB,EAAA;IACtC,OAAOA,KAAAA,KAAUE,2BAAAA,CAAWQ,QAAQ,IAAIV,KAAAA,KAAUE,4BAAWS,OAAO,IAAIX,KAAAA,KAAUE,2BAAAA,CAAWU,SAAS;AAC1G;AAEA;;UAGaE,WAAAA,GAA4B;AAACZ,IAAAA,2BAAAA,CAAWC,QAAQ;AAAED,IAAAA,2BAAAA,CAAWK,OAAO;AAAEL,IAAAA,2BAAAA,CAAWM,QAAQ;AAAEN,IAAAA,2BAAAA,CAAWO,UAAU;AAAEP,IAAAA,2BAAAA,CAAWQ;;AAE1I;;;;;IAMO,SAASK,YAAAA,CAAaf,KAAiB,EAAA;IAC1C,MAAMgB,KAAAA,GAAQF,WAAAA,CAAYG,OAAO,CAACjB,KAAAA,CAAAA;AAClC,IAAA,OAAOgB,KAAAA,IAAS,CAAA,GAAIA,KAAAA,GAAQF,WAAAA,CAAYI,MAAM,GAAG,CAAA;AACrD;;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConversationEntry, SupportSession } from '@cratis/showrunner.usher';
|
|
2
|
+
import { SessionActionLabels } from '../Labels/index.js';
|
|
3
|
+
export interface SessionActivity {
|
|
4
|
+
readonly entryId: string;
|
|
5
|
+
readonly text: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function sessionActivityOf(session: SupportSession, entries: ConversationEntry[], labels: SessionActionLabels): SessionActivity[];
|
|
8
|
+
//# sourceMappingURL=sessionActivity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionActivity.d.ts","sourceRoot":"","sources":["../../../Issues/sessionActivity.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAyB,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAU,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAcjE,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAGzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAUD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,mBAAmB,GAAG,eAAe,EAAE,CAQvI"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
4
|
+
var format = require('../Labels/format.js');
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
const actionLabelKeys = {
|
|
9
|
+
[showrunner_usher.ConversationEntryKind.detailsAdded]: 'detailsAdded',
|
|
10
|
+
[showrunner_usher.ConversationEntryKind.questionAnswered]: 'questionAnswered',
|
|
11
|
+
[showrunner_usher.ConversationEntryKind.identityShared]: 'identityShared',
|
|
12
|
+
[showrunner_usher.ConversationEntryKind.reopened]: 'reopened',
|
|
13
|
+
[showrunner_usher.ConversationEntryKind.withdrawn]: 'withdrawn',
|
|
14
|
+
[showrunner_usher.ConversationEntryKind.accessRevoked]: 'accessRevoked'
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Gets what support did as the reporter in a session, oldest first: the entries the backend credits to the session,
|
|
18
|
+
* without the session's own start and end.
|
|
19
|
+
* @param session The {@link SupportSession}.
|
|
20
|
+
* @param entries The entries of the conversation.
|
|
21
|
+
* @param labels The {@link SessionActionLabels}.
|
|
22
|
+
* @returns The {@link SessionActivity} of the session.
|
|
23
|
+
*/ function sessionActivityOf(session, entries, labels) {
|
|
24
|
+
const sessionId = session.sessionId.toString();
|
|
25
|
+
return entries.filter((entry)=>(entry.session ?? '').toString() === sessionId).flatMap((entry)=>{
|
|
26
|
+
const key = actionLabelKeys[entry.kind];
|
|
27
|
+
return key ? [
|
|
28
|
+
{
|
|
29
|
+
entryId: entry.entryId.toString(),
|
|
30
|
+
text: format.format(labels[key], {
|
|
31
|
+
text: entry.text ?? ''
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
] : [];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.sessionActivityOf = sessionActivityOf;
|
|
39
|
+
//# sourceMappingURL=sessionActivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionActivity.js","sources":["../../../Issues/sessionActivity.ts"],"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 { ConversationEntry, ConversationEntryKind, SupportSession } from '@cratis/showrunner.usher';\nimport { format, SessionActionLabels } from '../Labels/index.js';\n\nconst actionLabelKeys: Partial<Record<ConversationEntryKind, keyof SessionActionLabels>> = {\n [ConversationEntryKind.detailsAdded]: 'detailsAdded',\n [ConversationEntryKind.questionAnswered]: 'questionAnswered',\n [ConversationEntryKind.identityShared]: 'identityShared',\n [ConversationEntryKind.reopened]: 'reopened',\n [ConversationEntryKind.withdrawn]: 'withdrawn',\n [ConversationEntryKind.accessRevoked]: 'accessRevoked'\n};\n\n/**\n * What support did while signed in as the reporter in one session.\n */\nexport interface SessionActivity {\n /** The entry the action is. */\n readonly entryId: string;\n\n /** What was done, as the reporter is told. */\n readonly text: string;\n}\n\n/**\n * Gets what support did as the reporter in a session, oldest first: the entries the backend credits to the session,\n * without the session's own start and end.\n * @param session The {@link SupportSession}.\n * @param entries The entries of the conversation.\n * @param labels The {@link SessionActionLabels}.\n * @returns The {@link SessionActivity} of the session.\n */\nexport function sessionActivityOf(session: SupportSession, entries: ConversationEntry[], labels: SessionActionLabels): SessionActivity[] {\n const sessionId = session.sessionId.toString();\n return entries\n .filter(entry => (entry.session ?? '').toString() === sessionId)\n .flatMap(entry => {\n const key = actionLabelKeys[entry.kind];\n return key ? [{ entryId: entry.entryId.toString(), text: format(labels[key], { text: entry.text ?? '' }) }] : [];\n });\n}\n"],"names":["actionLabelKeys","ConversationEntryKind","detailsAdded","questionAnswered","identityShared","reopened","withdrawn","accessRevoked","sessionActivityOf","session","entries","labels","sessionId","toString","filter","entry","flatMap","key","kind","entryId","text","format"],"mappings":";;;;;AAAA;AACA;AAKA,MAAMA,eAAAA,GAAqF;IACvF,CAACC,sCAAAA,CAAsBC,YAAY,GAAG,cAAA;IACtC,CAACD,sCAAAA,CAAsBE,gBAAgB,GAAG,kBAAA;IAC1C,CAACF,sCAAAA,CAAsBG,cAAc,GAAG,gBAAA;IACxC,CAACH,sCAAAA,CAAsBI,QAAQ,GAAG,UAAA;IAClC,CAACJ,sCAAAA,CAAsBK,SAAS,GAAG,WAAA;IACnC,CAACL,sCAAAA,CAAsBM,aAAa,GAAG;AAC3C,CAAA;AAaA;;;;;;;AAOC,IACM,SAASC,iBAAAA,CAAkBC,OAAuB,EAAEC,OAA4B,EAAEC,MAA2B,EAAA;AAChH,IAAA,MAAMC,SAAAA,GAAYH,OAAAA,CAAQG,SAAS,CAACC,QAAQ,EAAA;AAC5C,IAAA,OAAOH,QACFI,MAAM,CAACC,CAAAA,KAAAA,GAAS,CAACA,KAAAA,CAAMN,OAAO,IAAI,EAAC,EAAGI,QAAQ,OAAOD,SAAAA,CAAAA,CACrDI,OAAO,CAACD,CAAAA,KAAAA,GAAAA;AACL,QAAA,MAAME,GAAAA,GAAMjB,eAAe,CAACe,KAAAA,CAAMG,IAAI,CAAC;AACvC,QAAA,OAAOD,GAAAA,GAAM;AAAC,YAAA;gBAAEE,OAAAA,EAASJ,KAAAA,CAAMI,OAAO,CAACN,QAAQ,EAAA;AAAIO,gBAAAA,IAAAA,EAAMC,aAAAA,CAAOV,MAAM,CAACM,GAAAA,CAAI,EAAE;oBAAEG,IAAAA,EAAML,KAAAA,CAAMK,IAAI,IAAI;AAAG,iBAAA;AAAG;AAAE,SAAA,GAAG,EAAE;AACpH,IAAA,CAAA,CAAA;AACR;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccessStatus.d.ts","sourceRoot":"","sources":["../../../Issues/useAccessStatus.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAA2C,MAAM,mBAAmB,CAAC;AAS1F,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,CASrF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
var accessStatus = require('./accessStatus.js');
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
/**
|
|
9
|
+
* Decides whether support may sign in as the reporter, and decides again when a grant reaches its end, or at the
|
|
10
|
+
* latest once a minute, so a grant that runs out while the view is open is shown as over
|
|
11
|
+
* without waiting for the backend to record the lapse.
|
|
12
|
+
* @param access The {@link IssueAccess}; nothing when the issue has none yet.
|
|
13
|
+
* @returns The {@link AccessStatus} now, and the time it was decided at.
|
|
14
|
+
*/ function useAccessStatus(access) {
|
|
15
|
+
const [now, setNow] = react.useState(()=>new Date());
|
|
16
|
+
react.useEffect(()=>{
|
|
17
|
+
const timer = setTimeout(()=>setNow(new Date()), accessStatus.nextAccessStatusCheckIn(access, new Date()));
|
|
18
|
+
return ()=>clearTimeout(timer);
|
|
19
|
+
}, [
|
|
20
|
+
access,
|
|
21
|
+
now
|
|
22
|
+
]);
|
|
23
|
+
return [
|
|
24
|
+
accessStatus.accessStatusOf(access, now),
|
|
25
|
+
now
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
exports.useAccessStatus = useAccessStatus;
|
|
30
|
+
//# sourceMappingURL=useAccessStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccessStatus.js","sources":["../../../Issues/useAccessStatus.ts"],"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 { IssueAccess } from '@cratis/showrunner.usher';\nimport { useEffect, useState } from 'react';\nimport { AccessStatus, accessStatusOf, nextAccessStatusCheckIn } from './accessStatus.js';\n\n/**\n * Decides whether support may sign in as the reporter, and decides again when a grant reaches its end, or at the\n * latest once a minute, so a grant that runs out while the view is open is shown as over\n * without waiting for the backend to record the lapse.\n * @param access The {@link IssueAccess}; nothing when the issue has none yet.\n * @returns The {@link AccessStatus} now, and the time it was decided at.\n */\nexport function useAccessStatus(access: IssueAccess | undefined): [AccessStatus, Date] {\n const [now, setNow] = useState(() => new Date());\n\n useEffect(() => {\n const timer = setTimeout(() => setNow(new Date()), nextAccessStatusCheckIn(access, new Date()));\n return () => clearTimeout(timer);\n }, [access, now]);\n\n return [accessStatusOf(access, now), now];\n}\n"],"names":["useAccessStatus","access","now","setNow","useState","Date","useEffect","timer","setTimeout","nextAccessStatusCheckIn","clearTimeout","accessStatusOf"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;IAOO,SAASA,eAAAA,CAAgBC,MAA+B,EAAA;AAC3D,IAAA,MAAM,CAACC,GAAAA,EAAKC,MAAAA,CAAO,GAAGC,cAAAA,CAAS,IAAM,IAAIC,IAAAA,EAAAA,CAAAA;IAEzCC,eAAAA,CAAU,IAAA;QACN,MAAMC,KAAAA,GAAQC,WAAW,IAAML,MAAAA,CAAO,IAAIE,IAAAA,EAAAA,CAAAA,EAASI,oCAAAA,CAAwBR,QAAQ,IAAII,IAAAA,EAAAA,CAAAA,CAAAA;AACvF,QAAA,OAAO,IAAMK,YAAAA,CAAaH,KAAAA,CAAAA;IAC9B,CAAA,EAAG;AAACN,QAAAA,MAAAA;AAAQC,QAAAA;AAAI,KAAA,CAAA;IAEhB,OAAO;AAACS,QAAAA,2BAAAA,CAAeV,MAAAA,EAAQC,GAAAA,CAAAA;AAAMA,QAAAA;AAAI,KAAA;AAC7C;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webAddress.d.ts","sourceRoot":"","sources":["../../../Issues/webAddress.ts"],"names":[],"mappings":"AAUA,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAWjE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Gets whether an address is an absolute `https` or `http` address, the only kind offered to the reporter as a link.
|
|
7
|
+
* Usher already records any other address from a desk as no address; this keeps a link from ever pointing at a
|
|
8
|
+
* `javascript:` or `data:` address should one reach the view some other way.
|
|
9
|
+
* @param address The address.
|
|
10
|
+
* @returns True when it is a web address.
|
|
11
|
+
*/ function isWebAddress(address) {
|
|
12
|
+
if (!address) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const { protocol } = new URL(address);
|
|
17
|
+
return protocol === 'https:' || protocol === 'http:';
|
|
18
|
+
} catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.isWebAddress = isWebAddress;
|
|
24
|
+
//# sourceMappingURL=webAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webAddress.js","sources":["../../../Issues/webAddress.ts"],"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\n/**\n * Gets whether an address is an absolute `https` or `http` address, the only kind offered to the reporter as a link.\n * Usher already records any other address from a desk as no address; this keeps a link from ever pointing at a\n * `javascript:` or `data:` address should one reach the view some other way.\n * @param address The address.\n * @returns True when it is a web address.\n */\nexport function isWebAddress(address: string | undefined): boolean {\n if (!address) {\n return false;\n }\n\n try {\n const { protocol } = new URL(address);\n return protocol === 'https:' || protocol === 'http:';\n } catch {\n return false;\n }\n}\n"],"names":["isWebAddress","address","protocol","URL"],"mappings":";;AAAA;AACA;AAEA;;;;;;IAOO,SAASA,YAAAA,CAAaC,OAA2B,EAAA;AACpD,IAAA,IAAI,CAACA,OAAAA,EAAS;QACV,OAAO,KAAA;AACX,IAAA;IAEA,IAAI;AACA,QAAA,MAAM,EAAEC,QAAQ,EAAE,GAAG,IAAIC,GAAAA,CAAIF,OAAAA,CAAAA;QAC7B,OAAOC,QAAAA,KAAa,YAAYA,QAAAA,KAAa,OAAA;AACjD,IAAA,CAAA,CAAE,OAAM;QACJ,OAAO,KAAA;AACX,IAAA;AACJ;;"}
|