Skip to content

Commit

Permalink
feat: change Header value input and Field Injection value input to te…
Browse files Browse the repository at this point in the history
…xt areas (#1065)

deps: update @bpmn-io/properties-panel to 3.22.3

Related camunda/camunda-modeler#2982
  • Loading branch information
jarekdanielak authored Jul 22, 2024
1 parent 6b49485 commit 9afb582
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 23 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@babel/plugin-transform-react-jsx": "^7.24.7",
"@bpmn-io/element-template-chooser": "^1.0.0",
"@bpmn-io/element-templates-icons-renderer": "^0.3.0",
"@bpmn-io/properties-panel": "^3.21.0",
"@bpmn-io/properties-panel": "^3.22.3",
"@bpmn-io/variable-resolver": "^1.2.2",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-babel": "^6.0.4",
Expand Down
7 changes: 4 additions & 3 deletions src/provider/camunda-platform/properties/FieldInjection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TextFieldEntry, SelectEntry } from '@bpmn-io/properties-panel';
import { TextFieldEntry, SelectEntry, TextAreaEntry } from '@bpmn-io/properties-panel';

import {
useService
Expand Down Expand Up @@ -156,13 +156,14 @@ function ValueProperty(props) {
return field.string || field.stringValue || field.expression;
};

return TextFieldEntry({
return TextAreaEntry({
element: field,
id: idPrefix + '-value',
label: translate('Value'),
getValue,
setValue,
debounce
debounce,
autoResize: true
});
}

Expand Down
7 changes: 4 additions & 3 deletions src/provider/zeebe/properties/Header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TextFieldEntry } from '@bpmn-io/properties-panel';
import { TextFieldEntry, TextAreaEntry } from '@bpmn-io/properties-panel';

import {
useService
Expand Down Expand Up @@ -87,12 +87,13 @@ function ValueProperty(props) {
return header.value;
};

return TextFieldEntry({
return TextAreaEntry({
element: header,
id: idPrefix + '-value',
label: translate('Value'),
getValue,
setValue,
debounce
debounce,
autoResize: true
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('provider/camunda-platform - FieldInjectionProps', function() {

// when
const executionListenerGroup = domQuery('[data-group-id="group-CamundaPlatform__ExecutionListener"]', container);
const valueInputField = domQuery('input[name*="value"]', executionListenerGroup);
const valueInputField = domQuery('textarea[name*="value"]', executionListenerGroup);

changeInput(valueInputField, 'newValue');

Expand Down
8 changes: 4 additions & 4 deletions test/spec/provider/zeebe/Header.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('provider/bpmn - Header', function() {

// when
const headerGroup = getGroup(container, 'headers');
const valueInput = domQuery('input[name=ServiceTask_empty-header-0-value]', headerGroup);
const valueInput = domQuery('textarea[name=ServiceTask_empty-header-0-value]', headerGroup);

// then
expect(valueInput).to.not.exist;
Expand All @@ -173,7 +173,7 @@ describe('provider/bpmn - Header', function() {

// when
const headerGroup = getGroup(container, 'headers');
const valueInput = domQuery('input[name=ServiceTask_1-header-0-value]', headerGroup);
const valueInput = domQuery('textarea[name=ServiceTask_1-header-0-value]', headerGroup);

// then
expect(valueInput.value).to.eql(getHeader(serviceTask, 0).get('value'));
Expand All @@ -191,7 +191,7 @@ describe('provider/bpmn - Header', function() {

// when
const headerGroup = getGroup(container, 'headers');
const valueInput = domQuery('input[name=ServiceTask_1-header-0-value]', headerGroup);
const valueInput = domQuery('textarea[name=ServiceTask_1-header-0-value]', headerGroup);
changeInput(valueInput, 'newValue');

// then
Expand All @@ -209,7 +209,7 @@ describe('provider/bpmn - Header', function() {
await act(() => {
selection.select(serviceTask);
});
const valueInput = domQuery('input[name=ServiceTask_1-header-0-value]', container);
const valueInput = domQuery('textarea[name=ServiceTask_1-header-0-value]', container);
changeInput(valueInput, 'newValue');

// when
Expand Down

0 comments on commit 9afb582

Please sign in to comment.