Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: render components instead of elements #590

Merged
merged 7 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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 @@ -60,7 +60,7 @@
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/plugin-transform-react-jsx": "^7.14.3",
"@bpmn-io/properties-panel": "^0.10.2",
"@bpmn-io/properties-panel": "^0.11.0",
"@rollup/plugin-alias": "^3.1.2",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^19.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/provider/bpmn/properties/CompensationProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export function CompensationProps(props) {
return [
{
id: 'waitForCompletion',
component: <WaitForCompletion element={ element } />,
component: WaitForCompletion,
isEdited: isCheckboxEntryEdited
},
{
id: 'activityRef',
component: <ActivityRef element={ element } />,
component: ActivityRef,
isEdited: isSelectEntryEdited
}
];
Expand Down
4 changes: 2 additions & 2 deletions src/provider/bpmn/properties/DocumentationProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ export function DocumentationProps(props) {
const entries = [
{
id: 'documentation',
component: <ElementDocumentationProperty element={ element } />,
component: ElementDocumentationProperty,
isEdited: isTextAreaEntryEdited
}
];

if (hasProcessRef(element)) {
entries.push({
id: 'processDocumentation',
component: <ProcessDocumentationProperty element={ element } />,
component: ProcessDocumentationProperty,
isEdited: isTextAreaEntryEdited
});
}
Expand Down
6 changes: 3 additions & 3 deletions src/provider/bpmn/properties/ErrorProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function ErrorProps(props) {
let entries = [
{
id: 'errorRef',
component: <ErrorRef element={ element } />,
component: ErrorRef,
isEdited: isSelectEntryEdited
}
];
Expand All @@ -66,12 +66,12 @@ export function ErrorProps(props) {
...entries,
{
id: 'errorName',
component: <ErrorName element={ element } />,
component: ErrorName,
isEdited: isTextFieldEntryEdited
},
{
id: 'errorCode',
component: <ErrorCode element={ element } />,
component: ErrorCode,
isEdited: isTextFieldEntryEdited
}
];
Expand Down
6 changes: 3 additions & 3 deletions src/provider/bpmn/properties/EscalationProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function EscalationProps(props) {
let entries = [
{
id: 'escalationRef',
component: <EscalationRef element={ element } />,
component: EscalationRef,
isEdited: isSelectEntryEdited
}
];
Expand All @@ -65,12 +65,12 @@ export function EscalationProps(props) {
...entries,
{
id: 'escalationName',
component: <EscalationName element={ element } />,
component: EscalationName,
isEdited: isTextFieldEntryEdited
},
{
id: 'escalationCode',
component: <EscalationCode element={ element } />,
component: EscalationCode,
isEdited: isTextFieldEntryEdited
}
];
Expand Down
2 changes: 1 addition & 1 deletion src/provider/bpmn/properties/ExecutableProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function ExecutableProps(props) {
return [
{
id: 'isExecutable',
component: <Executable element={ element } />,
component: Executable,
isEdited: isCheckboxEntryEdited
}
];
Expand Down
8 changes: 2 additions & 6 deletions src/provider/bpmn/properties/IdProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,11 @@ import {
/**
* @returns {Array<Entry>} entries
*/
export function IdProps(props) {
const {
element
} = props;

export function IdProps() {
return [
{
id: 'id',
component: <Id element={ element } />,
component: Id,
isEdited: isTextFieldEntryEdited
}
];
Expand Down
2 changes: 1 addition & 1 deletion src/provider/bpmn/properties/LinkProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function LinkProps(props) {
return [
{
id: 'linkName',
component: <LinkName element={ element } />,
component: LinkName,
isEdited: isTextFieldEntryEdited
},
];
Expand Down
4 changes: 2 additions & 2 deletions src/provider/bpmn/properties/MessageProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function MessageProps(props) {
let entries = [
{
id: 'messageRef',
component: <MessageRef element={ element } />,
component: MessageRef,
isEdited: isSelectEntryEdited
}
];
Expand All @@ -62,7 +62,7 @@ export function MessageProps(props) {
...entries,
{
id: 'messageName',
component: <MessageName element={ element } />,
component: MessageName,
isEdited: isTextFieldEntryEdited
},
];
Expand Down
4 changes: 2 additions & 2 deletions src/provider/bpmn/properties/MultiInstanceProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export function MultiInstanceProps(props) {
const entries = [
{
id: 'loopCardinality',
component: <LoopCardinality element={ element } />,
component: LoopCardinality,
isEdited: isTextFieldEntryEdited
},
{
id: 'completionCondition',
component: <CompletionCondition element={ element } />,
component: CompletionCondition,
isEdited: isTextFieldEntryEdited
}
];
Expand Down
2 changes: 1 addition & 1 deletion src/provider/bpmn/properties/NameProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function NameProps(props) {
return [
{
id: 'name',
component: <Name element={ element } />,
component: Name,
isEdited: isTextFieldEntryEdited
}
];
Expand Down
4 changes: 2 additions & 2 deletions src/provider/bpmn/properties/ProcessProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export function ProcessProps(props) {
return [
{
id: 'processId',
component: <ProcessId element={ element } />,
component: ProcessId,
isEdited: isTextFieldEntryEdited
},
{
id: 'processName',
component: <ProcessName element={ element } />,
component: ProcessName,
isEdited: isTextFieldEntryEdited
}
];
Expand Down
4 changes: 2 additions & 2 deletions src/provider/bpmn/properties/SignalProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function SignalProps(props) {
let entries = [
{
id: 'signalRef',
component: <SignalRef element={ element } />,
component: SignalRef,
isEdited: isSelectEntryEdited
}
];
Expand All @@ -62,7 +62,7 @@ export function SignalProps(props) {
...entries,
{
id: 'signalName',
component: <SignalName element={ element } />,
component: SignalName,
isEdited: isTextFieldEntryEdited
},
];
Expand Down
12 changes: 8 additions & 4 deletions src/provider/bpmn/properties/TimerProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,19 @@ export function TimerProps(props) {

entries.push({
id: getId(idPrefix, 'timerEventDefinitionType'),
component: <TimerEventDefinitionType element={ element } timerEventDefinition={ timerEventDefinition } timerEventDefinitionType={ timerEventDefinitionType } />,
isEdited: isSelectEntryEdited
component: TimerEventDefinitionType,
isEdited: isSelectEntryEdited,
timerEventDefinition,
timerEventDefinitionType
});

if (timerEventDefinitionType) {
entries.push({
id: getId(idPrefix, 'timerEventDefinitionValue'),
component: <TimerEventDefinitionValue element={ element } timerEventDefinition={ timerEventDefinition } timerEventDefinitionType={ timerEventDefinitionType } />,
isEdited: isTextFieldEntryEdited
component: TimerEventDefinitionValue,
isEdited: isTextFieldEntryEdited,
timerEventDefinition,
timerEventDefinitionType
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export function AsynchronousContinuationsProps(props) {
entries.push(
{
id: 'asynchronousContinuationBefore',
component: <AsynchronousContinuationBefore element={ element } />,
component: AsynchronousContinuationBefore,
isEdited: isCheckboxEntryEdited
},
{
id: 'asynchronousContinuationAfter',
component: <AsynchronousContinuationAfter element={ element } />,
component: AsynchronousContinuationAfter,
isEdited: isCheckboxEntryEdited
}
);
Expand All @@ -44,7 +44,7 @@ export function AsynchronousContinuationsProps(props) {
entries.push(
{
id: 'exclusive',
component: <Exclusive element={ element } />,
component: Exclusive,
isEdited: checkboxIsEditedInverted
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function BusinessKeyProps(props) {
return [
{
id: 'businessKey',
component: <BusinessKey element={ element } />,
component: BusinessKey,
isEdited: isSelectEntryEdited
},
];
Expand Down
6 changes: 3 additions & 3 deletions src/provider/camunda-platform/properties/CallActivityProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function CallActivityProps(props) {

entries.push({
id: 'calledElementType',
component: <CalledElementType element={ element } />,
component: CalledElementType,
isEdited: isSelectEntryEdited
});

Expand Down Expand Up @@ -130,15 +130,15 @@ function BusinessKeyProps(props) {
const entries = [
{
id: 'calledElementBusinessKey',
component: <BusinessKey element={ element } />,
component: BusinessKey,
isEdited: isCheckboxEntryEdited
}
];

if (hasBusinessKey(element)) {
entries.push({
id: 'calledElementBusinessKeyExpression',
component: <BusinessKeyExpression element={ element } />,
component: BusinessKeyExpression,
isEdited: isTextFieldEntryEdited
});
}
Expand Down
10 changes: 5 additions & 5 deletions src/provider/camunda-platform/properties/CalledBpmnProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ export function CalledBpmnProps(props) {
const entries = [
{
id: 'calledElement',
component: <CalledElement element={ element } />,
component: CalledElement,
isEdited: isTextFieldEntryEdited
},
{
id: 'calledElementBinding',
component: <CalledElementBinding element={ element } />,
component: CalledElementBinding,
isEdited: isSelectEntryEdited
},
{
id: 'calledElementTenantId',
component: <CalledElementTenantId element={ element } />,
component: CalledElementTenantId,
isEdited: isTextFieldEntryEdited
}
];
Expand All @@ -44,15 +44,15 @@ export function CalledBpmnProps(props) {
entries.splice(-1, 0,
{
id: 'calledElementVersion',
component: <CalledElementVersion element={ element } />,
component: CalledElementVersion,
isEdited: isTextFieldEntryEdited
}
);
} else if (binding === 'versionTag') {
entries.splice(-1, 0,
{
id: 'calledElementVersionTag',
component: <CalledElementVersionTag element={ element } />,
component: CalledElementVersionTag,
isEdited: isTextFieldEntryEdited
}
);
Expand Down
8 changes: 4 additions & 4 deletions src/provider/camunda-platform/properties/CalledCmmnProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ export function CalledCmmnProps(props) {
const entries = [
{
id: 'calledElementCaseRef',
component: <CaseRef element={ element } />,
component: CaseRef,
isEdited: isTextFieldEntryEdited
},
{
id: 'calledElementCaseBinding',
component: <CaseBinding element={ element } />,
component: CaseBinding,
isEdited: isSelectEntryEdited
},
{
id: 'calledElementCaseTenantId',
component: <CaseTenantId element={ element } />,
component: CaseTenantId,
isEdited: isTextFieldEntryEdited
}
];
Expand All @@ -42,7 +42,7 @@ export function CalledCmmnProps(props) {
entries.splice(-1, 0,
{
id: 'calledElementCaseVersion',
component: <CaseVersion element={ element } />,
component: CaseVersion,
isEdited: isTextFieldEntryEdited
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export function CandidateStarterProps(props) {
return [
{
id: 'candidateStarterGroups',
component: <CandidateStarterGroups element={ element } />,
component: CandidateStarterGroups,
isEdited: isTextFieldEntryEdited
},
{
id: 'candidateStarterUsers',
component: <CandidateStarterUsers element={ element } />,
component: CandidateStarterUsers,
isEdited: isTextFieldEntryEdited
}
];
Expand Down
Loading