diff --git a/client/src/app/TabsProvider.js b/client/src/app/TabsProvider.js
index 2aa9071275..2057de73f4 100644
--- a/client/src/app/TabsProvider.js
+++ b/client/src/app/TabsProvider.js
@@ -8,7 +8,7 @@
* except in compliance with the MIT License.
*/
-import React from 'react';
+import React, { forwardRef } from 'react';
import {
find,
@@ -138,9 +138,9 @@ export default class TabsProvider {
return false;
},
getComponent() {
- return (props) => {
- return ;
- };
+ return forwardRef((props, ref) => {
+ return ;
+ });
},
getIcon() {
return null;
diff --git a/resources/plugins/test-tab/client/index.js b/resources/plugins/test-tab/client/index.js
index 3f6215cfb2..ca3c7835f7 100644
--- a/resources/plugins/test-tab/client/index.js
+++ b/resources/plugins/test-tab/client/index.js
@@ -23,7 +23,7 @@ const tab = {
return file.name.endsWith('.helloWorld');
},
getComponent(options) {
- return () =>
Hello world!
;
+ return React.forwardRef((_, ref) => Hello world!
);
},
getIcon() {
return null;
diff --git a/resources/plugins/test-tab/dist/client.js b/resources/plugins/test-tab/dist/client.js
index 4b5849c18e..6bdeda841a 100644
--- a/resources/plugins/test-tab/dist/client.js
+++ b/resources/plugins/test-tab/dist/client.js
@@ -505,7 +505,9 @@ const tab = {
return file.name.endsWith('.helloWorld');
},
getComponent(options) {
- return () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", null, "Hello world!");
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef((_, ref) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", {
+ ref: ref
+ }, "Hello world!"));
},
getIcon() {
return null;
diff --git a/resources/plugins/test-tab/dist/client.js.map b/resources/plugins/test-tab/dist/client.js.map
index 7451a837ff..e0c8e1a979 100644
--- a/resources/plugins/test-tab/dist/client.js.map
+++ b/resources/plugins/test-tab/dist/client.js.map
@@ -1 +1 @@
-{"version":3,"file":"client.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA","sources":["webpack://test-tab/../node_modules/camunda-modeler-plugin-helpers/index.js","webpack://test-tab/../node_modules/camunda-modeler-plugin-helpers/react.js","webpack://test-tab/webpack/bootstrap","webpack://test-tab/webpack/runtime/compat get default export","webpack://test-tab/webpack/runtime/define property getters","webpack://test-tab/webpack/runtime/hasOwnProperty shorthand","webpack://test-tab/webpack/runtime/make namespace object","webpack://test-tab/./client/index.js"],"sourcesContent":["/**\n * Validate and register a client plugin.\n *\n * @param {Object} plugin\n * @param {String} type\n */\nexport function registerClientPlugin(plugin, type) {\n var plugins = window.plugins || [];\n window.plugins = plugins;\n\n if (!plugin) {\n throw new Error('plugin not specified');\n }\n\n if (!type) {\n throw new Error('type not specified');\n }\n\n plugins.push({\n plugin: plugin,\n type: type\n });\n}\n\n/**\n * Validate and register a client plugin.\n *\n * @param {import('react').ComponentType} extension\n *\n * @example\n *\n * import MyExtensionComponent from './MyExtensionComponent';\n *\n * registerClientExtension(MyExtensionComponent);\n */\nexport function registerClientExtension(component) {\n registerClientPlugin(component, 'client');\n}\n\n/**\n * Validate and register a bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.modeler.additionalModules');\n}\n\n/**\n * Validate and register a platform specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerPlatformBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.platform.modeler.additionalModules');\n}\n\n/**\n * Validate and register a cloud specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerCloudBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.cloud.modeler.additionalModules');\n}\n\n/**\n * Validate and register a bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a cloud specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerCloudDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerCloudDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.cloud.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a platform specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerPlatformDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerPlatformDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.platform.modeler.${c}.additionalModules`));\n}\n\n/**\n * Return the modeler directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getModelerDirectory() {\n return window.getModelerDirectory();\n}\n\n/**\n * Return the modeler plugin directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getPluginsDirectory() {\n return window.getPluginsDirectory();\n}","if (!window.react) {\n throw new Error('Not compatible with Camunda Modeler < 3.4');\n}\n\n/**\n * React object used by Camunda Modeler. Use it to create UI extension.\n *\n * @type {import('react')}\n */\nmodule.exports = window.react;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information regarding copyright\n * ownership.\n *\n * Camunda licenses this file to you under the MIT; you may not use this file\n * except in compliance with the MIT License.\n */\n\n// eslint-disable-next-line no-unused-vars\nimport React from 'react';\n\nimport { registerClientPlugin } from 'camunda-modeler-plugin-helpers';\n\nconst tab = {\n helloWorld: {\n name: 'TEST',\n encoding: 'utf8',\n exports: {},\n extensions: [ 'helloWorld' ],\n canOpen(file) {\n return file.name.endsWith('.helloWorld');\n },\n getComponent(options) {\n return () => Hello world!
;\n },\n getIcon() {\n return null;\n },\n getInitialContents() {\n return '';\n },\n getInitialFilename(suffix) {\n return `hello_${suffix}.helloWorld`;\n },\n getHelpMenu() {\n return [];\n },\n getNewFileMenu() {\n return [ {\n label: 'Hello World',\n group: 'Camunda 8',\n action: 'create-diagram',\n options: {\n type: 'helloWorld'\n }\n } ];\n },\n getLinter() {\n return null;\n }\n }\n};\n\nregisterClientPlugin(tab, 'tabs');\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"client.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA","sources":["webpack://test-tab/../node_modules/camunda-modeler-plugin-helpers/index.js","webpack://test-tab/../node_modules/camunda-modeler-plugin-helpers/react.js","webpack://test-tab/webpack/bootstrap","webpack://test-tab/webpack/runtime/compat get default export","webpack://test-tab/webpack/runtime/define property getters","webpack://test-tab/webpack/runtime/hasOwnProperty shorthand","webpack://test-tab/webpack/runtime/make namespace object","webpack://test-tab/./client/index.js"],"sourcesContent":["/**\n * Validate and register a client plugin.\n *\n * @param {Object} plugin\n * @param {String} type\n */\nexport function registerClientPlugin(plugin, type) {\n var plugins = window.plugins || [];\n window.plugins = plugins;\n\n if (!plugin) {\n throw new Error('plugin not specified');\n }\n\n if (!type) {\n throw new Error('type not specified');\n }\n\n plugins.push({\n plugin: plugin,\n type: type\n });\n}\n\n/**\n * Validate and register a client plugin.\n *\n * @param {import('react').ComponentType} extension\n *\n * @example\n *\n * import MyExtensionComponent from './MyExtensionComponent';\n *\n * registerClientExtension(MyExtensionComponent);\n */\nexport function registerClientExtension(component) {\n registerClientPlugin(component, 'client');\n}\n\n/**\n * Validate and register a bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.modeler.additionalModules');\n}\n\n/**\n * Validate and register a platform specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerPlatformBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.platform.modeler.additionalModules');\n}\n\n/**\n * Validate and register a cloud specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerCloudBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.cloud.modeler.additionalModules');\n}\n\n/**\n * Validate and register a bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a cloud specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerCloudDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerCloudDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.cloud.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a platform specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerPlatformDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerPlatformDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.platform.modeler.${c}.additionalModules`));\n}\n\n/**\n * Return the modeler directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getModelerDirectory() {\n return window.getModelerDirectory();\n}\n\n/**\n * Return the modeler plugin directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getPluginsDirectory() {\n return window.getPluginsDirectory();\n}","if (!window.react) {\n throw new Error('Not compatible with Camunda Modeler < 3.4');\n}\n\n/**\n * React object used by Camunda Modeler. Use it to create UI extension.\n *\n * @type {import('react')}\n */\nmodule.exports = window.react;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information regarding copyright\n * ownership.\n *\n * Camunda licenses this file to you under the MIT; you may not use this file\n * except in compliance with the MIT License.\n */\n\n// eslint-disable-next-line no-unused-vars\nimport React from 'react';\n\nimport { registerClientPlugin } from 'camunda-modeler-plugin-helpers';\n\nconst tab = {\n helloWorld: {\n name: 'TEST',\n encoding: 'utf8',\n exports: {},\n extensions: [ 'helloWorld' ],\n canOpen(file) {\n return file.name.endsWith('.helloWorld');\n },\n getComponent(options) {\n return React.forwardRef((_, ref) => Hello world!
);\n },\n getIcon() {\n return null;\n },\n getInitialContents() {\n return '';\n },\n getInitialFilename(suffix) {\n return `hello_${suffix}.helloWorld`;\n },\n getHelpMenu() {\n return [];\n },\n getNewFileMenu() {\n return [ {\n label: 'Hello World',\n group: 'Camunda 8',\n action: 'create-diagram',\n options: {\n type: 'helloWorld'\n }\n } ];\n },\n getLinter() {\n return null;\n }\n }\n};\n\nregisterClientPlugin(tab, 'tabs');\n"],"names":[],"sourceRoot":""}
\ No newline at end of file