{"_id":"@domhanak/serverless-workflow-standalone-editor","name":"@domhanak/serverless-workflow-standalone-editor","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"@domhanak/serverless-workflow-standalone-editor","version":"0.0.0","description":"Standalone editor for serverless workflow","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"},"scripts":{"build:dev":"rimraf dist && webpack --config webpack.editor-resources.config.js && webpack --config webpack.build-resources.config.js && pnpm build:preprocessor && webpack --config webpack.package-resources.config.js","build:preprocessor":"node dist/preprocessor/preprocessor.js","build:prod":"pnpm lint && pnpm test && rimraf dist && webpack --config webpack.editor-resources.config.js && webpack --config webpack.build-resources.config.js && pnpm build:preprocessor && webpack --config webpack.package-resources.config.js","build:productization":"pnpm build:prod","lint":"run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"","powershell":"@powershell -NoProfile -ExecutionPolicy Unrestricted -Command","test":"run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\""},"devDependencies":{"@babel/core":"^7.16.0","@babel/preset-env":"^7.16.0","@babel/preset-react":"^7.16.0","@kie-tools-core/editor":"workspace:*","@kie-tools-core/envelope-bus":"workspace:*","@kie-tools-core/i18n":"workspace:*","@kie-tools-core/keyboard-shortcuts":"workspace:*","@kie-tools-core/notifications":"workspace:*","@kie-tools-core/patternfly-base":"workspace:*","@kie-tools-core/webpack-base":"workspace:*","@kie-tools-core/workspace":"workspace:*","@kie-tools/eslint":"workspace:*","@kie-tools/jest-base":"workspace:*","@kie-tools/kie-bc-editors":"workspace:*","@kie-tools/root-env":"workspace:*","@kie-tools/serverless-workflow-combined-editor":"workspace:*","@kie-tools/serverless-workflow-diagram-editor":"workspace:*","@kie-tools/serverless-workflow-diagram-editor-assets":"workspace:*","@kie-tools/serverless-workflow-diagram-editor-envelope":"workspace:*","@kie-tools/serverless-workflow-jq-expressions":"workspace:*","@kie-tools/serverless-workflow-language-service":"workspace:*","@kie-tools/serverless-workflow-service-catalog":"workspace:*","@kie-tools/serverless-workflow-text-editor":"workspace:*","@kie-tools/tsconfig":"workspace:*","@types/jest":"^29.5.12","@types/jest-when":"^3.5.5","@types/minimatch":"^3.0.5","@types/react":"^17.0.6","@types/react-dom":"^17.0.5","@types/underscore":"^1.11.2","copy-webpack-plugin":"^11.0.0","filemanager-webpack-plugin":"^7.0.0","html-webpack-plugin":"^5.3.2","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jest-junit":"^16.0.0","jest-when":"^3.6.0","minimatch":"^3.0.5","monaco-editor":"^0.39.0","monaco-editor-webpack-plugin":"^7.0.1","monaco-yaml":"^4.0.4","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","ts-jest":"^29.1.5","typescript":"^5.5.3","underscore":"^1.13.1","vscode-json-languageservice":"^4.2.1","vscode-languageserver-textdocument":"^1.0.4","vscode-languageserver-types":"^3.16.0","webpack":"^5.94.0","webpack-cli":"^4.10.0","webpack-dev-server":"^4.15.1","webpack-merge":"^5.9.0","yaml-language-server-parser":"^0.1.3"},"_id":"@domhanak/serverless-workflow-standalone-editor@0.0.0","gitHead":"b1a7091d13806766fdd588dbf4b79dc224b67fc2","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-7+OF3KLdcEoxZ4QWb20zttUCLsimDbq4PDS1HN9Q2m+dHD5Y7t0yU2JkMoj9vhpZjHEPBjZJFQ9NlE8HAek8/Q==","shasum":"0ffcf5bd141e276a39c4303106e4a8f12108eae6","tarball":"https://registry.npmjs.org/@domhanak/serverless-workflow-standalone-editor/-/serverless-workflow-standalone-editor-0.0.0.tgz","fileCount":23,"unpackedSize":15537434,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEneMuWII1B5jdH/WyfYfefGPxldu2stLrbqIWd7sNP7AiAK3c/+Z2phawX424HIRRsNDH6RvymNFJjuazlcu7XKxA=="}]},"_npmUser":{"name":"domhanak","email":"domin.hanak@gmail.com"},"directories":{},"maintainers":[{"name":"domhanak","email":"domin.hanak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/serverless-workflow-standalone-editor_0.0.0_1756282184935_0.10326884131932634"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-27T08:09:44.821Z","0.0.0":"2025-08-27T08:09:45.218Z","modified":"2025-08-27T08:09:45.512Z"},"maintainers":[{"name":"domhanak","email":"domin.hanak@gmail.com"}],"description":"Standalone editor for serverless workflow","homepage":"https://github.com/apache/incubator-kie-tools","keywords":[],"repository":{"type":"git","url":"git+https://github.com/apache/incubator-kie-tools.git"},"bugs":{"url":"https://github.com/apache/incubator-kie-tools/issues"},"license":"Apache-2.0","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## Serverless Workflow Standalone Editors\n\n### Description\n\nThis library provides standalone Serverless Workflow Editor (one 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### Installation\n\n- To add it to your `package.json` file:\n\n  - `npm install @kie-tools/serverless-workflow-standalone-editor`\n\n- To import SWF Editor library:\n\n  - `import * as SwfEditor from \"@kie-tools/serverless-workflow-standalone-editor/dist/swf\"`\n\n### Usage\n\nHere is an example on how to open the Serverless Workflow Standalone Editor using the provided API:\n\n```\nconst editor = SwfEditor.open({\n      container: document.getElementById(\"swf-editor-container\"),\n      initialContent: Promise.resolve(\"\"),\n      readOnly: false,\n      languageType: \"json\",\n      swfPreviewOptions: { editorMode: \"diagram\", defaultWidth: \"100%\" }\n    });\n```\n\nAvailable parameters:\n\n- `container`: HTML element in which the Editor will be appended to.\n- `initialContent`: Promise to a workflow content. Can be empty. Examples:\n  - `Promise.resolve(\"\")`\n  - `Promise.resolve(\"<SWF_CONTENT_DIRECTLY_HERE>\")`\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- `languageType` (required, defaults to `json`): Use `json`/`yaml` to render text editor with serverless workflow content in json/yaml format and stunner editor to display diagram.\n- `swfPreviewOptions` (optional, defaults to `{ editorMode: \"full\", defaultWidth: \"50%\" }`): You can use this option to change the `editorMode` (optional, defaults to `full`) and `defaultWidth` (optional, defaults to `50%`). If you want to render only the diagram editors into the web application and hide the text editor, you can use this parameter and set the value `diagram`. To render the text editor and hide the diagram editor, you can use set the value `text`. To render both `diagram` and `text` together, you can set the value `full`.\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- `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- `validate(): Promise<Notification[]>`: Validates the serverless workflow json/yaml content based on its schemas and it also includes custom validations specific to serverless workflow rules.\n- `setTheme(theme: EditorTheme): Promise<void>`: This sets theme to the editors on the web application.\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","_rev":"1-2e6e449ecd86d42a4d45506c9106b070"}