@cucumber/react-components 21.1.1 → 22.0.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.
- package/README.md +2 -1
- package/dist/src/CucumberQueryContext.js +3 -8
- package/dist/src/CucumberQueryContext.js.map +1 -1
- package/dist/src/EnvelopesQueryContext.js +8 -20
- package/dist/src/EnvelopesQueryContext.js.map +1 -1
- package/dist/src/GherkinQueryContext.js +3 -8
- package/dist/src/GherkinQueryContext.js.map +1 -1
- package/dist/src/SearchQueryContext.js +24 -53
- package/dist/src/SearchQueryContext.js.map +1 -1
- package/dist/src/UriContext.js +2 -7
- package/dist/src/UriContext.js.map +1 -1
- package/dist/src/ciCommitLink.js +3 -9
- package/dist/src/ciCommitLink.js.map +1 -1
- package/dist/src/components/CucumberReact.d.ts +1 -1
- package/dist/src/components/CucumberReact.d.ts.map +1 -1
- package/dist/src/components/CucumberReact.js +7 -14
- package/dist/src/components/CucumberReact.js.map +1 -1
- package/dist/src/components/app/CICommitLink.js +14 -22
- package/dist/src/components/app/CICommitLink.js.map +1 -1
- package/dist/src/components/app/CIJobLink.js +8 -15
- package/dist/src/components/app/CIJobLink.js.map +1 -1
- package/dist/src/components/app/EnvelopesWrapper.js +11 -38
- package/dist/src/components/app/EnvelopesWrapper.js.map +1 -1
- package/dist/src/components/app/ExecutionSummary.js +54 -61
- package/dist/src/components/app/ExecutionSummary.js.map +1 -1
- package/dist/src/components/app/FilteredResults.d.ts.map +1 -1
- package/dist/src/components/app/FilteredResults.js +21 -39
- package/dist/src/components/app/FilteredResults.js.map +1 -1
- package/dist/src/components/app/GherkinDocumentList.js +27 -57
- package/dist/src/components/app/GherkinDocumentList.js.map +1 -1
- package/dist/src/components/app/HighLight.js +14 -21
- package/dist/src/components/app/HighLight.js.map +1 -1
- package/dist/src/components/app/NavigationButton.js +4 -23
- package/dist/src/components/app/NavigationButton.js.map +1 -1
- package/dist/src/components/app/NoMatchResult.js +8 -15
- package/dist/src/components/app/NoMatchResult.js.map +1 -1
- package/dist/src/components/app/OSIcon.js +10 -17
- package/dist/src/components/app/OSIcon.js.map +1 -1
- package/dist/src/components/app/QueriesWrapper.d.ts +1 -1
- package/dist/src/components/app/QueriesWrapper.d.ts.map +1 -1
- package/dist/src/components/app/QueriesWrapper.js +7 -14
- package/dist/src/components/app/QueriesWrapper.js.map +1 -1
- package/dist/src/components/app/RuntimeIcon.js +10 -17
- package/dist/src/components/app/RuntimeIcon.js.map +1 -1
- package/dist/src/components/app/SearchBar.d.ts.map +1 -1
- package/dist/src/components/app/SearchBar.js +25 -30
- package/dist/src/components/app/SearchBar.js.map +1 -1
- package/dist/src/components/app/SearchWrapper.d.ts +1 -1
- package/dist/src/components/app/SearchWrapper.d.ts.map +1 -1
- package/dist/src/components/app/SearchWrapper.js +4 -46
- package/dist/src/components/app/SearchWrapper.js.map +1 -1
- package/dist/src/components/app/StatusesSummary.js +8 -15
- package/dist/src/components/app/StatusesSummary.js.map +1 -1
- package/dist/src/components/app/icons/CucumberLogo.d.ts +1 -1
- package/dist/src/components/app/icons/CucumberLogo.js +7 -14
- package/dist/src/components/app/icons/CucumberLogo.js.map +1 -1
- package/dist/src/components/app/icons/Jvm.d.ts +1 -1
- package/dist/src/components/app/icons/Jvm.js +8 -15
- package/dist/src/components/app/icons/Jvm.js.map +1 -1
- package/dist/src/components/app/icons/Linux.js +18 -25
- package/dist/src/components/app/icons/Linux.js.map +1 -1
- package/dist/src/components/app/icons/MacOS.d.ts +1 -1
- package/dist/src/components/app/icons/MacOS.js +4 -11
- package/dist/src/components/app/icons/MacOS.js.map +1 -1
- package/dist/src/components/app/icons/NodeJs.d.ts +1 -1
- package/dist/src/components/app/icons/NodeJs.js +34 -41
- package/dist/src/components/app/icons/NodeJs.js.map +1 -1
- package/dist/src/components/app/icons/Ruby.d.ts +1 -1
- package/dist/src/components/app/icons/Ruby.js +4 -11
- package/dist/src/components/app/icons/Ruby.js.map +1 -1
- package/dist/src/components/app/icons/Windows.js +4 -11
- package/dist/src/components/app/icons/Windows.js.map +1 -1
- package/dist/src/components/app/index.d.ts +11 -11
- package/dist/src/components/app/index.d.ts.map +1 -1
- package/dist/src/components/app/index.js +11 -27
- package/dist/src/components/app/index.js.map +1 -1
- package/dist/src/components/app/rehypePlugins.d.ts.map +1 -1
- package/dist/src/components/app/rehypePlugins.js +8 -13
- package/dist/src/components/app/rehypePlugins.js.map +1 -1
- package/dist/src/components/app/remarkPlugins.js +3 -8
- package/dist/src/components/app/remarkPlugins.js.map +1 -1
- package/dist/src/components/app/statuses.js +2 -27
- package/dist/src/components/app/statuses.js.map +1 -1
- package/dist/src/components/customise/customRendering.js +6 -33
- package/dist/src/components/customise/customRendering.js.map +1 -1
- package/dist/src/components/customise/index.d.ts +2 -2
- package/dist/src/components/customise/index.d.ts.map +1 -1
- package/dist/src/components/customise/index.js +2 -18
- package/dist/src/components/customise/index.js.map +1 -1
- package/dist/src/components/customise/theming.js +1 -2
- package/dist/src/components/gherkin/Anchor.d.ts +1 -1
- package/dist/src/components/gherkin/Anchor.d.ts.map +1 -1
- package/dist/src/components/gherkin/Anchor.js +11 -18
- package/dist/src/components/gherkin/Anchor.js.map +1 -1
- package/dist/src/components/gherkin/Attachment.d.ts +1 -1
- package/dist/src/components/gherkin/Attachment.d.ts.map +1 -1
- package/dist/src/components/gherkin/Attachment.js +43 -77
- package/dist/src/components/gherkin/Attachment.js.map +1 -1
- package/dist/src/components/gherkin/Background.d.ts +1 -1
- package/dist/src/components/gherkin/Background.d.ts.map +1 -1
- package/dist/src/components/gherkin/Background.js +17 -24
- package/dist/src/components/gherkin/Background.js.map +1 -1
- package/dist/src/components/gherkin/Children.d.ts +1 -1
- package/dist/src/components/gherkin/Children.d.ts.map +1 -1
- package/dist/src/components/gherkin/Children.js +7 -14
- package/dist/src/components/gherkin/Children.js.map +1 -1
- package/dist/src/components/gherkin/DataTable.d.ts +1 -1
- package/dist/src/components/gherkin/DataTable.d.ts.map +1 -1
- package/dist/src/components/gherkin/DataTable.js +12 -19
- package/dist/src/components/gherkin/DataTable.js.map +1 -1
- package/dist/src/components/gherkin/Description.d.ts +1 -1
- package/dist/src/components/gherkin/Description.d.ts.map +1 -1
- package/dist/src/components/gherkin/Description.js +9 -16
- package/dist/src/components/gherkin/Description.js.map +1 -1
- package/dist/src/components/gherkin/DocString.d.ts +1 -1
- package/dist/src/components/gherkin/DocString.d.ts.map +1 -1
- package/dist/src/components/gherkin/DocString.js +9 -16
- package/dist/src/components/gherkin/DocString.js.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.d.ts +1 -1
- package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.js +7 -14
- package/dist/src/components/gherkin/ErrorMessage.js.map +1 -1
- package/dist/src/components/gherkin/ExampleDetail.js +31 -61
- package/dist/src/components/gherkin/ExampleDetail.js.map +1 -1
- package/dist/src/components/gherkin/Examples.d.ts +1 -1
- package/dist/src/components/gherkin/Examples.d.ts.map +1 -1
- package/dist/src/components/gherkin/Examples.js +20 -27
- package/dist/src/components/gherkin/Examples.js.map +1 -1
- package/dist/src/components/gherkin/ExamplesContext.d.ts +1 -1
- package/dist/src/components/gherkin/ExamplesContext.js +2 -5
- package/dist/src/components/gherkin/ExamplesContext.js.map +1 -1
- package/dist/src/components/gherkin/ExamplesTable.d.ts +1 -1
- package/dist/src/components/gherkin/ExamplesTable.d.ts.map +1 -1
- package/dist/src/components/gherkin/ExamplesTable.js +29 -59
- package/dist/src/components/gherkin/ExamplesTable.js.map +1 -1
- package/dist/src/components/gherkin/Feature.d.ts +1 -1
- package/dist/src/components/gherkin/Feature.d.ts.map +1 -1
- package/dist/src/components/gherkin/Feature.js +24 -31
- package/dist/src/components/gherkin/Feature.js.map +1 -1
- package/dist/src/components/gherkin/GherkinDocument.d.ts +1 -1
- package/dist/src/components/gherkin/GherkinDocument.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinDocument.js +7 -14
- package/dist/src/components/gherkin/GherkinDocument.js.map +1 -1
- package/dist/src/components/gherkin/GherkinStep.d.ts +1 -1
- package/dist/src/components/gherkin/GherkinStep.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinStep.js +38 -46
- package/dist/src/components/gherkin/GherkinStep.js.map +1 -1
- package/dist/src/components/gherkin/GherkinSteps.d.ts +1 -1
- package/dist/src/components/gherkin/GherkinSteps.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinSteps.js +10 -17
- package/dist/src/components/gherkin/GherkinSteps.js.map +1 -1
- package/dist/src/components/gherkin/HookStep.d.ts +1 -1
- package/dist/src/components/gherkin/HookStep.d.ts.map +1 -1
- package/dist/src/components/gherkin/HookStep.js +22 -52
- package/dist/src/components/gherkin/HookStep.js.map +1 -1
- package/dist/src/components/gherkin/HookSteps.js +5 -12
- package/dist/src/components/gherkin/HookSteps.js.map +1 -1
- package/dist/src/components/gherkin/Keyword.d.ts +1 -1
- package/dist/src/components/gherkin/Keyword.d.ts.map +1 -1
- package/dist/src/components/gherkin/Keyword.js +7 -14
- package/dist/src/components/gherkin/Keyword.js.map +1 -1
- package/dist/src/components/gherkin/MDG.js +25 -32
- package/dist/src/components/gherkin/MDG.js.map +1 -1
- package/dist/src/components/gherkin/Parameter.d.ts +1 -1
- package/dist/src/components/gherkin/Parameter.d.ts.map +1 -1
- package/dist/src/components/gherkin/Parameter.js +7 -14
- package/dist/src/components/gherkin/Parameter.js.map +1 -1
- package/dist/src/components/gherkin/Rule.d.ts +1 -1
- package/dist/src/components/gherkin/Rule.d.ts.map +1 -1
- package/dist/src/components/gherkin/Rule.js +22 -29
- package/dist/src/components/gherkin/Rule.js.map +1 -1
- package/dist/src/components/gherkin/Scenario.d.ts +1 -1
- package/dist/src/components/gherkin/Scenario.d.ts.map +1 -1
- package/dist/src/components/gherkin/Scenario.js +35 -65
- package/dist/src/components/gherkin/Scenario.js.map +1 -1
- package/dist/src/components/gherkin/StatusIcon.d.ts +1 -1
- package/dist/src/components/gherkin/StatusIcon.d.ts.map +1 -1
- package/dist/src/components/gherkin/StatusIcon.js +16 -23
- package/dist/src/components/gherkin/StatusIcon.js.map +1 -1
- package/dist/src/components/gherkin/StepItem.js +7 -14
- package/dist/src/components/gherkin/StepItem.js.map +1 -1
- package/dist/src/components/gherkin/StepsList.js +4 -11
- package/dist/src/components/gherkin/StepsList.js.map +1 -1
- package/dist/src/components/gherkin/Tags.d.ts +1 -1
- package/dist/src/components/gherkin/Tags.d.ts.map +1 -1
- package/dist/src/components/gherkin/Tags.js +9 -16
- package/dist/src/components/gherkin/Tags.js.map +1 -1
- package/dist/src/components/gherkin/Title.d.ts +1 -1
- package/dist/src/components/gherkin/Title.d.ts.map +1 -1
- package/dist/src/components/gherkin/Title.js +9 -16
- package/dist/src/components/gherkin/Title.js.map +1 -1
- package/dist/src/components/gherkin/attachmentFilename.js +3 -10
- package/dist/src/components/gherkin/attachmentFilename.js.map +1 -1
- package/dist/src/components/gherkin/index.d.ts +25 -25
- package/dist/src/components/gherkin/index.d.ts.map +1 -1
- package/dist/src/components/gherkin/index.js +25 -41
- package/dist/src/components/gherkin/index.js.map +1 -1
- package/dist/src/components/gherkin/isNumber.js +1 -4
- package/dist/src/components/gherkin/isNumber.js.map +1 -1
- package/dist/src/components/gherkin/statusName.js +1 -3
- package/dist/src/components/gherkin/statusName.js.map +1 -1
- package/dist/src/components/index.d.ts +4 -4
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +4 -33
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/countScenariosByStatuses.d.ts +2 -1
- package/dist/src/countScenariosByStatuses.d.ts.map +1 -1
- package/dist/src/countScenariosByStatuses.js +26 -33
- package/dist/src/countScenariosByStatuses.js.map +1 -1
- package/dist/src/filter/filterByStatus.d.ts +2 -1
- package/dist/src/filter/filterByStatus.d.ts.map +1 -1
- package/dist/src/filter/filterByStatus.js +9 -9
- package/dist/src/filter/filterByStatus.js.map +1 -1
- package/dist/src/hooks/index.d.ts +2 -2
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js +2 -18
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/useFilteredDocuments.d.ts +3 -0
- package/dist/src/hooks/useFilteredDocuments.d.ts.map +1 -0
- package/dist/src/hooks/useFilteredDocuments.js +27 -0
- package/dist/src/hooks/useFilteredDocuments.js.map +1 -0
- package/dist/src/hooks/useQueries.d.ts +1 -1
- package/dist/src/hooks/useQueries.d.ts.map +1 -1
- package/dist/src/hooks/useQueries.js +8 -15
- package/dist/src/hooks/useQueries.js.map +1 -1
- package/dist/src/hooks/useResultStatistics.d.ts +6 -0
- package/dist/src/hooks/useResultStatistics.d.ts.map +1 -0
- package/dist/src/hooks/useResultStatistics.js +7 -0
- package/dist/src/hooks/useResultStatistics.js.map +1 -0
- package/dist/src/hooks/useSearch.d.ts +1 -1
- package/dist/src/hooks/useSearch.d.ts.map +1 -1
- package/dist/src/hooks/useSearch.js +4 -11
- package/dist/src/hooks/useSearch.js.map +1 -1
- package/dist/src/index.d.ts +7 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -43
- package/dist/src/index.js.map +1 -1
- package/dist/src/isTagExpression.js +1 -4
- package/dist/src/isTagExpression.js.map +1 -1
- package/dist/src/search/FeatureSearch.d.ts +3 -7
- package/dist/src/search/FeatureSearch.d.ts.map +1 -1
- package/dist/src/search/FeatureSearch.js +31 -31
- package/dist/src/search/FeatureSearch.js.map +1 -1
- package/dist/src/search/ScenarioLikeSearch.d.ts +25 -0
- package/dist/src/search/ScenarioLikeSearch.d.ts.map +1 -0
- package/dist/src/search/ScenarioLikeSearch.js +41 -0
- package/dist/src/search/ScenarioLikeSearch.js.map +1 -0
- package/dist/src/search/Search.d.ts +9 -9
- package/dist/src/search/Search.d.ts.map +1 -1
- package/dist/src/search/Search.js +34 -20
- package/dist/src/search/Search.js.map +1 -1
- package/dist/src/search/StepSearch.d.ts +16 -8
- package/dist/src/search/StepSearch.d.ts.map +1 -1
- package/dist/src/search/StepSearch.js +33 -44
- package/dist/src/search/StepSearch.js.map +1 -1
- package/dist/src/search/TagSearch.d.ts +2 -10
- package/dist/src/search/TagSearch.d.ts.map +1 -1
- package/dist/src/search/TagSearch.js +17 -18
- package/dist/src/search/TagSearch.js.map +1 -1
- package/dist/src/search/TextSearch.d.ts +2 -11
- package/dist/src/search/TextSearch.d.ts.map +1 -1
- package/dist/src/search/TextSearch.js +47 -36
- package/dist/src/search/TextSearch.js.map +1 -1
- package/dist/src/search/index.d.ts +3 -0
- package/dist/src/search/index.d.ts.map +1 -0
- package/dist/src/search/index.js +3 -0
- package/dist/src/search/index.js.map +1 -0
- package/dist/src/search/types.d.ts +14 -0
- package/dist/src/search/types.d.ts.map +1 -0
- package/dist/src/search/types.js +2 -0
- package/dist/src/search/types.js.map +1 -0
- package/dist/src/toRepositoryId.js +1 -4
- package/dist/src/toRepositoryId.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +26 -17
- package/dist/src/search/RuleSearch.d.ts +0 -9
- package/dist/src/search/RuleSearch.d.ts.map +0 -1
- package/dist/src/search/RuleSearch.js +0 -42
- package/dist/src/search/RuleSearch.js.map +0 -1
- package/dist/src/search/ScenarioSearch.d.ts +0 -9
- package/dist/src/search/ScenarioSearch.d.ts.map +0 -1
- package/dist/src/search/ScenarioSearch.js +0 -42
- package/dist/src/search/ScenarioSearch.js.map +0 -1
|
@@ -1,70 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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.ExampleDetail = void 0;
|
|
30
|
-
const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
31
|
-
const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
32
|
-
const react_1 = __importStar(require("react"));
|
|
33
|
-
const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
|
|
34
|
-
const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
|
|
35
|
-
const HighLight_1 = require("../app/HighLight");
|
|
36
|
-
const NavigationButton_1 = require("../app/NavigationButton");
|
|
37
|
-
const Description_1 = require("./Description");
|
|
38
|
-
const ExampleDetail_module_scss_1 = __importDefault(require("./ExampleDetail.module.scss"));
|
|
39
|
-
const GherkinSteps_1 = require("./GherkinSteps");
|
|
40
|
-
const HookSteps_1 = require("./HookSteps");
|
|
41
|
-
const Keyword_1 = require("./Keyword");
|
|
42
|
-
const StepsList_1 = require("./StepsList");
|
|
43
|
-
const Tags_1 = require("./Tags");
|
|
44
|
-
const Title_1 = require("./Title");
|
|
45
|
-
const ExampleDetail = ({ scenario, pickleId, onBack }) => {
|
|
46
|
-
const gherkinQuery = (0, react_1.useContext)(GherkinQueryContext_1.default);
|
|
47
|
-
const cucumberQuery = (0, react_1.useContext)(CucumberQueryContext_1.default);
|
|
1
|
+
import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import CucumberQueryContext from '../../CucumberQueryContext.js';
|
|
5
|
+
import GherkinQueryContext from '../../GherkinQueryContext.js';
|
|
6
|
+
import { HighLight } from '../app/HighLight.js';
|
|
7
|
+
import { NavigationButton } from '../app/NavigationButton.js';
|
|
8
|
+
import { Description } from './Description.js';
|
|
9
|
+
import styles from './ExampleDetail.module.scss';
|
|
10
|
+
import { GherkinSteps } from './GherkinSteps.js';
|
|
11
|
+
import { HookSteps } from './HookSteps.js';
|
|
12
|
+
import { Keyword } from './Keyword.js';
|
|
13
|
+
import { StepsList } from './StepsList.js';
|
|
14
|
+
import { Tags } from './Tags.js';
|
|
15
|
+
import { Title } from './Title.js';
|
|
16
|
+
export const ExampleDetail = ({ scenario, pickleId, onBack }) => {
|
|
17
|
+
const gherkinQuery = useContext(GherkinQueryContext);
|
|
18
|
+
const cucumberQuery = useContext(CucumberQueryContext);
|
|
48
19
|
const pickle = gherkinQuery.getPickles().find((item) => item.id === pickleId);
|
|
49
20
|
const beforeHooks = cucumberQuery.getBeforeHookSteps(pickleId);
|
|
50
21
|
const afterHooks = cucumberQuery.getAfterHookSteps(pickleId);
|
|
51
22
|
const examplesCount = scenario.examples.flatMap((examples) => examples.tableBody).length;
|
|
52
|
-
return (
|
|
53
|
-
|
|
54
|
-
|
|
23
|
+
return (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(NavigationButton, { onClick: onBack },
|
|
25
|
+
React.createElement(FontAwesomeIcon, { icon: faArrowLeft, className: styles.backIcon }),
|
|
55
26
|
"Back to outline and all ",
|
|
56
27
|
examplesCount,
|
|
57
28
|
" examples"),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
29
|
+
React.createElement("section", null,
|
|
30
|
+
React.createElement(Tags, { tags: pickle.tags }),
|
|
31
|
+
React.createElement(Title, { header: "h2", id: scenario.id },
|
|
32
|
+
React.createElement(Keyword, null, "Example:"),
|
|
33
|
+
React.createElement(HighLight, { text: pickle.name })),
|
|
34
|
+
React.createElement(Description, { description: scenario.description }),
|
|
35
|
+
React.createElement(StepsList, null,
|
|
36
|
+
React.createElement(HookSteps, { hookSteps: beforeHooks }),
|
|
37
|
+
React.createElement(GherkinSteps, { steps: scenario.steps || [], pickle: pickle, hasExamples: false }),
|
|
38
|
+
React.createElement(HookSteps, { hookSteps: afterHooks })))));
|
|
68
39
|
};
|
|
69
|
-
exports.ExampleDetail = ExampleDetail;
|
|
70
40
|
//# sourceMappingURL=ExampleDetail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleDetail.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExampleDetail.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleDetail.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExampleDetail.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,EAAE,UAAU,EAAyB,MAAM,OAAO,CAAA;AAEhE,OAAO,oBAAoB,MAAM,+BAA+B,CAAA;AAChE,OAAO,mBAAmB,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAA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BACrC,oBAAC,YAAY,IAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,GAAI;gBACjF,oBAAC,SAAS,IAAC,SAAS,EAAE,UAAU,GAAI,CAC1B,CACJ,CACT,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Examples.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAoB,aAAa,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"Examples.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAoB,aAAa,EAAsB,MAAM,uBAAuB,CAAA;AA2B3F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAO3D,CAAA"}
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const Description_1 = require("./Description");
|
|
11
|
-
const Examples_module_scss_1 = __importDefault(require("./Examples.module.scss"));
|
|
12
|
-
const ExamplesTable_1 = require("./ExamplesTable");
|
|
13
|
-
const Keyword_1 = require("./Keyword");
|
|
14
|
-
const Tags_1 = require("./Tags");
|
|
15
|
-
const Title_1 = require("./Title");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering } from '../customise/index.js';
|
|
3
|
+
import { Children } from './Children.js';
|
|
4
|
+
import { Description } from './Description.js';
|
|
5
|
+
import defaultStyles from './Examples.module.scss';
|
|
6
|
+
import { ExamplesTable } from './ExamplesTable.js';
|
|
7
|
+
import { Keyword } from './Keyword.js';
|
|
8
|
+
import { Tags } from './Tags.js';
|
|
9
|
+
import { Title } from './Title.js';
|
|
16
10
|
const DefaultRenderer = ({ examples, styles }) => {
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
return (React.createElement("section", { className: styles.example },
|
|
12
|
+
React.createElement(Tags, { tags: examples.tags }),
|
|
13
|
+
React.createElement(Title, { header: "h3", id: examples.id },
|
|
14
|
+
React.createElement(Keyword, null,
|
|
21
15
|
examples.keyword,
|
|
22
16
|
":"),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
examples.tableHeader && (
|
|
26
|
-
|
|
17
|
+
React.createElement("span", null, examples.name)),
|
|
18
|
+
React.createElement(Description, { description: examples.description }),
|
|
19
|
+
examples.tableHeader && (React.createElement(Children, null,
|
|
20
|
+
React.createElement(ExamplesTable, { tableHeader: examples.tableHeader, tableBody: examples.tableBody })))));
|
|
27
21
|
};
|
|
28
|
-
const Examples = (props) => {
|
|
29
|
-
const ResolvedRenderer =
|
|
30
|
-
return
|
|
22
|
+
export const Examples = (props) => {
|
|
23
|
+
const ResolvedRenderer = useCustomRendering('Examples', defaultStyles, DefaultRenderer);
|
|
24
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
31
25
|
};
|
|
32
|
-
exports.Examples = Examples;
|
|
33
26
|
//# sourceMappingURL=Examples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Examples.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Examples.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAmC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC3F,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,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, react_1.createContext)({
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
export const ExamplesContext = createContext({
|
|
6
3
|
setSelectedExample: () => undefined,
|
|
7
4
|
});
|
|
8
5
|
//# sourceMappingURL=ExamplesContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplesContext.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExamplesContext.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAEzC;IACD,kBAAkB,EAAE,GAAG,EAAE,CAAC,SAAS;CACpC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplesTable.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAGL,kBAAkB,EAEnB,MAAM,
|
|
1
|
+
{"version":3,"file":"ExamplesTable.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAGL,kBAAkB,EAEnB,MAAM,uBAAuB,CAAA;AA8B9B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAOrE,CAAA"}
|
|
@@ -1,66 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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.ExamplesTable = void 0;
|
|
30
|
-
const messages_1 = require("@cucumber/messages");
|
|
31
|
-
const react_1 = __importStar(require("react"));
|
|
32
|
-
const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
|
|
33
|
-
const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
|
|
34
|
-
const UriContext_1 = __importDefault(require("../../UriContext"));
|
|
35
|
-
const customise_1 = require("../customise");
|
|
36
|
-
const ExamplesContext_1 = require("./ExamplesContext");
|
|
37
|
-
const ExamplesTable_module_scss_1 = __importDefault(require("./ExamplesTable.module.scss"));
|
|
38
|
-
const isNumber_1 = __importDefault(require("./isNumber"));
|
|
39
|
-
const StatusIcon_1 = require("./StatusIcon");
|
|
1
|
+
import { getWorstTestStepResult } from '@cucumber/messages';
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import CucumberQueryContext from '../../CucumberQueryContext.js';
|
|
4
|
+
import GherkinQueryContext from '../../GherkinQueryContext.js';
|
|
5
|
+
import UriContext from '../../UriContext.js';
|
|
6
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
7
|
+
import { ExamplesContext } from './ExamplesContext.js';
|
|
8
|
+
import defaultStyles from './ExamplesTable.module.scss';
|
|
9
|
+
import isNumber from './isNumber.js';
|
|
10
|
+
import { StatusIcon } from './StatusIcon.js';
|
|
40
11
|
const DefaultRenderer = ({ tableHeader, tableBody, styles, }) => {
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
tableHeader.cells.map((cell, j) => (
|
|
46
|
-
|
|
12
|
+
return (React.createElement("table", { className: styles.examplesTable },
|
|
13
|
+
React.createElement("thead", null,
|
|
14
|
+
React.createElement("tr", null,
|
|
15
|
+
React.createElement("th", null, "\u00A0"),
|
|
16
|
+
tableHeader.cells.map((cell, j) => (React.createElement("th", { key: j }, cell.value))))),
|
|
17
|
+
React.createElement("tbody", null, tableBody.map((row, i) => (React.createElement(ExampleRow, { row: row, key: i }))))));
|
|
47
18
|
};
|
|
48
|
-
const ExamplesTable = (props) => {
|
|
49
|
-
const ResolvedRenderer =
|
|
50
|
-
return
|
|
19
|
+
export const ExamplesTable = (props) => {
|
|
20
|
+
const ResolvedRenderer = useCustomRendering('ExamplesTable', defaultStyles, DefaultRenderer);
|
|
21
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
51
22
|
};
|
|
52
|
-
exports.ExamplesTable = ExamplesTable;
|
|
53
23
|
const ExampleRow = ({ row }) => {
|
|
54
|
-
const gherkinQuery =
|
|
55
|
-
const cucumberQuery =
|
|
56
|
-
const uri =
|
|
57
|
-
const { setSelectedExample } =
|
|
24
|
+
const gherkinQuery = useContext(GherkinQueryContext);
|
|
25
|
+
const cucumberQuery = useContext(CucumberQueryContext);
|
|
26
|
+
const uri = useContext(UriContext);
|
|
27
|
+
const { setSelectedExample } = useContext(ExamplesContext);
|
|
58
28
|
const pickleIds = uri ? gherkinQuery.getPickleIds(uri, row.id) : [];
|
|
59
|
-
const testStepResult =
|
|
60
|
-
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
row.cells.map((cell, j) => (
|
|
29
|
+
const testStepResult = getWorstTestStepResult(cucumberQuery.getPickleTestStepResults(pickleIds));
|
|
30
|
+
return (React.createElement(React.Fragment, null,
|
|
31
|
+
React.createElement("tr", { onClick: () => setSelectedExample(pickleIds[0]) },
|
|
32
|
+
React.createElement("td", null,
|
|
33
|
+
React.createElement(StatusIcon, { status: testStepResult.status })),
|
|
34
|
+
row.cells.map((cell, j) => (React.createElement("td", { key: j, style: { textAlign: isNumber(cell.value) ? 'right' : 'left' } }, cell.value))))));
|
|
65
35
|
};
|
|
66
36
|
//# sourceMappingURL=ExamplesTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplesTable.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExamplesTable.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,oBAAoB,MAAM,+BAA+B,CAAA;AAChE,OAAO,mBAAmB,MAAM,8BAA8B,CAAA;AAC9D,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,aAAa,MAAM,6BAA6B,CAAA;AACvD,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,eAAe,GAA+D,CAAC,EACnF,WAAW,EACX,SAAS,EACT,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,+BAAO,SAAS,EAAE,MAAM,CAAC,aAAa;QACpC;YACE;gBACE,yCAAe;gBACd,WAAW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AAE,cAAc,CAAC,MAAM,GAAI,CAC1C;YACJ,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,4BAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,IACtE,IAAI,CAAC,KAAK,CACR,CACN,CAAC,CACC,CACJ,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Feature.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAoB,YAAY,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Feature.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAoB,YAAY,EAAsB,MAAM,uBAAuB,CAAA;AAoC1F,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,YAAY,CAGzD,CAAA"}
|
|
@@ -1,47 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const Description_1 = require("./Description");
|
|
13
|
-
const Keyword_1 = require("./Keyword");
|
|
14
|
-
const Rule_1 = require("./Rule");
|
|
15
|
-
const Scenario_1 = require("./Scenario");
|
|
16
|
-
const Tags_1 = require("./Tags");
|
|
17
|
-
const Title_1 = require("./Title");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HighLight } from '../app/HighLight.js';
|
|
3
|
+
import { useCustomRendering } from '../customise/index.js';
|
|
4
|
+
import { Background } from './Background.js';
|
|
5
|
+
import { Children } from './Children.js';
|
|
6
|
+
import { Description } from './Description.js';
|
|
7
|
+
import { Keyword } from './Keyword.js';
|
|
8
|
+
import { Rule } from './Rule.js';
|
|
9
|
+
import { Scenario } from './Scenario.js';
|
|
10
|
+
import { Tags } from './Tags.js';
|
|
11
|
+
import { Title } from './Title.js';
|
|
18
12
|
const DefaultRenderer = ({ feature }) => {
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
return (React.createElement("section", null,
|
|
14
|
+
React.createElement(Tags, { tags: feature.tags }),
|
|
15
|
+
React.createElement(Title, { header: "h1", id: feature.name },
|
|
16
|
+
React.createElement(Keyword, null,
|
|
23
17
|
feature.keyword,
|
|
24
18
|
":"),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
React.createElement(HighLight, { text: feature.name })),
|
|
20
|
+
React.createElement(Description, { description: feature.description }),
|
|
21
|
+
React.createElement(Children, null, (feature.children || []).map((child, index) => {
|
|
28
22
|
if (child.background) {
|
|
29
|
-
return
|
|
23
|
+
return React.createElement(Background, { key: index, background: child.background });
|
|
30
24
|
}
|
|
31
25
|
else if (child.scenario) {
|
|
32
|
-
return
|
|
26
|
+
return React.createElement(Scenario, { key: index, scenario: child.scenario });
|
|
33
27
|
}
|
|
34
28
|
else if (child.rule) {
|
|
35
|
-
return
|
|
29
|
+
return React.createElement(Rule, { key: index, rule: child.rule });
|
|
36
30
|
}
|
|
37
31
|
else {
|
|
38
32
|
throw new Error('Expected background, scenario or rule');
|
|
39
33
|
}
|
|
40
34
|
}))));
|
|
41
35
|
};
|
|
42
|
-
const Feature = (props) => {
|
|
43
|
-
const ResolvedRenderer =
|
|
44
|
-
return
|
|
36
|
+
export const Feature = (props) => {
|
|
37
|
+
const ResolvedRenderer = useCustomRendering('Feature', {}, DefaultRenderer);
|
|
38
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
45
39
|
};
|
|
46
|
-
exports.Feature = Feature;
|
|
47
40
|
//# sourceMappingURL=Feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Feature.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Feature.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Feature.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAkC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,eAAe,GAAmC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACtE,OAAO,CACL;QACE,oBAAC,IAAI,IAAC,IAAI,EAAE,OAAO,CAAC,IAAI,GAAI;QAC5B,oBAAC,KAAK,IAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAE,OAAO,CAAC,IAAI;YACjC,oBAAC,OAAO;gBAAE,OAAO,CAAC,OAAO;oBAAY;YACrC,oBAAC,SAAS,IAAC,IAAI,EAAE,OAAO,CAAC,IAAI,GAAI,CAC3B;QACR,oBAAC,WAAW,IAAC,WAAW,EAAE,OAAO,CAAC,WAAW,GAAI;QACjD,oBAAC,QAAQ,QACN,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC7C,IAAI,KAAK,CAAC,UAAU,EAAE;gBACpB,OAAO,oBAAC,UAAU,IAAC,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,GAAI,CAAA;aAChE;iBAAM,IAAI,KAAK,CAAC,QAAQ,EAAE;gBACzB,OAAO,oBAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAI,CAAA;aAC1D;iBAAM,IAAI,KAAK,CAAC,IAAI,EAAE;gBACrB,OAAO,oBAAC,IAAI,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,CAAA;aAC9C;iBAAM;gBACL,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;aACzD;QACH,CAAC,CAAC,CACO,CACH,CACX,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAA0C,CAAC,KAAK,EAAE,EAAE;IACtE,MAAM,gBAAgB,GAAG,kBAAkB,CAAe,SAAS,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IACzF,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GherkinDocumentProps } from '../customise';
|
|
2
|
+
import { GherkinDocumentProps } from '../customise/index.js';
|
|
3
3
|
export declare const GherkinDocument: React.FunctionComponent<GherkinDocumentProps>;
|
|
4
4
|
//# sourceMappingURL=GherkinDocument.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinDocument.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinDocument.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"GherkinDocument.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinDocument.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAsB,MAAM,uBAAuB,CAAA;AAOhF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAOzE,CAAA"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GherkinDocument = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const customise_1 = require("../customise");
|
|
9
|
-
const Feature_1 = require("./Feature");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering } from '../customise/index.js';
|
|
3
|
+
import { Feature } from './Feature.js';
|
|
10
4
|
const DefaultRenderer = ({ gherkinDocument }) => {
|
|
11
|
-
return gherkinDocument.feature ?
|
|
5
|
+
return gherkinDocument.feature ? React.createElement(Feature, { feature: gherkinDocument.feature }) : null;
|
|
12
6
|
};
|
|
13
|
-
const GherkinDocument = (props) => {
|
|
14
|
-
const ResolvedRenderer =
|
|
15
|
-
return
|
|
7
|
+
export const GherkinDocument = (props) => {
|
|
8
|
+
const ResolvedRenderer = useCustomRendering('GherkinDocument', {}, DefaultRenderer);
|
|
9
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
16
10
|
};
|
|
17
|
-
exports.GherkinDocument = GherkinDocument;
|
|
18
11
|
//# sourceMappingURL=GherkinDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinDocument.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinDocument.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GherkinDocument.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinDocument.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAwB,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,eAAe,GAAkD,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE;IAC7F,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAC,OAAO,IAAC,OAAO,EAAE,eAAe,CAAC,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AACvF,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAkD,CAAC,KAAK,EAAE,EAAE;IACtF,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,iBAAiB,EACjB,EAAE,EACF,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"GherkinStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,uBAAuB,CAAA;AA+G9F,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAGjE,CAAA"}
|