@cucumber/react-components 21.1.1 → 22.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/README.md +2 -1
  2. package/dist/src/CucumberQueryContext.js +3 -8
  3. package/dist/src/CucumberQueryContext.js.map +1 -1
  4. package/dist/src/EnvelopesQueryContext.js +8 -20
  5. package/dist/src/EnvelopesQueryContext.js.map +1 -1
  6. package/dist/src/GherkinQueryContext.js +3 -8
  7. package/dist/src/GherkinQueryContext.js.map +1 -1
  8. package/dist/src/SearchQueryContext.js +24 -53
  9. package/dist/src/SearchQueryContext.js.map +1 -1
  10. package/dist/src/UriContext.js +2 -7
  11. package/dist/src/UriContext.js.map +1 -1
  12. package/dist/src/ciCommitLink.js +3 -9
  13. package/dist/src/ciCommitLink.js.map +1 -1
  14. package/dist/src/components/CucumberReact.d.ts +1 -1
  15. package/dist/src/components/CucumberReact.d.ts.map +1 -1
  16. package/dist/src/components/CucumberReact.js +7 -14
  17. package/dist/src/components/CucumberReact.js.map +1 -1
  18. package/dist/src/components/app/CICommitLink.js +14 -22
  19. package/dist/src/components/app/CICommitLink.js.map +1 -1
  20. package/dist/src/components/app/CIJobLink.js +8 -15
  21. package/dist/src/components/app/CIJobLink.js.map +1 -1
  22. package/dist/src/components/app/EnvelopesWrapper.js +11 -38
  23. package/dist/src/components/app/EnvelopesWrapper.js.map +1 -1
  24. package/dist/src/components/app/ExecutionSummary.js +54 -61
  25. package/dist/src/components/app/ExecutionSummary.js.map +1 -1
  26. package/dist/src/components/app/FilteredResults.d.ts.map +1 -1
  27. package/dist/src/components/app/FilteredResults.js +21 -39
  28. package/dist/src/components/app/FilteredResults.js.map +1 -1
  29. package/dist/src/components/app/GherkinDocumentList.js +27 -57
  30. package/dist/src/components/app/GherkinDocumentList.js.map +1 -1
  31. package/dist/src/components/app/HighLight.js +14 -21
  32. package/dist/src/components/app/HighLight.js.map +1 -1
  33. package/dist/src/components/app/NavigationButton.js +4 -23
  34. package/dist/src/components/app/NavigationButton.js.map +1 -1
  35. package/dist/src/components/app/NoMatchResult.js +8 -15
  36. package/dist/src/components/app/NoMatchResult.js.map +1 -1
  37. package/dist/src/components/app/OSIcon.js +10 -17
  38. package/dist/src/components/app/OSIcon.js.map +1 -1
  39. package/dist/src/components/app/QueriesWrapper.d.ts +1 -1
  40. package/dist/src/components/app/QueriesWrapper.d.ts.map +1 -1
  41. package/dist/src/components/app/QueriesWrapper.js +7 -14
  42. package/dist/src/components/app/QueriesWrapper.js.map +1 -1
  43. package/dist/src/components/app/RuntimeIcon.js +10 -17
  44. package/dist/src/components/app/RuntimeIcon.js.map +1 -1
  45. package/dist/src/components/app/SearchBar.d.ts.map +1 -1
  46. package/dist/src/components/app/SearchBar.js +25 -30
  47. package/dist/src/components/app/SearchBar.js.map +1 -1
  48. package/dist/src/components/app/SearchWrapper.d.ts +1 -1
  49. package/dist/src/components/app/SearchWrapper.d.ts.map +1 -1
  50. package/dist/src/components/app/SearchWrapper.js +4 -46
  51. package/dist/src/components/app/SearchWrapper.js.map +1 -1
  52. package/dist/src/components/app/StatusesSummary.js +8 -15
  53. package/dist/src/components/app/StatusesSummary.js.map +1 -1
  54. package/dist/src/components/app/icons/CucumberLogo.d.ts +1 -1
  55. package/dist/src/components/app/icons/CucumberLogo.js +7 -14
  56. package/dist/src/components/app/icons/CucumberLogo.js.map +1 -1
  57. package/dist/src/components/app/icons/Jvm.d.ts +1 -1
  58. package/dist/src/components/app/icons/Jvm.js +8 -15
  59. package/dist/src/components/app/icons/Jvm.js.map +1 -1
  60. package/dist/src/components/app/icons/Linux.js +18 -25
  61. package/dist/src/components/app/icons/Linux.js.map +1 -1
  62. package/dist/src/components/app/icons/MacOS.d.ts +1 -1
  63. package/dist/src/components/app/icons/MacOS.js +4 -11
  64. package/dist/src/components/app/icons/MacOS.js.map +1 -1
  65. package/dist/src/components/app/icons/NodeJs.d.ts +1 -1
  66. package/dist/src/components/app/icons/NodeJs.js +34 -41
  67. package/dist/src/components/app/icons/NodeJs.js.map +1 -1
  68. package/dist/src/components/app/icons/Ruby.d.ts +1 -1
  69. package/dist/src/components/app/icons/Ruby.js +4 -11
  70. package/dist/src/components/app/icons/Ruby.js.map +1 -1
  71. package/dist/src/components/app/icons/Windows.js +4 -11
  72. package/dist/src/components/app/icons/Windows.js.map +1 -1
  73. package/dist/src/components/app/index.d.ts +11 -11
  74. package/dist/src/components/app/index.d.ts.map +1 -1
  75. package/dist/src/components/app/index.js +11 -27
  76. package/dist/src/components/app/index.js.map +1 -1
  77. package/dist/src/components/app/rehypePlugins.d.ts.map +1 -1
  78. package/dist/src/components/app/rehypePlugins.js +8 -13
  79. package/dist/src/components/app/rehypePlugins.js.map +1 -1
  80. package/dist/src/components/app/remarkPlugins.js +3 -8
  81. package/dist/src/components/app/remarkPlugins.js.map +1 -1
  82. package/dist/src/components/app/statuses.js +2 -27
  83. package/dist/src/components/app/statuses.js.map +1 -1
  84. package/dist/src/components/customise/customRendering.d.ts +2 -1
  85. package/dist/src/components/customise/customRendering.d.ts.map +1 -1
  86. package/dist/src/components/customise/customRendering.js +6 -33
  87. package/dist/src/components/customise/customRendering.js.map +1 -1
  88. package/dist/src/components/customise/index.d.ts +2 -2
  89. package/dist/src/components/customise/index.d.ts.map +1 -1
  90. package/dist/src/components/customise/index.js +2 -18
  91. package/dist/src/components/customise/index.js.map +1 -1
  92. package/dist/src/components/customise/theming.js +1 -2
  93. package/dist/src/components/gherkin/Anchor.d.ts +1 -1
  94. package/dist/src/components/gherkin/Anchor.d.ts.map +1 -1
  95. package/dist/src/components/gherkin/Anchor.js +11 -18
  96. package/dist/src/components/gherkin/Anchor.js.map +1 -1
  97. package/dist/src/components/gherkin/Attachment.d.ts +1 -1
  98. package/dist/src/components/gherkin/Attachment.d.ts.map +1 -1
  99. package/dist/src/components/gherkin/Attachment.js +43 -77
  100. package/dist/src/components/gherkin/Attachment.js.map +1 -1
  101. package/dist/src/components/gherkin/Background.d.ts +1 -1
  102. package/dist/src/components/gherkin/Background.d.ts.map +1 -1
  103. package/dist/src/components/gherkin/Background.js +17 -24
  104. package/dist/src/components/gherkin/Background.js.map +1 -1
  105. package/dist/src/components/gherkin/Children.d.ts +1 -1
  106. package/dist/src/components/gherkin/Children.d.ts.map +1 -1
  107. package/dist/src/components/gherkin/Children.js +7 -14
  108. package/dist/src/components/gherkin/Children.js.map +1 -1
  109. package/dist/src/components/gherkin/DataTable.d.ts +1 -1
  110. package/dist/src/components/gherkin/DataTable.d.ts.map +1 -1
  111. package/dist/src/components/gherkin/DataTable.js +12 -19
  112. package/dist/src/components/gherkin/DataTable.js.map +1 -1
  113. package/dist/src/components/gherkin/Description.d.ts +1 -1
  114. package/dist/src/components/gherkin/Description.d.ts.map +1 -1
  115. package/dist/src/components/gherkin/Description.js +9 -16
  116. package/dist/src/components/gherkin/Description.js.map +1 -1
  117. package/dist/src/components/gherkin/DocString.d.ts +1 -1
  118. package/dist/src/components/gherkin/DocString.d.ts.map +1 -1
  119. package/dist/src/components/gherkin/DocString.js +9 -16
  120. package/dist/src/components/gherkin/DocString.js.map +1 -1
  121. package/dist/src/components/gherkin/ErrorMessage.d.ts +3 -3
  122. package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -1
  123. package/dist/src/components/gherkin/ErrorMessage.js +8 -15
  124. package/dist/src/components/gherkin/ErrorMessage.js.map +1 -1
  125. package/dist/src/components/gherkin/ExampleDetail.js +31 -61
  126. package/dist/src/components/gherkin/ExampleDetail.js.map +1 -1
  127. package/dist/src/components/gherkin/Examples.d.ts +1 -1
  128. package/dist/src/components/gherkin/Examples.d.ts.map +1 -1
  129. package/dist/src/components/gherkin/Examples.js +20 -27
  130. package/dist/src/components/gherkin/Examples.js.map +1 -1
  131. package/dist/src/components/gherkin/ExamplesContext.d.ts +1 -1
  132. package/dist/src/components/gherkin/ExamplesContext.js +2 -5
  133. package/dist/src/components/gherkin/ExamplesContext.js.map +1 -1
  134. package/dist/src/components/gherkin/ExamplesTable.d.ts +1 -1
  135. package/dist/src/components/gherkin/ExamplesTable.d.ts.map +1 -1
  136. package/dist/src/components/gherkin/ExamplesTable.js +29 -59
  137. package/dist/src/components/gherkin/ExamplesTable.js.map +1 -1
  138. package/dist/src/components/gherkin/Feature.d.ts +1 -1
  139. package/dist/src/components/gherkin/Feature.d.ts.map +1 -1
  140. package/dist/src/components/gherkin/Feature.js +24 -31
  141. package/dist/src/components/gherkin/Feature.js.map +1 -1
  142. package/dist/src/components/gherkin/GherkinDocument.d.ts +1 -1
  143. package/dist/src/components/gherkin/GherkinDocument.d.ts.map +1 -1
  144. package/dist/src/components/gherkin/GherkinDocument.js +7 -14
  145. package/dist/src/components/gherkin/GherkinDocument.js.map +1 -1
  146. package/dist/src/components/gherkin/GherkinStep.d.ts +1 -1
  147. package/dist/src/components/gherkin/GherkinStep.d.ts.map +1 -1
  148. package/dist/src/components/gherkin/GherkinStep.js +38 -46
  149. package/dist/src/components/gherkin/GherkinStep.js.map +1 -1
  150. package/dist/src/components/gherkin/GherkinSteps.d.ts +1 -1
  151. package/dist/src/components/gherkin/GherkinSteps.d.ts.map +1 -1
  152. package/dist/src/components/gherkin/GherkinSteps.js +10 -17
  153. package/dist/src/components/gherkin/GherkinSteps.js.map +1 -1
  154. package/dist/src/components/gherkin/HookStep.d.ts +1 -1
  155. package/dist/src/components/gherkin/HookStep.d.ts.map +1 -1
  156. package/dist/src/components/gherkin/HookStep.js +22 -52
  157. package/dist/src/components/gherkin/HookStep.js.map +1 -1
  158. package/dist/src/components/gherkin/HookSteps.js +5 -12
  159. package/dist/src/components/gherkin/HookSteps.js.map +1 -1
  160. package/dist/src/components/gherkin/Keyword.d.ts +1 -1
  161. package/dist/src/components/gherkin/Keyword.d.ts.map +1 -1
  162. package/dist/src/components/gherkin/Keyword.js +7 -14
  163. package/dist/src/components/gherkin/Keyword.js.map +1 -1
  164. package/dist/src/components/gherkin/MDG.js +25 -32
  165. package/dist/src/components/gherkin/MDG.js.map +1 -1
  166. package/dist/src/components/gherkin/Parameter.d.ts +1 -1
  167. package/dist/src/components/gherkin/Parameter.d.ts.map +1 -1
  168. package/dist/src/components/gherkin/Parameter.js +7 -14
  169. package/dist/src/components/gherkin/Parameter.js.map +1 -1
  170. package/dist/src/components/gherkin/Rule.d.ts +1 -1
  171. package/dist/src/components/gherkin/Rule.d.ts.map +1 -1
  172. package/dist/src/components/gherkin/Rule.js +22 -29
  173. package/dist/src/components/gherkin/Rule.js.map +1 -1
  174. package/dist/src/components/gherkin/Scenario.d.ts +1 -1
  175. package/dist/src/components/gherkin/Scenario.d.ts.map +1 -1
  176. package/dist/src/components/gherkin/Scenario.js +35 -65
  177. package/dist/src/components/gherkin/Scenario.js.map +1 -1
  178. package/dist/src/components/gherkin/StatusIcon.d.ts +1 -1
  179. package/dist/src/components/gherkin/StatusIcon.d.ts.map +1 -1
  180. package/dist/src/components/gherkin/StatusIcon.js +16 -23
  181. package/dist/src/components/gherkin/StatusIcon.js.map +1 -1
  182. package/dist/src/components/gherkin/StepItem.js +7 -14
  183. package/dist/src/components/gherkin/StepItem.js.map +1 -1
  184. package/dist/src/components/gherkin/StepsList.js +4 -11
  185. package/dist/src/components/gherkin/StepsList.js.map +1 -1
  186. package/dist/src/components/gherkin/Tags.d.ts +1 -1
  187. package/dist/src/components/gherkin/Tags.d.ts.map +1 -1
  188. package/dist/src/components/gherkin/Tags.js +9 -16
  189. package/dist/src/components/gherkin/Tags.js.map +1 -1
  190. package/dist/src/components/gherkin/Title.d.ts +1 -1
  191. package/dist/src/components/gherkin/Title.d.ts.map +1 -1
  192. package/dist/src/components/gherkin/Title.js +9 -16
  193. package/dist/src/components/gherkin/Title.js.map +1 -1
  194. package/dist/src/components/gherkin/attachmentFilename.js +3 -10
  195. package/dist/src/components/gherkin/attachmentFilename.js.map +1 -1
  196. package/dist/src/components/gherkin/index.d.ts +25 -25
  197. package/dist/src/components/gherkin/index.d.ts.map +1 -1
  198. package/dist/src/components/gherkin/index.js +25 -41
  199. package/dist/src/components/gherkin/index.js.map +1 -1
  200. package/dist/src/components/gherkin/isNumber.js +1 -4
  201. package/dist/src/components/gherkin/isNumber.js.map +1 -1
  202. package/dist/src/components/gherkin/statusName.js +1 -3
  203. package/dist/src/components/gherkin/statusName.js.map +1 -1
  204. package/dist/src/components/index.d.ts +4 -4
  205. package/dist/src/components/index.d.ts.map +1 -1
  206. package/dist/src/components/index.js +4 -33
  207. package/dist/src/components/index.js.map +1 -1
  208. package/dist/src/components/results/TestStepResultDetails.d.ts +4 -0
  209. package/dist/src/components/results/TestStepResultDetails.d.ts.map +1 -0
  210. package/dist/src/components/results/TestStepResultDetails.js +16 -0
  211. package/dist/src/components/results/TestStepResultDetails.js.map +1 -0
  212. package/dist/src/components/results/index.d.ts +2 -0
  213. package/dist/src/components/results/index.d.ts.map +1 -0
  214. package/dist/src/components/results/index.js +2 -0
  215. package/dist/src/components/results/index.js.map +1 -0
  216. package/dist/src/countScenariosByStatuses.d.ts +2 -1
  217. package/dist/src/countScenariosByStatuses.d.ts.map +1 -1
  218. package/dist/src/countScenariosByStatuses.js +26 -33
  219. package/dist/src/countScenariosByStatuses.js.map +1 -1
  220. package/dist/src/filter/filterByStatus.d.ts +2 -1
  221. package/dist/src/filter/filterByStatus.d.ts.map +1 -1
  222. package/dist/src/filter/filterByStatus.js +9 -9
  223. package/dist/src/filter/filterByStatus.js.map +1 -1
  224. package/dist/src/hooks/index.d.ts +2 -2
  225. package/dist/src/hooks/index.d.ts.map +1 -1
  226. package/dist/src/hooks/index.js +2 -18
  227. package/dist/src/hooks/index.js.map +1 -1
  228. package/dist/src/hooks/useFilteredDocuments.d.ts +3 -0
  229. package/dist/src/hooks/useFilteredDocuments.d.ts.map +1 -0
  230. package/dist/src/hooks/useFilteredDocuments.js +27 -0
  231. package/dist/src/hooks/useFilteredDocuments.js.map +1 -0
  232. package/dist/src/hooks/useQueries.d.ts +1 -1
  233. package/dist/src/hooks/useQueries.d.ts.map +1 -1
  234. package/dist/src/hooks/useQueries.js +8 -15
  235. package/dist/src/hooks/useQueries.js.map +1 -1
  236. package/dist/src/hooks/useResultStatistics.d.ts +6 -0
  237. package/dist/src/hooks/useResultStatistics.d.ts.map +1 -0
  238. package/dist/src/hooks/useResultStatistics.js +7 -0
  239. package/dist/src/hooks/useResultStatistics.js.map +1 -0
  240. package/dist/src/hooks/useSearch.d.ts +1 -1
  241. package/dist/src/hooks/useSearch.d.ts.map +1 -1
  242. package/dist/src/hooks/useSearch.js +4 -11
  243. package/dist/src/hooks/useSearch.js.map +1 -1
  244. package/dist/src/index.d.ts +7 -7
  245. package/dist/src/index.d.ts.map +1 -1
  246. package/dist/src/index.js +8 -43
  247. package/dist/src/index.js.map +1 -1
  248. package/dist/src/isTagExpression.js +1 -4
  249. package/dist/src/isTagExpression.js.map +1 -1
  250. package/dist/src/search/FeatureSearch.d.ts +3 -7
  251. package/dist/src/search/FeatureSearch.d.ts.map +1 -1
  252. package/dist/src/search/FeatureSearch.js +31 -31
  253. package/dist/src/search/FeatureSearch.js.map +1 -1
  254. package/dist/src/search/ScenarioLikeSearch.d.ts +25 -0
  255. package/dist/src/search/ScenarioLikeSearch.d.ts.map +1 -0
  256. package/dist/src/search/ScenarioLikeSearch.js +41 -0
  257. package/dist/src/search/ScenarioLikeSearch.js.map +1 -0
  258. package/dist/src/search/Search.d.ts +9 -9
  259. package/dist/src/search/Search.d.ts.map +1 -1
  260. package/dist/src/search/Search.js +34 -20
  261. package/dist/src/search/Search.js.map +1 -1
  262. package/dist/src/search/StepSearch.d.ts +16 -8
  263. package/dist/src/search/StepSearch.d.ts.map +1 -1
  264. package/dist/src/search/StepSearch.js +33 -44
  265. package/dist/src/search/StepSearch.js.map +1 -1
  266. package/dist/src/search/TagSearch.d.ts +2 -10
  267. package/dist/src/search/TagSearch.d.ts.map +1 -1
  268. package/dist/src/search/TagSearch.js +17 -18
  269. package/dist/src/search/TagSearch.js.map +1 -1
  270. package/dist/src/search/TextSearch.d.ts +2 -11
  271. package/dist/src/search/TextSearch.d.ts.map +1 -1
  272. package/dist/src/search/TextSearch.js +47 -36
  273. package/dist/src/search/TextSearch.js.map +1 -1
  274. package/dist/src/search/index.d.ts +3 -0
  275. package/dist/src/search/index.d.ts.map +1 -0
  276. package/dist/src/search/index.js +3 -0
  277. package/dist/src/search/index.js.map +1 -0
  278. package/dist/src/search/types.d.ts +14 -0
  279. package/dist/src/search/types.d.ts.map +1 -0
  280. package/dist/src/search/types.js +2 -0
  281. package/dist/src/search/types.js.map +1 -0
  282. package/dist/src/toRepositoryId.js +1 -4
  283. package/dist/src/toRepositoryId.js.map +1 -1
  284. package/dist/tsconfig.build.tsbuildinfo +1 -1
  285. package/package.json +35 -27
  286. package/dist/src/search/RuleSearch.d.ts +0 -9
  287. package/dist/src/search/RuleSearch.d.ts.map +0 -1
  288. package/dist/src/search/RuleSearch.js +0 -42
  289. package/dist/src/search/RuleSearch.js.map +0 -1
  290. package/dist/src/search/ScenarioSearch.d.ts +0 -9
  291. package/dist/src/search/ScenarioSearch.d.ts.map +0 -1
  292. package/dist/src/search/ScenarioSearch.js +0 -42
  293. package/dist/src/search/ScenarioSearch.js.map +0 -1
