@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.
- 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.d.ts +2 -1
- package/dist/src/components/customise/customRendering.d.ts.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 +3 -3
- package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.js +8 -15
- 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/components/results/TestStepResultDetails.d.ts +4 -0
- package/dist/src/components/results/TestStepResultDetails.d.ts.map +1 -0
- package/dist/src/components/results/TestStepResultDetails.js +16 -0
- package/dist/src/components/results/TestStepResultDetails.js.map +1 -0
- package/dist/src/components/results/index.d.ts +2 -0
- package/dist/src/components/results/index.d.ts.map +1 -0
- package/dist/src/components/results/index.js +2 -0
- package/dist/src/components/results/index.js.map +1 -0
- 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 +35 -27
- 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,44 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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.Attachment = exports.DefaultRenderer = void 0;
|
|
30
|
-
const messages_1 = require("@cucumber/messages");
|
|
31
|
-
const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
32
|
-
const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
1
|
+
import { AttachmentContentEncoding } from '@cucumber/messages';
|
|
2
|
+
import { faPaperclip } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
33
4
|
// @ts-ignore
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const DefaultRenderer = ({ attachment, styles, }) => {
|
|
5
|
+
import Convert from 'ansi-to-html';
|
|
6
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
|
+
import { NavigationButton } from '../app/NavigationButton.js';
|
|
8
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
9
|
+
import defaultStyles from './Attachment.module.scss';
|
|
10
|
+
import { attachmentFilename } from './attachmentFilename.js';
|
|
11
|
+
import { ErrorMessage } from './ErrorMessage.js';
|
|
12
|
+
export const DefaultRenderer = ({ attachment, styles, }) => {
|
|
42
13
|
if (attachment.mediaType.match(/^image\//)) {
|
|
43
14
|
return image(attachment, styles);
|
|
44
15
|
}
|
|
@@ -55,20 +26,18 @@ const DefaultRenderer = ({ attachment, styles, }) => {
|
|
|
55
26
|
return text(attachment, prettyJSON, false, styles);
|
|
56
27
|
}
|
|
57
28
|
else {
|
|
58
|
-
return
|
|
29
|
+
return React.createElement(Unknown, { attachment: attachment });
|
|
59
30
|
}
|
|
60
31
|
};
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
32
|
+
export const Attachment = (props) => {
|
|
33
|
+
const ResolvedRenderer = useCustomRendering('Attachment', defaultStyles, DefaultRenderer);
|
|
34
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
65
35
|
};
|
|
66
|
-
exports.Attachment = Attachment;
|
|
67
36
|
const Unknown = ({ attachment }) => {
|
|
68
|
-
const [downloadUrl, setDownloadUrl] =
|
|
69
|
-
|
|
70
|
-
const filename =
|
|
71
|
-
const onClick =
|
|
37
|
+
const [downloadUrl, setDownloadUrl] = useState();
|
|
38
|
+
useEffect(() => () => cleanupDownloadUrl(downloadUrl), [downloadUrl]);
|
|
39
|
+
const filename = attachmentFilename(attachment);
|
|
40
|
+
const onClick = useCallback(() => {
|
|
72
41
|
let href;
|
|
73
42
|
if (downloadUrl) {
|
|
74
43
|
href = downloadUrl;
|
|
@@ -83,14 +52,14 @@ const Unknown = ({ attachment }) => {
|
|
|
83
52
|
anchor.download = filename;
|
|
84
53
|
anchor.click();
|
|
85
54
|
}, [attachment, filename, downloadUrl]);
|
|
86
|
-
return (
|
|
87
|
-
|
|
55
|
+
return (React.createElement(NavigationButton, { onClick: onClick },
|
|
56
|
+
React.createElement(FontAwesomeIcon, { icon: faPaperclip }),
|
|
88
57
|
"Download ",
|
|
89
58
|
filename));
|
|
90
59
|
};
|
|
91
60
|
function createDownloadUrl(attachment) {
|
|
92
61
|
console.debug('Creating download url');
|
|
93
|
-
const body = attachment.contentEncoding ===
|
|
62
|
+
const body = attachment.contentEncoding === AttachmentContentEncoding.BASE64
|
|
94
63
|
? base64Decode(attachment.body)
|
|
95
64
|
: attachment.body;
|
|
96
65
|
const bytes = Uint8Array.from(body, (m) => m.codePointAt(0));
|
|
@@ -106,44 +75,41 @@ function cleanupDownloadUrl(url) {
|
|
|
106
75
|
}
|
|
107
76
|
}
|
|
108
77
|
function image(attachment, classes) {
|
|
109
|
-
var _a;
|
|
110
78
|
if (attachment.contentEncoding !== 'BASE64') {
|
|
111
|
-
return (
|
|
79
|
+
return (React.createElement(ErrorMessage, { message: `Couldn't display ${attachment.mediaType} image because it wasn't base64 encoded` }));
|
|
112
80
|
}
|
|
113
|
-
const attachmentTitle =
|
|
114
|
-
return (
|
|
115
|
-
|
|
116
|
-
|
|
81
|
+
const attachmentTitle = attachment.fileName ?? 'Attached Image (' + attachment.mediaType + ')';
|
|
82
|
+
return (React.createElement("details", null,
|
|
83
|
+
React.createElement("summary", null, attachmentTitle),
|
|
84
|
+
React.createElement("img", { alt: "Embedded Image", src: `data:${attachment.mediaType};base64,${attachment.body}`, className: classes.image })));
|
|
117
85
|
}
|
|
118
86
|
function video(attachment) {
|
|
119
|
-
|
|
120
|
-
const attachmentTitle = (_a = attachment.fileName) !== null && _a !== void 0 ? _a : 'Attached Video (' + attachment.mediaType + ')';
|
|
87
|
+
const attachmentTitle = attachment.fileName ?? 'Attached Video (' + attachment.mediaType + ')';
|
|
121
88
|
if (attachment.contentEncoding !== 'BASE64') {
|
|
122
|
-
return (
|
|
89
|
+
return (React.createElement(ErrorMessage, { message: `Couldn't display ${attachment.mediaType} video because it wasn't base64 encoded` }));
|
|
123
90
|
}
|
|
124
|
-
return (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
91
|
+
return (React.createElement("details", null,
|
|
92
|
+
React.createElement("summary", null, attachmentTitle),
|
|
93
|
+
React.createElement("video", { controls: true },
|
|
94
|
+
React.createElement("source", { src: `data:${attachment.mediaType};base64,${attachment.body}` }),
|
|
128
95
|
"Your browser is unable to display video")));
|
|
129
96
|
}
|
|
130
97
|
function base64Decode(body) {
|
|
131
98
|
return atob(body);
|
|
132
99
|
}
|
|
133
100
|
function text(attachment, prettify, dangerouslySetInnerHTML, classes) {
|
|
134
|
-
var _a;
|
|
135
101
|
const body = attachment.contentEncoding === 'IDENTITY' ? attachment.body : base64Decode(attachment.body);
|
|
136
|
-
const attachmentTitle =
|
|
102
|
+
const attachmentTitle = attachment.fileName ?? 'Attached Text (' + attachment.mediaType + ')';
|
|
137
103
|
if (dangerouslySetInnerHTML) {
|
|
138
|
-
return (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
104
|
+
return (React.createElement("details", null,
|
|
105
|
+
React.createElement("summary", null, attachmentTitle),
|
|
106
|
+
React.createElement("pre", { className: classes.text },
|
|
107
|
+
React.createElement("span", { dangerouslySetInnerHTML: { __html: prettify(body) } }))));
|
|
142
108
|
}
|
|
143
|
-
return (
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
109
|
+
return (React.createElement("details", null,
|
|
110
|
+
React.createElement("summary", null, attachmentTitle),
|
|
111
|
+
React.createElement("pre", { className: classes.text },
|
|
112
|
+
React.createElement("span", null, prettify(body)))));
|
|
147
113
|
}
|
|
148
114
|
function prettyJSON(s) {
|
|
149
115
|
try {
|
|
@@ -154,6 +120,6 @@ function prettyJSON(s) {
|
|
|
154
120
|
}
|
|
155
121
|
}
|
|
156
122
|
function prettyANSI(s) {
|
|
157
|
-
return new
|
|
123
|
+
return new Convert().toHtml(s);
|
|
158
124
|
}
|
|
159
125
|
//# sourceMappingURL=Attachment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Attachment.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Attachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,aAAa;AACb,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,KAAK,EAAE,EAAM,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAyD,CAAC,EACpF,UAAU,EACV,MAAM,GACP,EAAE,EAAE;IACH,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;QAC1C,OAAO,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;KACjC;SAAM,IAAI,UAAU,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AI,CACX,UAA+B,EAC/B,QAAkC,EAClC,uBAAgC,EAChC,OAA0B;IAE1B,MAAM,IAAI,GACR,UAAU,CAAC,eAAe,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAE7F,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,IAAI,iBAAiB,GAAG,UAAU,CAAC,SAAS,GAAG,GAAG,CAAA;IAE7F,IAAI,uBAAuB,EAAE;QAC3B,OAAO,CACL;YACE,qCAAU,eAAe,CAAW;YACpC,6BAAK,SAAS,EAAE,OAAO,CAAC,IAAI;gBAC1B,8BAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAI,CACzD,CACE,CACX,CAAA;KACF;IACD,OAAO,CACL;QACE,qCAAU,eAAe,CAAW;QACpC,6BAAK,SAAS,EAAE,OAAO,CAAC,IAAI;YAC1B,kCAAO,QAAQ,CAAC,IAAI,CAAC,CAAQ,CACzB,CACE,CACX,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,IAAI;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;KAC9C;IAAC,OAAO,MAAM,EAAE;QACf,OAAO,CAAC,CAAA;KACT;AACH,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,IAAI,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Background.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAwC,MAAM,
|
|
1
|
+
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Background.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAwC,MAAM,uBAAuB,CAAA;AAsB7F,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAG/D,CAAA"}
|
|
@@ -1,30 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const customise_1 = require("../customise");
|
|
9
|
-
const Description_1 = require("./Description");
|
|
10
|
-
const GherkinSteps_1 = require("./GherkinSteps");
|
|
11
|
-
const Keyword_1 = require("./Keyword");
|
|
12
|
-
const StepsList_1 = require("./StepsList");
|
|
13
|
-
const Title_1 = require("./Title");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering } from '../customise/index.js';
|
|
3
|
+
import { Description } from './Description.js';
|
|
4
|
+
import { GherkinSteps } from './GherkinSteps.js';
|
|
5
|
+
import { Keyword } from './Keyword.js';
|
|
6
|
+
import { StepsList } from './StepsList.js';
|
|
7
|
+
import { Title } from './Title.js';
|
|
14
8
|
const DefaultRenderer = ({ background }) => {
|
|
15
|
-
return (
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
return (React.createElement("section", null,
|
|
10
|
+
React.createElement(Title, { header: "h2", id: background.id },
|
|
11
|
+
React.createElement(Keyword, null,
|
|
18
12
|
background.keyword,
|
|
19
13
|
":"),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
React.createElement("span", null, background.name)),
|
|
15
|
+
React.createElement(Description, { description: background.description }),
|
|
16
|
+
React.createElement(StepsList, null,
|
|
17
|
+
React.createElement(GherkinSteps, { steps: background.steps || [], hasExamples: false }))));
|
|
24
18
|
};
|
|
25
|
-
const Background = (props) => {
|
|
26
|
-
const ResolvedRenderer =
|
|
27
|
-
return
|
|
19
|
+
export const Background = (props) => {
|
|
20
|
+
const ResolvedRenderer = useCustomRendering('Background', {}, DefaultRenderer);
|
|
21
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
28
22
|
};
|
|
29
|
-
exports.Background = Background;
|
|
30
23
|
//# sourceMappingURL=Background.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Background.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Background.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Background.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Background.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAqC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,eAAe,GAAsC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;IAC5E,OAAO,CACL;QACE,oBAAC,KAAK,IAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAE,UAAU,CAAC,EAAE;YAClC,oBAAC,OAAO;gBAAE,UAAU,CAAC,OAAO;oBAAY;YACxC,kCAAO,UAAU,CAAC,IAAI,CAAQ,CACxB;QACR,oBAAC,WAAW,IAAC,WAAW,EAAE,UAAU,CAAC,WAAW,GAAI;QACpD,oBAAC,SAAS;YACR,oBAAC,YAAY,IAAC,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,EAAE,EAAE,WAAW,EAAE,KAAK,GAAI,CACzD,CACJ,CACX,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAA6C,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,gBAAgB,GAAG,kBAAkB,CAAkB,YAAY,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IAC/F,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Children.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Children.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,
|
|
1
|
+
{"version":3,"file":"Children.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Children.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAEL,aAAa,EAGd,MAAM,uBAAuB,CAAA;AAU9B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAO3D,CAAA"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Children = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const customise_1 = require("../customise");
|
|
9
|
-
const Children_module_scss_1 = __importDefault(require("./Children.module.scss"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
3
|
+
import defaultStyles from './Children.module.scss';
|
|
10
4
|
const DefaultRenderer = ({ styles, children, }) => {
|
|
11
|
-
return
|
|
5
|
+
return React.createElement("div", { className: styles.children }, children);
|
|
12
6
|
};
|
|
13
|
-
const Children = (props) => {
|
|
14
|
-
const ResolvedRenderer =
|
|
15
|
-
return
|
|
7
|
+
export const Children = (props) => {
|
|
8
|
+
const ResolvedRenderer = useCustomRendering('Children', defaultStyles, DefaultRenderer);
|
|
9
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
16
10
|
};
|
|
17
|
-
exports.Children = Children;
|
|
18
11
|
//# sourceMappingURL=Children.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Children.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Children.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Children.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Children.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,wBAAwB,CAAA;AAElD,MAAM,eAAe,GAAqD,CAAC,EACzE,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,IAAG,QAAQ,CAAO,CAAA;AAC1D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAA2C,CAAC,KAAK,EAAE,EAAE;IACxE,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,UAAU,EACV,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/DataTable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAEL,cAAc,EAGf,MAAM,
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/DataTable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAEL,cAAc,EAGf,MAAM,uBAAuB,CAAA;AAiC9B,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAO7D,CAAA"}
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.DataTable = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const HighLight_1 = require("../app/HighLight");
|
|
9
|
-
const customise_1 = require("../customise");
|
|
10
|
-
const DataTable_module_scss_1 = __importDefault(require("./DataTable.module.scss"));
|
|
11
|
-
const isNumber_1 = __importDefault(require("./isNumber"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HighLight } from '../app/HighLight.js';
|
|
3
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
4
|
+
import defaultStyles from './DataTable.module.scss';
|
|
5
|
+
import isNumber from './isNumber.js';
|
|
12
6
|
const TableBody = ({ rows }) => {
|
|
13
|
-
return (
|
|
14
|
-
|
|
7
|
+
return (React.createElement("tbody", null, rows.map((row, i) => (React.createElement("tr", { key: i }, (row.cells || []).map((cell, j) => (React.createElement("td", { key: j, style: { textAlign: isNumber(cell.value) ? 'right' : 'left' } },
|
|
8
|
+
React.createElement(HighLight, { text: cell.value })))))))));
|
|
15
9
|
};
|
|
16
10
|
const DefaultRenderer = ({ dataTable, styles, }) => {
|
|
17
|
-
return (
|
|
18
|
-
|
|
11
|
+
return (React.createElement("table", { className: styles.table },
|
|
12
|
+
React.createElement(TableBody, { rows: dataTable.rows || [] })));
|
|
19
13
|
};
|
|
20
|
-
const DataTable = (props) => {
|
|
21
|
-
const ResolvedRenderer =
|
|
22
|
-
return
|
|
14
|
+
export const DataTable = (props) => {
|
|
15
|
+
const ResolvedRenderer = useCustomRendering('DataTable', defaultStyles, DefaultRenderer);
|
|
16
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
23
17
|
};
|
|
24
|
-
exports.DataTable = DataTable;
|
|
25
18
|
//# sourceMappingURL=DataTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.js","sourceRoot":"","sources":["../../../../src/components/gherkin/DataTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTable.js","sourceRoot":"","sources":["../../../../src/components/gherkin/DataTable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,yBAAyB,CAAA;AACnD,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,MAAM,SAAS,GAEV,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAChB,OAAO,CACL,mCACG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACpB,4BAAI,GAAG,EAAE,CAAC,IACP,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAClC,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;QACvE,oBAAC,SAAS,IAAC,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI,CAC5B,CACN,CAAC,CACC,CACN,CAAC,CACI,CACT,CAAA;AACH,CAAC,CAAA;AAED,MAAM,eAAe,GAAuD,CAAC,EAC3E,SAAS,EACT,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,+BAAO,SAAS,EAAE,MAAM,CAAC,KAAK;QAC5B,oBAAC,SAAS,IAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,EAAE,GAAI,CACnC,CACT,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAGL,gBAAgB,EAEjB,MAAM,
|
|
1
|
+
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAGL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAA;AAiB9B,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAOjE,CAAA"}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Description = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const HighLight_1 = require("../app/HighLight");
|
|
9
|
-
const customise_1 = require("../customise");
|
|
10
|
-
const Description_module_scss_1 = __importDefault(require("./Description.module.scss"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HighLight } from '../app/HighLight.js';
|
|
3
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
4
|
+
import defaultStyles from './Description.module.scss';
|
|
11
5
|
const DefaultRenderer = ({ description, styles, }) => {
|
|
12
6
|
if (!description || description.trim() === '') {
|
|
13
7
|
return null;
|
|
14
8
|
}
|
|
15
|
-
return (
|
|
16
|
-
|
|
9
|
+
return (React.createElement("div", { className: styles.content },
|
|
10
|
+
React.createElement(HighLight, { text: description, markdown: true })));
|
|
17
11
|
};
|
|
18
|
-
const Description = (props) => {
|
|
19
|
-
const ResolvedRenderer =
|
|
20
|
-
return
|
|
12
|
+
export const Description = (props) => {
|
|
13
|
+
const ResolvedRenderer = useCustomRendering('Description', defaultStyles, DefaultRenderer);
|
|
14
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
21
15
|
};
|
|
22
|
-
exports.Description = Description;
|
|
23
16
|
//# sourceMappingURL=Description.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Description.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,2BAA2B,CAAA;AAErD,MAAM,eAAe,GAA2D,CAAC,EAC/E,WAAW,EACX,MAAM,GACP,EAAE,EAAE;IACH,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC7C,OAAO,IAAI,CAAA;KACZ;IACD,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO;QAC5B,oBAAC,SAAS,IAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,GAAI,CAC5C,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAA8C,CAAC,KAAK,EAAE,EAAE;IAC9E,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,aAAa,EACb,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocString.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/DocString.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAGL,cAAc,EAEf,MAAM,
|
|
1
|
+
{"version":3,"file":"DocString.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/DocString.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAGL,cAAc,EAEf,MAAM,uBAAuB,CAAA;AAc9B,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAO7D,CAAA"}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DocString = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const HighLight_1 = require("../app/HighLight");
|
|
9
|
-
const customise_1 = require("../customise");
|
|
10
|
-
const DocString_module_scss_1 = __importDefault(require("./DocString.module.scss"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HighLight } from '../app/HighLight.js';
|
|
3
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
4
|
+
import defaultStyles from './DocString.module.scss';
|
|
11
5
|
const DefaultRenderer = ({ docString, styles, }) => {
|
|
12
|
-
return (
|
|
13
|
-
|
|
6
|
+
return (React.createElement("pre", { className: styles.docString },
|
|
7
|
+
React.createElement(HighLight, { text: docString.content })));
|
|
14
8
|
};
|
|
15
|
-
const DocString = (props) => {
|
|
16
|
-
const ResolvedRenderer =
|
|
17
|
-
return
|
|
9
|
+
export const DocString = (props) => {
|
|
10
|
+
const ResolvedRenderer = useCustomRendering('DocString', defaultStyles, DefaultRenderer);
|
|
11
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
18
12
|
};
|
|
19
|
-
exports.DocString = DocString;
|
|
20
13
|
//# sourceMappingURL=DocString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocString.js","sourceRoot":"","sources":["../../../../src/components/gherkin/DocString.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocString.js","sourceRoot":"","sources":["../../../../src/components/gherkin/DocString.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,yBAAyB,CAAA;AAEnD,MAAM,eAAe,GAAuD,CAAC,EAC3E,SAAS,EACT,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS;QAC9B,oBAAC,SAAS,IAAC,IAAI,EAAE,SAAS,CAAC,OAAO,GAAI,CAClC,CACP,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
|
-
import
|
|
2
|
-
import { ErrorMessageProps } from '../customise';
|
|
3
|
-
export declare const ErrorMessage:
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ErrorMessageProps } from '../customise/index.js';
|
|
3
|
+
export declare const ErrorMessage: FC<ErrorMessageProps>;
|
|
4
4
|
//# sourceMappingURL=ErrorMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/ErrorMessage.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ErrorMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/ErrorMessage.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAGL,iBAAiB,EAElB,MAAM,uBAAuB,CAAA;AAW9B,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAO9C,CAAA"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
3
|
+
import defaultStyles from './ErrorMessage.module.scss';
|
|
4
|
+
const DefaultRenderer = ({ message, children, styles, }) => {
|
|
5
|
+
return React.createElement("pre", { className: styles.message }, message ?? children);
|
|
4
6
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const customise_1 = require("../customise");
|
|
9
|
-
const ErrorMessage_module_scss_1 = __importDefault(require("./ErrorMessage.module.scss"));
|
|
10
|
-
const DefaultRenderer = ({ message, styles, }) => {
|
|
11
|
-
return react_1.default.createElement("pre", { className: styles.message }, message);
|
|
7
|
+
export const ErrorMessage = ({ children, ...props }) => {
|
|
8
|
+
const ResolvedRenderer = useCustomRendering('ErrorMessage', defaultStyles, DefaultRenderer);
|
|
9
|
+
return React.createElement(ResolvedRenderer, { ...props }, children);
|
|
12
10
|
};
|
|
13
|
-
const ErrorMessage = (props) => {
|
|
14
|
-
const ResolvedRenderer = (0, customise_1.useCustomRendering)('ErrorMessage', ErrorMessage_module_scss_1.default, DefaultRenderer);
|
|
15
|
-
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
16
|
-
};
|
|
17
|
-
exports.ErrorMessage = ErrorMessage;
|
|
18
11
|
//# sourceMappingURL=ErrorMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorMessage.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ErrorMessage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorMessage.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ErrorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,4BAA4B,CAAA;AAEtD,MAAM,eAAe,GAA6D,CAAC,EACjF,OAAO,EACP,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,OAAO,IAAI,QAAQ,CAAO,CAAA;AACpE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC5E,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,cAAc,EACd,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,IAAG,QAAQ,CAAoB,CAAA;AACnE,CAAC,CAAA"}
|