.bpmn-container {
flex-basis: 100%;
- flex-grow: 1
+ flex-grow: 1;
+ .djs-palette.open {
+ border: none;
+ }
+ .djs-palette-entries {
+ border: solid 1px $light-gray;
+ &:empty {
+ border: none;
+ }
+ }
}
.bpmn-sidebar {
background-color: $light-silver;
height: 100%;
width: 320px;
- height: 100%;
- label {
+
+ label {
@include body-1;
}
.group-label {
max-height: 888px;
overflow-y: auto;
&, .bpp-properties-panel {
+ [disabled], [editable-readonly=false] {
+ background-color: $light-gray;
+ color: $dark-gray;
+ pointer-events: none;
+ }
+ label[for] {
+ cursor: default;
+ background: transparent;
+ }
background-color: $light-silver;
#camunda-activitySelect-select {
&.invalid {
}
}
}
+ [editable-readonly] {
+ font-family: OpenSans-Regular, Arial, sans-serif;
+ font-style: normal;
+ font-weight: 400;
+ font-size: 14px;
+ box-sizing: border-box;
+ }
+
.composition-buttons {
position: fixed;
background-color: $light-silver;
setStatusToElement('button', status, panel);
setStatusToElement('select', status, panel);
+ //distinguish editable and clickable fields using attr and style
CAMUNDA_PANEL_INPUTS_NAMES.map(name => {
const div = document.getElementById(name);
if (div) {
- div.setAttribute('contenteditable', !status);
+ div.setAttribute('editable-readonly', !status);
}
});
}
isReadOnly: PropTypes.bool
};
- constructor() {
- super();
+ constructor(props) {
+ super(props);
this.generatedId = 'bpmn-container' + Date.now();
this.fileInput = React.createRef();
this.bpmnContainer = React.createRef();
this.setDiagramToBPMN(composition ? composition : newDiagramXML);
this.modeler.on('element.out', () => this.exportDiagramToStore());
this.modeler.on('element.click', this.handleCompositionStatus);
- this.bpmnContainer.current.click();
+ this.modeler.on(
+ 'propertiesPanel.changed',
+ this.handleCompositionStatus
+ );
this.modeling = this.modeler.get('modeling');
this.modeler.get('readOnly').readOnly(isReadOnly);
}
export const COMPOSITION_ERROR_COLOR = '#f0c2c2';
export const COMPOSITION_VALID_COLOR = 'white';
+//list of field ids (contenteditable) that has separate treatment
export const CAMUNDA_PANEL_INPUTS_NAMES = [
'camunda-parameterType-text',
'camunda-documentation',
- 'camunda-name'
+ 'camunda-name',
+ 'camunda-listener-field-value'
];
intercept(paletteProvider, 'getPaletteEntries', function(fn, args) {
var entries = fn.apply(this, args);
if (self._readOnly) {
- let allowedEntries = ['hand-tool'];
-
forEach(entries, function(value, key) {
- if (allowedEntries.indexOf(key) === -1) {
- delete entries[key];
- }
+ delete entries[key];
});
}
return entries;