{"_id":"@kie-tools/dmn-editor-standalone","_rev":"2-c39ab6d000476992712d433e40ab283d","name":"@kie-tools/dmn-editor-standalone","dist-tags":{"latest":"10.2.0"},"versions":{"10.1.0":{"name":"@kie-tools/dmn-editor-standalone","version":"10.1.0","keywords":[],"license":"Apache-2.0","_id":"@kie-tools/dmn-editor-standalone@10.1.0","maintainers":[{"name":"kie-tools-bot","email":"kietoolsbot@gmail.com"}],"homepage":"https://github.com/apache/incubator-kie-tools","bugs":{"url":"https://github.com/apache/incubator-kie-tools/issues"},"dist":{"shasum":"e40462d0a216c33050783063c6b0ccd9aafefb20","tarball":"https://registry.npmjs.org/@kie-tools/dmn-editor-standalone/-/dmn-editor-standalone-10.1.0.tgz","fileCount":9,"integrity":"sha512-6skHzNXiLG+kam417OtPhNqKVVKSwHLAx4W3RrLkin1ZGplwbRWI8IKFltR0eXDg/em53hOwnDVeUQXL/mg7pg==","signatures":[{"sig":"MEQCIA1ysSYyv119/3J8kp0d3JqwTEnimwGCULUEwVlC5UgaAiAa3gv4fj5cuQBxIZMgNfy95MR/T5lXKNa0eRBBMlhgxg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32484056},"_from":"file:kie-tools-dmn-editor-standalone-10.1.0.tgz","scripts":{"lint":"run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"","start":"nodemon -e ts --watch src --exec 'pnpm build:dev && pnpm storybook-start'","test-e2e":"run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm test-e2e:condition\"","build:dev":"rimraf dist && webpack --config webpack.envelope-config.js --env dev && webpack --env dev && pnpm build:bundle-types","build:prod":"pnpm lint && rimraf dist && webpack --config webpack.envelope-config.js --env prod && webpack --env prod && pnpm build:bundle-types && pnpm test-e2e","test-e2e:run":"pnpm exec playwright test","test-e2e:open":"pnpm exec playwright show-report dist-tests-e2e/reports","storybook-start":"run-script-os","build:bundle-types":"dts-bundle-generator --config dts-bundle.config.json","test-e2e:condition":"run-script-if --bool \"$(build-env endToEndTests.containerized)\" --then  \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:container:start\" --else \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\"","storybook-start:win32":"pnpm powershell \"cross-env STORYBOOK_PORT=$(build-env dmnEditorStandalone.storybook.port) pnpm kie-tools--storybook --storybookArgs='dev --no-open'","test-e2e:container:up":"cross-env STREAM_NAME=$(build-env root.streamName) KIE_TOOLS_PLAYWRIGHT_CONTAINER__PORT=$(build-env dmnEditorStandalone.storybook.port) run-script-if --bool \"${CI}\" --then \"docker compose -f ./tests-e2e/__containerization__/playwright-docker-compose.yml -f ./tests-e2e/__containerization__/playwright-docker-compose.ci.yml up -d\" --else \"docker compose -f ./tests-e2e/__containerization__/playwright-docker-compose.yml up -d\"","test-e2e:container:run":"docker exec -i kie-tools-playwright-containerization-dmn-editor-standalone /bin/bash -c \"cd incubator-kie-tools/packages/dmn-editor-standalone && pnpm test-e2e:run\"","test-e2e:container:bash":"docker exec -it kie-tools-playwright-containerization-dmn-editor-standalone /bin/bash -c \"cd incubator-kie-tools/packages/dmn-editor-standalone && exec /bin/bash\"","test-e2e:container:down":"docker compose -f ./tests-e2e/__containerization__/playwright-docker-compose.yml down","test-e2e:container:shell":"pnpm test-e2e:container:up && pnpm test-e2e:container:bash","test-e2e:container:start":"pnpm test-e2e:container:up && pnpm test-e2e:container:run","storybook-start:linux:darwin":"cross-env STORYBOOK_PORT=$(build-env dmnEditorStandalone.storybook.port) pnpm kie-tools--storybook --storybookArgs=\"dev --no-open\""},"_npmUser":{"name":"kie-tools-bot","actor":{"name":"kie-tools-bot","type":"user","email":"kietoolsbot@gmail.com"},"email":"kietoolsbot@gmail.com"},"_resolved":"/Users/porcelli/Code/aletyx/release/10.1.0-rc1/temp/kie-tools-dmn-editor-standalone-10.1.0.tgz","_integrity":"sha512-6skHzNXiLG+kam417OtPhNqKVVKSwHLAx4W3RrLkin1ZGplwbRWI8IKFltR0eXDg/em53hOwnDVeUQXL/mg7pg==","repository":{"url":"git+https://github.com/apache/incubator-kie-tools.git","type":"git"},"_npmVersion":"10.8.2","description":"<!--    Licensed to the Apache Software Foundation (ASF) under one    or more contributor license agreements.  See the NOTICE file    distributed with this work for additional information    regarding copyright ownership.  The ASF licenses this file    to","directories":{},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","buffer":"^6.0.3","lodash":"^4.17.21","rimraf":"^3.0.2","nodemon":"^3.1.4","process":"^0.11.10","webpack":"^5.94.0","prettier":"^3.3.2","cross-env":"^7.0.3","minimatch":"^3.0.5","react-dom":"^17.0.2","storybook":"^7.3.2","raw-loader":"^4.0.2","typescript":"^5.5.3","@babel/core":"^7.16.0","@types/node":"^22.10.7","webpack-cli":"^4.10.0","@types/react":"^17.0.6","@types/lodash":"^4.14.168","run-script-os":"^1.1.6","webpack-merge":"^5.9.0","@playwright/test":"^1.45.2","@storybook/react":"^7.3.2","@types/jest-when":"^3.5.5","@types/minimatch":"^3.0.5","@types/react-dom":"^17.0.5","deep-object-diff":"^1.1.9","@babel/preset-env":"^7.16.0","@kie-tools/eslint":"10.1.0","@storybook/blocks":"^7.3.2","webpack-dev-server":"^4.15.1","@babel/preset-react":"^7.16.0","@kie-tools/root-env":"10.1.0","@kie-tools/tsconfig":"10.1.0","html-webpack-plugin":"^5.3.2","junit-report-merger":"^4.0.0","@kie-tools-core/i18n":"10.1.0","dts-bundle-generator":"^9.5.1","@kie-tools/dmn-editor":"10.1.0","@kie-tools-core/editor":"10.1.0","@patternfly/react-core":"^4.276.6","@storybook/addon-links":"^7.3.2","@storybook/manager-api":"^7.3.2","@storybook/preview-api":"^7.3.2","webpack-bundle-analyzer":"^4.10.2","@babel/preset-typescript":"^7.22.5","@kie-tools-core/workspace":"10.1.0","@kie-tools/dmn-marshaller":"10.1.0","@kie-tools/storybook-base":"10.1.0","@storybook/react-webpack5":"^7.3.2","@kie-tools/playwright-base":"10.1.0","@kie-tools-core/envelope-bus":"10.1.0","@kie-tools-core/webpack-base":"10.1.0","@kie-tools-core/notifications":"10.1.0","@kie-tools/dmn-editor-envelope":"10.1.0","@kie-tools-core/patternfly-base":"10.1.0","@kie-tools/pmml-editor-marshaller":"10.1.0","@kie-tools/boxed-expression-component":"10.1.0","@storybook/addon-webpack5-compiler-babel":"^3.0.5"},"_npmOperationalInternal":{"tmp":"tmp/dmn-editor-standalone_10.1.0_1751923221815_0.18218640641250272","host":"s3://npm-registry-packages-npm-production"}},"10.2.0":{"name":"@kie-tools/dmn-editor-standalone","version":"10.2.0","description":"<!--    Licensed to the Apache Software Foundation (ASF) under one    or more contributor license agreements.  See the NOTICE file    distributed with this work for additional information    regarding copyright ownership.  The ASF licenses this file    to","license":"Apache-2.0","keywords":[],"homepage":"https://github.com/apache/incubator-kie-tools","repository":{"type":"git","url":"git+https://github.com/apache/incubator-kie-tools.git"},"bugs":{"url":"https://github.com/apache/incubator-kie-tools/issues"},"devDependencies":{"@babel/core":"^7.16.0","@babel/preset-env":"^7.16.0","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.22.5","@patternfly/react-core":"^5.4.1","@playwright/test":"^1.45.2","@prettier/plugin-xml":"^3.4.1","@storybook/addon-links":"^7.3.2","@storybook/addon-webpack5-compiler-babel":"^3.0.5","@storybook/blocks":"^7.3.2","@storybook/manager-api":"^7.3.2","@storybook/preview-api":"^7.3.2","@storybook/react":"^7.3.2","@storybook/react-webpack5":"^7.3.2","@types/jest-when":"^3.5.5","@types/lodash":"^4.14.168","@types/minimatch":"^3.0.5","@types/node":"^24.10.11","@types/react":"^17.0.6","@types/react-dom":"^17.0.5","buffer":"^6.0.3","cross-env":"^7.0.3","deep-object-diff":"^1.1.9","dts-bundle-generator":"^9.5.1","html-webpack-plugin":"^5.3.2","junit-report-merger":"^4.0.0","lodash":"^4.17.23","minimatch":"^3.0.5","nodemon":"^3.1.4","prettier":"^3.3.2","process":"^0.11.10","raw-loader":"^4.0.2","react":"^17.0.2","react-dom":"^17.0.2","rimraf":"^3.0.2","run-script-os":"^1.1.6","start-server-and-test":"^2.0.3","storybook":"^7.3.2","typescript":"^5.9.3","webpack":"^5.104.1","webpack-bundle-analyzer":"^4.10.2","webpack-cli":"^4.10.0","webpack-dev-server":"^4.15.2","webpack-merge":"^5.9.0","@kie-tools-core/editor":"10.2.0","@kie-tools-core/patternfly-base":"10.2.0","@kie-tools-core/envelope-bus":"10.2.0","@kie-tools-core/webpack-base":"10.2.0","@kie-tools-core/notifications":"10.2.0","@kie-tools/boxed-expression-component":"10.2.0","@kie-tools-core/workspace":"10.2.0","@kie-tools/dmn-editor":"10.2.0","@kie-tools/dmn-editor-envelope":"10.2.0","@kie-tools/dmn-marshaller":"10.2.0","@kie-tools/eslint":"10.2.0","@kie-tools/playwright-base":"10.2.0","@kie-tools/pmml-editor-marshaller":"10.2.0","@kie-tools/root-env":"10.2.0","@kie-tools/tsconfig":"10.2.0","@kie-tools/storybook-base":"10.2.0"},"scripts":{"build:bundle-types":"dts-bundle-generator --config dts-bundle.config.json","build:dev":"rimraf dist && webpack --config webpack.envelope-config.js --env dev && webpack --env dev && pnpm build:bundle-types","build:prod":"pnpm lint && rimraf dist && webpack --config webpack.envelope-config.js --env prod && webpack --env prod && pnpm build:bundle-types && pnpm test-e2e","lint":"run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"","start":"nodemon -e ts --watch src --exec 'pnpm build:dev && pnpm storybook-start'","storybook-start":"run-script-os","storybook-start:linux:darwin":"cross-env STORYBOOK_PORT=$(build-env dmnEditorStandalone.storybook.port) pnpm exec kie-tools--storybook --storybookArgs=\"dev --no-open\"","storybook-start:win32":"pnpm powershell \"cross-env STORYBOOK_PORT=$(build-env dmnEditorStandalone.storybook.port) pnpm exec kie-tools--storybook --storybookArgs='dev --no-open'","test-e2e":"run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm test-e2e:condition\"","test-e2e:condition":"run-script-if --bool \"$(build-env endToEndTests.containerized)\" --then  \"rimraf ./dist-tests-e2e\" \"pnpm test-e2e:container:run\" --else \"rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\"","test-e2e:container:clean":"playwright-base-container clean","test-e2e:container:run":"start-server-and-test 'pnpm start' http://localhost:$(build-env dmnEditorStandalone.storybook.port)/iframe.html 'playwright-base-container run --additional-env=KIE_TOOLS_PLAYWRIGHT_CONTAINER__PORT=$(build-env dmnEditorStandalone.storybook.port) --container-workdir=incubator-kie-tools/packages/dmn-editor-standalone --container-name=kie-tools-playwright-containerization-dmn-editor-standalone'","test-e2e:container:shell":"start-server-and-test 'pnpm start' http://localhost:$(build-env dmnEditorStandalone.storybook.port)/iframe.html 'playwright-base-container shell --additional-env=KIE_TOOLS_PLAYWRIGHT_CONTAINER__PORT=$(build-env dmnEditorStandalone.storybook.port) --container-workdir=incubator-kie-tools/packages/dmn-editor-standalone --container-name=kie-tools-playwright-containerization-dmn-editor-standalone'","test-e2e:open":"pnpm exec playwright show-report dist-tests-e2e/reports","test-e2e:run":"pnpm exec playwright test"},"_id":"@kie-tools/dmn-editor-standalone@10.2.0","_integrity":"sha512-B0poYk8BCsOn9n6N0DE9x56b2LL0f4FLsmrOf593l06ZM54HDozg5EWEchBMvikehqtOlMu5Fd6f4/u1xec4hA==","_resolved":"/Users/porcelli/Code/apache-kie/release/npm-packages/kie-tools-dmn-editor-standalone-10.2.0.tgz","_from":"file:kie-tools-dmn-editor-standalone-10.2.0.tgz","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-B0poYk8BCsOn9n6N0DE9x56b2LL0f4FLsmrOf593l06ZM54HDozg5EWEchBMvikehqtOlMu5Fd6f4/u1xec4hA==","shasum":"5b43c9f3ab444d8594510ef967d641977a0e3254","tarball":"https://registry.npmjs.org/@kie-tools/dmn-editor-standalone/-/dmn-editor-standalone-10.2.0.tgz","fileCount":9,"unpackedSize":23492253,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD5uuyjruW2IPaxXsekZMk0eNiBSDS1P+2FFMo0zyk9/gIgcjmoUPXEHviSgGw7nmJBGMh2xu+YYQ/EySgZVr9IeZU="}]},"_npmUser":{"name":"kie-tools-bot","email":"kietoolsbot@gmail.com"},"directories":{},"maintainers":[{"name":"kie-tools-bot","email":"kietoolsbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dmn-editor-standalone_10.2.0_1777239841702_0.8852722468161216"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-07T21:20:21.716Z","modified":"2026-04-26T21:44:02.229Z","10.1.0":"2025-07-07T21:20:22.136Z","10.2.0":"2026-04-26T21:44:02.058Z"},"bugs":{"url":"https://github.com/apache/incubator-kie-tools/issues"},"license":"Apache-2.0","homepage":"https://github.com/apache/incubator-kie-tools","keywords":[],"repository":{"type":"git","url":"git+https://github.com/apache/incubator-kie-tools.git"},"description":"<!--    Licensed to the Apache Software Foundation (ASF) under one    or more contributor license agreements.  See the NOTICE file    distributed with this work for additional information    regarding copyright ownership.  The ASF licenses this file    to","maintainers":[{"name":"kie-tools-bot","email":"kietoolsbot@gmail.com"}],"readme":"<!--\n   Licensed to the Apache Software Foundation (ASF) under one\n   or more contributor license agreements.  See the NOTICE file\n   distributed with this work for additional information\n   regarding copyright ownership.  The ASF licenses this file\n   to you under the Apache License, Version 2.0 (the\n   \"License\"); you may not use this file except in compliance\n   with the License.  You may obtain a copy of the License at\n     http://www.apache.org/licenses/LICENSE-2.0\n   Unless required by applicable law or agreed to in writing,\n   software distributed under the License is distributed on an\n   \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n   KIND, either express or implied.  See the License for the\n   specific language governing permissions and limitations\n   under the License.\n-->\n\n## DMN Standalone Editor\n\n### Description\n\nThis library provides Apache KIE DMN Editor as an all-in-one JavaScript file that can be embedded into any web application.\n\nA comprehensive API is also provided for setup and interaction with the Editor.\n\n### Usage\n\nHere is an example on how to open the standalone Apache KIE DMN Editor:\n\n```typescript\nimport * as ApacheKieDmnEditor from \"@kie-tools/dmn-editor-standalone/dist\";\n\nconst editor = ApacheKieDmnEditor.open({\n  container: document.getElementById(\"apache-kie-dmn-editor-container\"),\n  initialContent: Promise.resolve(\"\"),\n  initialFileNormalizedPosixPathRelativeToTheWorkspaceRoot: \"model.dmn\",\n  readOnly: false,\n  resources: new Map([\n    [\n      \"MyIncludedModel.dmn\",\n      {\n        contentType: \"text\",\n        content: Promise.resolve(\"\"),\n      },\n    ],\n  ]),\n});\n```\n\n### Available parameters\n\n- `container`: HTML element in which the Editor will be appended to.\n- `initialContent`: Promise to a DMN model content. Can be empty. Examples:\n  - `Promise.resolve(\"\")`\n  - `Promise.resolve(\"<DIAGRAM_CONTENT_DIRECTLY_HERE>\")`\n  - `fetch(\"MyDmnModel.dmn\").then(content => content.text())`\n- `initialFileNormalizedPosixPathRelativeToTheWorkspaceRoot`: The POSIX path relative to the workspace root (`/` by default), including the file name. The path is useful to locate the file in the workspace, espcially in relation to other resources (defined by the `resources` parameters). Examples:\n  - `model.dmn`\n  - `myPath/model.dmn`\n  - `parent/child/filename.dmn`\n- `readOnly` (optional, defaults to `false`): Use `false` to allow content edition, and `true` for read-only mode, in which the Editor will not allow changes.\n- `origin` (optional, defaults to `*` when accessing the application with the `file` protocol, `window.location.origin` otherwise): If for some reason your application needs to change this parameter, you can use it.\n- `onError` (optional, defaults to `() => {}`): If there's an error opening the Editor, this function will be called.\n\n* `resources` (optional, defaults to `[]`): Map of resources that will be provided for the Editor. This can be used, for instance, to provide included models for the DMN Editor. Each entry in the map has the resource POSIX path (similar to the `initialFileNormalizedPosixPathRelativeToTheWorkspaceRoot` parameter) as its key and an object containing the `content-type` (`text` or `binary`) and the resource `content` (Promise similar to the `initialContent` parameter) as its value. Resources located in a parent directory (in relation to the current content path, defined by the `initialFileNormalizedPosixPathRelativeToTheWorkspaceRoot`) won't be listed to be used as an Included Model.\n\nThe returned object will contain the methods needed to manipulate the Editor:\n\n- `getContent(): Promise<string>`: Returns a Promise containing the Editor content.\n- `setContent(normalizedPosixPathRelativeToTheWorkspaceRoot: string, content: string): Promise<void>`: Sets the content of the Editor. The returning Promise will be rejected if setting the content fails.\n- `getPreview(): Promise<string>`: Returns a Promise containing the SVG string of the current diagram.\n- `subscribeToContentChanges(callback: (isDirty: boolean) => void): (isDirty: boolean) => void`: Setup a callback to be called on every content change in the Editor. Returns the same callback to be used for unsubscription.\n- `unsubscribeToContentChanges(callback: (isDirty: boolean) => void): void`: Unsubscribes the passed callback from content changes.\n- `markAsSaved(): void`: Resets the Editor state, signalizing that its content is saved. This will also fire the subscribed callbacks of content changes.\n- `undo(): void`: Undo the last change in the Editor. This will also fire the subscribed callbacks of content changes.\n- `redo(): void`: Redo the last undone change in the Editor. This will also fire the subscribed callbacks of content changes.\n- `close(): void`: Closes the Editor.\n- `envelopeApi: MessageBusClientApi<KogitoEditorEnvelopeApi>`: Advanced Editor API. See more details in [MessageBusClientApi](https://github.com/apache/incubator-kie-tools/blob/main/packages/envelope-bus/src/api/index.ts#L43-L56) and [KogitoEditorEnvelopeApi](https://github.com/apache/incubator-kie-tools/blob/main/packages/editor/src/api/KogitoEditorEnvelopeApi.ts#L34-L41).\n\n## For development information see:\n\n- 👉 [DEV.md](./docs/DEV.md)\n- 👉 [TESTS.md](./docs/TESTS.md)\n- 👉 [ARCHITECTURE.md](./docs/ARCHITECTURE.md)\n\n---\n\nApache KIE (incubating) is an effort undergoing incubation at The Apache Software\nFoundation (ASF), sponsored by the name of Apache Incubator. Incubation is\nrequired of all newly accepted projects until a further review indicates that\nthe infrastructure, communications, and decision making process have stabilized\nin a manner consistent with other successful ASF projects. While incubation\nstatus is not necessarily a reflection of the completeness or stability of the\ncode, it does indicate that the project has yet to be fully endorsed by the ASF.\n\nSome of the incubating project’s releases may not be fully compliant with ASF\npolicy. For example, releases may have incomplete or un-reviewed licensing\nconditions. What follows is a list of known issues the project is currently\naware of (note that this list, by definition, is likely to be incomplete):\n\n- Hibernate, an LGPL project, is being used. Hibernate is in the process of\n  relicensing to ASL v2\n- Some files, particularly test files, and those not supporting comments, may\n  be missing the ASF Licensing Header\n\nIf you are planning to incorporate this work into your product/project, please\nbe aware that you will need to conduct a thorough licensing review to determine\nthe overall implications of including this work. For the current status of this\nproject through the Apache Incubator visit:\nhttps://incubator.apache.org/projects/kie.html\n","readmeFilename":"README.md"}