testomatio-editor-blocks 0.4.22 → 0.4.23
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.
|
@@ -3,5 +3,5 @@ import { StepField } from "./stepField";
|
|
|
3
3
|
const STEP_PLACEHOLDER = "Enter step name";
|
|
4
4
|
const EXPECTED_RESULT_PLACEHOLDER = "Enter expected result";
|
|
5
5
|
export function StepHorizontalView({ blockId, stepNumber, stepValue, expectedResult, onStepChange, onExpectedChange, onInsertNextStep, onFieldFocus, viewToggle, }) {
|
|
6
|
-
return (_jsxs("div", { className: "bn-teststep bn-teststep--horizontal", "data-block-id": blockId, children: [_jsxs("div", { className: "bn-teststep__timeline", children: [_jsx("span", { className: "bn-teststep__number", children: stepNumber }), _jsx("div", { className: "bn-teststep__line" })] }), _jsxs("div", { className: "bn-teststep__content", children: [_jsxs("div", { className: "bn-
|
|
6
|
+
return (_jsxs("div", { className: "bn-teststep bn-teststep--horizontal", "data-block-id": blockId, children: [_jsxs("div", { className: "bn-teststep__timeline", children: [_jsx("span", { className: "bn-teststep__number", children: stepNumber }), _jsx("div", { className: "bn-teststep__line" })] }), _jsxs("div", { className: "bn-teststep__content", children: [_jsxs("div", { className: "bn-teststep__horizontal-fields", children: [_jsx("div", { className: "bn-teststep__horizontal-col", children: _jsx(StepField, { label: "Step", value: stepValue, onChange: onStepChange, placeholder: STEP_PLACEHOLDER, enableAutocomplete: true, fieldName: "title", suggestionFilter: (suggestion) => suggestion.isSnippet !== true, onFieldFocus: onFieldFocus, multiline: true, enableImageUpload: true, showFormattingButtons: true, showImageButton: true }) }), _jsx("div", { className: "bn-teststep__horizontal-col", children: _jsx(StepField, { label: "Expected result", labelAction: viewToggle, value: expectedResult, onChange: onExpectedChange, placeholder: EXPECTED_RESULT_PLACEHOLDER, multiline: true, enableAutocomplete: true, enableImageUpload: true, showFormattingButtons: true, showImageButton: true, onFieldFocus: onFieldFocus }) })] }), _jsx("div", { className: "bn-step-actions", children: _jsxs("button", { type: "button", className: "bn-step-action-btn", onClick: onInsertNextStep, children: [_jsx("svg", { className: "bn-step-action-btn__icon", width: "16", height: "16", viewBox: "0 0 13.334 13.334", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M6.667 0a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 6.667 0Zm0 1.334a5.333 5.333 0 1 0 0 10.666 5.333 5.333 0 0 0 0-10.666ZM7.334 3.334V6H10v1.334H7.334V10H6V7.334H3.334V6H6V3.334h1.334Z", fill: "currentColor" }) }), "Add new step"] }) })] })] }));
|
|
7
7
|
}
|
package/package/styles.css
CHANGED
|
@@ -510,11 +510,16 @@ html.dark .bn-step-image-preview__content {
|
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
.bn-teststep__horizontal-col {
|
|
513
|
-
flex: 1
|
|
513
|
+
flex: 1 1 0%;
|
|
514
514
|
min-width: 0;
|
|
515
515
|
display: flex;
|
|
516
516
|
flex-direction: column;
|
|
517
517
|
gap: 4px;
|
|
518
|
+
overflow: hidden;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.bn-teststep__horizontal-col .bn-step-field__top {
|
|
522
|
+
min-height: 28px;
|
|
518
523
|
}
|
|
519
524
|
|
|
520
525
|
@media (max-width: 860px) {
|
package/package.json
CHANGED
|
@@ -35,18 +35,10 @@ export function StepHorizontalView({
|
|
|
35
35
|
<div className="bn-teststep__line" />
|
|
36
36
|
</div>
|
|
37
37
|
<div className="bn-teststep__content">
|
|
38
|
-
<div className="bn-teststep__header">
|
|
39
|
-
<span className="bn-teststep__title">Step</span>
|
|
40
|
-
{viewToggle}
|
|
41
|
-
</div>
|
|
42
38
|
<div className="bn-teststep__horizontal-fields">
|
|
43
39
|
<div className="bn-teststep__horizontal-col">
|
|
44
|
-
<div className="bn-teststep__header">
|
|
45
|
-
<span className="bn-teststep__title">Step</span>
|
|
46
|
-
</div>
|
|
47
40
|
<StepField
|
|
48
41
|
label="Step"
|
|
49
|
-
showLabel={false}
|
|
50
42
|
value={stepValue}
|
|
51
43
|
onChange={onStepChange}
|
|
52
44
|
placeholder={STEP_PLACEHOLDER}
|
|
@@ -61,12 +53,9 @@ export function StepHorizontalView({
|
|
|
61
53
|
/>
|
|
62
54
|
</div>
|
|
63
55
|
<div className="bn-teststep__horizontal-col">
|
|
64
|
-
<div className="bn-teststep__header">
|
|
65
|
-
<span className="bn-teststep__title">Expected result</span>
|
|
66
|
-
</div>
|
|
67
56
|
<StepField
|
|
68
57
|
label="Expected result"
|
|
69
|
-
|
|
58
|
+
labelAction={viewToggle}
|
|
70
59
|
value={expectedResult}
|
|
71
60
|
onChange={onExpectedChange}
|
|
72
61
|
placeholder={EXPECTED_RESULT_PLACEHOLDER}
|
package/src/editor/styles.css
CHANGED
|
@@ -510,11 +510,16 @@ html.dark .bn-step-image-preview__content {
|
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
.bn-teststep__horizontal-col {
|
|
513
|
-
flex: 1
|
|
513
|
+
flex: 1 1 0%;
|
|
514
514
|
min-width: 0;
|
|
515
515
|
display: flex;
|
|
516
516
|
flex-direction: column;
|
|
517
517
|
gap: 4px;
|
|
518
|
+
overflow: hidden;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.bn-teststep__horizontal-col .bn-step-field__top {
|
|
522
|
+
min-height: 28px;
|
|
518
523
|
}
|
|
519
524
|
|
|
520
525
|
@media (max-width: 860px) {
|