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

BaseModeler Options is missing properties #1882

Closed
BelindaFelpelViadee opened this issue Apr 4, 2023 · 3 comments · Fixed by #1884
Closed

BaseModeler Options is missing properties #1882

BelindaFelpelViadee opened this issue Apr 4, 2023 · 3 comments · Fixed by #1884
Assignees
Labels
bug Something isn't working

Comments

@BelindaFelpelViadee
Copy link

Describe the Bug

The current BaseViewerOptions from BaseViewer.d.ts is the following:

export type BaseViewerOptions = {
  width?: number|string;
  height?: number|string;
  position?: string;
  container?: string|HTMLElement;
  moddleExtensions?: ModdleExtensions;
  additionalModules?: ModuleDeclaration[];
};

BaseModeler extends BaseViewer types. Currently, properties as

  • linting
  • propertiesPanel
  • keyboard

are not type conform. This produces type errors when using bpmn-js in typescript.

Steps to Reproduce

  1. create a basic modeler in a typescript project
  2. extend BpmnModeler constructor with e.g.
new BpmnModeler({
            container: canvasId,
            additionalModules: [
                BpmnPropertiesPanelModule,
                BpmnPropertiesProviderModule,
                lintModule,
               [...]
            ],
            linting: {
                bpmnlint: bpmnlintConfig,
                active: false,
            },
            propertiesPanel: {
                parent: $bpmnJsPanel,
            },
            keyboard: { bindTo: document },
        
        });
  1. build project using webpack

Expected Behavior

Typing definitions should be complete and handle extensions correctly.

Environment

  • Browser: n/A
  • OS: Windows 10
  • Library version:
    • "bpmn-js": "12.0.0"
    • "webpack": "5.77.0"
    • "bpmn-js-properties-panel": "1.20.3"
    • "bpmn-js-bpmnlint": "0.20.1"
    • "bpmnlint": "8.2.0",
@BelindaFelpelViadee BelindaFelpelViadee added the bug Something isn't working label Apr 4, 2023
@nikku
Copy link
Member

nikku commented Apr 4, 2023

Thanks for opening this issue. We clearly need to make our types more open for extension.

CC @philippfromme

@nikku nikku added the ready Ready to be worked on label Apr 4, 2023
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Apr 4, 2023
@bpmn-io-tasks bpmn-io-tasks bot removed the ready Ready to be worked on label Apr 4, 2023
@nikku
Copy link
Member

nikku commented Apr 4, 2023

Fixed via #1884.

@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Apr 4, 2023
@nikku
Copy link
Member

nikku commented Apr 4, 2023

Fixed with bpmn-js@12.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants