@cratis/showrunner.usher.react 0.0.0-bootstrap.0 → 0.0.0-stage
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/README.md +2 -71
- package/package.json +4 -83
- package/Buttons/MyIssuesButton.tsx +0 -78
- package/Buttons/ReportButton.tsx +0 -51
- package/Buttons/buttonModels.ts +0 -55
- package/Buttons/index.ts +0 -6
- package/Correlation/CorrelationTracker.ts +0 -51
- package/Correlation/index.ts +0 -5
- package/Correlation/withCorrelationIdHeader.ts +0 -44
- package/Icons.tsx +0 -29
- package/Issues/IssueView/AccessPanel.tsx +0 -85
- package/Issues/IssueView/GrantAccessDialog.tsx +0 -56
- package/Issues/IssueView/IdentityPanel.tsx +0 -38
- package/Issues/IssueView/IssueActions.tsx +0 -52
- package/Issues/IssueView/IssueConversationPanel.tsx +0 -89
- package/Issues/IssueView/IssueHeader.tsx +0 -69
- package/Issues/IssueView/IssueView.tsx +0 -74
- package/Issues/IssueView/QuestionBanner.tsx +0 -27
- package/Issues/IssueView/ReopenIssueDialog.tsx +0 -37
- package/Issues/IssueView/ShareIdentityDialog.tsx +0 -37
- package/Issues/IssueView/StatusStrip.tsx +0 -42
- package/Issues/IssueView/SupportSessions.tsx +0 -59
- package/Issues/IssueView/index.ts +0 -15
- package/Issues/MyIssues/IssueList.tsx +0 -78
- package/Issues/MyIssues/MyIssuesDialog.tsx +0 -64
- package/Issues/MyIssues/MyIssuesNavigation.ts +0 -61
- package/Issues/MyIssues/index.ts +0 -6
- package/Issues/MyIssuesList.ts +0 -33
- package/Issues/accessStatus.ts +0 -68
- package/Issues/conversationMessages.ts +0 -136
- package/Issues/index.ts +0 -12
- package/Issues/issueStates.ts +0 -69
- package/Issues/sessionActivity.ts +0 -43
- package/Issues/useAccessStatus.ts +0 -24
- package/Issues/webAddress.ts +0 -22
- package/Labels/UsherLabels.ts +0 -365
- package/Labels/defaultUsherLabels.ts +0 -178
- package/Labels/format.ts +0 -13
- package/Labels/index.ts +0 -7
- package/Labels/resolveLabels.ts +0 -36
- package/Provider/UsherBoundary.tsx +0 -30
- package/Provider/UsherContext.ts +0 -109
- package/Provider/UsherProvider.tsx +0 -134
- package/Provider/index.ts +0 -7
- package/Provider/useUsher.ts +0 -72
- package/Reporting/AccessChoice.ts +0 -107
- package/Reporting/AccessFields.tsx +0 -74
- package/Reporting/AccessNotice.tsx +0 -33
- package/Reporting/ReportErrorDialog.tsx +0 -94
- package/Reporting/ReportIssueDialog.tsx +0 -80
- package/Reporting/ReportLimits.ts +0 -24
- package/Reporting/ReportSent.ts +0 -12
- package/Reporting/SentWithReport.tsx +0 -37
- package/Reporting/TechnicalDetails.tsx +0 -60
- package/Reporting/durationOptions.ts +0 -31
- package/Reporting/formatLocation.ts +0 -27
- package/Reporting/index.ts +0 -16
- package/Reporting/reportValues.ts +0 -150
- package/Reporting/useAccessChoice.ts +0 -53
- package/dist/cjs/Buttons/MyIssuesButton.d.ts +0 -14
- package/dist/cjs/Buttons/MyIssuesButton.d.ts.map +0 -1
- package/dist/cjs/Buttons/MyIssuesButton.js +0 -76
- package/dist/cjs/Buttons/MyIssuesButton.js.map +0 -1
- package/dist/cjs/Buttons/ReportButton.d.ts +0 -8
- package/dist/cjs/Buttons/ReportButton.d.ts.map +0 -1
- package/dist/cjs/Buttons/ReportButton.js +0 -34
- package/dist/cjs/Buttons/ReportButton.js.map +0 -1
- package/dist/cjs/Buttons/buttonModels.d.ts +0 -10
- package/dist/cjs/Buttons/buttonModels.d.ts.map +0 -1
- package/dist/cjs/Buttons/buttonModels.js +0 -44
- package/dist/cjs/Buttons/buttonModels.js.map +0 -1
- package/dist/cjs/Buttons/index.d.ts +0 -4
- package/dist/cjs/Buttons/index.d.ts.map +0 -1
- package/dist/cjs/Correlation/CorrelationTracker.d.ts +0 -10
- package/dist/cjs/Correlation/CorrelationTracker.d.ts.map +0 -1
- package/dist/cjs/Correlation/CorrelationTracker.js +0 -50
- package/dist/cjs/Correlation/CorrelationTracker.js.map +0 -1
- package/dist/cjs/Correlation/index.d.ts +0 -3
- package/dist/cjs/Correlation/index.d.ts.map +0 -1
- package/dist/cjs/Correlation/withCorrelationIdHeader.d.ts +0 -6
- package/dist/cjs/Correlation/withCorrelationIdHeader.d.ts.map +0 -1
- package/dist/cjs/Correlation/withCorrelationIdHeader.js +0 -39
- package/dist/cjs/Correlation/withCorrelationIdHeader.js.map +0 -1
- package/dist/cjs/Icons.d.ts +0 -4
- package/dist/cjs/Icons.d.ts.map +0 -1
- package/dist/cjs/Icons.js +0 -53
- package/dist/cjs/Icons.js.map +0 -1
- package/dist/cjs/Issues/IssueView/AccessPanel.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/AccessPanel.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/AccessPanel.js +0 -124
- package/dist/cjs/Issues/IssueView/AccessPanel.js.map +0 -1
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.js +0 -56
- package/dist/cjs/Issues/IssueView/GrantAccessDialog.js.map +0 -1
- package/dist/cjs/Issues/IssueView/IdentityPanel.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/IdentityPanel.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/IdentityPanel.js +0 -45
- package/dist/cjs/Issues/IssueView/IdentityPanel.js.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueActions.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/IssueActions.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueActions.js +0 -58
- package/dist/cjs/Issues/IssueView/IssueActions.js.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.js +0 -97
- package/dist/cjs/Issues/IssueView/IssueConversationPanel.js.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueHeader.d.ts +0 -7
- package/dist/cjs/Issues/IssueView/IssueHeader.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueHeader.js +0 -94
- package/dist/cjs/Issues/IssueView/IssueHeader.js.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueView.d.ts +0 -7
- package/dist/cjs/Issues/IssueView/IssueView.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/IssueView.js +0 -85
- package/dist/cjs/Issues/IssueView/IssueView.js.map +0 -1
- package/dist/cjs/Issues/IssueView/QuestionBanner.d.ts +0 -5
- package/dist/cjs/Issues/IssueView/QuestionBanner.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/QuestionBanner.js +0 -24
- package/dist/cjs/Issues/IssueView/QuestionBanner.js.map +0 -1
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.js +0 -34
- package/dist/cjs/Issues/IssueView/ReopenIssueDialog.js.map +0 -1
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.js +0 -32
- package/dist/cjs/Issues/IssueView/ShareIdentityDialog.js.map +0 -1
- package/dist/cjs/Issues/IssueView/StatusStrip.d.ts +0 -6
- package/dist/cjs/Issues/IssueView/StatusStrip.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/StatusStrip.js +0 -31
- package/dist/cjs/Issues/IssueView/StatusStrip.js.map +0 -1
- package/dist/cjs/Issues/IssueView/SupportSessions.d.ts +0 -7
- package/dist/cjs/Issues/IssueView/SupportSessions.d.ts.map +0 -1
- package/dist/cjs/Issues/IssueView/SupportSessions.js +0 -62
- package/dist/cjs/Issues/IssueView/SupportSessions.js.map +0 -1
- package/dist/cjs/Issues/IssueView/index.d.ts +0 -13
- package/dist/cjs/Issues/IssueView/index.d.ts.map +0 -1
- package/dist/cjs/Issues/MyIssues/IssueList.d.ts +0 -7
- package/dist/cjs/Issues/MyIssues/IssueList.d.ts.map +0 -1
- package/dist/cjs/Issues/MyIssues/IssueList.js +0 -92
- package/dist/cjs/Issues/MyIssues/IssueList.js.map +0 -1
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.d.ts +0 -7
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.d.ts.map +0 -1
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.js +0 -79
- package/dist/cjs/Issues/MyIssues/MyIssuesDialog.js.map +0 -1
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.d.ts +0 -21
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.d.ts.map +0 -1
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.js +0 -52
- package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.js.map +0 -1
- package/dist/cjs/Issues/MyIssues/index.d.ts +0 -4
- package/dist/cjs/Issues/MyIssues/index.d.ts.map +0 -1
- package/dist/cjs/Issues/MyIssuesList.d.ts +0 -7
- package/dist/cjs/Issues/MyIssuesList.d.ts.map +0 -1
- package/dist/cjs/Issues/MyIssuesList.js +0 -33
- package/dist/cjs/Issues/MyIssuesList.js.map +0 -1
- package/dist/cjs/Issues/accessStatus.d.ts +0 -13
- package/dist/cjs/Issues/accessStatus.d.ts.map +0 -1
- package/dist/cjs/Issues/accessStatus.js +0 -60
- package/dist/cjs/Issues/accessStatus.js.map +0 -1
- package/dist/cjs/Issues/conversationMessages.d.ts +0 -14
- package/dist/cjs/Issues/conversationMessages.d.ts.map +0 -1
- package/dist/cjs/Issues/conversationMessages.js +0 -131
- package/dist/cjs/Issues/conversationMessages.js.map +0 -1
- package/dist/cjs/Issues/index.d.ts +0 -10
- package/dist/cjs/Issues/index.d.ts.map +0 -1
- package/dist/cjs/Issues/issueStates.d.ts +0 -12
- package/dist/cjs/Issues/issueStates.d.ts.map +0 -1
- package/dist/cjs/Issues/issueStates.js +0 -86
- package/dist/cjs/Issues/issueStates.js.map +0 -1
- package/dist/cjs/Issues/sessionActivity.d.ts +0 -8
- package/dist/cjs/Issues/sessionActivity.d.ts.map +0 -1
- package/dist/cjs/Issues/sessionActivity.js +0 -39
- package/dist/cjs/Issues/sessionActivity.js.map +0 -1
- package/dist/cjs/Issues/useAccessStatus.d.ts +0 -4
- package/dist/cjs/Issues/useAccessStatus.d.ts.map +0 -1
- package/dist/cjs/Issues/useAccessStatus.js +0 -30
- package/dist/cjs/Issues/useAccessStatus.js.map +0 -1
- package/dist/cjs/Issues/webAddress.d.ts +0 -2
- package/dist/cjs/Issues/webAddress.d.ts.map +0 -1
- package/dist/cjs/Issues/webAddress.js +0 -24
- package/dist/cjs/Issues/webAddress.js.map +0 -1
- package/dist/cjs/Labels/UsherLabels.d.ts +0 -177
- package/dist/cjs/Labels/UsherLabels.d.ts.map +0 -1
- package/dist/cjs/Labels/defaultUsherLabels.d.ts +0 -3
- package/dist/cjs/Labels/defaultUsherLabels.d.ts.map +0 -1
- package/dist/cjs/Labels/defaultUsherLabels.js +0 -179
- package/dist/cjs/Labels/defaultUsherLabels.js.map +0 -1
- package/dist/cjs/Labels/format.d.ts +0 -2
- package/dist/cjs/Labels/format.d.ts.map +0 -1
- package/dist/cjs/Labels/format.js +0 -15
- package/dist/cjs/Labels/format.js.map +0 -1
- package/dist/cjs/Labels/index.d.ts +0 -5
- package/dist/cjs/Labels/index.d.ts.map +0 -1
- package/dist/cjs/Labels/resolveLabels.d.ts +0 -3
- package/dist/cjs/Labels/resolveLabels.d.ts.map +0 -1
- package/dist/cjs/Labels/resolveLabels.js +0 -35
- package/dist/cjs/Labels/resolveLabels.js.map +0 -1
- package/dist/cjs/Provider/UsherBoundary.d.ts +0 -6
- package/dist/cjs/Provider/UsherBoundary.d.ts.map +0 -1
- package/dist/cjs/Provider/UsherBoundary.js +0 -24
- package/dist/cjs/Provider/UsherBoundary.js.map +0 -1
- package/dist/cjs/Provider/UsherContext.d.ts +0 -24
- package/dist/cjs/Provider/UsherContext.d.ts.map +0 -1
- package/dist/cjs/Provider/UsherContext.js +0 -41
- package/dist/cjs/Provider/UsherContext.js.map +0 -1
- package/dist/cjs/Provider/UsherProvider.d.ts +0 -14
- package/dist/cjs/Provider/UsherProvider.d.ts.map +0 -1
- package/dist/cjs/Provider/UsherProvider.js +0 -122
- package/dist/cjs/Provider/UsherProvider.js.map +0 -1
- package/dist/cjs/Provider/index.d.ts +0 -5
- package/dist/cjs/Provider/index.d.ts.map +0 -1
- package/dist/cjs/Provider/useUsher.d.ts +0 -13
- package/dist/cjs/Provider/useUsher.d.ts.map +0 -1
- package/dist/cjs/Provider/useUsher.js +0 -31
- package/dist/cjs/Provider/useUsher.js.map +0 -1
- package/dist/cjs/Reporting/AccessChoice.d.ts +0 -13
- package/dist/cjs/Reporting/AccessChoice.d.ts.map +0 -1
- package/dist/cjs/Reporting/AccessChoice.js +0 -113
- package/dist/cjs/Reporting/AccessChoice.js.map +0 -1
- package/dist/cjs/Reporting/AccessFields.d.ts +0 -12
- package/dist/cjs/Reporting/AccessFields.d.ts.map +0 -1
- package/dist/cjs/Reporting/AccessFields.js +0 -79
- package/dist/cjs/Reporting/AccessFields.js.map +0 -1
- package/dist/cjs/Reporting/AccessNotice.d.ts +0 -7
- package/dist/cjs/Reporting/AccessNotice.d.ts.map +0 -1
- package/dist/cjs/Reporting/AccessNotice.js +0 -28
- package/dist/cjs/Reporting/AccessNotice.js.map +0 -1
- package/dist/cjs/Reporting/ReportErrorDialog.d.ts +0 -9
- package/dist/cjs/Reporting/ReportErrorDialog.d.ts.map +0 -1
- package/dist/cjs/Reporting/ReportErrorDialog.js +0 -87
- package/dist/cjs/Reporting/ReportErrorDialog.js.map +0 -1
- package/dist/cjs/Reporting/ReportIssueDialog.d.ts +0 -8
- package/dist/cjs/Reporting/ReportIssueDialog.d.ts.map +0 -1
- package/dist/cjs/Reporting/ReportIssueDialog.js +0 -81
- package/dist/cjs/Reporting/ReportIssueDialog.js.map +0 -1
- package/dist/cjs/Reporting/ReportLimits.d.ts +0 -8
- package/dist/cjs/Reporting/ReportLimits.d.ts.map +0 -1
- package/dist/cjs/Reporting/ReportLimits.js +0 -19
- package/dist/cjs/Reporting/ReportLimits.js.map +0 -1
- package/dist/cjs/Reporting/ReportSent.d.ts +0 -5
- package/dist/cjs/Reporting/ReportSent.d.ts.map +0 -1
- package/dist/cjs/Reporting/SentWithReport.d.ts +0 -7
- package/dist/cjs/Reporting/SentWithReport.d.ts.map +0 -1
- package/dist/cjs/Reporting/SentWithReport.js +0 -40
- package/dist/cjs/Reporting/SentWithReport.js.map +0 -1
- package/dist/cjs/Reporting/TechnicalDetails.d.ts +0 -9
- package/dist/cjs/Reporting/TechnicalDetails.d.ts.map +0 -1
- package/dist/cjs/Reporting/TechnicalDetails.js +0 -75
- package/dist/cjs/Reporting/TechnicalDetails.js.map +0 -1
- package/dist/cjs/Reporting/durationOptions.d.ts +0 -9
- package/dist/cjs/Reporting/durationOptions.d.ts.map +0 -1
- package/dist/cjs/Reporting/durationOptions.js +0 -29
- package/dist/cjs/Reporting/durationOptions.js.map +0 -1
- package/dist/cjs/Reporting/formatLocation.d.ts +0 -7
- package/dist/cjs/Reporting/formatLocation.d.ts.map +0 -1
- package/dist/cjs/Reporting/formatLocation.js +0 -23
- package/dist/cjs/Reporting/formatLocation.js.map +0 -1
- package/dist/cjs/Reporting/index.d.ts +0 -14
- package/dist/cjs/Reporting/index.d.ts.map +0 -1
- package/dist/cjs/Reporting/reportValues.d.ts +0 -22
- package/dist/cjs/Reporting/reportValues.d.ts.map +0 -1
- package/dist/cjs/Reporting/reportValues.js +0 -124
- package/dist/cjs/Reporting/reportValues.js.map +0 -1
- package/dist/cjs/Reporting/useAccessChoice.d.ts +0 -13
- package/dist/cjs/Reporting/useAccessChoice.d.ts.map +0 -1
- package/dist/cjs/Reporting/useAccessChoice.js +0 -41
- package/dist/cjs/Reporting/useAccessChoice.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -8
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -133
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/package.json +0 -3
- package/dist/esm/Buttons/MyIssuesButton.d.ts +0 -14
- package/dist/esm/Buttons/MyIssuesButton.d.ts.map +0 -1
- package/dist/esm/Buttons/MyIssuesButton.js +0 -73
- package/dist/esm/Buttons/MyIssuesButton.js.map +0 -1
- package/dist/esm/Buttons/ReportButton.d.ts +0 -8
- package/dist/esm/Buttons/ReportButton.d.ts.map +0 -1
- package/dist/esm/Buttons/ReportButton.js +0 -32
- package/dist/esm/Buttons/ReportButton.js.map +0 -1
- package/dist/esm/Buttons/buttonModels.d.ts +0 -10
- package/dist/esm/Buttons/buttonModels.d.ts.map +0 -1
- package/dist/esm/Buttons/buttonModels.js +0 -41
- package/dist/esm/Buttons/buttonModels.js.map +0 -1
- package/dist/esm/Buttons/index.d.ts +0 -4
- package/dist/esm/Buttons/index.d.ts.map +0 -1
- package/dist/esm/Buttons/index.js +0 -4
- package/dist/esm/Buttons/index.js.map +0 -1
- package/dist/esm/Correlation/CorrelationTracker.d.ts +0 -10
- package/dist/esm/Correlation/CorrelationTracker.d.ts.map +0 -1
- package/dist/esm/Correlation/CorrelationTracker.js +0 -48
- package/dist/esm/Correlation/CorrelationTracker.js.map +0 -1
- package/dist/esm/Correlation/index.d.ts +0 -3
- package/dist/esm/Correlation/index.d.ts.map +0 -1
- package/dist/esm/Correlation/index.js +0 -3
- package/dist/esm/Correlation/index.js.map +0 -1
- package/dist/esm/Correlation/withCorrelationIdHeader.d.ts +0 -6
- package/dist/esm/Correlation/withCorrelationIdHeader.d.ts.map +0 -1
- package/dist/esm/Correlation/withCorrelationIdHeader.js +0 -36
- package/dist/esm/Correlation/withCorrelationIdHeader.js.map +0 -1
- package/dist/esm/Icons.d.ts +0 -4
- package/dist/esm/Icons.d.ts.map +0 -1
- package/dist/esm/Icons.js +0 -49
- package/dist/esm/Icons.js.map +0 -1
- package/dist/esm/Issues/IssueView/AccessPanel.d.ts +0 -6
- package/dist/esm/Issues/IssueView/AccessPanel.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/AccessPanel.js +0 -122
- package/dist/esm/Issues/IssueView/AccessPanel.js.map +0 -1
- package/dist/esm/Issues/IssueView/GrantAccessDialog.d.ts +0 -6
- package/dist/esm/Issues/IssueView/GrantAccessDialog.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/GrantAccessDialog.js +0 -54
- package/dist/esm/Issues/IssueView/GrantAccessDialog.js.map +0 -1
- package/dist/esm/Issues/IssueView/IdentityPanel.d.ts +0 -6
- package/dist/esm/Issues/IssueView/IdentityPanel.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/IdentityPanel.js +0 -43
- package/dist/esm/Issues/IssueView/IdentityPanel.js.map +0 -1
- package/dist/esm/Issues/IssueView/IssueActions.d.ts +0 -6
- package/dist/esm/Issues/IssueView/IssueActions.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/IssueActions.js +0 -56
- package/dist/esm/Issues/IssueView/IssueActions.js.map +0 -1
- package/dist/esm/Issues/IssueView/IssueConversationPanel.d.ts +0 -6
- package/dist/esm/Issues/IssueView/IssueConversationPanel.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/IssueConversationPanel.js +0 -95
- package/dist/esm/Issues/IssueView/IssueConversationPanel.js.map +0 -1
- package/dist/esm/Issues/IssueView/IssueHeader.d.ts +0 -7
- package/dist/esm/Issues/IssueView/IssueHeader.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/IssueHeader.js +0 -92
- package/dist/esm/Issues/IssueView/IssueHeader.js.map +0 -1
- package/dist/esm/Issues/IssueView/IssueView.d.ts +0 -7
- package/dist/esm/Issues/IssueView/IssueView.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/IssueView.js +0 -83
- package/dist/esm/Issues/IssueView/IssueView.js.map +0 -1
- package/dist/esm/Issues/IssueView/QuestionBanner.d.ts +0 -5
- package/dist/esm/Issues/IssueView/QuestionBanner.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/QuestionBanner.js +0 -22
- package/dist/esm/Issues/IssueView/QuestionBanner.js.map +0 -1
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.d.ts +0 -6
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.js +0 -32
- package/dist/esm/Issues/IssueView/ReopenIssueDialog.js.map +0 -1
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.d.ts +0 -6
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.js +0 -30
- package/dist/esm/Issues/IssueView/ShareIdentityDialog.js.map +0 -1
- package/dist/esm/Issues/IssueView/StatusStrip.d.ts +0 -6
- package/dist/esm/Issues/IssueView/StatusStrip.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/StatusStrip.js +0 -29
- package/dist/esm/Issues/IssueView/StatusStrip.js.map +0 -1
- package/dist/esm/Issues/IssueView/SupportSessions.d.ts +0 -7
- package/dist/esm/Issues/IssueView/SupportSessions.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/SupportSessions.js +0 -60
- package/dist/esm/Issues/IssueView/SupportSessions.js.map +0 -1
- package/dist/esm/Issues/IssueView/index.d.ts +0 -13
- package/dist/esm/Issues/IssueView/index.d.ts.map +0 -1
- package/dist/esm/Issues/IssueView/index.js +0 -13
- package/dist/esm/Issues/IssueView/index.js.map +0 -1
- package/dist/esm/Issues/MyIssues/IssueList.d.ts +0 -7
- package/dist/esm/Issues/MyIssues/IssueList.d.ts.map +0 -1
- package/dist/esm/Issues/MyIssues/IssueList.js +0 -90
- package/dist/esm/Issues/MyIssues/IssueList.js.map +0 -1
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.d.ts +0 -7
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.d.ts.map +0 -1
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.js +0 -77
- package/dist/esm/Issues/MyIssues/MyIssuesDialog.js.map +0 -1
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.d.ts +0 -21
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.d.ts.map +0 -1
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.js +0 -49
- package/dist/esm/Issues/MyIssues/MyIssuesNavigation.js.map +0 -1
- package/dist/esm/Issues/MyIssues/index.d.ts +0 -4
- package/dist/esm/Issues/MyIssues/index.d.ts.map +0 -1
- package/dist/esm/Issues/MyIssues/index.js +0 -4
- package/dist/esm/Issues/MyIssues/index.js.map +0 -1
- package/dist/esm/Issues/MyIssuesList.d.ts +0 -7
- package/dist/esm/Issues/MyIssuesList.d.ts.map +0 -1
- package/dist/esm/Issues/MyIssuesList.js +0 -29
- package/dist/esm/Issues/MyIssuesList.js.map +0 -1
- package/dist/esm/Issues/accessStatus.d.ts +0 -13
- package/dist/esm/Issues/accessStatus.d.ts.map +0 -1
- package/dist/esm/Issues/accessStatus.js +0 -54
- package/dist/esm/Issues/accessStatus.js.map +0 -1
- package/dist/esm/Issues/conversationMessages.d.ts +0 -14
- package/dist/esm/Issues/conversationMessages.d.ts.map +0 -1
- package/dist/esm/Issues/conversationMessages.js +0 -125
- package/dist/esm/Issues/conversationMessages.js.map +0 -1
- package/dist/esm/Issues/index.d.ts +0 -10
- package/dist/esm/Issues/index.d.ts.map +0 -1
- package/dist/esm/Issues/index.js +0 -10
- package/dist/esm/Issues/index.js.map +0 -1
- package/dist/esm/Issues/issueStates.d.ts +0 -12
- package/dist/esm/Issues/issueStates.d.ts.map +0 -1
- package/dist/esm/Issues/issueStates.js +0 -81
- package/dist/esm/Issues/issueStates.js.map +0 -1
- package/dist/esm/Issues/sessionActivity.d.ts +0 -8
- package/dist/esm/Issues/sessionActivity.d.ts.map +0 -1
- package/dist/esm/Issues/sessionActivity.js +0 -37
- package/dist/esm/Issues/sessionActivity.js.map +0 -1
- package/dist/esm/Issues/useAccessStatus.d.ts +0 -4
- package/dist/esm/Issues/useAccessStatus.d.ts.map +0 -1
- package/dist/esm/Issues/useAccessStatus.js +0 -28
- package/dist/esm/Issues/useAccessStatus.js.map +0 -1
- package/dist/esm/Issues/webAddress.d.ts +0 -2
- package/dist/esm/Issues/webAddress.d.ts.map +0 -1
- package/dist/esm/Issues/webAddress.js +0 -22
- package/dist/esm/Issues/webAddress.js.map +0 -1
- package/dist/esm/Labels/UsherLabels.d.ts +0 -177
- package/dist/esm/Labels/UsherLabels.d.ts.map +0 -1
- package/dist/esm/Labels/UsherLabels.js +0 -2
- package/dist/esm/Labels/UsherLabels.js.map +0 -1
- package/dist/esm/Labels/defaultUsherLabels.d.ts +0 -3
- package/dist/esm/Labels/defaultUsherLabels.d.ts.map +0 -1
- package/dist/esm/Labels/defaultUsherLabels.js +0 -177
- package/dist/esm/Labels/defaultUsherLabels.js.map +0 -1
- package/dist/esm/Labels/format.d.ts +0 -2
- package/dist/esm/Labels/format.d.ts.map +0 -1
- package/dist/esm/Labels/format.js +0 -13
- package/dist/esm/Labels/format.js.map +0 -1
- package/dist/esm/Labels/index.d.ts +0 -5
- package/dist/esm/Labels/index.d.ts.map +0 -1
- package/dist/esm/Labels/index.js +0 -5
- package/dist/esm/Labels/index.js.map +0 -1
- package/dist/esm/Labels/resolveLabels.d.ts +0 -3
- package/dist/esm/Labels/resolveLabels.d.ts.map +0 -1
- package/dist/esm/Labels/resolveLabels.js +0 -33
- package/dist/esm/Labels/resolveLabels.js.map +0 -1
- package/dist/esm/Provider/UsherBoundary.d.ts +0 -6
- package/dist/esm/Provider/UsherBoundary.d.ts.map +0 -1
- package/dist/esm/Provider/UsherBoundary.js +0 -22
- package/dist/esm/Provider/UsherBoundary.js.map +0 -1
- package/dist/esm/Provider/UsherContext.d.ts +0 -24
- package/dist/esm/Provider/UsherContext.d.ts.map +0 -1
- package/dist/esm/Provider/UsherContext.js +0 -36
- package/dist/esm/Provider/UsherContext.js.map +0 -1
- package/dist/esm/Provider/UsherProvider.d.ts +0 -14
- package/dist/esm/Provider/UsherProvider.d.ts.map +0 -1
- package/dist/esm/Provider/UsherProvider.js +0 -120
- package/dist/esm/Provider/UsherProvider.js.map +0 -1
- package/dist/esm/Provider/index.d.ts +0 -5
- package/dist/esm/Provider/index.d.ts.map +0 -1
- package/dist/esm/Provider/index.js +0 -5
- package/dist/esm/Provider/index.js.map +0 -1
- package/dist/esm/Provider/useUsher.d.ts +0 -13
- package/dist/esm/Provider/useUsher.d.ts.map +0 -1
- package/dist/esm/Provider/useUsher.js +0 -29
- package/dist/esm/Provider/useUsher.js.map +0 -1
- package/dist/esm/Reporting/AccessChoice.d.ts +0 -13
- package/dist/esm/Reporting/AccessChoice.d.ts.map +0 -1
- package/dist/esm/Reporting/AccessChoice.js +0 -106
- package/dist/esm/Reporting/AccessChoice.js.map +0 -1
- package/dist/esm/Reporting/AccessFields.d.ts +0 -12
- package/dist/esm/Reporting/AccessFields.d.ts.map +0 -1
- package/dist/esm/Reporting/AccessFields.js +0 -77
- package/dist/esm/Reporting/AccessFields.js.map +0 -1
- package/dist/esm/Reporting/AccessNotice.d.ts +0 -7
- package/dist/esm/Reporting/AccessNotice.d.ts.map +0 -1
- package/dist/esm/Reporting/AccessNotice.js +0 -26
- package/dist/esm/Reporting/AccessNotice.js.map +0 -1
- package/dist/esm/Reporting/ReportErrorDialog.d.ts +0 -9
- package/dist/esm/Reporting/ReportErrorDialog.d.ts.map +0 -1
- package/dist/esm/Reporting/ReportErrorDialog.js +0 -85
- package/dist/esm/Reporting/ReportErrorDialog.js.map +0 -1
- package/dist/esm/Reporting/ReportIssueDialog.d.ts +0 -8
- package/dist/esm/Reporting/ReportIssueDialog.d.ts.map +0 -1
- package/dist/esm/Reporting/ReportIssueDialog.js +0 -79
- package/dist/esm/Reporting/ReportIssueDialog.js.map +0 -1
- package/dist/esm/Reporting/ReportLimits.d.ts +0 -8
- package/dist/esm/Reporting/ReportLimits.d.ts.map +0 -1
- package/dist/esm/Reporting/ReportLimits.js +0 -17
- package/dist/esm/Reporting/ReportLimits.js.map +0 -1
- package/dist/esm/Reporting/ReportSent.d.ts +0 -5
- package/dist/esm/Reporting/ReportSent.d.ts.map +0 -1
- package/dist/esm/Reporting/ReportSent.js +0 -2
- package/dist/esm/Reporting/ReportSent.js.map +0 -1
- package/dist/esm/Reporting/SentWithReport.d.ts +0 -7
- package/dist/esm/Reporting/SentWithReport.d.ts.map +0 -1
- package/dist/esm/Reporting/SentWithReport.js +0 -38
- package/dist/esm/Reporting/SentWithReport.js.map +0 -1
- package/dist/esm/Reporting/TechnicalDetails.d.ts +0 -9
- package/dist/esm/Reporting/TechnicalDetails.d.ts.map +0 -1
- package/dist/esm/Reporting/TechnicalDetails.js +0 -73
- package/dist/esm/Reporting/TechnicalDetails.js.map +0 -1
- package/dist/esm/Reporting/durationOptions.d.ts +0 -9
- package/dist/esm/Reporting/durationOptions.d.ts.map +0 -1
- package/dist/esm/Reporting/durationOptions.js +0 -27
- package/dist/esm/Reporting/durationOptions.js.map +0 -1
- package/dist/esm/Reporting/formatLocation.d.ts +0 -7
- package/dist/esm/Reporting/formatLocation.d.ts.map +0 -1
- package/dist/esm/Reporting/formatLocation.js +0 -21
- package/dist/esm/Reporting/formatLocation.js.map +0 -1
- package/dist/esm/Reporting/index.d.ts +0 -14
- package/dist/esm/Reporting/index.d.ts.map +0 -1
- package/dist/esm/Reporting/index.js +0 -14
- package/dist/esm/Reporting/index.js.map +0 -1
- package/dist/esm/Reporting/reportValues.d.ts +0 -22
- package/dist/esm/Reporting/reportValues.d.ts.map +0 -1
- package/dist/esm/Reporting/reportValues.js +0 -116
- package/dist/esm/Reporting/reportValues.js.map +0 -1
- package/dist/esm/Reporting/useAccessChoice.d.ts +0 -13
- package/dist/esm/Reporting/useAccessChoice.d.ts.map +0 -1
- package/dist/esm/Reporting/useAccessChoice.js +0 -39
- package/dist/esm/Reporting/useAccessChoice.js.map +0 -1
- package/dist/esm/index.d.ts +0 -8
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -48
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/index.ts +0 -10
- package/styles.css +0 -320
package/README.md
CHANGED
|
@@ -1,72 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Temporary Holding Version
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
sheet with each issue's conversation. Built on `@cratis/components` and the generated proxies in
|
|
5
|
-
`@cratis/showrunner.usher`. How to use it: [Documentation/Usher/react.md](../../../Documentation/Usher/react.md).
|
|
6
|
-
|
|
7
|
-
## Component hierarchy
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
UsherProvider provides UsherContext, wraps ArcContext for correlation tracking, renders the dialogs once
|
|
11
|
-
├── ReportIssueDialog CommandDialog<ReportIssue>
|
|
12
|
-
│ ├── SentWithReport what is sent along: location, version, recent requests
|
|
13
|
-
│ └── AccessFields share identity / grant access / duration, with AccessNotice
|
|
14
|
-
├── ReportErrorDialog CommandDialog<ReportError>
|
|
15
|
-
│ ├── TechnicalDetails collapsed <details>: type, correlation id, stack frames
|
|
16
|
-
│ ├── SentWithReport
|
|
17
|
-
│ └── AccessFields
|
|
18
|
-
└── MyIssuesDialog Dialog placement='end', 720px
|
|
19
|
-
├── IssueList DataTableForObservableQuery<MyIssues>
|
|
20
|
-
└── IssueView also exported on its own
|
|
21
|
-
├── IssueHeader, StatusStrip, QuestionBanner
|
|
22
|
-
├── IssueConversationPanel ChatConversation; AnswerQuestion or AddDetails
|
|
23
|
-
├── IdentityPanel ShareIdentityDialog
|
|
24
|
-
├── AccessPanel GrantAccessDialog, revoke with confirmation, SupportSessions
|
|
25
|
-
└── IssueActions ReopenIssueDialog, withdraw with confirmation
|
|
26
|
-
ReportButton, MyIssuesButton open the dialogs through useUsher()
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Architecture decisions
|
|
30
|
-
|
|
31
|
-
- **One provider, dialogs rendered once.** `UsherProvider` owns the `useDialog` wrappers; the buttons and `useUsher()`
|
|
32
|
-
only call into `UsherContext`. The location of the caller is taken with `useSliceContext()` where `useUsher()` is
|
|
33
|
-
called and passed to the dialog, because the dialogs render at the provider, outside the caller's slice scope.
|
|
34
|
-
- **Correlation tracking through the HTTP headers callback.** Arc has no global observer of command or query results,
|
|
35
|
-
but Arc React hands each command and snapshot query the `httpHeadersCallback` of the nearest `ArcContext`. The
|
|
36
|
-
provider wraps it to add an `X-Correlation-ID` to every request and remember it (`Correlation/`). Arc's backend uses
|
|
37
|
-
the id a request carries. Observable queries go over Arc's shared hub connection and are not tracked.
|
|
38
|
-
- **`UsherBoundary` keeps Usher out of what it reports.** Usher's own components run with the untracked `ArcContext`
|
|
39
|
-
and inside a `<Slice>` boundary, so its requests are not sent with a report and its proxies do not change the slice
|
|
40
|
-
context of the application around them.
|
|
41
|
-
- **Granting access forces sharing identity.** `useAccessChoice` follows the form through `onFieldChange` and forces
|
|
42
|
-
`shareIdentity` through `currentValues`. `shareIdentity` is left out of `initialValues`, because the form merges
|
|
43
|
-
`initialValues` over `currentValues`.
|
|
44
|
-
|
|
45
|
-
## State
|
|
46
|
-
|
|
47
|
-
Decisions live in pure, specified modules; the components render and wire events:
|
|
48
|
-
|
|
49
|
-
| Module | Decides |
|
|
50
|
-
| --- | --- |
|
|
51
|
-
| `Reporting/AccessChoice.ts` | access choice transitions, forced identity, until when access lasts |
|
|
52
|
-
| `Reporting/reportValues.ts` | the initial values of a report, error details from what was thrown |
|
|
53
|
-
| `Issues/issueStates.ts` | state badges, closed states, status strip step |
|
|
54
|
-
| `Issues/MyIssuesList.ts` | waiting count, closed filter, fix released |
|
|
55
|
-
| `Issues/conversationMessages.ts` | chat authors and message bodies |
|
|
56
|
-
| `Issues/accessStatus.ts` | whether support may sign in, against the clock |
|
|
57
|
-
| `Issues/MyIssues/MyIssuesNavigation.ts` | list or issue, show closed |
|
|
58
|
-
| `Buttons/buttonModels.ts` | text, tooltip and accessible name of the buttons |
|
|
59
|
-
| `Labels/` | English defaults, deep overrides, placeholders |
|
|
60
|
-
|
|
61
|
-
## CSS conventions
|
|
62
|
-
|
|
63
|
-
One stylesheet, `styles.css`, exported as `@cratis/showrunner.usher.react/styles`; the build has no CSS pipeline, so
|
|
64
|
-
components do not import CSS. Classes are prefixed `usher-` with BEM-like element names, and every color, border and
|
|
65
|
-
radius comes from the `--cratis-*` tokens. State is styled through `data-*` attributes (`data-highlighted`,
|
|
66
|
-
`data-reached`, `data-current`).
|
|
67
|
-
|
|
68
|
-
## Extending
|
|
69
|
-
|
|
70
|
-
- A new text: add it to `UsherLabels` and `defaultUsherLabels`; every component reads labels from `UsherContext`.
|
|
71
|
-
- A new conversation entry kind: add its sentence to `ConversationEventLabels` and map it in `conversationMessages.ts`.
|
|
72
|
-
- A new dialog: render its `useDialog` wrapper in `UsherProvider` and add an opener to `UsherContextValue` and `useUsher`.
|
|
3
|
+
This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
|
package/package.json
CHANGED
|
@@ -1,85 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"keywords": [
|
|
7
|
-
"cratis",
|
|
8
|
-
"showrunner",
|
|
9
|
-
"usher",
|
|
10
|
-
"support",
|
|
11
|
-
"arc",
|
|
12
|
-
"react",
|
|
13
|
-
"components"
|
|
14
|
-
],
|
|
15
|
-
"homepage": "https://github.com/Cratis/Showrunner",
|
|
16
|
-
"author": "Cratis",
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/Cratis/Showrunner.git"
|
|
21
|
-
},
|
|
22
|
-
"publishConfig": {
|
|
23
|
-
"access": "public"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"dist",
|
|
27
|
-
"styles.css",
|
|
28
|
-
"**/*.ts",
|
|
29
|
-
"**/*.tsx",
|
|
30
|
-
"!**/for_*/**",
|
|
31
|
-
"!**/given/**",
|
|
32
|
-
"!**/*.tsbuildinfo"
|
|
33
|
-
],
|
|
34
|
-
"main": "dist/cjs/index.js",
|
|
35
|
-
"module": "dist/esm/index.js",
|
|
36
|
-
"types": "dist/esm/index.d.ts",
|
|
37
|
-
"exports": {
|
|
38
|
-
"./package.json": "./package.json",
|
|
39
|
-
".": {
|
|
40
|
-
"import": {
|
|
41
|
-
"types": "./dist/esm/index.d.ts",
|
|
42
|
-
"default": "./dist/esm/index.js"
|
|
43
|
-
},
|
|
44
|
-
"require": {
|
|
45
|
-
"types": "./dist/cjs/index.d.ts",
|
|
46
|
-
"default": "./dist/cjs/index.js"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"./styles": "./styles.css"
|
|
50
|
-
},
|
|
51
|
-
"scripts": {
|
|
52
|
-
"prepare": "yarn g:build",
|
|
53
|
-
"clean": "yarn g:clean",
|
|
54
|
-
"compile": "yarn g:compile",
|
|
55
|
-
"build": "yarn g:build",
|
|
56
|
-
"lint": "yarn g:lint",
|
|
57
|
-
"lint:ci": "yarn g:lint:ci",
|
|
58
|
-
"test": "yarn g:test",
|
|
59
|
-
"test:watch": "yarn g:test:watch",
|
|
60
|
-
"ci": "yarn g:ci",
|
|
61
|
-
"up": "yarn g:up"
|
|
62
|
-
},
|
|
63
|
-
"dependencies": {
|
|
64
|
-
"@cratis/showrunner.usher": "0.0.0-bootstrap.0"
|
|
65
|
-
},
|
|
66
|
-
"devDependencies": {
|
|
67
|
-
"@cratis/arc": "22.146.0",
|
|
68
|
-
"@cratis/arc.react": "22.146.0",
|
|
69
|
-
"@cratis/components": "4.38.0",
|
|
70
|
-
"@cratis/fundamentals": "7.27.0",
|
|
71
|
-
"react": "^19.3.1",
|
|
72
|
-
"react-dom": "^19.3.1",
|
|
73
|
-
"reflect-metadata": "0.2.2"
|
|
74
|
-
},
|
|
75
|
-
"peerDependencies": {
|
|
76
|
-
"@cratis/arc": "^22.146.0",
|
|
77
|
-
"@cratis/arc.react": "^22.146.0",
|
|
78
|
-
"@cratis/components": "^4.38.0",
|
|
79
|
-
"@cratis/fundamentals": "^7.27.0",
|
|
80
|
-
"react": "^19.0.0"
|
|
81
|
-
},
|
|
82
|
-
"sideEffects": [
|
|
83
|
-
"*.css"
|
|
84
|
-
]
|
|
2
|
+
"name": "@cratis/showrunner.usher.react",
|
|
3
|
+
"version": "0.0.0-stage",
|
|
4
|
+
"stub": true,
|
|
5
|
+
"description": "Temporary package placeholder for staged publishing"
|
|
85
6
|
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
import { Button, IconButton } from '@cratis/components/Common';
|
|
5
|
-
import { Badge } from '@cratis/components/Display';
|
|
6
|
-
import { MyIssues } from '@cratis/showrunner.usher';
|
|
7
|
-
import { InboxIcon } from '../Icons.js';
|
|
8
|
-
import { waitingCount } from '../Issues/MyIssuesList.js';
|
|
9
|
-
import { UsherBoundary } from '../Provider/UsherBoundary.js';
|
|
10
|
-
import { useUsher } from '../Provider/useUsher.js';
|
|
11
|
-
import { myIssuesButtonModel, UsherButtonSize } from './buttonModels.js';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Props for {@link MyIssuesButton}.
|
|
15
|
-
*/
|
|
16
|
-
export interface MyIssuesButtonProps {
|
|
17
|
-
/** `large` shows the icon and the text; `small` shows the icon, with the text as tooltip and accessible name. Defaults to `large`. */
|
|
18
|
-
size?: UsherButtonSize;
|
|
19
|
-
|
|
20
|
-
/** Additional class name for the button. */
|
|
21
|
-
className?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Opens the my issues side sheet. A badge counts the issues support waits for the user on, and the accessible name
|
|
26
|
-
* says how many.
|
|
27
|
-
*/
|
|
28
|
-
export const MyIssuesButton = (props: MyIssuesButtonProps) => {
|
|
29
|
-
const usher = useUsher();
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<UsherBoundary>
|
|
33
|
-
<MyIssuesButtonContent {...props} onOpen={usher.showMyIssues} />
|
|
34
|
-
</UsherBoundary>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const MyIssuesButtonContent = ({ size = 'large', className, onOpen }: MyIssuesButtonProps & { onOpen: () => void }) => {
|
|
39
|
-
const usher = useUsher();
|
|
40
|
-
const [result] = MyIssues.use();
|
|
41
|
-
|
|
42
|
-
return <MyIssuesButtonView size={size} className={className} waiting={waitingCount(result.data ?? [])} labels={usher.labels} onOpen={onOpen} />;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Props for {@link MyIssuesButtonView}.
|
|
47
|
-
*/
|
|
48
|
-
export interface MyIssuesButtonViewProps extends MyIssuesButtonProps {
|
|
49
|
-
/** How many issues support waits for the user on. */
|
|
50
|
-
waiting: number;
|
|
51
|
-
|
|
52
|
-
/** The labels to show. */
|
|
53
|
-
labels: ReturnType<typeof useUsher>['labels'];
|
|
54
|
-
|
|
55
|
-
/** Opens the my issues side sheet. */
|
|
56
|
-
onOpen: () => void;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Renders the my issues button for a given number of issues support waits for the user on.
|
|
61
|
-
*/
|
|
62
|
-
export const MyIssuesButtonView = ({ size = 'large', className, waiting, labels, onOpen }: MyIssuesButtonViewProps) => {
|
|
63
|
-
const model = myIssuesButtonModel(size, waiting, labels);
|
|
64
|
-
const badge = waiting > 0 && (
|
|
65
|
-
<span className='usher-my-issues-button__badge' aria-hidden='true'>
|
|
66
|
-
<Badge value={waiting} severity='warn' size='small' />
|
|
67
|
-
</span>
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<span className={['usher-my-issues-button', className].filter(Boolean).join(' ')} data-size={size}>
|
|
72
|
-
{size === 'small'
|
|
73
|
-
? <IconButton variant='ghost' icon={<InboxIcon />} aria-label={model.accessibleName} tooltip={model.tooltip} onClick={onOpen} />
|
|
74
|
-
: <Button variant='outline' icon={<InboxIcon />} label={model.text} aria-label={model.accessibleName} onClick={onOpen} />}
|
|
75
|
-
{badge}
|
|
76
|
-
</span>
|
|
77
|
-
);
|
|
78
|
-
};
|
package/Buttons/ReportButton.tsx
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
import { Button, IconButton } from '@cratis/components/Common';
|
|
5
|
-
import { BugIcon } from '../Icons.js';
|
|
6
|
-
import { useUsher } from '../Provider/useUsher.js';
|
|
7
|
-
import { reportButtonModel, UsherButtonSize } from './buttonModels.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Props for {@link ReportButton}.
|
|
11
|
-
*/
|
|
12
|
-
export interface ReportButtonProps {
|
|
13
|
-
/** `large` shows the icon and the text; `small` shows the icon, with the text as tooltip and accessible name. Defaults to `large`. */
|
|
14
|
-
size?: UsherButtonSize;
|
|
15
|
-
|
|
16
|
-
/** The error to report: `ErrorDetails` from `@cratis/showrunner.usher`, or anything thrown. The button reports a problem described by hand when not given. */
|
|
17
|
-
error?: unknown;
|
|
18
|
-
|
|
19
|
-
/** Additional class name for the button. */
|
|
20
|
-
className?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Opens the report a problem dialog, or the report this error dialog when given an error, with where in the
|
|
25
|
-
* application the button is.
|
|
26
|
-
*/
|
|
27
|
-
export const ReportButton = ({ size = 'large', error, className }: ReportButtonProps) => {
|
|
28
|
-
const usher = useUsher();
|
|
29
|
-
const reportsError = error !== undefined;
|
|
30
|
-
const model = reportButtonModel(size, reportsError, usher.labels);
|
|
31
|
-
const report = () => reportsError ? usher.reportError(error) : usher.reportIssue();
|
|
32
|
-
|
|
33
|
-
return size === 'small'
|
|
34
|
-
? (
|
|
35
|
-
<IconButton
|
|
36
|
-
className={className}
|
|
37
|
-
variant='ghost'
|
|
38
|
-
icon={<BugIcon />}
|
|
39
|
-
aria-label={model.accessibleName}
|
|
40
|
-
tooltip={model.tooltip}
|
|
41
|
-
onClick={report} />
|
|
42
|
-
)
|
|
43
|
-
: (
|
|
44
|
-
<Button
|
|
45
|
-
className={className}
|
|
46
|
-
variant='outline'
|
|
47
|
-
icon={<BugIcon />}
|
|
48
|
-
label={model.text}
|
|
49
|
-
onClick={report} />
|
|
50
|
-
);
|
|
51
|
-
};
|
package/Buttons/buttonModels.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
import { format, UsherLabels } from '../Labels/index.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The sizes of the Usher buttons: `large` shows the icon and the text; `small` shows the icon, with the text as the
|
|
8
|
-
* tooltip and the accessible name.
|
|
9
|
-
*/
|
|
10
|
-
export type UsherButtonSize = 'large' | 'small';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* What an Usher button shows and announces.
|
|
14
|
-
*/
|
|
15
|
-
export interface ButtonModel {
|
|
16
|
-
/** The visible text; empty for a small button. */
|
|
17
|
-
readonly text: string;
|
|
18
|
-
|
|
19
|
-
/** The accessible name. */
|
|
20
|
-
readonly accessibleName: string;
|
|
21
|
-
|
|
22
|
-
/** The tooltip; empty for a large button, whose text says it all. */
|
|
23
|
-
readonly tooltip: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Gets what the report button shows and announces.
|
|
28
|
-
* @param size The {@link UsherButtonSize}.
|
|
29
|
-
* @param reportsError Whether the button reports an error rather than a problem described by hand.
|
|
30
|
-
* @param labels The labels to show.
|
|
31
|
-
* @returns The {@link ButtonModel}.
|
|
32
|
-
*/
|
|
33
|
-
export function reportButtonModel(size: UsherButtonSize, reportsError: boolean, labels: UsherLabels): ButtonModel {
|
|
34
|
-
const label = reportsError ? labels.reportButton.reportError : labels.reportButton.reportProblem;
|
|
35
|
-
return modelFor(size, label, label);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Gets what the my issues button shows and announces.
|
|
40
|
-
* @param size The {@link UsherButtonSize}.
|
|
41
|
-
* @param waiting How many issues support waits for the user on.
|
|
42
|
-
* @param labels The labels to show.
|
|
43
|
-
* @returns The {@link ButtonModel}.
|
|
44
|
-
*/
|
|
45
|
-
export function myIssuesButtonModel(size: UsherButtonSize, waiting: number, labels: UsherLabels): ButtonModel {
|
|
46
|
-
const label = labels.myIssuesButton.label;
|
|
47
|
-
const accessibleName = waiting > 0 ? `${label}, ${format(labels.myIssuesButton.waiting, { count: waiting })}` : label;
|
|
48
|
-
return modelFor(size, label, accessibleName);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function modelFor(size: UsherButtonSize, label: string, accessibleName: string): ButtonModel {
|
|
52
|
-
return size === 'small'
|
|
53
|
-
? { text: '', accessibleName, tooltip: accessibleName }
|
|
54
|
-
: { text: label, accessibleName, tooltip: '' };
|
|
55
|
-
}
|
package/Buttons/index.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
import { Guid } from '@cratis/fundamentals';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Keeps the correlation ids of the last few Arc commands and queries, so a report can carry them.
|
|
8
|
-
*/
|
|
9
|
-
export class CorrelationTracker {
|
|
10
|
-
private _correlationIds: Guid[] = [];
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Initializes a new instance of {@link CorrelationTracker}.
|
|
14
|
-
* @param capacity How many correlation ids to keep; the oldest is dropped when one more is tracked.
|
|
15
|
-
*/
|
|
16
|
-
constructor(readonly capacity: number = 5) {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Gets the correlation ids kept, oldest first.
|
|
21
|
-
*/
|
|
22
|
-
get correlationIds(): Guid[] {
|
|
23
|
-
return [...this._correlationIds];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Tracks a correlation id. A correlation id already kept moves to the end instead of being kept twice; an
|
|
28
|
-
* empty one is ignored.
|
|
29
|
-
* @param correlationId The correlation id, as a {@link Guid} or its string form.
|
|
30
|
-
*/
|
|
31
|
-
track(correlationId: Guid | string): void {
|
|
32
|
-
const parsed = typeof correlationId === 'string' ? parseGuid(correlationId) : correlationId;
|
|
33
|
-
if (!parsed || parsed.equals(Guid.empty)) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
this._correlationIds = [...this._correlationIds.filter(existing => !existing.equals(parsed)), parsed]
|
|
38
|
-
.slice(-Math.max(this.capacity, 0));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Forgets every correlation id kept.
|
|
43
|
-
*/
|
|
44
|
-
clear(): void {
|
|
45
|
-
this._correlationIds = [];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function parseGuid(value: string): Guid | undefined {
|
|
50
|
-
return Guid.isGuid(value) ? Guid.parse(value) : undefined;
|
|
51
|
-
}
|
package/Correlation/index.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
import { GetHttpHeaders } from '@cratis/arc';
|
|
5
|
-
import { Guid } from '@cratis/fundamentals';
|
|
6
|
-
import { CorrelationTracker } from './CorrelationTracker.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The HTTP header Arc reads the correlation id of a command or query from, unless the backend configures another.
|
|
10
|
-
*/
|
|
11
|
-
export const defaultCorrelationIdHeader = 'X-Correlation-ID';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Wraps the HTTP headers callback Arc calls for every command and query request, so each request carries a
|
|
15
|
-
* correlation id the tracker knows.
|
|
16
|
-
* @remarks
|
|
17
|
-
* Arc uses the correlation id a request carries in its correlation id header, so the id tracked is the id the
|
|
18
|
-
* backend records for the command or query. A correlation id the headers already carry is kept and tracked;
|
|
19
|
-
* otherwise a new one is added.
|
|
20
|
-
* @param headersCallback The callback to wrap; nothing for none.
|
|
21
|
-
* @param tracker The {@link CorrelationTracker} to track the correlation ids in.
|
|
22
|
-
* @param header The name of the correlation id header.
|
|
23
|
-
* @param createCorrelationId Creates a new correlation id.
|
|
24
|
-
* @returns The wrapping callback.
|
|
25
|
-
*/
|
|
26
|
-
export function withCorrelationIdHeader(
|
|
27
|
-
headersCallback: GetHttpHeaders | undefined,
|
|
28
|
-
tracker: CorrelationTracker,
|
|
29
|
-
header: string = defaultCorrelationIdHeader,
|
|
30
|
-
createCorrelationId: () => Guid = () => Guid.create()): GetHttpHeaders {
|
|
31
|
-
return () => {
|
|
32
|
-
const headers = new Headers(headersCallback?.() ?? {});
|
|
33
|
-
const existing = headers.get(header);
|
|
34
|
-
const correlationId = existing && Guid.isGuid(existing) ? existing : createCorrelationId().toString();
|
|
35
|
-
headers.set(header, correlationId);
|
|
36
|
-
tracker.track(correlationId);
|
|
37
|
-
|
|
38
|
-
const record: Record<string, string> = {};
|
|
39
|
-
headers.forEach((value, name) => {
|
|
40
|
-
record[name] = value;
|
|
41
|
-
});
|
|
42
|
-
return record;
|
|
43
|
-
};
|
|
44
|
-
}
|
package/Icons.tsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The bug icon of the report button. Decorative: the button carries the accessible name.
|
|
6
|
-
*/
|
|
7
|
-
export const BugIcon = () => (
|
|
8
|
-
<svg className='usher-icon' viewBox='0 0 24 24' width='1em' height='1em' aria-hidden='true' focusable='false'>
|
|
9
|
-
<path fill='currentColor' d='M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 0 0-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z' />
|
|
10
|
-
</svg>
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The inbox icon of the my issues button. Decorative: the button carries the accessible name.
|
|
15
|
-
*/
|
|
16
|
-
export const InboxIcon = () => (
|
|
17
|
-
<svg className='usher-icon' viewBox='0 0 24 24' width='1em' height='1em' aria-hidden='true' focusable='false'>
|
|
18
|
-
<path fill='currentColor' d='M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 12h-4a3 3 0 0 1-6 0H5V5h14v10z' />
|
|
19
|
-
</svg>
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The back arrow of the issue view. Decorative: the button carries the accessible name.
|
|
24
|
-
*/
|
|
25
|
-
export const BackIcon = () => (
|
|
26
|
-
<svg className='usher-icon' viewBox='0 0 24 24' width='1em' height='1em' aria-hidden='true' focusable='false'>
|
|
27
|
-
<path fill='currentColor' d='M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z' />
|
|
28
|
-
</svg>
|
|
29
|
-
);
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
import { DialogButtons, DialogResult, useConfirmationDialog, useDialog } from '@cratis/arc.react/dialogs';
|
|
5
|
-
import { Button } from '@cratis/components/Common';
|
|
6
|
-
import { toastCommandResult } from '@cratis/components/Notifications';
|
|
7
|
-
import { IssueConversation, IssueState, RevokeAccess } from '@cratis/showrunner.usher';
|
|
8
|
-
import { useId, useState } from 'react';
|
|
9
|
-
import { format } from '../../Labels/index.js';
|
|
10
|
-
import { useUsherContext } from '../../Provider/UsherContext.js';
|
|
11
|
-
import { formatTime } from '../../Reporting/AccessChoice.js';
|
|
12
|
-
import { AccessStatus } from '../accessStatus.js';
|
|
13
|
-
import { useAccessStatus } from '../useAccessStatus.js';
|
|
14
|
-
import { GrantAccessDialog } from './GrantAccessDialog.js';
|
|
15
|
-
import { SupportSessions } from './SupportSessions.js';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Props for {@link AccessPanel}.
|
|
19
|
-
*/
|
|
20
|
-
export interface AccessPanelProps {
|
|
21
|
-
/** The issue. */
|
|
22
|
-
issue: IssueConversation;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Shows whether support may sign in as the reporter, lets them grant or revoke it, highlights support's pending
|
|
27
|
-
* request, and lists the sessions in which support signed in.
|
|
28
|
-
*/
|
|
29
|
-
export const AccessPanel = ({ issue }: AccessPanelProps) => {
|
|
30
|
-
const { labels, locale } = useUsherContext();
|
|
31
|
-
const headingId = useId();
|
|
32
|
-
const [GrantDialog, showGrantDialog] = useDialog(GrantAccessDialog);
|
|
33
|
-
const [confirm] = useConfirmationDialog();
|
|
34
|
-
const [revokeAccess] = RevokeAccess.use();
|
|
35
|
-
const [requestDismissed, setRequestDismissed] = useState(false);
|
|
36
|
-
const [status] = useAccessStatus(issue.access);
|
|
37
|
-
const isWithdrawn = issue.state === IssueState.withdrawn;
|
|
38
|
-
const showsRequest = status === AccessStatus.requested && !requestDismissed && !isWithdrawn;
|
|
39
|
-
const validUntil = issue.access?.validUntil instanceof Date ? issue.access.validUntil : new Date(issue.access?.validUntil);
|
|
40
|
-
|
|
41
|
-
const heading = status === AccessStatus.granted
|
|
42
|
-
? labels.accessPanel.grantedHeading
|
|
43
|
-
: showsRequest ? labels.accessPanel.requestedHeading : labels.accessPanel.notGrantedHeading;
|
|
44
|
-
|
|
45
|
-
const revoke = async () => {
|
|
46
|
-
const answer = await confirm(labels.accessPanel.revokeTitle, labels.accessPanel.revokeMessage, DialogButtons.YesNo);
|
|
47
|
-
if (answer !== DialogResult.Yes) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
revokeAccess.issueId = issue.id;
|
|
52
|
-
toastCommandResult(await revokeAccess.execute(), { showSuccess: false });
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const grant = () => void showGrantDialog({ issueId: issue.id });
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<section className='usher-panel' data-highlighted={showsRequest || undefined} aria-labelledby={headingId}>
|
|
59
|
-
<h4 id={headingId} className='usher-panel__heading'>{heading}</h4>
|
|
60
|
-
{status === AccessStatus.granted && (
|
|
61
|
-
<>
|
|
62
|
-
<p className='usher-panel__text'>{format(labels.accessPanel.grantedUntil, { time: formatTime(validUntil, locale) })}</p>
|
|
63
|
-
<Button variant='outline' tone='critical' size='small' label={labels.accessPanel.revoke} onClick={() => void revoke()} />
|
|
64
|
-
</>
|
|
65
|
-
)}
|
|
66
|
-
{showsRequest && (
|
|
67
|
-
<>
|
|
68
|
-
<p className='usher-panel__text'>{format(labels.accessPanel.requestReason, { reason: issue.access.request.reason })}</p>
|
|
69
|
-
<div className='usher-panel__actions'>
|
|
70
|
-
<Button variant='solid' tone='accent' size='small' label={labels.accessPanel.grant} onClick={grant} />
|
|
71
|
-
<Button variant='ghost' size='small' label={labels.accessPanel.notNow} onClick={() => setRequestDismissed(true)} />
|
|
72
|
-
</div>
|
|
73
|
-
</>
|
|
74
|
-
)}
|
|
75
|
-
{status !== AccessStatus.granted && !showsRequest && (
|
|
76
|
-
<>
|
|
77
|
-
<p className='usher-panel__text'>{labels.accessPanel.notGranted}</p>
|
|
78
|
-
{!isWithdrawn && <Button variant='outline' size='small' label={labels.accessPanel.grant} onClick={grant} />}
|
|
79
|
-
</>
|
|
80
|
-
)}
|
|
81
|
-
<SupportSessions sessions={issue.access?.sessions ?? []} entries={issue.entries ?? []} />
|
|
82
|
-
<GrantDialog />
|
|
83
|
-
</section>
|
|
84
|
-
);
|
|
85
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
import { CommandDialog } from '@cratis/components/CommandDialog';
|
|
5
|
-
import { DropdownField } from '@cratis/components/CommandForm';
|
|
6
|
-
import { DialogInitialFocus } from '@cratis/components/Dialogs';
|
|
7
|
-
import { Guid } from '@cratis/fundamentals';
|
|
8
|
-
import { AccessDuration, GrantAccess } from '@cratis/showrunner.usher';
|
|
9
|
-
import { useId, useState } from 'react';
|
|
10
|
-
import { useUsherLabels } from '../../Provider/UsherContext.js';
|
|
11
|
-
import { AccessNotice } from '../../Reporting/AccessNotice.js';
|
|
12
|
-
import { durationOptions } from '../../Reporting/durationOptions.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Props for {@link GrantAccessDialog}.
|
|
16
|
-
*/
|
|
17
|
-
export interface GrantAccessDialogProps {
|
|
18
|
-
/** The issue. */
|
|
19
|
-
issueId: Guid;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Lets the reporter grant support access to sign in as them on an issue for a while, stating until when.
|
|
24
|
-
*/
|
|
25
|
-
export const GrantAccessDialog = ({ issueId }: GrantAccessDialogProps) => {
|
|
26
|
-
const labels = useUsherLabels();
|
|
27
|
-
const noticeId = useId();
|
|
28
|
-
const [duration, setDuration] = useState(AccessDuration.oneDay);
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<CommandDialog<GrantAccess>
|
|
32
|
-
command={GrantAccess}
|
|
33
|
-
title={labels.accessPanel.grantTitle}
|
|
34
|
-
okLabel={labels.accessPanel.grantConfirm}
|
|
35
|
-
cancelLabel={labels.common.cancel}
|
|
36
|
-
closeAriaLabel={labels.common.close}
|
|
37
|
-
initialFocus={DialogInitialFocus.Content}
|
|
38
|
-
initialValues={{ issueId, accessDuration: AccessDuration.oneDay }}
|
|
39
|
-
onFieldChange={(_command, fieldName, _oldValue, newValue) => {
|
|
40
|
-
if (fieldName === 'accessDuration') {
|
|
41
|
-
setDuration(Number(newValue) as AccessDuration);
|
|
42
|
-
}
|
|
43
|
-
}}>
|
|
44
|
-
<div className='usher-report-form'>
|
|
45
|
-
<DropdownField<GrantAccess>
|
|
46
|
-
value={command => command.accessDuration}
|
|
47
|
-
title={labels.access.duration}
|
|
48
|
-
aria-describedby={noticeId}
|
|
49
|
-
options={durationOptions(labels)}
|
|
50
|
-
optionValue='value'
|
|
51
|
-
optionLabel='label' />
|
|
52
|
-
<AccessNotice id={noticeId} duration={duration} />
|
|
53
|
-
</div>
|
|
54
|
-
</CommandDialog>
|
|
55
|
-
);
|
|
56
|
-
};
|