@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,124 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
4
|
+
var ReportLimits = require('./ReportLimits.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
|
+
* Converts where something happened to the location a report carries.
|
|
10
|
+
* @param location The {@link ArcSliceLocation}, as `useSliceContext()` or a generated proxy gives it.
|
|
11
|
+
* @returns The {@link SliceLocation} of the report.
|
|
12
|
+
*/ function toReportLocation(location) {
|
|
13
|
+
const reportLocation = new showrunner_usher.SliceLocation();
|
|
14
|
+
reportLocation.module = location.module;
|
|
15
|
+
reportLocation.feature = location.feature;
|
|
16
|
+
reportLocation.slice = location.slice;
|
|
17
|
+
return reportLocation;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the initial values of the report a problem command.
|
|
21
|
+
* @param context The {@link ReportContext}.
|
|
22
|
+
* @returns The values.
|
|
23
|
+
*/ function reportIssueValues(context) {
|
|
24
|
+
return {
|
|
25
|
+
issueId: context.issueId,
|
|
26
|
+
summary: '',
|
|
27
|
+
description: '',
|
|
28
|
+
location: toReportLocation(context.location),
|
|
29
|
+
correlationIds: context.correlationIds.slice(-ReportLimits.ReportLimits.correlationIds),
|
|
30
|
+
applicationVersion: context.applicationVersion,
|
|
31
|
+
shareIdentity: context.shareIdentity,
|
|
32
|
+
grantAccess: false,
|
|
33
|
+
accessDuration: showrunner_usher.AccessDuration.oneDay
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Gets the initial values of the report this error command. The error's own location and correlation ids win over
|
|
38
|
+
* those of the context, as they say where the error happened.
|
|
39
|
+
* @param error The {@link ErrorDetails}.
|
|
40
|
+
* @param context The {@link ReportContext}.
|
|
41
|
+
* @returns The values.
|
|
42
|
+
*/ function reportErrorValues(error, context) {
|
|
43
|
+
return {
|
|
44
|
+
issueId: context.issueId,
|
|
45
|
+
errorMessage: error.message.slice(0, ReportLimits.ReportLimits.errorMessageLength),
|
|
46
|
+
errorType: error.type.slice(0, ReportLimits.ReportLimits.errorTypeLength),
|
|
47
|
+
stackFrames: error.stackFrames.slice(0, ReportLimits.ReportLimits.stackFrames).map(withinLimits),
|
|
48
|
+
details: '',
|
|
49
|
+
location: toReportLocation(isEmptyLocation(error.location) ? context.location : error.location),
|
|
50
|
+
correlationIds: mergeCorrelationIds(error.correlationIds, context.correlationIds).slice(0, ReportLimits.ReportLimits.correlationIds),
|
|
51
|
+
applicationVersion: context.applicationVersion,
|
|
52
|
+
shareIdentity: context.shareIdentity,
|
|
53
|
+
grantAccess: false,
|
|
54
|
+
accessDuration: showrunner_usher.AccessDuration.oneDay
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Merges correlation ids, keeping each once, the first given first.
|
|
59
|
+
* @param first The correlation ids that come first.
|
|
60
|
+
* @param second The correlation ids that come after.
|
|
61
|
+
* @returns The merged correlation ids.
|
|
62
|
+
*/ function mergeCorrelationIds(first, second) {
|
|
63
|
+
const merged = [];
|
|
64
|
+
for (const correlationId of [
|
|
65
|
+
...first,
|
|
66
|
+
...second
|
|
67
|
+
]){
|
|
68
|
+
if (!merged.some((existing)=>existing.equals(correlationId))) {
|
|
69
|
+
merged.push(correlationId);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return merged;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Gets the {@link ErrorDetails} of an error to report: the details themselves when given, otherwise the details of
|
|
76
|
+
* what was thrown.
|
|
77
|
+
* @param error `ErrorDetails`, or anything thrown.
|
|
78
|
+
* @param location Where it happened, when what was thrown does not say.
|
|
79
|
+
* @returns The {@link ErrorDetails}.
|
|
80
|
+
*/ function toErrorDetails(error, location) {
|
|
81
|
+
return isErrorDetails(error) ? error : showrunner_usher.errorDetailsFromError(error, location);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Checks whether a value is {@link ErrorDetails}.
|
|
85
|
+
* @param value The value.
|
|
86
|
+
* @returns True when it is.
|
|
87
|
+
*/ function isErrorDetails(value) {
|
|
88
|
+
if (typeof value !== 'object' || value === null || value instanceof Error) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
const candidate = value;
|
|
92
|
+
return typeof candidate.message === 'string' && typeof candidate.type === 'string' && Array.isArray(candidate.correlationIds) && Array.isArray(candidate.stackFrames) && typeof candidate.location === 'object' && candidate.location !== null;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Checks whether a location says nothing about where something happened.
|
|
96
|
+
* @param location The location.
|
|
97
|
+
* @returns True when no part of it is known.
|
|
98
|
+
*/ function isEmptyLocation(location) {
|
|
99
|
+
return !location || [
|
|
100
|
+
location.module,
|
|
101
|
+
location.feature,
|
|
102
|
+
location.slice
|
|
103
|
+
].every((part)=>!part);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Cuts the texts of a stack frame to what a report carries.
|
|
107
|
+
* @param frame The {@link StackFrame}.
|
|
108
|
+
* @returns The frame within the limits.
|
|
109
|
+
*/ function withinLimits(frame) {
|
|
110
|
+
return {
|
|
111
|
+
...frame,
|
|
112
|
+
method: frame.method.slice(0, ReportLimits.ReportLimits.stackFrameTextLength),
|
|
113
|
+
file: frame.file.slice(0, ReportLimits.ReportLimits.stackFrameTextLength)
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
exports.isEmptyLocation = isEmptyLocation;
|
|
118
|
+
exports.isErrorDetails = isErrorDetails;
|
|
119
|
+
exports.mergeCorrelationIds = mergeCorrelationIds;
|
|
120
|
+
exports.reportErrorValues = reportErrorValues;
|
|
121
|
+
exports.reportIssueValues = reportIssueValues;
|
|
122
|
+
exports.toErrorDetails = toErrorDetails;
|
|
123
|
+
exports.toReportLocation = toReportLocation;
|
|
124
|
+
//# sourceMappingURL=reportValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportValues.js","sources":["../../../Reporting/reportValues.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 { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';\nimport { Guid } from '@cratis/fundamentals';\nimport { AccessDuration, ErrorDetails, errorDetailsFromError, IReportError, IReportIssue, SliceLocation, StackFrame } from '@cratis/showrunner.usher';\nimport { ReportLimits } from './ReportLimits.js';\n\n/**\n * What every report carries besides what the reporter writes.\n */\nexport interface ReportContext {\n /** The id of the new issue. */\n readonly issueId: Guid;\n\n /** Where in the application the reporter was. */\n readonly location: ArcSliceLocation;\n\n /** The correlation ids of the commands and queries run just before the report. */\n readonly correlationIds: Guid[];\n\n /** The version of the application. */\n readonly applicationVersion: string;\n\n /** Whether to let support know who the reporter is unless they choose otherwise. */\n readonly shareIdentity: boolean;\n}\n\n/**\n * Converts where something happened to the location a report carries.\n * @param location The {@link ArcSliceLocation}, as `useSliceContext()` or a generated proxy gives it.\n * @returns The {@link SliceLocation} of the report.\n */\nexport function toReportLocation(location: ArcSliceLocation): SliceLocation {\n const reportLocation = new SliceLocation();\n reportLocation.module = location.module;\n reportLocation.feature = location.feature;\n reportLocation.slice = location.slice;\n return reportLocation;\n}\n\n/**\n * Gets the initial values of the report a problem command.\n * @param context The {@link ReportContext}.\n * @returns The values.\n */\nexport function reportIssueValues(context: ReportContext): IReportIssue {\n return {\n issueId: context.issueId,\n summary: '',\n description: '',\n location: toReportLocation(context.location),\n correlationIds: context.correlationIds.slice(-ReportLimits.correlationIds),\n applicationVersion: context.applicationVersion,\n shareIdentity: context.shareIdentity,\n grantAccess: false,\n accessDuration: AccessDuration.oneDay\n };\n}\n\n/**\n * Gets the initial values of the report this error command. The error's own location and correlation ids win over\n * those of the context, as they say where the error happened.\n * @param error The {@link ErrorDetails}.\n * @param context The {@link ReportContext}.\n * @returns The values.\n */\nexport function reportErrorValues(error: ErrorDetails, context: ReportContext): IReportError {\n return {\n issueId: context.issueId,\n errorMessage: error.message.slice(0, ReportLimits.errorMessageLength),\n errorType: error.type.slice(0, ReportLimits.errorTypeLength),\n stackFrames: error.stackFrames.slice(0, ReportLimits.stackFrames).map(withinLimits),\n details: '',\n location: toReportLocation(isEmptyLocation(error.location) ? context.location : error.location),\n correlationIds: mergeCorrelationIds(error.correlationIds, context.correlationIds).slice(0, ReportLimits.correlationIds),\n applicationVersion: context.applicationVersion,\n shareIdentity: context.shareIdentity,\n grantAccess: false,\n accessDuration: AccessDuration.oneDay\n };\n}\n\n/**\n * Merges correlation ids, keeping each once, the first given first.\n * @param first The correlation ids that come first.\n * @param second The correlation ids that come after.\n * @returns The merged correlation ids.\n */\nexport function mergeCorrelationIds(first: Guid[], second: Guid[]): Guid[] {\n const merged: Guid[] = [];\n for (const correlationId of [...first, ...second]) {\n if (!merged.some(existing => existing.equals(correlationId))) {\n merged.push(correlationId);\n }\n }\n return merged;\n}\n\n/**\n * Gets the {@link ErrorDetails} of an error to report: the details themselves when given, otherwise the details of\n * what was thrown.\n * @param error `ErrorDetails`, or anything thrown.\n * @param location Where it happened, when what was thrown does not say.\n * @returns The {@link ErrorDetails}.\n */\nexport function toErrorDetails(error: unknown, location?: ArcSliceLocation): ErrorDetails {\n return isErrorDetails(error) ? error : errorDetailsFromError(error, location);\n}\n\n/**\n * Checks whether a value is {@link ErrorDetails}.\n * @param value The value.\n * @returns True when it is.\n */\nexport function isErrorDetails(value: unknown): value is ErrorDetails {\n if (typeof value !== 'object' || value === null || value instanceof Error) {\n return false;\n }\n\n const candidate = value as Record<string, unknown>;\n return typeof candidate.message === 'string'\n && typeof candidate.type === 'string'\n && Array.isArray(candidate.correlationIds)\n && Array.isArray(candidate.stackFrames)\n && typeof candidate.location === 'object'\n && candidate.location !== null;\n}\n\n/**\n * Checks whether a location says nothing about where something happened.\n * @param location The location.\n * @returns True when no part of it is known.\n */\nexport function isEmptyLocation(location: { module: string; feature: string; slice: string } | undefined): boolean {\n return !location || [location.module, location.feature, location.slice].every(part => !part);\n}\n\n/**\n * Cuts the texts of a stack frame to what a report carries.\n * @param frame The {@link StackFrame}.\n * @returns The frame within the limits.\n */\nfunction withinLimits(frame: StackFrame): StackFrame {\n return {\n ...frame,\n method: frame.method.slice(0, ReportLimits.stackFrameTextLength),\n file: frame.file.slice(0, ReportLimits.stackFrameTextLength)\n };\n}\n"],"names":["toReportLocation","location","reportLocation","SliceLocation","module","feature","slice","reportIssueValues","context","issueId","summary","description","correlationIds","ReportLimits","applicationVersion","shareIdentity","grantAccess","accessDuration","AccessDuration","oneDay","reportErrorValues","error","errorMessage","message","errorMessageLength","errorType","type","errorTypeLength","stackFrames","map","withinLimits","details","isEmptyLocation","mergeCorrelationIds","first","second","merged","correlationId","some","existing","equals","push","toErrorDetails","isErrorDetails","errorDetailsFromError","value","Error","candidate","Array","isArray","every","part","frame","method","stackFrameTextLength","file"],"mappings":";;;;;AAAA;AACA;AA2BA;;;;IAKO,SAASA,gBAAAA,CAAiBC,QAA0B,EAAA;AACvD,IAAA,MAAMC,iBAAiB,IAAIC,8BAAAA,EAAAA;IAC3BD,cAAAA,CAAeE,MAAM,GAAGH,QAAAA,CAASG,MAAM;IACvCF,cAAAA,CAAeG,OAAO,GAAGJ,QAAAA,CAASI,OAAO;IACzCH,cAAAA,CAAeI,KAAK,GAAGL,QAAAA,CAASK,KAAK;IACrC,OAAOJ,cAAAA;AACX;AAEA;;;;IAKO,SAASK,iBAAAA,CAAkBC,OAAsB,EAAA;IACpD,OAAO;AACHC,QAAAA,OAAAA,EAASD,QAAQC,OAAO;QACxBC,OAAAA,EAAS,EAAA;QACTC,WAAAA,EAAa,EAAA;QACbV,QAAAA,EAAUD,gBAAAA,CAAiBQ,QAAQP,QAAQ,CAAA;AAC3CW,QAAAA,cAAAA,EAAgBJ,QAAQI,cAAc,CAACN,KAAK,CAAC,CAACO,0BAAaD,cAAc,CAAA;AACzEE,QAAAA,kBAAAA,EAAoBN,QAAQM,kBAAkB;AAC9CC,QAAAA,aAAAA,EAAeP,QAAQO,aAAa;QACpCC,WAAAA,EAAa,KAAA;AACbC,QAAAA,cAAAA,EAAgBC,gCAAeC;AACnC,KAAA;AACJ;AAEA;;;;;;AAMC,IACM,SAASC,iBAAAA,CAAkBC,KAAmB,EAAEb,OAAsB,EAAA;IACzE,OAAO;AACHC,QAAAA,OAAAA,EAASD,QAAQC,OAAO;AACxBa,QAAAA,YAAAA,EAAcD,MAAME,OAAO,CAACjB,KAAK,CAAC,CAAA,EAAGO,0BAAaW,kBAAkB,CAAA;AACpEC,QAAAA,SAAAA,EAAWJ,MAAMK,IAAI,CAACpB,KAAK,CAAC,CAAA,EAAGO,0BAAac,eAAe,CAAA;QAC3DC,WAAAA,EAAaP,KAAAA,CAAMO,WAAW,CAACtB,KAAK,CAAC,GAAGO,yBAAAA,CAAae,WAAW,CAAA,CAAEC,GAAG,CAACC,YAAAA,CAAAA;QACtEC,OAAAA,EAAS,EAAA;QACT9B,QAAAA,EAAUD,gBAAAA,CAAiBgC,gBAAgBX,KAAAA,CAAMpB,QAAQ,IAAIO,OAAAA,CAAQP,QAAQ,GAAGoB,KAAAA,CAAMpB,QAAQ,CAAA;QAC9FW,cAAAA,EAAgBqB,mBAAAA,CAAoBZ,KAAAA,CAAMT,cAAc,EAAEJ,OAAAA,CAAQI,cAAc,CAAA,CAAEN,KAAK,CAAC,CAAA,EAAGO,yBAAAA,CAAaD,cAAc,CAAA;AACtHE,QAAAA,kBAAAA,EAAoBN,QAAQM,kBAAkB;AAC9CC,QAAAA,aAAAA,EAAeP,QAAQO,aAAa;QACpCC,WAAAA,EAAa,KAAA;AACbC,QAAAA,cAAAA,EAAgBC,gCAAeC;AACnC,KAAA;AACJ;AAEA;;;;;AAKC,IACM,SAASc,mBAAAA,CAAoBC,KAAa,EAAEC,MAAc,EAAA;AAC7D,IAAA,MAAMC,SAAiB,EAAE;AACzB,IAAA,KAAK,MAAMC,aAAAA,IAAiB;AAAIH,QAAAA,GAAAA,KAAAA;AAAUC,QAAAA,GAAAA;KAAO,CAAE;QAC/C,IAAI,CAACC,OAAOE,IAAI,CAACC,CAAAA,QAAAA,GAAYA,QAAAA,CAASC,MAAM,CAACH,aAAAA,CAAAA,CAAAA,EAAiB;AAC1DD,YAAAA,MAAAA,CAAOK,IAAI,CAACJ,aAAAA,CAAAA;AAChB,QAAA;AACJ,IAAA;IACA,OAAOD,MAAAA;AACX;AAEA;;;;;;AAMC,IACM,SAASM,cAAAA,CAAerB,KAAc,EAAEpB,QAA2B,EAAA;AACtE,IAAA,OAAO0C,cAAAA,CAAetB,KAAAA,CAAAA,GAASA,KAAAA,GAAQuB,sCAAAA,CAAsBvB,KAAAA,EAAOpB,QAAAA,CAAAA;AACxE;AAEA;;;;IAKO,SAAS0C,cAAAA,CAAeE,KAAc,EAAA;AACzC,IAAA,IAAI,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQA,iBAAiBC,KAAAA,EAAO;QACvE,OAAO,KAAA;AACX,IAAA;AAEA,IAAA,MAAMC,SAAAA,GAAYF,KAAAA;AAClB,IAAA,OAAO,OAAOE,SAAAA,CAAUxB,OAAO,KAAK,QAAA,IAC7B,OAAOwB,SAAAA,CAAUrB,IAAI,KAAK,QAAA,IAC1BsB,KAAAA,CAAMC,OAAO,CAACF,SAAAA,CAAUnC,cAAc,CAAA,IACtCoC,KAAAA,CAAMC,OAAO,CAACF,SAAAA,CAAUnB,WAAW,CAAA,IACnC,OAAOmB,SAAAA,CAAU9C,QAAQ,KAAK,QAAA,IAC9B8C,SAAAA,CAAU9C,QAAQ,KAAK,IAAA;AAClC;AAEA;;;;IAKO,SAAS+B,eAAAA,CAAgB/B,QAAwE,EAAA;AACpG,IAAA,OAAO,CAACA,QAAAA,IAAY;AAACA,QAAAA,QAAAA,CAASG,MAAM;AAAEH,QAAAA,QAAAA,CAASI,OAAO;AAAEJ,QAAAA,QAAAA,CAASK;AAAM,KAAA,CAAC4C,KAAK,CAACC,CAAAA,IAAAA,GAAQ,CAACA,IAAAA,CAAAA;AAC3F;AAEA;;;;IAKA,SAASrB,aAAasB,KAAiB,EAAA;IACnC,OAAO;AACH,QAAA,GAAGA,KAAK;AACRC,QAAAA,MAAAA,EAAQD,MAAMC,MAAM,CAAC/C,KAAK,CAAC,CAAA,EAAGO,0BAAayC,oBAAoB,CAAA;AAC/DC,QAAAA,IAAAA,EAAMH,MAAMG,IAAI,CAACjD,KAAK,CAAC,CAAA,EAAGO,0BAAayC,oBAAoB;AAC/D,KAAA;AACJ;;;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AccessChoice } from './AccessChoice.js';
|
|
2
|
+
export interface AccessChoiceBinding {
|
|
3
|
+
readonly choice: AccessChoice;
|
|
4
|
+
readonly onFieldChange: (command: unknown, fieldName: string, oldValue: unknown, newValue: unknown) => void;
|
|
5
|
+
readonly currentValues: {
|
|
6
|
+
shareIdentity: boolean;
|
|
7
|
+
};
|
|
8
|
+
readonly initialValues: <TValues extends {
|
|
9
|
+
shareIdentity?: boolean;
|
|
10
|
+
}>(values: TValues) => Omit<TValues, 'shareIdentity'>;
|
|
11
|
+
}
|
|
12
|
+
export declare function useAccessChoice(shareIdentityByDefault: boolean): AccessChoiceBinding;
|
|
13
|
+
//# sourceMappingURL=useAccessChoice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccessChoice.d.ts","sourceRoot":"","sources":["../../../Reporting/useAccessChoice.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA2D,MAAM,mBAAmB,CAAC;AAY1G,MAAM,WAAW,mBAAmB;IAEhC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAG9B,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAG5G,QAAQ,CAAC,aAAa,EAAE;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IAQnD,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,SAAS;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;CAC5H;AAaD,wBAAgB,eAAe,CAAC,sBAAsB,EAAE,OAAO,GAAG,mBAAmB,CAMpF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
var AccessChoice = require('./AccessChoice.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 reduce = (choice, change)=>AccessChoice.changeAccessChoice(choice, change.fieldName, change.value);
|
|
9
|
+
const withoutShareIdentity = (values)=>{
|
|
10
|
+
const seed = {
|
|
11
|
+
...values
|
|
12
|
+
};
|
|
13
|
+
delete seed.shareIdentity;
|
|
14
|
+
return seed;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Follows the reporter's access choice in a command form with `shareIdentity`, `grantAccess` and `accessDuration`.
|
|
18
|
+
* @param shareIdentityByDefault Whether to let support know who the reporter is unless they choose otherwise.
|
|
19
|
+
* @returns The {@link AccessChoiceBinding}.
|
|
20
|
+
*/ function useAccessChoice(shareIdentityByDefault) {
|
|
21
|
+
const [choice, dispatch] = react.useReducer(reduce, shareIdentityByDefault, AccessChoice.initialAccessChoice);
|
|
22
|
+
const shareIdentity = AccessChoice.sharesIdentity(choice);
|
|
23
|
+
const currentValues = react.useMemo(()=>({
|
|
24
|
+
shareIdentity
|
|
25
|
+
}), [
|
|
26
|
+
shareIdentity
|
|
27
|
+
]);
|
|
28
|
+
const onFieldChange = (_command, fieldName, _oldValue, newValue)=>dispatch({
|
|
29
|
+
fieldName,
|
|
30
|
+
value: newValue
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
choice,
|
|
34
|
+
onFieldChange,
|
|
35
|
+
currentValues,
|
|
36
|
+
initialValues: withoutShareIdentity
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
exports.useAccessChoice = useAccessChoice;
|
|
41
|
+
//# sourceMappingURL=useAccessChoice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccessChoice.js","sources":["../../../Reporting/useAccessChoice.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 { useMemo, useReducer } from 'react';\nimport { AccessChoice, changeAccessChoice, initialAccessChoice, sharesIdentity } from './AccessChoice.js';\n\ninterface FieldChanged {\n readonly fieldName: string;\n readonly value: unknown;\n}\n\nconst reduce = (choice: AccessChoice, change: FieldChanged) => changeAccessChoice(choice, change.fieldName, change.value);\n\n/**\n * What {@link useAccessChoice} gives a command form.\n */\nexport interface AccessChoiceBinding {\n /** The reporter's {@link AccessChoice}. */\n readonly choice: AccessChoice;\n\n /** The handler for the form's `onFieldChange`. */\n readonly onFieldChange: (command: unknown, fieldName: string, oldValue: unknown, newValue: unknown) => void;\n\n /** The form's `currentValues`, which force sharing who the reporter is while access is granted. */\n readonly currentValues: { shareIdentity: boolean };\n\n /**\n * Gets the form's `initialValues` without `shareIdentity`: the form merges `initialValues` over `currentValues`, so\n * a `shareIdentity` there would win over the value the access choice forces.\n * @param values The initial values of the command.\n * @returns The values without `shareIdentity`.\n */\n readonly initialValues: <TValues extends { shareIdentity?: boolean }>(values: TValues) => Omit<TValues, 'shareIdentity'>;\n}\n\nconst withoutShareIdentity = <TValues extends { shareIdentity?: boolean }>(values: TValues): Omit<TValues, 'shareIdentity'> => {\n const seed: Partial<TValues> = { ...values };\n delete seed.shareIdentity;\n return seed as Omit<TValues, 'shareIdentity'>;\n};\n\n/**\n * Follows the reporter's access choice in a command form with `shareIdentity`, `grantAccess` and `accessDuration`.\n * @param shareIdentityByDefault Whether to let support know who the reporter is unless they choose otherwise.\n * @returns The {@link AccessChoiceBinding}.\n */\nexport function useAccessChoice(shareIdentityByDefault: boolean): AccessChoiceBinding {\n const [choice, dispatch] = useReducer(reduce, shareIdentityByDefault, initialAccessChoice);\n const shareIdentity = sharesIdentity(choice);\n const currentValues = useMemo(() => ({ shareIdentity }), [shareIdentity]);\n const onFieldChange = (_command: unknown, fieldName: string, _oldValue: unknown, newValue: unknown) => dispatch({ fieldName, value: newValue });\n return { choice, onFieldChange, currentValues, initialValues: withoutShareIdentity };\n}\n"],"names":["reduce","choice","change","changeAccessChoice","fieldName","value","withoutShareIdentity","values","seed","shareIdentity","useAccessChoice","shareIdentityByDefault","dispatch","useReducer","initialAccessChoice","sharesIdentity","currentValues","useMemo","onFieldChange","_command","_oldValue","newValue","initialValues"],"mappings":";;;;;AAAA;AACA;AAUA,MAAMA,MAAAA,GAAS,CAACC,MAAAA,EAAsBC,MAAAA,GAAyBC,+BAAAA,CAAmBF,QAAQC,MAAAA,CAAOE,SAAS,EAAEF,MAAAA,CAAOG,KAAK,CAAA;AAwBxH,MAAMC,uBAAuB,CAA8CC,MAAAA,GAAAA;AACvE,IAAA,MAAMC,IAAAA,GAAyB;AAAE,QAAA,GAAGD;AAAO,KAAA;AAC3C,IAAA,OAAOC,KAAKC,aAAa;IACzB,OAAOD,IAAAA;AACX,CAAA;AAEA;;;;IAKO,SAASE,eAAAA,CAAgBC,sBAA+B,EAAA;AAC3D,IAAA,MAAM,CAACV,MAAAA,EAAQW,QAAAA,CAAS,GAAGC,gBAAAA,CAAWb,QAAQW,sBAAAA,EAAwBG,gCAAAA,CAAAA;AACtE,IAAA,MAAML,gBAAgBM,2BAAAA,CAAed,MAAAA,CAAAA;IACrC,MAAMe,aAAAA,GAAgBC,aAAAA,CAAQ,KAAO;AAAER,YAAAA;AAAc,SAAA,CAAA,EAAI;AAACA,QAAAA;AAAc,KAAA,CAAA;AACxE,IAAA,MAAMS,gBAAgB,CAACC,QAAAA,EAAmBf,SAAAA,EAAmBgB,SAAAA,EAAoBC,WAAsBT,QAAAA,CAAS;AAAER,YAAAA,SAAAA;YAAWC,KAAAA,EAAOgB;AAAS,SAAA,CAAA;IAC7I,OAAO;AAAEpB,QAAAA,MAAAA;AAAQiB,QAAAA,aAAAA;AAAeF,QAAAA,aAAAA;QAAeM,aAAAA,EAAehB;AAAqB,KAAA;AACvF;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './Buttons/index.js';
|
|
2
|
+
export * from './Correlation/index.js';
|
|
3
|
+
export * from './Icons.js';
|
|
4
|
+
export * from './Issues/index.js';
|
|
5
|
+
export * from './Labels/index.js';
|
|
6
|
+
export * from './Provider/index.js';
|
|
7
|
+
export * from './Reporting/index.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var buttonModels = require('./Buttons/buttonModels.js');
|
|
4
|
+
var MyIssuesButton = require('./Buttons/MyIssuesButton.js');
|
|
5
|
+
var ReportButton = require('./Buttons/ReportButton.js');
|
|
6
|
+
var CorrelationTracker = require('./Correlation/CorrelationTracker.js');
|
|
7
|
+
var withCorrelationIdHeader = require('./Correlation/withCorrelationIdHeader.js');
|
|
8
|
+
var Icons = require('./Icons.js');
|
|
9
|
+
var accessStatus = require('./Issues/accessStatus.js');
|
|
10
|
+
var conversationMessages = require('./Issues/conversationMessages.js');
|
|
11
|
+
var issueStates = require('./Issues/issueStates.js');
|
|
12
|
+
var AccessPanel = require('./Issues/IssueView/AccessPanel.js');
|
|
13
|
+
var GrantAccessDialog = require('./Issues/IssueView/GrantAccessDialog.js');
|
|
14
|
+
var IdentityPanel = require('./Issues/IssueView/IdentityPanel.js');
|
|
15
|
+
var IssueActions = require('./Issues/IssueView/IssueActions.js');
|
|
16
|
+
var IssueConversationPanel = require('./Issues/IssueView/IssueConversationPanel.js');
|
|
17
|
+
var IssueHeader = require('./Issues/IssueView/IssueHeader.js');
|
|
18
|
+
var IssueView = require('./Issues/IssueView/IssueView.js');
|
|
19
|
+
var QuestionBanner = require('./Issues/IssueView/QuestionBanner.js');
|
|
20
|
+
var ReopenIssueDialog = require('./Issues/IssueView/ReopenIssueDialog.js');
|
|
21
|
+
var ShareIdentityDialog = require('./Issues/IssueView/ShareIdentityDialog.js');
|
|
22
|
+
var StatusStrip = require('./Issues/IssueView/StatusStrip.js');
|
|
23
|
+
var SupportSessions = require('./Issues/IssueView/SupportSessions.js');
|
|
24
|
+
var IssueList = require('./Issues/MyIssues/IssueList.js');
|
|
25
|
+
var MyIssuesDialog = require('./Issues/MyIssues/MyIssuesDialog.js');
|
|
26
|
+
var MyIssuesNavigation = require('./Issues/MyIssues/MyIssuesNavigation.js');
|
|
27
|
+
var MyIssuesList = require('./Issues/MyIssuesList.js');
|
|
28
|
+
var webAddress = require('./Issues/webAddress.js');
|
|
29
|
+
var useAccessStatus = require('./Issues/useAccessStatus.js');
|
|
30
|
+
var sessionActivity = require('./Issues/sessionActivity.js');
|
|
31
|
+
var defaultUsherLabels = require('./Labels/defaultUsherLabels.js');
|
|
32
|
+
var resolveLabels = require('./Labels/resolveLabels.js');
|
|
33
|
+
var format = require('./Labels/format.js');
|
|
34
|
+
var UsherBoundary = require('./Provider/UsherBoundary.js');
|
|
35
|
+
var UsherContext = require('./Provider/UsherContext.js');
|
|
36
|
+
var UsherProvider = require('./Provider/UsherProvider.js');
|
|
37
|
+
var useUsher = require('./Provider/useUsher.js');
|
|
38
|
+
var AccessChoice = require('./Reporting/AccessChoice.js');
|
|
39
|
+
var AccessFields = require('./Reporting/AccessFields.js');
|
|
40
|
+
var AccessNotice = require('./Reporting/AccessNotice.js');
|
|
41
|
+
var durationOptions = require('./Reporting/durationOptions.js');
|
|
42
|
+
var formatLocation = require('./Reporting/formatLocation.js');
|
|
43
|
+
var ReportErrorDialog = require('./Reporting/ReportErrorDialog.js');
|
|
44
|
+
var ReportIssueDialog = require('./Reporting/ReportIssueDialog.js');
|
|
45
|
+
var ReportLimits = require('./Reporting/ReportLimits.js');
|
|
46
|
+
var reportValues = require('./Reporting/reportValues.js');
|
|
47
|
+
var SentWithReport = require('./Reporting/SentWithReport.js');
|
|
48
|
+
var TechnicalDetails = require('./Reporting/TechnicalDetails.js');
|
|
49
|
+
var useAccessChoice = require('./Reporting/useAccessChoice.js');
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
exports.myIssuesButtonModel = buttonModels.myIssuesButtonModel;
|
|
54
|
+
exports.reportButtonModel = buttonModels.reportButtonModel;
|
|
55
|
+
exports.MyIssuesButton = MyIssuesButton.MyIssuesButton;
|
|
56
|
+
exports.MyIssuesButtonView = MyIssuesButton.MyIssuesButtonView;
|
|
57
|
+
exports.ReportButton = ReportButton.ReportButton;
|
|
58
|
+
exports.CorrelationTracker = CorrelationTracker.CorrelationTracker;
|
|
59
|
+
exports.defaultCorrelationIdHeader = withCorrelationIdHeader.defaultCorrelationIdHeader;
|
|
60
|
+
exports.withCorrelationIdHeader = withCorrelationIdHeader.withCorrelationIdHeader;
|
|
61
|
+
exports.BackIcon = Icons.BackIcon;
|
|
62
|
+
exports.BugIcon = Icons.BugIcon;
|
|
63
|
+
exports.InboxIcon = Icons.InboxIcon;
|
|
64
|
+
exports.AccessStatus = accessStatus.AccessStatus;
|
|
65
|
+
exports.AccessStatusRefreshInterval = accessStatus.AccessStatusRefreshInterval;
|
|
66
|
+
exports.accessStatusOf = accessStatus.accessStatusOf;
|
|
67
|
+
exports.isSessionRunning = accessStatus.isSessionRunning;
|
|
68
|
+
exports.nextAccessStatusCheckIn = accessStatus.nextAccessStatusCheckIn;
|
|
69
|
+
exports.authorIdFor = conversationMessages.authorIdFor;
|
|
70
|
+
exports.authorOf = conversationMessages.authorOf;
|
|
71
|
+
exports.bodyOf = conversationMessages.bodyOf;
|
|
72
|
+
exports.conversationMessages = conversationMessages.conversationMessages;
|
|
73
|
+
exports.isOpenQuestion = conversationMessages.isOpenQuestion;
|
|
74
|
+
exports.isClosed = issueStates.isClosed;
|
|
75
|
+
exports.stateBadgeFor = issueStates.stateBadgeFor;
|
|
76
|
+
exports.statusStepOf = issueStates.statusStepOf;
|
|
77
|
+
exports.statusSteps = issueStates.statusSteps;
|
|
78
|
+
exports.AccessPanel = AccessPanel.AccessPanel;
|
|
79
|
+
exports.GrantAccessDialog = GrantAccessDialog.GrantAccessDialog;
|
|
80
|
+
exports.IdentityPanel = IdentityPanel.IdentityPanel;
|
|
81
|
+
exports.IssueActions = IssueActions.IssueActions;
|
|
82
|
+
exports.IssueConversationPanel = IssueConversationPanel.IssueConversationPanel;
|
|
83
|
+
exports.IssueHeader = IssueHeader.IssueHeader;
|
|
84
|
+
exports.IssueView = IssueView.IssueView;
|
|
85
|
+
exports.QuestionBanner = QuestionBanner.QuestionBanner;
|
|
86
|
+
exports.ReopenIssueDialog = ReopenIssueDialog.ReopenIssueDialog;
|
|
87
|
+
exports.ShareIdentityDialog = ShareIdentityDialog.ShareIdentityDialog;
|
|
88
|
+
exports.StatusStrip = StatusStrip.StatusStrip;
|
|
89
|
+
exports.SupportSessions = SupportSessions.SupportSessions;
|
|
90
|
+
exports.IssueList = IssueList.IssueList;
|
|
91
|
+
exports.MyIssuesDialog = MyIssuesDialog.MyIssuesDialog;
|
|
92
|
+
exports.navigate = MyIssuesNavigation.navigate;
|
|
93
|
+
exports.startNavigation = MyIssuesNavigation.startNavigation;
|
|
94
|
+
exports.isFixReleased = MyIssuesList.isFixReleased;
|
|
95
|
+
exports.visibleIssues = MyIssuesList.visibleIssues;
|
|
96
|
+
exports.waitingCount = MyIssuesList.waitingCount;
|
|
97
|
+
exports.isWebAddress = webAddress.isWebAddress;
|
|
98
|
+
exports.useAccessStatus = useAccessStatus.useAccessStatus;
|
|
99
|
+
exports.sessionActivityOf = sessionActivity.sessionActivityOf;
|
|
100
|
+
exports.defaultUsherLabels = defaultUsherLabels.defaultUsherLabels;
|
|
101
|
+
exports.resolveLabels = resolveLabels.resolveLabels;
|
|
102
|
+
exports.format = format.format;
|
|
103
|
+
exports.UsherBoundary = UsherBoundary.UsherBoundary;
|
|
104
|
+
exports.UsherContext = UsherContext.UsherContext;
|
|
105
|
+
exports.defaultUsherContextValue = UsherContext.defaultUsherContextValue;
|
|
106
|
+
exports.useUsherContext = UsherContext.useUsherContext;
|
|
107
|
+
exports.useUsherLabels = UsherContext.useUsherLabels;
|
|
108
|
+
exports.UsherProvider = UsherProvider.UsherProvider;
|
|
109
|
+
exports.useUsher = useUsher.useUsher;
|
|
110
|
+
exports.changeAccessChoice = AccessChoice.changeAccessChoice;
|
|
111
|
+
exports.formatClock = AccessChoice.formatClock;
|
|
112
|
+
exports.formatTime = AccessChoice.formatTime;
|
|
113
|
+
exports.initialAccessChoice = AccessChoice.initialAccessChoice;
|
|
114
|
+
exports.sharesIdentity = AccessChoice.sharesIdentity;
|
|
115
|
+
exports.validUntilFor = AccessChoice.validUntilFor;
|
|
116
|
+
exports.AccessFields = AccessFields.AccessFields;
|
|
117
|
+
exports.AccessNotice = AccessNotice.AccessNotice;
|
|
118
|
+
exports.durationOptions = durationOptions.durationOptions;
|
|
119
|
+
exports.formatLocation = formatLocation.formatLocation;
|
|
120
|
+
exports.ReportErrorDialog = ReportErrorDialog.ReportErrorDialog;
|
|
121
|
+
exports.ReportIssueDialog = ReportIssueDialog.ReportIssueDialog;
|
|
122
|
+
exports.ReportLimits = ReportLimits.ReportLimits;
|
|
123
|
+
exports.isEmptyLocation = reportValues.isEmptyLocation;
|
|
124
|
+
exports.isErrorDetails = reportValues.isErrorDetails;
|
|
125
|
+
exports.mergeCorrelationIds = reportValues.mergeCorrelationIds;
|
|
126
|
+
exports.reportErrorValues = reportValues.reportErrorValues;
|
|
127
|
+
exports.reportIssueValues = reportValues.reportIssueValues;
|
|
128
|
+
exports.toErrorDetails = reportValues.toErrorDetails;
|
|
129
|
+
exports.toReportLocation = reportValues.toReportLocation;
|
|
130
|
+
exports.SentWithReport = SentWithReport.SentWithReport;
|
|
131
|
+
exports.TechnicalDetails = TechnicalDetails.TechnicalDetails;
|
|
132
|
+
exports.useAccessChoice = useAccessChoice.useAccessChoice;
|
|
133
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useUsher } from '../Provider/useUsher.js';
|
|
2
|
+
import { UsherButtonSize } from './buttonModels.js';
|
|
3
|
+
export interface MyIssuesButtonProps {
|
|
4
|
+
size?: UsherButtonSize;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const MyIssuesButton: (props: MyIssuesButtonProps) => import("react").JSX.Element;
|
|
8
|
+
export interface MyIssuesButtonViewProps extends MyIssuesButtonProps {
|
|
9
|
+
waiting: number;
|
|
10
|
+
labels: ReturnType<typeof useUsher>['labels'];
|
|
11
|
+
onOpen: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const MyIssuesButtonView: ({ size, className, waiting, labels, onOpen }: MyIssuesButtonViewProps) => import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=MyIssuesButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyIssuesButton.d.ts","sourceRoot":"","sources":["../../../Buttons/MyIssuesButton.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKzE,MAAM,WAAW,mBAAmB;IAEhC,IAAI,CAAC,EAAE,eAAe,CAAC;IAGvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,gCAQxD,CAAC;AAYF,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAEhE,OAAO,EAAE,MAAM,CAAC;IAGhB,MAAM,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;IAG9C,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAKD,eAAO,MAAM,kBAAkB,GAAI,8CAAwD,uBAAuB,gCAgBjH,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { IconButton, Button } from '@cratis/components/Common';
|
|
3
|
+
import { Badge } from '@cratis/components/Display';
|
|
4
|
+
import { MyIssues } from '@cratis/showrunner.usher';
|
|
5
|
+
import { InboxIcon } from '../Icons.js';
|
|
6
|
+
import { waitingCount } from '../Issues/MyIssuesList.js';
|
|
7
|
+
import { UsherBoundary } from '../Provider/UsherBoundary.js';
|
|
8
|
+
import { useUsher } from '../Provider/useUsher.js';
|
|
9
|
+
import { myIssuesButtonModel } from './buttonModels.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Opens the my issues side sheet. A badge counts the issues support waits for the user on, and the accessible name
|
|
13
|
+
* says how many.
|
|
14
|
+
*/ const MyIssuesButton = (props)=>{
|
|
15
|
+
const usher = useUsher();
|
|
16
|
+
return /*#__PURE__*/ jsx(UsherBoundary, {
|
|
17
|
+
children: /*#__PURE__*/ jsx(MyIssuesButtonContent, {
|
|
18
|
+
...props,
|
|
19
|
+
onOpen: usher.showMyIssues
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const MyIssuesButtonContent = ({ size = 'large', className, onOpen })=>{
|
|
24
|
+
const usher = useUsher();
|
|
25
|
+
const [result] = MyIssues.use();
|
|
26
|
+
return /*#__PURE__*/ jsx(MyIssuesButtonView, {
|
|
27
|
+
size: size,
|
|
28
|
+
className: className,
|
|
29
|
+
waiting: waitingCount(result.data ?? []),
|
|
30
|
+
labels: usher.labels,
|
|
31
|
+
onOpen: onOpen
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Renders the my issues button for a given number of issues support waits for the user on.
|
|
36
|
+
*/ const MyIssuesButtonView = ({ size = 'large', className, waiting, labels, onOpen })=>{
|
|
37
|
+
const model = myIssuesButtonModel(size, waiting, labels);
|
|
38
|
+
const badge = waiting > 0 && /*#__PURE__*/ jsx("span", {
|
|
39
|
+
className: "usher-my-issues-button__badge",
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
children: /*#__PURE__*/ jsx(Badge, {
|
|
42
|
+
value: waiting,
|
|
43
|
+
severity: "warn",
|
|
44
|
+
size: "small"
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
return /*#__PURE__*/ jsxs("span", {
|
|
48
|
+
className: [
|
|
49
|
+
'usher-my-issues-button',
|
|
50
|
+
className
|
|
51
|
+
].filter(Boolean).join(' '),
|
|
52
|
+
"data-size": size,
|
|
53
|
+
children: [
|
|
54
|
+
size === 'small' ? /*#__PURE__*/ jsx(IconButton, {
|
|
55
|
+
variant: "ghost",
|
|
56
|
+
icon: /*#__PURE__*/ jsx(InboxIcon, {}),
|
|
57
|
+
"aria-label": model.accessibleName,
|
|
58
|
+
tooltip: model.tooltip,
|
|
59
|
+
onClick: onOpen
|
|
60
|
+
}) : /*#__PURE__*/ jsx(Button, {
|
|
61
|
+
variant: "outline",
|
|
62
|
+
icon: /*#__PURE__*/ jsx(InboxIcon, {}),
|
|
63
|
+
label: model.text,
|
|
64
|
+
"aria-label": model.accessibleName,
|
|
65
|
+
onClick: onOpen
|
|
66
|
+
}),
|
|
67
|
+
badge
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export { MyIssuesButton, MyIssuesButtonView };
|
|
73
|
+
//# sourceMappingURL=MyIssuesButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MyIssuesButton.js","sources":["../../../Buttons/MyIssuesButton.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, IconButton } from '@cratis/components/Common';\nimport { Badge } from '@cratis/components/Display';\nimport { MyIssues } from '@cratis/showrunner.usher';\nimport { InboxIcon } from '../Icons.js';\nimport { waitingCount } from '../Issues/MyIssuesList.js';\nimport { UsherBoundary } from '../Provider/UsherBoundary.js';\nimport { useUsher } from '../Provider/useUsher.js';\nimport { myIssuesButtonModel, UsherButtonSize } from './buttonModels.js';\n\n/**\n * Props for {@link MyIssuesButton}.\n */\nexport interface MyIssuesButtonProps {\n /** `large` shows the icon and the text; `small` shows the icon, with the text as tooltip and accessible name. Defaults to `large`. */\n size?: UsherButtonSize;\n\n /** Additional class name for the button. */\n className?: string;\n}\n\n/**\n * Opens the my issues side sheet. A badge counts the issues support waits for the user on, and the accessible name\n * says how many.\n */\nexport const MyIssuesButton = (props: MyIssuesButtonProps) => {\n const usher = useUsher();\n\n return (\n <UsherBoundary>\n <MyIssuesButtonContent {...props} onOpen={usher.showMyIssues} />\n </UsherBoundary>\n );\n};\n\nconst MyIssuesButtonContent = ({ size = 'large', className, onOpen }: MyIssuesButtonProps & { onOpen: () => void }) => {\n const usher = useUsher();\n const [result] = MyIssues.use();\n\n return <MyIssuesButtonView size={size} className={className} waiting={waitingCount(result.data ?? [])} labels={usher.labels} onOpen={onOpen} />;\n};\n\n/**\n * Props for {@link MyIssuesButtonView}.\n */\nexport interface MyIssuesButtonViewProps extends MyIssuesButtonProps {\n /** How many issues support waits for the user on. */\n waiting: number;\n\n /** The labels to show. */\n labels: ReturnType<typeof useUsher>['labels'];\n\n /** Opens the my issues side sheet. */\n onOpen: () => void;\n}\n\n/**\n * Renders the my issues button for a given number of issues support waits for the user on.\n */\nexport const MyIssuesButtonView = ({ size = 'large', className, waiting, labels, onOpen }: MyIssuesButtonViewProps) => {\n const model = myIssuesButtonModel(size, waiting, labels);\n const badge = waiting > 0 && (\n <span className='usher-my-issues-button__badge' aria-hidden='true'>\n <Badge value={waiting} severity='warn' size='small' />\n </span>\n );\n\n return (\n <span className={['usher-my-issues-button', className].filter(Boolean).join(' ')} data-size={size}>\n {size === 'small'\n ? <IconButton variant='ghost' icon={<InboxIcon />} aria-label={model.accessibleName} tooltip={model.tooltip} onClick={onOpen} />\n : <Button variant='outline' icon={<InboxIcon />} label={model.text} aria-label={model.accessibleName} onClick={onOpen} />}\n {badge}\n </span>\n );\n};\n"],"names":["MyIssuesButton","props","usher","useUsher","_jsx","UsherBoundary","MyIssuesButtonContent","onOpen","showMyIssues","size","className","result","MyIssues","use","MyIssuesButtonView","waiting","waitingCount","data","labels","model","myIssuesButtonModel","badge","span","aria-hidden","Badge","value","severity","_jsxs","filter","Boolean","join","data-size","IconButton","variant","icon","InboxIcon","aria-label","accessibleName","tooltip","onClick","Button","label","text"],"mappings":";;;;;;;;;;AAuBA;;;IAIO,MAAMA,cAAAA,GAAiB,CAACC,KAAAA,GAAAA;AAC3B,IAAA,MAAMC,KAAAA,GAAQC,QAAAA,EAAAA;AAEd,IAAA,qBACIC,GAAA,CAACC,aAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,GAAA,CAACE,qBAAAA,EAAAA;AAAuB,YAAA,GAAGL,KAAK;AAAEM,YAAAA,MAAAA,EAAQL,MAAMM;;;AAG5D;AAEA,MAAMF,qBAAAA,GAAwB,CAAC,EAAEG,IAAAA,GAAO,OAAO,EAAEC,SAAS,EAAEH,MAAM,EAAgD,GAAA;AAC9G,IAAA,MAAML,KAAAA,GAAQC,QAAAA,EAAAA;AACd,IAAA,MAAM,CAACQ,MAAAA,CAAO,GAAGC,QAAAA,CAASC,GAAG,EAAA;AAE7B,IAAA,qBAAOT,GAAA,CAACU,kBAAAA,EAAAA;QAAmBL,IAAAA,EAAMA,IAAAA;QAAMC,SAAAA,EAAWA,SAAAA;AAAWK,QAAAA,OAAAA,EAASC,YAAAA,CAAaL,MAAAA,CAAOM,IAAI,IAAI,EAAE,CAAA;AAAGC,QAAAA,MAAAA,EAAQhB,MAAMgB,MAAM;QAAEX,MAAAA,EAAQA;;AACzI,CAAA;AAgBA;;AAEC,IACM,MAAMO,kBAAAA,GAAqB,CAAC,EAAEL,IAAAA,GAAO,OAAO,EAAEC,SAAS,EAAEK,OAAO,EAAEG,MAAM,EAAEX,MAAM,EAA2B,GAAA;IAC9G,MAAMY,KAAAA,GAAQC,mBAAAA,CAAoBX,IAAAA,EAAMM,OAAAA,EAASG,MAAAA,CAAAA;IACjD,MAAMG,KAAAA,GAAQN,OAAAA,GAAU,CAAA,kBACpBX,GAAA,CAACkB,MAAAA,EAAAA;QAAKZ,SAAAA,EAAU,+BAAA;QAAgCa,aAAAA,EAAY,MAAA;AACxD,QAAA,QAAA,gBAAAnB,GAAA,CAACoB,KAAAA,EAAAA;YAAMC,KAAAA,EAAOV,OAAAA;YAASW,QAAAA,EAAS,MAAA;YAAOjB,IAAAA,EAAK;;;AAIpD,IAAA,qBACIkB,IAAA,CAACL,MAAAA,EAAAA;QAAKZ,SAAAA,EAAW;AAAC,YAAA,wBAAA;AAA0BA,YAAAA;AAAU,SAAA,CAACkB,MAAM,CAACC,OAAAA,CAAAA,CAASC,IAAI,CAAC,GAAA,CAAA;QAAMC,WAAAA,EAAWtB,IAAAA;;AACxFA,YAAAA,IAAAA,KAAS,wBACJL,GAAA,CAAC4B,UAAAA,EAAAA;gBAAWC,OAAAA,EAAQ,OAAA;AAAQC,gBAAAA,IAAAA,gBAAM9B,GAAA,CAAC+B,SAAAA,EAAAA,EAAAA,CAAAA;AAAcC,gBAAAA,YAAAA,EAAYjB,MAAMkB,cAAc;AAAEC,gBAAAA,OAAAA,EAASnB,MAAMmB,OAAO;gBAAEC,OAAAA,EAAShC;+BACpHH,GAAA,CAACoC,MAAAA,EAAAA;gBAAOP,OAAAA,EAAQ,SAAA;AAAUC,gBAAAA,IAAAA,gBAAM9B,GAAA,CAAC+B,SAAAA,EAAAA,EAAAA,CAAAA;AAAcM,gBAAAA,KAAAA,EAAOtB,MAAMuB,IAAI;AAAEN,gBAAAA,YAAAA,EAAYjB,MAAMkB,cAAc;gBAAEE,OAAAA,EAAShC;;AAClHc,YAAAA;;;AAGb;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UsherButtonSize } from './buttonModels.js';
|
|
2
|
+
export interface ReportButtonProps {
|
|
3
|
+
size?: UsherButtonSize;
|
|
4
|
+
error?: unknown;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ReportButton: ({ size, error, className }: ReportButtonProps) => import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=ReportButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportButton.d.ts","sourceRoot":"","sources":["../../../Buttons/ReportButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAqB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKvE,MAAM,WAAW,iBAAiB;IAE9B,IAAI,CAAC,EAAE,eAAe,CAAC;IAGvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAGhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,YAAY,GAAI,4BAAsC,iBAAiB,gCAwBnF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { IconButton, Button } from '@cratis/components/Common';
|
|
3
|
+
import { BugIcon } from '../Icons.js';
|
|
4
|
+
import { useUsher } from '../Provider/useUsher.js';
|
|
5
|
+
import { reportButtonModel } from './buttonModels.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Opens the report a problem dialog, or the report this error dialog when given an error, with where in the
|
|
9
|
+
* application the button is.
|
|
10
|
+
*/ const ReportButton = ({ size = 'large', error, className })=>{
|
|
11
|
+
const usher = useUsher();
|
|
12
|
+
const reportsError = error !== undefined;
|
|
13
|
+
const model = reportButtonModel(size, reportsError, usher.labels);
|
|
14
|
+
const report = ()=>reportsError ? usher.reportError(error) : usher.reportIssue();
|
|
15
|
+
return size === 'small' ? /*#__PURE__*/ jsx(IconButton, {
|
|
16
|
+
className: className,
|
|
17
|
+
variant: "ghost",
|
|
18
|
+
icon: /*#__PURE__*/ jsx(BugIcon, {}),
|
|
19
|
+
"aria-label": model.accessibleName,
|
|
20
|
+
tooltip: model.tooltip,
|
|
21
|
+
onClick: report
|
|
22
|
+
}) : /*#__PURE__*/ jsx(Button, {
|
|
23
|
+
className: className,
|
|
24
|
+
variant: "outline",
|
|
25
|
+
icon: /*#__PURE__*/ jsx(BugIcon, {}),
|
|
26
|
+
label: model.text,
|
|
27
|
+
onClick: report
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { ReportButton };
|
|
32
|
+
//# sourceMappingURL=ReportButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportButton.js","sources":["../../../Buttons/ReportButton.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, IconButton } from '@cratis/components/Common';\nimport { BugIcon } from '../Icons.js';\nimport { useUsher } from '../Provider/useUsher.js';\nimport { reportButtonModel, UsherButtonSize } from './buttonModels.js';\n\n/**\n * Props for {@link ReportButton}.\n */\nexport interface ReportButtonProps {\n /** `large` shows the icon and the text; `small` shows the icon, with the text as tooltip and accessible name. Defaults to `large`. */\n size?: UsherButtonSize;\n\n /** The error to report: `ErrorDetails` from `@cratis/showrunner.usher`, or anything thrown. The button reports a problem described by hand when not given. */\n error?: unknown;\n\n /** Additional class name for the button. */\n className?: string;\n}\n\n/**\n * Opens the report a problem dialog, or the report this error dialog when given an error, with where in the\n * application the button is.\n */\nexport const ReportButton = ({ size = 'large', error, className }: ReportButtonProps) => {\n const usher = useUsher();\n const reportsError = error !== undefined;\n const model = reportButtonModel(size, reportsError, usher.labels);\n const report = () => reportsError ? usher.reportError(error) : usher.reportIssue();\n\n return size === 'small'\n ? (\n <IconButton\n className={className}\n variant='ghost'\n icon={<BugIcon />}\n aria-label={model.accessibleName}\n tooltip={model.tooltip}\n onClick={report} />\n )\n : (\n <Button\n className={className}\n variant='outline'\n icon={<BugIcon />}\n label={model.text}\n onClick={report} />\n );\n};\n"],"names":["ReportButton","size","error","className","usher","useUsher","reportsError","undefined","model","reportButtonModel","labels","report","reportError","reportIssue","_jsx","IconButton","variant","icon","BugIcon","aria-label","accessibleName","tooltip","onClick","Button","label","text"],"mappings":";;;;;;AAsBA;;;IAIO,MAAMA,YAAAA,GAAe,CAAC,EAAEC,IAAAA,GAAO,OAAO,EAAEC,KAAK,EAAEC,SAAS,EAAqB,GAAA;AAChF,IAAA,MAAMC,KAAAA,GAAQC,QAAAA,EAAAA;AACd,IAAA,MAAMC,eAAeJ,KAAAA,KAAUK,SAAAA;AAC/B,IAAA,MAAMC,KAAAA,GAAQC,iBAAAA,CAAkBR,IAAAA,EAAMK,YAAAA,EAAcF,MAAMM,MAAM,CAAA;IAChE,MAAMC,MAAAA,GAAS,IAAML,YAAAA,GAAeF,KAAAA,CAAMQ,WAAW,CAACV,KAAAA,CAAAA,GAASE,MAAMS,WAAW,EAAA;IAEhF,OAAOZ,IAAAA,KAAS,wBAERa,GAAA,CAACC,UAAAA,EAAAA;QACGZ,SAAAA,EAAWA,SAAAA;QACXa,OAAAA,EAAQ,OAAA;AACRC,QAAAA,IAAAA,gBAAMH,GAAA,CAACI,OAAAA,EAAAA,EAAAA,CAAAA;AACPC,QAAAA,YAAAA,EAAYX,MAAMY,cAAc;AAChCC,QAAAA,OAAAA,EAASb,MAAMa,OAAO;QACtBC,OAAAA,EAASX;uBAGbG,GAAA,CAACS,MAAAA,EAAAA;QACGpB,SAAAA,EAAWA,SAAAA;QACXa,OAAAA,EAAQ,SAAA;AACRC,QAAAA,IAAAA,gBAAMH,GAAA,CAACI,OAAAA,EAAAA,EAAAA,CAAAA;AACPM,QAAAA,KAAAA,EAAOhB,MAAMiB,IAAI;QACjBH,OAAAA,EAASX;;AAEzB;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UsherLabels } from '../Labels/index.js';
|
|
2
|
+
export type UsherButtonSize = 'large' | 'small';
|
|
3
|
+
export interface ButtonModel {
|
|
4
|
+
readonly text: string;
|
|
5
|
+
readonly accessibleName: string;
|
|
6
|
+
readonly tooltip: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function reportButtonModel(size: UsherButtonSize, reportsError: boolean, labels: UsherLabels): ButtonModel;
|
|
9
|
+
export declare function myIssuesButtonModel(size: UsherButtonSize, waiting: number, labels: UsherLabels): ButtonModel;
|
|
10
|
+
//# sourceMappingURL=buttonModels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonModels.d.ts","sourceRoot":"","sources":["../../../Buttons/buttonModels.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMzD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,CAAC;AAKhD,MAAM,WAAW,WAAW;IAExB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAGhC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AASD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAGhH;AASD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAI5G"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { format } from '../Labels/format.js';
|
|
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 what the report button shows and announces.
|
|
7
|
+
* @param size The {@link UsherButtonSize}.
|
|
8
|
+
* @param reportsError Whether the button reports an error rather than a problem described by hand.
|
|
9
|
+
* @param labels The labels to show.
|
|
10
|
+
* @returns The {@link ButtonModel}.
|
|
11
|
+
*/ function reportButtonModel(size, reportsError, labels) {
|
|
12
|
+
const label = reportsError ? labels.reportButton.reportError : labels.reportButton.reportProblem;
|
|
13
|
+
return modelFor(size, label, label);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Gets what the my issues button shows and announces.
|
|
17
|
+
* @param size The {@link UsherButtonSize}.
|
|
18
|
+
* @param waiting How many issues support waits for the user on.
|
|
19
|
+
* @param labels The labels to show.
|
|
20
|
+
* @returns The {@link ButtonModel}.
|
|
21
|
+
*/ function myIssuesButtonModel(size, waiting, labels) {
|
|
22
|
+
const label = labels.myIssuesButton.label;
|
|
23
|
+
const accessibleName = waiting > 0 ? `${label}, ${format(labels.myIssuesButton.waiting, {
|
|
24
|
+
count: waiting
|
|
25
|
+
})}` : label;
|
|
26
|
+
return modelFor(size, label, accessibleName);
|
|
27
|
+
}
|
|
28
|
+
function modelFor(size, label, accessibleName) {
|
|
29
|
+
return size === 'small' ? {
|
|
30
|
+
text: '',
|
|
31
|
+
accessibleName,
|
|
32
|
+
tooltip: accessibleName
|
|
33
|
+
} : {
|
|
34
|
+
text: label,
|
|
35
|
+
accessibleName,
|
|
36
|
+
tooltip: ''
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { myIssuesButtonModel, reportButtonModel };
|
|
41
|
+
//# sourceMappingURL=buttonModels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonModels.js","sources":["../../../Buttons/buttonModels.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 { format, UsherLabels } from '../Labels/index.js';\n\n/**\n * The sizes of the Usher buttons: `large` shows the icon and the text; `small` shows the icon, with the text as the\n * tooltip and the accessible name.\n */\nexport type UsherButtonSize = 'large' | 'small';\n\n/**\n * What an Usher button shows and announces.\n */\nexport interface ButtonModel {\n /** The visible text; empty for a small button. */\n readonly text: string;\n\n /** The accessible name. */\n readonly accessibleName: string;\n\n /** The tooltip; empty for a large button, whose text says it all. */\n readonly tooltip: string;\n}\n\n/**\n * Gets what the report button shows and announces.\n * @param size The {@link UsherButtonSize}.\n * @param reportsError Whether the button reports an error rather than a problem described by hand.\n * @param labels The labels to show.\n * @returns The {@link ButtonModel}.\n */\nexport function reportButtonModel(size: UsherButtonSize, reportsError: boolean, labels: UsherLabels): ButtonModel {\n const label = reportsError ? labels.reportButton.reportError : labels.reportButton.reportProblem;\n return modelFor(size, label, label);\n}\n\n/**\n * Gets what the my issues button shows and announces.\n * @param size The {@link UsherButtonSize}.\n * @param waiting How many issues support waits for the user on.\n * @param labels The labels to show.\n * @returns The {@link ButtonModel}.\n */\nexport function myIssuesButtonModel(size: UsherButtonSize, waiting: number, labels: UsherLabels): ButtonModel {\n const label = labels.myIssuesButton.label;\n const accessibleName = waiting > 0 ? `${label}, ${format(labels.myIssuesButton.waiting, { count: waiting })}` : label;\n return modelFor(size, label, accessibleName);\n}\n\nfunction modelFor(size: UsherButtonSize, label: string, accessibleName: string): ButtonModel {\n return size === 'small'\n ? { text: '', accessibleName, tooltip: accessibleName }\n : { text: label, accessibleName, tooltip: '' };\n}\n"],"names":["reportButtonModel","size","reportsError","labels","label","reportButton","reportError","reportProblem","modelFor","myIssuesButtonModel","waiting","myIssuesButton","accessibleName","format","count","text","tooltip"],"mappings":";;AAAA;AACA;AAwBA;;;;;;AAMC,IACM,SAASA,iBAAAA,CAAkBC,IAAqB,EAAEC,YAAqB,EAAEC,MAAmB,EAAA;IAC/F,MAAMC,KAAAA,GAAQF,YAAAA,GAAeC,MAAAA,CAAOE,YAAY,CAACC,WAAW,GAAGH,MAAAA,CAAOE,YAAY,CAACE,aAAa;IAChG,OAAOC,QAAAA,CAASP,MAAMG,KAAAA,EAAOA,KAAAA,CAAAA;AACjC;AAEA;;;;;;AAMC,IACM,SAASK,mBAAAA,CAAoBR,IAAqB,EAAES,OAAe,EAAEP,MAAmB,EAAA;AAC3F,IAAA,MAAMC,KAAAA,GAAQD,MAAAA,CAAOQ,cAAc,CAACP,KAAK;AACzC,IAAA,MAAMQ,cAAAA,GAAiBF,OAAAA,GAAU,CAAA,GAAI,CAAA,EAAGN,KAAAA,CAAM,EAAE,EAAES,MAAAA,CAAOV,MAAAA,CAAOQ,cAAc,CAACD,OAAO,EAAE;QAAEI,KAAAA,EAAOJ;AAAQ,KAAA,CAAA,CAAA,CAAI,GAAGN,KAAAA;IAChH,OAAOI,QAAAA,CAASP,MAAMG,KAAAA,EAAOQ,cAAAA,CAAAA;AACjC;AAEA,SAASJ,QAAAA,CAASP,IAAqB,EAAEG,KAAa,EAAEQ,cAAsB,EAAA;AAC1E,IAAA,OAAOX,SAAS,OAAA,GACV;QAAEc,IAAAA,EAAM,EAAA;AAAIH,QAAAA,cAAAA;QAAgBI,OAAAA,EAASJ;KAAe,GACpD;QAAEG,IAAAA,EAAMX,KAAAA;AAAOQ,QAAAA,cAAAA;QAAgBI,OAAAA,EAAS;AAAG,KAAA;AACrD;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Buttons/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Buttons/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
|