@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,40 +1,33 @@
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.GherkinStep = void 0;
7
- const messages_1 = require("@cucumber/messages");
8
- const react_1 = __importDefault(require("react"));
9
- const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
10
- const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
11
- const HighLight_1 = require("../app/HighLight");
12
- const customise_1 = require("../customise");
13
- const Attachment_1 = require("./Attachment");
14
- const DataTable_1 = require("./DataTable");
15
- const DocString_1 = require("./DocString");
16
- const ErrorMessage_1 = require("./ErrorMessage");
17
- const Keyword_1 = require("./Keyword");
18
- const Parameter_1 = require("./Parameter");
19
- const StepItem_1 = require("./StepItem");
20
- const Title_1 = require("./Title");
1
+ import { getWorstTestStepResult, } from '@cucumber/messages';
2
+ import React from 'react';
3
+ import CucumberQueryContext from '../../CucumberQueryContext.js';
4
+ import GherkinQueryContext from '../../GherkinQueryContext.js';
5
+ import { HighLight } from '../app/HighLight.js';
6
+ import { useCustomRendering } from '../customise/index.js';
7
+ import { TestStepResultDetails } from '../results/index.js';
8
+ import { Attachment } from './Attachment.js';
9
+ import { DataTable as DataTableComponent } from './DataTable.js';
10
+ import { DocString as DocStringComponent } from './DocString.js';
11
+ import { Keyword } from './Keyword.js';
12
+ import { Parameter } from './Parameter.js';
13
+ import { StepItem } from './StepItem.js';
14
+ import { Title } from './Title.js';
21
15
  function resolveStep(gherkinStep, pickleStep) {
22
- var _a, _b;
23
- const step = Object.assign({}, gherkinStep);
16
+ const step = { ...gherkinStep };
24
17
  if (pickleStep) {
25
18
  step.text = pickleStep.text;
26
- step.dataTable = (_a = pickleStep.argument) === null || _a === void 0 ? void 0 : _a.dataTable;
27
- step.docString = (_b = pickleStep.argument) === null || _b === void 0 ? void 0 : _b.docString;
19
+ step.dataTable = pickleStep.argument?.dataTable;
20
+ step.docString = pickleStep.argument?.docString;
28
21
  }
29
22
  return step;
30
23
  }
31
24
  const DefaultRenderer = ({ step: gherkinStep, pickleStep, hasExamples, }) => {
32
25
  const step = resolveStep(gherkinStep, pickleStep);
33
- const gherkinQuery = react_1.default.useContext(GherkinQueryContext_1.default);
34
- const cucumberQuery = react_1.default.useContext(CucumberQueryContext_1.default);
26
+ const gherkinQuery = React.useContext(GherkinQueryContext);
27
+ const cucumberQuery = React.useContext(CucumberQueryContext);
35
28
  const pickleStepIds = pickleStep ? [pickleStep.id] : gherkinQuery.getPickleStepIds(step.id);
36
29
  const pickleStepTestStepResults = cucumberQuery.getPickleStepTestStepResults(pickleStepIds);
37
- const testStepResult = (0, messages_1.getWorstTestStepResult)(pickleStepTestStepResults);
30
+ const testStepResult = getWorstTestStepResult(pickleStepTestStepResults);
38
31
  const attachments = cucumberQuery.getPickleStepAttachments(pickleStepIds);
39
32
  const stepTextElements = [];
40
33
  if (!hasExamples) {
@@ -53,48 +46,47 @@ const DefaultRenderer = ({ step: gherkinStep, pickleStep, hasExamples, }) => {
53
46
  stepMatchArguments.forEach((argument, index) => {
54
47
  plain = step.text.slice(offset, argument.group.start);
55
48
  if (plain.length > 0) {
56
- stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-${index}`, text: plain }));
49
+ stepTextElements.push(React.createElement(HighLight, { key: `plain-${index}`, text: plain }));
57
50
  }
58
51
  const arg = argument.group.value;
59
52
  if (arg) {
60
53
  if (arg.length > 0) {
61
- stepTextElements.push(react_1.default.createElement(Parameter_1.Parameter, { parameterTypeName: argument.parameterTypeName || 'anonymous', value: arg, key: `param-${index}` },
62
- react_1.default.createElement(HighLight_1.HighLight, { text: arg })));
54
+ stepTextElements.push(React.createElement(Parameter, { parameterTypeName: argument.parameterTypeName || 'anonymous', value: arg, key: `param-${index}` },
55
+ React.createElement(HighLight, { text: arg })));
63
56
  }
64
57
  offset += plain.length + arg.length;
65
58
  }
66
59
  });
67
60
  plain = step.text.slice(offset);
68
61
  if (plain.length > 0) {
69
- stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-rest`, text: plain }));
62
+ stepTextElements.push(React.createElement(HighLight, { key: `plain-rest`, text: plain }));
70
63
  }
71
64
  }
72
65
  else if (stepMatchArgumentsLists.length >= 2) {
73
66
  // Step is ambiguous
74
- stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-ambiguous`, text: step.text }));
67
+ stepTextElements.push(React.createElement(HighLight, { key: `plain-ambiguous`, text: step.text }));
75
68
  }
76
69
  else {
77
70
  // Step is undefined
78
- stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-undefined`, text: step.text }));
71
+ stepTextElements.push(React.createElement(HighLight, { key: `plain-undefined`, text: step.text }));
79
72
  }
