@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.
Files changed (507) hide show
  1. package/README.md +2 -71
  2. package/package.json +4 -83
  3. package/Buttons/MyIssuesButton.tsx +0 -78
  4. package/Buttons/ReportButton.tsx +0 -51
  5. package/Buttons/buttonModels.ts +0 -55
  6. package/Buttons/index.ts +0 -6
  7. package/Correlation/CorrelationTracker.ts +0 -51
  8. package/Correlation/index.ts +0 -5
  9. package/Correlation/withCorrelationIdHeader.ts +0 -44
  10. package/Icons.tsx +0 -29
  11. package/Issues/IssueView/AccessPanel.tsx +0 -85
  12. package/Issues/IssueView/GrantAccessDialog.tsx +0 -56
  13. package/Issues/IssueView/IdentityPanel.tsx +0 -38
  14. package/Issues/IssueView/IssueActions.tsx +0 -52
  15. package/Issues/IssueView/IssueConversationPanel.tsx +0 -89
  16. package/Issues/IssueView/IssueHeader.tsx +0 -69
  17. package/Issues/IssueView/IssueView.tsx +0 -74
  18. package/Issues/IssueView/QuestionBanner.tsx +0 -27
  19. package/Issues/IssueView/ReopenIssueDialog.tsx +0 -37
  20. package/Issues/IssueView/ShareIdentityDialog.tsx +0 -37
  21. package/Issues/IssueView/StatusStrip.tsx +0 -42
  22. package/Issues/IssueView/SupportSessions.tsx +0 -59
  23. package/Issues/IssueView/index.ts +0 -15
  24. package/Issues/MyIssues/IssueList.tsx +0 -78
  25. package/Issues/MyIssues/MyIssuesDialog.tsx +0 -64
  26. package/Issues/MyIssues/MyIssuesNavigation.ts +0 -61
  27. package/Issues/MyIssues/index.ts +0 -6
  28. package/Issues/MyIssuesList.ts +0 -33
  29. package/Issues/accessStatus.ts +0 -68
  30. package/Issues/conversationMessages.ts +0 -136
  31. package/Issues/index.ts +0 -12
  32. package/Issues/issueStates.ts +0 -69
  33. package/Issues/sessionActivity.ts +0 -43
  34. package/Issues/useAccessStatus.ts +0 -24
  35. package/Issues/webAddress.ts +0 -22
  36. package/Labels/UsherLabels.ts +0 -365
  37. package/Labels/defaultUsherLabels.ts +0 -178
  38. package/Labels/format.ts +0 -13
  39. package/Labels/index.ts +0 -7
  40. package/Labels/resolveLabels.ts +0 -36
  41. package/Provider/UsherBoundary.tsx +0 -30
  42. package/Provider/UsherContext.ts +0 -109
  43. package/Provider/UsherProvider.tsx +0 -134
  44. package/Provider/index.ts +0 -7
  45. package/Provider/useUsher.ts +0 -72
  46. package/Reporting/AccessChoice.ts +0 -107
  47. package/Reporting/AccessFields.tsx +0 -74
  48. package/Reporting/AccessNotice.tsx +0 -33
  49. package/Reporting/ReportErrorDialog.tsx +0 -94
  50. package/Reporting/ReportIssueDialog.tsx +0 -80
  51. package/Reporting/ReportLimits.ts +0 -24
  52. package/Reporting/ReportSent.ts +0 -12
  53. package/Reporting/SentWithReport.tsx +0 -37
  54. package/Reporting/TechnicalDetails.tsx +0 -60
  55. package/Reporting/durationOptions.ts +0 -31
  56. package/Reporting/formatLocation.ts +0 -27
  57. package/Reporting/index.ts +0 -16
  58. package/Reporting/reportValues.ts +0 -150
  59. package/Reporting/useAccessChoice.ts +0 -53
  60. package/dist/cjs/Buttons/MyIssuesButton.d.ts +0 -14
  61. package/dist/cjs/Buttons/MyIssuesButton.d.ts.map +0 -1
  62. package/dist/cjs/Buttons/MyIssuesButton.js +0 -76
  63. package/dist/cjs/Buttons/MyIssuesButton.js.map +0 -1
  64. package/dist/cjs/Buttons/ReportButton.d.ts +0 -8
  65. package/dist/cjs/Buttons/ReportButton.d.ts.map +0 -1
  66. package/dist/cjs/Buttons/ReportButton.js +0 -34
  67. package/dist/cjs/Buttons/ReportButton.js.map +0 -1
  68. package/dist/cjs/Buttons/buttonModels.d.ts +0 -10
  69. package/dist/cjs/Buttons/buttonModels.d.ts.map +0 -1
  70. package/dist/cjs/Buttons/buttonModels.js +0 -44
  71. package/dist/cjs/Buttons/buttonModels.js.map +0 -1
  72. package/dist/cjs/Buttons/index.d.ts +0 -4
  73. package/dist/cjs/Buttons/index.d.ts.map +0 -1
  74. package/dist/cjs/Correlation/CorrelationTracker.d.ts +0 -10
  75. package/dist/cjs/Correlation/CorrelationTracker.d.ts.map +0 -1
  76. package/dist/cjs/Correlation/CorrelationTracker.js +0 -50
  77. package/dist/cjs/Correlation/CorrelationTracker.js.map +0 -1
  78. package/dist/cjs/Correlation/index.d.ts +0 -3
  79. package/dist/cjs/Correlation/index.d.ts.map +0 -1
  80. package/dist/cjs/Correlation/withCorrelationIdHeader.d.ts +0 -6
  81. package/dist/cjs/Correlation/withCorrelationIdHeader.d.ts.map +0 -1
  82. package/dist/cjs/Correlation/withCorrelationIdHeader.js +0 -39
  83. package/dist/cjs/Correlation/withCorrelationIdHeader.js.map +0 -1
  84. package/dist/cjs/Icons.d.ts +0 -4
  85. package/dist/cjs/Icons.d.ts.map +0 -1
  86. package/dist/cjs/Icons.js +0 -53
  87. package/dist/cjs/Icons.js.map +0 -1
  88. package/dist/cjs/Issues/IssueView/AccessPanel.d.ts +0 -6
  89. package/dist/cjs/Issues/IssueView/AccessPanel.d.ts.map +0 -1
  90. package/dist/cjs/Issues/IssueView/AccessPanel.js +0 -124
  91. package/dist/cjs/Issues/IssueView/AccessPanel.js.map +0 -1
  92. package/dist/cjs/Issues/IssueView/GrantAccessDialog.d.ts +0 -6
  93. package/dist/cjs/Issues/IssueView/GrantAccessDialog.d.ts.map +0 -1
  94. package/dist/cjs/Issues/IssueView/GrantAccessDialog.js +0 -56
  95. package/dist/cjs/Issues/IssueView/GrantAccessDialog.js.map +0 -1
  96. package/dist/cjs/Issues/IssueView/IdentityPanel.d.ts +0 -6
  97. package/dist/cjs/Issues/IssueView/IdentityPanel.d.ts.map +0 -1
  98. package/dist/cjs/Issues/IssueView/IdentityPanel.js +0 -45
  99. package/dist/cjs/Issues/IssueView/IdentityPanel.js.map +0 -1
  100. package/dist/cjs/Issues/IssueView/IssueActions.d.ts +0 -6
  101. package/dist/cjs/Issues/IssueView/IssueActions.d.ts.map +0 -1
  102. package/dist/cjs/Issues/IssueView/IssueActions.js +0 -58
  103. package/dist/cjs/Issues/IssueView/IssueActions.js.map +0 -1
  104. package/dist/cjs/Issues/IssueView/IssueConversationPanel.d.ts +0 -6
  105. package/dist/cjs/Issues/IssueView/IssueConversationPanel.d.ts.map +0 -1
  106. package/dist/cjs/Issues/IssueView/IssueConversationPanel.js +0 -97
  107. package/dist/cjs/Issues/IssueView/IssueConversationPanel.js.map +0 -1
  108. package/dist/cjs/Issues/IssueView/IssueHeader.d.ts +0 -7
  109. package/dist/cjs/Issues/IssueView/IssueHeader.d.ts.map +0 -1
  110. package/dist/cjs/Issues/IssueView/IssueHeader.js +0 -94
  111. package/dist/cjs/Issues/IssueView/IssueHeader.js.map +0 -1
  112. package/dist/cjs/Issues/IssueView/IssueView.d.ts +0 -7
  113. package/dist/cjs/Issues/IssueView/IssueView.d.ts.map +0 -1
  114. package/dist/cjs/Issues/IssueView/IssueView.js +0 -85
  115. package/dist/cjs/Issues/IssueView/IssueView.js.map +0 -1
  116. package/dist/cjs/Issues/IssueView/QuestionBanner.d.ts +0 -5
  117. package/dist/cjs/Issues/IssueView/QuestionBanner.d.ts.map +0 -1
  118. package/dist/cjs/Issues/IssueView/QuestionBanner.js +0 -24
  119. package/dist/cjs/Issues/IssueView/QuestionBanner.js.map +0 -1
  120. package/dist/cjs/Issues/IssueView/ReopenIssueDialog.d.ts +0 -6
  121. package/dist/cjs/Issues/IssueView/ReopenIssueDialog.d.ts.map +0 -1
  122. package/dist/cjs/Issues/IssueView/ReopenIssueDialog.js +0 -34
  123. package/dist/cjs/Issues/IssueView/ReopenIssueDialog.js.map +0 -1
  124. package/dist/cjs/Issues/IssueView/ShareIdentityDialog.d.ts +0 -6
  125. package/dist/cjs/Issues/IssueView/ShareIdentityDialog.d.ts.map +0 -1
  126. package/dist/cjs/Issues/IssueView/ShareIdentityDialog.js +0 -32
  127. package/dist/cjs/Issues/IssueView/ShareIdentityDialog.js.map +0 -1
  128. package/dist/cjs/Issues/IssueView/StatusStrip.d.ts +0 -6
  129. package/dist/cjs/Issues/IssueView/StatusStrip.d.ts.map +0 -1
  130. package/dist/cjs/Issues/IssueView/StatusStrip.js +0 -31
  131. package/dist/cjs/Issues/IssueView/StatusStrip.js.map +0 -1
  132. package/dist/cjs/Issues/IssueView/SupportSessions.d.ts +0 -7
  133. package/dist/cjs/Issues/IssueView/SupportSessions.d.ts.map +0 -1
  134. package/dist/cjs/Issues/IssueView/SupportSessions.js +0 -62
  135. package/dist/cjs/Issues/IssueView/SupportSessions.js.map +0 -1
  136. package/dist/cjs/Issues/IssueView/index.d.ts +0 -13
  137. package/dist/cjs/Issues/IssueView/index.d.ts.map +0 -1
  138. package/dist/cjs/Issues/MyIssues/IssueList.d.ts +0 -7
  139. package/dist/cjs/Issues/MyIssues/IssueList.d.ts.map +0 -1
  140. package/dist/cjs/Issues/MyIssues/IssueList.js +0 -92
  141. package/dist/cjs/Issues/MyIssues/IssueList.js.map +0 -1
  142. package/dist/cjs/Issues/MyIssues/MyIssuesDialog.d.ts +0 -7
  143. package/dist/cjs/Issues/MyIssues/MyIssuesDialog.d.ts.map +0 -1
  144. package/dist/cjs/Issues/MyIssues/MyIssuesDialog.js +0 -79
  145. package/dist/cjs/Issues/MyIssues/MyIssuesDialog.js.map +0 -1
  146. package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.d.ts +0 -21
  147. package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.d.ts.map +0 -1
  148. package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.js +0 -52
  149. package/dist/cjs/Issues/MyIssues/MyIssuesNavigation.js.map +0 -1
  150. package/dist/cjs/Issues/MyIssues/index.d.ts +0 -4
  151. package/dist/cjs/Issues/MyIssues/index.d.ts.map +0 -1
  152. package/dist/cjs/Issues/MyIssuesList.d.ts +0 -7
  153. package/dist/cjs/Issues/MyIssuesList.d.ts.map +0 -1
  154. package/dist/cjs/Issues/MyIssuesList.js +0 -33
  155. package/dist/cjs/Issues/MyIssuesList.js.map +0 -1
  156. package/dist/cjs/Issues/accessStatus.d.ts +0 -13
  157. package/dist/cjs/Issues/accessStatus.d.ts.map +0 -1
  158. package/dist/cjs/Issues/accessStatus.js +0 -60
  159. package/dist/cjs/Issues/accessStatus.js.map +0 -1
  160. package/dist/cjs/Issues/conversationMessages.d.ts +0 -14
  161. package/dist/cjs/Issues/conversationMessages.d.ts.map +0 -1
  162. package/dist/cjs/Issues/conversationMessages.js +0 -131
  163. package/dist/cjs/Issues/conversationMessages.js.map +0 -1
  164. package/dist/cjs/Issues/index.d.ts +0 -10
  165. package/dist/cjs/Issues/index.d.ts.map +0 -1
  166. package/dist/cjs/Issues/issueStates.d.ts +0 -12
  167. package/dist/cjs/Issues/issueStates.d.ts.map +0 -1
  168. package/dist/cjs/Issues/issueStates.js +0 -86
  169. package/dist/cjs/Issues/issueStates.js.map +0 -1
  170. package/dist/cjs/Issues/sessionActivity.d.ts +0 -8
  171. package/dist/cjs/Issues/sessionActivity.d.ts.map +0 -1
  172. package/dist/cjs/Issues/sessionActivity.js +0 -39
  173. package/dist/cjs/Issues/sessionActivity.js.map +0 -1
  174. package/dist/cjs/Issues/useAccessStatus.d.ts +0 -4
  175. package/dist/cjs/Issues/useAccessStatus.d.ts.map +0 -1
  176. package/dist/cjs/Issues/useAccessStatus.js +0 -30
  177. package/dist/cjs/Issues/useAccessStatus.js.map +0 -1
  178. package/dist/cjs/Issues/webAddress.d.ts +0 -2
  179. package/dist/cjs/Issues/webAddress.d.ts.map +0 -1
  180. package/dist/cjs/Issues/webAddress.js +0 -24
  181. package/dist/cjs/Issues/webAddress.js.map +0 -1
  182. package/dist/cjs/Labels/UsherLabels.d.ts +0 -177
  183. package/dist/cjs/Labels/UsherLabels.d.ts.map +0 -1
  184. package/dist/cjs/Labels/defaultUsherLabels.d.ts +0 -3
  185. package/dist/cjs/Labels/defaultUsherLabels.d.ts.map +0 -1
  186. package/dist/cjs/Labels/defaultUsherLabels.js +0 -179
  187. package/dist/cjs/Labels/defaultUsherLabels.js.map +0 -1
  188. package/dist/cjs/Labels/format.d.ts +0 -2
  189. package/dist/cjs/Labels/format.d.ts.map +0 -1
  190. package/dist/cjs/Labels/format.js +0 -15
  191. package/dist/cjs/Labels/format.js.map +0 -1
  192. package/dist/cjs/Labels/index.d.ts +0 -5
  193. package/dist/cjs/Labels/index.d.ts.map +0 -1
  194. package/dist/cjs/Labels/resolveLabels.d.ts +0 -3
  195. package/dist/cjs/Labels/resolveLabels.d.ts.map +0 -1
  196. package/dist/cjs/Labels/resolveLabels.js +0 -35
  197. package/dist/cjs/Labels/resolveLabels.js.map +0 -1
  198. package/dist/cjs/Provider/UsherBoundary.d.ts +0 -6
  199. package/dist/cjs/Provider/UsherBoundary.d.ts.map +0 -1
  200. package/dist/cjs/Provider/UsherBoundary.js +0 -24
  201. package/dist/cjs/Provider/UsherBoundary.js.map +0 -1
  202. package/dist/cjs/Provider/UsherContext.d.ts +0 -24
  203. package/dist/cjs/Provider/UsherContext.d.ts.map +0 -1
  204. package/dist/cjs/Provider/UsherContext.js +0 -41
  205. package/dist/cjs/Provider/UsherContext.js.map +0 -1
  206. package/dist/cjs/Provider/UsherProvider.d.ts +0 -14
  207. package/dist/cjs/Provider/UsherProvider.d.ts.map +0 -1
  208. package/dist/cjs/Provider/UsherProvider.js +0 -122
  209. package/dist/cjs/Provider/UsherProvider.js.map +0 -1
  210. package/dist/cjs/Provider/index.d.ts +0 -5
  211. package/dist/cjs/Provider/index.d.ts.map +0 -1
  212. package/dist/cjs/Provider/useUsher.d.ts +0 -13
  213. package/dist/cjs/Provider/useUsher.d.ts.map +0 -1
  214. package/dist/cjs/Provider/useUsher.js +0 -31
  215. package/dist/cjs/Provider/useUsher.js.map +0 -1
  216. package/dist/cjs/Reporting/AccessChoice.d.ts +0 -13
  217. package/dist/cjs/Reporting/AccessChoice.d.ts.map +0 -1
  218. package/dist/cjs/Reporting/AccessChoice.js +0 -113
  219. package/dist/cjs/Reporting/AccessChoice.js.map +0 -1
  220. package/dist/cjs/Reporting/AccessFields.d.ts +0 -12
  221. package/dist/cjs/Reporting/AccessFields.d.ts.map +0 -1
  222. package/dist/cjs/Reporting/AccessFields.js +0 -79
  223. package/dist/cjs/Reporting/AccessFields.js.map +0 -1
  224. package/dist/cjs/Reporting/AccessNotice.d.ts +0 -7
  225. package/dist/cjs/Reporting/AccessNotice.d.ts.map +0 -1
  226. package/dist/cjs/Reporting/AccessNotice.js +0 -28
  227. package/dist/cjs/Reporting/AccessNotice.js.map +0 -1
  228. package/dist/cjs/Reporting/ReportErrorDialog.d.ts +0 -9
  229. package/dist/cjs/Reporting/ReportErrorDialog.d.ts.map +0 -1
  230. package/dist/cjs/Reporting/ReportErrorDialog.js +0 -87
  231. package/dist/cjs/Reporting/ReportErrorDialog.js.map +0 -1
  232. package/dist/cjs/Reporting/ReportIssueDialog.d.ts +0 -8
  233. package/dist/cjs/Reporting/ReportIssueDialog.d.ts.map +0 -1
  234. package/dist/cjs/Reporting/ReportIssueDialog.js +0 -81
  235. package/dist/cjs/Reporting/ReportIssueDialog.js.map +0 -1
  236. package/dist/cjs/Reporting/ReportLimits.d.ts +0 -8
  237. package/dist/cjs/Reporting/ReportLimits.d.ts.map +0 -1
  238. package/dist/cjs/Reporting/ReportLimits.js +0 -19
  239. package/dist/cjs/Reporting/ReportLimits.js.map +0 -1
  240. package/dist/cjs/Reporting/ReportSent.d.ts +0 -5
  241. package/dist/cjs/Reporting/ReportSent.d.ts.map +0 -1
  242. package/dist/cjs/Reporting/SentWithReport.d.ts +0 -7
  243. package/dist/cjs/Reporting/SentWithReport.d.ts.map +0 -1
  244. package/dist/cjs/Reporting/SentWithReport.js +0 -40
  245. package/dist/cjs/Reporting/SentWithReport.js.map +0 -1
  246. package/dist/cjs/Reporting/TechnicalDetails.d.ts +0 -9
  247. package/dist/cjs/Reporting/TechnicalDetails.d.ts.map +0 -1
  248. package/dist/cjs/Reporting/TechnicalDetails.js +0 -75
  249. package/dist/cjs/Reporting/TechnicalDetails.js.map +0 -1
  250. package/dist/cjs/Reporting/durationOptions.d.ts +0 -9
  251. package/dist/cjs/Reporting/durationOptions.d.ts.map +0 -1
  252. package/dist/cjs/Reporting/durationOptions.js +0 -29
  253. package/dist/cjs/Reporting/durationOptions.js.map +0 -1
  254. package/dist/cjs/Reporting/formatLocation.d.ts +0 -7
  255. package/dist/cjs/Reporting/formatLocation.d.ts.map +0 -1
  256. package/dist/cjs/Reporting/formatLocation.js +0 -23
  257. package/dist/cjs/Reporting/formatLocation.js.map +0 -1
  258. package/dist/cjs/Reporting/index.d.ts +0 -14
  259. package/dist/cjs/Reporting/index.d.ts.map +0 -1
  260. package/dist/cjs/Reporting/reportValues.d.ts +0 -22
  261. package/dist/cjs/Reporting/reportValues.d.ts.map +0 -1
  262. package/dist/cjs/Reporting/reportValues.js +0 -124
  263. package/dist/cjs/Reporting/reportValues.js.map +0 -1
  264. package/dist/cjs/Reporting/useAccessChoice.d.ts +0 -13
  265. package/dist/cjs/Reporting/useAccessChoice.d.ts.map +0 -1
  266. package/dist/cjs/Reporting/useAccessChoice.js +0 -41
  267. package/dist/cjs/Reporting/useAccessChoice.js.map +0 -1
  268. package/dist/cjs/index.d.ts +0 -8
  269. package/dist/cjs/index.d.ts.map +0 -1
  270. package/dist/cjs/index.js +0 -133
  271. package/dist/cjs/index.js.map +0 -1
  272. package/dist/cjs/package.json +0 -3
  273. package/dist/esm/Buttons/MyIssuesButton.d.ts +0 -14
  274. package/dist/esm/Buttons/MyIssuesButton.d.ts.map +0 -1
  275. package/dist/esm/Buttons/MyIssuesButton.js +0 -73
  276. package/dist/esm/Buttons/MyIssuesButton.js.map +0 -1
  277. package/dist/esm/Buttons/ReportButton.d.ts +0 -8
  278. package/dist/esm/Buttons/ReportButton.d.ts.map +0 -1
  279. package/dist/esm/Buttons/ReportButton.js +0 -32
  280. package/dist/esm/Buttons/ReportButton.js.map +0 -1
  281. package/dist/esm/Buttons/buttonModels.d.ts +0 -10
  282. package/dist/esm/Buttons/buttonModels.d.ts.map +0 -1
  283. package/dist/esm/Buttons/buttonModels.js +0 -41
  284. package/dist/esm/Buttons/buttonModels.js.map +0 -1
  285. package/dist/esm/Buttons/index.d.ts +0 -4
  286. package/dist/esm/Buttons/index.d.ts.map +0 -1
  287. package/dist/esm/Buttons/index.js +0 -4
  288. package/dist/esm/Buttons/index.js.map +0 -1
  289. package/dist/esm/Correlation/CorrelationTracker.d.ts +0 -10
  290. package/dist/esm/Correlation/CorrelationTracker.d.ts.map +0 -1
  291. package/dist/esm/Correlation/CorrelationTracker.js +0 -48
  292. package/dist/esm/Correlation/CorrelationTracker.js.map +0 -1
  293. package/dist/esm/Correlation/index.d.ts +0 -3
  294. package/dist/esm/Correlation/index.d.ts.map +0 -1
  295. package/dist/esm/Correlation/index.js +0 -3
  296. package/dist/esm/Correlation/index.js.map +0 -1
  297. package/dist/esm/Correlation/withCorrelationIdHeader.d.ts +0 -6
  298. package/dist/esm/Correlation/withCorrelationIdHeader.d.ts.map +0 -1
  299. package/dist/esm/Correlation/withCorrelationIdHeader.js +0 -36
  300. package/dist/esm/Correlation/withCorrelationIdHeader.js.map +0 -1
  301. package/dist/esm/Icons.d.ts +0 -4
  302. package/dist/esm/Icons.d.ts.map +0 -1
  303. package/dist/esm/Icons.js +0 -49
  304. package/dist/esm/Icons.js.map +0 -1
  305. package/dist/esm/Issues/IssueView/AccessPanel.d.ts +0 -6
  306. package/dist/esm/Issues/IssueView/AccessPanel.d.ts.map +0 -1
  307. package/dist/esm/Issues/IssueView/AccessPanel.js +0 -122
  308. package/dist/esm/Issues/IssueView/AccessPanel.js.map +0 -1
  309. package/dist/esm/Issues/IssueView/GrantAccessDialog.d.ts +0 -6
  310. package/dist/esm/Issues/IssueView/GrantAccessDialog.d.ts.map +0 -1
  311. package/dist/esm/Issues/IssueView/GrantAccessDialog.js +0 -54
  312. package/dist/esm/Issues/IssueView/GrantAccessDialog.js.map +0 -1
  313. package/dist/esm/Issues/IssueView/IdentityPanel.d.ts +0 -6
  314. package/dist/esm/Issues/IssueView/IdentityPanel.d.ts.map +0 -1
  315. package/dist/esm/Issues/IssueView/IdentityPanel.js +0 -43
  316. package/dist/esm/Issues/IssueView/IdentityPanel.js.map +0 -1
  317. package/dist/esm/Issues/IssueView/IssueActions.d.ts +0 -6
  318. package/dist/esm/Issues/IssueView/IssueActions.d.ts.map +0 -1
  319. package/dist/esm/Issues/IssueView/IssueActions.js +0 -56
  320. package/dist/esm/Issues/IssueView/IssueActions.js.map +0 -1
  321. package/dist/esm/Issues/IssueView/IssueConversationPanel.d.ts +0 -6
  322. package/dist/esm/Issues/IssueView/IssueConversationPanel.d.ts.map +0 -1
  323. package/dist/esm/Issues/IssueView/IssueConversationPanel.js +0 -95
  324. package/dist/esm/Issues/IssueView/IssueConversationPanel.js.map +0 -1
  325. package/dist/esm/Issues/IssueView/IssueHeader.d.ts +0 -7
  326. package/dist/esm/Issues/IssueView/IssueHeader.d.ts.map +0 -1
  327. package/dist/esm/Issues/IssueView/IssueHeader.js +0 -92
  328. package/dist/esm/Issues/IssueView/IssueHeader.js.map +0 -1
  329. package/dist/esm/Issues/IssueView/IssueView.d.ts +0 -7
  330. package/dist/esm/Issues/IssueView/IssueView.d.ts.map +0 -1
  331. package/dist/esm/Issues/IssueView/IssueView.js +0 -83
  332. package/dist/esm/Issues/IssueView/IssueView.js.map +0 -1
  333. package/dist/esm/Issues/IssueView/QuestionBanner.d.ts +0 -5
  334. package/dist/esm/Issues/IssueView/QuestionBanner.d.ts.map +0 -1
  335. package/dist/esm/Issues/IssueView/QuestionBanner.js +0 -22
  336. package/dist/esm/Issues/IssueView/QuestionBanner.js.map +0 -1
  337. package/dist/esm/Issues/IssueView/ReopenIssueDialog.d.ts +0 -6
  338. package/dist/esm/Issues/IssueView/ReopenIssueDialog.d.ts.map +0 -1
  339. package/dist/esm/Issues/IssueView/ReopenIssueDialog.js +0 -32
  340. package/dist/esm/Issues/IssueView/ReopenIssueDialog.js.map +0 -1
  341. package/dist/esm/Issues/IssueView/ShareIdentityDialog.d.ts +0 -6
  342. package/dist/esm/Issues/IssueView/ShareIdentityDialog.d.ts.map +0 -1
  343. package/dist/esm/Issues/IssueView/ShareIdentityDialog.js +0 -30
  344. package/dist/esm/Issues/IssueView/ShareIdentityDialog.js.map +0 -1
  345. package/dist/esm/Issues/IssueView/StatusStrip.d.ts +0 -6
  346. package/dist/esm/Issues/IssueView/StatusStrip.d.ts.map +0 -1
  347. package/dist/esm/Issues/IssueView/StatusStrip.js +0 -29
  348. package/dist/esm/Issues/IssueView/StatusStrip.js.map +0 -1
  349. package/dist/esm/Issues/IssueView/SupportSessions.d.ts +0 -7
  350. package/dist/esm/Issues/IssueView/SupportSessions.d.ts.map +0 -1
  351. package/dist/esm/Issues/IssueView/SupportSessions.js +0 -60
  352. package/dist/esm/Issues/IssueView/SupportSessions.js.map +0 -1
  353. package/dist/esm/Issues/IssueView/index.d.ts +0 -13
  354. package/dist/esm/Issues/IssueView/index.d.ts.map +0 -1
  355. package/dist/esm/Issues/IssueView/index.js +0 -13
  356. package/dist/esm/Issues/IssueView/index.js.map +0 -1
  357. package/dist/esm/Issues/MyIssues/IssueList.d.ts +0 -7
  358. package/dist/esm/Issues/MyIssues/IssueList.d.ts.map +0 -1
  359. package/dist/esm/Issues/MyIssues/IssueList.js +0 -90
  360. package/dist/esm/Issues/MyIssues/IssueList.js.map +0 -1
  361. package/dist/esm/Issues/MyIssues/MyIssuesDialog.d.ts +0 -7
  362. package/dist/esm/Issues/MyIssues/MyIssuesDialog.d.ts.map +0 -1
  363. package/dist/esm/Issues/MyIssues/MyIssuesDialog.js +0 -77
  364. package/dist/esm/Issues/MyIssues/MyIssuesDialog.js.map +0 -1
  365. package/dist/esm/Issues/MyIssues/MyIssuesNavigation.d.ts +0 -21
  366. package/dist/esm/Issues/MyIssues/MyIssuesNavigation.d.ts.map +0 -1
  367. package/dist/esm/Issues/MyIssues/MyIssuesNavigation.js +0 -49
  368. package/dist/esm/Issues/MyIssues/MyIssuesNavigation.js.map +0 -1
  369. package/dist/esm/Issues/MyIssues/index.d.ts +0 -4
  370. package/dist/esm/Issues/MyIssues/index.d.ts.map +0 -1
  371. package/dist/esm/Issues/MyIssues/index.js +0 -4
  372. package/dist/esm/Issues/MyIssues/index.js.map +0 -1
  373. package/dist/esm/Issues/MyIssuesList.d.ts +0 -7
  374. package/dist/esm/Issues/MyIssuesList.d.ts.map +0 -1
  375. package/dist/esm/Issues/MyIssuesList.js +0 -29
  376. package/dist/esm/Issues/MyIssuesList.js.map +0 -1
  377. package/dist/esm/Issues/accessStatus.d.ts +0 -13
  378. package/dist/esm/Issues/accessStatus.d.ts.map +0 -1
  379. package/dist/esm/Issues/accessStatus.js +0 -54
  380. package/dist/esm/Issues/accessStatus.js.map +0 -1
  381. package/dist/esm/Issues/conversationMessages.d.ts +0 -14
  382. package/dist/esm/Issues/conversationMessages.d.ts.map +0 -1
  383. package/dist/esm/Issues/conversationMessages.js +0 -125
  384. package/dist/esm/Issues/conversationMessages.js.map +0 -1
  385. package/dist/esm/Issues/index.d.ts +0 -10
  386. package/dist/esm/Issues/index.d.ts.map +0 -1
  387. package/dist/esm/Issues/index.js +0 -10
  388. package/dist/esm/Issues/index.js.map +0 -1
  389. package/dist/esm/Issues/issueStates.d.ts +0 -12
  390. package/dist/esm/Issues/issueStates.d.ts.map +0 -1
  391. package/dist/esm/Issues/issueStates.js +0 -81
  392. package/dist/esm/Issues/issueStates.js.map +0 -1
  393. package/dist/esm/Issues/sessionActivity.d.ts +0 -8
  394. package/dist/esm/Issues/sessionActivity.d.ts.map +0 -1
  395. package/dist/esm/Issues/sessionActivity.js +0 -37
  396. package/dist/esm/Issues/sessionActivity.js.map +0 -1
  397. package/dist/esm/Issues/useAccessStatus.d.ts +0 -4
  398. package/dist/esm/Issues/useAccessStatus.d.ts.map +0 -1
  399. package/dist/esm/Issues/useAccessStatus.js +0 -28
  400. package/dist/esm/Issues/useAccessStatus.js.map +0 -1
  401. package/dist/esm/Issues/webAddress.d.ts +0 -2
  402. package/dist/esm/Issues/webAddress.d.ts.map +0 -1
  403. package/dist/esm/Issues/webAddress.js +0 -22
  404. package/dist/esm/Issues/webAddress.js.map +0 -1
  405. package/dist/esm/Labels/UsherLabels.d.ts +0 -177
  406. package/dist/esm/Labels/UsherLabels.d.ts.map +0 -1
  407. package/dist/esm/Labels/UsherLabels.js +0 -2
  408. package/dist/esm/Labels/UsherLabels.js.map +0 -1
  409. package/dist/esm/Labels/defaultUsherLabels.d.ts +0 -3
  410. package/dist/esm/Labels/defaultUsherLabels.d.ts.map +0 -1
  411. package/dist/esm/Labels/defaultUsherLabels.js +0 -177
  412. package/dist/esm/Labels/defaultUsherLabels.js.map +0 -1
  413. package/dist/esm/Labels/format.d.ts +0 -2
  414. package/dist/esm/Labels/format.d.ts.map +0 -1
  415. package/dist/esm/Labels/format.js +0 -13
  416. package/dist/esm/Labels/format.js.map +0 -1
  417. package/dist/esm/Labels/index.d.ts +0 -5
  418. package/dist/esm/Labels/index.d.ts.map +0 -1
  419. package/dist/esm/Labels/index.js +0 -5
  420. package/dist/esm/Labels/index.js.map +0 -1
  421. package/dist/esm/Labels/resolveLabels.d.ts +0 -3
  422. package/dist/esm/Labels/resolveLabels.d.ts.map +0 -1
  423. package/dist/esm/Labels/resolveLabels.js +0 -33
  424. package/dist/esm/Labels/resolveLabels.js.map +0 -1
  425. package/dist/esm/Provider/UsherBoundary.d.ts +0 -6
  426. package/dist/esm/Provider/UsherBoundary.d.ts.map +0 -1
  427. package/dist/esm/Provider/UsherBoundary.js +0 -22
  428. package/dist/esm/Provider/UsherBoundary.js.map +0 -1
  429. package/dist/esm/Provider/UsherContext.d.ts +0 -24
  430. package/dist/esm/Provider/UsherContext.d.ts.map +0 -1
  431. package/dist/esm/Provider/UsherContext.js +0 -36
  432. package/dist/esm/Provider/UsherContext.js.map +0 -1
  433. package/dist/esm/Provider/UsherProvider.d.ts +0 -14
  434. package/dist/esm/Provider/UsherProvider.d.ts.map +0 -1
  435. package/dist/esm/Provider/UsherProvider.js +0 -120
  436. package/dist/esm/Provider/UsherProvider.js.map +0 -1
  437. package/dist/esm/Provider/index.d.ts +0 -5
  438. package/dist/esm/Provider/index.d.ts.map +0 -1
  439. package/dist/esm/Provider/index.js +0 -5
  440. package/dist/esm/Provider/index.js.map +0 -1
  441. package/dist/esm/Provider/useUsher.d.ts +0 -13
  442. package/dist/esm/Provider/useUsher.d.ts.map +0 -1
  443. package/dist/esm/Provider/useUsher.js +0 -29
  444. package/dist/esm/Provider/useUsher.js.map +0 -1
  445. package/dist/esm/Reporting/AccessChoice.d.ts +0 -13
  446. package/dist/esm/Reporting/AccessChoice.d.ts.map +0 -1
  447. package/dist/esm/Reporting/AccessChoice.js +0 -106
  448. package/dist/esm/Reporting/AccessChoice.js.map +0 -1
  449. package/dist/esm/Reporting/AccessFields.d.ts +0 -12
  450. package/dist/esm/Reporting/AccessFields.d.ts.map +0 -1
  451. package/dist/esm/Reporting/AccessFields.js +0 -77
  452. package/dist/esm/Reporting/AccessFields.js.map +0 -1
  453. package/dist/esm/Reporting/AccessNotice.d.ts +0 -7
  454. package/dist/esm/Reporting/AccessNotice.d.ts.map +0 -1
  455. package/dist/esm/Reporting/AccessNotice.js +0 -26
  456. package/dist/esm/Reporting/AccessNotice.js.map +0 -1
  457. package/dist/esm/Reporting/ReportErrorDialog.d.ts +0 -9
  458. package/dist/esm/Reporting/ReportErrorDialog.d.ts.map +0 -1
  459. package/dist/esm/Reporting/ReportErrorDialog.js +0 -85
  460. package/dist/esm/Reporting/ReportErrorDialog.js.map +0 -1
  461. package/dist/esm/Reporting/ReportIssueDialog.d.ts +0 -8
  462. package/dist/esm/Reporting/ReportIssueDialog.d.ts.map +0 -1
  463. package/dist/esm/Reporting/ReportIssueDialog.js +0 -79
  464. package/dist/esm/Reporting/ReportIssueDialog.js.map +0 -1
  465. package/dist/esm/Reporting/ReportLimits.d.ts +0 -8
  466. package/dist/esm/Reporting/ReportLimits.d.ts.map +0 -1
  467. package/dist/esm/Reporting/ReportLimits.js +0 -17
  468. package/dist/esm/Reporting/ReportLimits.js.map +0 -1
  469. package/dist/esm/Reporting/ReportSent.d.ts +0 -5
  470. package/dist/esm/Reporting/ReportSent.d.ts.map +0 -1
  471. package/dist/esm/Reporting/ReportSent.js +0 -2
  472. package/dist/esm/Reporting/ReportSent.js.map +0 -1
  473. package/dist/esm/Reporting/SentWithReport.d.ts +0 -7
  474. package/dist/esm/Reporting/SentWithReport.d.ts.map +0 -1
  475. package/dist/esm/Reporting/SentWithReport.js +0 -38
  476. package/dist/esm/Reporting/SentWithReport.js.map +0 -1
  477. package/dist/esm/Reporting/TechnicalDetails.d.ts +0 -9
  478. package/dist/esm/Reporting/TechnicalDetails.d.ts.map +0 -1
  479. package/dist/esm/Reporting/TechnicalDetails.js +0 -73
  480. package/dist/esm/Reporting/TechnicalDetails.js.map +0 -1
  481. package/dist/esm/Reporting/durationOptions.d.ts +0 -9
  482. package/dist/esm/Reporting/durationOptions.d.ts.map +0 -1
  483. package/dist/esm/Reporting/durationOptions.js +0 -27
  484. package/dist/esm/Reporting/durationOptions.js.map +0 -1
  485. package/dist/esm/Reporting/formatLocation.d.ts +0 -7
  486. package/dist/esm/Reporting/formatLocation.d.ts.map +0 -1
  487. package/dist/esm/Reporting/formatLocation.js +0 -21
  488. package/dist/esm/Reporting/formatLocation.js.map +0 -1
  489. package/dist/esm/Reporting/index.d.ts +0 -14
  490. package/dist/esm/Reporting/index.d.ts.map +0 -1
  491. package/dist/esm/Reporting/index.js +0 -14
  492. package/dist/esm/Reporting/index.js.map +0 -1
  493. package/dist/esm/Reporting/reportValues.d.ts +0 -22
  494. package/dist/esm/Reporting/reportValues.d.ts.map +0 -1
  495. package/dist/esm/Reporting/reportValues.js +0 -116
  496. package/dist/esm/Reporting/reportValues.js.map +0 -1
  497. package/dist/esm/Reporting/useAccessChoice.d.ts +0 -13
  498. package/dist/esm/Reporting/useAccessChoice.d.ts.map +0 -1
  499. package/dist/esm/Reporting/useAccessChoice.js +0 -39
  500. package/dist/esm/Reporting/useAccessChoice.js.map +0 -1
  501. package/dist/esm/index.d.ts +0 -8
  502. package/dist/esm/index.d.ts.map +0 -1
  503. package/dist/esm/index.js +0 -48
  504. package/dist/esm/index.js.map +0 -1
  505. package/dist/esm/package.json +0 -3
  506. package/index.ts +0 -10
  507. package/styles.css +0 -320
