From 1abc4ab3b59b3a844c2f11e3b77a53e3da9056ba Mon Sep 17 00:00:00 2001 From: Dmitri Pisarev Date: Thu, 12 Oct 2017 12:54:40 +0300 Subject: [PATCH] FEATURE: PrimaryToolbar component to create nodes --- Configuration/Settings.yaml | 8 ++ .../CreateNodeView/src/CreateNodeView.js | 30 +++++--- .../Private/CreateNodeView/src/manifest.js | 6 +- .../JavaScript/CreateNodeView/Plugin.js | 75 +++++++++++-------- .../JavaScript/CreateNodeView/Plugin.js.map | 2 +- 5 files changed, 78 insertions(+), 43 deletions(-) diff --git a/Configuration/Settings.yaml b/Configuration/Settings.yaml index 539930c..ad48d4a 100644 --- a/Configuration/Settings.yaml +++ b/Configuration/Settings.yaml @@ -14,3 +14,11 @@ Neos: javascript: 'Psmb.CreateNodeButton:CreateNodeView': resource: resource://Psmb.CreateNodeButton/Public/JavaScript/CreateNodeView/Plugin.js + frontendConfiguration: + 'Psmb.CreateNodeButton': + enabled: false + # Possible values are `before`, `into` and `after` + position: 'into' + # type: 'Set.Your:DocumentNodeType' + # referenceNodePath: '/sites/site/to-set' + placeholder: 'Enter title...' diff --git a/Resources/Private/CreateNodeView/src/CreateNodeView.js b/Resources/Private/CreateNodeView/src/CreateNodeView.js index 8d08759..963cced 100644 --- a/Resources/Private/CreateNodeView/src/CreateNodeView.js +++ b/Resources/Private/CreateNodeView/src/CreateNodeView.js @@ -7,7 +7,8 @@ import {selectors, actions} from '@neos-project/neos-ui-redux-store'; import {neos} from '@neos-project/neos-ui-decorators'; @neos(globalRegistry => ({ - i18nRegistry: globalRegistry.get('i18n') + i18nRegistry: globalRegistry.get('i18n'), + options: globalRegistry.get('frontendConfiguration').get('Psmb.CreateNodeButton') })) @connect($transform({ siteNodeContextPath: $get('cr.nodes.siteNode') @@ -21,7 +22,8 @@ export default class CreateNodeView extends Component { options: PropTypes.shape({ type: PropTypes.string.isRequired, position: PropTypes.string.isRequired, - referenceNodePath: PropTypes.string.isRequired + referenceNodePath: PropTypes.string.isRequired, + placeholder: PropTypes.string.isRequired }), persistChanges: PropTypes.func.isRequired }; @@ -48,14 +50,22 @@ export default class CreateNodeView extends Component { } render() { - return ( -
- this.setState({title})} - value={this.state.title} - /> - + const placeholder = this.props.options.placeholder || ''; + return this.props.options.enabled ? ( +
+
+ this.setState({title})} + value={this.state.title} + placeholder={placeholder} + /> + +
- ); + ) : null; } } + +export const CreateNodeContainer = neos(globalRegistry => ({ + options: globalRegistry.get('frontendConfiguration').get('Psmb.CreateNodeButton') +}))(CreateNodeView); diff --git a/Resources/Private/CreateNodeView/src/manifest.js b/Resources/Private/CreateNodeView/src/manifest.js index 7316e69..1e03db3 100644 --- a/Resources/Private/CreateNodeView/src/manifest.js +++ b/Resources/Private/CreateNodeView/src/manifest.js @@ -1,9 +1,11 @@ import manifest from '@neos-project/neos-ui-extensibility'; -import CreateNodeView from './CreateNodeView'; +import CreateNodeView, {CreateNodeContainer} from './CreateNodeView'; manifest('Psmb.CreateNodeButton:CreateNodeView', {}, globalRegistry => { - const viewsRegistry = globalRegistry.get('inspector').get('views'); + const containerRegistry = globalRegistry.get('containers'); + containerRegistry.set('PrimaryToolbar/Left/CreateNode', CreateNodeContainer, 'after PrimaryToolbar/Left/EditModePanelToggler'); + const viewsRegistry = globalRegistry.get('inspector').get('views'); viewsRegistry.set('Psmb.CreateNodeButton/Views/CreateNodeView', { component: CreateNodeView }); diff --git a/Resources/Public/JavaScript/CreateNodeView/Plugin.js b/Resources/Public/JavaScript/CreateNodeView/Plugin.js index c580b4e..4dc3f01 100644 --- a/Resources/Public/JavaScript/CreateNodeView/Plugin.js +++ b/Resources/Public/JavaScript/CreateNodeView/Plugin.js @@ -65,8 +65,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } (0, _neosUiExtensibility2.default)('Psmb.CreateNodeButton:CreateNodeView', {}, function (globalRegistry) { - var viewsRegistry = globalRegistry.get('inspector').get('views'); + var containerRegistry = globalRegistry.get('containers'); + containerRegistry.set('PrimaryToolbar/Left/CreateNode', _CreateNodeView.CreateNodeContainer, 'after PrimaryToolbar/Left/EditModePanelToggler'); + var viewsRegistry = globalRegistry.get('inspector').get('views'); viewsRegistry.set('Psmb.CreateNodeButton/Views/CreateNodeView', { component: _CreateNodeView2.default }); @@ -195,7 +197,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = undefined; + exports.CreateNodeContainer = 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; }; }(); @@ -205,19 +207,19 @@ var _react2 = _interopRequireDefault(_react); - var _propTypes = __webpack_require__(14); + var _propTypes = __webpack_require__(9); var _propTypes2 = _interopRequireDefault(_propTypes); - var _plowJs = __webpack_require__(13); + var _plowJs = __webpack_require__(10); - var _reactUiComponents = __webpack_require__(9); + var _reactUiComponents = __webpack_require__(11); - var _reactRedux = __webpack_require__(10); + var _reactRedux = __webpack_require__(12); - var _neosUiReduxStore = __webpack_require__(11); + var _neosUiReduxStore = __webpack_require__(13); - var _neosUiDecorators = __webpack_require__(12); + var _neosUiDecorators = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -229,7 +231,8 @@ var CreateNodeView = (_dec = (0, _neosUiDecorators.neos)(function (globalRegistry) { return { - i18nRegistry: globalRegistry.get('i18n') + i18nRegistry: globalRegistry.get('i18n'), + options: globalRegistry.get('frontendConfiguration').get('Psmb.CreateNodeButton') }; }), _dec2 = (0, _reactRedux.connect)((0, _plowJs.$transform)({ siteNodeContextPath: (0, _plowJs.$get)('cr.nodes.siteNode') @@ -274,23 +277,29 @@ value: function render() { var _this2 = this; - return _react2.default.createElement( + var placeholder = this.props.options.placeholder || ''; + return this.props.options.enabled ? _react2.default.createElement( 'div', - { style: { display: 'flex' } }, - _react2.default.createElement(_reactUiComponents.TextInput, { - onChange: function onChange(title) { - return _this2.setState({ title: title }); - }, - value: this.state.title - }), + { style: { display: 'inline-block' } }, _react2.default.createElement( - _reactUiComponents.Button, - { style: 'brand', onClick: function onClick() { - return _this2.createNode(); - } }, - this.props.i18nRegistry.translate('Psmb.CreateNodeButton:Main:create') + 'div', + { style: { display: 'flex' } }, + _react2.default.createElement(_reactUiComponents.TextInput, { + onChange: function onChange(title) { + return _this2.setState({ title: title }); + }, + value: this.state.title, + placeholder: placeholder + }), + _react2.default.createElement( + _reactUiComponents.Button, + { style: 'lighter', onClick: function onClick() { + return _this2.createNode(); + } }, + this.props.i18nRegistry.translate('Psmb.CreateNodeButton:Main:create') + ) ) - ); + ) : null; } }]); @@ -300,11 +309,17 @@ options: _propTypes2.default.shape({ type: _propTypes2.default.string.isRequired, position: _propTypes2.default.string.isRequired, - referenceNodePath: _propTypes2.default.string.isRequired + referenceNodePath: _propTypes2.default.string.isRequired, + placeholder: _propTypes2.default.string.isRequired }), persistChanges: _propTypes2.default.func.isRequired }, _temp2)) || _class) || _class); exports.default = CreateNodeView; + var CreateNodeContainer = exports.CreateNodeContainer = (0, _neosUiDecorators.neos)(function (globalRegistry) { + return { + options: globalRegistry.get('frontendConfiguration').get('Psmb.CreateNodeButton') + }; + })(CreateNodeView); /***/ }), /* 8 */ @@ -332,7 +347,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().ReactUiComponents; + module.exports = (0, _readFromConsumerApi2.default)('vendor')().PropTypes; /***/ }), /* 10 */ @@ -346,7 +361,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - module.exports = (0, _readFromConsumerApi2.default)('vendor')().reactRedux; + module.exports = (0, _readFromConsumerApi2.default)('vendor')().plow; /***/ }), /* 11 */ @@ -360,7 +375,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiReduxStore; + module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().ReactUiComponents; /***/ }), /* 12 */ @@ -374,7 +389,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiDecorators; + module.exports = (0, _readFromConsumerApi2.default)('vendor')().reactRedux; /***/ }), /* 13 */ @@ -388,7 +403,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - module.exports = (0, _readFromConsumerApi2.default)('vendor')().plow; + module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiReduxStore; /***/ }), /* 14 */ @@ -402,7 +417,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - module.exports = (0, _readFromConsumerApi2.default)('vendor')().PropTypes; + module.exports = (0, _readFromConsumerApi2.default)('NeosProjectPackages')().NeosUiDecorators; /***/ }) /******/ ]); diff --git a/Resources/Public/JavaScript/CreateNodeView/Plugin.js.map b/Resources/Public/JavaScript/CreateNodeView/Plugin.js.map index 3394d74..48d84bf 100644 --- a/Resources/Public/JavaScript/CreateNodeView/Plugin.js.map +++ b/Resources/Public/JavaScript/CreateNodeView/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 72644983e9f9d48df5b7","webpack:///./src/index.js","webpack:///./src/manifest.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/createConsumerApi.js","webpack:///./~/@neos-project/neos-ui-extensibility/package.json","webpack:///./~/@neos-project/neos-ui-extensibility/src/manifest.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/readFromConsumerApi.js","webpack:///./src/CreateNodeView.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js"],"names":["require","viewsRegistry","globalRegistry","get","set","component","createConsumerApi","createReadOnlyValue","value","writable","enumerable","configurable","manifests","exposureMap","api","Object","keys","forEach","defineProperty","key","window","manifest","identifier","options","bootstrap","push","readFromConsumerApi","Error","CreateNodeView","i18nRegistry","siteNodeContextPath","persistChanges","Changes","state","title","createNode","data","nodeType","props","type","position","charAt","toUpperCase","slice","context","split","subject","referenceNodePath","payload","display","setState","translate","propTypes","string","isRequired","shape","func","module","exports","React","ReactUiComponents","reactRedux","NeosUiReduxStore","NeosUiDecorators","plow","PropTypes"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA,oBAAAA,CAAQ,CAAR,E;;;;;;;;ACAA;;;;AACA;;;;;;AAEA,oCAAS,sCAAT,EAAiD,EAAjD,EAAqD,0BAAkB;AACnE,SAAMC,gBAAgBC,eAAeC,GAAf,CAAmB,WAAnB,EAAgCA,GAAhC,CAAoC,OAApC,CAAtB;;AAEAF,mBAAcG,GAAd,CAAkB,4CAAlB,EAAgE;AAC5DC;AAD4D,MAAhE;AAGH,EAND,E;;;;;;;;;;;;;ACHA;;;;AAC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oB,QAApB,IAAgCO,SAAjD,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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 72644983e9f9d48df5b7","require('./manifest');\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import manifest from '@neos-project/neos-ui-extensibility';\nimport CreateNodeView from './CreateNodeView';\n\nmanifest('Psmb.CreateNodeButton:CreateNodeView', {}, globalRegistry => {\n const viewsRegistry = globalRegistry.get('inspector').get('views');\n\n viewsRegistry.set('Psmb.CreateNodeButton/Views/CreateNodeView', {\n component: CreateNodeView\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// ./~/@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// ./~/@neos-project/neos-ui-extensibility/src/createConsumerApi.js","module.exports = {\"name\":\"@neos-project/neos-ui-extensibility\",\"version\":\"1.0.0-beta4\",\"description\":\"Extensibility mechanisms for the Neos CMS UI\",\"main\":\"./src/index.js\",\"scripts\":{\"prebuild\":\"check-dependencies && yarn clean\",\"test\":\"yarn jest\",\"test:watch\":\"yarn jest -- --watch\",\"build\":\"exit 0\",\"build:watch\":\"exit 0\",\"clean\":\"rimraf ./lib ./dist\",\"lint\":\"eslint src\",\"jest\":\"PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage\"},\"dependencies\":{\"@neos-project/build-essentials\":\"1.0.0-beta4\",\"@neos-project/utils-helpers\":\"1.0.0-beta4\",\"babel-core\":\"^6.13.2\",\"babel-eslint\":\"^7.1.1\",\"babel-loader\":\"^6.2.4\",\"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.26.0\",\"file-loader\":\"^0.10.0\",\"json-loader\":\"^0.5.4\",\"postcss-loader\":\"^1.0.0\",\"react-dev-utils\":\"^0.5.0\",\"style-loader\":\"^0.13.1\"},\"bin\":{\"neos-react-scripts\":\"./bin/neos-react-scripts.js\"},\"jest\":{\"transformIgnorePatterns\":[],\"setupFiles\":[\"./node_modules/@neos-project/build-essentials/src/setup-browser-env.js\"],\"transform\":{\"neos-ui-extensibility/src/.+\\\\.jsx?$\":\"./node_modules/.bin/babel-jest\",\"node_modules/@neos-project/.+\\\\.jsx?$\":\"./node_modules/.bin/babel-jest\"}}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/@neos-project/neos-ui-extensibility/package.json\n// module id = 4\n// module chunks = 0","export default manifests => {\n return function manifest(identifier, options, bootstrap) {\n manifests.push({\n [identifier]: {\n options,\n bootstrap\n }\n });\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/manifest.js","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// ./~/@neos-project/neos-ui-extensibility/src/readFromConsumerApi.js","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {$get, $transform} from 'plow-js';\nimport {TextInput, Button} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {selectors, actions} from '@neos-project/neos-ui-redux-store';\nimport {neos} from '@neos-project/neos-ui-decorators';\n\n@neos(globalRegistry => ({\n i18nRegistry: globalRegistry.get('i18n')\n}))\n@connect($transform({\n siteNodeContextPath: $get('cr.nodes.siteNode')\n}), {\n persistChanges: actions.Changes.persistChanges\n})\nexport default class CreateNodeView extends Component {\n\n static propTypes = {\n siteNodeContextPath: PropTypes.string.isRequired,\n options: PropTypes.shape({\n type: PropTypes.string.isRequired,\n position: PropTypes.string.isRequired,\n referenceNodePath: PropTypes.string.isRequired\n }),\n persistChanges: PropTypes.func.isRequired\n };\n\n state = {\n title: ''\n };\n\n createNode = () => {\n const title = this.state.title;\n const data = {title};\n const nodeType = this.props.options.type;\n const type = 'Neos.Neos.Ui:Create' + this.props.options.position.charAt(0).toUpperCase() + this.props.options.position.slice(1);\n const context = this.props.siteNodeContextPath.split('@')[1];\n const subject = this.props.options.referenceNodePath + '@' + context;\n this.props.persistChanges([{\n type,\n subject,\n payload: {\n nodeType,\n data\n }\n }])\n }\n\n render() {\n return (\n
\n this.setState({title})}\n value={this.state.title}\n />\n \n
\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CreateNodeView.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiDecorators;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 34a19a28b9c704d38bd7","webpack:///./src/index.js","webpack:///./src/manifest.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/createConsumerApi.js","webpack:///./~/@neos-project/neos-ui-extensibility/package.json","webpack:///./~/@neos-project/neos-ui-extensibility/src/manifest.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/readFromConsumerApi.js","webpack:///./src/CreateNodeView.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js"],"names":["require","containerRegistry","globalRegistry","get","set","viewsRegistry","component","createConsumerApi","createReadOnlyValue","value","writable","enumerable","configurable","manifests","exposureMap","api","Object","keys","forEach","defineProperty","key","window","manifest","identifier","options","bootstrap","push","readFromConsumerApi","Error","CreateNodeView","i18nRegistry","siteNodeContextPath","persistChanges","Changes","state","title","createNode","data","nodeType","props","type","position","charAt","toUpperCase","slice","context","split","subject","referenceNodePath","payload","placeholder","enabled","display","setState","translate","propTypes","string","isRequired","shape","func","CreateNodeContainer","module","exports","React","PropTypes","plow","ReactUiComponents","reactRedux","NeosUiReduxStore","NeosUiDecorators"],"mappings":";AAAA;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;AANJ;AADJ,cADG,GAWH,IAXJ;AAYH;;;;8BA9CMC,S,GAAY;AACfxB,0BAAqB,oBAAUyB,MAAV,CAAiBC,UADvB;AAEfjC,cAAS,oBAAUkC,KAAV,CAAgB;AACrBlB,eAAM,oBAAUgB,MAAV,CAAiBC,UADF;AAErBhB,mBAAU,oBAAUe,MAAV,CAAiBC,UAFN;AAGrBT,4BAAmB,oBAAUQ,MAAV,CAAiBC,UAHf;AAIrBP,sBAAa,oBAAUM,MAAV,CAAiBC;AAJT,MAAhB,CAFM;AAQfzB,qBAAgB,oBAAU2B,IAAV,CAAeF;AARhB,E;mBAFF5B,c;AAmDd,KAAM+B,oDAAsB,4BAAK;AAAA,YAAmB;AACvDpC,kBAAStB,eAAeC,GAAf,CAAmB,uBAAnB,EAA4CA,GAA5C,CAAgD,uBAAhD;AAD8C,MAAnB;AAAA,EAAL,EAE/B0B,cAF+B,CAA5B,C;;;;;;;;ACpEP;;;;;;AAEAgC,QAAOC,OAAP,GAAiB,mCAAoB,QAApB,IAAgCC,KAAjD,C;;;;;;;;ACFA;;;;;;AAEAF,QAAOC,OAAP,GAAiB,mCAAoB,QAApB,IAAgCE,SAAjD,C;;;;;;;;ACFA;;;;;;AAEAH,QAAOC,OAAP,GAAiB,mCAAoB,QAApB,IAAgCG,IAAjD,C;;;;;;;;ACFA;;;;;;AAEAJ,QAAOC,OAAP,GAAiB,mCAAoB,qBAApB,IAA6CI,iBAA9D,C;;;;;;;;ACFA;;;;;;AAEAL,QAAOC,OAAP,GAAiB,mCAAoB,QAApB,IAAgCK,UAAjD,C;;;;;;;;ACFA;;;;;;AAEAN,QAAOC,OAAP,GAAiB,mCAAoB,qBAApB,IAA6CM,gBAA9D,C;;;;;;;;ACFA;;;;;;AAEAP,QAAOC,OAAP,GAAiB,mCAAoB,qBAApB,IAA6CO,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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 34a19a28b9c704d38bd7","require('./manifest');\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import manifest from '@neos-project/neos-ui-extensibility';\nimport CreateNodeView, {CreateNodeContainer} from './CreateNodeView';\n\nmanifest('Psmb.CreateNodeButton:CreateNodeView', {}, globalRegistry => {\n const containerRegistry = globalRegistry.get('containers');\n containerRegistry.set('PrimaryToolbar/Left/CreateNode', CreateNodeContainer, 'after PrimaryToolbar/Left/EditModePanelToggler');\n\n const viewsRegistry = globalRegistry.get('inspector').get('views');\n viewsRegistry.set('Psmb.CreateNodeButton/Views/CreateNodeView', {\n component: CreateNodeView\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// ./~/@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// ./~/@neos-project/neos-ui-extensibility/src/createConsumerApi.js","module.exports = {\"name\":\"@neos-project/neos-ui-extensibility\",\"version\":\"1.0.0-beta4\",\"description\":\"Extensibility mechanisms for the Neos CMS UI\",\"main\":\"./src/index.js\",\"scripts\":{\"prebuild\":\"check-dependencies && yarn clean\",\"test\":\"yarn jest\",\"test:watch\":\"yarn jest -- --watch\",\"build\":\"exit 0\",\"build:watch\":\"exit 0\",\"clean\":\"rimraf ./lib ./dist\",\"lint\":\"eslint src\",\"jest\":\"PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage\"},\"dependencies\":{\"@neos-project/build-essentials\":\"1.0.0-beta4\",\"@neos-project/utils-helpers\":\"1.0.0-beta4\",\"babel-core\":\"^6.13.2\",\"babel-eslint\":\"^7.1.1\",\"babel-loader\":\"^6.2.4\",\"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.26.0\",\"file-loader\":\"^0.10.0\",\"json-loader\":\"^0.5.4\",\"postcss-loader\":\"^1.0.0\",\"react-dev-utils\":\"^0.5.0\",\"style-loader\":\"^0.13.1\"},\"bin\":{\"neos-react-scripts\":\"./bin/neos-react-scripts.js\"},\"jest\":{\"transformIgnorePatterns\":[],\"setupFiles\":[\"./node_modules/@neos-project/build-essentials/src/setup-browser-env.js\"],\"transform\":{\"neos-ui-extensibility/src/.+\\\\.jsx?$\":\"./node_modules/.bin/babel-jest\",\"node_modules/@neos-project/.+\\\\.jsx?$\":\"./node_modules/.bin/babel-jest\"}}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/@neos-project/neos-ui-extensibility/package.json\n// module id = 4\n// module chunks = 0","export default manifests => {\n return function manifest(identifier, options, bootstrap) {\n manifests.push({\n [identifier]: {\n options,\n bootstrap\n }\n });\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/manifest.js","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// ./~/@neos-project/neos-ui-extensibility/src/readFromConsumerApi.js","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {$get, $transform} from 'plow-js';\nimport {TextInput, Button} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {selectors, actions} from '@neos-project/neos-ui-redux-store';\nimport {neos} from '@neos-project/neos-ui-decorators';\n\n@neos(globalRegistry => ({\n i18nRegistry: globalRegistry.get('i18n'),\n options: globalRegistry.get('frontendConfiguration').get('Psmb.CreateNodeButton')\n}))\n@connect($transform({\n siteNodeContextPath: $get('cr.nodes.siteNode')\n}), {\n persistChanges: actions.Changes.persistChanges\n})\nexport default class CreateNodeView extends Component {\n\n static propTypes = {\n siteNodeContextPath: PropTypes.string.isRequired,\n options: PropTypes.shape({\n type: PropTypes.string.isRequired,\n position: PropTypes.string.isRequired,\n referenceNodePath: PropTypes.string.isRequired,\n placeholder: PropTypes.string.isRequired\n }),\n persistChanges: PropTypes.func.isRequired\n };\n\n state = {\n title: ''\n };\n\n createNode = () => {\n const title = this.state.title;\n const data = {title};\n const nodeType = this.props.options.type;\n const type = 'Neos.Neos.Ui:Create' + this.props.options.position.charAt(0).toUpperCase() + this.props.options.position.slice(1);\n const context = this.props.siteNodeContextPath.split('@')[1];\n const subject = this.props.options.referenceNodePath + '@' + context;\n this.props.persistChanges([{\n type,\n subject,\n payload: {\n nodeType,\n data\n }\n }])\n }\n\n render() {\n const placeholder = this.props.options.placeholder || '';\n return this.props.options.enabled ? (\n
\n
\n this.setState({title})}\n value={this.state.title}\n placeholder={placeholder}\n />\n \n
\n
\n ) : null;\n }\n}\n\nexport const CreateNodeContainer = neos(globalRegistry => ({\n options: globalRegistry.get('frontendConfiguration').get('Psmb.CreateNodeButton')\n}))(CreateNodeView);\n\n\n\n// WEBPACK FOOTER //\n// ./src/CreateNodeView.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiDecorators;\n\n\n\n// WEBPACK FOOTER //\n// ./~/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js"],"sourceRoot":""} \ No newline at end of file