-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Labels
backlogQueued in backlogQueued in backlogenhancementNew feature or requestNew feature or requestneeds discussionNeeds further discussionNeeds further discussion
Description
Describe the Bug
In Angular applications & libs, some development teams ban internal path imports from npm libraries. (no-restricted-imports). But in dmn-js lib there is no named exports for viewers only default export, which results in a long import path as - import Viewer from 'dmn-js/lib/NavigatedViewer
. This gist also outlines some of the cons of using only default exports.
I'm proposing not so much a fix but just additionally exporting the viewer and modeler classes as named exports for convenience:
Pull Request: #946
Steps to Reproduce
Steps to reproduce the behaviour:
- Import NavigatedViewer using named import -
import { NavigatedViewer } from 'dmn-js';
- Import is undefined, only default import exists with internal path -
import Viewer from 'dmn-js/lib/NavigatedViewer
Expected Behavior
The library provides a named export for each viewer and modeler class. This is generally the norm for library imports within the Angular framework.
Environment
Please complete the following information:
- N/A
- N/A
- Library version:
17.2.0
Metadata
Metadata
Assignees
Labels
backlogQueued in backlogQueued in backlogenhancementNew feature or requestNew feature or requestneeds discussionNeeds further discussionNeeds further discussion