@@ -1,42 +1,26 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Anchor"), exports);
18
- __exportStar(require("./Attachment"), exports);
19
- __exportStar(require("./Background"), exports);
20
- __exportStar(require("./Children"), exports);
21
- __exportStar(require("./DataTable"), exports);
22
- __exportStar(require("./Description"), exports);
23
- __exportStar(require("./DocString"), exports);
24
- __exportStar(require("./ErrorMessage"), exports);
25
- __exportStar(require("./Examples"), exports);
26
- __exportStar(require("./ExamplesTable"), exports);
27
- __exportStar(require("./Feature"), exports);
28
- __exportStar(require("./GherkinDocument"), exports);
29
- __exportStar(require("./GherkinStep"), exports);
30
- __exportStar(require("./GherkinSteps"), exports);
31
- __exportStar(require("./HookStep"), exports);
32
- __exportStar(require("./HookSteps"), exports);
33
- __exportStar(require("./Keyword"), exports);
34
- __exportStar(require("./MDG"), exports);
35
- __exportStar(require("./Parameter"), exports);
36
- __exportStar(require("./Rule"), exports);
37
- __exportStar(require("./Scenario"), exports);
38
- __exportStar(require("./StatusIcon"), exports);
39
- __exportStar(require("./StepItem"), exports);
40
- __exportStar(require("./Tags"), exports);
41
- __exportStar(require("./Title"), exports);
1
+ export * from './Anchor.js';
2
+ export * from './Attachment.js';
3
+ export * from './Background.js';
4
+ export * from './Children.js';
5
+ export * from './DataTable.js';
6
+ export * from './Description.js';
7
+ export * from './DocString.js';
8
+ export * from './ErrorMessage.js';
9
+ export * from './Examples.js';
10
+ export * from './ExamplesTable.js';
11
+ export * from './Feature.js';
12
+ export * from './GherkinDocument.js';
13
+ export * from './GherkinStep.js';
14
+ export * from './GherkinSteps.js';
15
+ export * from './HookStep.js';
16
+ export * from './HookSteps.js';
17
+ export * from './Keyword.js';
18
+ export * from './MDG.js';
19
+ export * from './Parameter.js';
20
+ export * from './Rule.js';
21
+ export * from './Scenario.js';
22
+ export * from './StatusIcon.js';
23
+ export * from './StepItem.js';
24
+ export * from './Tags.js';
25
+ export * from './Title.js';
42
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,+CAA4B;AAC5B,+CAA4B;AAC5B,6CAA0B;AAC1B,8CAA2B;AAC3B,gDAA6B;AAC7B,8CAA2B;AAC3B,iDAA8B;AAC9B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,oDAAiC;AACjC,gDAA6B;AAC7B,iDAA8B;AAC9B,6CAA0B;AAC1B,8CAA2B;AAC3B,4CAAyB;AACzB,wCAAqB;AACrB,8CAA2B;AAC3B,yCAAsB;AACtB,6CAA0B;AAC1B,+CAA4B;AAC5B,6CAA0B;AAC1B,yCAAsB;AACtB,0CAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  // Lifted from cucumber-expressions/javascript/src/ParameterTypeRegistry#FLOAT_REGEXP
4
2
  const numberPattern = /(?=.*\d.*)[-+]?\d*(?:\.(?=\d.*))?\d*(?:\d+[E][+-]?\d+)?/;
