@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,8 +0,0 @@
1
- export declare enum ReportLimits {
2
- errorMessageLength = 2000,
3
- errorTypeLength = 500,
4
- stackFrames = 50,
5
- stackFrameTextLength = 1000,
6
- correlationIds = 20
7
- }
8
- //# sourceMappingURL=ReportLimits.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReportLimits.d.ts","sourceRoot":"","sources":["../../../Reporting/ReportLimits.ts"],"names":[],"mappings":"AAQA,oBAAY,YAAY;IAEpB,kBAAkB,OAAO;IAGzB,eAAe,MAAM;IAGrB,WAAW,KAAK;IAGhB,oBAAoB,OAAO;IAG3B,cAAc,KAAK;CACtB"}
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- // Copyright (c) Cratis. All rights reserved.
4
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
- /**
6
- * The most the backend accepts in one report, as `ReportLimits` in the Usher backend states it. What the application
7
- * itself gathers - stack frames, correlation ids and the error's own texts - is cut to these before a report is sent,
8
- * so a long stack trace never makes a report fail; what the reporter writes is checked by the generated validators.
9
- */ var ReportLimits = /*#__PURE__*/ function(ReportLimits) {
10
- /** The longest error message a report carries. */ ReportLimits[ReportLimits["errorMessageLength"] = 2000] = "errorMessageLength";
11
- /** The longest error type a report carries. */ ReportLimits[ReportLimits["errorTypeLength"] = 500] = "errorTypeLength";
12
- /** The most stack frames a report carries. */ ReportLimits[ReportLimits["stackFrames"] = 50] = "stackFrames";
13
- /** The longest method or file of a stack frame. */ ReportLimits[ReportLimits["stackFrameTextLength"] = 1000] = "stackFrameTextLength";
14
- /** The most correlation ids a report carries. */ ReportLimits[ReportLimits["correlationIds"] = 20] = "correlationIds";
15
- return ReportLimits;
16
- }({});
17
-
18
- exports.ReportLimits = ReportLimits;
19
- //# sourceMappingURL=ReportLimits.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReportLimits.js","sources":["../../../Reporting/ReportLimits.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The most the backend accepts in one report, as `ReportLimits` in the Usher backend states it. What the application\n * itself gathers - stack frames, correlation ids and the error's own texts - is cut to these before a report is sent,\n * so a long stack trace never makes a report fail; what the reporter writes is checked by the generated validators.\n */\nexport enum ReportLimits {\n /** The longest error message a report carries. */\n errorMessageLength = 2000,\n\n /** The longest error type a report carries. */\n errorTypeLength = 500,\n\n /** The most stack frames a report carries. */\n stackFrames = 50,\n\n /** The longest method or file of a stack frame. */\n stackFrameTextLength = 1000,\n\n /** The most correlation ids a report carries. */\n correlationIds = 20\n}\n"],"names":["ReportLimits"],"mappings":";;AAAA;AACA;AAEA;;;;IAKO,IAAKA,YAAAA,iBAAAA,SAAAA,YAAAA,EAAAA;AACR,uDAAgD,YAAA,CAAA,YAAA,CAAA,oBAAA,CAAA,GAC3B,IAAA,CAAA,GAAA,oBAAA;AAErB,oDAA6C,YAAA,CAAA,YAAA,CAAA,iBAAA,CAAA,GAC3B,GAAA,CAAA,GAAA,iBAAA;AAElB,mDAA4C,YAAA,CAAA,YAAA,CAAA,aAAA,CAAA,GAC9B,EAAA,CAAA,GAAA,aAAA;AAEd,wDAAiD,YAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,GAC1B,IAAA,CAAA,GAAA,sBAAA;AAEvB,sDAA+C,YAAA,CAAA,YAAA,CAAA,gBAAA,CAAA,GAC9B,EAAA,CAAA,GAAA,gBAAA;AAdTA,IAAAA,OAAAA,YAAAA;AAeX,CAAA,CAAA,EAAA;;"}
@@ -1,5 +0,0 @@
1
- import { Guid } from '@cratis/fundamentals';
2
- export interface ReportSent {
3
- readonly issueId: Guid;
4
- }
5
- //# sourceMappingURL=ReportSent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReportSent.d.ts","sourceRoot":"","sources":["../../../Reporting/ReportSent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAK5C,MAAM,WAAW,UAAU;IAEvB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;CAC1B"}
@@ -1,7 +0,0 @@
1
- import { LocationParts } from './formatLocation.js';
2
- export interface SentWithReportProps {
3
- location: LocationParts;
4
- correlationIdCount: number;
5
- }
6
- export declare const SentWithReport: ({ location, correlationIdCount }: SentWithReportProps) => import("react").JSX.Element;
7
- //# sourceMappingURL=SentWithReport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SentWithReport.d.ts","sourceRoot":"","sources":["../../../Reporting/SentWithReport.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpE,MAAM,WAAW,mBAAmB;IAEhC,QAAQ,EAAE,aAAa,CAAC;IAGxB,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAMD,eAAO,MAAM,cAAc,GAAI,kCAAkC,mBAAmB,gCAcnF,CAAC"}
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var format = require('../Labels/format.js');
5
- var UsherContext = require('../Provider/UsherContext.js');
6
- var formatLocation = require('./formatLocation.js');
7
-
8
- /**
9
- * Shows the reporter what is sent along with their report: where they were, the application version and how many
10
- * recent requests.
11
- */ const SentWithReport = ({ location, correlationIdCount })=>{
12
- const { labels, applicationName, applicationVersion } = UsherContext.useUsherContext();
13
- const parts = [
14
- formatLocation.formatLocation(location, labels.common.locationSeparator, labels.common.unknownLocation),
15
- [
16
- applicationName,
17
- applicationVersion
18
- ].filter((part)=>part.length > 0).join(' '),
19
- correlationIdCount === 1 ? labels.common.oneRecentRequest : format.format(labels.common.recentRequests, {
20
- count: correlationIdCount
21
- })
22
- ].filter((part)=>part.length > 0);
23
- return /*#__PURE__*/ jsxRuntime.jsxs("section", {
24
- className: "usher-sent-with-report",
25
- "aria-label": labels.common.sentWithYourReport,
26
- children: [
27
- /*#__PURE__*/ jsxRuntime.jsx("span", {
28
- className: "usher-sent-with-report__heading",
29
- children: labels.common.sentWithYourReport
30
- }),
31
- /*#__PURE__*/ jsxRuntime.jsx("span", {
32
- className: "usher-sent-with-report__parts",
33
- children: parts.join(' · ')
34
- })
35
- ]
36
- });
37
- };
38
-
39
- exports.SentWithReport = SentWithReport;
40
- //# sourceMappingURL=SentWithReport.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SentWithReport.js","sources":["../../../Reporting/SentWithReport.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 { format } from '../Labels/index.js';\nimport { useUsherContext } from '../Provider/UsherContext.js';\nimport { formatLocation, LocationParts } from './formatLocation.js';\n\n/**\n * Props for {@link SentWithReport}.\n */\nexport interface SentWithReportProps {\n /** Where in the application the reporter was. */\n location: LocationParts;\n\n /** How many recent requests the report carries. */\n correlationIdCount: number;\n}\n\n/**\n * Shows the reporter what is sent along with their report: where they were, the application version and how many\n * recent requests.\n */\nexport const SentWithReport = ({ location, correlationIdCount }: SentWithReportProps) => {\n const { labels, applicationName, applicationVersion } = useUsherContext();\n const parts = [\n formatLocation(location, labels.common.locationSeparator, labels.common.unknownLocation),\n [applicationName, applicationVersion].filter(part => part.length > 0).join(' '),\n correlationIdCount === 1 ? labels.common.oneRecentRequest : format(labels.common.recentRequests, { count: correlationIdCount })\n ].filter(part => part.length > 0);\n\n return (\n <section className='usher-sent-with-report' aria-label={labels.common.sentWithYourReport}>\n <span className='usher-sent-with-report__heading'>{labels.common.sentWithYourReport}</span>\n <span className='usher-sent-with-report__parts'>{parts.join(' · ')}</span>\n </section>\n );\n};\n"],"names":["SentWithReport","location","correlationIdCount","labels","applicationName","applicationVersion","useUsherContext","parts","formatLocation","common","locationSeparator","unknownLocation","filter","part","length","join","oneRecentRequest","format","recentRequests","count","_jsxs","section","className","aria-label","sentWithYourReport","_jsx","span"],"mappings":";;;;;;;AAkBA;;;UAIaA,cAAAA,GAAiB,CAAC,EAAEC,QAAQ,EAAEC,kBAAkB,EAAuB,GAAA;AAChF,IAAA,MAAM,EAAEC,MAAM,EAAEC,eAAe,EAAEC,kBAAkB,EAAE,GAAGC,4BAAAA,EAAAA;AACxD,IAAA,MAAMC,KAAAA,GAAQ;QACVC,6BAAAA,CAAeP,QAAAA,EAAUE,OAAOM,MAAM,CAACC,iBAAiB,EAAEP,MAAAA,CAAOM,MAAM,CAACE,eAAe,CAAA;AACvF,QAAA;AAACP,YAAAA,eAAAA;AAAiBC,YAAAA;SAAmB,CAACO,MAAM,CAACC,CAAAA,IAAAA,GAAQA,KAAKC,MAAM,GAAG,CAAA,CAAA,CAAGC,IAAI,CAAC,GAAA,CAAA;QAC3Eb,kBAAAA,KAAuB,CAAA,GAAIC,MAAAA,CAAOM,MAAM,CAACO,gBAAgB,GAAGC,aAAAA,CAAOd,MAAAA,CAAOM,MAAM,CAACS,cAAc,EAAE;YAAEC,KAAAA,EAAOjB;AAAmB,SAAA;AAChI,KAAA,CAACU,MAAM,CAACC,CAAAA,IAAAA,GAAQA,IAAAA,CAAKC,MAAM,GAAG,CAAA,CAAA;AAE/B,IAAA,qBACIM,eAAA,CAACC,SAAAA,EAAAA;QAAQC,SAAAA,EAAU,wBAAA;QAAyBC,YAAAA,EAAYpB,MAAAA,CAAOM,MAAM,CAACe,kBAAkB;;0BACpFC,cAAA,CAACC,MAAAA,EAAAA;gBAAKJ,SAAAA,EAAU,iCAAA;0BAAmCnB,MAAAA,CAAOM,MAAM,CAACe;;0BACjEC,cAAA,CAACC,MAAAA,EAAAA;gBAAKJ,SAAAA,EAAU,+BAAA;AAAiCf,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMQ,IAAI,CAAC,KAAA;;;;AAGxE;;"}
@@ -1,9 +0,0 @@
1
- import { Guid } from '@cratis/fundamentals';
2
- import { StackFrame } from '@cratis/showrunner.usher';
3
- export interface TechnicalDetailsProps {
4
- errorType: string;
5
- correlationIds: Guid[];
6
- stackFrames: StackFrame[];
7
- }
8
- export declare const TechnicalDetails: ({ errorType, correlationIds, stackFrames }: TechnicalDetailsProps) => import("react").JSX.Element;
9
- //# sourceMappingURL=TechnicalDetails.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TechnicalDetails.d.ts","sourceRoot":"","sources":["../../../Reporting/TechnicalDetails.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAOtD,MAAM,WAAW,qBAAqB;IAElC,SAAS,EAAE,MAAM,CAAC;IAGlB,cAAc,EAAE,IAAI,EAAE,CAAC;IAGvB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC7B;AAKD,eAAO,MAAM,gBAAgB,GAAI,4CAA4C,qBAAqB,gCAkCjG,CAAC"}
@@ -1,75 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var format = require('../Labels/format.js');
5
- var UsherContext = require('../Provider/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
- * The technical details of an error, collapsed until the reporter opens them.
11
- */ const TechnicalDetails = ({ errorType, correlationIds, stackFrames })=>{
12
- const labels = UsherContext.useUsherLabels();
13
- return /*#__PURE__*/ jsxRuntime.jsxs("details", {
14
- className: "usher-technical-details",
15
- children: [
16
- /*#__PURE__*/ jsxRuntime.jsx("summary", {
17
- className: "usher-technical-details__summary",
18
- children: labels.reportError.technicalDetails
19
- }),
20
- /*#__PURE__*/ jsxRuntime.jsxs("dl", {
21
- className: "usher-technical-details__list",
22
- children: [
23
- errorType.length > 0 && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
24
- children: [
25
- /*#__PURE__*/ jsxRuntime.jsx("dt", {
26
- children: labels.reportError.errorType
27
- }),
28
- /*#__PURE__*/ jsxRuntime.jsx("dd", {
29
- children: /*#__PURE__*/ jsxRuntime.jsx("code", {
30
- children: errorType
31
- })
32
- })
33
- ]
34
- }),
35
- correlationIds.length > 0 && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
36
- children: [
37
- /*#__PURE__*/ jsxRuntime.jsx("dt", {
38
- children: labels.reportError.correlationId
39
- }),
40
- /*#__PURE__*/ jsxRuntime.jsx("dd", {
41
- children: /*#__PURE__*/ jsxRuntime.jsx("code", {
42
- children: correlationIds[0].toString()
43
- })
44
- })
45
- ]
46
- }),
47
- stackFrames.length > 0 && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
48
- children: [
49
- /*#__PURE__*/ jsxRuntime.jsx("dt", {
50
- children: labels.reportError.stackFrames
51
- }),
52
- /*#__PURE__*/ jsxRuntime.jsx("dd", {
53
- children: /*#__PURE__*/ jsxRuntime.jsx("ol", {
54
- className: "usher-technical-details__frames",
55
- children: stackFrames.map((frame, index)=>/*#__PURE__*/ jsxRuntime.jsx("li", {
56
- children: /*#__PURE__*/ jsxRuntime.jsx("code", {
57
- children: format.format(labels.reportError.stackFrame, {
58
- method: frame.method,
59
- file: frame.file,
60
- line: frame.line
61
- })
62
- })
63
- }, index))
64
- })
65
- })
66
- ]
67
- })
68
- ]
69
- })
70
- ]
71
- });
72
- };
73
-
74
- exports.TechnicalDetails = TechnicalDetails;
75
- //# sourceMappingURL=TechnicalDetails.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TechnicalDetails.js","sources":["../../../Reporting/TechnicalDetails.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 { Guid } from '@cratis/fundamentals';\nimport { StackFrame } from '@cratis/showrunner.usher';\nimport { format } from '../Labels/index.js';\nimport { useUsherLabels } from '../Provider/UsherContext.js';\n\n/**\n * Props for {@link TechnicalDetails}.\n */\nexport interface TechnicalDetailsProps {\n /** The type of the error; empty when not known. */\n errorType: string;\n\n /** The correlation ids sent with the report. */\n correlationIds: Guid[];\n\n /** The stack frames of the error, top frame first. */\n stackFrames: StackFrame[];\n}\n\n/**\n * The technical details of an error, collapsed until the reporter opens them.\n */\nexport const TechnicalDetails = ({ errorType, correlationIds, stackFrames }: TechnicalDetailsProps) => {\n const labels = useUsherLabels();\n\n return (\n <details className='usher-technical-details'>\n <summary className='usher-technical-details__summary'>{labels.reportError.technicalDetails}</summary>\n <dl className='usher-technical-details__list'>\n {errorType.length > 0 && (\n <>\n <dt>{labels.reportError.errorType}</dt>\n <dd><code>{errorType}</code></dd>\n </>\n )}\n {correlationIds.length > 0 && (\n <>\n <dt>{labels.reportError.correlationId}</dt>\n <dd><code>{correlationIds[0].toString()}</code></dd>\n </>\n )}\n {stackFrames.length > 0 && (\n <>\n <dt>{labels.reportError.stackFrames}</dt>\n <dd>\n <ol className='usher-technical-details__frames'>\n {stackFrames.map((frame, index) => (\n <li key={index}><code>{format(labels.reportError.stackFrame, { method: frame.method, file: frame.file, line: frame.line })}</code></li>\n ))}\n </ol>\n </dd>\n </>\n )}\n </dl>\n </details>\n );\n};\n"],"names":["TechnicalDetails","errorType","correlationIds","stackFrames","labels","useUsherLabels","_jsxs","details","className","_jsx","summary","reportError","technicalDetails","dl","length","_Fragment","dt","dd","code","correlationId","toString","ol","map","frame","index","li","format","stackFrame","method","file","line"],"mappings":";;;;;;AAAA;AACA;AAqBA;;IAGO,MAAMA,gBAAAA,GAAmB,CAAC,EAAEC,SAAS,EAAEC,cAAc,EAAEC,WAAW,EAAyB,GAAA;AAC9F,IAAA,MAAMC,MAAAA,GAASC,2BAAAA,EAAAA;AAEf,IAAA,qBACIC,eAAA,CAACC,SAAAA,EAAAA;QAAQC,SAAAA,EAAU,yBAAA;;0BACfC,cAAA,CAACC,SAAAA,EAAAA;gBAAQF,SAAAA,EAAU,kCAAA;0BAAoCJ,MAAAA,CAAOO,WAAW,CAACC;;0BAC1EN,eAAA,CAACO,IAAAA,EAAAA;gBAAGL,SAAAA,EAAU,+BAAA;;oBACTP,SAAAA,CAAUa,MAAM,GAAG,CAAA,kBAChBR,eAAA,CAAAS,mBAAA,EAAA;;0CACIN,cAAA,CAACO,IAAAA,EAAAA;0CAAIZ,MAAAA,CAAOO,WAAW,CAACV;;0CACxBQ,cAAA,CAACQ,IAAAA,EAAAA;AAAG,gCAAA,QAAA,gBAAAR,cAAA,CAACS,MAAAA,EAAAA;AAAMjB,oCAAAA,QAAAA,EAAAA;;;;;oBAGlBC,cAAAA,CAAeY,MAAM,GAAG,CAAA,kBACrBR,eAAA,CAAAS,mBAAA,EAAA;;0CACIN,cAAA,CAACO,IAAAA,EAAAA;0CAAIZ,MAAAA,CAAOO,WAAW,CAACQ;;0CACxBV,cAAA,CAACQ,IAAAA,EAAAA;AAAG,gCAAA,QAAA,gBAAAR,cAAA,CAACS,MAAAA,EAAAA;8CAAMhB,cAAc,CAAC,CAAA,CAAE,CAACkB,QAAQ;;;;;oBAG5CjB,WAAAA,CAAYW,MAAM,GAAG,CAAA,kBAClBR,eAAA,CAAAS,mBAAA,EAAA;;0CACIN,cAAA,CAACO,IAAAA,EAAAA;0CAAIZ,MAAAA,CAAOO,WAAW,CAACR;;0CACxBM,cAAA,CAACQ,IAAAA,EAAAA;AACG,gCAAA,QAAA,gBAAAR,cAAA,CAACY,IAAAA,EAAAA;oCAAGb,SAAAA,EAAU,iCAAA;AACTL,oCAAAA,QAAAA,EAAAA,WAAAA,CAAYmB,GAAG,CAAC,CAACC,KAAAA,EAAOC,sBACrBf,cAAA,CAACgB,IAAAA,EAAAA;AAAe,4CAAA,QAAA,gBAAAhB,cAAA,CAACS,MAAAA,EAAAA;AAAMQ,gDAAAA,QAAAA,EAAAA,aAAAA,CAAOtB,MAAAA,CAAOO,WAAW,CAACgB,UAAU,EAAE;AAAEC,oDAAAA,MAAAA,EAAQL,MAAMK,MAAM;AAAEC,oDAAAA,IAAAA,EAAMN,MAAMM,IAAI;AAAEC,oDAAAA,IAAAA,EAAMP,MAAMO;AAAK,iDAAA;;AAA/GN,yCAAAA,EAAAA,KAAAA,CAAAA;;;;;;;;;AAS7C;;"}
@@ -1,9 +0,0 @@
1
- import { AccessDuration } from '@cratis/showrunner.usher';
2
- import { UsherLabels } from '../Labels/index.js';
3
- export interface DurationOption {
4
- [key: string]: unknown;
5
- value: AccessDuration;
6
- label: string;
7
- }
8
- export declare function durationOptions(labels: UsherLabels): DurationOption[];
9
- //# sourceMappingURL=durationOptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"durationOptions.d.ts","sourceRoot":"","sources":["../../../Reporting/durationOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,MAAM,WAAW,cAAc;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAGvB,KAAK,EAAE,cAAc,CAAC;IAGtB,KAAK,EAAE,MAAM,CAAC;CACjB;AAOD,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,cAAc,EAAE,CAMrE"}
@@ -1,29 +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 choices of how long support may sign in as the reporter.
9
- * @param labels The labels to show.
10
- * @returns The {@link DurationOption} for every {@link AccessDuration}, shortest first.
11
- */ function durationOptions(labels) {
12
- return [
13
- {
14
- value: showrunner_usher.AccessDuration.oneHour,
15
- label: labels.access.oneHour
16
- },
17
- {
18
- value: showrunner_usher.AccessDuration.oneDay,
19
- label: labels.access.oneDay
20
- },
21
- {
22
- value: showrunner_usher.AccessDuration.sevenDays,
23
- label: labels.access.sevenDays
24
- }
25
- ];
26
- }
27
-
28
- exports.durationOptions = durationOptions;
29
- //# sourceMappingURL=durationOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"durationOptions.js","sources":["../../../Reporting/durationOptions.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';\nimport { UsherLabels } from '../Labels/index.js';\n\n/**\n * One choice of how long support may sign in as the reporter.\n */\nexport interface DurationOption {\n [key: string]: unknown;\n\n /** The {@link AccessDuration}. */\n value: AccessDuration;\n\n /** What the reporter sees. */\n label: string;\n}\n\n/**\n * Gets the choices of how long support may sign in as the reporter.\n * @param labels The labels to show.\n * @returns The {@link DurationOption} for every {@link AccessDuration}, shortest first.\n */\nexport function durationOptions(labels: UsherLabels): DurationOption[] {\n return [\n { value: AccessDuration.oneHour, label: labels.access.oneHour },\n { value: AccessDuration.oneDay, label: labels.access.oneDay },\n { value: AccessDuration.sevenDays, label: labels.access.sevenDays }\n ];\n}\n"],"names":["durationOptions","labels","value","AccessDuration","oneHour","label","access","oneDay","sevenDays"],"mappings":";;;;AAAA;AACA;AAkBA;;;;IAKO,SAASA,eAAAA,CAAgBC,MAAmB,EAAA;IAC/C,OAAO;AACH,QAAA;AAAEC,YAAAA,KAAAA,EAAOC,gCAAeC,OAAO;YAAEC,KAAAA,EAAOJ,MAAAA,CAAOK,MAAM,CAACF;AAAQ,SAAA;AAC9D,QAAA;AAAEF,YAAAA,KAAAA,EAAOC,gCAAeI,MAAM;YAAEF,KAAAA,EAAOJ,MAAAA,CAAOK,MAAM,CAACC;AAAO,SAAA;AAC5D,QAAA;AAAEL,YAAAA,KAAAA,EAAOC,gCAAeK,SAAS;YAAEH,KAAAA,EAAOJ,MAAAA,CAAOK,MAAM,CAACE;AAAU;AACrE,KAAA;AACL;;"}
@@ -1,7 +0,0 @@
1
- export interface LocationParts {
2
- readonly module: string;
3
- readonly feature: string;
4
- readonly slice: string;
5
- }
6
- export declare function formatLocation(location: LocationParts | undefined, separator: string, unknown: string): string;
7
- //# sourceMappingURL=formatLocation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatLocation.d.ts","sourceRoot":"","sources":["../../../Reporting/formatLocation.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAE1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B;AASD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAI9G"}
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- // Copyright (c) Cratis. All rights reserved.
4
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
- /**
6
- * The parts of where in the application something happened.
7
- */ /**
8
- * Formats where in the application something happened for people, such as `Billing › Invoices › Pay`.
9
- * @param location The location; parts that are empty are left out.
10
- * @param separator What separates the parts.
11
- * @param unknown What to show when no part is known.
12
- * @returns The formatted location.
13
- */ function formatLocation(location, separator, unknown) {
14
- const parts = [
15
- location?.module,
16
- location?.feature,
17
- location?.slice
18
- ].filter((part)=>typeof part === 'string' && part.length > 0);
19
- return parts.length > 0 ? parts.join(separator) : unknown;
20
- }
21
-
22
- exports.formatLocation = formatLocation;
23
- //# sourceMappingURL=formatLocation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatLocation.js","sources":["../../../Reporting/formatLocation.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The parts of where in the application something happened.\n */\nexport interface LocationParts {\n /** The module. */\n readonly module: string;\n /** The feature within the module. */\n readonly feature: string;\n /** The slice within the feature. */\n readonly slice: string;\n}\n\n/**\n * Formats where in the application something happened for people, such as `Billing › Invoices › Pay`.\n * @param location The location; parts that are empty are left out.\n * @param separator What separates the parts.\n * @param unknown What to show when no part is known.\n * @returns The formatted location.\n */\nexport function formatLocation(location: LocationParts | undefined, separator: string, unknown: string): string {\n const parts = [location?.module, location?.feature, location?.slice]\n .filter((part): part is string => typeof part === 'string' && part.length > 0);\n return parts.length > 0 ? parts.join(separator) : unknown;\n}\n"],"names":["formatLocation","location","separator","unknown","parts","module","feature","slice","filter","part","length","join"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;AAkBC,IACM,SAASA,cAAAA,CAAeC,QAAmC,EAAEC,SAAiB,EAAEC,OAAe,EAAA;AAClG,IAAA,MAAMC,KAAAA,GAAQ;QAACH,QAAAA,EAAUI,MAAAA;QAAQJ,QAAAA,EAAUK,OAAAA;QAASL,QAAAA,EAAUM;KAAM,CAC/DC,MAAM,CAAC,CAACC,IAAAA,GAAyB,OAAOA,IAAAA,KAAS,QAAA,IAAYA,IAAAA,CAAKC,MAAM,GAAG,CAAA,CAAA;AAChF,IAAA,OAAON,MAAMM,MAAM,GAAG,IAAIN,KAAAA,CAAMO,IAAI,CAACT,SAAAA,CAAAA,GAAaC,OAAAA;AACtD;;"}
@@ -1,14 +0,0 @@
1
- export * from './AccessChoice.js';
2
- export * from './AccessFields.js';
3
- export * from './AccessNotice.js';
4
- export * from './durationOptions.js';
5
- export * from './formatLocation.js';
6
- export * from './ReportErrorDialog.js';
7
- export * from './ReportIssueDialog.js';
8
- export * from './ReportLimits.js';
9
- export * from './ReportSent.js';
10
- export * from './reportValues.js';
11
- export * from './SentWithReport.js';
12
- export * from './TechnicalDetails.js';
13
- export * from './useAccessChoice.js';
14
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Reporting/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
@@ -1,22 +0,0 @@
1
- import { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';
2
- import { Guid } from '@cratis/fundamentals';
3
- import { ErrorDetails, IReportError, IReportIssue, SliceLocation } from '@cratis/showrunner.usher';
4
- export interface ReportContext {
5
- readonly issueId: Guid;
6
- readonly location: ArcSliceLocation;
7
- readonly correlationIds: Guid[];
8
- readonly applicationVersion: string;
9
- readonly shareIdentity: boolean;
10
- }
11
- export declare function toReportLocation(location: ArcSliceLocation): SliceLocation;
12
- export declare function reportIssueValues(context: ReportContext): IReportIssue;
13
- export declare function reportErrorValues(error: ErrorDetails, context: ReportContext): IReportError;
14
- export declare function mergeCorrelationIds(first: Guid[], second: Guid[]): Guid[];
15
- export declare function toErrorDetails(error: unknown, location?: ArcSliceLocation): ErrorDetails;
16
- export declare function isErrorDetails(value: unknown): value is ErrorDetails;
17
- export declare function isEmptyLocation(location: {
18
- module: string;
19
- feature: string;
20
- slice: string;
21
- } | undefined): boolean;
22
- //# sourceMappingURL=reportValues.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reportValues.d.ts","sourceRoot":"","sources":["../../../Reporting/reportValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAkB,YAAY,EAAyB,YAAY,EAAE,YAAY,EAAE,aAAa,EAAc,MAAM,0BAA0B,CAAC;AAMtJ,MAAM,WAAW,aAAa;IAE1B,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IAGvB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAGpC,QAAQ,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC;IAGhC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAGpC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACnC;AAOD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,aAAa,CAM1E;AAOD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAYtE;AASD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,GAAG,YAAY,CAc3F;AAQD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAQzE;AASD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,gBAAgB,GAAG,YAAY,CAExF;AAOD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAYpE;AAOD,wBAAgB,eAAe,CAAC,QAAQ,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAAG,OAAO,CAEjH"}
@@ -1,124 +0,0 @@
1
- 'use strict';
2
-
3
- var showrunner_usher = require('@cratis/showrunner.usher');
4
- var ReportLimits = require('./ReportLimits.js');
5
-
6
- // Copyright (c) Cratis. All rights reserved.
7
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
- /**
9
- * Converts where something happened to the location a report carries.
10
- * @param location The {@link ArcSliceLocation}, as `useSliceContext()` or a generated proxy gives it.
11
- * @returns The {@link SliceLocation} of the report.
12
- */ function toReportLocation(location) {
13
- const reportLocation = new showrunner_usher.SliceLocation();
14
- reportLocation.module = location.module;
15
- reportLocation.feature = location.feature;
16
- reportLocation.slice = location.slice;
17
- return reportLocation;
18
- }
19
- /**
20
- * Gets the initial values of the report a problem command.
21
- * @param context The {@link ReportContext}.
22
- * @returns The values.
23
- */ function reportIssueValues(context) {
24
- return {
25
- issueId: context.issueId,
26
- summary: '',
27
- description: '',
28
- location: toReportLocation(context.location),
29
- correlationIds: context.correlationIds.slice(-ReportLimits.ReportLimits.correlationIds),
30
- applicationVersion: context.applicationVersion,
31
- shareIdentity: context.shareIdentity,
32
- grantAccess: false,
33
- accessDuration: showrunner_usher.AccessDuration.oneDay
34
- };
35
- }
36
- /**
37
- * Gets the initial values of the report this error command. The error's own location and correlation ids win over
38
- * those of the context, as they say where the error happened.
39
- * @param error The {@link ErrorDetails}.
40
- * @param context The {@link ReportContext}.
41
- * @returns The values.
42
- */ function reportErrorValues(error, context) {
43
- return {
44
- issueId: context.issueId,
45
- errorMessage: error.message.slice(0, ReportLimits.ReportLimits.errorMessageLength),
46
- errorType: error.type.slice(0, ReportLimits.ReportLimits.errorTypeLength),
47
- stackFrames: error.stackFrames.slice(0, ReportLimits.ReportLimits.stackFrames).map(withinLimits),
48
- details: '',
49
- location: toReportLocation(isEmptyLocation(error.location) ? context.location : error.location),
50
- correlationIds: mergeCorrelationIds(error.correlationIds, context.correlationIds).slice(0, ReportLimits.ReportLimits.correlationIds),
51
- applicationVersion: context.applicationVersion,
52
- shareIdentity: context.shareIdentity,
53
- grantAccess: false,
54
- accessDuration: showrunner_usher.AccessDuration.oneDay
55
- };
56
- }
57
- /**
58
- * Merges correlation ids, keeping each once, the first given first.
59
- * @param first The correlation ids that come first.
60
- * @param second The correlation ids that come after.
61
- * @returns The merged correlation ids.
62
- */ function mergeCorrelationIds(first, second) {
63
- const merged = [];
64
- for (const correlationId of [
65
- ...first,
66
- ...second
67
- ]){
68
- if (!merged.some((existing)=>existing.equals(correlationId))) {
69
- merged.push(correlationId);
70
- }
71
- }
72
- return merged;
73
- }
74
- /**
75
- * Gets the {@link ErrorDetails} of an error to report: the details themselves when given, otherwise the details of
76
- * what was thrown.
77
- * @param error `ErrorDetails`, or anything thrown.
78
- * @param location Where it happened, when what was thrown does not say.
79
- * @returns The {@link ErrorDetails}.
80
- */ function toErrorDetails(error, location) {
81
- return isErrorDetails(error) ? error : showrunner_usher.errorDetailsFromError(error, location);
82
- }
83
- /**
84
- * Checks whether a value is {@link ErrorDetails}.
85
- * @param value The value.
86
- * @returns True when it is.
87
- */ function isErrorDetails(value) {
88
- if (typeof value !== 'object' || value === null || value instanceof Error) {
89
- return false;
90
- }
91
- const candidate = value;
92
- return typeof candidate.message === 'string' && typeof candidate.type === 'string' && Array.isArray(candidate.correlationIds) && Array.isArray(candidate.stackFrames) && typeof candidate.location === 'object' && candidate.location !== null;
93
- }
94
- /**
95
- * Checks whether a location says nothing about where something happened.
96
- * @param location The location.
97
- * @returns True when no part of it is known.
98
- */ function isEmptyLocation(location) {
99
- return !location || [
100
- location.module,
101
- location.feature,
102
- location.slice
103
- ].every((part)=>!part);
104
- }
105
- /**
106
- * Cuts the texts of a stack frame to what a report carries.
107
- * @param frame The {@link StackFrame}.
108
- * @returns The frame within the limits.
109
- */ function withinLimits(frame) {
110
- return {
111
- ...frame,
112
- method: frame.method.slice(0, ReportLimits.ReportLimits.stackFrameTextLength),
113
- file: frame.file.slice(0, ReportLimits.ReportLimits.stackFrameTextLength)
114
- };
115
- }
116
-
117
- exports.isEmptyLocation = isEmptyLocation;
118
- exports.isErrorDetails = isErrorDetails;
119
- exports.mergeCorrelationIds = mergeCorrelationIds;
120
- exports.reportErrorValues = reportErrorValues;
121
- exports.reportIssueValues = reportIssueValues;
122
- exports.toErrorDetails = toErrorDetails;
123
- exports.toReportLocation = toReportLocation;
124
- //# sourceMappingURL=reportValues.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reportValues.js","sources":["../../../Reporting/reportValues.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { SliceLocation as ArcSliceLocation } from '@cratis/arc/reflection';\nimport { Guid } from '@cratis/fundamentals';\nimport { AccessDuration, ErrorDetails, errorDetailsFromError, IReportError, IReportIssue, SliceLocation, StackFrame } from '@cratis/showrunner.usher';\nimport { ReportLimits } from './ReportLimits.js';\n\n/**\n * What every report carries besides what the reporter writes.\n */\nexport interface ReportContext {\n /** The id of the new issue. */\n readonly issueId: Guid;\n\n /** Where in the application the reporter was. */\n readonly location: ArcSliceLocation;\n\n /** The correlation ids of the commands and queries run just before the report. */\n readonly correlationIds: Guid[];\n\n /** The version of the application. */\n readonly applicationVersion: string;\n\n /** Whether to let support know who the reporter is unless they choose otherwise. */\n readonly shareIdentity: boolean;\n}\n\n/**\n * Converts where something happened to the location a report carries.\n * @param location The {@link ArcSliceLocation}, as `useSliceContext()` or a generated proxy gives it.\n * @returns The {@link SliceLocation} of the report.\n */\nexport function toReportLocation(location: ArcSliceLocation): SliceLocation {\n const reportLocation = new SliceLocation();\n reportLocation.module = location.module;\n reportLocation.feature = location.feature;\n reportLocation.slice = location.slice;\n return reportLocation;\n}\n\n/**\n * Gets the initial values of the report a problem command.\n * @param context The {@link ReportContext}.\n * @returns The values.\n */\nexport function reportIssueValues(context: ReportContext): IReportIssue {\n return {\n issueId: context.issueId,\n summary: '',\n description: '',\n location: toReportLocation(context.location),\n correlationIds: context.correlationIds.slice(-ReportLimits.correlationIds),\n applicationVersion: context.applicationVersion,\n shareIdentity: context.shareIdentity,\n grantAccess: false,\n accessDuration: AccessDuration.oneDay\n };\n}\n\n/**\n * Gets the initial values of the report this error command. The error's own location and correlation ids win over\n * those of the context, as they say where the error happened.\n * @param error The {@link ErrorDetails}.\n * @param context The {@link ReportContext}.\n * @returns The values.\n */\nexport function reportErrorValues(error: ErrorDetails, context: ReportContext): IReportError {\n return {\n issueId: context.issueId,\n errorMessage: error.message.slice(0, ReportLimits.errorMessageLength),\n errorType: error.type.slice(0, ReportLimits.errorTypeLength),\n stackFrames: error.stackFrames.slice(0, ReportLimits.stackFrames).map(withinLimits),\n details: '',\n location: toReportLocation(isEmptyLocation(error.location) ? context.location : error.location),\n correlationIds: mergeCorrelationIds(error.correlationIds, context.correlationIds).slice(0, ReportLimits.correlationIds),\n applicationVersion: context.applicationVersion,\n shareIdentity: context.shareIdentity,\n grantAccess: false,\n accessDuration: AccessDuration.oneDay\n };\n}\n\n/**\n * Merges correlation ids, keeping each once, the first given first.\n * @param first The correlation ids that come first.\n * @param second The correlation ids that come after.\n * @returns The merged correlation ids.\n */\nexport function mergeCorrelationIds(first: Guid[], second: Guid[]): Guid[] {\n const merged: Guid[] = [];\n for (const correlationId of [...first, ...second]) {\n if (!merged.some(existing => existing.equals(correlationId))) {\n merged.push(correlationId);\n }\n }\n return merged;\n}\n\n/**\n * Gets the {@link ErrorDetails} of an error to report: the details themselves when given, otherwise the details of\n * what was thrown.\n * @param error `ErrorDetails`, or anything thrown.\n * @param location Where it happened, when what was thrown does not say.\n * @returns The {@link ErrorDetails}.\n */\nexport function toErrorDetails(error: unknown, location?: ArcSliceLocation): ErrorDetails {\n return isErrorDetails(error) ? error : errorDetailsFromError(error, location);\n}\n\n/**\n * Checks whether a value is {@link ErrorDetails}.\n * @param value The value.\n * @returns True when it is.\n */\nexport function isErrorDetails(value: unknown): value is ErrorDetails {\n if (typeof value !== 'object' || value === null || value instanceof Error) {\n return false;\n }\n\n const candidate = value as Record<string, unknown>;\n return typeof candidate.message === 'string'\n && typeof candidate.type === 'string'\n && Array.isArray(candidate.correlationIds)\n && Array.isArray(candidate.stackFrames)\n && typeof candidate.location === 'object'\n && candidate.location !== null;\n}\n\n/**\n * Checks whether a location says nothing about where something happened.\n * @param location The location.\n * @returns True when no part of it is known.\n */\nexport function isEmptyLocation(location: { module: string; feature: string; slice: string } | undefined): boolean {\n return !location || [location.module, location.feature, location.slice].every(part => !part);\n}\n\n/**\n * Cuts the texts of a stack frame to what a report carries.\n * @param frame The {@link StackFrame}.\n * @returns The frame within the limits.\n */\nfunction withinLimits(frame: StackFrame): StackFrame {\n return {\n ...frame,\n method: frame.method.slice(0, ReportLimits.stackFrameTextLength),\n file: frame.file.slice(0, ReportLimits.stackFrameTextLength)\n };\n}\n"],"names":["toReportLocation","location","reportLocation","SliceLocation","module","feature","slice","reportIssueValues","context","issueId","summary","description","correlationIds","ReportLimits","applicationVersion","shareIdentity","grantAccess","accessDuration","AccessDuration","oneDay","reportErrorValues","error","errorMessage","message","errorMessageLength","errorType","type","errorTypeLength","stackFrames","map","withinLimits","details","isEmptyLocation","mergeCorrelationIds","first","second","merged","correlationId","some","existing","equals","push","toErrorDetails","isErrorDetails","errorDetailsFromError","value","Error","candidate","Array","isArray","every","part","frame","method","stackFrameTextLength","file"],"mappings":";;;;;AAAA;AACA;AA2BA;;;;IAKO,SAASA,gBAAAA,CAAiBC,QAA0B,EAAA;AACvD,IAAA,MAAMC,iBAAiB,IAAIC,8BAAAA,EAAAA;IAC3BD,cAAAA,CAAeE,MAAM,GAAGH,QAAAA,CAASG,MAAM;IACvCF,cAAAA,CAAeG,OAAO,GAAGJ,QAAAA,CAASI,OAAO;IACzCH,cAAAA,CAAeI,KAAK,GAAGL,QAAAA,CAASK,KAAK;IACrC,OAAOJ,cAAAA;AACX;AAEA;;;;IAKO,SAASK,iBAAAA,CAAkBC,OAAsB,EAAA;IACpD,OAAO;AACHC,QAAAA,OAAAA,EAASD,QAAQC,OAAO;QACxBC,OAAAA,EAAS,EAAA;QACTC,WAAAA,EAAa,EAAA;QACbV,QAAAA,EAAUD,gBAAAA,CAAiBQ,QAAQP,QAAQ,CAAA;AAC3CW,QAAAA,cAAAA,EAAgBJ,QAAQI,cAAc,CAACN,KAAK,CAAC,CAACO,0BAAaD,cAAc,CAAA;AACzEE,QAAAA,kBAAAA,EAAoBN,QAAQM,kBAAkB;AAC9CC,QAAAA,aAAAA,EAAeP,QAAQO,aAAa;QACpCC,WAAAA,EAAa,KAAA;AACbC,QAAAA,cAAAA,EAAgBC,gCAAeC;AACnC,KAAA;AACJ;AAEA;;;;;;AAMC,IACM,SAASC,iBAAAA,CAAkBC,KAAmB,EAAEb,OAAsB,EAAA;IACzE,OAAO;AACHC,QAAAA,OAAAA,EAASD,QAAQC,OAAO;AACxBa,QAAAA,YAAAA,EAAcD,MAAME,OAAO,CAACjB,KAAK,CAAC,CAAA,EAAGO,0BAAaW,kBAAkB,CAAA;AACpEC,QAAAA,SAAAA,EAAWJ,MAAMK,IAAI,CAACpB,KAAK,CAAC,CAAA,EAAGO,0BAAac,eAAe,CAAA;QAC3DC,WAAAA,EAAaP,KAAAA,CAAMO,WAAW,CAACtB,KAAK,CAAC,GAAGO,yBAAAA,CAAae,WAAW,CAAA,CAAEC,GAAG,CAACC,YAAAA,CAAAA;QACtEC,OAAAA,EAAS,EAAA;QACT9B,QAAAA,EAAUD,gBAAAA,CAAiBgC,gBAAgBX,KAAAA,CAAMpB,QAAQ,IAAIO,OAAAA,CAAQP,QAAQ,GAAGoB,KAAAA,CAAMpB,QAAQ,CAAA;QAC9FW,cAAAA,EAAgBqB,mBAAAA,CAAoBZ,KAAAA,CAAMT,cAAc,EAAEJ,OAAAA,CAAQI,cAAc,CAAA,CAAEN,KAAK,CAAC,CAAA,EAAGO,yBAAAA,CAAaD,cAAc,CAAA;AACtHE,QAAAA,kBAAAA,EAAoBN,QAAQM,kBAAkB;AAC9CC,QAAAA,aAAAA,EAAeP,QAAQO,aAAa;QACpCC,WAAAA,EAAa,KAAA;AACbC,QAAAA,cAAAA,EAAgBC,gCAAeC;AACnC,KAAA;AACJ;AAEA;;;;;AAKC,IACM,SAASc,mBAAAA,CAAoBC,KAAa,EAAEC,MAAc,EAAA;AAC7D,IAAA,MAAMC,SAAiB,EAAE;AACzB,IAAA,KAAK,MAAMC,aAAAA,IAAiB;AAAIH,QAAAA,GAAAA,KAAAA;AAAUC,QAAAA,GAAAA;KAAO,CAAE;QAC/C,IAAI,CAACC,OAAOE,IAAI,CAACC,CAAAA,QAAAA,GAAYA,QAAAA,CAASC,MAAM,CAACH,aAAAA,CAAAA,CAAAA,EAAiB;AAC1DD,YAAAA,MAAAA,CAAOK,IAAI,CAACJ,aAAAA,CAAAA;AAChB,QAAA;AACJ,IAAA;IACA,OAAOD,MAAAA;AACX;AAEA;;;;;;AAMC,IACM,SAASM,cAAAA,CAAerB,KAAc,EAAEpB,QAA2B,EAAA;AACtE,IAAA,OAAO0C,cAAAA,CAAetB,KAAAA,CAAAA,GAASA,KAAAA,GAAQuB,sCAAAA,CAAsBvB,KAAAA,EAAOpB,QAAAA,CAAAA;AACxE;AAEA;;;;IAKO,SAAS0C,cAAAA,CAAeE,KAAc,EAAA;AACzC,IAAA,IAAI,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQA,iBAAiBC,KAAAA,EAAO;QACvE,OAAO,KAAA;AACX,IAAA;AAEA,IAAA,MAAMC,SAAAA,GAAYF,KAAAA;AAClB,IAAA,OAAO,OAAOE,SAAAA,CAAUxB,OAAO,KAAK,QAAA,IAC7B,OAAOwB,SAAAA,CAAUrB,IAAI,KAAK,QAAA,IAC1BsB,KAAAA,CAAMC,OAAO,CAACF,SAAAA,CAAUnC,cAAc,CAAA,IACtCoC,KAAAA,CAAMC,OAAO,CAACF,SAAAA,CAAUnB,WAAW,CAAA,IACnC,OAAOmB,SAAAA,CAAU9C,QAAQ,KAAK,QAAA,IAC9B8C,SAAAA,CAAU9C,QAAQ,KAAK,IAAA;AAClC;AAEA;;;;IAKO,SAAS+B,eAAAA,CAAgB/B,QAAwE,EAAA;AACpG,IAAA,OAAO,CAACA,QAAAA,IAAY;AAACA,QAAAA,QAAAA,CAASG,MAAM;AAAEH,QAAAA,QAAAA,CAASI,OAAO;AAAEJ,QAAAA,QAAAA,CAASK;AAAM,KAAA,CAAC4C,KAAK,CAACC,CAAAA,IAAAA,GAAQ,CAACA,IAAAA,CAAAA;AAC3F;AAEA;;;;IAKA,SAASrB,aAAasB,KAAiB,EAAA;IACnC,OAAO;AACH,QAAA,GAAGA,KAAK;AACRC,QAAAA,MAAAA,EAAQD,MAAMC,MAAM,CAAC/C,KAAK,CAAC,CAAA,EAAGO,0BAAayC,oBAAoB,CAAA;AAC/DC,QAAAA,IAAAA,EAAMH,MAAMG,IAAI,CAACjD,KAAK,CAAC,CAAA,EAAGO,0BAAayC,oBAAoB;AAC/D,KAAA;AACJ;;;;;;;;"}
@@ -1,13 +0,0 @@
1
- import { AccessChoice } from './AccessChoice.js';
2
- export interface AccessChoiceBinding {
3
- readonly choice: AccessChoice;
4
- readonly onFieldChange: (command: unknown, fieldName: string, oldValue: unknown, newValue: unknown) => void;
5
- readonly currentValues: {
6
- shareIdentity: boolean;
7
- };
8
- readonly initialValues: <TValues extends {
9
- shareIdentity?: boolean;
10
- }>(values: TValues) => Omit<TValues, 'shareIdentity'>;
11
- }
12
- export declare function useAccessChoice(shareIdentityByDefault: boolean): AccessChoiceBinding;
13
- //# sourceMappingURL=useAccessChoice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAccessChoice.d.ts","sourceRoot":"","sources":["../../../Reporting/useAccessChoice.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA2D,MAAM,mBAAmB,CAAC;AAY1G,MAAM,WAAW,mBAAmB;IAEhC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAG9B,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAG5G,QAAQ,CAAC,aAAa,EAAE;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IAQnD,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,SAAS;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;CAC5H;AAaD,wBAAgB,eAAe,CAAC,sBAAsB,EAAE,OAAO,GAAG,mBAAmB,CAMpF"}
@@ -1,41 +0,0 @@
1
- 'use strict';
2
-
3
- var react = require('react');
4
- var AccessChoice = require('./AccessChoice.js');
5
-
6
- // Copyright (c) Cratis. All rights reserved.
7
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
- const reduce = (choice, change)=>AccessChoice.changeAccessChoice(choice, change.fieldName, change.value);
9
- const withoutShareIdentity = (values)=>{
10
- const seed = {
11
- ...values
12
- };
13
- delete seed.shareIdentity;
14
- return seed;
15
- };
16
- /**
17
- * Follows the reporter's access choice in a command form with `shareIdentity`, `grantAccess` and `accessDuration`.
18
- * @param shareIdentityByDefault Whether to let support know who the reporter is unless they choose otherwise.
19
- * @returns The {@link AccessChoiceBinding}.
20
- */ function useAccessChoice(shareIdentityByDefault) {
21
- const [choice, dispatch] = react.useReducer(reduce, shareIdentityByDefault, AccessChoice.initialAccessChoice);
22
- const shareIdentity = AccessChoice.sharesIdentity(choice);
23
- const currentValues = react.useMemo(()=>({
24
- shareIdentity
25
- }), [
26
- shareIdentity
27
- ]);
28
- const onFieldChange = (_command, fieldName, _oldValue, newValue)=>dispatch({
29
- fieldName,
30
- value: newValue
31
- });
32
- return {
33
- choice,
34
- onFieldChange,
35
- currentValues,
36
- initialValues: withoutShareIdentity
37
- };
38
- }
39
-
40
- exports.useAccessChoice = useAccessChoice;
41
- //# sourceMappingURL=useAccessChoice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAccessChoice.js","sources":["../../../Reporting/useAccessChoice.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useMemo, useReducer } from 'react';\nimport { AccessChoice, changeAccessChoice, initialAccessChoice, sharesIdentity } from './AccessChoice.js';\n\ninterface FieldChanged {\n readonly fieldName: string;\n readonly value: unknown;\n}\n\nconst reduce = (choice: AccessChoice, change: FieldChanged) => changeAccessChoice(choice, change.fieldName, change.value);\n\n/**\n * What {@link useAccessChoice} gives a command form.\n */\nexport interface AccessChoiceBinding {\n /** The reporter's {@link AccessChoice}. */\n readonly choice: AccessChoice;\n\n /** The handler for the form's `onFieldChange`. */\n readonly onFieldChange: (command: unknown, fieldName: string, oldValue: unknown, newValue: unknown) => void;\n\n /** The form's `currentValues`, which force sharing who the reporter is while access is granted. */\n readonly currentValues: { shareIdentity: boolean };\n\n /**\n * Gets the form's `initialValues` without `shareIdentity`: the form merges `initialValues` over `currentValues`, so\n * a `shareIdentity` there would win over the value the access choice forces.\n * @param values The initial values of the command.\n * @returns The values without `shareIdentity`.\n */\n readonly initialValues: <TValues extends { shareIdentity?: boolean }>(values: TValues) => Omit<TValues, 'shareIdentity'>;\n}\n\nconst withoutShareIdentity = <TValues extends { shareIdentity?: boolean }>(values: TValues): Omit<TValues, 'shareIdentity'> => {\n const seed: Partial<TValues> = { ...values };\n delete seed.shareIdentity;\n return seed as Omit<TValues, 'shareIdentity'>;\n};\n\n/**\n * Follows the reporter's access choice in a command form with `shareIdentity`, `grantAccess` and `accessDuration`.\n * @param shareIdentityByDefault Whether to let support know who the reporter is unless they choose otherwise.\n * @returns The {@link AccessChoiceBinding}.\n */\nexport function useAccessChoice(shareIdentityByDefault: boolean): AccessChoiceBinding {\n const [choice, dispatch] = useReducer(reduce, shareIdentityByDefault, initialAccessChoice);\n const shareIdentity = sharesIdentity(choice);\n const currentValues = useMemo(() => ({ shareIdentity }), [shareIdentity]);\n const onFieldChange = (_command: unknown, fieldName: string, _oldValue: unknown, newValue: unknown) => dispatch({ fieldName, value: newValue });\n return { choice, onFieldChange, currentValues, initialValues: withoutShareIdentity };\n}\n"],"names":["reduce","choice","change","changeAccessChoice","fieldName","value","withoutShareIdentity","values","seed","shareIdentity","useAccessChoice","shareIdentityByDefault","dispatch","useReducer","initialAccessChoice","sharesIdentity","currentValues","useMemo","onFieldChange","_command","_oldValue","newValue","initialValues"],"mappings":";;;;;AAAA;AACA;AAUA,MAAMA,MAAAA,GAAS,CAACC,MAAAA,EAAsBC,MAAAA,GAAyBC,+BAAAA,CAAmBF,QAAQC,MAAAA,CAAOE,SAAS,EAAEF,MAAAA,CAAOG,KAAK,CAAA;AAwBxH,MAAMC,uBAAuB,CAA8CC,MAAAA,GAAAA;AACvE,IAAA,MAAMC,IAAAA,GAAyB;AAAE,QAAA,GAAGD;AAAO,KAAA;AAC3C,IAAA,OAAOC,KAAKC,aAAa;IACzB,OAAOD,IAAAA;AACX,CAAA;AAEA;;;;IAKO,SAASE,eAAAA,CAAgBC,sBAA+B,EAAA;AAC3D,IAAA,MAAM,CAACV,MAAAA,EAAQW,QAAAA,CAAS,GAAGC,gBAAAA,CAAWb,QAAQW,sBAAAA,EAAwBG,gCAAAA,CAAAA;AACtE,IAAA,MAAML,gBAAgBM,2BAAAA,CAAed,MAAAA,CAAAA;IACrC,MAAMe,aAAAA,GAAgBC,aAAAA,CAAQ,KAAO;AAAER,YAAAA;AAAc,SAAA,CAAA,EAAI;AAACA,QAAAA;AAAc,KAAA,CAAA;AACxE,IAAA,MAAMS,gBAAgB,CAACC,QAAAA,EAAmBf,SAAAA,EAAmBgB,SAAAA,EAAoBC,WAAsBT,QAAAA,CAAS;AAAER,YAAAA,SAAAA;YAAWC,KAAAA,EAAOgB;AAAS,SAAA,CAAA;IAC7I,OAAO;AAAEpB,QAAAA,MAAAA;AAAQiB,QAAAA,aAAAA;AAAeF,QAAAA,aAAAA;QAAeM,aAAAA,EAAehB;AAAqB,KAAA;AACvF;;"}
@@ -1,8 +0,0 @@
1
- export * from './Buttons/index.js';
2
- export * from './Correlation/index.js';
3
- export * from './Icons.js';
4
- export * from './Issues/index.js';
5
- export * from './Labels/index.js';
6
- export * from './Provider/index.js';
7
- export * from './Reporting/index.js';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}