80
73
  }
81
74
  else {
82
75
  // Step is from scenario with examples, and has <> placeholders.
83
- stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-placeholders`, text: step.text }));
76
+ stepTextElements.push(React.createElement(HighLight, { key: `plain-placeholders`, text: step.text }));
84
77
  }
85
- return (react_1.default.createElement(StepItem_1.StepItem, { status: testStepResult.status },
86
- react_1.default.createElement(Title_1.Title, { header: "h3", id: step.id },
87
- react_1.default.createElement(Keyword_1.Keyword, null, step.keyword.trim()),
88
- react_1.default.createElement("span", null, stepTextElements)),
89
- step.dataTable && react_1.default.createElement(DataTable_1.DataTable, { dataTable: step.dataTable }),
90
- step.docString && react_1.default.createElement(DocString_1.DocString, { docString: step.docString }),
91
- !hasExamples && testStepResult.message && react_1.default.createElement(ErrorMessage_1.ErrorMessage, { message: testStepResult.message }),
78
+ return (React.createElement(StepItem, { status: testStepResult.status },
79
+ React.createElement(Title, { header: "h3", id: step.id },
80
+ React.createElement(Keyword, null, step.keyword.trim()),
81
+ React.createElement("span", null, stepTextElements)),
82
+ step.dataTable && React.createElement(DataTableComponent, { dataTable: step.dataTable }),
83
+ step.docString && React.createElement(DocStringComponent, { docString: step.docString }),
84
+ !hasExamples && React.createElement(TestStepResultDetails, { ...testStepResult }),
92
85
  !hasExamples &&
93
- attachments.map((attachment, i) => react_1.default.createElement(Attachment_1.Attachment, { key: i, attachment: attachment }))));
86
+ attachments.map((attachment, i) => React.createElement(Attachment, { key: i, attachment: attachment }))));
94
87
  };
95
- const GherkinStep = (props) => {
96
- const ResolvedRenderer = (0, customise_1.useCustomRendering)('GherkinStep', {}, DefaultRenderer);
97
- return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
88
+ export const GherkinStep = (props) => {
89
+ const ResolvedRenderer = useCustomRendering('GherkinStep', {}, DefaultRenderer);
90
+ return React.createElement(ResolvedRenderer, { ...props });
98
91
  };
99
- exports.GherkinStep = GherkinStep;
100
92
  //# sourceMappingURL=GherkinStep.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"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IAAI,CAAC,SAAS,IAAI,oBAAC,kBAAkB,IAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAI;QACnE,CAAC,WAAW,IAAI,oBAAC,qBAAqB,OAAK,cAAc,GAAI;QAC7D,CAAC,WAAW;YACX,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,oBAAC,UAAU,IAAC,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,UAAU,GAAI,CAAC,CAC3E,CACZ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAA8C,CAAC,KAAK,EAAE,EAAE;IAC9E,MAAM,gBAAgB,GAAG,kBAAkB,CAAmB,aAAa,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IACjG,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { GherkinStepsProps } from '../customise';
2
+ import { GherkinStepsProps } from '../customise/index.js';
3
3
  export declare const GherkinSteps: React.FunctionComponent<GherkinStepsProps>;
4
4
  //# sourceMappingURL=GherkinSteps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GherkinSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAoB,iBAAiB,EAAsB,MAAM,cAAc,CAAA;AAuBtF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAOnE,CAAA"}
1
+ {"version":3,"file":"GherkinSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAoB,iBAAiB,EAAsB,MAAM,uBAAuB,CAAA;AAuB/F,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAOnE,CAAA"}
@@ -1,22 +1,15 @@
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.GherkinSteps = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const customise_1 = require("../customise");
9
- const GherkinStep_1 = require("./GherkinStep");
1
+ import React from 'react';
2
+ import { useCustomRendering } from '../customise/index.js';
3
+ import { GherkinStep } from './GherkinStep.js';
10
4
  const DefaultRenderer = ({ steps, pickle, hasExamples }) => {
11
- return (react_1.default.createElement(react_1.default.Fragment, null, steps.map((step, index) => {
12
- const pickleStep = pickle === null || pickle === void 0 ? void 0 : pickle.steps.find((item) => item.astNodeIds.includes(step.id));
13
- return (react_1.default.createElement("li", { key: index },
14
- react_1.default.createElement(GherkinStep_1.GherkinStep, { key: index, step: step, pickleStep: pickleStep, hasExamples: hasExamples })));
5
+ return (React.createElement(React.Fragment, null, steps.map((step, index) => {
6
+ const pickleStep = pickle?.steps.find((item) => item.astNodeIds.includes(step.id));
7
+ return (React.createElement("li", { key: index },
8
+ React.createElement(GherkinStep, { key: index, step: step, pickleStep: pickleStep, hasExamples: hasExamples })));
15
9
  })));
16
10
  };
17
- const GherkinSteps = (props) => {
18
- const ResolvedRenderer = (0, customise_1.useCustomRendering)('GherkinSteps', {}, DefaultRenderer);
19
- return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
11
+ export const GherkinSteps = (props) => {
12
+ const ResolvedRenderer = useCustomRendering('GherkinSteps', {}, DefaultRenderer);
13
+ return React.createElement(ResolvedRenderer, { ...props });
20
14
  };
21
- exports.GherkinSteps = GherkinSteps;
22
15
  //# sourceMappingURL=GherkinSteps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GherkinSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":";;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CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACzB,MAAM,UAAU,GAAG,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QAClF,OAAO,CACL,4BAAI,GAAG,EAAE,KAAK;YACZ,oBAAC,WAAW,IACV,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,CACC,CACN,CAAA;IACH,CAAC,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAA+C,CAAC,KAAK,EAAE,EAAE;IAChF,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,cAAc,EACd,EAAE,EACF,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { HookStepProps } from '../customise';
2
+ import { HookStepProps } from '../customise/index.js';
3
3
  export declare const HookStep: React.FunctionComponent<HookStepProps>;
4
4
  //# sourceMappingURL=HookStep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HookStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/HookStep.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAsB,MAAM,cAAc,CAAA;AAgDhE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAG3D,CAAA"}
1
+ {"version":3,"file":"HookStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/HookStep.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAsB,MAAM,uBAAuB,CAAA;AAgDzE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAG3D,CAAA"}
@@ -1,72 +1,42 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.HookStep = void 0;
30
- const messages = __importStar(require("@cucumber/messages"));
31
- const messages_1 = require("@cucumber/messages");
32
- const react_1 = __importDefault(require("react"));
33
- const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
34
- const customise_1 = require("../customise");
35
- const Attachment_1 = require("./Attachment");
36
- const ErrorMessage_1 = require("./ErrorMessage");
37
- const StepItem_1 = require("./StepItem");
38
- const Title_1 = require("./Title");
1
+ import * as messages from '@cucumber/messages';
2
+ import { getWorstTestStepResult } from '@cucumber/messages';
3
+ import React from 'react';
4
+ import CucumberQueryContext from '../../CucumberQueryContext.js';
5
+ import { useCustomRendering } from '../customise/index.js';
6
+ import { TestStepResultDetails } from '../results/index.js';
7
+ import { Attachment } from './Attachment.js';
8
+ import { StepItem } from './StepItem.js';
9
+ import { Title } from './Title.js';
39
10
  const DefaultRenderer = ({ step }) => {
40
11
  if (!step.hookId)
41
12
  throw new Error('Expected step to have a hookId');
42
- const cucumberQuery = react_1.default.useContext(CucumberQueryContext_1.default);
43
- const stepResult = (0, messages_1.getWorstTestStepResult)(cucumberQuery.getTestStepResults(step.id));
13
+ const cucumberQuery = React.useContext(CucumberQueryContext);
14
+ const stepResult = getWorstTestStepResult(cucumberQuery.getTestStepResults(step.id));
44
15
  const hook = cucumberQuery.getHook(step.hookId);
45
16
  const attachments = cucumberQuery.getTestStepsAttachments([step.id]);
46
17
  if (stepResult.status === messages.TestStepResultStatus.FAILED) {
47
18
  let location = 'Unknown location';
48
- if (hook === null || hook === void 0 ? void 0 : hook.sourceReference.location) {
19
+ if (hook?.sourceReference.location) {
49
20
  location = `${hook.sourceReference.uri}:${hook.sourceReference.location.line}`;
50
21
  }
51
- else if (hook === null || hook === void 0 ? void 0 : hook.sourceReference.javaMethod) {
22
+ else if (hook?.sourceReference.javaMethod) {
52
23
  location = `${hook.sourceReference.javaMethod.className}.${hook.sourceReference.javaMethod.methodName}`;
53
24
  }
54
- return (react_1.default.createElement(StepItem_1.StepItem, { status: stepResult.status },
55
- react_1.default.createElement(Title_1.Title, { header: "h3", id: step.id },
56
- (hook === null || hook === void 0 ? void 0 : hook.name) ? `Hook "${hook.name}"` : 'Hook',
25
+ return (React.createElement(StepItem, { status: stepResult.status },
26
+ React.createElement(Title, { header: "h3", id: step.id },
27
+ hook?.name ? `Hook "${hook.name}"` : 'Hook',
57
28
  " failed: ",
58
29
  location),
59
- stepResult.message && react_1.default.createElement(ErrorMessage_1.ErrorMessage, { message: stepResult.message }),
60
- attachments.map((attachment, i) => (react_1.default.createElement(Attachment_1.Attachment, { key: i, attachment: attachment })))));
30
+ React.createElement(TestStepResultDetails, { ...stepResult }),
31
+ attachments.map((attachment, i) => (React.createElement(Attachment, { key: i, attachment: attachment })))));
61
32
  }
62
33
  if (attachments) {
63
- return (react_1.default.createElement(StepItem_1.StepItem, null, attachments.map((attachment, i) => (react_1.default.createElement(Attachment_1.Attachment, { key: i, attachment: attachment })))));
34
+ return (React.createElement(StepItem, null, attachments.map((attachment, i) => (React.createElement(Attachment, { key: i, attachment: attachment })))));
64
35
  }
65
36
  return null;
66
37
  };
67
- const HookStep = (props) => {
68
- const ResolvedRenderer = (0, customise_1.useCustomRendering)('HookStep', {}, DefaultRenderer);
69
- return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
38
+ export const HookStep = (props) => {
39
+ const ResolvedRenderer = useCustomRendering('HookStep', {}, DefaultRenderer);
40
+ return React.createElement(ResolvedRenderer, { ...props });
70
41
  };
71
- exports.HookStep = HookStep;
72
42
  //# sourceMappingURL=HookStep.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HookStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookStep.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA8C;AAC9C,iDAA2D;AAC3D,kDAAyB;AAEzB,sFAA6D;AAC7D,4CAAgE;AAChE,6CAAyC;AACzC,iDAA6C;AAC7C,yCAAqC;AACrC,mCAA+B;AAE/B,MAAM,eAAe,GAA2C,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC3E,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACnE,MAAM,aAAa,GAAG,eAAK,CAAC,UAAU,CAAC,8BAAoB,CAAC,CAAA;IAE5D,MAAM,UAAU,GAAG,IAAA,iCAAsB,EAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;IAEpF,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,C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AW,EAAE;QACf,OAAO,CACL,oBAAC,QAAQ,QACN,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CAClC,oBAAC,UAAU,IAAC,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,UAAU,GAAI,CAC/C,CAAC,CACO,CACZ,CAAA;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAA2C,CAAC,KAAK,EAAE,EAAE;IACxE,MAAM,gBAAgB,GAAG,kBAAkB,CAAgB,UAAU,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IAC3F,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
@@ -1,14 +1,7 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
1
+ import React from 'react';
2
+ import { HookStep } from './HookStep.js';
3
+ export const HookSteps = ({ hookSteps }) => {
4
+ return (React.createElement(React.Fragment, null, hookSteps.map((step, index) => (React.createElement("li", { key: index },
5
+ React.createElement(HookStep, { key: index, step: step }))))));
4
6
  };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.HookSteps = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const HookStep_1 = require("./HookStep");
9
- const HookSteps = ({ hookSteps }) => {
10
- return (react_1.default.createElement(react_1.default.Fragment, null, hookSteps.map((step, index) => (react_1.default.createElement("li", { key: index },
11
- react_1.default.createElement(HookStep_1.HookStep, { key: index, step: step }))))));
12
- };
13
- exports.HookSteps = HookSteps;
14
7
  //# sourceMappingURL=HookSteps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HookSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookSteps.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AAEzB,yCAAqC;AAM9B,MAAM,SAAS,GAAoC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1E,OAAO,CACL,8DACG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,sCAAI,GAAG,EAAE,KAAK;QACZ,8BAAC,mBAAQ,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CACjC,CACN,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAVY,QAAA,SAAS,aAUrB"}
1
+ {"version":3,"file":"HookSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookSteps.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAMxC,MAAM,CAAC,MAAM,SAAS,GAAoC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1E,OAAO,CACL,0CACG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,4BAAI,GAAG,EAAE,KAAK;QACZ,oBAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CACjC,CACN,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { KeywordProps } from '../customise';
2
+ import { KeywordProps } from '../customise/index.js';
3
3
  export declare const Keyword: FunctionComponent<KeywordProps>;
4
4
  //# sourceMappingURL=Keyword.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Keyword.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAoC,YAAY,EAAsB,MAAM,cAAc,CAAA;AAOjG,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAOnD,CAAA"}
1
+ {"version":3,"file":"Keyword.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAGL,YAAY,EAEb,MAAM,uBAAuB,CAAA;AAO9B,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAOnD,CAAA"}
@@ -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.Keyword = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const customise_1 = require("../customise");
9
- const Keyword_module_scss_1 = __importDefault(require("./Keyword.module.scss"));
1
+ import React from 'react';
2
+ import { useCustomRendering, } from '../customise/index.js';
3
+ import defaultStyles from './Keyword.module.scss';
10
4
  const DefaultRenderer = ({ children, styles }) => {
11
- return react_1.default.createElement("span", { className: styles.keyword }, children);
5
+ return React.createElement("span", { className: styles.keyword }, children);
12
6
  };
13
- const Keyword = ({ children }) => {
14
- const ResolvedRenderer = (0, customise_1.useCustomRendering)('Keyword', Keyword_module_scss_1.default, DefaultRenderer);
15
- return react_1.default.createElement(ResolvedRenderer, null, children);
7
+ export const Keyword = ({ children }) => {
8
+ const ResolvedRenderer = useCustomRendering('Keyword', defaultStyles, DefaultRenderer);
9
+ return React.createElement(ResolvedRenderer, null, children);
16
10
  };
17
- exports.Keyword = Keyword;
18
11
  //# sourceMappingURL=Keyword.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Keyword.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAgD;AAEhD,4CAAiG;AACjG,gFAAiD;AAEjD,MAAM,eAAe,GAAmD,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE;IAC/F,OAAO,wCAAM,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAQ,CAAA;AAC3D,CAAC,CAAA;AAEM,MAAM,OAAO,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvE,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,SAAS,EACT,6BAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,QAAE,QAAQ,CAAoB,CAAA;AACxD,CAAC,CAAA;AAPY,QAAA,OAAO,WAOnB"}
1
+ {"version":3,"file":"Keyword.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAEhD,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,uBAAuB,CAAA;AAEjD,MAAM,eAAe,GAAmD,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE;IAC/F,OAAO,8BAAM,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAQ,CAAA;AAC3D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvE,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,SAAS,EACT,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,QAAE,QAAQ,CAAoB,CAAA;AACxD,CAAC,CAAA"}
@@ -1,22 +1,16 @@
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.MDG = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const react_markdown_1 = __importDefault(require("react-markdown"));
9
- const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
10
- const HighLight_1 = require("../app/HighLight");
11
- const rehypePlugins_1 = __importDefault(require("../app/rehypePlugins"));
12
- const DataTable_module_scss_1 = __importDefault(require("./DataTable.module.scss"));
13
- const ExamplesTable_1 = require("./ExamplesTable");
14
- const GherkinStep_1 = require("./GherkinStep");
15
- const Keyword_1 = require("./Keyword");
16
- const MDG_module_scss_1 = __importDefault(require("./MDG.module.scss"));
17
- const Title_1 = require("./Title");
18
- const MDG = ({ uri, children }) => {
19
- const gherkinQuery = react_1.default.useContext(GherkinQueryContext_1.default);
1
+ import React from 'react';
2
+ import ReactMarkdown from 'react-markdown';
3
+ import GherkinQueryContext from '../../GherkinQueryContext.js';
4
+ import { HighLight } from '../app/HighLight.js';
5
+ import rehypePlugins from '../app/rehypePlugins.js';
6
+ import dataTableStyles from './DataTable.module.scss';
7
+ import { ExamplesTable } from './ExamplesTable.js';
8
+ import { GherkinStep } from './GherkinStep.js';
9
+ import { Keyword } from './Keyword.js';
10
+ import styles from './MDG.module.scss';
11
+ import { Title } from './Title.js';
12
+ export const MDG = ({ uri, children }) => {
13
+ const gherkinQuery = React.useContext(GherkinQueryContext);
20
14
  let hasExamples = false;
21
15
  let examples = undefined;
22
16
  function header(line, level, children) {
@@ -29,15 +23,15 @@ const MDG = ({ uri, children }) => {
29
23
  examples;
30
24
  if (titleAstNode) {
31
25
  const header = `h${level}`;
32
- return (react_1.default.createElement(Title_1.Title, { header: header, id: titleAstNode.id },
33
- react_1.default.createElement(Keyword_1.Keyword, null,
26
+ return (React.createElement(Title, { header: header, id: titleAstNode.id },
27
+ React.createElement(Keyword, null,
34
28
  titleAstNode.keyword,
35
29
  ":"),
36
- react_1.default.createElement(HighLight_1.HighLight, { text: titleAstNode.name })));
30
+ React.createElement(HighLight, { text: titleAstNode.name })));
37
31
  }
38
- return react_1.default.createElement("h3", null, children);
32
+ return React.createElement("h3", null, children);
39
33
  }
40
- return (react_1.default.createElement(react_markdown_1.default, { rehypePlugins: rehypePlugins_1.default, components: {
34
+ return (React.createElement(ReactMarkdown, { rehypePlugins: rehypePlugins, components: {
41
35
  h1({ node, level, children }) {
42
36
  return header(line(node), level, children);
43
37
  },
@@ -55,30 +49,29 @@ const MDG = ({ uri, children }) => {
55
49
  },
56
50
  table({ node, children }) {
57
51
  if (examples && examples.tableHeader && line(node) >= 3) {
58
- return (react_1.default.createElement(ExamplesTable_1.ExamplesTable, { tableHeader: examples.tableHeader, tableBody: examples.tableBody }));
52
+ return (React.createElement(ExamplesTable, { tableHeader: examples.tableHeader, tableBody: examples.tableBody }));
59
53
  }
60
- return react_1.default.createElement("table", { className: DataTable_module_scss_1.default.table }, children);
54
+ return React.createElement("table", { className: dataTableStyles.table }, children);
61
55
  },
62
56
  ul({ node, children }) {
63
57
  const step = gherkinQuery.getStep(uri, line(node));
64
58
  if (!step) {
65
59
  // Non-Gherkin list
66
- return react_1.default.createElement("ul", null, children);
60
+ return React.createElement("ul", null, children);
67
61
  }
68
- return react_1.default.createElement("ul", { className: MDG_module_scss_1.default.steps }, children);
62
+ return React.createElement("ul", { className: styles.steps }, children);
69
63
  },
70
64
  li({ node, children }) {
71
65
  const step = gherkinQuery.getStep(uri, line(node));
72
66
  if (!step) {
73
67
  // Non-Gherkin list item
74
- return react_1.default.createElement("li", null, children);
68
+ return React.createElement("li", null, children);
75
69
  }
76
- return (react_1.default.createElement("li", null,
77
- react_1.default.createElement(GherkinStep_1.GherkinStep, { step: step, hasExamples: hasExamples })));
70
+ return (React.createElement("li", null,
71
+ React.createElement(GherkinStep, { step: step, hasExamples: hasExamples })));
78
72
  },
79
73
  } }, children));
80
74
  };
81
- exports.MDG = MDG;
82
75
  function line(node) {
83
76
  if (node.position === undefined)
84
77
  throw new Error(`undefined position in ${JSON.stringify(node)}`);
@@ -1 +1 @@
1
- {"version":3,"file":"MDG.js","sourceRoot":"","sources":["../../../../src/components/gherkin/MDG.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AACzB,oEAA0C;AAG1C,oFAA2D;AAC3D,gDAA4C;AAC5C,yEAAgD;AAEhD,oFAAqD;AACr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AQ,CAAS,CAAA;YACpE,CAAC;YACD,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACnB,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;gBAClD,IAAI,CAAC,IAAI,EAAE;oBACT,mBAAmB;oBACnB,OAAO,gCAAK,QAAQ,CAAM,CAAA;iBAC3B;gBACD,OAAO,4BAAI,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,QAAQ,CAAM,CAAA;YACrD,CAAC;YACD,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACnB,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;gBAClD,IAAI,CAAC,IAAI,EAAE;oBACT,wBAAwB;oBACxB,OAAO,gCAAK,QAAQ,CAAM,CAAA;iBAC3B;gBACD,OAAO,CACL;oBACE,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,GAAI,CAClD,CACN,CAAA;YACH,CAAC;SACF,IAEA,QAAQ,CACK,CACjB,CAAA;AACH,CAAC,CAAA;AAED,SAAS,IAAI,CAAC,IAAa;IACzB,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACjG,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAA;AACjC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ParameterProps } from '../customise';
2
+ import { ParameterProps } from '../customise/index.js';
3
3
  export declare const Parameter: React.FunctionComponent<ParameterProps>;
4
4
  //# sourceMappingURL=Parameter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAGL,cAAc,EAEf,MAAM,cAAc,CAAA;AAgBrB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAO7D,CAAA"}
1
+ {"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAGL,cAAc,EAEf,MAAM,uBAAuB,CAAA;AAgB9B,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAO7D,CAAA"}
@@ -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.Parameter = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const customise_1 = require("../customise");
9
- const Parameter_module_scss_1 = __importDefault(require("./Parameter.module.scss"));
1
+ import React from 'react';
2
+ import { useCustomRendering, } from '../customise/index.js';
3
+ import defaultStyles from './Parameter.module.scss';
10
4
  const DefaultRenderer = ({ parameterTypeName, value, children, styles, }) => {
11
- return (react_1.default.createElement("span", { title: parameterTypeName, "aria-label": value, className: styles.parameter }, children));
5
+ return (React.createElement("span", { title: parameterTypeName, "aria-label": value, className: styles.parameter }, children));
12
6
  };
13
- const Parameter = (props) => {
14
- const ResolvedRenderer = (0, customise_1.useCustomRendering)('Parameter', Parameter_module_scss_1.default, DefaultRenderer);
15
- return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
7
+ export const Parameter = (props) => {
8
+ const ResolvedRenderer = useCustomRendering('Parameter', defaultStyles, DefaultRenderer);
9
+ return React.createElement(ResolvedRenderer, { ...props });
16
10
  };
17
- exports.Parameter = Parameter;
18
11
  //# sourceMappingURL=Parameter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4CAKqB;AACrB,oFAAmD;AAEnD,MAAM,eAAe,GAAuD,CAAC,EAC3E,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,wCAAM,KAAK,EAAE,iBAAiB,gBAAc,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAC3E,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,SAAS,GAA4C,CAAC,KAAK,EAAE,EAAE;IAC1E,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,WAAW,EACX,+BAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAPY,QAAA,SAAS,aAOrB"}
1
+ {"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,yBAAyB,CAAA;AAEnD,MAAM,eAAe,GAAuD,CAAC,EAC3E,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,8BAAM,KAAK,EAAE,iBAAiB,gBAAc,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAC3E,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAA4C,CAAC,KAAK,EAAE,EAAE;IAC1E,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,WAAW,EACX,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { RuleProps } from '../customise';
2
+ import { RuleProps } from '../customise/index.js';
3
3
  export declare const Rule: React.FunctionComponent<RuleProps>;
4
4
  //# sourceMappingURL=Rule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Rule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAoB,SAAS,EAAsB,MAAM,cAAc,CAAA;AAiC9E,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAGnD,CAAA"}
1
+ {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Rule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAoB,SAAS,EAAsB,MAAM,uBAAuB,CAAA;AAiCvF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAGnD,CAAA"}