Releases: ditrit/leto-modelizer-plugin-core
Releases · ditrit/leto-modelizer-plugin-core
Release version 0.14.0
[0.14.0] - 2023/03/01
Added
- Add method
getAttribute
to get attribute by name for a component in model template. - Add
getUsedLinkDefinition
inDefaultData.js
to get the link definitions used by components. - Add
__initializeArrowMarker
method inDefaultDrawer.js
. - Add
actions.zoom.scale
in constructor ofDefaultDrawer.js
to get the zoom scale. - Add marker definition in
ComponentLinkDefinition
to define the marker of the link.
Changed
- Change
drawLinks
method inDefaultDrawer.js
to draw arrow markers on links extremities.
Fixed
- Fix the links width by multiplying it by the zoom scale.
- Fix
hasError
inComponentAttribute.js
to return false when the value of attribute is empty.
Release version 0.13.0
[0.13.0] - 2023/02/09
Added
- Add menu to create a new linkable component from selected component.
- Add
getDefinedAttributesByType
method inComponent.js
.
Fixed
- Fix
Component.checkRequiredAttributes
method fails when required attribute isBoolean
orNumber
.
Release version 0.12.1
[0.12.1] - 2023/02/07
Fixed
- Fix throw exception for Object or Array attribute in
checkRequiredAttributes
method inComponent.js
.
Release version 0.12.0
[0.12.0] - 2023/02/02
Added
- Add a lot of e2e tests to improve e2e coverage
- Added layout line length overrides.
- Added
workflow
display type.- It is designed for containers where children ordering is significant.
- Drag and drop reordering of children is supported within these containers
- Add
getDragTarget
method toDefaultDrawer.js
. - Add an id to the component's icons for cypress tests.
- Add
hasError
method toComponent.js
to check if a component has an error - Add methods checking error for all types to
ComponentAttribute.js
- Add error icon on component SVGs.
- Add
defaultFileName
attribute to manage the default file name of the new components. - Add method
generateComponentId
inDefaultData.js
to generate id from definition type. - Add helper properties for component and attribute:
displayName
,description
andurl
.
Changed
- Replace esdoc by jsdoc
- Make configuration readable by user in the configuration file.
- Save component's positions after the layout is automatically generated.
- Change
ComponentAttributeDefinition.
containerRef's type from array to string. - Change parameter of method
addComponent
inDefaultData.js
to accept now the definition and optionalfolder
path and optionalfileName
path. - Method
render
ofDefaultPlugin.js
now includes the configuration file.
Fixed
- Save configuration even if the file content is null.
- Fix drag and drop for e2e tests
- Fix component drag behavior when the mouse click on component's icon or text.
- Fix zoom centered on the mouse.
- Fix cypress tests to works with new drag action.
- Fix error in setReferenceAttribute when there are attributes without definition.
Release version 0.11.0
[0.11.0] - 2022/12/07
Added
- Method
getchildren
by component id inDefaultData
. - Method
getContainerId
onComponent
. - Add
files
parameter in methodrender
ofDefaultRender
andDefaultPlugin
to list all files managed by the plugin. - Add
UpdateEvent
to notify modelizer of all updates on components made by user. - Add attributes in
ComponentAttributeDefinition
to manage customization of link:LinkColor
to define the color of the link, default black.LinkWidth
to define the width of the link, default 2px.LinkDashStyle
to define the dash style of the link, default null for a line link.
Removed
- Remove attribute
children
ofComponent
to transform components tree in components Array. - Remove
EditEvent
andDeleteEvent
inDefaultDrawer
.
Changed
- Updated
drawLinks
to dynamically select curve type based on components relative positions. - Replace method
render
byrenderFiles
as method to be overridden by plugin.
Fixed
- Method
render
inDefaultRender
now returns files that are no longer linked to components. - Fixed disabled style application when the origin could have multiple targets.
Release version 0.10.0
[0.10.0] - 2022/11/28
Added
- Add save and retrieve position of component in
DefaultPlugin
:- Add configuration
file
in first argument of methodparse
inDefaultPlugin
. - Add configuration
file
in argument of methodrender
inDefaultPlugin
.
- Add configuration
- Add support for manual component positioning.
- Add support for top and bottom link anchors.
Release version 0.9.1
[0.9.1] - 2022/11/24
Fixed
- Fix display of action menu.
- Emit
EditEvent
only forComponent
.
Release version 0.9.0
[0.9.0] - 2022/11/24
Added
- Add
drawLinks
,getAnchorPoint
methods inDefaultDrawer.js
. - Create a new
draw
method that executes thedrawLinks
anddrawComponents
methods. - Add method
setReferenceAttribute
andremoveAllReferenceAttributes
in Component to update container attribute. - Add default model
DefaultData
to manage all data of the plugin. - Add default model
DefaultPlugin
to simplify the plugin usage. - Add method
setEvents
inDefaultDrawer
. - Add zoom and pan support.
- Add the method
addLink
inDefaultDrawer.js
that adds a new link between two components. - Add
options
prop toDefaultDrawer
constructor to control rendering behavior. - Add
createRenderingContext
method toDefaultDrawer
. - Add
SVGToScreen
andscreenToSVG
methods toDefaultDrawer
. - Add
setDisabledStyle
andunsetAllDisabledStyles
methods toDefaultDrawer
. - Add
dragHandler
,setupDragBehavior
andhandleDropEvent
methods toDefaultDrawer
to control drag and drop interaction. - Add
startLinkCreationInteraction
andcancelLinkCreationInteraction
methods toDefaultDrawer
. - Add
buildTree
,setupTiles
and__buildLines
methods toDefaultDrawer
to control the component layout. - Add method
getLinks
inDefaultData
to generate all links from all components attributes. - Add method
getComponentsByType
inDefaultData
. - Add method
getAttributeByName
inComponent
. - Add method
initLinkDefinitions
inDefaultData
and call it ininit
inDefaultPlugin
. - Add method
removeLink
inDefaultData
. - Add attribute
name
for methodremoveLinkAttribute
ofComponent
. - Add
getMenuAction
that contains all action handler.
Changed
- Rename the
draw
method todrawComponents
. - Switch action menu position parameter from
absolute
tofixed
. - Update constructor of
DefaultDrawer
,DefaultRenderer
,DefaultParser
andDefaultMetadata
to useDefaultData
. - Update
draw
method ofDefaultDrawer
to only use the container id. - Rename method
getDefinitions
ofDefaultMetadata
toparse
and make it update directly the plugin data. - Make the method
parse
ofDefaultParser
update directly the plugin data instead of return components, links and errors. DefaultDrawer
constructor props re-ordered to(pluginData, resources, events, rootId, options)
based on the likelihood of each prop being changed by the user.- Update
drawComponents
to make full use of d3's api. - Rename method
removeLinkAttributeById
ofComponent
inremoveLinkAttribute
. - Rework the action menu to have more visual feedback, improve positioning comportment and adapt his content with available actions.
Removed
- Remove method
addChild
from Component. - Remove
interactjs
andbin-pack
dependencies. - Remove arguments of method
render
ofDefaultRender
to directly use the plugin data. - Remove
links
fromDefaultData
.
Fixed
- Fix indentation in
DefaultDrawer
.
Release version 0.8.1
[0.8.1] - 2022-10-12
Fixed
- Fix action-menu events (trash & edit)
Release version 0.8.0
[0.8.0] - 2022-10-12
Added
- Add a feature that displays an action menu when a component is selected.
- Update constructor of Drawer to receive an events object.
- Emit an event on edit, selection and delete components.