5
- function isNumber(s) {
3
+ export default function isNumber(s) {
6
4
  return !!s.match(numberPattern);
7
5
  }
8
- exports.default = isNumber;
9
6
  //# sourceMappingURL=isNumber.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isNumber.js","sourceRoot":"","sources":["../../../../src/components/gherkin/isNumber.ts"],"names":[],"mappings":";;AAAA,qFAAqF;AACrF,MAAM,aAAa,GAAG,yDAAyD,CAAA;AAE/E,SAAwB,QAAQ,CAAC,CAAS;IACxC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AACjC,CAAC;AAFD,2BAEC"}
1
+ {"version":3,"file":"isNumber.js","sourceRoot":"","sources":["../../../../src/components/gherkin/isNumber.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,aAAa,GAAG,yDAAyD,CAAA;AAE/E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAS;IACxC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AACjC,CAAC"}
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = (status) => {
1
+ export default (status) => {
4
2
  return status.toLowerCase();
5
3
  };
6
4
  //# sourceMappingURL=statusName.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"statusName.js","sourceRoot":"","sources":["../../../../src/components/gherkin/statusName.ts"],"names":[],"mappings":";;AAEA,kBAAe,CAAC,MAAqC,EAAU,EAAE;IAC/D,OAAO,MAAM,CAAC,WAAW,EAAE,CAAA;AAC7B,CAAC,CAAA"}
1
+ {"version":3,"file":"statusName.js","sourceRoot":"","sources":["../../../../src/components/gherkin/statusName.ts"],"names":[],"mappings":"AAEA,eAAe,CAAC,MAAqC,EAAU,EAAE;IAC/D,OAAO,MAAM,CAAC,WAAW,EAAE,CAAA;AAC7B,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
- export * as app from './app';
2
- export * from './CucumberReact';
3
- export * as customise from './customise';
4
- export * as gherkin from './gherkin';
1
+ export * as app from './app/index.js';
2
+ export * from './CucumberReact.js';
3
+ export * as customise from './customise/index.js';
4
+ export * as gherkin from './gherkin/index.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA"}
@@ -1,34 +1,5 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.gherkin = exports.customise = exports.app = void 0;
30
- exports.app = __importStar(require("./app"));
31
- __exportStar(require("./CucumberReact"), exports);
32
- exports.customise = __importStar(require("./customise"));
33
- exports.gherkin = __importStar(require("./gherkin"));
1
+ export * as app from './app/index.js';
2
+ export * from './CucumberReact.js';
3
+ export * as customise from './customise/index.js';
4
+ export * as gherkin from './gherkin/index.js';
34
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA4B;AAC5B,kDAA+B;AAC/B,yDAAwC;AACxC,qDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { TestStepResult } from '@cucumber/messages';
2
+ import { FC } from 'react';
3
+ export declare const TestStepResultDetails: FC<TestStepResult>;
4
+ //# sourceMappingURL=TestStepResultDetails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestStepResultDetails.d.ts","sourceRoot":"","sources":["../../../../src/components/results/TestStepResultDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAIjC,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,cAAc,CAapD,CAAA"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { ErrorMessage } from '../gherkin/index.js';
3
+ export const TestStepResultDetails = ({ message, exception }) => {
4
+ if (exception) {
5
+ return (React.createElement(ErrorMessage, null,
6
+ React.createElement("strong", null, exception.type),
7
+ " ",
8
+ exception.message,
9
+ exception.stackTrace && React.createElement("div", null, exception.stackTrace)));
10
+ }
11
+ if (message) {
12
+ return React.createElement(ErrorMessage, null, message);
13
+ }
14
+ return null;
15
+ };
16
+ //# sourceMappingURL=TestStepResultDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestStepResultDetails.js","sourceRoot":"","sources":["../../../../src/components/results/TestStepResultDetails.tsx"],"names":[],"mappings":"AACA,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAuB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;IAClF,IAAI,SAAS,EAAE;QACb,OAAO,CACL,oBAAC,YAAY;YACX,oCAAS,SAAS,CAAC,IAAI,CAAU;;YAAE,SAAS,CAAC,OAAO;YACnD,SAAS,CAAC,UAAU,IAAI,iCAAM,SAAS,CAAC,UAAU,CAAO,CAC7C,CAChB,CAAA;KACF;IACD,IAAI,OAAO,EAAE;QACX,OAAO,oBAAC,YAAY,QAAE,OAAO,CAAgB,CAAA;KAC9C;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './TestStepResultDetails.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/results/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './TestStepResultDetails.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/results/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA"}
@@ -1,7 +1,8 @@
1
1
  import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
2
2
  import { TestStepResultStatus } from '@cucumber/messages';
3
3
  import { Query as CucumberQuery } from '@cucumber/query';
4
- import { EnvelopesQuery } from './EnvelopesQueryContext';
4
+ import { EnvelopesQuery } from './EnvelopesQueryContext.js';
5
+ export declare const allStatuses: readonly [TestStepResultStatus.UNKNOWN, TestStepResultStatus.SKIPPED, TestStepResultStatus.FAILED, TestStepResultStatus.PASSED, TestStepResultStatus.AMBIGUOUS, TestStepResultStatus.PENDING, TestStepResultStatus.UNDEFINED];
5
6
  export declare function makeEmptyScenarioCountsByStatus(): Record<TestStepResultStatus, number>;
6
7
  export default function countScenariosByStatuses(gherkinQuery: GherkinQuery, cucumberQuery: CucumberQuery, envelopesQuery: EnvelopesQuery): {
7
8
  scenarioCountByStatus: Record<TestStepResultStatus, number>;
@@ -1 +1 @@
1
- {"version":3,"file":"countScenariosByStatuses.d.ts","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtF,OAAO,EAA0B,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACjF,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,wBAAgB,+BAA+B,IAAI,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAUtF;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC7B;IACD,qBAAqB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAA;IAC3D,qBAAqB,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACtD,kBAAkB,EAAE,MAAM,CAAA;CAC3B,CAsCA"}
1
+ {"version":3,"file":"countScenariosByStatuses.d.ts","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAA0B,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACjF,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAE3D,eAAO,MAAM,WAAW,+NAQd,CAAA;AAEV,wBAAgB,+BAA+B,IAAI,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAUtF;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC7B;IACD,qBAAqB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAA;IAC3D,qBAAqB,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACtD,kBAAkB,EAAE,MAAM,CAAA;CAC3B,CAyBA"}
@@ -1,39 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeEmptyScenarioCountsByStatus = void 0;
4
- const gherkin_utils_1 = require("@cucumber/gherkin-utils");
5
- const messages_1 = require("@cucumber/messages");
6
- function makeEmptyScenarioCountsByStatus() {
1
+ import { getWorstTestStepResult, TestStepResultStatus } from '@cucumber/messages';
2
+ export const allStatuses = [
3
+ TestStepResultStatus.UNKNOWN,
4
+ TestStepResultStatus.SKIPPED,
5
+ TestStepResultStatus.FAILED,
6
+ TestStepResultStatus.PASSED,
7
+ TestStepResultStatus.AMBIGUOUS,
8
+ TestStepResultStatus.PENDING,
9
+ TestStepResultStatus.UNDEFINED,
10
+ ];
11
+ export function makeEmptyScenarioCountsByStatus() {
7
12
  return {
8
- [messages_1.TestStepResultStatus.UNKNOWN]: 0,
9
- [messages_1.TestStepResultStatus.SKIPPED]: 0,
10
- [messages_1.TestStepResultStatus.FAILED]: 0,
11
- [messages_1.TestStepResultStatus.PASSED]: 0,
12
- [messages_1.TestStepResultStatus.AMBIGUOUS]: 0,
13
- [messages_1.TestStepResultStatus.PENDING]: 0,
14
- [messages_1.TestStepResultStatus.UNDEFINED]: 0,
13
+ [TestStepResultStatus.UNKNOWN]: 0,
14
+ [TestStepResultStatus.SKIPPED]: 0,
15
+ [TestStepResultStatus.FAILED]: 0,
16
+ [TestStepResultStatus.PASSED]: 0,
17
+ [TestStepResultStatus.AMBIGUOUS]: 0,
18
+ [TestStepResultStatus.PENDING]: 0,
19
+ [TestStepResultStatus.UNDEFINED]: 0,
15
20
  };
16
21
  }
17
- exports.makeEmptyScenarioCountsByStatus = makeEmptyScenarioCountsByStatus;
18
- function countScenariosByStatuses(gherkinQuery, cucumberQuery, envelopesQuery) {
22
+ export default function countScenariosByStatuses(gherkinQuery, cucumberQuery, envelopesQuery) {
19
23
  const scenarioCountByStatus = makeEmptyScenarioCountsByStatus();
20
- for (const gherkinDocument of gherkinQuery.getGherkinDocuments()) {
21
- const counter = new gherkin_utils_1.GherkinDocumentWalker({}, {
22
- handleScenario: (scenario) => {
23
- if (!gherkinDocument.uri)
24
- throw new Error('Missing uri on gherkinDocument');
25
- const pickleIds = gherkinQuery.getPickleIds(gherkinDocument.uri, scenario.id);
26
- pickleIds.forEach((pickleId) => {
27
- // if no test case then this pickle was omitted by filtering e.g. tags
28
- if (envelopesQuery.hasTestCase(pickleId)) {
29
- const status = (0, messages_1.getWorstTestStepResult)(cucumberQuery.getPickleTestStepResults([pickleId])).status;
30
- scenarioCountByStatus[status] = scenarioCountByStatus[status] + 1;
31
- }
32
- });
33
- },
34
- });
35
- counter.walkGherkinDocument(gherkinDocument);
36
- }
24
+ gherkinQuery
25
+ .getPickles()
26
+ .filter((pickle) => envelopesQuery.hasTestCase(pickle.id))
27
+ .forEach((pickle) => {
28
+ const status = getWorstTestStepResult(cucumberQuery.getPickleTestStepResults([pickle.id])).status;
29
+ scenarioCountByStatus[status] = scenarioCountByStatus[status] + 1;
30
+ });
37
31
  const statusesWithScenarios = Object.entries(scenarioCountByStatus)
38
32
  .filter(([, value]) => {
39
33
  return value > 0;
@@ -42,5 +36,4 @@ function countScenariosByStatuses(gherkinQuery, cucumberQuery, envelopesQuery) {
42
36
  const totalScenarioCount = [...Object.values(scenarioCountByStatus)].reduce((prev, curr) => prev + curr, 0);
43
37
  return { scenarioCountByStatus, statusesWithScenarios, totalScenarioCount };
44
38
  }
45
- exports.default = countScenariosByStatuses;
46
39
  //# sourceMappingURL=countScenariosByStatuses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"countScenariosByStatuses.js","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":";;;AAAA,2DAAsF;AACtF,iDAAiF;AAKjF,SAAgB,+BAA+B;IAC7C,OAAO;QACL,CAAC,+BAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,+BAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,+BAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,CAAC,+BAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,CAAC,+BAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,CAAC,+BAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,+BAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;KACpC,CAAA;AACH,CAAC;AAVD,0EAUC;AAED,SAAwB,wBAAwB,CAC9C,YAA0B,EAC1B,aAA4B,EAC5B,cAA8B;IAM9B,MAAM,qBAAqB,GAAG,+BAA+B,EAAE,CAAA;IAE/D,KAAK,MAAM,eAAe,IAAI,YAAY,CAAC,mBAAmB,EAAE,EAAE;QAChE,MAAM,OAAO,GAAG,IAAI,qCAAqB,CACvC,EAAE,EACF;YACE,cAAc,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC3B,IAAI,CAAC,eAAe,CAAC,GAAG;oBAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;gBAC3E,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAA;gBAE7E,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;oBAC7B,sEAAsE;oBACtE,IAAI,cAAc,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE;wBACxC,MAAM,MAAM,GAAG,IAAA,iCAAsB,EACnC,aAAa,CAAC,wBAAwB,CAAC,CAAC,QAAQ,CAAC,CAAC,CACnD,CAAC,MAAM,CAAA;wBACR,qBAAqB,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;qBAClE;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;SACF,CACF,CAAA;QACD,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAA;KAC7C;IAED,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC;SAChE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE;QACpB,OAAO,KAAK,GAAG,CAAC,CAAA;IAClB,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAA2B,CAAA;IAEhD,MAAM,kBAAkB,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CACzE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,EAC3B,CAAC,CACF,CAAA;IAED,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,CAAA;AAC7E,CAAC;AA9CD,2CA8CC"}
1
+ {"version":3,"file":"countScenariosByStatuses.js","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAKjF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,MAAM;IAC3B,oBAAoB,CAAC,MAAM;IAC3B,oBAAoB,CAAC,SAAS;IAC9B,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,SAAS;CACtB,CAAA;AAEV,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;KACpC,CAAA;AACH,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,YAA0B,EAC1B,aAA4B,EAC5B,cAA8B;IAM9B,MAAM,qBAAqB,GAAG,+BAA+B,EAAE,CAAA;IAE/D,YAAY;SACT,UAAU,EAAE;SACZ,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;SACzD,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClB,MAAM,MAAM,GAAG,sBAAsB,CACnC,aAAa,CAAC,wBAAwB,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CACpD,CAAC,MAAM,CAAA;QACR,qBAAqB,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACnE,CAAC,CAAC,CAAA;IAEJ,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC;SAChE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE;QACpB,OAAO,KAAK,GAAG,CAAC,CAAA;IAClB,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAA2B,CAAA;IAEhD,MAAM,kBAAkB,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CACzE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,EAC3B,CAAC,CACF,CAAA;IAED,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,CAAA;AAC7E,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
2
2
  import * as messages from '@cucumber/messages';
3
3
  import { Query as CucumberQuery } from '@cucumber/query';
4
- export default function filterByStatus(gherkinDocument: messages.GherkinDocument, gherkinQuery: GherkinQuery, cucumberQuery: CucumberQuery, statuses: readonly messages.TestStepResultStatus[]): messages.GherkinDocument | null;
4
+ import { EnvelopesQuery } from '../EnvelopesQueryContext.js';
5
+ export default function filterByStatus(gherkinDocument: messages.GherkinDocument, gherkinQuery: GherkinQuery, cucumberQuery: CucumberQuery, envelopesQuery: EnvelopesQuery, statuses: readonly messages.TestStepResultStatus[]): messages.GherkinDocument | null;
5
6
  //# sourceMappingURL=filterByStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filterByStatus.d.ts","sourceRoot":"","sources":["../../../src/filter/filterByStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE/D,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,eAAe,EAAE,QAAQ,CAAC,eAAe,EACzC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,SAAS,QAAQ,CAAC,oBAAoB,EAAE,GACjD,QAAQ,CAAC,eAAe,GAAG,IAAI,CAsBjC"}
1
+ {"version":3,"file":"filterByStatus.d.ts","sourceRoot":"","sources":["../../../src/filter/filterByStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE/D,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,eAAe,EAAE,QAAQ,CAAC,eAAe,EACzC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,SAAS,QAAQ,CAAC,oBAAoB,EAAE,GACjD,QAAQ,CAAC,eAAe,GAAG,IAAI,CAsBjC"}
@@ -1,20 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const gherkin_utils_1 = require("@cucumber/gherkin-utils");
4
- const messages_1 = require("@cucumber/messages");
5
- function filterByStatus(gherkinDocument, gherkinQuery, cucumberQuery, statuses) {
1
+ import { GherkinDocumentWalker, rejectAllFilters } from '@cucumber/gherkin-utils';
2
+ import { getWorstTestStepResult } from '@cucumber/messages';
3
+ export default function filterByStatus(gherkinDocument, gherkinQuery, cucumberQuery, envelopesQuery, statuses) {
6
4
  const filters = {
7
5
  acceptScenario: (scenario) => {
8
6
  if (!gherkinDocument.uri)
9
7
  throw new Error('Missing uri for gherkinDocument');
10
8
  const pickleIds = gherkinQuery.getPickleIds(gherkinDocument.uri, scenario.id);
11
9
  return pickleIds
12
- .map((pickleId) => statuses.includes((0, messages_1.getWorstTestStepResult)(cucumberQuery.getPickleTestStepResults([pickleId])).status))
13
- .includes(true);
10
+ .filter((pickleId) => envelopesQuery.hasTestCase(pickleId))
11
+ .some((pickleId) => statuses.includes(getWorstTestStepResult(cucumberQuery.getPickleTestStepResults([pickleId])).status));
14
12
  },
15
13
  };
16
- const walker = new gherkin_utils_1.GherkinDocumentWalker(Object.assign(Object.assign({}, gherkin_utils_1.rejectAllFilters), filters));
14
+ const walker = new GherkinDocumentWalker({
15
+ ...rejectAllFilters,
16
+ ...filters,
17
+ });
17
18
  return walker.walkGherkinDocument(gherkinDocument);
18
19
  }
19
- exports.default = filterByStatus;
20
20
  //# sourceMappingURL=filterByStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filterByStatus.js","sourceRoot":"","sources":["../../../src/filter/filterByStatus.ts"],"names":[],"mappings":";;AACA,2DAAiF;AAEjF,iDAA2D;AAG3D,SAAwB,cAAc,CACpC,eAAyC,EACzC,YAA0B,EAC1B,aAA4B,EAC5B,QAAkD;IAElD,MAAM,OAAO,GAAG;QACd,cAAc,EAAE,CAAC,QAA2B,EAAE,EAAE;YAC9C,IAAI,CAAC,eAAe,CAAC,GAAG;gBAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;YAC5E,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAA;YAE7E,OAAO,SAAS;iBACb,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAChB,QAAQ,CAAC,QAAQ,CACf,IAAA,iCAAsB,EAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAClF,CACF;iBACA,QAAQ,CAAC,IAAI,CAAC,CAAA;QACnB,CAAC;KACF,CAAA;IAED,MAAM,MAAM,GAAG,IAAI,qCAAqB,iCACnC,gCAAgB,GAChB,OAAO,EACV,CAAA;IAEF,OAAO,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAA;AACpD,CAAC;AA3BD,iCA2BC"}
1
+ {"version":3,"file":"filterByStatus.js","sourceRoot":"","sources":["../../../src/filter/filterByStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAEjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAK3D,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,eAAyC,EACzC,YAA0B,EAC1B,aAA4B,EAC5B,cAA8B,EAC9B,QAAkD;IAElD,MAAM,OAAO,GAAG;QACd,cAAc,EAAE,CAAC,QAA2B,EAAE,EAAE;YAC9C,IAAI,CAAC,eAAe,CAAC,GAAG;gBAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;YAC5E,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAA;YAE7E,OAAO,SAAS;iBACb,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;iBAC1D,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACjB,QAAQ,CAAC,QAAQ,CACf,sBAAsB,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAClF,CACF,CAAA;QACL,CAAC;KACF,CAAA;IAED,MAAM,MAAM,GAAG,IAAI,qBAAqB,CAAC;QACvC,GAAG,gBAAgB;QACnB,GAAG,OAAO;KACX,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAA;AACpD,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from './useQueries';
2
- export * from './useSearch';
1
+ export * from './useQueries.js';
2
+ export * from './useSearch.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
@@ -1,19 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./useQueries"), exports);
18
- __exportStar(require("./useSearch"), exports);
1
+ export * from './useQueries.js';
2
+ export * from './useSearch.js';
19
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,8CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { GherkinDocument, TestStepResultStatus } from '@cucumber/messages';
2
+ export declare function useFilteredDocuments(query: string, hideStatuses: readonly TestStepResultStatus[]): GherkinDocument[] | undefined;
3
+ //# sourceMappingURL=useFilteredDocuments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFilteredDocuments.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFilteredDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAQ1E,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,SAAS,oBAAoB,EAAE,GAC5C,eAAe,EAAE,GAAG,SAAS,CA6B/B"}
@@ -0,0 +1,27 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { allStatuses } from '../countScenariosByStatuses.js';
3
+ import filterByStatus from '../filter/filterByStatus.js';
4
+ import { createSearch } from '../search/index.js';
5
+ import { useQueries } from './useQueries.js';
6
+ export function useFilteredDocuments(query, hideStatuses) {
7
+ const { gherkinQuery, cucumberQuery, envelopesQuery } = useQueries();
8
+ const [searchable, setSearchable] = useState();
9
+ const [results, setResults] = useState();
10
+ useEffect(() => {
11
+ createSearch(gherkinQuery).then((created) => setSearchable(created));
12
+ }, [gherkinQuery]);
13
+ useEffect(() => {
14
+ if (!searchable) {
15
+ return;
16
+ }
17
+ ;
18
+ (query ? searchable.search(query) : Promise.resolve(gherkinQuery.getGherkinDocuments())).then((searched) => {
19
+ const filtered = searched
20
+ .map((document) => filterByStatus(document, gherkinQuery, cucumberQuery, envelopesQuery, allStatuses.filter((s) => !hideStatuses.includes(s))))
21
+ .filter((document) => document !== null);
22
+ setResults(filtered);
23
+ });
24
+ }, [query, hideStatuses, gherkinQuery, cucumberQuery, envelopesQuery, searchable]);
25
+ return results;
26
+ }
27
+ //# sourceMappingURL=useFilteredDocuments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFilteredDocuments.js","sourceRoot":"","sources":["../../../src/hooks/useFilteredDocuments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,cAAc,MAAM,6BAA6B,CAAA;AACxD,OAAO,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,UAAU,oBAAoB,CAClC,KAAa,EACb,YAA6C;IAE7C,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAA;IACpE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,EAAc,CAAA;IAC1D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAqB,CAAA;IAC3D,SAAS,CAAC,GAAG,EAAE;QACb,YAAY,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAA;IAClB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,UAAU,EAAE;YACf,OAAM;SACP;QACD,CAAC;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,IAAI,CAC5F,CAAC,QAAQ,EAAE,EAAE;YACX,MAAM,QAAQ,GAAG,QAAQ;iBACtB,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAChB,cAAc,CACZ,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACrD,CACF;iBACA,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,CAAsB,CAAA;YAC/D,UAAU,CAAC,QAAQ,CAAC,CAAA;QACtB,CAAC,CACF,CAAA;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC,CAAA;IAClF,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
2
2
  import { Query as CucumberQuery } from '@cucumber/query';
3
- import { EnvelopesQuery } from '../EnvelopesQueryContext';
3
+ import { EnvelopesQuery } from '../EnvelopesQueryContext.js';
4
4
  interface IQueries {
5
5
  cucumberQuery: CucumberQuery;
6
6
  gherkinQuery: GherkinQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"useQueries.d.ts","sourceRoot":"","sources":["../../../src/hooks/useQueries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAIxD,OAA8B,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAGhF,UAAU,QAAQ;IAChB,aAAa,EAAE,aAAa,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,cAAc,EAAE,cAAc,CAAA;CAC/B;AAED,wBAAgB,UAAU,IAAI,QAAQ,CAKrC"}
1
+ {"version":3,"file":"useQueries.d.ts","sourceRoot":"","sources":["../../../src/hooks/useQueries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAIxD,OAA8B,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAGnF,UAAU,QAAQ;IAChB,aAAa,EAAE,aAAa,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,cAAc,EAAE,cAAc,CAAA;CAC/B;AAED,wBAAgB,UAAU,IAAI,QAAQ,CAKrC"}
@@ -1,18 +1,11 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useQueries = void 0;
7
- const react_1 = require("react");
8
- const CucumberQueryContext_1 = __importDefault(require("../CucumberQueryContext"));
9
- const EnvelopesQueryContext_1 = __importDefault(require("../EnvelopesQueryContext"));
10
- const GherkinQueryContext_1 = __importDefault(require("../GherkinQueryContext"));
11
- function useQueries() {
12
- const envelopesQuery = (0, react_1.useContext)(EnvelopesQueryContext_1.default);
13
- const gherkinQuery = (0, react_1.useContext)(GherkinQueryContext_1.default);
14
- const cucumberQuery = (0, react_1.useContext)(CucumberQueryContext_1.default);
1
+ import { useContext } from 'react';
2
+ import CucumberQueryContext from '../CucumberQueryContext.js';
3
+ import EnvelopesQueryContext from '../EnvelopesQueryContext.js';
4
+ import GherkinQueryContext from '../GherkinQueryContext.js';
5
+ export function useQueries() {
6
+ const envelopesQuery = useContext(EnvelopesQueryContext);
7
+ const gherkinQuery = useContext(GherkinQueryContext);
8
+ const cucumberQuery = useContext(CucumberQueryContext);
15
9
  return { cucumberQuery, gherkinQuery, envelopesQuery };
16
10
  }
17
- exports.useQueries = useQueries;
18
11
  //# sourceMappingURL=useQueries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useQueries.js","sourceRoot":"","sources":["../../../src/hooks/useQueries.ts"],"names":[],"mappings":";;;;;;AAEA,iCAAkC;AAElC,mFAA0D;AAC1D,qFAAgF;AAChF,iFAAwD;AAQxD,SAAgB,UAAU;IACxB,MAAM,cAAc,GAAG,IAAA,kBAAU,EAAC,+BAAqB,CAAC,CAAA;IACxD,MAAM,YAAY,GAAG,IAAA,kBAAU,EAAC,6BAAmB,CAAC,CAAA;IACpD,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,8BAAoB,CAAC,CAAA;IACtD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,CAAA;AACxD,CAAC;AALD,gCAKC"}
1
+ {"version":3,"file":"useQueries.js","sourceRoot":"","sources":["../../../src/hooks/useQueries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,oBAAoB,MAAM,4BAA4B,CAAA;AAC7D,OAAO,qBAAyC,MAAM,6BAA6B,CAAA;AACnF,OAAO,mBAAmB,MAAM,2BAA2B,CAAA;AAQ3D,MAAM,UAAU,UAAU;IACxB,MAAM,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAA;IACxD,MAAM,YAAY,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAA;IACpD,MAAM,aAAa,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAA;IACtD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,CAAA;AACxD,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function useResultStatistics(): {
2
+ scenarioCountByStatus: Record<import("@cucumber/messages").TestStepResultStatus, number>;
3
+ statusesWithScenarios: readonly import("@cucumber/messages").TestStepResultStatus[];
4
+ totalScenarioCount: number;
5
+ };
6
+ //# sourceMappingURL=useResultStatistics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResultStatistics.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResultStatistics.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB;;;;EAGlC"}
@@ -0,0 +1,7 @@
1
+ import countScenariosByStatuses from '../countScenariosByStatuses.js';
2
+ import { useQueries } from './useQueries.js';
3
+ export function useResultStatistics() {
4
+ const { gherkinQuery, cucumberQuery, envelopesQuery } = useQueries();
5
+ return countScenariosByStatuses(gherkinQuery, cucumberQuery, envelopesQuery);
6
+ }
7
+ //# sourceMappingURL=useResultStatistics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResultStatistics.js","sourceRoot":"","sources":["../../../src/hooks/useResultStatistics.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,gCAAgC,CAAA;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,UAAU,mBAAmB;IACjC,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAA;IACpE,OAAO,wBAAwB,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,CAAA;AAC9E,CAAC"}
@@ -1,3 +1,3 @@
1
- import { SearchQueryCtx } from '../SearchQueryContext';
1
+ import { SearchQueryCtx } from '../SearchQueryContext.js';
2
2
  export declare function useSearch(): SearchQueryCtx;
3
3
  //# sourceMappingURL=useSearch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSearch.ts"],"names":[],"mappings":"AAEA,OAA2B,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE1E,wBAAgB,SAAS,IAAI,cAAc,CAE1C"}
1
+ {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSearch.ts"],"names":[],"mappings":"AAEA,OAA2B,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE7E,wBAAgB,SAAS,IAAI,cAAc,CAE1C"}
@@ -1,13 +1,6 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useSearch = void 0;
7
- const react_1 = require("react");
8
- const SearchQueryContext_1 = __importDefault(require("../SearchQueryContext"));
9
- function useSearch() {
10
- return (0, react_1.useContext)(SearchQueryContext_1.default);
1
+ import { useContext } from 'react';
2
+ import SearchQueryContext from '../SearchQueryContext.js';
3
+ export function useSearch() {
4
+ return useContext(SearchQueryContext);
11
5
  }
12
- exports.useSearch = useSearch;
13
6
  //# sourceMappingURL=useSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.js","sourceRoot":"","sources":["../../../src/hooks/useSearch.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAkC;AAElC,+EAA0E;AAE1E,SAAgB,SAAS;IACvB,OAAO,IAAA,kBAAU,EAAC,4BAAkB,CAAC,CAAA;AACvC,CAAC;AAFD,8BAEC"}
1
+ {"version":3,"file":"useSearch.js","sourceRoot":"","sources":["../../../src/hooks/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,kBAAsC,MAAM,0BAA0B,CAAA;AAE7E,MAAM,UAAU,SAAS;IACvB,OAAO,UAAU,CAAC,kBAAkB,CAAC,CAAA;AACvC,CAAC"}
@@ -1,9 +1,9 @@
1
- import CucumberQueryContext from './CucumberQueryContext';
2
- import EnvelopesQueryContext, { EnvelopesQuery } from './EnvelopesQueryContext';
3
- import filterByStatus from './filter/filterByStatus';
4
- import GherkinQueryContext from './GherkinQueryContext';
5
- import SearchQueryContext, { searchFromURLParams, SearchQueryProps, SearchQueryUpdateFn, WindowUrlApi } from './SearchQueryContext';
6
- export * as components from './components/index';
7
- export * as hooks from './hooks/index';
1
+ import CucumberQueryContext from './CucumberQueryContext.js';
2
+ import EnvelopesQueryContext, { EnvelopesQuery } from './EnvelopesQueryContext.js';
3
+ import filterByStatus from './filter/filterByStatus.js';
4
+ import GherkinQueryContext from './GherkinQueryContext.js';
5
+ import SearchQueryContext, { searchFromURLParams, SearchQueryProps, SearchQueryUpdateFn, WindowUrlApi } from './SearchQueryContext.js';
6
+ export * as components from './components/index.js';
7
+ export * as hooks from './hooks/index.js';
8
8
  export { CucumberQueryContext, EnvelopesQuery, EnvelopesQueryContext, filterByStatus, GherkinQueryContext, searchFromURLParams, SearchQueryContext, SearchQueryProps, SearchQueryUpdateFn, WindowUrlApi, };
9
9
  //# sourceMappingURL=index.d.ts.map