From 445a98cc38b274f8f2204c0c2dac94c0ee4b9eaa Mon Sep 17 00:00:00 2001 From: Enes Erk Date: Mon, 6 Sep 2021 15:46:39 +0200 Subject: [PATCH] FEATURE: Placeholder-Insert: Exclude specific NodeTypes from the dropdown Load all form-elements recursively. Check if the elements are allowed to shown in the Placeholder-Insert-Dropdown. Disallow `Neos.Form.Builder:ElementCollection` and `Neos.Form.Builder:ValidatorCollection` by default. (The section is excluded in the yaml file) Resolves: #99 --- .../NodeTypes.Finishers.Confirmation.yaml | 5 + Configuration/NodeTypes.Finishers.Email.yaml | 5 + README.md | 42 + .../src/PlaceholderInsertDropdown.js | 66 +- .../JavaScript/PlaceholderInsert/Plugin.js | 1190 +++++++++++++---- .../PlaceholderInsert/Plugin.js.map | 2 +- 6 files changed, 1054 insertions(+), 256 deletions(-) diff --git a/Configuration/NodeTypes.Finishers.Confirmation.yaml b/Configuration/NodeTypes.Finishers.Confirmation.yaml index b281f98..7421f67 100644 --- a/Configuration/NodeTypes.Finishers.Confirmation.yaml +++ b/Configuration/NodeTypes.Finishers.Confirmation.yaml @@ -21,6 +21,11 @@ # Alternatively enable a rich text editor: # editor: 'Neos.Neos/Inspector/Editors/RichTextEditor' # editorOptions: + # excludeNodeTypes: + # 'Neos.Form.Builder:ElementCollection': + # exclude: true # excludes only the element + # excludeChildren: false # includes all child-elements + # 'Neos.Form.Builder:ValidatorCollection': true # excludes the element and all child-elements # formatting: # placeholderInsert: true # strong: true diff --git a/Configuration/NodeTypes.Finishers.Email.yaml b/Configuration/NodeTypes.Finishers.Email.yaml index 6495ac5..4dbf35f 100644 --- a/Configuration/NodeTypes.Finishers.Email.yaml +++ b/Configuration/NodeTypes.Finishers.Email.yaml @@ -35,6 +35,11 @@ # Alternatively enable a rich text editor: # editor: 'Neos.Neos/Inspector/Editors/RichTextEditor' # editorOptions: + # excludeNodeTypes: + # 'Neos.Form.Builder:ElementCollection': + # exclude: true # excludes only the element + # excludeChildren: false # includes all child-elements + # 'Neos.Form.Builder:ValidatorCollection': true # excludes the element and all child-elements # formatting: # placeholderInsert: true # strong: true diff --git a/README.md b/README.md index 8384ef1..db108b2 100644 --- a/README.md +++ b/README.md @@ -378,3 +378,45 @@ selectable: } } ``` + +## Example: Exclude NodeTypes from the Placeholder-Insert + +If you do not want that some of your own NodeTypes are visible in the `Placeholder-Insert`-Dropdown then you can hide them easily. + +This option requires the RichText-Editor. + +Edit the YAML-Configuration of the Confirmation or Email-Finisher: + +```yaml +'Neos.Form.Builder:EmailFinisher': + properties: + 'templateSource': + ui: + inspector: + editor: 'Neos.Neos/Inspector/Editors/RichTextEditor' + editorOptions: + excludeNodeTypes: + 'Foo.Bar:GridCollection': + exclude: true # excludes only the element + excludeChildren: false # includes all child-elements + 'Neos.Form.Builder:ValidatorCollection': true # excludes the element and all child-elements +``` + +At the path `templateSource.ui.inspector.editorOption.excludeNodeTypes` you can hide or show specific NodeTypes. + +If you use the NodeType-Name as the key and a boolean value as the value, these settings has an effekt on the whole element and his child-elements.
+```yaml +excludeNodeTypes: + 'Foo.Bar:GridCollection': true # hides the element and all child-elements +``` + +If you want only hide the element and not the child-elements (or the opposite) you can specify the setting a little more:
+`exclude`: hides or shows the element, has no effect on the child-elements +`excludeChildren`: hides or shows the child-elements, has no effect on the parent-element + +```yaml +excludeNodeTypes: + 'Foo.Bar:GridCollection': + exclude: true # excludes only the element + excludeChildren: false # includes all child-elements +``` \ No newline at end of file diff --git a/Resources/Private/PlaceholderInsert/src/PlaceholderInsertDropdown.js b/Resources/Private/PlaceholderInsert/src/PlaceholderInsertDropdown.js index 4ef6b56..c0482cf 100644 --- a/Resources/Private/PlaceholderInsert/src/PlaceholderInsertDropdown.js +++ b/Resources/Private/PlaceholderInsert/src/PlaceholderInsertDropdown.js @@ -48,13 +48,7 @@ export default class PlaceholderInsertDropdown extends PureComponent { if (!elementsNode) { return null; } - const options = elementsNode.children - .map(node => this.props.nodesByContextPath[node.contextPath]) - .map(node => ({ - value: node.properties.identifier || node.identifier, - label: - node.properties.label || node.properties.identifier || node.identifier - })); + const options = this.getOptionsRecursively(elementsNode.children); if (options.length === 0) { return null; @@ -74,4 +68,62 @@ export default class PlaceholderInsertDropdown extends PureComponent { /> ); } + + getOptionsRecursively(elements) { + const returnValues = []; + const excludeSettings = this.props.inlineEditorOptions.excludeNodeTypes; + + elements.forEach((childNode) => { + const currentNode = this.props.nodesByContextPath[childNode.contextPath]; + const childChildNodes = this.props.nodesByContextPath[childNode.contextPath].children; + let skipMode = 'includeAll'; + + if (excludeSettings) { + if (excludeSettings.hasOwnProperty(childNode.nodeType)) { + const nodeTypeSettings = excludeSettings[childNode.nodeType]; + + if (typeof nodeTypeSettings === 'boolean') { + if (nodeTypeSettings) { + // exclude all + return; + } + } + else if (nodeTypeSettings.hasOwnProperty('exclude') || nodeTypeSettings.hasOwnProperty('excludeChildren')) { + if (nodeTypeSettings.exclude && nodeTypeSettings.excludeChildren) { + // exclude all + return; + } + else if (nodeTypeSettings.exclude && !nodeTypeSettings.excludeChildren) { + // exclude only current element, not children + skipMode = 'skipChildren' + } + else if (!nodeTypeSettings.exclude && nodeTypeSettings.excludeChildren) { + // exclude only children + skipMode = 'skipParent' + } + } + } + } + + if (skipMode === 'includeAll' || skipMode === 'skipParent') { + returnValues.push({ + value: currentNode.properties.identifier || currentNode.identifier, + label: + currentNode.properties.label || currentNode.properties.identifier || currentNode.identifier + }); + } + + if (skipMode === 'includeAll' || skipMode === 'skipChildren') { + const childOptions = this.getOptionsRecursively(childChildNodes); + + if (Array.isArray(childOptions)) { + childOptions.forEach(childOption => { + returnValues.push(childOption); + }); + } + } + }); + + return returnValues; + } } diff --git a/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js b/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js index fa33b7f..fd9ebd9 100644 --- a/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js +++ b/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js @@ -36,14 +36,34 @@ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -59,205 +79,853 @@ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ +/******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); /******/ }) /************************************************************************/ -/******/ ([ -/* 0 */ +/******/ ({ + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js": +/*!************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js ***! + \************************************************************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = readFromConsumerApi; +exports.__esModule = true; +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +var manifest_1 = tslib_1.__importDefault(__webpack_require__(/*! ./manifest */ "./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js")); +var createReadOnlyValue = function createReadOnlyValue(value) { + return { + value: value, + writable: false, + enumerable: false, + configurable: true + }; +}; +function createConsumerApi(manifests, exposureMap) { + var api = {}; + Object.keys(exposureMap).forEach(function (key) { + Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key])); + }); + Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1["default"](manifests))); + Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api)); +} +exports["default"] = createConsumerApi; +//# sourceMappingURL=createConsumerApi.js.map + +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/index.js": +/*!************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/index.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +var createConsumerApi_1 = tslib_1.__importDefault(__webpack_require__(/*! ./createConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js")); +exports.createConsumerApi = createConsumerApi_1["default"]; +var readFromConsumerApi_1 = tslib_1.__importDefault(__webpack_require__(/*! ./readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js")); +exports.readFromConsumerApi = readFromConsumerApi_1["default"]; +var index_1 = __webpack_require__(/*! ./registry/index */ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js"); +exports.SynchronousRegistry = index_1.SynchronousRegistry; +exports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry; +exports["default"] = readFromConsumerApi_1["default"]('manifest'); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js": +/*!***************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = function (manifests) { + return function (identifier, options, bootstrap) { + var _a; + manifests.push((_a = {}, _a[identifier] = { + options: options, + bootstrap: bootstrap + }, _a)); + }; +}; +//# sourceMappingURL=manifest.js.map + +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; function readFromConsumerApi(key) { return function () { - if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI']['@' + key]) { - var _window$NeosHostPlu; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _a; + if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI']["@" + key]) { + return (_a = window['@Neos:HostPluginAPI'])["@" + key].apply(_a, args); + } + throw new Error("You are trying to read from a consumer api that hasn't been initialized yet!"); + }; +} +exports["default"] = readFromConsumerApi; +//# sourceMappingURL=readFromConsumerApi.js.map + +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var AbstractRegistry = function () { + function AbstractRegistry(description) { + this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611'; + this.description = description; + } + return AbstractRegistry; +}(); +exports["default"] = AbstractRegistry; +//# sourceMappingURL=AbstractRegistry.js.map + +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; - return (_window$NeosHostPlu = window['@Neos:HostPluginAPI'])['@' + key].apply(_window$NeosHostPlu, arguments); + +exports.__esModule = true; +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +var SynchronousRegistry_1 = tslib_1.__importDefault(__webpack_require__(/*! ./SynchronousRegistry */ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js")); +var SynchronousMetaRegistry = function (_super) { + tslib_1.__extends(SynchronousMetaRegistry, _super); + function SynchronousMetaRegistry() { + return _super !== null && _super.apply(this, arguments) || this; + } + SynchronousMetaRegistry.prototype.set = function (key, value) { + if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') { + throw new Error('You can only add registries to a meta registry'); } + return _super.prototype.set.call(this, key, value); + }; + return SynchronousMetaRegistry; +}(SynchronousRegistry_1["default"]); +exports["default"] = SynchronousMetaRegistry; +//# sourceMappingURL=SynchronousMetaRegistry.js.map + +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; - throw new Error('You are trying to read from a consumer api that hasn\'t been initialized yet!'); + +exports.__esModule = true; +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +var AbstractRegistry_1 = tslib_1.__importDefault(__webpack_require__(/*! ./AbstractRegistry */ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js")); +var positional_array_sorter_1 = tslib_1.__importDefault(__webpack_require__(/*! @neos-project/positional-array-sorter */ "./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js")); +var SynchronousRegistry = function (_super) { + tslib_1.__extends(SynchronousRegistry, _super); + function SynchronousRegistry(description) { + var _this = _super.call(this, description) || this; + _this._registry = []; + return _this; + } + SynchronousRegistry.prototype.set = function (key, value, position) { + if (position === void 0) { + position = 0; + } + if (typeof key !== 'string') { + throw new Error('Key must be a string'); + } + if (typeof position !== 'string' && typeof position !== 'number') { + throw new Error('Position must be a string or a number'); + } + var entry = { key: key, value: value }; + if (position) { + entry.position = position; + } + var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { + return item.key === key; + }); + if (indexOfItemWithTheSameKey === -1) { + this._registry.push(entry); + } else { + this._registry[indexOfItemWithTheSameKey] = entry; + } + return value; }; -} + SynchronousRegistry.prototype.get = function (key) { + if (typeof key !== 'string') { + console.error('Key must be a string'); + return null; + } + var result = this._registry.find(function (item) { + return item.key === key; + }); + return result ? result.value : null; + }; + SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) { + var unsortedChildren = this._registry.filter(function (item) { + return item.key.indexOf(searchKey + '/') === 0; + }); + return positional_array_sorter_1["default"](unsortedChildren); + }; + SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) { + var result = {}; + this._getChildrenWrapped(searchKey).forEach(function (item) { + result[item.key] = item.value; + }); + return result; + }; + SynchronousRegistry.prototype.getChildren = function (searchKey) { + return this._getChildrenWrapped(searchKey).map(function (item) { + return item.value; + }); + }; + SynchronousRegistry.prototype.has = function (key) { + if (typeof key !== 'string') { + console.error('Key must be a string'); + return false; + } + return Boolean(this._registry.find(function (item) { + return item.key === key; + })); + }; + SynchronousRegistry.prototype._getAllWrapped = function () { + return positional_array_sorter_1["default"](this._registry); + }; + SynchronousRegistry.prototype.getAllAsObject = function () { + var result = {}; + this._getAllWrapped().forEach(function (item) { + result[item.key] = item.value; + }); + return result; + }; + SynchronousRegistry.prototype.getAllAsList = function () { + return this._getAllWrapped().map(function (item) { + return Object.assign({ id: item.key }, item.value); + }); + }; + return SynchronousRegistry; +}(AbstractRegistry_1["default"]); +exports["default"] = SynchronousRegistry; +//# sourceMappingURL=SynchronousRegistry.js.map /***/ }), -/* 1 */ + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js ***! + \*********************************************************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _readFromConsumerApi = __webpack_require__(0); +exports.__esModule = true; +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +var SynchronousRegistry_1 = tslib_1.__importDefault(__webpack_require__(/*! ./SynchronousRegistry */ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js")); +exports.SynchronousRegistry = SynchronousRegistry_1["default"]; +var SynchronousMetaRegistry_1 = tslib_1.__importDefault(__webpack_require__(/*! ./SynchronousMetaRegistry */ "./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js")); +exports.SynchronousMetaRegistry = SynchronousMetaRegistry_1["default"]; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js": +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _readFromConsumerApi = __webpack_require__(/*! ../../../../dist/readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js"); var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -module.exports = (0, _readFromConsumerApi2.default)('vendor')().plow; +module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiDecorators; /***/ }), -/* 2 */ + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js": +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__(3); +var _readFromConsumerApi = __webpack_require__(/*! ../../../../dist/readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js"); + +var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiReduxStore; /***/ }), -/* 3 */ + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js": +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _neosUiExtensibility = __webpack_require__(4); +var _readFromConsumerApi = __webpack_require__(/*! ../../../../dist/readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js"); -var _neosUiExtensibility2 = _interopRequireDefault(_neosUiExtensibility); +var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); -var _PlaceholderInsertDropdown = __webpack_require__(8); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _PlaceholderInsertDropdown2 = _interopRequireDefault(_PlaceholderInsertDropdown); +module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().ReactUiComponents; -var _placeholderInsertPlugin = __webpack_require__(14); +/***/ }), -var _placeholderInsertPlugin2 = _interopRequireDefault(_placeholderInsertPlugin); +/***/ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -var _plowJs = __webpack_require__(1); +"use strict"; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var addPlugin = function addPlugin(Plugin, isEnabled) { - return function (ckEditorConfiguration, options) { - if (!isEnabled || isEnabled(options.editorOptions, options)) { - ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || []; - return (0, _plowJs.$add)("plugins", Plugin, ckEditorConfiguration); - } - return ckEditorConfiguration; - }; -}; +var _readFromConsumerApi = __webpack_require__(/*! ../../../../dist/readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js"); -(0, _neosUiExtensibility2.default)("Neos.Form.Builder:PlaceholderInsert", {}, function (globalRegistry) { - var richtextToolbar = globalRegistry.get("ckEditor5").get("richtextToolbar"); - richtextToolbar.set("placeholderInsertt", { - component: _PlaceholderInsertDropdown2.default, - isVisible: (0, _plowJs.$get)("formatting.placeholderInsert") - }); +var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); - var config = globalRegistry.get("ckEditor5").get("config"); - config.set("placeholderInsert", addPlugin(_placeholderInsertPlugin2.default, (0, _plowJs.$get)("formatting.placeholderInsert"))); -}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = (0, _readFromConsumerApi2.default)('vendor')().CkEditor5; /***/ }), -/* 4 */ + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js ***! + \********************************************************************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createConsumerApi = undefined; +var _readFromConsumerApi = __webpack_require__(/*! ../../../../dist/readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js"); + +var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = (0, _readFromConsumerApi2.default)('vendor')().plow; -var _createConsumerApi = __webpack_require__(5); +/***/ }), + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; -var _createConsumerApi2 = _interopRequireDefault(_createConsumerApi); -var _readFromConsumerApi = __webpack_require__(0); +var _readFromConsumerApi = __webpack_require__(/*! ../../../../dist/readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js"); var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = (0, _readFromConsumerApi2.default)('manifest'); -exports.createConsumerApi = _createConsumerApi2.default; +module.exports = (0, _readFromConsumerApi2.default)('vendor')().reactRedux; /***/ }), -/* 5 */ + +/***/ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js ***! + \******************************************************************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createConsumerApi; +var _readFromConsumerApi = __webpack_require__(/*! ../../../../dist/readFromConsumerApi */ "./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js"); -var _package = __webpack_require__(6); +var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); -var _manifest = __webpack_require__(7); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _manifest2 = _interopRequireDefault(_manifest); +module.exports = (0, _readFromConsumerApi2.default)('vendor')().React; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/***/ }), -var createReadOnlyValue = function createReadOnlyValue(value) { - return { - value: value, - writable: false, - enumerable: false, - configurable: true +/***/ "./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var positionalArraySorter = function positionalArraySorter(subject, position, idKey) { + if (position === void 0) { + position = 'position'; + } + if (idKey === void 0) { + idKey = 'key'; + } + var positionAccessor = typeof position === 'string' ? function (value) { + return value[position]; + } : position; + var indexMapping = {}; + var middleKeys = {}; + var startKeys = {}; + var endKeys = {}; + var beforeKeys = {}; + var afterKeys = {}; + subject.forEach(function (item, index) { + var key = item[idKey] ? item[idKey] : String(index); + indexMapping[key] = index; + var positionValue = positionAccessor(item); + var position = String(positionValue ? positionValue : index); + var invalid = false; + if (position.startsWith('start')) { + var weightMatch = position.match(/start\s+(\d+)/); + var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0; + if (!startKeys[weight]) { + startKeys[weight] = []; + } + startKeys[weight].push(key); + } else if (position.startsWith('end')) { + var weightMatch = position.match(/end\s+(\d+)/); + var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0; + if (!endKeys[weight]) { + endKeys[weight] = []; + } + endKeys[weight].push(key); + } else if (position.startsWith('before')) { + var match = position.match(/before\s+(\S+)(\s+(\d+))?/); + if (!match) { + invalid = true; + } else { + var reference = match[1]; + var weight = match[3] ? Number(match[3]) : 0; + if (!beforeKeys[reference]) { + beforeKeys[reference] = {}; + } + if (!beforeKeys[reference][weight]) { + beforeKeys[reference][weight] = []; + } + beforeKeys[reference][weight].push(key); + } + } else if (position.startsWith('after')) { + var match = position.match(/after\s+(\S+)(\s+(\d+))?/); + if (!match) { + invalid = true; + } else { + var reference = match[1]; + var weight = match[3] ? Number(match[3]) : 0; + if (!afterKeys[reference]) { + afterKeys[reference] = {}; + } + if (!afterKeys[reference][weight]) { + afterKeys[reference][weight] = []; + } + afterKeys[reference][weight].push(key); + } + } else { + invalid = true; + } + if (invalid) { + var numberPosition = parseFloat(position); + if (isNaN(numberPosition) || !isFinite(numberPosition)) { + numberPosition = index; + } + if (!middleKeys[numberPosition]) { + middleKeys[numberPosition] = []; + } + middleKeys[numberPosition].push(key); + } + }); + var resultStart = []; + var resultMiddle = []; + var resultEnd = []; + var processedKeys = []; + var sortedWeights = function sortedWeights(dict, asc) { + var weights = Object.keys(dict).map(function (x) { + return Number(x); + }).sort(function (a, b) { + return a - b; + }); + return asc ? weights : weights.reverse(); + }; + var addToResults = function addToResults(keys, result) { + keys.forEach(function (key) { + if (processedKeys.indexOf(key) >= 0) { + return; + } + processedKeys.push(key); + if (beforeKeys[key]) { + var beforeWeights = sortedWeights(beforeKeys[key], true); + for (var _i = 0, beforeWeights_1 = beforeWeights; _i < beforeWeights_1.length; _i++) { + var i = beforeWeights_1[_i]; + addToResults(beforeKeys[key][i], result); + } + } + result.push(key); + if (afterKeys[key]) { + var afterWeights = sortedWeights(afterKeys[key], false); + for (var _a = 0, afterWeights_1 = afterWeights; _a < afterWeights_1.length; _a++) { + var i = afterWeights_1[_a]; + addToResults(afterKeys[key][i], result); + } + } + }); }; + for (var _i = 0, _a = sortedWeights(startKeys, false); _i < _a.length; _i++) { + var i = _a[_i]; + addToResults(startKeys[i], resultStart); + } + for (var _b = 0, _c = sortedWeights(middleKeys, true); _b < _c.length; _b++) { + var i = _c[_b]; + addToResults(middleKeys[i], resultMiddle); + } + for (var _d = 0, _e = sortedWeights(endKeys, true); _d < _e.length; _d++) { + var i = _e[_d]; + addToResults(endKeys[i], resultEnd); + } + for (var _f = 0, _g = Object.keys(beforeKeys); _f < _g.length; _f++) { + var key = _g[_f]; + if (processedKeys.indexOf(key) >= 0) { + continue; + } + for (var _h = 0, _j = sortedWeights(beforeKeys[key], false); _h < _j.length; _h++) { + var i = _j[_h]; + addToResults(beforeKeys[key][i], resultStart); + } + } + for (var _k = 0, _l = Object.keys(afterKeys); _k < _l.length; _k++) { + var key = _l[_k]; + if (processedKeys.indexOf(key) >= 0) { + continue; + } + for (var _m = 0, _o = sortedWeights(afterKeys[key], false); _m < _o.length; _m++) { + var i = _o[_m]; + addToResults(afterKeys[key][i], resultMiddle); + } + } + var sortedKeys = resultStart.concat(resultMiddle, resultEnd); + return sortedKeys.map(function (key) { + return indexMapping[key]; + }).map(function (i) { + return subject[i]; + }); }; +exports["default"] = positionalArraySorter; +//# sourceMappingURL=positionalArraySorter.js.map -function createConsumerApi(manifests, exposureMap) { - var api = {}; +/***/ }), - Object.keys(exposureMap).forEach(function (key) { - Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key])); - }); +/***/ "./node_modules/tslib/tslib.es6.js": +/*!*****************************************!*\ + !*** ./node_modules/tslib/tslib.es6.js ***! + \*****************************************/ +/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - Object.defineProperty(api, '@manifest', createReadOnlyValue((0, _manifest2.default)(manifests))); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; }); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; - Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api)); - Object.defineProperty(window['@Neos:HostPluginAPI'], 'VERSION', createReadOnlyValue(_package.version)); +function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } -/***/ }), -/* 6 */ -/***/ (function(module, exports) { +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} -module.exports = {"name":"@neos-project/neos-ui-extensibility","version":"1.4.1","description":"Extensibility mechanisms for the Neos CMS UI","main":"./src/index.js","scripts":{"prebuild":"check-dependencies && yarn clean","test":"yarn jest -- -w 2 --coverage","test:watch":"yarn jest -- --watch","build":"exit 0","build:watch":"exit 0","clean":"rimraf ./lib ./dist","lint":"eslint src","jest":"NODE_ENV=test jest"},"devDependencies":{"@neos-project/babel-preset-neos-ui":"1.4.1","@neos-project/jest-preset-neos-ui":"1.4.1"},"dependencies":{"@neos-project/build-essentials":"1.4.1","@neos-project/positional-array-sorter":"1.4.1","babel-core":"^6.13.2","babel-eslint":"^7.1.1","babel-loader":"^7.1.2","babel-plugin-transform-decorators-legacy":"^1.3.4","babel-plugin-transform-object-rest-spread":"^6.20.1","babel-plugin-webpack-alias":"^2.1.1","babel-preset-es2015":"^6.13.2","babel-preset-react":"^6.3.13","babel-preset-stage-0":"^6.3.13","chalk":"^1.1.3","css-loader":"^0.28.4","file-loader":"^1.1.5","json-loader":"^0.5.4","postcss-loader":"^2.0.10","react-dev-utils":"^0.5.0","style-loader":"^0.21.0"},"bin":{"neos-react-scripts":"./bin/neos-react-scripts.js"},"jest":{"preset":"@neos-project/jest-preset-neos-ui"}} +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} -"use strict"; +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function __exportStar(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} -exports.default = function (manifests) { - return function (identifier, options, bootstrap) { - manifests.push(_defineProperty({}, identifier, { - options: options, - bootstrap: bootstrap - })); +function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } }; +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; }; +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + + /***/ }), -/* 8 */ + +/***/ "./src/PlaceholderInsertDropdown.js": +/*!******************************************!*\ + !*** ./src/PlaceholderInsertDropdown.js ***! + \******************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); exports.default = exports.parentNodeContextPath = undefined; @@ -267,19 +935,19 @@ var _dec, _dec2, _class; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); -var _reactRedux = __webpack_require__(9); +var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js"); -var _reactUiComponents = __webpack_require__(10); +var _reactUiComponents = __webpack_require__(/*! @neos-project/react-ui-components */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js"); -var _react = __webpack_require__(11); +var _react = __webpack_require__(/*! react */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js"); var _react2 = _interopRequireDefault(_react); -var _neosUiDecorators = __webpack_require__(13); +var _neosUiDecorators = __webpack_require__(/*! @neos-project/neos-ui-decorators */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js"); -var _plowJs = __webpack_require__(1); +var _plowJs = __webpack_require__(/*! plow-js */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js"); -var _neosUiReduxStore = __webpack_require__(16); +var _neosUiReduxStore = __webpack_require__(/*! @neos-project/neos-ui-redux-store */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -290,158 +958,213 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var parentNodeContextPath = exports.parentNodeContextPath = function parentNodeContextPath(contextPath) { - if (typeof contextPath !== "string") { - console.error("`contextPath` must be a string!"); // tslint:disable-line - return null; - } + if (typeof contextPath !== "string") { + console.error("`contextPath` must be a string!"); // tslint:disable-line + return null; + } - var _contextPath$split = contextPath.split("@"), - _contextPath$split2 = _slicedToArray(_contextPath$split, 2), - path = _contextPath$split2[0], - context = _contextPath$split2[1]; + var _contextPath$split = contextPath.split("@"), + _contextPath$split2 = _slicedToArray(_contextPath$split, 2), + path = _contextPath$split2[0], + context = _contextPath$split2[1]; - if (path.length === 0) { - // We are at top level; so there is no parent anymore! - return null; - } + if (path.length === 0) { + // We are at top level; so there is no parent anymore! + return null; + } - return path.substr(0, path.lastIndexOf("/")) + "@" + context; + return path.substr(0, path.lastIndexOf("/")) + "@" + context; }; var PlaceholderInsertDropdown = (_dec = (0, _reactRedux.connect)((0, _plowJs.$transform)({ - nodesByContextPath: _neosUiReduxStore.selectors.CR.Nodes.nodesByContextPathSelector, - focusedNode: _neosUiReduxStore.selectors.CR.Nodes.focusedSelector + nodesByContextPath: _neosUiReduxStore.selectors.CR.Nodes.nodesByContextPathSelector, + focusedNode: _neosUiReduxStore.selectors.CR.Nodes.focusedSelector })), _dec2 = (0, _neosUiDecorators.neos)(function (globalRegistry) { - return { - i18nRegistry: globalRegistry.get("i18n"), - nodeTypeRegistry: globalRegistry.get("@neos-project/neos-ui-contentrepository") - }; + return { + i18nRegistry: globalRegistry.get("i18n"), + nodeTypeRegistry: globalRegistry.get("@neos-project/neos-ui-contentrepository") + }; }), _dec(_class = _dec2(_class = function (_PureComponent) { - _inherits(PlaceholderInsertDropdown, _PureComponent); - - function PlaceholderInsertDropdown() { - var _ref; + _inherits(PlaceholderInsertDropdown, _PureComponent); - var _temp, _this, _ret; + function PlaceholderInsertDropdown() { + var _ref; - _classCallCheck(this, PlaceholderInsertDropdown); + var _temp, _this, _ret; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = PlaceholderInsertDropdown.__proto__ || Object.getPrototypeOf(PlaceholderInsertDropdown)).call.apply(_ref, [this].concat(args))), _this), _this.handleOnSelect = function (value) { - _this.props.executeCommand("placeholderInsert", value); - }, _temp), _possibleConstructorReturn(_this, _ret); - } - - _createClass(PlaceholderInsertDropdown, [{ - key: "render", - value: function render() { - var _this2 = this; - - var _parentNodeContextPat = parentNodeContextPath(parentNodeContextPath(this.props.focusedNode.contextPath)).split("@"), - _parentNodeContextPat2 = _slicedToArray(_parentNodeContextPat, 2), - formPath = _parentNodeContextPat2[0], - workspace = _parentNodeContextPat2[1]; - - var elementsPath = formPath + "/elements@" + workspace; + _classCallCheck(this, PlaceholderInsertDropdown); - var elementsNode = this.props.nodesByContextPath[elementsPath]; - if (!elementsNode) { - return null; - } - var options = elementsNode.children.map(function (node) { - return _this2.props.nodesByContextPath[node.contextPath]; - }).map(function (node) { - return { - value: node.properties.identifier || node.identifier, - label: node.properties.label || node.properties.identifier || node.identifier - }; - }); - - if (options.length === 0) { - return null; - } - - var placeholderLabel = this.props.i18nRegistry.translate("Neos.Form.Builder:Main:placeholder", "Insert placeholder"); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - return _react2.default.createElement(_reactUiComponents.SelectBox, { - placeholder: placeholderLabel, - options: options, - onValueChange: this.handleOnSelect, - value: null - }); + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = PlaceholderInsertDropdown.__proto__ || Object.getPrototypeOf(PlaceholderInsertDropdown)).call.apply(_ref, [this].concat(args))), _this), _this.handleOnSelect = function (value) { + _this.props.executeCommand("placeholderInsert", value); + }, _temp), _possibleConstructorReturn(_this, _ret); } - }]); - return PlaceholderInsertDropdown; + _createClass(PlaceholderInsertDropdown, [{ + key: "render", + value: function render() { + var _parentNodeContextPat = parentNodeContextPath(parentNodeContextPath(this.props.focusedNode.contextPath)).split("@"), + _parentNodeContextPat2 = _slicedToArray(_parentNodeContextPat, 2), + formPath = _parentNodeContextPat2[0], + workspace = _parentNodeContextPat2[1]; + + var elementsPath = formPath + "/elements@" + workspace; + + var elementsNode = this.props.nodesByContextPath[elementsPath]; + if (!elementsNode) { + return null; + } + var options = this.getOptionsRecursively(elementsNode.children); + + if (options.length === 0) { + return null; + } + + var placeholderLabel = this.props.i18nRegistry.translate("Neos.Form.Builder:Main:placeholder", "Insert placeholder"); + + return _react2.default.createElement(_reactUiComponents.SelectBox, { + placeholder: placeholderLabel, + options: options, + onValueChange: this.handleOnSelect, + value: null + }); + } + }, { + key: "getOptionsRecursively", + value: function getOptionsRecursively(elements) { + var _this2 = this; + + var returnValues = []; + var excludeSettings = this.props.inlineEditorOptions.excludeNodeTypes; + + elements.forEach(function (childNode) { + var currentNode = _this2.props.nodesByContextPath[childNode.contextPath]; + var childChildNodes = _this2.props.nodesByContextPath[childNode.contextPath].children; + var skipMode = 'includeAll'; + + if (excludeSettings) { + if (excludeSettings.hasOwnProperty(childNode.nodeType)) { + var nodeTypeSettings = excludeSettings[childNode.nodeType]; + + if (typeof nodeTypeSettings === 'boolean') { + if (nodeTypeSettings) { + // exclude all + return; + } + } else if (nodeTypeSettings.hasOwnProperty('exclude') || nodeTypeSettings.hasOwnProperty('excludeChildren')) { + if (nodeTypeSettings.exclude && nodeTypeSettings.excludeChildren) { + // exclude all + return; + } else if (nodeTypeSettings.exclude && !nodeTypeSettings.excludeChildren) { + // exclude only current element, not children + skipMode = 'skipChildren'; + } else if (!nodeTypeSettings.exclude && nodeTypeSettings.excludeChildren) { + // exclude only children + skipMode = 'skipParent'; + } + } + } + } + + if (skipMode === 'includeAll' || skipMode === 'skipParent') { + returnValues.push({ + value: currentNode.properties.identifier || currentNode.identifier, + label: currentNode.properties.label || currentNode.properties.identifier || currentNode.identifier + }); + } + + if (skipMode === 'includeAll' || skipMode === 'skipChildren') { + var childOptions = _this2.getOptionsRecursively(childChildNodes); + + if (Array.isArray(childOptions)) { + childOptions.forEach(function (childOption) { + returnValues.push(childOption); + }); + } + } + }); + + return returnValues; + } + }]); + + return PlaceholderInsertDropdown; }(_react.PureComponent)) || _class) || _class); exports.default = PlaceholderInsertDropdown; /***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _readFromConsumerApi = __webpack_require__(0); - -var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -module.exports = (0, _readFromConsumerApi2.default)('vendor')().reactRedux; - -/***/ }), -/* 10 */ +/***/ "./src/index.js": +/*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _readFromConsumerApi = __webpack_require__(0); - -var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().ReactUiComponents; +__webpack_require__(/*! ./manifest */ "./src/manifest.js"); /***/ }), -/* 11 */ + +/***/ "./src/manifest.js": +/*!*************************!*\ + !*** ./src/manifest.js ***! + \*************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _readFromConsumerApi = __webpack_require__(0); +var _neosUiExtensibility = __webpack_require__(/*! @neos-project/neos-ui-extensibility */ "./node_modules/@neos-project/neos-ui-extensibility/dist/index.js"); -var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); +var _neosUiExtensibility2 = _interopRequireDefault(_neosUiExtensibility); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _PlaceholderInsertDropdown = __webpack_require__(/*! ./PlaceholderInsertDropdown */ "./src/PlaceholderInsertDropdown.js"); -module.exports = (0, _readFromConsumerApi2.default)('vendor')().React; +var _PlaceholderInsertDropdown2 = _interopRequireDefault(_PlaceholderInsertDropdown); -/***/ }), -/* 12 */, -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { +var _placeholderInsertPlugin = __webpack_require__(/*! ./placeholderInsertPlugin */ "./src/placeholderInsertPlugin.js"); -"use strict"; +var _placeholderInsertPlugin2 = _interopRequireDefault(_placeholderInsertPlugin); +var _plowJs = __webpack_require__(/*! plow-js */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js"); -var _readFromConsumerApi = __webpack_require__(0); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); +var addPlugin = function addPlugin(Plugin, isEnabled) { + return function (ckEditorConfiguration, options) { + if (!isEnabled || isEnabled(options.editorOptions, options)) { + ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || []; + return (0, _plowJs.$add)("plugins", Plugin, ckEditorConfiguration); + } + return ckEditorConfiguration; + }; +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +(0, _neosUiExtensibility2.default)("Neos.Form.Builder:PlaceholderInsert", {}, function (globalRegistry) { + var richtextToolbar = globalRegistry.get("ckEditor5").get("richtextToolbar"); + richtextToolbar.set("placeholderInsertt", { + component: _PlaceholderInsertDropdown2.default, + isVisible: (0, _plowJs.$get)("formatting.placeholderInsert") + }); -module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiDecorators; + var config = globalRegistry.get("ckEditor5").get("config"); + config.set("placeholderInsert", addPlugin(_placeholderInsertPlugin2.default, (0, _plowJs.$get)("formatting.placeholderInsert"))); +}); /***/ }), -/* 14 */ + +/***/ "./src/placeholderInsertPlugin.js": +/*!****************************************!*\ + !*** ./src/placeholderInsertPlugin.js ***! + \****************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -454,7 +1177,7 @@ exports.default = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _ckeditor5Exports = __webpack_require__(15); +var _ckeditor5Exports = __webpack_require__(/*! ckeditor5-exports */ "./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -513,36 +1236,7 @@ var PlaceholderInsertPlugin = function (_Plugin) { exports.default = PlaceholderInsertPlugin; -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _readFromConsumerApi = __webpack_require__(0); - -var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = (0, _readFromConsumerApi2.default)('vendor')().CkEditor5; - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _readFromConsumerApi = __webpack_require__(0); - -var _readFromConsumerApi2 = _interopRequireDefault(_readFromConsumerApi); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiReduxStore; - /***/ }) -/******/ ]); + +/******/ }); //# sourceMappingURL=Plugin.js.map \ No newline at end of file diff --git a/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js.map b/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js.map index e50f00c..74671ab 100644 --- a/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js.map +++ b/Resources/Public/JavaScript/PlaceholderInsert/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap d6d895033e93badc528e","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./src/index.js","webpack:///./src/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/package.json","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/manifest.js","webpack:///./src/PlaceholderInsertDropdown.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","webpack:///./src/placeholderInsertPlugin.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js"],"names":["readFromConsumerApi","key","window","Error","module","exports","plow","require","addPlugin","Plugin","isEnabled","ckEditorConfiguration","options","editorOptions","plugins","richtextToolbar","globalRegistry","get","set","component","PlaceholderInsertDropdown","isVisible","config","placeholderInsertPlugin","createConsumerApi","createReadOnlyValue","value","writable","enumerable","configurable","manifests","exposureMap","api","Object","keys","forEach","defineProperty","version","identifier","bootstrap","push","parentNodeContextPath","contextPath","console","error","split","path","context","length","substr","lastIndexOf","nodesByContextPath","selectors","CR","Nodes","nodesByContextPathSelector","focusedNode","focusedSelector","i18nRegistry","nodeTypeRegistry","handleOnSelect","props","executeCommand","formPath","workspace","elementsPath","elementsNode","children","map","node","properties","label","placeholderLabel","translate","PureComponent","reactRedux","ReactUiComponents","React","NeosUiDecorators","PlaceholderInsertCommand","model","editor","doc","document","selection","placeholder","ModelText","insertContent","Command","PlaceholderInsertPlugin","commands","add","CkEditor5","NeosUiReduxStore"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;;;;;;;;;;;;;kBC7DwBA,mB;AAAT,SAASA,mBAAT,CAA6BC,GAA7B,EAAkC;AAC7C,WAAO,YAAa;AAChB,YAAIC,OAAO,qBAAP,KAAiCA,OAAO,qBAAP,QAAkCD,GAAlC,CAArC,EAA+E;AAAA;;AAC3E,mBAAO,8BAAO,qBAAP,SAAkCA,GAAlC,uCAAP;AACH;;AAED,cAAM,IAAIE,KAAJ,iFAAN;AACH,KAND;AAOH,C;;;;;;;;;ACRD;;;;;;AAEAC,OAAOC,OAAP,GAAiB,mCAAoB,QAApB,IAAgCC,IAAjD,C;;;;;;;;;ACFAC,mBAAOA,CAAC,CAAR,E;;;;;;;;;ACAA;;;;AACA;;;;AACA;;;;AACA;;;;AAEA,IAAMC,YAAY,SAAZA,SAAY,CAACC,MAAD,EAASC,SAAT;AAAA,SAAuB,UAACC,qBAAD,EAAwBC,OAAxB,EAAoC;AAC3E,QAAI,CAACF,SAAD,IAAcA,UAAUE,QAAQC,aAAlB,EAAiCD,OAAjC,CAAlB,EAA6D;AAC3DD,4BAAsBG,OAAtB,GAAgCH,sBAAsBG,OAAtB,IAAiC,EAAjE;AACA,aAAO,kBAAK,SAAL,EAAgBL,MAAhB,EAAwBE,qBAAxB,CAAP;AACD;AACD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;;;;;;ACFA;;;;;;AAEAvE,OAAOC,OAAP,GAAiB,mCAAoB,qBAApB,IAA6CuE,iBAA9D,C;;;;;;;;;ACFA;;;;;;AAEAxE,OAAOC,OAAP,GAAiB,mCAAoB,QAApB,IAAgCwE,KAAjD,C;;;;;;;;;;ACFA;;;;;;AAEAzE,OAAOC,OAAP,GAAiB,mCAAoB,qBAApB,IAA6CyE,gBAA9D,C;;;;;;;;;;;;;;;;ACFA;;;;;;;;IAEMC,wB;;;;;;;;;;;4BACIrD,K,EAAO;AACb,UAAMsD,QAAQ,KAAKC,MAAL,CAAYD,KAA1B;AACA,UAAME,MAAMF,MAAMG,QAAlB;AACA,UAAMC,YAAYF,IAAIE,SAAtB;AACA,UAAMC,cAAc,IAAIC,2BAAJ,CAAc,MAAM5D,KAAN,GAAc,GAA5B,CAApB;AACAsD,YAAMO,aAAN,CAAoBF,WAApB,EAAiCD,SAAjC;AACD;;;;EAPoCI,yB;;IAUlBC,uB;;;;;;;;;;;2BAIZ;AACL,UAAMR,SAAS,KAAKA,MAApB;;AAEAA,aAAOS,QAAP,CAAgBC,GAAhB,CACE,mBADF,EAEE,IAAIZ,wBAAJ,CAA6B,KAAKE,MAAlC,CAFF;AAID;;;wBAVuB;AACtB,aAAO,mBAAP;AACD;;;;EAHkDxE,wB;;kBAAhCgF,uB;;;;;;;;;ACZrB;;;;;;AAEArF,OAAOC,OAAP,GAAiB,mCAAoB,QAApB,IAAgCuF,SAAjD,C;;;;;;;;;ACFA;;;;;;AAEAxF,OAAOC,OAAP,GAAiB,mCAAoB,qBAApB,IAA6CwF,gBAA9D,C","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d6d895033e93badc528e","export default function readFromConsumerApi(key) {\n return (...args) => {\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][`@${key}`]) {\n return window['@Neos:HostPluginAPI'][`@${key}`](...args);\n }\n\n throw new Error(`You are trying to read from a consumer api that hasn't been initialized yet!`);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/readFromConsumerApi.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","require(\"./manifest\");\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import manifest from \"@neos-project/neos-ui-extensibility\";\nimport PlaceholderInsertDropdown from \"./PlaceholderInsertDropdown\";\nimport placeholderInsertPlugin from \"./placeholderInsertPlugin\";\nimport { $add, $get } from \"plow-js\";\n\nconst addPlugin = (Plugin, isEnabled) => (ckEditorConfiguration, options) => {\n if (!isEnabled || isEnabled(options.editorOptions, options)) {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n return $add(\"plugins\", Plugin, ckEditorConfiguration);\n }\n return ckEditorConfiguration;\n};\n\nmanifest(\"Neos.Form.Builder:PlaceholderInsert\", {}, globalRegistry => {\n const richtextToolbar = globalRegistry\n .get(\"ckEditor5\")\n .get(\"richtextToolbar\");\n richtextToolbar.set(\"placeholderInsertt\", {\n component: PlaceholderInsertDropdown,\n isVisible: $get(\"formatting.placeholderInsert\")\n });\n\n const config = globalRegistry.get(\"ckEditor5\").get(\"config\");\n config.set(\n \"placeholderInsert\",\n addPlugin(placeholderInsertPlugin, $get(\"formatting.placeholderInsert\"))\n );\n});\n\n\n\n// WEBPACK FOOTER //\n// ./src/manifest.js","import createConsumerApi from './createConsumerApi';\nimport readFromConsumerApi from './readFromConsumerApi';\n\nexport default readFromConsumerApi('manifest');\n\nexport {\n createConsumerApi\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/index.js","import {version} from '../package.json';\nimport createManifestFunction from './manifest';\n\nconst createReadOnlyValue = value => ({\n value,\n writable: false,\n enumerable: false,\n configurable: true\n});\n\nexport default function createConsumerApi(manifests, exposureMap) {\n const api = {};\n\n Object.keys(exposureMap).forEach(key => {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n\n Object.defineProperty(api, '@manifest', createReadOnlyValue(\n createManifestFunction(manifests)\n ));\n\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n Object.defineProperty(window['@Neos:HostPluginAPI'], 'VERSION', createReadOnlyValue(version));\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/createConsumerApi.js","module.exports = {\"name\":\"@neos-project/neos-ui-extensibility\",\"version\":\"1.4.1\",\"description\":\"Extensibility mechanisms for the Neos CMS UI\",\"main\":\"./src/index.js\",\"scripts\":{\"prebuild\":\"check-dependencies && yarn clean\",\"test\":\"yarn jest -- -w 2 --coverage\",\"test:watch\":\"yarn jest -- --watch\",\"build\":\"exit 0\",\"build:watch\":\"exit 0\",\"clean\":\"rimraf ./lib ./dist\",\"lint\":\"eslint src\",\"jest\":\"NODE_ENV=test jest\"},\"devDependencies\":{\"@neos-project/babel-preset-neos-ui\":\"1.4.1\",\"@neos-project/jest-preset-neos-ui\":\"1.4.1\"},\"dependencies\":{\"@neos-project/build-essentials\":\"1.4.1\",\"@neos-project/positional-array-sorter\":\"1.4.1\",\"babel-core\":\"^6.13.2\",\"babel-eslint\":\"^7.1.1\",\"babel-loader\":\"^7.1.2\",\"babel-plugin-transform-decorators-legacy\":\"^1.3.4\",\"babel-plugin-transform-object-rest-spread\":\"^6.20.1\",\"babel-plugin-webpack-alias\":\"^2.1.1\",\"babel-preset-es2015\":\"^6.13.2\",\"babel-preset-react\":\"^6.3.13\",\"babel-preset-stage-0\":\"^6.3.13\",\"chalk\":\"^1.1.3\",\"css-loader\":\"^0.28.4\",\"file-loader\":\"^1.1.5\",\"json-loader\":\"^0.5.4\",\"postcss-loader\":\"^2.0.10\",\"react-dev-utils\":\"^0.5.0\",\"style-loader\":\"^0.21.0\"},\"bin\":{\"neos-react-scripts\":\"./bin/neos-react-scripts.js\"},\"jest\":{\"preset\":\"@neos-project/jest-preset-neos-ui\"}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@neos-project/neos-ui-extensibility/package.json\n// module id = 6\n// module chunks = 0","export default manifests => {\n return function (identifier, options, bootstrap) {\n manifests.push({\n [identifier]: {\n options,\n bootstrap\n }\n });\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/manifest.js","import { connect } from \"react-redux\";\nimport { SelectBox } from \"@neos-project/react-ui-components\";\nimport React, { PureComponent } from \"react\";\nimport { neos } from \"@neos-project/neos-ui-decorators\";\nimport { $transform } from \"plow-js\";\nimport { selectors } from \"@neos-project/neos-ui-redux-store\";\n\nexport const parentNodeContextPath = contextPath => {\n if (typeof contextPath !== \"string\") {\n console.error(\"`contextPath` must be a string!\"); // tslint:disable-line\n return null;\n }\n const [path, context] = contextPath.split(\"@\");\n\n if (path.length === 0) {\n // We are at top level; so there is no parent anymore!\n return null;\n }\n\n return `${path.substr(0, path.lastIndexOf(\"/\"))}@${context}`;\n};\n\n@connect(\n $transform({\n nodesByContextPath: selectors.CR.Nodes.nodesByContextPathSelector,\n focusedNode: selectors.CR.Nodes.focusedSelector\n })\n)\n@neos(globalRegistry => ({\n i18nRegistry: globalRegistry.get(\"i18n\"),\n nodeTypeRegistry: globalRegistry.get(\n \"@neos-project/neos-ui-contentrepository\"\n )\n}))\nexport default class PlaceholderInsertDropdown extends PureComponent {\n handleOnSelect = value => {\n this.props.executeCommand(\"placeholderInsert\", value);\n };\n\n render() {\n const [formPath, workspace] = parentNodeContextPath(\n parentNodeContextPath(this.props.focusedNode.contextPath)\n ).split(\"@\");\n\n const elementsPath = `${formPath}/elements@${workspace}`;\n\n const elementsNode = this.props.nodesByContextPath[elementsPath];\n if (!elementsNode) {\n return null;\n }\n const options = elementsNode.children\n .map(node => this.props.nodesByContextPath[node.contextPath])\n .map(node => ({\n value: node.properties.identifier || node.identifier,\n label:\n node.properties.label || node.properties.identifier || node.identifier\n }));\n\n if (options.length === 0) {\n return null;\n }\n\n const placeholderLabel = this.props.i18nRegistry.translate(\n \"Neos.Form.Builder:Main:placeholder\",\n \"Insert placeholder\"\n );\n\n return (\n \n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/PlaceholderInsertDropdown.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiDecorators;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","import { ModelText, Command, Plugin } from \"ckeditor5-exports\";\n\nclass PlaceholderInsertCommand extends Command {\n execute(value) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const placeholder = new ModelText(\"{\" + value + \"}\");\n model.insertContent(placeholder, selection);\n }\n}\n\nexport default class PlaceholderInsertPlugin extends Plugin {\n static get pluginName() {\n return \"PlaceholderInsert\";\n }\n init() {\n const editor = this.editor;\n\n editor.commands.add(\n \"placeholderInsert\",\n new PlaceholderInsertCommand(this.editor)\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/placeholderInsertPlugin.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/PlaceholderInsertDropdown.js","webpack:///./src/index.js","webpack:///./src/manifest.js","webpack:///./src/placeholderInsertPlugin.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","NeosUiDecorators","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","reactRedux","React","positionalArraySorter","subject","idKey","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","beforeWeights","beforeWeights_1","i","afterWeights","afterWeights_1","_b","_c","_d","_e","_f","_g","_h","_j","_k","_l","_m","_o","sortedKeys","concat","parentNodeContextPath","contextPath","split","path","context","substr","lastIndexOf","PlaceholderInsertDropdown","nodesByContextPath","selectors","CR","Nodes","nodesByContextPathSelector","focusedNode","focusedSelector","i18nRegistry","globalRegistry","nodeTypeRegistry","handleOnSelect","props","executeCommand","formPath","workspace","elementsPath","elementsNode","getOptionsRecursively","children","placeholderLabel","translate","elements","returnValues","excludeSettings","inlineEditorOptions","excludeNodeTypes","childNode","currentNode","childChildNodes","skipMode","hasOwnProperty","nodeType","nodeTypeSettings","exclude","excludeChildren","properties","label","childOptions","Array","isArray","childOption","PureComponent","addPlugin","Plugin","isEnabled","ckEditorConfiguration","editorOptions","plugins","richtextToolbar","component","isVisible","config","placeholderInsertPlugin","PlaceholderInsertCommand","model","editor","doc","document","selection","placeholder","ModelText","insertContent","Command","PlaceholderInsertPlugin","commands","add"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AACbA,QAAQC,UAAR,GAAqB,IAArB;AACA,IAAIC,UAAUC,mBAAOA,CAAC,gDAAR,CAAd;AACA,IAAIC,aAAaF,QAAQG,eAAR,CAAwBF,mBAAOA,CAAC,uFAAR,CAAxB,CAAjB;AACA,IAAIG,sBAAsB,SAAtBA,mBAAsB,CAAUC,KAAV,EAAiB;AAAE,WAAQ;AACjDA,eAAOA,KAD0C;AAEjDC,kBAAU,KAFuC;AAGjDC,oBAAY,KAHqC;AAIjDC,sBAAc;AAJmC,KAAR;AAKxC,CALL;AAMA,SAASC,iBAAT,CAA2BC,SAA3B,EAAsCC,WAAtC,EAAmD;AAC/C,QAAIC,MAAM,EAAV;AACAC,WAAOC,IAAP,CAAYH,WAAZ,EAAyBI,OAAzB,CAAiC,UAAUC,GAAV,EAAe;AAC5CH,eAAOI,cAAP,CAAsBL,GAAtB,EAA2BI,GAA3B,EAAgCZ,oBAAoBO,YAAYK,GAAZ,CAApB,CAAhC;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kBAAK,8BAAL,CAAnC,CAFF;AAID,CAdD,E;;;;;;;;;;;;;;;;;;;;;ACbA;;;;;;;;IAEMC,wB;;;;;;;;;;;4BACIpM,K,EAAO;AACb,UAAMqM,QAAQ,KAAKC,MAAL,CAAYD,KAA1B;AACA,UAAME,MAAMF,MAAMG,QAAlB;AACA,UAAMC,YAAYF,IAAIE,SAAtB;AACA,UAAMC,cAAc,IAAIC,2BAAJ,CAAc,MAAM3M,KAAN,GAAc,GAA5B,CAApB;AACAqM,YAAMO,aAAN,CAAoBF,WAApB,EAAiCD,SAAjC;AACD;;;;EAPoCI,yB;;IAUlBC,uB;;;;;;;;;;;2BAIZ;AACL,UAAMR,SAAS,KAAKA,MAApB;;AAEAA,aAAOS,QAAP,CAAgBC,GAAhB,CACE,mBADF,EAEE,IAAIZ,wBAAJ,CAA6B,KAAKE,MAAlC,CAFF;AAID;;;wBAVuB;AACtB,aAAO,mBAAP;AACD;;;;EAHkDZ,wB;;kBAAhCoB,uB","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nfunction readFromConsumerApi(key) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _a;\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, args);\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiDecorators;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar positionalArraySorter = function (subject, position, idKey) {\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n for (var _i = 0, beforeWeights_1 = beforeWeights; _i < beforeWeights_1.length; _i++) {\n var i = beforeWeights_1[_i];\n addToResults(beforeKeys[key][i], result);\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n for (var _a = 0, afterWeights_1 = afterWeights; _a < afterWeights_1.length; _a++) {\n var i = afterWeights_1[_a];\n addToResults(afterKeys[key][i], result);\n }\n }\n });\n };\n for (var _i = 0, _a = sortedWeights(startKeys, false); _i < _a.length; _i++) {\n var i = _a[_i];\n addToResults(startKeys[i], resultStart);\n }\n for (var _b = 0, _c = sortedWeights(middleKeys, true); _b < _c.length; _b++) {\n var i = _c[_b];\n addToResults(middleKeys[i], resultMiddle);\n }\n for (var _d = 0, _e = sortedWeights(endKeys, true); _d < _e.length; _d++) {\n var i = _e[_d];\n addToResults(endKeys[i], resultEnd);\n }\n for (var _f = 0, _g = Object.keys(beforeKeys); _f < _g.length; _f++) {\n var key = _g[_f];\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n for (var _h = 0, _j = sortedWeights(beforeKeys[key], false); _h < _j.length; _h++) {\n var i = _j[_h];\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n for (var _k = 0, _l = Object.keys(afterKeys); _k < _l.length; _k++) {\n var key = _l[_k];\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n for (var _m = 0, _o = sortedWeights(afterKeys[key], false); _m < _o.length; _m++) {\n var i = _o[_m];\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n var sortedKeys = resultStart.concat(resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { connect } from \"react-redux\";\nimport { SelectBox } from \"@neos-project/react-ui-components\";\nimport React, { PureComponent } from \"react\";\nimport { neos } from \"@neos-project/neos-ui-decorators\";\nimport { $transform } from \"plow-js\";\nimport { selectors } from \"@neos-project/neos-ui-redux-store\";\n\nexport const parentNodeContextPath = contextPath => {\n if (typeof contextPath !== \"string\") {\n console.error(\"`contextPath` must be a string!\"); // tslint:disable-line\n return null;\n }\n const [path, context] = contextPath.split(\"@\");\n\n if (path.length === 0) {\n // We are at top level; so there is no parent anymore!\n return null;\n }\n\n return `${path.substr(0, path.lastIndexOf(\"/\"))}@${context}`;\n};\n\n@connect(\n $transform({\n nodesByContextPath: selectors.CR.Nodes.nodesByContextPathSelector,\n focusedNode: selectors.CR.Nodes.focusedSelector\n })\n)\n@neos(globalRegistry => ({\n i18nRegistry: globalRegistry.get(\"i18n\"),\n nodeTypeRegistry: globalRegistry.get(\n \"@neos-project/neos-ui-contentrepository\"\n )\n}))\nexport default class PlaceholderInsertDropdown extends PureComponent {\n handleOnSelect = value => {\n this.props.executeCommand(\"placeholderInsert\", value);\n };\n\n render() {\n const [formPath, workspace] = parentNodeContextPath(\n parentNodeContextPath(this.props.focusedNode.contextPath)\n ).split(\"@\");\n\n const elementsPath = `${formPath}/elements@${workspace}`;\n\n const elementsNode = this.props.nodesByContextPath[elementsPath];\n if (!elementsNode) {\n return null;\n }\n const options = this.getOptionsRecursively(elementsNode.children);\n\n if (options.length === 0) {\n return null;\n }\n\n const placeholderLabel = this.props.i18nRegistry.translate(\n \"Neos.Form.Builder:Main:placeholder\",\n \"Insert placeholder\"\n );\n\n return (\n \n );\n }\n\n getOptionsRecursively(elements) {\n const returnValues = [];\n const excludeSettings = this.props.inlineEditorOptions.excludeNodeTypes;\n\n elements.forEach((childNode) => {\n const currentNode = this.props.nodesByContextPath[childNode.contextPath];\n const childChildNodes = this.props.nodesByContextPath[childNode.contextPath].children;\n let skipMode = 'includeAll';\n\n if (excludeSettings) {\n if (excludeSettings.hasOwnProperty(childNode.nodeType)) {\n const nodeTypeSettings = excludeSettings[childNode.nodeType];\n\n if (typeof nodeTypeSettings === 'boolean') {\n if (nodeTypeSettings) {\n // exclude all\n return;\n }\n }\n else if (nodeTypeSettings.hasOwnProperty('exclude') || nodeTypeSettings.hasOwnProperty('excludeChildren')) {\n if (nodeTypeSettings.exclude && nodeTypeSettings.excludeChildren) {\n // exclude all\n return;\n }\n else if (nodeTypeSettings.exclude && !nodeTypeSettings.excludeChildren) {\n // exclude only current element, not children\n skipMode = 'skipChildren'\n }\n else if (!nodeTypeSettings.exclude && nodeTypeSettings.excludeChildren) {\n // exclude only children\n skipMode = 'skipParent'\n }\n }\n }\n }\n\n if (skipMode === 'includeAll' || skipMode === 'skipParent') {\n returnValues.push({\n value: currentNode.properties.identifier || currentNode.identifier,\n label:\n currentNode.properties.label || currentNode.properties.identifier || currentNode.identifier\n });\n }\n\n if (skipMode === 'includeAll' || skipMode === 'skipChildren') {\n const childOptions = this.getOptionsRecursively(childChildNodes);\n\n if (Array.isArray(childOptions)) {\n childOptions.forEach(childOption => {\n returnValues.push(childOption);\n });\n }\n }\n });\n\n return returnValues;\n }\n}\n","require(\"./manifest\");\n","import manifest from \"@neos-project/neos-ui-extensibility\";\nimport PlaceholderInsertDropdown from \"./PlaceholderInsertDropdown\";\nimport placeholderInsertPlugin from \"./placeholderInsertPlugin\";\nimport { $add, $get } from \"plow-js\";\n\nconst addPlugin = (Plugin, isEnabled) => (ckEditorConfiguration, options) => {\n if (!isEnabled || isEnabled(options.editorOptions, options)) {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n return $add(\"plugins\", Plugin, ckEditorConfiguration);\n }\n return ckEditorConfiguration;\n};\n\nmanifest(\"Neos.Form.Builder:PlaceholderInsert\", {}, globalRegistry => {\n const richtextToolbar = globalRegistry\n .get(\"ckEditor5\")\n .get(\"richtextToolbar\");\n richtextToolbar.set(\"placeholderInsertt\", {\n component: PlaceholderInsertDropdown,\n isVisible: $get(\"formatting.placeholderInsert\")\n });\n\n const config = globalRegistry.get(\"ckEditor5\").get(\"config\");\n config.set(\n \"placeholderInsert\",\n addPlugin(placeholderInsertPlugin, $get(\"formatting.placeholderInsert\"))\n );\n});\n","import { ModelText, Command, Plugin } from \"ckeditor5-exports\";\n\nclass PlaceholderInsertCommand extends Command {\n execute(value) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const placeholder = new ModelText(\"{\" + value + \"}\");\n model.insertContent(placeholder, selection);\n }\n}\n\nexport default class PlaceholderInsertPlugin extends Plugin {\n static get pluginName() {\n return \"PlaceholderInsert\";\n }\n init() {\n const editor = this.editor;\n\n editor.commands.add(\n \"placeholderInsert\",\n new PlaceholderInsertCommand(this.editor)\n );\n }\n}\n"],"sourceRoot":""} \ No newline at end of file