@@ -1,80 +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 { DialogResult, useDialogContext } from '@cratis/arc.react/dialogs';
5
- import { useSliceContext } from '@cratis/arc.react/slices';
6
- import { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';
7
- import { CommandDialog } from '@cratis/components/CommandDialog';
8
- import { InputTextField, TextAreaField } from '@cratis/components/CommandForm';
9
- import { DialogInitialFocus } from '@cratis/components/Dialogs';
10
- import { Guid } from '@cratis/fundamentals';
11
- import { ReportIssue } from '@cratis/showrunner.usher';
12
- import { useState } from 'react';
13
- import { UsherBoundary } from '../Provider/UsherBoundary.js';
14
- import { useUsherContext } from '../Provider/UsherContext.js';
15
- import { AccessFields } from './AccessFields.js';
16
- import { ReportSent } from './ReportSent.js';
17
- import { reportIssueValues } from './reportValues.js';
18
- import { SentWithReport } from './SentWithReport.js';
19
- import { useAccessChoice } from './useAccessChoice.js';
20
-
21
- /**
22
- * Props for {@link ReportIssueDialog}.
23
- */
24
- export interface ReportIssueDialogProps {
25
- /** Where in the application the reporter is; the slice context the dialog is rendered in when not given. */
26
- location?: ArcSliceLocation;
27
-
28
- /** The correlation ids to send; the recent ones {@link UsherProvider} tracked when not given. */
29
- correlationIds?: Guid[];
30
- }
31
-
32
- /**
33
- * The report a problem dialog: the reporter describes a problem by hand, and chooses whether support may know who
34
- * they are and sign in as them. Open it with `useDialog`; it closes with {@link ReportSent} once the report is sent.
35
- */
36
- export const ReportIssueDialog = ({ location, correlationIds }: ReportIssueDialogProps) => {
37
- const usher = useUsherContext();
38
- const sliceLocation = useSliceContext();
39
- const [values] = useState(() => reportIssueValues({
40
- issueId: Guid.create(),
41
- location: location ?? sliceLocation,
42
- correlationIds: correlationIds ?? usher.recentCorrelationIds(),
43
- applicationVersion: usher.applicationVersion,
44
- shareIdentity: usher.shareIdentityByDefault
45
- }));
46
-
47
- return (
48
- <UsherBoundary>
49
- <ReportIssueForm values={values} />
50
- </UsherBoundary>
51
- );
52
- };
53
-
54
- const ReportIssueForm = ({ values }: { values: ReturnType<typeof reportIssueValues> }) => {
55
- const { labels, shareIdentityByDefault } = useUsherContext();
56
- const { closeDialog } = useDialogContext<ReportIssueDialogProps, ReportSent>();
57
- const access = useAccessChoice(shareIdentityByDefault);
58
-
59
- return (
60
- <CommandDialog<ReportIssue>
61
- command={ReportIssue}
62
- title={labels.reportIssue.title}
63
- okLabel={labels.reportIssue.send}
64
- cancelLabel={labels.common.cancel}
65
- closeAriaLabel={labels.common.close}
66
- width='560px'
67
- initialFocus={DialogInitialFocus.Content}
68
- initialValues={access.initialValues(values)}
69
- currentValues={access.currentValues}
70
- onFieldChange={access.onFieldChange}
71
- onSuccess={() => closeDialog(DialogResult.Ok, { issueId: values.issueId! })}>
72
- <div className='usher-report-form'>
73
- <SentWithReport location={values.location!} correlationIdCount={values.correlationIds!.length} />
74
- <InputTextField<ReportIssue> value={command => command.summary} title={labels.reportIssue.summary} />
75
- <TextAreaField<ReportIssue> value={command => command.description} title={labels.reportIssue.description} rows={5} />
76
- <AccessFields<ReportIssue> choice={access.choice} />
77
- </div>
78
- </CommandDialog>
79
- );
80
- };
@@ -1,24 +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 most the backend accepts in one report, as `ReportLimits` in the Usher backend states it. What the application
6
- * itself gathers - stack frames, correlation ids and the error's own texts - is cut to these before a report is sent,
7
- * so a long stack trace never makes a report fail; what the reporter writes is checked by the generated validators.
8
- */
9
- export enum ReportLimits {
10
- /** The longest error message a report carries. */
11
- errorMessageLength = 2000,
12
-
13
- /** The longest error type a report carries. */
14
- errorTypeLength = 500,
15
-
16
- /** The most stack frames a report carries. */
17
- stackFrames = 50,
18
-
19
- /** The longest method or file of a stack frame. */
20
- stackFrameTextLength = 1000,
21
-
22
- /** The most correlation ids a report carries. */
23
- correlationIds = 20
24
- }
@@ -1,12 +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
- * What a report dialog closes with once the report is sent.
8
- */
9
- export interface ReportSent {
10
- /** The issue the report opened. */
11
- readonly issueId: Guid;
12
- }
@@ -1,37 +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 } from '../Labels/index.js';
5
- import { useUsherContext } from '../Provider/UsherContext.js';
6
- import { formatLocation, LocationParts } from './formatLocation.js';
7
-
8
- /**
9
- * Props for {@link SentWithReport}.
10
- */
11
- export interface SentWithReportProps {
12
- /** Where in the application the reporter was. */
13
- location: LocationParts;
14
-
15
- /** How many recent requests the report carries. */
16
- correlationIdCount: number;
17
- }
18
-
19
- /**
20
- * Shows the reporter what is sent along with their report: where they were, the application version and how many
21
- * recent requests.
22
- */
23
- export const SentWithReport = ({ location, correlationIdCount }: SentWithReportProps) => {
24
- const { labels, applicationName, applicationVersion } = useUsherContext();
25
- const parts = [
26
- formatLocation(location, labels.common.locationSeparator, labels.common.unknownLocation),
27
- [applicationName, applicationVersion].filter(part => part.length > 0).join(' '),
28
- correlationIdCount === 1 ? labels.common.oneRecentRequest : format(labels.common.recentRequests, { count: correlationIdCount })
29
- ].filter(part => part.length > 0);
30
-
31
- return (
32
- <section className='usher-sent-with-report' aria-label={labels.common.sentWithYourReport}>
33
- <span className='usher-sent-with-report__heading'>{labels.common.sentWithYourReport}</span>
34
- <span className='usher-sent-with-report__parts'>{parts.join(' · ')}</span>
35
- </section>
36
- );
37
- };
@@ -1,60 +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
- import { StackFrame } from '@cratis/showrunner.usher';
6
- import { format } from '../Labels/index.js';
7
- import { useUsherLabels } from '../Provider/UsherContext.js';
8
-
9
- /**
10
- * Props for {@link TechnicalDetails}.
11
- */
12
- export interface TechnicalDetailsProps {
13
- /** The type of the error; empty when not known. */
14
- errorType: string;
15
-
16
- /** The correlation ids sent with the report. */
17
- correlationIds: Guid[];
18
-
19
- /** The stack frames of the error, top frame first. */
20
- stackFrames: StackFrame[];
21
- }
22
-
23
- /**
24
- * The technical details of an error, collapsed until the reporter opens them.
25
- */
26
- export const TechnicalDetails = ({ errorType, correlationIds, stackFrames }: TechnicalDetailsProps) => {
27
- const labels = useUsherLabels();
28
-
29
- return (
30
- <details className='usher-technical-details'>
31
- <summary className='usher-technical-details__summary'>{labels.reportError.technicalDetails}</summary>
32
- <dl className='usher-technical-details__list'>
33
- {errorType.length > 0 && (
34
- <>
35
- <dt>{labels.reportError.errorType}</dt>
36
- <dd><code>{errorType}</code></dd>
37
- </>
38
- )}
39
- {correlationIds.length > 0 && (
40
- <>
41
- <dt>{labels.reportError.correlationId}</dt>
42
- <dd><code>{correlationIds[0].toString()}</code></dd>
43
- </>
44
- )}
45
- {stackFrames.length > 0 && (
46
- <>
47
- <dt>{labels.reportError.stackFrames}</dt>
48
- <dd>
49
- <ol className='usher-technical-details__frames'>
50
- {stackFrames.map((frame, index) => (
51
- <li key={index}><code>{format(labels.reportError.stackFrame, { method: frame.method, file: frame.file, line: frame.line })}</code></li>
52
- ))}
53
- </ol>
54
- </dd>
55
- </>
56
- )}
57
- </dl>
58
- </details>
59
- );
60
- };
@@ -1,31 +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 { AccessDuration } from '@cratis/showrunner.usher';
5
- import { UsherLabels } from '../Labels/index.js';
6
-
7
- /**
8
- * One choice of how long support may sign in as the reporter.
9
- */
10
- export interface DurationOption {
11
- [key: string]: unknown;
12
-
13
- /** The {@link AccessDuration}. */
14
- value: AccessDuration;
15
-
16
- /** What the reporter sees. */
17
- label: string;
18
- }
19
-
20
- /**
21
- * Gets the choices of how long support may sign in as the reporter.
22
- * @param labels The labels to show.
23
- * @returns The {@link DurationOption} for every {@link AccessDuration}, shortest first.
24
- */
25
- export function durationOptions(labels: UsherLabels): DurationOption[] {
26
- return [
27
- { value: AccessDuration.oneHour, label: labels.access.oneHour },
28
- { value: AccessDuration.oneDay, label: labels.access.oneDay },
29
- { value: AccessDuration.sevenDays, label: labels.access.sevenDays }
30
- ];
31
- }
@@ -1,27 +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 parts of where in the application something happened.
6
- */
7
- export interface LocationParts {
8
- /** The module. */
9
- readonly module: string;
10
- /** The feature within the module. */
11
- readonly feature: string;
12
- /** The slice within the feature. */
13
- readonly slice: string;
14
- }
15
-
16
- /**
17
- * Formats where in the application something happened for people, such as `Billing › Invoices › Pay`.
18
- * @param location The location; parts that are empty are left out.
19
- * @param separator What separates the parts.
20
- * @param unknown What to show when no part is known.
21
- * @returns The formatted location.
22
- */
23
- export function formatLocation(location: LocationParts | undefined, separator: string, unknown: string): string {
24
- const parts = [location?.module, location?.feature, location?.slice]
25
- .filter((part): part is string => typeof part === 'string' && part.length > 0);
26
- return parts.length > 0 ? parts.join(separator) : unknown;
27
- }
@@ -1,16 +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
- export * from './AccessChoice.js';
5
- export * from './AccessFields.js';
6
- export * from './AccessNotice.js';
7
- export * from './durationOptions.js';
8
- export * from './formatLocation.js';
9
- export * from './ReportErrorDialog.js';
10
- export * from './ReportIssueDialog.js';
11
- export * from './ReportLimits.js';
12
- export * from './ReportSent.js';
13
- export * from './reportValues.js';
14
- export * from './SentWithReport.js';
15
- export * from './TechnicalDetails.js';
16
- export * from './useAccessChoice.js';
@@ -1,150 +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 { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';
5
- import { Guid } from '@cratis/fundamentals';
6
- import { AccessDuration, ErrorDetails, errorDetailsFromError, IReportError, IReportIssue, SliceLocation, StackFrame } from '@cratis/showrunner.usher';
7
- import { ReportLimits } from './ReportLimits.js';
8
-
9
- /**
10
- * What every report carries besides what the reporter writes.
11
- */
12
- export interface ReportContext {
13
- /** The id of the new issue. */
14
- readonly issueId: Guid;
15
-
16
- /** Where in the application the reporter was. */
17
- readonly location: ArcSliceLocation;
18
-
19
- /** The correlation ids of the commands and queries run just before the report. */
20
- readonly correlationIds: Guid[];
21
-
22
- /** The version of the application. */
23
- readonly applicationVersion: string;
24
-
25
- /** Whether to let support know who the reporter is unless they choose otherwise. */
26
- readonly shareIdentity: boolean;
27
- }
28
-
29
- /**
30
- * Converts where something happened to the location a report carries.
31
- * @param location The {@link ArcSliceLocation}, as `useSliceContext()` or a generated proxy gives it.
32
- * @returns The {@link SliceLocation} of the report.
33
- */
34
- export function toReportLocation(location: ArcSliceLocation): SliceLocation {
35
- const reportLocation = new SliceLocation();
36
- reportLocation.module = location.module;
37
- reportLocation.feature = location.feature;
38
- reportLocation.slice = location.slice;
39
- return reportLocation;
40
- }
41
-
42
- /**
43
- * Gets the initial values of the report a problem command.
44
- * @param context The {@link ReportContext}.
45
- * @returns The values.
46
- */
47
- export function reportIssueValues(context: ReportContext): IReportIssue {
48
- return {
49
- issueId: context.issueId,
50
- summary: '',
51
- description: '',
52
- location: toReportLocation(context.location),
53
- correlationIds: context.correlationIds.slice(-ReportLimits.correlationIds),
54
- applicationVersion: context.applicationVersion,
55
- shareIdentity: context.shareIdentity,
56
- grantAccess: false,
57
- accessDuration: AccessDuration.oneDay
58
- };
59
- }
60
-
61
- /**
62
- * Gets the initial values of the report this error command. The error's own location and correlation ids win over
63
- * those of the context, as they say where the error happened.
64
- * @param error The {@link ErrorDetails}.
65
- * @param context The {@link ReportContext}.
66
- * @returns The values.
67
- */
68
- export function reportErrorValues(error: ErrorDetails, context: ReportContext): IReportError {
69
- return {
70
- issueId: context.issueId,
71
- errorMessage: error.message.slice(0, ReportLimits.errorMessageLength),
72
- errorType: error.type.slice(0, ReportLimits.errorTypeLength),
73
- stackFrames: error.stackFrames.slice(0, ReportLimits.stackFrames).map(withinLimits),
74
- details: '',
75
- location: toReportLocation(isEmptyLocation(error.location) ? context.location : error.location),
76
- correlationIds: mergeCorrelationIds(error.correlationIds, context.correlationIds).slice(0, ReportLimits.correlationIds),
77
- applicationVersion: context.applicationVersion,
78
- shareIdentity: context.shareIdentity,
79
- grantAccess: false,
80
- accessDuration: AccessDuration.oneDay
81
- };
82
- }
83
-
84
- /**
85
- * Merges correlation ids, keeping each once, the first given first.
86
- * @param first The correlation ids that come first.
87
- * @param second The correlation ids that come after.
88
- * @returns The merged correlation ids.
89
- */
90
- export function mergeCorrelationIds(first: Guid[], second: Guid[]): Guid[] {
91
- const merged: Guid[] = [];
92
- for (const correlationId of [...first, ...second]) {
93
- if (!merged.some(existing => existing.equals(correlationId))) {
94
- merged.push(correlationId);
95
- }
96
- }
97
- return merged;
98
- }
99
-
100
- /**
101
- * Gets the {@link ErrorDetails} of an error to report: the details themselves when given, otherwise the details of
102
- * what was thrown.
103
- * @param error `ErrorDetails`, or anything thrown.
104
- * @param location Where it happened, when what was thrown does not say.
105
- * @returns The {@link ErrorDetails}.
106
- */
107
- export function toErrorDetails(error: unknown, location?: ArcSliceLocation): ErrorDetails {
108
- return isErrorDetails(error) ? error : errorDetailsFromError(error, location);
109
- }
110
-
111
- /**
112
- * Checks whether a value is {@link ErrorDetails}.
113
- * @param value The value.
114
- * @returns True when it is.
115
- */
116
- export function isErrorDetails(value: unknown): value is ErrorDetails {
117
- if (typeof value !== 'object' || value === null || value instanceof Error) {
118
- return false;
119
- }
120
-
121
- const candidate = value as Record<string, unknown>;
122
- return typeof candidate.message === 'string'
123
- && typeof candidate.type === 'string'
124
- && Array.isArray(candidate.correlationIds)
125
- && Array.isArray(candidate.stackFrames)
126
- && typeof candidate.location === 'object'
127
- && candidate.location !== null;
128
- }
129
-
130
- /**
131
- * Checks whether a location says nothing about where something happened.
132
- * @param location The location.
133
- * @returns True when no part of it is known.
134
- */
135
- export function isEmptyLocation(location: { module: string; feature: string; slice: string } | undefined): boolean {
136
- return !location || [location.module, location.feature, location.slice].every(part => !part);
137
- }
138
-
139
- /**
140
- * Cuts the texts of a stack frame to what a report carries.
141
- * @param frame The {@link StackFrame}.
142
- * @returns The frame within the limits.
143
- */
144
- function withinLimits(frame: StackFrame): StackFrame {
145
- return {
146
- ...frame,
147
- method: frame.method.slice(0, ReportLimits.stackFrameTextLength),
148
- file: frame.file.slice(0, ReportLimits.stackFrameTextLength)
149
- };
150
- }
@@ -1,53 +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 { useMemo, useReducer } from 'react';
5
- import { AccessChoice, changeAccessChoice, initialAccessChoice, sharesIdentity } from './AccessChoice.js';
6
-
7
- interface FieldChanged {
8
- readonly fieldName: string;
9
- readonly value: unknown;
10
- }
11
-
12
- const reduce = (choice: AccessChoice, change: FieldChanged) => changeAccessChoice(choice, change.fieldName, change.value);
13
-
14
- /**
15
- * What {@link useAccessChoice} gives a command form.
16
- */
17
- export interface AccessChoiceBinding {
18
- /** The reporter's {@link AccessChoice}. */
19
- readonly choice: AccessChoice;
20
-
21
- /** The handler for the form's `onFieldChange`. */
22
- readonly onFieldChange: (command: unknown, fieldName: string, oldValue: unknown, newValue: unknown) => void;
23
-
24
- /** The form's `currentValues`, which force sharing who the reporter is while access is granted. */
25
- readonly currentValues: { shareIdentity: boolean };
26
-
27
- /**
28
- * Gets the form's `initialValues` without `shareIdentity`: the form merges `initialValues` over `currentValues`, so
29
- * a `shareIdentity` there would win over the value the access choice forces.
30
- * @param values The initial values of the command.
31
- * @returns The values without `shareIdentity`.
32
- */
33
- readonly initialValues: <TValues extends { shareIdentity?: boolean }>(values: TValues) => Omit<TValues, 'shareIdentity'>;
34
- }
35
-
36
- const withoutShareIdentity = <TValues extends { shareIdentity?: boolean }>(values: TValues): Omit<TValues, 'shareIdentity'> => {
37
- const seed: Partial<TValues> = { ...values };
38
- delete seed.shareIdentity;
39
- return seed as Omit<TValues, 'shareIdentity'>;
40
- };
41
-
42
- /**
43
- * Follows the reporter's access choice in a command form with `shareIdentity`, `grantAccess` and `accessDuration`.
44
- * @param shareIdentityByDefault Whether to let support know who the reporter is unless they choose otherwise.
45
- * @returns The {@link AccessChoiceBinding}.
46
- */
47
- export function useAccessChoice(shareIdentityByDefault: boolean): AccessChoiceBinding {
48
- const [choice, dispatch] = useReducer(reduce, shareIdentityByDefault, initialAccessChoice);
49
- const shareIdentity = sharesIdentity(choice);
50
- const currentValues = useMemo(() => ({ shareIdentity }), [shareIdentity]);
51
- const onFieldChange = (_command: unknown, fieldName: string, _oldValue: unknown, newValue: unknown) => dispatch({ fieldName, value: newValue });
52
- return { choice, onFieldChange, currentValues, initialValues: withoutShareIdentity };
53
- }
@@ -1,14 +0,0 @@
1
- import { useUsher } from '../Provider/useUsher.js';
2
- import { UsherButtonSize } from './buttonModels.js';
3
- export interface MyIssuesButtonProps {
4
- size?: UsherButtonSize;
5
- className?: string;
6
- }
7
- export declare const MyIssuesButton: (props: MyIssuesButtonProps) => import("react").JSX.Element;
8
- export interface MyIssuesButtonViewProps extends MyIssuesButtonProps {
9
- waiting: number;
10
- labels: ReturnType<typeof useUsher>['labels'];
11
- onOpen: () => void;
12
- }
13
- export declare const MyIssuesButtonView: ({ size, className, waiting, labels, onOpen }: MyIssuesButtonViewProps) => import("react").JSX.Element;
14
- //# sourceMappingURL=MyIssuesButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MyIssuesButton.d.ts","sourceRoot":"","sources":["../../../Buttons/MyIssuesButton.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKzE,MAAM,WAAW,mBAAmB;IAEhC,IAAI,CAAC,EAAE,eAAe,CAAC;IAGvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,gCAQxD,CAAC;AAYF,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAEhE,OAAO,EAAE,MAAM,CAAC;IAGhB,MAAM,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;IAG9C,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAKD,eAAO,MAAM,kBAAkB,GAAI,8CAAwD,uBAAuB,gCAgBjH,CAAC"}
@@ -1,76 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var Common = require('@cratis/components/Common');
5
- var Display = require('@cratis/components/Display');
6
- var showrunner_usher = require('@cratis/showrunner.usher');
7
- var Icons = require('../Icons.js');
8
- var MyIssuesList = require('../Issues/MyIssuesList.js');
9
- var UsherBoundary = require('../Provider/UsherBoundary.js');
10
- var useUsher = require('../Provider/useUsher.js');
11
- var buttonModels = require('./buttonModels.js');
12
-
13
- /**
14
- * Opens the my issues side sheet. A badge counts the issues support waits for the user on, and the accessible name
15
- * says how many.
16
- */ const MyIssuesButton = (props)=>{
17
- const usher = useUsher.useUsher();
18
- return /*#__PURE__*/ jsxRuntime.jsx(UsherBoundary.UsherBoundary, {
19
- children: /*#__PURE__*/ jsxRuntime.jsx(MyIssuesButtonContent, {
20
- ...props,
21
- onOpen: usher.showMyIssues
22
- })
23
- });
24
- };
25
- const MyIssuesButtonContent = ({ size = 'large', className, onOpen })=>{
26
- const usher = useUsher.useUsher();
27
- const [result] = showrunner_usher.MyIssues.use();
28
- return /*#__PURE__*/ jsxRuntime.jsx(MyIssuesButtonView, {
29
- size: size,
30
- className: className,
31
- waiting: MyIssuesList.waitingCount(result.data ?? []),
32
- labels: usher.labels,
33
- onOpen: onOpen
34
- });
35
- };
36
- /**
37
- * Renders the my issues button for a given number of issues support waits for the user on.
38
- */ const MyIssuesButtonView = ({ size = 'large', className, waiting, labels, onOpen })=>{
39
- const model = buttonModels.myIssuesButtonModel(size, waiting, labels);
40
- const badge = waiting > 0 && /*#__PURE__*/ jsxRuntime.jsx("span", {
41
- className: "usher-my-issues-button__badge",
42
- "aria-hidden": "true",
43
- children: /*#__PURE__*/ jsxRuntime.jsx(Display.Badge, {
44
- value: waiting,
45
- severity: "warn",
46
- size: "small"
47
- })
48
- });
49
- return /*#__PURE__*/ jsxRuntime.jsxs("span", {
50
- className: [
51
- 'usher-my-issues-button',
52
- className
53
- ].filter(Boolean).join(' '),
54
- "data-size": size,
55
- children: [
56
- size === 'small' ? /*#__PURE__*/ jsxRuntime.jsx(Common.IconButton, {
57
- variant: "ghost",
58
- icon: /*#__PURE__*/ jsxRuntime.jsx(Icons.InboxIcon, {}),
59
- "aria-label": model.accessibleName,
60
- tooltip: model.tooltip,
61
- onClick: onOpen
62
- }) : /*#__PURE__*/ jsxRuntime.jsx(Common.Button, {
63
- variant: "outline",
64
- icon: /*#__PURE__*/ jsxRuntime.jsx(Icons.InboxIcon, {}),
65
- label: model.text,
66
- "aria-label": model.accessibleName,
67
- onClick: onOpen
68
- }),
69
- badge
70
- ]
71
- });
72
- };
73
-
74
- exports.MyIssuesButton = MyIssuesButton;
75
- exports.MyIssuesButtonView = MyIssuesButtonView;
76
- //# sourceMappingURL=MyIssuesButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MyIssuesButton.js","sources":["../../../Buttons/MyIssuesButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Button, IconButton } from '@cratis/components/Common';\nimport { Badge } from '@cratis/components/Display';\nimport { MyIssues } from '@cratis/showrunner.usher';\nimport { InboxIcon } from '../Icons.js';\nimport { waitingCount } from '../Issues/MyIssuesList.js';\nimport { UsherBoundary } from '../Provider/UsherBoundary.js';\nimport { useUsher } from '../Provider/useUsher.js';\nimport { myIssuesButtonModel, UsherButtonSize } from './buttonModels.js';\n\n/**\n * Props for {@link MyIssuesButton}.\n */\nexport interface MyIssuesButtonProps {\n /** `large` shows the icon and the text; `small` shows the icon, with the text as tooltip and accessible name. Defaults to `large`. */\n size?: UsherButtonSize;\n\n /** Additional class name for the button. */\n className?: string;\n}\n\n/**\n * Opens the my issues side sheet. A badge counts the issues support waits for the user on, and the accessible name\n * says how many.\n */\nexport const MyIssuesButton = (props: MyIssuesButtonProps) => {\n const usher = useUsher();\n\n return (\n <UsherBoundary>\n <MyIssuesButtonContent {...props} onOpen={usher.showMyIssues} />\n </UsherBoundary>\n );\n};\n\nconst MyIssuesButtonContent = ({ size = 'large', className, onOpen }: MyIssuesButtonProps & { onOpen: () => void }) => {\n const usher = useUsher();\n const [result] = MyIssues.use();\n\n return <MyIssuesButtonView size={size} className={className} waiting={waitingCount(result.data ?? [])} labels={usher.labels} onOpen={onOpen} />;\n};\n\n/**\n * Props for {@link MyIssuesButtonView}.\n */\nexport interface MyIssuesButtonViewProps extends MyIssuesButtonProps {\n /** How many issues support waits for the user on. */\n waiting: number;\n\n /** The labels to show. */\n labels: ReturnType<typeof useUsher>['labels'];\n\n /** Opens the my issues side sheet. */\n onOpen: () => void;\n}\n\n/**\n * Renders the my issues button for a given number of issues support waits for the user on.\n */\nexport const MyIssuesButtonView = ({ size = 'large', className, waiting, labels, onOpen }: MyIssuesButtonViewProps) => {\n const model = myIssuesButtonModel(size, waiting, labels);\n const badge = waiting > 0 && (\n <span className='usher-my-issues-button__badge' aria-hidden='true'>\n <Badge value={waiting} severity='warn' size='small' />\n </span>\n );\n\n return (\n <span className={['usher-my-issues-button', className].filter(Boolean).join(' ')} data-size={size}>\n {size === 'small'\n ? <IconButton variant='ghost' icon={<InboxIcon />} aria-label={model.accessibleName} tooltip={model.tooltip} onClick={onOpen} />\n : <Button variant='outline' icon={<InboxIcon />} label={model.text} aria-label={model.accessibleName} onClick={onOpen} />}\n {badge}\n </span>\n );\n};\n"],"names":["MyIssuesButton","props","usher","useUsher","_jsx","UsherBoundary","MyIssuesButtonContent","onOpen","showMyIssues","size","className","result","MyIssues","use","MyIssuesButtonView","waiting","waitingCount","data","labels","model","myIssuesButtonModel","badge","span","aria-hidden","Badge","value","severity","_jsxs","filter","Boolean","join","data-size","IconButton","variant","icon","InboxIcon","aria-label","accessibleName","tooltip","onClick","Button","label","text"],"mappings":";;;;;;;;;;;;AAuBA;;;IAIO,MAAMA,cAAAA,GAAiB,CAACC,KAAAA,GAAAA;AAC3B,IAAA,MAAMC,KAAAA,GAAQC,iBAAAA,EAAAA;AAEd,IAAA,qBACIC,cAAA,CAACC,2BAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACE,qBAAAA,EAAAA;AAAuB,YAAA,GAAGL,KAAK;AAAEM,YAAAA,MAAAA,EAAQL,MAAMM;;;AAG5D;AAEA,MAAMF,qBAAAA,GAAwB,CAAC,EAAEG,IAAAA,GAAO,OAAO,EAAEC,SAAS,EAAEH,MAAM,EAAgD,GAAA;AAC9G,IAAA,MAAML,KAAAA,GAAQC,iBAAAA,EAAAA;AACd,IAAA,MAAM,CAACQ,MAAAA,CAAO,GAAGC,yBAAAA,CAASC,GAAG,EAAA;AAE7B,IAAA,qBAAOT,cAAA,CAACU,kBAAAA,EAAAA;QAAmBL,IAAAA,EAAMA,IAAAA;QAAMC,SAAAA,EAAWA,SAAAA;AAAWK,QAAAA,OAAAA,EAASC,yBAAAA,CAAaL,MAAAA,CAAOM,IAAI,IAAI,EAAE,CAAA;AAAGC,QAAAA,MAAAA,EAAQhB,MAAMgB,MAAM;QAAEX,MAAAA,EAAQA;;AACzI,CAAA;AAgBA;;AAEC,IACM,MAAMO,kBAAAA,GAAqB,CAAC,EAAEL,IAAAA,GAAO,OAAO,EAAEC,SAAS,EAAEK,OAAO,EAAEG,MAAM,EAAEX,MAAM,EAA2B,GAAA;IAC9G,MAAMY,KAAAA,GAAQC,gCAAAA,CAAoBX,IAAAA,EAAMM,OAAAA,EAASG,MAAAA,CAAAA;IACjD,MAAMG,KAAAA,GAAQN,OAAAA,GAAU,CAAA,kBACpBX,cAAA,CAACkB,MAAAA,EAAAA;QAAKZ,SAAAA,EAAU,+BAAA;QAAgCa,aAAAA,EAAY,MAAA;AACxD,QAAA,QAAA,gBAAAnB,cAAA,CAACoB,aAAAA,EAAAA;YAAMC,KAAAA,EAAOV,OAAAA;YAASW,QAAAA,EAAS,MAAA;YAAOjB,IAAAA,EAAK;;;AAIpD,IAAA,qBACIkB,eAAA,CAACL,MAAAA,EAAAA;QAAKZ,SAAAA,EAAW;AAAC,YAAA,wBAAA;AAA0BA,YAAAA;AAAU,SAAA,CAACkB,MAAM,CAACC,OAAAA,CAAAA,CAASC,IAAI,CAAC,GAAA,CAAA;QAAMC,WAAAA,EAAWtB,IAAAA;;AACxFA,YAAAA,IAAAA,KAAS,wBACJL,cAAA,CAAC4B,iBAAAA,EAAAA;gBAAWC,OAAAA,EAAQ,OAAA;AAAQC,gBAAAA,IAAAA,gBAAM9B,cAAA,CAAC+B,eAAAA,EAAAA,EAAAA,CAAAA;AAAcC,gBAAAA,YAAAA,EAAYjB,MAAMkB,cAAc;AAAEC,gBAAAA,OAAAA,EAASnB,MAAMmB,OAAO;gBAAEC,OAAAA,EAAShC;+BACpHH,cAAA,CAACoC,aAAAA,EAAAA;gBAAOP,OAAAA,EAAQ,SAAA;AAAUC,gBAAAA,IAAAA,gBAAM9B,cAAA,CAAC+B,eAAAA,EAAAA,EAAAA,CAAAA;AAAcM,gBAAAA,KAAAA,EAAOtB,MAAMuB,IAAI;AAAEN,gBAAAA,YAAAA,EAAYjB,MAAMkB,cAAc;gBAAEE,OAAAA,EAAShC;;AAClHc,YAAAA;;;AAGb;;;"}
@@ -1,8 +0,0 @@
1
- import { UsherButtonSize } from './buttonModels.js';
2
- export interface ReportButtonProps {
3
- size?: UsherButtonSize;
4
- error?: unknown;
5
- className?: string;
6
- }
7
- export declare const ReportButton: ({ size, error, className }: ReportButtonProps) => import("react").JSX.Element;
8
- //# sourceMappingURL=ReportButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReportButton.d.ts","sourceRoot":"","sources":["../../../Buttons/ReportButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAqB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKvE,MAAM,WAAW,iBAAiB;IAE9B,IAAI,CAAC,EAAE,eAAe,CAAC;IAGvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAGhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,YAAY,GAAI,4BAAsC,iBAAiB,gCAwBnF,CAAC"}
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var Common = require('@cratis/components/Common');
5
- var Icons = require('../Icons.js');
6
- var useUsher = require('../Provider/useUsher.js');
7
- var buttonModels = require('./buttonModels.js');
8
-
9
- /**
10
- * Opens the report a problem dialog, or the report this error dialog when given an error, with where in the
11
- * application the button is.
12
- */ const ReportButton = ({ size = 'large', error, className })=>{
13
- const usher = useUsher.useUsher();
14
- const reportsError = error !== undefined;
15
- const model = buttonModels.reportButtonModel(size, reportsError, usher.labels);
16
- const report = ()=>reportsError ? usher.reportError(error) : usher.reportIssue();
17
- return size === 'small' ? /*#__PURE__*/ jsxRuntime.jsx(Common.IconButton, {
18
- className: className,
19
- variant: "ghost",
20
- icon: /*#__PURE__*/ jsxRuntime.jsx(Icons.BugIcon, {}),
21
- "aria-label": model.accessibleName,
22
- tooltip: model.tooltip,
23
- onClick: report
24
- }) : /*#__PURE__*/ jsxRuntime.jsx(Common.Button, {
25
- className: className,
26
- variant: "outline",
27
- icon: /*#__PURE__*/ jsxRuntime.jsx(Icons.BugIcon, {}),
28
- label: model.text,
29
- onClick: report
30
- });
31
- };
32
-
33
- exports.ReportButton = ReportButton;
34
- //# sourceMappingURL=ReportButton.js.map