@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Provider/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Guid } from '@cratis/fundamentals';
|
|
2
|
-
import { UsherLabels } from '../Labels/index.js';
|
|
3
|
-
export interface Usher {
|
|
4
|
-
readonly labels: UsherLabels;
|
|
5
|
-
reportIssue(): void;
|
|
6
|
-
reportError(error: unknown): void;
|
|
7
|
-
showMyIssues(): void;
|
|
8
|
-
showIssue(issueId: Guid): void;
|
|
9
|
-
recentCorrelationIds(): Guid[];
|
|
10
|
-
trackCorrelationId(correlationId: Guid | string): void;
|
|
11
|
-
}
|
|
12
|
-
export declare function useUsher(): Usher;
|
|
13
|
-
//# sourceMappingURL=useUsher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUsher.d.ts","sourceRoot":"","sources":["../../../Provider/useUsher.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMjD,MAAM,WAAW,KAAK;IAElB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAK7B,WAAW,IAAI,IAAI,CAAC;IAOpB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAKlC,YAAY,IAAI,IAAI,CAAC;IAMrB,SAAS,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IAM/B,oBAAoB,IAAI,IAAI,EAAE,CAAC;IAO/B,kBAAkB,CAAC,aAAa,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;CAC1D;AAOD,wBAAgB,QAAQ,IAAI,KAAK,CAahC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var slices = require('@cratis/arc.react/slices');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var UsherContext = require('./UsherContext.js');
|
|
6
|
-
|
|
7
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
8
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
9
|
-
/**
|
|
10
|
-
* Uses Usher from any component inside an {@link UsherProvider}. Reports carry the slice location of the component
|
|
11
|
-
* that calls this hook.
|
|
12
|
-
* @returns The {@link Usher}.
|
|
13
|
-
*/ function useUsher() {
|
|
14
|
-
const context = UsherContext.useUsherContext();
|
|
15
|
-
const location = slices.useSliceContext();
|
|
16
|
-
return react.useMemo(()=>({
|
|
17
|
-
labels: context.labels,
|
|
18
|
-
reportIssue: ()=>context.reportIssue(location),
|
|
19
|
-
reportError: (error)=>context.reportError(error, location),
|
|
20
|
-
showMyIssues: ()=>context.showMyIssues(location),
|
|
21
|
-
showIssue: (issueId)=>context.showIssue(issueId),
|
|
22
|
-
recentCorrelationIds: ()=>context.recentCorrelationIds(),
|
|
23
|
-
trackCorrelationId: (correlationId)=>context.trackCorrelationId(correlationId)
|
|
24
|
-
}), [
|
|
25
|
-
context,
|
|
26
|
-
location
|
|
27
|
-
]);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
exports.useUsher = useUsher;
|
|
31
|
-
//# sourceMappingURL=useUsher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUsher.js","sources":["../../../Provider/useUsher.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 { useSliceContext } from '@cratis/arc.react/slices';\nimport { Guid } from '@cratis/fundamentals';\nimport { useMemo } from 'react';\nimport { UsherLabels } from '../Labels/index.js';\nimport { useUsherContext } from './UsherContext.js';\n\n/**\n * What {@link useUsher} gives a component.\n */\nexport interface Usher {\n /** The labels Usher shows. */\n readonly labels: UsherLabels;\n\n /**\n * Opens the report a problem dialog, with where in the application the component is.\n */\n reportIssue(): void;\n\n /**\n * Opens the report this error dialog.\n * @param error The error: `ErrorDetails` from `@cratis/showrunner.usher`, such as `errorDetailsFromCommandResult`\n * gives for a failed command, or anything thrown.\n */\n reportError(error: unknown): void;\n\n /**\n * Opens the my issues side sheet.\n */\n showMyIssues(): void;\n\n /**\n * Opens the my issues side sheet on one issue.\n * @param issueId The issue.\n */\n showIssue(issueId: Guid): void;\n\n /**\n * Gets the correlation ids of the last few Arc commands and queries run, oldest first.\n * @returns The correlation ids.\n */\n recentCorrelationIds(): Guid[];\n\n /**\n * Tracks the correlation id of a command or query, such as one from a `CommandResult` of a command run outside\n * the application's `<Arc>` context.\n * @param correlationId The correlation id.\n */\n trackCorrelationId(correlationId: Guid | string): void;\n}\n\n/**\n * Uses Usher from any component inside an {@link UsherProvider}. Reports carry the slice location of the component\n * that calls this hook.\n * @returns The {@link Usher}.\n */\nexport function useUsher(): Usher {\n const context = useUsherContext();\n const location = useSliceContext();\n\n return useMemo(() => ({\n labels: context.labels,\n reportIssue: () => context.reportIssue(location),\n reportError: (error: unknown) => context.reportError(error, location),\n showMyIssues: () => context.showMyIssues(location),\n showIssue: (issueId: Guid) => context.showIssue(issueId),\n recentCorrelationIds: () => context.recentCorrelationIds(),\n trackCorrelationId: (correlationId: Guid | string) => context.trackCorrelationId(correlationId)\n }), [context, location]);\n}\n"],"names":["useUsher","context","useUsherContext","location","useSliceContext","useMemo","labels","reportIssue","reportError","error","showMyIssues","showIssue","issueId","recentCorrelationIds","trackCorrelationId","correlationId"],"mappings":";;;;;;AAAA;AACA;AAoDA;;;;AAIC,IACM,SAASA,QAAAA,GAAAA;AACZ,IAAA,MAAMC,OAAAA,GAAUC,4BAAAA,EAAAA;AAChB,IAAA,MAAMC,QAAAA,GAAWC,sBAAAA,EAAAA;IAEjB,OAAOC,aAAAA,CAAQ,KAAO;AAClBC,YAAAA,MAAAA,EAAQL,QAAQK,MAAM;YACtBC,WAAAA,EAAa,IAAMN,OAAAA,CAAQM,WAAW,CAACJ,QAAAA,CAAAA;AACvCK,YAAAA,WAAAA,EAAa,CAACC,KAAAA,GAAmBR,OAAAA,CAAQO,WAAW,CAACC,KAAAA,EAAON,QAAAA,CAAAA;YAC5DO,YAAAA,EAAc,IAAMT,OAAAA,CAAQS,YAAY,CAACP,QAAAA,CAAAA;AACzCQ,YAAAA,SAAAA,EAAW,CAACC,OAAAA,GAAkBX,OAAAA,CAAQU,SAAS,CAACC,OAAAA,CAAAA;YAChDC,oBAAAA,EAAsB,IAAMZ,QAAQY,oBAAoB,EAAA;AACxDC,YAAAA,kBAAAA,EAAoB,CAACC,aAAAA,GAAiCd,OAAAA,CAAQa,kBAAkB,CAACC,aAAAA;AACrF,SAAA,CAAA,EAAI;AAACd,QAAAA,OAAAA;AAASE,QAAAA;AAAS,KAAA,CAAA;AAC3B;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AccessDuration } from '@cratis/showrunner.usher';
|
|
2
|
-
export interface AccessChoice {
|
|
3
|
-
readonly shareIdentity: boolean;
|
|
4
|
-
readonly grantAccess: boolean;
|
|
5
|
-
readonly accessDuration: AccessDuration;
|
|
6
|
-
}
|
|
7
|
-
export declare function initialAccessChoice(shareIdentity: boolean): AccessChoice;
|
|
8
|
-
export declare function changeAccessChoice(choice: AccessChoice, fieldName: string, value: unknown): AccessChoice;
|
|
9
|
-
export declare function sharesIdentity(choice: AccessChoice): boolean;
|
|
10
|
-
export declare function validUntilFor(duration: AccessDuration, now: Date): Date;
|
|
11
|
-
export declare function formatTime(time: Date, locale?: string, timeZone?: string): string;
|
|
12
|
-
export declare function formatClock(time: Date, locale?: string, timeZone?: string): string;
|
|
13
|
-
//# sourceMappingURL=AccessChoice.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessChoice.d.ts","sourceRoot":"","sources":["../../../Reporting/AccessChoice.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK1D,MAAM,WAAW,YAAY;IAEzB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAGhC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAG9B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CAC3C;AAOD,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,OAAO,GAAG,YAAY,CAExE;AAgBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,YAAY,CAexG;AAQD,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE5D;AASD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAEvE;AASD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAIjF;AASD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAElF"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
4
|
-
|
|
5
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
6
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
7
|
-
/**
|
|
8
|
-
* Gets the choice before the reporter has chosen anything: no access, for one day once they grant it.
|
|
9
|
-
* @param shareIdentity Whether to let support know who the reporter is unless they choose otherwise.
|
|
10
|
-
* @returns The {@link AccessChoice}.
|
|
11
|
-
*/ function initialAccessChoice(shareIdentity) {
|
|
12
|
-
return {
|
|
13
|
-
shareIdentity,
|
|
14
|
-
grantAccess: false,
|
|
15
|
-
accessDuration: showrunner_usher.AccessDuration.oneDay
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const durationsInMilliseconds = {
|
|
19
|
-
[showrunner_usher.AccessDuration.oneHour]: 60 * 60 * 1000,
|
|
20
|
-
[showrunner_usher.AccessDuration.oneDay]: 24 * 60 * 60 * 1000,
|
|
21
|
-
[showrunner_usher.AccessDuration.sevenDays]: 7 * 24 * 60 * 60 * 1000
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Applies a change of a command field to the access choice; changes of other fields leave it as it is. While access is
|
|
25
|
-
* granted, sharing who the reporter is is forced, so a change of it is not the reporter's own choice.
|
|
26
|
-
* @param choice The current {@link AccessChoice}.
|
|
27
|
-
* @param fieldName The name of the command field that changed.
|
|
28
|
-
* @param value Its new value.
|
|
29
|
-
* @returns The new {@link AccessChoice}.
|
|
30
|
-
*/ function changeAccessChoice(choice, fieldName, value) {
|
|
31
|
-
if (fieldName === 'shareIdentity' && !choice.grantAccess) {
|
|
32
|
-
return {
|
|
33
|
-
...choice,
|
|
34
|
-
shareIdentity: value === true
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
if (fieldName === 'grantAccess') {
|
|
38
|
-
return {
|
|
39
|
-
...choice,
|
|
40
|
-
grantAccess: value === true
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
const duration = typeof value === 'string' && value.length > 0 ? Number(value) : value;
|
|
44
|
-
if (fieldName === 'accessDuration' && isAccessDuration(duration)) {
|
|
45
|
-
return {
|
|
46
|
-
...choice,
|
|
47
|
-
accessDuration: duration
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
return choice;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Gets whether the command shares who the reporter is: always while access is granted, as granting access always
|
|
54
|
-
* shares who the reporter is, and otherwise as the reporter chose.
|
|
55
|
-
* @param choice The {@link AccessChoice}.
|
|
56
|
-
* @returns The value of the command's `shareIdentity`.
|
|
57
|
-
*/ function sharesIdentity(choice) {
|
|
58
|
-
return choice.grantAccess || choice.shareIdentity;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Gets when access granted now would end. The backend fixes the end itself when it records the grant; this is what
|
|
62
|
-
* the reporter is told before they send.
|
|
63
|
-
* @param duration The {@link AccessDuration}.
|
|
64
|
-
* @param now What time it is.
|
|
65
|
-
* @returns When access would end.
|
|
66
|
-
*/ function validUntilFor(duration, now) {
|
|
67
|
-
return new Date(now.getTime() + durationsInMilliseconds[duration]);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Formats a point in time for the access notice and the access panel, such as `27 Oct, 18:10`.
|
|
71
|
-
* @param time The point in time.
|
|
72
|
-
* @param locale The locale to format for; the browser's when not given.
|
|
73
|
-
* @param timeZone The time zone to format in; the browser's when not given.
|
|
74
|
-
* @returns The formatted point in time.
|
|
75
|
-
*/ function formatTime(time, locale, timeZone) {
|
|
76
|
-
const date = new Intl.DateTimeFormat(locale, {
|
|
77
|
-
day: 'numeric',
|
|
78
|
-
month: 'short',
|
|
79
|
-
timeZone
|
|
80
|
-
}).format(time);
|
|
81
|
-
const clock = new Intl.DateTimeFormat(locale, {
|
|
82
|
-
hour: '2-digit',
|
|
83
|
-
minute: '2-digit',
|
|
84
|
-
hourCycle: 'h23',
|
|
85
|
-
timeZone
|
|
86
|
-
}).format(time);
|
|
87
|
-
return `${date}, ${clock}`;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Formats the time of day only, such as `18:10`.
|
|
91
|
-
* @param time The point in time.
|
|
92
|
-
* @param locale The locale to format for; the browser's when not given.
|
|
93
|
-
* @param timeZone The time zone to format in; the browser's when not given.
|
|
94
|
-
* @returns The formatted time of day.
|
|
95
|
-
*/ function formatClock(time, locale, timeZone) {
|
|
96
|
-
return new Intl.DateTimeFormat(locale, {
|
|
97
|
-
hour: '2-digit',
|
|
98
|
-
minute: '2-digit',
|
|
99
|
-
hourCycle: 'h23',
|
|
100
|
-
timeZone
|
|
101
|
-
}).format(time);
|
|
102
|
-
}
|
|
103
|
-
function isAccessDuration(value) {
|
|
104
|
-
return typeof value === 'number' && Object.hasOwn(durationsInMilliseconds, value);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
exports.changeAccessChoice = changeAccessChoice;
|
|
108
|
-
exports.formatClock = formatClock;
|
|
109
|
-
exports.formatTime = formatTime;
|
|
110
|
-
exports.initialAccessChoice = initialAccessChoice;
|
|
111
|
-
exports.sharesIdentity = sharesIdentity;
|
|
112
|
-
exports.validUntilFor = validUntilFor;
|
|
113
|
-
//# sourceMappingURL=AccessChoice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessChoice.js","sources":["../../../Reporting/AccessChoice.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 { AccessDuration } from '@cratis/showrunner.usher';\n\n/**\n * What the reporter chose about letting support sign in as them.\n */\nexport interface AccessChoice {\n /** Whether the reporter chose to let support know who they are, apart from granting access. */\n readonly shareIdentity: boolean;\n\n /** Whether the reporter lets support sign in as them. */\n readonly grantAccess: boolean;\n\n /** For how long. */\n readonly accessDuration: AccessDuration;\n}\n\n/**\n * Gets the choice before the reporter has chosen anything: no access, for one day once they grant it.\n * @param shareIdentity Whether to let support know who the reporter is unless they choose otherwise.\n * @returns The {@link AccessChoice}.\n */\nexport function initialAccessChoice(shareIdentity: boolean): AccessChoice {\n return { shareIdentity, grantAccess: false, accessDuration: AccessDuration.oneDay };\n}\n\nconst durationsInMilliseconds: Record<AccessDuration, number> = {\n [AccessDuration.oneHour]: 60 * 60 * 1000,\n [AccessDuration.oneDay]: 24 * 60 * 60 * 1000,\n [AccessDuration.sevenDays]: 7 * 24 * 60 * 60 * 1000\n};\n\n/**\n * Applies a change of a command field to the access choice; changes of other fields leave it as it is. While access is\n * granted, sharing who the reporter is is forced, so a change of it is not the reporter's own choice.\n * @param choice The current {@link AccessChoice}.\n * @param fieldName The name of the command field that changed.\n * @param value Its new value.\n * @returns The new {@link AccessChoice}.\n */\nexport function changeAccessChoice(choice: AccessChoice, fieldName: string, value: unknown): AccessChoice {\n if (fieldName === 'shareIdentity' && !choice.grantAccess) {\n return { ...choice, shareIdentity: value === true };\n }\n\n if (fieldName === 'grantAccess') {\n return { ...choice, grantAccess: value === true };\n }\n\n const duration = typeof value === 'string' && value.length > 0 ? Number(value) : value;\n if (fieldName === 'accessDuration' && isAccessDuration(duration)) {\n return { ...choice, accessDuration: duration };\n }\n\n return choice;\n}\n\n/**\n * Gets whether the command shares who the reporter is: always while access is granted, as granting access always\n * shares who the reporter is, and otherwise as the reporter chose.\n * @param choice The {@link AccessChoice}.\n * @returns The value of the command's `shareIdentity`.\n */\nexport function sharesIdentity(choice: AccessChoice): boolean {\n return choice.grantAccess || choice.shareIdentity;\n}\n\n/**\n * Gets when access granted now would end. The backend fixes the end itself when it records the grant; this is what\n * the reporter is told before they send.\n * @param duration The {@link AccessDuration}.\n * @param now What time it is.\n * @returns When access would end.\n */\nexport function validUntilFor(duration: AccessDuration, now: Date): Date {\n return new Date(now.getTime() + durationsInMilliseconds[duration]);\n}\n\n/**\n * Formats a point in time for the access notice and the access panel, such as `27 Oct, 18:10`.\n * @param time The point in time.\n * @param locale The locale to format for; the browser's when not given.\n * @param timeZone The time zone to format in; the browser's when not given.\n * @returns The formatted point in time.\n */\nexport function formatTime(time: Date, locale?: string, timeZone?: string): string {\n const date = new Intl.DateTimeFormat(locale, { day: 'numeric', month: 'short', timeZone }).format(time);\n const clock = new Intl.DateTimeFormat(locale, { hour: '2-digit', minute: '2-digit', hourCycle: 'h23', timeZone }).format(time);\n return `${date}, ${clock}`;\n}\n\n/**\n * Formats the time of day only, such as `18:10`.\n * @param time The point in time.\n * @param locale The locale to format for; the browser's when not given.\n * @param timeZone The time zone to format in; the browser's when not given.\n * @returns The formatted time of day.\n */\nexport function formatClock(time: Date, locale?: string, timeZone?: string): string {\n return new Intl.DateTimeFormat(locale, { hour: '2-digit', minute: '2-digit', hourCycle: 'h23', timeZone }).format(time);\n}\n\nfunction isAccessDuration(value: unknown): value is AccessDuration {\n return typeof value === 'number' && Object.hasOwn(durationsInMilliseconds, value);\n}\n"],"names":["initialAccessChoice","shareIdentity","grantAccess","accessDuration","AccessDuration","oneDay","durationsInMilliseconds","oneHour","sevenDays","changeAccessChoice","choice","fieldName","value","duration","length","Number","isAccessDuration","sharesIdentity","validUntilFor","now","Date","getTime","formatTime","time","locale","timeZone","date","Intl","DateTimeFormat","day","month","format","clock","hour","minute","hourCycle","formatClock","Object","hasOwn"],"mappings":"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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AccessDuration } from '@cratis/showrunner.usher';
|
|
2
|
-
import { AccessChoice } from './AccessChoice.js';
|
|
3
|
-
export interface IdentityAndAccess {
|
|
4
|
-
shareIdentity: boolean;
|
|
5
|
-
grantAccess: boolean;
|
|
6
|
-
accessDuration: AccessDuration;
|
|
7
|
-
}
|
|
8
|
-
export interface AccessFieldsProps {
|
|
9
|
-
choice: AccessChoice;
|
|
10
|
-
}
|
|
11
|
-
export declare const AccessFields: <TCommand extends IdentityAndAccess>({ choice }: AccessFieldsProps) => import("react").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=AccessFields.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessFields.d.ts","sourceRoot":"","sources":["../../../Reporting/AccessFields.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,MAAM,WAAW,iBAAiB;IAE9B,aAAa,EAAE,OAAO,CAAC;IAEvB,WAAW,EAAE,OAAO,CAAC;IAErB,cAAc,EAAE,cAAc,CAAC;CAClC;AAKD,MAAM,WAAW,iBAAiB;IAE9B,MAAM,EAAE,YAAY,CAAC;CACxB;AAOD,eAAO,MAAM,YAAY,GAAI,QAAQ,SAAS,iBAAiB,EAAE,YAAY,iBAAiB,gCAqC7F,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var CommandForm = require('@cratis/components/CommandForm');
|
|
5
|
-
var react = require('react');
|
|
6
|
-
var UsherContext = require('../Provider/UsherContext.js');
|
|
7
|
-
var AccessNotice = require('./AccessNotice.js');
|
|
8
|
-
var durationOptions = require('./durationOptions.js');
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The identity and access choices of a report: let support know who the reporter is, and let support sign in as
|
|
12
|
-
* them for a while. Granting access always shares who the reporter is, so the checkbox is checked and disabled while
|
|
13
|
-
* access is granted, and the notice says until when support can act as the reporter.
|
|
14
|
-
*/ const AccessFields = ({ choice })=>{
|
|
15
|
-
const labels = UsherContext.useUsherLabels();
|
|
16
|
-
const shareDescriptionId = react.useId();
|
|
17
|
-
const grantDescriptionId = react.useId();
|
|
18
|
-
const noticeId = react.useId();
|
|
19
|
-
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
20
|
-
className: "usher-access-fields",
|
|
21
|
-
children: [
|
|
22
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
23
|
-
className: "usher-access-fields__choice",
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ jsxRuntime.jsx(CommandForm.CheckboxField, {
|
|
26
|
-
value: (command)=>command.shareIdentity,
|
|
27
|
-
label: labels.access.shareIdentity,
|
|
28
|
-
"aria-describedby": choice.grantAccess ? `${shareDescriptionId} ${noticeId}` : shareDescriptionId,
|
|
29
|
-
pt: {
|
|
30
|
-
input: {
|
|
31
|
-
disabled: choice.grantAccess
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
/*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
36
|
-
id: shareDescriptionId,
|
|
37
|
-
className: "usher-access-fields__description",
|
|
38
|
-
children: labels.access.shareIdentityDescription
|
|
39
|
-
})
|
|
40
|
-
]
|
|
41
|
-
}),
|
|
42
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
43
|
-
className: "usher-access-fields__choice",
|
|
44
|
-
children: [
|
|
45
|
-
/*#__PURE__*/ jsxRuntime.jsx(CommandForm.ToggleSwitchField, {
|
|
46
|
-
value: (command)=>command.grantAccess,
|
|
47
|
-
label: labels.access.grantAccess,
|
|
48
|
-
"aria-describedby": grantDescriptionId
|
|
49
|
-
}),
|
|
50
|
-
/*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
51
|
-
id: grantDescriptionId,
|
|
52
|
-
className: "usher-access-fields__description",
|
|
53
|
-
children: labels.access.grantAccessDescription
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
}),
|
|
57
|
-
choice.grantAccess && /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
58
|
-
className: "usher-access-fields__duration",
|
|
59
|
-
children: [
|
|
60
|
-
/*#__PURE__*/ jsxRuntime.jsx(CommandForm.DropdownField, {
|
|
61
|
-
value: (command)=>command.accessDuration,
|
|
62
|
-
title: labels.access.duration,
|
|
63
|
-
"aria-describedby": noticeId,
|
|
64
|
-
options: durationOptions.durationOptions(labels),
|
|
65
|
-
optionValue: "value",
|
|
66
|
-
optionLabel: "label"
|
|
67
|
-
}),
|
|
68
|
-
/*#__PURE__*/ jsxRuntime.jsx(AccessNotice.AccessNotice, {
|
|
69
|
-
id: noticeId,
|
|
70
|
-
duration: choice.accessDuration
|
|
71
|
-
})
|
|
72
|
-
]
|
|
73
|
-
})
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
exports.AccessFields = AccessFields;
|
|
79
|
-
//# sourceMappingURL=AccessFields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessFields.js","sources":["../../../Reporting/AccessFields.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 { CheckboxField, DropdownField, ToggleSwitchField } from '@cratis/components/CommandForm';\nimport { AccessDuration } from '@cratis/showrunner.usher';\nimport { useId } from 'react';\nimport { useUsherLabels } from '../Provider/UsherContext.js';\nimport { AccessChoice } from './AccessChoice.js';\nimport { AccessNotice } from './AccessNotice.js';\nimport { durationOptions } from './durationOptions.js';\n\n/**\n * The command values {@link AccessFields} bind to.\n */\nexport interface IdentityAndAccess {\n /** Whether to let support know who the reporter is. */\n shareIdentity: boolean;\n /** Whether to let support sign in as the reporter. */\n grantAccess: boolean;\n /** For how long. */\n accessDuration: AccessDuration;\n}\n\n/**\n * Props for {@link AccessFields}.\n */\nexport interface AccessFieldsProps {\n /** The reporter's {@link AccessChoice}, as the form follows it. */\n choice: AccessChoice;\n}\n\n/**\n * The identity and access choices of a report: let support know who the reporter is, and let support sign in as\n * them for a while. Granting access always shares who the reporter is, so the checkbox is checked and disabled while\n * access is granted, and the notice says until when support can act as the reporter.\n */\nexport const AccessFields = <TCommand extends IdentityAndAccess>({ choice }: AccessFieldsProps) => {\n const labels = useUsherLabels();\n const shareDescriptionId = useId();\n const grantDescriptionId = useId();\n const noticeId = useId();\n\n return (\n <div className='usher-access-fields'>\n <div className='usher-access-fields__choice'>\n <CheckboxField<TCommand>\n value={command => command.shareIdentity}\n label={labels.access.shareIdentity}\n aria-describedby={choice.grantAccess ? `${shareDescriptionId} ${noticeId}` : shareDescriptionId}\n pt={{ input: { disabled: choice.grantAccess } }} />\n <p id={shareDescriptionId} className='usher-access-fields__description'>{labels.access.shareIdentityDescription}</p>\n </div>\n <div className='usher-access-fields__choice'>\n <ToggleSwitchField<TCommand>\n value={command => command.grantAccess}\n label={labels.access.grantAccess}\n aria-describedby={grantDescriptionId} />\n <p id={grantDescriptionId} className='usher-access-fields__description'>{labels.access.grantAccessDescription}</p>\n </div>\n {choice.grantAccess && (\n <div className='usher-access-fields__duration'>\n <DropdownField<TCommand>\n value={command => command.accessDuration}\n title={labels.access.duration}\n aria-describedby={noticeId}\n options={durationOptions(labels)}\n optionValue='value'\n optionLabel='label' />\n <AccessNotice id={noticeId} duration={choice.accessDuration} />\n </div>\n )}\n </div>\n );\n};\n"],"names":["AccessFields","choice","labels","useUsherLabels","shareDescriptionId","useId","grantDescriptionId","noticeId","_jsxs","div","className","_jsx","CheckboxField","value","command","shareIdentity","label","access","aria-describedby","grantAccess","pt","input","disabled","p","id","shareIdentityDescription","ToggleSwitchField","grantAccessDescription","DropdownField","accessDuration","title","duration","options","durationOptions","optionValue","optionLabel","AccessNotice"],"mappings":";;;;;;;;;AA+BA;;;;AAIC,IACM,MAAMA,YAAAA,GAAe,CAAqC,EAAEC,MAAM,EAAqB,GAAA;AAC1F,IAAA,MAAMC,MAAAA,GAASC,2BAAAA,EAAAA;AACf,IAAA,MAAMC,kBAAAA,GAAqBC,WAAAA,EAAAA;AAC3B,IAAA,MAAMC,kBAAAA,GAAqBD,WAAAA,EAAAA;AAC3B,IAAA,MAAME,QAAAA,GAAWF,WAAAA,EAAAA;AAEjB,IAAA,qBACIG,eAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,qBAAA;;0BACXF,eAAA,CAACC,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,6BAAA;;kCACXC,cAAA,CAACC,yBAAAA,EAAAA;wBACGC,KAAAA,EAAOC,CAAAA,OAAAA,GAAWA,OAAAA,CAAQC,aAAa;wBACvCC,KAAAA,EAAOd,MAAAA,CAAOe,MAAM,CAACF,aAAa;wBAClCG,kBAAAA,EAAkBjB,MAAAA,CAAOkB,WAAW,GAAG,CAAA,EAAGf,mBAAmB,CAAC,EAAEG,UAAU,GAAGH,kBAAAA;wBAC7EgB,EAAAA,EAAI;4BAAEC,KAAAA,EAAO;AAAEC,gCAAAA,QAAAA,EAAUrB,OAAOkB;AAAY;AAAE;;kCAClDR,cAAA,CAACY,GAAAA,EAAAA;wBAAEC,EAAAA,EAAIpB,kBAAAA;wBAAoBM,SAAAA,EAAU,kCAAA;kCAAoCR,MAAAA,CAAOe,MAAM,CAACQ;;;;0BAE3FjB,eAAA,CAACC,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,6BAAA;;kCACXC,cAAA,CAACe,6BAAAA,EAAAA;wBACGb,KAAAA,EAAOC,CAAAA,OAAAA,GAAWA,OAAAA,CAAQK,WAAW;wBACrCH,KAAAA,EAAOd,MAAAA,CAAOe,MAAM,CAACE,WAAW;wBAChCD,kBAAAA,EAAkBZ;;kCACtBK,cAAA,CAACY,GAAAA,EAAAA;wBAAEC,EAAAA,EAAIlB,kBAAAA;wBAAoBI,SAAAA,EAAU,kCAAA;kCAAoCR,MAAAA,CAAOe,MAAM,CAACU;;;;YAE1F1B,MAAAA,CAAOkB,WAAW,kBACfX,eAAA,CAACC,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,+BAAA;;kCACXC,cAAA,CAACiB,yBAAAA,EAAAA;wBACGf,KAAAA,EAAOC,CAAAA,OAAAA,GAAWA,OAAAA,CAAQe,cAAc;wBACxCC,KAAAA,EAAO5B,MAAAA,CAAOe,MAAM,CAACc,QAAQ;wBAC7Bb,kBAAAA,EAAkBX,QAAAA;AAClByB,wBAAAA,OAAAA,EAASC,+BAAAA,CAAgB/B,MAAAA,CAAAA;wBACzBgC,WAAAA,EAAY,OAAA;wBACZC,WAAAA,EAAY;;kCAChBxB,cAAA,CAACyB,yBAAAA,EAAAA;wBAAaZ,EAAAA,EAAIjB,QAAAA;AAAUwB,wBAAAA,QAAAA,EAAU9B,OAAO4B;;;;;;AAKjE;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AccessDuration } from '@cratis/showrunner.usher';
|
|
2
|
-
export interface AccessNoticeProps {
|
|
3
|
-
id: string;
|
|
4
|
-
duration: AccessDuration;
|
|
5
|
-
}
|
|
6
|
-
export declare const AccessNotice: ({ id, duration }: AccessNoticeProps) => import("react").JSX.Element;
|
|
7
|
-
//# sourceMappingURL=AccessNotice.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessNotice.d.ts","sourceRoot":"","sources":["../../../Reporting/AccessNotice.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQ1D,MAAM,WAAW,iBAAiB;IAE9B,EAAE,EAAE,MAAM,CAAC;IAGX,QAAQ,EAAE,cAAc,CAAC;CAC5B;AAKD,eAAO,MAAM,YAAY,GAAI,kBAAkB,iBAAiB,gCAS/D,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var Display = require('@cratis/components/Display');
|
|
5
|
-
var format = require('../Labels/format.js');
|
|
6
|
-
var UsherContext = require('../Provider/UsherContext.js');
|
|
7
|
-
var AccessChoice = require('./AccessChoice.js');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* States plainly what granting access means: support sees who the reporter is and can act as them until a given time.
|
|
11
|
-
*/ const AccessNotice = ({ id, duration })=>{
|
|
12
|
-
const { labels, locale } = UsherContext.useUsherContext();
|
|
13
|
-
const time = AccessChoice.formatTime(AccessChoice.validUntilFor(duration, new Date()), locale);
|
|
14
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
15
|
-
id: id,
|
|
16
|
-
className: "usher-access-notice",
|
|
17
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(Display.Message, {
|
|
18
|
-
severity: "info",
|
|
19
|
-
live: false,
|
|
20
|
-
text: format.format(labels.access.notice, {
|
|
21
|
-
time
|
|
22
|
-
})
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.AccessNotice = AccessNotice;
|
|
28
|
-
//# sourceMappingURL=AccessNotice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessNotice.js","sources":["../../../Reporting/AccessNotice.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Message } from '@cratis/components/Display';\nimport { AccessDuration } from '@cratis/showrunner.usher';\nimport { format } from '../Labels/index.js';\nimport { useUsherContext } from '../Provider/UsherContext.js';\nimport { formatTime, validUntilFor } from './AccessChoice.js';\n\n/**\n * Props for {@link AccessNotice}.\n */\nexport interface AccessNoticeProps {\n /** The id of the notice, for the controls it describes. */\n id: string;\n\n /** For how long access would be granted. */\n duration: AccessDuration;\n}\n\n/**\n * States plainly what granting access means: support sees who the reporter is and can act as them until a given time.\n */\nexport const AccessNotice = ({ id, duration }: AccessNoticeProps) => {\n const { labels, locale } = useUsherContext();\n const time = formatTime(validUntilFor(duration, new Date()), locale);\n\n return (\n <div id={id} className='usher-access-notice'>\n <Message severity='info' live={false} text={format(labels.access.notice, { time })} />\n </div>\n );\n};\n"],"names":["AccessNotice","id","duration","labels","locale","useUsherContext","time","formatTime","validUntilFor","Date","_jsx","div","className","Message","severity","live","text","format","access","notice"],"mappings":";;;;;;;;AAoBA;;UAGaA,YAAAA,GAAe,CAAC,EAAEC,EAAE,EAAEC,QAAQ,EAAqB,GAAA;AAC5D,IAAA,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGC,4BAAAA,EAAAA;AAC3B,IAAA,MAAMC,IAAAA,GAAOC,uBAAAA,CAAWC,0BAAAA,CAAcN,QAAAA,EAAU,IAAIO,IAAAA,EAAAA,CAAAA,EAASL,MAAAA,CAAAA;AAE7D,IAAA,qBACIM,cAAA,CAACC,KAAAA,EAAAA;QAAIV,EAAAA,EAAIA,EAAAA;QAAIW,SAAAA,EAAU,qBAAA;AACnB,QAAA,QAAA,gBAAAF,cAAA,CAACG,eAAAA,EAAAA;YAAQC,QAAAA,EAAS,MAAA;YAAOC,IAAAA,EAAM,KAAA;AAAOC,YAAAA,IAAAA,EAAMC,aAAAA,CAAOd,MAAAA,CAAOe,MAAM,CAACC,MAAM,EAAE;AAAEb,gBAAAA;AAAK,aAAA;;;AAG5F;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';
|
|
2
|
-
import { Guid } from '@cratis/fundamentals';
|
|
3
|
-
export interface ReportErrorDialogProps {
|
|
4
|
-
error?: unknown;
|
|
5
|
-
location?: ArcSliceLocation;
|
|
6
|
-
correlationIds?: Guid[];
|
|
7
|
-
}
|
|
8
|
-
export declare const ReportErrorDialog: ({ error, location, correlationIds }: ReportErrorDialogProps) => import("react").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=ReportErrorDialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReportErrorDialog.d.ts","sourceRoot":"","sources":["../../../Reporting/ReportErrorDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI3E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAe5C,MAAM,WAAW,sBAAsB;IAEnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAGhB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAG5B,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC;CAC3B;AAOD,eAAO,MAAM,iBAAiB,GAAI,qCAAqC,sBAAsB,gCAgB5F,CAAC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var dialogs = require('@cratis/arc.react/dialogs');
|
|
5
|
-
var slices = require('@cratis/arc.react/slices');
|
|
6
|
-
var CommandDialog = require('@cratis/components/CommandDialog');
|
|
7
|
-
var CommandForm = require('@cratis/components/CommandForm');
|
|
8
|
-
var Dialogs = require('@cratis/components/Dialogs');
|
|
9
|
-
var fundamentals = require('@cratis/fundamentals');
|
|
10
|
-
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
11
|
-
var react = require('react');
|
|
12
|
-
var UsherBoundary = require('../Provider/UsherBoundary.js');
|
|
13
|
-
var UsherContext = require('../Provider/UsherContext.js');
|
|
14
|
-
var AccessFields = require('./AccessFields.js');
|
|
15
|
-
var reportValues = require('./reportValues.js');
|
|
16
|
-
var SentWithReport = require('./SentWithReport.js');
|
|
17
|
-
var TechnicalDetails = require('./TechnicalDetails.js');
|
|
18
|
-
var useAccessChoice = require('./useAccessChoice.js');
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* The report this error dialog: the error is captured already, and the reporter may say what they were doing and
|
|
22
|
-
* choose whether support may know who they are and sign in as them. The technical details are collapsed. Open it
|
|
23
|
-
* with `useDialog`; it closes with {@link ReportSent} once the report is sent.
|
|
24
|
-
*/ const ReportErrorDialog = ({ error, location, correlationIds })=>{
|
|
25
|
-
const usher = UsherContext.useUsherContext();
|
|
26
|
-
const sliceLocation = slices.useSliceContext();
|
|
27
|
-
const [values] = react.useState(()=>reportValues.reportErrorValues(reportValues.toErrorDetails(error, location ?? sliceLocation), {
|
|
28
|
-
issueId: fundamentals.Guid.create(),
|
|
29
|
-
location: location ?? sliceLocation,
|
|
30
|
-
correlationIds: correlationIds ?? usher.recentCorrelationIds(),
|
|
31
|
-
applicationVersion: usher.applicationVersion,
|
|
32
|
-
shareIdentity: usher.shareIdentityByDefault
|
|
33
|
-
}));
|
|
34
|
-
return /*#__PURE__*/ jsxRuntime.jsx(UsherBoundary.UsherBoundary, {
|
|
35
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(ReportErrorForm, {
|
|
36
|
-
values: values
|
|
37
|
-
})
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
const ReportErrorForm = ({ values })=>{
|
|
41
|
-
const { labels, shareIdentityByDefault } = UsherContext.useUsherContext();
|
|
42
|
-
const { closeDialog } = dialogs.useDialogContext();
|
|
43
|
-
const access = useAccessChoice.useAccessChoice(shareIdentityByDefault);
|
|
44
|
-
return /*#__PURE__*/ jsxRuntime.jsx(CommandDialog.CommandDialog, {
|
|
45
|
-
command: showrunner_usher.ReportError,
|
|
46
|
-
title: labels.reportError.title,
|
|
47
|
-
subtitle: values.errorMessage,
|
|
48
|
-
okLabel: labels.reportError.send,
|
|
49
|
-
cancelLabel: labels.common.cancel,
|
|
50
|
-
closeAriaLabel: labels.common.close,
|
|
51
|
-
width: "560px",
|
|
52
|
-
initialFocus: Dialogs.DialogInitialFocus.Content,
|
|
53
|
-
initialValues: access.initialValues(values),
|
|
54
|
-
currentValues: access.currentValues,
|
|
55
|
-
onFieldChange: access.onFieldChange,
|
|
56
|
-
onSuccess: ()=>closeDialog(dialogs.DialogResult.Ok, {
|
|
57
|
-
issueId: values.issueId
|
|
58
|
-
}),
|
|
59
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
60
|
-
className: "usher-report-form",
|
|
61
|
-
children: [
|
|
62
|
-
/*#__PURE__*/ jsxRuntime.jsx(SentWithReport.SentWithReport, {
|
|
63
|
-
location: values.location,
|
|
64
|
-
correlationIdCount: values.correlationIds.length
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ jsxRuntime.jsx(TechnicalDetails.TechnicalDetails, {
|
|
67
|
-
errorType: values.errorType,
|
|
68
|
-
correlationIds: values.correlationIds,
|
|
69
|
-
stackFrames: values.stackFrames
|
|
70
|
-
}),
|
|
71
|
-
/*#__PURE__*/ jsxRuntime.jsx(CommandForm.TextAreaField, {
|
|
72
|
-
value: (command)=>command.details,
|
|
73
|
-
title: labels.reportError.details,
|
|
74
|
-
placeholder: labels.reportError.detailsPlaceholder,
|
|
75
|
-
required: false,
|
|
76
|
-
rows: 3
|
|
77
|
-
}),
|
|
78
|
-
/*#__PURE__*/ jsxRuntime.jsx(AccessFields.AccessFields, {
|
|
79
|
-
choice: access.choice
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
})
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
exports.ReportErrorDialog = ReportErrorDialog;
|
|
87
|
-
//# sourceMappingURL=ReportErrorDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReportErrorDialog.js","sources":["../../../Reporting/ReportErrorDialog.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 { DialogResult, useDialogContext } from '@cratis/arc.react/dialogs';\nimport { useSliceContext } from '@cratis/arc.react/slices';\nimport { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';\nimport { CommandDialog } from '@cratis/components/CommandDialog';\nimport { TextAreaField } from '@cratis/components/CommandForm';\nimport { DialogInitialFocus } from '@cratis/components/Dialogs';\nimport { Guid } from '@cratis/fundamentals';\nimport { IReportError, ReportError } from '@cratis/showrunner.usher';\nimport { useState } from 'react';\nimport { UsherBoundary } from '../Provider/UsherBoundary.js';\nimport { useUsherContext } from '../Provider/UsherContext.js';\nimport { AccessFields } from './AccessFields.js';\nimport { ReportSent } from './ReportSent.js';\nimport { reportErrorValues, toErrorDetails } from './reportValues.js';\nimport { SentWithReport } from './SentWithReport.js';\nimport { TechnicalDetails } from './TechnicalDetails.js';\nimport { useAccessChoice } from './useAccessChoice.js';\n\n/**\n * Props for {@link ReportErrorDialog}.\n */\nexport interface ReportErrorDialogProps {\n /** The error: `ErrorDetails` from `@cratis/showrunner.usher`, or anything thrown. */\n error?: unknown;\n\n /** Where in the application the reporter is, when the error does not say; the slice context the dialog is rendered in when not given. */\n location?: ArcSliceLocation;\n\n /** The correlation ids to send besides the error's own; the recent ones {@link UsherProvider} tracked when not given. */\n correlationIds?: Guid[];\n}\n\n/**\n * The report this error dialog: the error is captured already, and the reporter may say what they were doing and\n * choose whether support may know who they are and sign in as them. The technical details are collapsed. Open it\n * with `useDialog`; it closes with {@link ReportSent} once the report is sent.\n */\nexport const ReportErrorDialog = ({ error, location, correlationIds }: ReportErrorDialogProps) => {\n const usher = useUsherContext();\n const sliceLocation = useSliceContext();\n const [values] = useState(() => reportErrorValues(toErrorDetails(error, location ?? sliceLocation), {\n issueId: Guid.create(),\n location: location ?? sliceLocation,\n correlationIds: correlationIds ?? usher.recentCorrelationIds(),\n applicationVersion: usher.applicationVersion,\n shareIdentity: usher.shareIdentityByDefault\n }));\n\n return (\n <UsherBoundary>\n <ReportErrorForm values={values} />\n </UsherBoundary>\n );\n};\n\nconst ReportErrorForm = ({ values }: { values: IReportError }) => {\n const { labels, shareIdentityByDefault } = useUsherContext();\n const { closeDialog } = useDialogContext<ReportErrorDialogProps, ReportSent>();\n const access = useAccessChoice(shareIdentityByDefault);\n\n return (\n <CommandDialog<ReportError>\n command={ReportError}\n title={labels.reportError.title}\n subtitle={values.errorMessage}\n okLabel={labels.reportError.send}\n cancelLabel={labels.common.cancel}\n closeAriaLabel={labels.common.close}\n width='560px'\n initialFocus={DialogInitialFocus.Content}\n initialValues={access.initialValues(values)}\n currentValues={access.currentValues}\n onFieldChange={access.onFieldChange}\n onSuccess={() => closeDialog(DialogResult.Ok, { issueId: values.issueId! })}>\n <div className='usher-report-form'>\n <SentWithReport location={values.location!} correlationIdCount={values.correlationIds!.length} />\n <TechnicalDetails\n errorType={values.errorType!}\n correlationIds={values.correlationIds!}\n stackFrames={values.stackFrames!} />\n <TextAreaField<ReportError>\n value={command => command.details}\n title={labels.reportError.details}\n placeholder={labels.reportError.detailsPlaceholder}\n required={false}\n rows={3} />\n <AccessFields<ReportError> choice={access.choice} />\n </div>\n </CommandDialog>\n );\n};\n"],"names":["ReportErrorDialog","error","location","correlationIds","usher","useUsherContext","sliceLocation","useSliceContext","values","useState","reportErrorValues","toErrorDetails","issueId","Guid","create","recentCorrelationIds","applicationVersion","shareIdentity","shareIdentityByDefault","_jsx","UsherBoundary","ReportErrorForm","labels","closeDialog","useDialogContext","access","useAccessChoice","CommandDialog","command","ReportError","title","reportError","subtitle","errorMessage","okLabel","send","cancelLabel","common","cancel","closeAriaLabel","close","width","initialFocus","DialogInitialFocus","Content","initialValues","currentValues","onFieldChange","onSuccess","DialogResult","Ok","_jsxs","div","className","SentWithReport","correlationIdCount","length","TechnicalDetails","errorType","stackFrames","TextAreaField","value","details","placeholder","detailsPlaceholder","required","rows","AccessFields","choice"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA;;;;IAKO,MAAMA,iBAAAA,GAAoB,CAAC,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,cAAc,EAA0B,GAAA;AACzF,IAAA,MAAMC,KAAAA,GAAQC,4BAAAA,EAAAA;AACd,IAAA,MAAMC,aAAAA,GAAgBC,sBAAAA,EAAAA;IACtB,MAAM,CAACC,OAAO,GAAGC,cAAAA,CAAS,IAAMC,8BAAAA,CAAkBC,2BAAAA,CAAeV,KAAAA,EAAOC,QAAAA,IAAYI,aAAAA,CAAAA,EAAgB;AAChGM,YAAAA,OAAAA,EAASC,kBAAKC,MAAM,EAAA;AACpBZ,YAAAA,QAAAA,EAAUA,QAAAA,IAAYI,aAAAA;YACtBH,cAAAA,EAAgBA,cAAAA,IAAkBC,MAAMW,oBAAoB,EAAA;AAC5DC,YAAAA,kBAAAA,EAAoBZ,MAAMY,kBAAkB;AAC5CC,YAAAA,aAAAA,EAAeb,MAAMc;AACzB,SAAA,CAAA,CAAA;AAEA,IAAA,qBACIC,cAAA,CAACC,2BAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACE,eAAAA,EAAAA;YAAgBb,MAAAA,EAAQA;;;AAGrC;AAEA,MAAMa,eAAAA,GAAkB,CAAC,EAAEb,MAAM,EAA4B,GAAA;AACzD,IAAA,MAAM,EAAEc,MAAM,EAAEJ,sBAAsB,EAAE,GAAGb,4BAAAA,EAAAA;IAC3C,MAAM,EAAEkB,WAAW,EAAE,GAAGC,wBAAAA,EAAAA;AACxB,IAAA,MAAMC,SAASC,+BAAAA,CAAgBR,sBAAAA,CAAAA;AAE/B,IAAA,qBACIC,cAAA,CAACQ,2BAAAA,EAAAA;QACGC,OAAAA,EAASC,4BAAAA;QACTC,KAAAA,EAAOR,MAAAA,CAAOS,WAAW,CAACD,KAAK;AAC/BE,QAAAA,QAAAA,EAAUxB,OAAOyB,YAAY;QAC7BC,OAAAA,EAASZ,MAAAA,CAAOS,WAAW,CAACI,IAAI;QAChCC,WAAAA,EAAad,MAAAA,CAAOe,MAAM,CAACC,MAAM;QACjCC,cAAAA,EAAgBjB,MAAAA,CAAOe,MAAM,CAACG,KAAK;QACnCC,KAAAA,EAAM,OAAA;AACNC,QAAAA,YAAAA,EAAcC,2BAAmBC,OAAO;QACxCC,aAAAA,EAAepB,MAAAA,CAAOoB,aAAa,CAACrC,MAAAA,CAAAA;AACpCsC,QAAAA,aAAAA,EAAerB,OAAOqB,aAAa;AACnCC,QAAAA,aAAAA,EAAetB,OAAOsB,aAAa;AACnCC,QAAAA,SAAAA,EAAW,IAAMzB,WAAAA,CAAY0B,oBAAAA,CAAaC,EAAE,EAAE;AAAEtC,gBAAAA,OAAAA,EAASJ,OAAOI;AAAS,aAAA,CAAA;AACzE,QAAA,QAAA,gBAAAuC,eAAA,CAACC,KAAAA,EAAAA;YAAIC,SAAAA,EAAU,mBAAA;;8BACXlC,cAAA,CAACmC,6BAAAA,EAAAA;AAAepD,oBAAAA,QAAAA,EAAUM,OAAON,QAAQ;oBAAGqD,kBAAAA,EAAoB/C,MAAAA,CAAOL,cAAc,CAAEqD;;8BACvFrC,cAAA,CAACsC,iCAAAA,EAAAA;AACGC,oBAAAA,SAAAA,EAAWlD,OAAOkD,SAAS;AAC3BvD,oBAAAA,cAAAA,EAAgBK,OAAOL,cAAc;AACrCwD,oBAAAA,WAAAA,EAAanD,OAAOmD;;8BACxBxC,cAAA,CAACyC,yBAAAA,EAAAA;oBACGC,KAAAA,EAAOjC,CAAAA,OAAAA,GAAWA,OAAAA,CAAQkC,OAAO;oBACjChC,KAAAA,EAAOR,MAAAA,CAAOS,WAAW,CAAC+B,OAAO;oBACjCC,WAAAA,EAAazC,MAAAA,CAAOS,WAAW,CAACiC,kBAAkB;oBAClDC,QAAAA,EAAU,KAAA;oBACVC,IAAAA,EAAM;;8BACV/C,cAAA,CAACgD,yBAAAA,EAAAA;AAA0BC,oBAAAA,MAAAA,EAAQ3C,OAAO2C;;;;;AAI1D,CAAA;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';
|
|
2
|
-
import { Guid } from '@cratis/fundamentals';
|
|
3
|
-
export interface ReportIssueDialogProps {
|
|
4
|
-
location?: ArcSliceLocation;
|
|
5
|
-
correlationIds?: Guid[];
|
|
6
|
-
}
|
|
7
|
-
export declare const ReportIssueDialog: ({ location, correlationIds }: ReportIssueDialogProps) => import("react").JSX.Element;
|
|
8
|
-
//# sourceMappingURL=ReportIssueDialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReportIssueDialog.d.ts","sourceRoot":"","sources":["../../../Reporting/ReportIssueDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI3E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAc5C,MAAM,WAAW,sBAAsB;IAEnC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAG5B,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC;CAC3B;AAMD,eAAO,MAAM,iBAAiB,GAAI,8BAA8B,sBAAsB,gCAgBrF,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var dialogs = require('@cratis/arc.react/dialogs');
|
|
5
|
-
var slices = require('@cratis/arc.react/slices');
|
|
6
|
-
var CommandDialog = require('@cratis/components/CommandDialog');
|
|
7
|
-
var CommandForm = require('@cratis/components/CommandForm');
|
|
8
|
-
var Dialogs = require('@cratis/components/Dialogs');
|
|
9
|
-
var fundamentals = require('@cratis/fundamentals');
|
|
10
|
-
var showrunner_usher = require('@cratis/showrunner.usher');
|
|
11
|
-
var react = require('react');
|
|
12
|
-
var UsherBoundary = require('../Provider/UsherBoundary.js');
|
|
13
|
-
var UsherContext = require('../Provider/UsherContext.js');
|
|
14
|
-
var AccessFields = require('./AccessFields.js');
|
|
15
|
-
var reportValues = require('./reportValues.js');
|
|
16
|
-
var SentWithReport = require('./SentWithReport.js');
|
|
17
|
-
var useAccessChoice = require('./useAccessChoice.js');
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The report a problem dialog: the reporter describes a problem by hand, and chooses whether support may know who
|
|
21
|
-
* they are and sign in as them. Open it with `useDialog`; it closes with {@link ReportSent} once the report is sent.
|
|
22
|
-
*/ const ReportIssueDialog = ({ location, correlationIds })=>{
|
|
23
|
-
const usher = UsherContext.useUsherContext();
|
|
24
|
-
const sliceLocation = slices.useSliceContext();
|
|
25
|
-
const [values] = react.useState(()=>reportValues.reportIssueValues({
|
|
26
|
-
issueId: fundamentals.Guid.create(),
|
|
27
|
-
location: location ?? sliceLocation,
|
|
28
|
-
correlationIds: correlationIds ?? usher.recentCorrelationIds(),
|
|
29
|
-
applicationVersion: usher.applicationVersion,
|
|
30
|
-
shareIdentity: usher.shareIdentityByDefault
|
|
31
|
-
}));
|
|
32
|
-
return /*#__PURE__*/ jsxRuntime.jsx(UsherBoundary.UsherBoundary, {
|
|
33
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(ReportIssueForm, {
|
|
34
|
-
values: values
|
|
35
|
-
})
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
const ReportIssueForm = ({ values })=>{
|
|
39
|
-
const { labels, shareIdentityByDefault } = UsherContext.useUsherContext();
|
|
40
|
-
const { closeDialog } = dialogs.useDialogContext();
|
|
41
|
-
const access = useAccessChoice.useAccessChoice(shareIdentityByDefault);
|
|
42
|
-
return /*#__PURE__*/ jsxRuntime.jsx(CommandDialog.CommandDialog, {
|
|
43
|
-
command: showrunner_usher.ReportIssue,
|
|
44
|
-
title: labels.reportIssue.title,
|
|
45
|
-
okLabel: labels.reportIssue.send,
|
|
46
|
-
cancelLabel: labels.common.cancel,
|
|
47
|
-
closeAriaLabel: labels.common.close,
|
|
48
|
-
width: "560px",
|
|
49
|
-
initialFocus: Dialogs.DialogInitialFocus.Content,
|
|
50
|
-
initialValues: access.initialValues(values),
|
|
51
|
-
currentValues: access.currentValues,
|
|
52
|
-
onFieldChange: access.onFieldChange,
|
|
53
|
-
onSuccess: ()=>closeDialog(dialogs.DialogResult.Ok, {
|
|
54
|
-
issueId: values.issueId
|
|
55
|
-
}),
|
|
56
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
57
|
-
className: "usher-report-form",
|
|
58
|
-
children: [
|
|
59
|
-
/*#__PURE__*/ jsxRuntime.jsx(SentWithReport.SentWithReport, {
|
|
60
|
-
location: values.location,
|
|
61
|
-
correlationIdCount: values.correlationIds.length
|
|
62
|
-
}),
|
|
63
|
-
/*#__PURE__*/ jsxRuntime.jsx(CommandForm.InputTextField, {
|
|
64
|
-
value: (command)=>command.summary,
|
|
65
|
-
title: labels.reportIssue.summary
|
|
66
|
-
}),
|
|
67
|
-
/*#__PURE__*/ jsxRuntime.jsx(CommandForm.TextAreaField, {
|
|
68
|
-
value: (command)=>command.description,
|
|
69
|
-
title: labels.reportIssue.description,
|
|
70
|
-
rows: 5
|
|
71
|
-
}),
|
|
72
|
-
/*#__PURE__*/ jsxRuntime.jsx(AccessFields.AccessFields, {
|
|
73
|
-
choice: access.choice
|
|
74
|
-
})
|
|
75
|
-
]
|
|
76
|
-
})
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
exports.ReportIssueDialog = ReportIssueDialog;
|
|
81
|
-
//# sourceMappingURL=ReportIssueDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReportIssueDialog.js","sources":["../../../Reporting/ReportIssueDialog.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 { DialogResult, useDialogContext } from '@cratis/arc.react/dialogs';\nimport { useSliceContext } from '@cratis/arc.react/slices';\nimport { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';\nimport { CommandDialog } from '@cratis/components/CommandDialog';\nimport { InputTextField, TextAreaField } from '@cratis/components/CommandForm';\nimport { DialogInitialFocus } from '@cratis/components/Dialogs';\nimport { Guid } from '@cratis/fundamentals';\nimport { ReportIssue } from '@cratis/showrunner.usher';\nimport { useState } from 'react';\nimport { UsherBoundary } from '../Provider/UsherBoundary.js';\nimport { useUsherContext } from '../Provider/UsherContext.js';\nimport { AccessFields } from './AccessFields.js';\nimport { ReportSent } from './ReportSent.js';\nimport { reportIssueValues } from './reportValues.js';\nimport { SentWithReport } from './SentWithReport.js';\nimport { useAccessChoice } from './useAccessChoice.js';\n\n/**\n * Props for {@link ReportIssueDialog}.\n */\nexport interface ReportIssueDialogProps {\n /** Where in the application the reporter is; the slice context the dialog is rendered in when not given. */\n location?: ArcSliceLocation;\n\n /** The correlation ids to send; the recent ones {@link UsherProvider} tracked when not given. */\n correlationIds?: Guid[];\n}\n\n/**\n * The report a problem dialog: the reporter describes a problem by hand, and chooses whether support may know who\n * they are and sign in as them. Open it with `useDialog`; it closes with {@link ReportSent} once the report is sent.\n */\nexport const ReportIssueDialog = ({ location, correlationIds }: ReportIssueDialogProps) => {\n const usher = useUsherContext();\n const sliceLocation = useSliceContext();\n const [values] = useState(() => reportIssueValues({\n issueId: Guid.create(),\n location: location ?? sliceLocation,\n correlationIds: correlationIds ?? usher.recentCorrelationIds(),\n applicationVersion: usher.applicationVersion,\n shareIdentity: usher.shareIdentityByDefault\n }));\n\n return (\n <UsherBoundary>\n <ReportIssueForm values={values} />\n </UsherBoundary>\n );\n};\n\nconst ReportIssueForm = ({ values }: { values: ReturnType<typeof reportIssueValues> }) => {\n const { labels, shareIdentityByDefault } = useUsherContext();\n const { closeDialog } = useDialogContext<ReportIssueDialogProps, ReportSent>();\n const access = useAccessChoice(shareIdentityByDefault);\n\n return (\n <CommandDialog<ReportIssue>\n command={ReportIssue}\n title={labels.reportIssue.title}\n okLabel={labels.reportIssue.send}\n cancelLabel={labels.common.cancel}\n closeAriaLabel={labels.common.close}\n width='560px'\n initialFocus={DialogInitialFocus.Content}\n initialValues={access.initialValues(values)}\n currentValues={access.currentValues}\n onFieldChange={access.onFieldChange}\n onSuccess={() => closeDialog(DialogResult.Ok, { issueId: values.issueId! })}>\n <div className='usher-report-form'>\n <SentWithReport location={values.location!} correlationIdCount={values.correlationIds!.length} />\n <InputTextField<ReportIssue> value={command => command.summary} title={labels.reportIssue.summary} />\n <TextAreaField<ReportIssue> value={command => command.description} title={labels.reportIssue.description} rows={5} />\n <AccessFields<ReportIssue> choice={access.choice} />\n </div>\n </CommandDialog>\n );\n};\n"],"names":["ReportIssueDialog","location","correlationIds","usher","useUsherContext","sliceLocation","useSliceContext","values","useState","reportIssueValues","issueId","Guid","create","recentCorrelationIds","applicationVersion","shareIdentity","shareIdentityByDefault","_jsx","UsherBoundary","ReportIssueForm","labels","closeDialog","useDialogContext","access","useAccessChoice","CommandDialog","command","ReportIssue","title","reportIssue","okLabel","send","cancelLabel","common","cancel","closeAriaLabel","close","width","initialFocus","DialogInitialFocus","Content","initialValues","currentValues","onFieldChange","onSuccess","DialogResult","Ok","_jsxs","div","className","SentWithReport","correlationIdCount","length","InputTextField","value","summary","TextAreaField","description","rows","AccessFields","choice"],"mappings":";;;;;;;;;;;;;;;;;;AA+BA;;;UAIaA,iBAAAA,GAAoB,CAAC,EAAEC,QAAQ,EAAEC,cAAc,EAA0B,GAAA;AAClF,IAAA,MAAMC,KAAAA,GAAQC,4BAAAA,EAAAA;AACd,IAAA,MAAMC,aAAAA,GAAgBC,sBAAAA,EAAAA;AACtB,IAAA,MAAM,CAACC,MAAAA,CAAO,GAAGC,cAAAA,CAAS,IAAMC,8BAAAA,CAAkB;AAC9CC,YAAAA,OAAAA,EAASC,kBAAKC,MAAM,EAAA;AACpBX,YAAAA,QAAAA,EAAUA,QAAAA,IAAYI,aAAAA;YACtBH,cAAAA,EAAgBA,cAAAA,IAAkBC,MAAMU,oBAAoB,EAAA;AAC5DC,YAAAA,kBAAAA,EAAoBX,MAAMW,kBAAkB;AAC5CC,YAAAA,aAAAA,EAAeZ,MAAMa;AACzB,SAAA,CAAA,CAAA;AAEA,IAAA,qBACIC,cAAA,CAACC,2BAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACE,eAAAA,EAAAA;YAAgBZ,MAAAA,EAAQA;;;AAGrC;AAEA,MAAMY,eAAAA,GAAkB,CAAC,EAAEZ,MAAM,EAAoD,GAAA;AACjF,IAAA,MAAM,EAAEa,MAAM,EAAEJ,sBAAsB,EAAE,GAAGZ,4BAAAA,EAAAA;IAC3C,MAAM,EAAEiB,WAAW,EAAE,GAAGC,wBAAAA,EAAAA;AACxB,IAAA,MAAMC,SAASC,+BAAAA,CAAgBR,sBAAAA,CAAAA;AAE/B,IAAA,qBACIC,cAAA,CAACQ,2BAAAA,EAAAA;QACGC,OAAAA,EAASC,4BAAAA;QACTC,KAAAA,EAAOR,MAAAA,CAAOS,WAAW,CAACD,KAAK;QAC/BE,OAAAA,EAASV,MAAAA,CAAOS,WAAW,CAACE,IAAI;QAChCC,WAAAA,EAAaZ,MAAAA,CAAOa,MAAM,CAACC,MAAM;QACjCC,cAAAA,EAAgBf,MAAAA,CAAOa,MAAM,CAACG,KAAK;QACnCC,KAAAA,EAAM,OAAA;AACNC,QAAAA,YAAAA,EAAcC,2BAAmBC,OAAO;QACxCC,aAAAA,EAAelB,MAAAA,CAAOkB,aAAa,CAAClC,MAAAA,CAAAA;AACpCmC,QAAAA,aAAAA,EAAenB,OAAOmB,aAAa;AACnCC,QAAAA,aAAAA,EAAepB,OAAOoB,aAAa;AACnCC,QAAAA,SAAAA,EAAW,IAAMvB,WAAAA,CAAYwB,oBAAAA,CAAaC,EAAE,EAAE;AAAEpC,gBAAAA,OAAAA,EAASH,OAAOG;AAAS,aAAA,CAAA;AACzE,QAAA,QAAA,gBAAAqC,eAAA,CAACC,KAAAA,EAAAA;YAAIC,SAAAA,EAAU,mBAAA;;8BACXhC,cAAA,CAACiC,6BAAAA,EAAAA;AAAejD,oBAAAA,QAAAA,EAAUM,OAAON,QAAQ;oBAAGkD,kBAAAA,EAAoB5C,MAAAA,CAAOL,cAAc,CAAEkD;;8BACvFnC,cAAA,CAACoC,0BAAAA,EAAAA;oBAA4BC,KAAAA,EAAO5B,CAAAA,OAAAA,GAAWA,OAAAA,CAAQ6B,OAAO;oBAAE3B,KAAAA,EAAOR,MAAAA,CAAOS,WAAW,CAAC0B;;8BAC1FtC,cAAA,CAACuC,yBAAAA,EAAAA;oBAA2BF,KAAAA,EAAO5B,CAAAA,OAAAA,GAAWA,OAAAA,CAAQ+B,WAAW;oBAAE7B,KAAAA,EAAOR,MAAAA,CAAOS,WAAW,CAAC4B,WAAW;oBAAEC,IAAAA,EAAM;;8BAChHzC,cAAA,CAAC0C,yBAAAA,EAAAA;AAA0BC,oBAAAA,MAAAA,EAAQrC,OAAOqC;;;;;AAI1D,CAAA;;"}
|