From 6e47f977deeac671cc4f2c17592a6178c3d16857 Mon Sep 17 00:00:00 2001 From: Dmitri Pisarev Date: Wed, 4 Oct 2017 07:14:21 +0300 Subject: [PATCH] TASK: update to new extensibillity api --- .../Private/NewsletterView/src/manifest.js | 2 +- .../JavaScript/NewsletterView/Plugin.js | 51 +------------------ .../JavaScript/NewsletterView/Plugin.js.map | 2 +- 3 files changed, 4 insertions(+), 51 deletions(-) diff --git a/Resources/Private/NewsletterView/src/manifest.js b/Resources/Private/NewsletterView/src/manifest.js index e8287da..2d2e3b4 100644 --- a/Resources/Private/NewsletterView/src/manifest.js +++ b/Resources/Private/NewsletterView/src/manifest.js @@ -4,7 +4,7 @@ import NewsletterView from './NewsletterView'; manifest('Psmb.Newsletter:NewsletterView', {}, globalRegistry => { const viewsRegistry = globalRegistry.get('inspector').get('views'); - viewsRegistry.add('Psmb.Newsletter/Views/NewsletterView', { + viewsRegistry.set('Psmb.Newsletter/Views/NewsletterView', { component: NewsletterView }); }); diff --git a/Resources/Public/JavaScript/NewsletterView/Plugin.js b/Resources/Public/JavaScript/NewsletterView/Plugin.js index 488830d..45bfb14 100644 --- a/Resources/Public/JavaScript/NewsletterView/Plugin.js +++ b/Resources/Public/JavaScript/NewsletterView/Plugin.js @@ -67,7 +67,7 @@ (0, _neosUiExtensibility2.default)('Psmb.Newsletter:NewsletterView', {}, function (globalRegistry) { var viewsRegistry = globalRegistry.get('inspector').get('views'); - viewsRegistry.add('Psmb.Newsletter/Views/NewsletterView', { + viewsRegistry.set('Psmb.Newsletter/Views/NewsletterView', { component: _NewsletterView2.default }); }); @@ -141,54 +141,7 @@ /* 4 */ /***/ (function(module, exports) { - module.exports = { - "name": "@neos-project/neos-ui-extensibility", - "version": "1.0.0-beta3", - "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-beta3", - "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" - } - } - }; + 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"}}} /***/ }), /* 5 */ diff --git a/Resources/Public/JavaScript/NewsletterView/Plugin.js.map b/Resources/Public/JavaScript/NewsletterView/Plugin.js.map index 2ce3c83..263b574 100644 --- a/Resources/Public/JavaScript/NewsletterView/Plugin.js.map +++ b/Resources/Public/JavaScript/NewsletterView/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap faef3bad65e48f643611","webpack:///./src/index.js","webpack:///./src/manifest.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/index.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/createConsumerApi.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/package.json","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/manifest.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/readFromConsumerApi.js","webpack:///./src/NewsletterView.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","webpack:////home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./src/TestConfirmationDialog.js","webpack:///./src/ConfirmationDialog.js"],"names":["require","viewsRegistry","globalRegistry","get","add","component","createConsumerApi","createReadOnlyValue","value","writable","enumerable","configurable","manifests","exposureMap","api","Object","keys","forEach","defineProperty","key","window","manifest","identifier","options","bootstrap","push","readFromConsumerApi","Error","fetchSubscriptions","fetch","nodeType","credentials","then","response","json","sendNewsletter","focusedNodeContextPath","subscription","isTest","email","sendEndpointUrl","csrfToken","document","getElementById","dataset","data","URLSearchParams","set","replace","method","body","NewsletterView","i18nRegistry","CR","Nodes","focusedNodePathSelector","state","getNodeByContextPath","nodeByContextPath","props","subscriptions","selectedSubscription","confirmationDialogIsOpen","testConfirmationDialogIsOpen","isError","isSent","selectSubscription","bind","sendTestNewsletter","toggleConfirmationDialog","toggleTestConfirmationDialog","node","setState","isOpen","console","log","status","catch","translate","marginTop","color","propTypes","string","func","isRequired","module","exports","React","ReactUiComponents","reactRedux","NeosUiReduxStore","NeosUiDecorators","plow","TestConfirmationDialog","close","send","includes","padding","bool","ConfirmationDialog"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;A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AAT;AAAA,0BADd;AAEI,gCAAO,KAAKiB,KAAL,CAAWjB;AAFtB;AAFJ;AATJ,cADJ;AAmBH;;;;6BAnCM0C,S,GAAY;AACfR,aAAQ,iBAAUyB,IADH;AAEfpB,gBAAW,iBAAUK,IAAV,CAAeC,UAFX;AAGfU,YAAO,iBAAUX,IAAV,CAAeC,UAHP;AAIfW,WAAM,iBAAUZ,IAAV,CAAeC;AAJN,E;mBAFFS,sB;;;;;;;;;;;;ACHrB;;;;AACA;;;;AAEA,KAAMM,qBAAqB,SAArBA,kBAAqB,OAAsC;AAAA,SAApC1B,MAAoC,QAApCA,MAAoC;AAAA,SAA5BK,SAA4B,QAA5BA,SAA4B;AAAA,SAAjBgB,KAAiB,QAAjBA,KAAiB;AAAA,SAAVC,IAAU,QAAVA,IAAU;;AAC7D,YACI;AAAA;AAAA;AACI,qBAAQtB,MADZ;AAEI,oBAAOK,UAAU,+CAAV,CAFX;AAGI,6BAAgBgB,KAHpB;AAII,sBAAS,CACL;AAAA;AAAA,mBAAQ,SAASA,KAAjB,EAAwB,OAAM,OAA9B;AAAuChB,2BAAU,uBAAV;AAAvC,cADK,EAEL;AAAA;AAAA,mBAAQ,SAASiB,IAAjB,EAAuB,OAAM,OAA7B;AAAsCjB,2BAAU,8BAAV;AAAtC,cAFK;AAJb;AASI;AAAA;AAAA,eAAK,OAAO,EAACmB,SAAS,MAAV,EAAZ;AAAgCnB,uBAAU,iDAAV;AAAhC;AATJ,MADJ;AAaH,EAdD;AAeAqB,oBAAmBlB,SAAnB,GAA+B;AAC3BR,aAAQ,iBAAUyB,IADS;AAE3BpB,gBAAW,iBAAUK,IAAV,CAAeC,UAFC;AAG3BU,YAAO,iBAAUX,IAAV,CAAeC,UAHK;AAI3BW,WAAM,iBAAUZ,IAAV,CAAeC;AAJM,EAA/B;;mBAOee,kB","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 faef3bad65e48f643611","require('./manifest');\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import manifest from '@neos-project/neos-ui-extensibility';\nimport NewsletterView from './NewsletterView';\n\nmanifest('Psmb.Newsletter:NewsletterView', {}, globalRegistry => {\n const viewsRegistry = globalRegistry.get('inspector').get('views');\n\n viewsRegistry.add('Psmb.Newsletter/Views/NewsletterView', {\n component: NewsletterView\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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/createConsumerApi.js","module.exports = {\n\t\"name\": \"@neos-project/neos-ui-extensibility\",\n\t\"version\": \"1.0.0-beta3\",\n\t\"description\": \"Extensibility mechanisms for the Neos CMS UI\",\n\t\"main\": \"./src/index.js\",\n\t\"scripts\": {\n\t\t\"prebuild\": \"check-dependencies && yarn clean\",\n\t\t\"test\": \"yarn jest\",\n\t\t\"test:watch\": \"yarn jest -- --watch\",\n\t\t\"build\": \"exit 0\",\n\t\t\"build:watch\": \"exit 0\",\n\t\t\"clean\": \"rimraf ./lib ./dist\",\n\t\t\"lint\": \"eslint src\",\n\t\t\"jest\": \"PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage\"\n\t},\n\t\"dependencies\": {\n\t\t\"@neos-project/build-essentials\": \"1.0.0-beta3\",\n\t\t\"babel-core\": \"^6.13.2\",\n\t\t\"babel-eslint\": \"^7.1.1\",\n\t\t\"babel-loader\": \"^6.2.4\",\n\t\t\"babel-plugin-transform-decorators-legacy\": \"^1.3.4\",\n\t\t\"babel-plugin-transform-object-rest-spread\": \"^6.20.1\",\n\t\t\"babel-plugin-webpack-alias\": \"^2.1.1\",\n\t\t\"babel-preset-es2015\": \"^6.13.2\",\n\t\t\"babel-preset-react\": \"^6.3.13\",\n\t\t\"babel-preset-stage-0\": \"^6.3.13\",\n\t\t\"chalk\": \"^1.1.3\",\n\t\t\"css-loader\": \"^0.26.0\",\n\t\t\"file-loader\": \"^0.10.0\",\n\t\t\"json-loader\": \"^0.5.4\",\n\t\t\"postcss-loader\": \"^1.0.0\",\n\t\t\"react-dev-utils\": \"^0.5.0\",\n\t\t\"style-loader\": \"^0.13.1\"\n\t},\n\t\"bin\": {\n\t\t\"neos-react-scripts\": \"./bin/neos-react-scripts.js\"\n\t},\n\t\"jest\": {\n\t\t\"transformIgnorePatterns\": [],\n\t\t\"setupFiles\": [\n\t\t\t\"./node_modules/@neos-project/build-essentials/src/setup-browser-env.js\"\n\t\t],\n\t\t\"transform\": {\n\t\t\t\"neos-ui-extensibility/src/.+\\\\.jsx?$\": \"./node_modules/.bin/babel-jest\",\n\t\t\t\"node_modules/@neos-project/.+\\\\.jsx?$\": \"./node_modules/.bin/babel-jest\"\n\t\t}\n\t}\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/readFromConsumerApi.js","import React, {PropTypes, Component} from 'react';\nimport {SelectBox, Button} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport {neos} from '@neos-project/neos-ui-decorators';\nimport {$get} from 'plow-js';\nimport TestConfirmationDialog from './TestConfirmationDialog';\nimport ConfirmationDialog from './ConfirmationDialog';\n\nconst fetchSubscriptions = nodeType => fetch(`/newsletter/getSubscriptions?nodeType=${nodeType}`, {\n credentials: 'include'\n}).then(response => response.json());\n\nconst sendNewsletter = (focusedNodeContextPath, subscription, isTest, email) => {\n const sendEndpointUrl = isTest ? '/newsletter/testSend' : '/newsletter/send';\n const csrfToken = document.getElementById('appContainer').dataset.csrfToken;\n const data = new URLSearchParams();\n data.set('node', focusedNodeContextPath.replace(/user-.+\\;/, 'live;'));\n data.set('subscription', subscription);\n data.set('__csrfToken', csrfToken);\n if (isTest && email) {\n data.set('email', email);\n }\n return fetch(sendEndpointUrl, {\n credentials: 'include',\n method: 'POST',\n body: data\n })\n .then(response => response.json());\n};\n\n@neos(globalRegistry => ({\n i18nRegistry: globalRegistry.get('i18n')\n}))\n@connect(state => ({\n focusedNodeContextPath: selectors.CR.Nodes.focusedNodePathSelector(state),\n getNodeByContextPath: selectors.CR.Nodes.nodeByContextPath(state)\n}))\nexport default class NewsletterView extends Component {\n\n static propTypes = {\n focusedNodeContextPath: PropTypes.string,\n getNodeByContextPath: PropTypes.func.isRequired\n };\n\n constructor(props) {\n super(props);\n this.state = {\n subscriptions: [],\n selectedSubscription: null,\n confirmationDialogIsOpen: false,\n testConfirmationDialogIsOpen: false,\n isError: null,\n isSent: null\n };\n this.selectSubscription = this.selectSubscription.bind(this);\n this.sendNewsletter = this.sendNewsletter.bind(this);\n this.sendTestNewsletter = this.sendTestNewsletter.bind(this);\n this.toggleConfirmationDialog = this.toggleConfirmationDialog.bind(this);\n this.toggleTestConfirmationDialog = this.toggleTestConfirmationDialog.bind(this);\n }\n\n componentDidMount() {\n const node = this.props.getNodeByContextPath(this.props.focusedNodeContextPath);\n const nodeType = $get('nodeType', node);\n if (nodeType) {\n fetchSubscriptions(nodeType).then(json => this.setState({subscriptions: json}));\n }\n }\n\n toggleConfirmationDialog(isOpen) {\n this.setState({confirmationDialogIsOpen: isOpen})\n }\n\n toggleTestConfirmationDialog(isOpen) {\n this.setState({testConfirmationDialogIsOpen: isOpen})\n }\n\n selectSubscription(value) {\n this.setState({selectedSubscription: value});\n }\n\n sendNewsletter() {\n const isTest = false;\n sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest)\n .then(json => {\n console.log('asdf', json);\n return json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true});\n })\n .catch(() => this.setState({isError: true}));\n this.toggleConfirmationDialog(false);\n }\n\n sendTestNewsletter(email) {\n const isTest = true;\n sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest, email)\n .then(json => {\n console.log('asdf1', json);\n return json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true})\n })\n .catch(() => this.setState({isError: true}));\n this.toggleTestConfirmationDialog(false);\n }\n\n render() {\n return (\n
\n \n \n \n\n {this.state.isError ?
{this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.error')}
: ''}\n {this.state.isSent ?
{this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.sent')}
: ''}\n\n this.toggleTestConfirmationDialog(false)}\n send={this.sendTestNewsletter}\n />\n this.toggleConfirmationDialog(false)}\n send={this.sendNewsletter}\n />\n
\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/NewsletterView.js","import readFromConsumerApi from '../../../readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n\n\n\n// WEBPACK FOOTER //\n// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/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// /home/dimaip/docker/sfi.ru/data/releases/current/Packages/Application/Neos.Neos.Ui/packages/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","import React, {PropTypes, Component} from 'react';\nimport {SelectBox, Button, Dialog, TextInput} from '@neos-project/react-ui-components';\n\nexport default class TestConfirmationDialog extends Component {\n\n static propTypes = {\n isOpen: PropTypes.bool,\n translate: PropTypes.func.isRequired,\n close: PropTypes.func.isRequired,\n send: PropTypes.func.isRequired\n };\n\n constructor(props) {\n super(props);\n this.state = {\n email: ''\n };\n }\n\n render() {\n const {isOpen, translate, close, send} = this.props;\n return (\n {translate('Neos.Neos:Main:cancel')},\n \n ]}\n >\n
\n {translate('Psmb.Newsletter:Main:js.testEmailLabel')}\n this.setState({email})}\n value={this.state.email}\n />\n
\n \n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/TestConfirmationDialog.js","import React, {PropTypes} from 'react';\nimport {Button, Dialog} from '@neos-project/react-ui-components';\n\nconst ConfirmationDialog = ({isOpen, translate, close, send}) => {\n return (\n {translate('Neos.Neos:Main:cancel')},\n \n ]}\n >\n
{translate('Psmb.Newsletter:Main:js.confirmationDescription')}
\n \n );\n};\nConfirmationDialog.propTypes = {\n isOpen: PropTypes.bool,\n translate: PropTypes.func.isRequired,\n close: PropTypes.func.isRequired,\n send: PropTypes.func.isRequired\n};\n\nexport default ConfirmationDialog;\n\n\n\n// WEBPACK FOOTER //\n// ./src/ConfirmationDialog.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap d584fb36068ac58a7c0d","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/NewsletterView.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:///./src/TestConfirmationDialog.js","webpack:///./src/ConfirmationDialog.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","fetchSubscriptions","fetch","nodeType","credentials","then","response","json","sendNewsletter","focusedNodeContextPath","subscription","isTest","email","sendEndpointUrl","csrfToken","document","getElementById","dataset","data","URLSearchParams","replace","method","body","NewsletterView","i18nRegistry","CR","Nodes","focusedNodePathSelector","state","getNodeByContextPath","nodeByContextPath","props","subscriptions","selectedSubscription","confirmationDialogIsOpen","testConfirmationDialogIsOpen","isError","isSent","selectSubscription","bind","sendTestNewsletter","toggleConfirmationDialog","toggleTestConfirmationDialog","node","setState","isOpen","console","log","status","catch","translate","marginTop","color","propTypes","string","func","isRequired","module","exports","React","ReactUiComponents","reactRedux","NeosUiReduxStore","NeosUiDecorators","plow","TestConfirmationDialog","close","send","includes","padding","bool","ConfirmationDialog"],"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,gCAAT,EAA2C,EAA3C,EAA+C,0BAAkB;AAC7D,SAAMC,gBAAgBC,eAAeC,GAAf,CAAmB,WAAnB,EAAgCA,GAAhC,CAAoC,OAApC,CAAtB;;AAEAF,mBAAcG,GAAd,CAAkB,sCAAlB,EAA0D;AACtDC;AADsD,MAA1D;AAGH,EAND,E;;;;;;;;;;;;;ACHA;;;;AACA;;;;;;mBAEe,mCAAoB,UAApB,C;SAGXC,iB;;;;;;;;;;;mBCIoBA,iB;;AAVxB;;AACA;;;;;;AAEA,KAAMC,sBAAsB,SAAtBA,mBAAsB;AAAA,YAAU;AAClCC,qBADkC;AAElCC,mBAAU,KAFwB;AAGlCC,qBAAY,KAHsB;AAIlCC,uBAAc;AAJoB,MAAV;AAAA,EAA5B;;AAOe,UAASL,iBAAT,CAA2BM,SAA3B,EAAsCC,WAAtC,EAAmD;AAC9D,SAAMC,MAAM,EAAZ;;AAEAC,YAAOC,IAAP,CAAYH,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V,EAAZ;AAAgCnB,uBAAU,iDAAV;AAAhC;AATJ,MADJ;AAaH,EAdD;AAeAqB,oBAAmBlB,SAAnB,GAA+B;AAC3BR,aAAQ,iBAAUyB,IADS;AAE3BpB,gBAAW,iBAAUK,IAAV,CAAeC,UAFC;AAG3BU,YAAO,iBAAUX,IAAV,CAAeC,UAHK;AAI3BW,WAAM,iBAAUZ,IAAV,CAAeC;AAJM,EAA/B;;mBAOee,kB","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 d584fb36068ac58a7c0d","require('./manifest');\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import manifest from '@neos-project/neos-ui-extensibility';\nimport NewsletterView from './NewsletterView';\n\nmanifest('Psmb.Newsletter:NewsletterView', {}, globalRegistry => {\n const viewsRegistry = globalRegistry.get('inspector').get('views');\n\n viewsRegistry.set('Psmb.Newsletter/Views/NewsletterView', {\n component: NewsletterView\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, {PropTypes, Component} from 'react';\nimport {SelectBox, Button} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport {neos} from '@neos-project/neos-ui-decorators';\nimport {$get} from 'plow-js';\nimport TestConfirmationDialog from './TestConfirmationDialog';\nimport ConfirmationDialog from './ConfirmationDialog';\n\nconst fetchSubscriptions = nodeType => fetch(`/newsletter/getSubscriptions?nodeType=${nodeType}`, {\n credentials: 'include'\n}).then(response => response.json());\n\nconst sendNewsletter = (focusedNodeContextPath, subscription, isTest, email) => {\n const sendEndpointUrl = isTest ? '/newsletter/testSend' : '/newsletter/send';\n const csrfToken = document.getElementById('appContainer').dataset.csrfToken;\n const data = new URLSearchParams();\n data.set('node', focusedNodeContextPath.replace(/user-.+\\;/, 'live;'));\n data.set('subscription', subscription);\n data.set('__csrfToken', csrfToken);\n if (isTest && email) {\n data.set('email', email);\n }\n return fetch(sendEndpointUrl, {\n credentials: 'include',\n method: 'POST',\n body: data\n })\n .then(response => response.json());\n};\n\n@neos(globalRegistry => ({\n i18nRegistry: globalRegistry.get('i18n')\n}))\n@connect(state => ({\n focusedNodeContextPath: selectors.CR.Nodes.focusedNodePathSelector(state),\n getNodeByContextPath: selectors.CR.Nodes.nodeByContextPath(state)\n}))\nexport default class NewsletterView extends Component {\n\n static propTypes = {\n focusedNodeContextPath: PropTypes.string,\n getNodeByContextPath: PropTypes.func.isRequired\n };\n\n constructor(props) {\n super(props);\n this.state = {\n subscriptions: [],\n selectedSubscription: null,\n confirmationDialogIsOpen: false,\n testConfirmationDialogIsOpen: false,\n isError: null,\n isSent: null\n };\n this.selectSubscription = this.selectSubscription.bind(this);\n this.sendNewsletter = this.sendNewsletter.bind(this);\n this.sendTestNewsletter = this.sendTestNewsletter.bind(this);\n this.toggleConfirmationDialog = this.toggleConfirmationDialog.bind(this);\n this.toggleTestConfirmationDialog = this.toggleTestConfirmationDialog.bind(this);\n }\n\n componentDidMount() {\n const node = this.props.getNodeByContextPath(this.props.focusedNodeContextPath);\n const nodeType = $get('nodeType', node);\n if (nodeType) {\n fetchSubscriptions(nodeType).then(json => this.setState({subscriptions: json}));\n }\n }\n\n toggleConfirmationDialog(isOpen) {\n this.setState({confirmationDialogIsOpen: isOpen})\n }\n\n toggleTestConfirmationDialog(isOpen) {\n this.setState({testConfirmationDialogIsOpen: isOpen})\n }\n\n selectSubscription(value) {\n this.setState({selectedSubscription: value});\n }\n\n sendNewsletter() {\n const isTest = false;\n sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest)\n .then(json => {\n console.log('asdf', json);\n return json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true});\n })\n .catch(() => this.setState({isError: true}));\n this.toggleConfirmationDialog(false);\n }\n\n sendTestNewsletter(email) {\n const isTest = true;\n sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest, email)\n .then(json => {\n console.log('asdf1', json);\n return json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true})\n })\n .catch(() => this.setState({isError: true}));\n this.toggleTestConfirmationDialog(false);\n }\n\n render() {\n return (\n
\n \n \n \n\n {this.state.isError ?
{this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.error')}
: ''}\n {this.state.isSent ?
{this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.sent')}
: ''}\n\n this.toggleTestConfirmationDialog(false)}\n send={this.sendTestNewsletter}\n />\n this.toggleConfirmationDialog(false)}\n send={this.sendNewsletter}\n />\n
\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/NewsletterView.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 React, {PropTypes, Component} from 'react';\nimport {SelectBox, Button, Dialog, TextInput} from '@neos-project/react-ui-components';\n\nexport default class TestConfirmationDialog extends Component {\n\n static propTypes = {\n isOpen: PropTypes.bool,\n translate: PropTypes.func.isRequired,\n close: PropTypes.func.isRequired,\n send: PropTypes.func.isRequired\n };\n\n constructor(props) {\n super(props);\n this.state = {\n email: ''\n };\n }\n\n render() {\n const {isOpen, translate, close, send} = this.props;\n return (\n {translate('Neos.Neos:Main:cancel')},\n \n ]}\n >\n
\n {translate('Psmb.Newsletter:Main:js.testEmailLabel')}\n this.setState({email})}\n value={this.state.email}\n />\n
\n \n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/TestConfirmationDialog.js","import React, {PropTypes} from 'react';\nimport {Button, Dialog} from '@neos-project/react-ui-components';\n\nconst ConfirmationDialog = ({isOpen, translate, close, send}) => {\n return (\n {translate('Neos.Neos:Main:cancel')},\n \n ]}\n >\n
{translate('Psmb.Newsletter:Main:js.confirmationDescription')}
\n \n );\n};\nConfirmationDialog.propTypes = {\n isOpen: PropTypes.bool,\n translate: PropTypes.func.isRequired,\n close: PropTypes.func.isRequired,\n send: PropTypes.func.isRequired\n};\n\nexport default ConfirmationDialog;\n\n\n\n// WEBPACK FOOTER //\n// ./src/ConfirmationDialog.js"],"sourceRoot":""} \ No newline at end of file