Skip to content

Commit

Permalink
chore(list-extension): use html instead of JSX
Browse files Browse the repository at this point in the history
  • Loading branch information
marstamm committed Oct 26, 2023
1 parent f922eab commit 03f8747
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { html } from 'htm/preact';

import { without } from 'min-dash';

import { getBusinessObject } from 'bpmn-js/lib/util/ModelUtil';
Expand Down Expand Up @@ -90,15 +92,15 @@ export default function ExtensionList(props) {
});
}

return <ListEntry
element={ element }
autoFocusEntry={ `[data-entry-id="${id}-extension-${extensionsList.length - 1}"] input` }
id={ id }
label={ translate('Extensions') }
items={ extensionsList }
component={ Extension }
onAdd={ addExtension }
onRemove={ removeExtension } />;
return html`<${ListEntry}
element=${ element }
autoFocusEntry=${ `[data-entry-id="${id}-extension-${extensionsList.length - 1}"] input` }
id=${ id }
label=${ translate('Extensions') }
items=${ extensionsList }
component=${ Extension }
onAdd=${ addExtension }
onRemove=${ removeExtension } />`;
}

function Extension(props) {
Expand All @@ -114,17 +116,16 @@ function Extension(props) {

const id = `${ idPrefix }-extension-${ index }`;

return (
<CollapsibleEntry
id={ id }
element={ element }
entries={ ExtensionProps({
return html`
<${CollapsibleEntry}
id=${ id }
element=${ element }
entries=${ ExtensionProps({
extension,
element,
idPrefix: id
}) }
label={ extension.get('key') || translate('<empty>') }
open={ open }
/>
);
label=${ extension.get('key') || translate('<empty>') }
open=${ open }
/>`;
}
1 change: 1 addition & 0 deletions properties-panel-list-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"bpmn-js": "^14.2.0",
"bpmn-js-properties-panel": "^5.0.0",
"camunda-bpmn-js-behaviors": "^1.0.0",
"htm": "^3.1.1",
"ids": "^1.0.0",
"jquery": "^3.5.1",
"min-dash": "^4.0.0",
Expand Down

0 comments on commit 03f8747

Please sign in to comment.