diff --git a/Resources/Private/NewsletterView/src/ConfirmationDialog.js b/Resources/Private/NewsletterView/src/ConfirmationDialog.js
new file mode 100644
index 0000000..27e65da
--- /dev/null
+++ b/Resources/Private/NewsletterView/src/ConfirmationDialog.js
@@ -0,0 +1,26 @@
+import React, {PropTypes} from 'react';
+import {Button, Dialog} from '@neos-project/react-ui-components';
+
+const ConfirmationDialog = ({isOpen, translate, close, send}) => {
+ return (
+
+ );
+};
+ConfirmationDialog.propTypes = {
+ isOpen: PropTypes.bool,
+ translate: PropTypes.func.isRequired,
+ close: PropTypes.func.isRequired,
+ send: PropTypes.func.isRequired
+};
+
+export default ConfirmationDialog;
diff --git a/Resources/Private/NewsletterView/src/NewsletterView.js b/Resources/Private/NewsletterView/src/NewsletterView.js
index 28065f2..32f0bd0 100644
--- a/Resources/Private/NewsletterView/src/NewsletterView.js
+++ b/Resources/Private/NewsletterView/src/NewsletterView.js
@@ -1,26 +1,27 @@
import React, {PropTypes, Component} from 'react';
-import {SelectBox, Button, Dialog, TextInput} from '@neos-project/react-ui-components';
+import {SelectBox, Button} from '@neos-project/react-ui-components';
import {connect} from 'react-redux';
import {selectors} from '@neos-project/neos-ui-redux-store';
import {neos} from '@neos-project/neos-ui-decorators';
import {$get} from 'plow-js';
import TestConfirmationDialog from './TestConfirmationDialog';
+import ConfirmationDialog from './ConfirmationDialog';
const fetchSubscriptions = nodeType => fetch(`/newsletter/getSubscriptions?nodeType=${nodeType}`, {
credentials: 'include'
}).then(response => response.json());
-const sendNewsletter = (isTest, email) => {
+const sendNewsletter = (focusedNodeContextPath, subscription, isTest, email) => {
const sendEndpointUrl = isTest ? '/newsletter/testSend' : '/newsletter/send';
const csrfToken = document.getElementById('appContainer').dataset.csrfToken;
const data = new URLSearchParams();
- data.set('node', this.props.focusedNodeContextPath.replace(/user-.+\;/, 'live;'));
- data.set('subscription', this.state.selectedSubscription);
+ data.set('node', focusedNodeContextPath.replace(/user-.+\;/, 'live;'));
+ data.set('subscription', subscription);
data.set('__csrfToken', csrfToken);
if (isTest && email) {
data.set('email', email);
}
- fetch(sendEndpointUrl, {
+ return fetch(sendEndpointUrl, {
credentials: 'include',
method: 'POST',
body: data
@@ -48,11 +49,14 @@ export default class NewsletterView extends Component {
subscriptions: [],
selectedSubscription: null,
confirmationDialogIsOpen: false,
+ testConfirmationDialogIsOpen: false,
isError: null,
isSent: null
};
this.selectSubscription = this.selectSubscription.bind(this);
+ this.sendNewsletter = this.sendNewsletter.bind(this);
this.sendTestNewsletter = this.sendTestNewsletter.bind(this);
+ this.toggleConfirmationDialog = this.toggleConfirmationDialog.bind(this);
this.toggleTestConfirmationDialog = this.toggleTestConfirmationDialog.bind(this);
}
@@ -64,17 +68,37 @@ export default class NewsletterView extends Component {
}
}
- toggleTestConfirmationDialog(isOpen) {
+ toggleConfirmationDialog(isOpen) {
this.setState({confirmationDialogIsOpen: isOpen})
}
+ toggleTestConfirmationDialog(isOpen) {
+ this.setState({testConfirmationDialogIsOpen: isOpen})
+ }
+
selectSubscription(value) {
this.setState({selectedSubscription: value});
}
+ sendNewsletter() {
+ const isTest = false;
+ sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest)
+ .then(json => {
+ console.log('asdf', json);
+ return json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true});
+ })
+ .catch(() => this.setState({isError: true}));
+ this.toggleConfirmationDialog(false);
+ }
+
sendTestNewsletter(email) {
const isTest = true;
- sendNewsletter(isTest, email).then(json => json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true}));
+ sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest, email)
+ .then(json => {
+ console.log('asdf1', json);
+ return json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true})
+ })
+ .catch(() => this.setState({isError: true}));
this.toggleTestConfirmationDialog(false);
}
@@ -86,15 +110,24 @@ export default class NewsletterView extends Component {
options={this.state.subscriptions}
onValueChange={this.selectSubscription}
/>
-
-
+
+
+
+ {this.state.isError ?
{this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.error')}
: ''}
+ {this.state.isSent ? {this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.sent')}
: ''}
toggleTestConfirmationDialog(false)}
+ close={() => this.toggleTestConfirmationDialog(false)}
send={this.sendTestNewsletter}
/>
+ this.toggleConfirmationDialog(false)}
+ send={this.sendNewsletter}
+ />
);
}
diff --git a/Resources/Private/NewsletterView/src/TestConfirmationDialog.js b/Resources/Private/NewsletterView/src/TestConfirmationDialog.js
index 5b7e539..fa5f5c8 100644
--- a/Resources/Private/NewsletterView/src/TestConfirmationDialog.js
+++ b/Resources/Private/NewsletterView/src/TestConfirmationDialog.js
@@ -26,14 +26,16 @@ export default class TestConfirmationDialog extends Component {
onRequestClose={close}
actions={[
,
-
+
]}
>
- {translate('Psmb.Newsletter:Main:js.testEmailLabel')}
- this.setState({email})}
- value={this.state.email}
- />
+
+ {translate('Psmb.Newsletter:Main:js.testEmailLabel')}
+ this.setState({email})}
+ value={this.state.email}
+ />
+
);
}
diff --git a/Resources/Public/JavaScript/NewsletterView/Plugin.js b/Resources/Public/JavaScript/NewsletterView/Plugin.js
index 747829e..488830d 100644
--- a/Resources/Public/JavaScript/NewsletterView/Plugin.js
+++ b/Resources/Public/JavaScript/NewsletterView/Plugin.js
@@ -262,10 +262,14 @@
var _plowJs = __webpack_require__(13);
- var _TestConfirmationDialog = __webpack_require__(15);
+ var _TestConfirmationDialog = __webpack_require__(14);
var _TestConfirmationDialog2 = _interopRequireDefault(_TestConfirmationDialog);
+ var _ConfirmationDialog = __webpack_require__(15);
+
+ var _ConfirmationDialog2 = _interopRequireDefault(_ConfirmationDialog);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -282,17 +286,17 @@
});
};
- var sendNewsletter = function sendNewsletter(isTest, email) {
+ var _sendNewsletter = function _sendNewsletter(focusedNodeContextPath, subscription, isTest, email) {
var sendEndpointUrl = isTest ? '/newsletter/testSend' : '/newsletter/send';
var csrfToken = document.getElementById('appContainer').dataset.csrfToken;
var data = new URLSearchParams();
- data.set('node', undefined.props.focusedNodeContextPath.replace(/user-.+\;/, 'live;'));
- data.set('subscription', undefined.state.selectedSubscription);
+ data.set('node', focusedNodeContextPath.replace(/user-.+\;/, 'live;'));
+ data.set('subscription', subscription);
data.set('__csrfToken', csrfToken);
if (isTest && email) {
data.set('email', email);
}
- fetch(sendEndpointUrl, {
+ return fetch(sendEndpointUrl, {
credentials: 'include',
method: 'POST',
body: data
@@ -322,11 +326,14 @@
subscriptions: [],
selectedSubscription: null,
confirmationDialogIsOpen: false,
+ testConfirmationDialogIsOpen: false,
isError: null,
isSent: null
};
_this.selectSubscription = _this.selectSubscription.bind(_this);
+ _this.sendNewsletter = _this.sendNewsletter.bind(_this);
_this.sendTestNewsletter = _this.sendTestNewsletter.bind(_this);
+ _this.toggleConfirmationDialog = _this.toggleConfirmationDialog.bind(_this);
_this.toggleTestConfirmationDialog = _this.toggleTestConfirmationDialog.bind(_this);
return _this;
}
@@ -344,31 +351,53 @@
});
}
}
+ }, {
+ key: 'toggleConfirmationDialog',
+ value: function toggleConfirmationDialog(isOpen) {
+ this.setState({ confirmationDialogIsOpen: isOpen });
+ }
}, {
key: 'toggleTestConfirmationDialog',
value: function toggleTestConfirmationDialog(isOpen) {
- this.setState({ confirmationDialogIsOpen: isOpen });
+ this.setState({ testConfirmationDialogIsOpen: isOpen });
}
}, {
key: 'selectSubscription',
value: function selectSubscription(value) {
this.setState({ selectedSubscription: value });
}
+ }, {
+ key: 'sendNewsletter',
+ value: function sendNewsletter() {
+ var _this3 = this;
+
+ var isTest = false;
+ _sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest).then(function (json) {
+ console.log('asdf', json);
+ return json.status === 'success' ? _this3.setState({ isSent: true }) : _this3.setState({ isError: true });
+ }).catch(function () {
+ return _this3.setState({ isError: true });
+ });
+ this.toggleConfirmationDialog(false);
+ }
}, {
key: 'sendTestNewsletter',
value: function sendTestNewsletter(email) {
- var _this3 = this;
+ var _this4 = this;
var isTest = true;
- sendNewsletter(isTest, email).then(function (json) {
- return json.status === 'success' ? _this3.setState({ isSent: true }) : _this3.setState({ isError: true });
+ _sendNewsletter(this.props.focusedNodeContextPath, this.state.selectedSubscription, isTest, email).then(function (json) {
+ console.log('asdf1', json);
+ return json.status === 'success' ? _this4.setState({ isSent: true }) : _this4.setState({ isError: true });
+ }).catch(function () {
+ return _this4.setState({ isError: true });
});
this.toggleTestConfirmationDialog(false);
}
}, {
key: 'render',
value: function render() {
- var _this4 = this;
+ var _this5 = this;
return _react2.default.createElement(
'div',
@@ -380,25 +409,43 @@
}),
_react2.default.createElement(
_reactUiComponents.Button,
- { style: 'brand', onClick: function onClick() {
- return _this4.toggleTestConfirmationDialog(true);
+ { disabled: !this.state.selectedSubscription, style: 'brand', onClick: function onClick() {
+ return _this5.toggleConfirmationDialog(true);
} },
this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.send')
),
_react2.default.createElement(
_reactUiComponents.Button,
- { style: 'clean', onClick: function onClick() {
- return _this4.toggleTestConfirmationDialog(true);
+ { disabled: !this.state.selectedSubscription, style: 'clean', onClick: function onClick() {
+ return _this5.toggleTestConfirmationDialog(true);
} },
this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.test')
),
+ this.state.isError ? _react2.default.createElement(
+ 'div',
+ { style: { marginTop: '16px', color: 'red' } },
+ this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.error')
+ ) : '',
+ this.state.isSent ? _react2.default.createElement(
+ 'div',
+ { style: { marginTop: '16px', color: 'green' } },
+ this.props.i18nRegistry.translate('Psmb.Newsletter:Main:js.sent')
+ ) : '',
_react2.default.createElement(_TestConfirmationDialog2.default, {
- isOpen: this.state.confirmationDialogIsOpen,
+ isOpen: this.state.testConfirmationDialogIsOpen,
translate: this.props.i18nRegistry.translate.bind(this.props.i18nRegistry),
close: function close() {
- return toggleTestConfirmationDialog(false);
+ return _this5.toggleTestConfirmationDialog(false);
},
send: this.sendTestNewsletter
+ }),
+ _react2.default.createElement(_ConfirmationDialog2.default, {
+ isOpen: this.state.confirmationDialogIsOpen,
+ translate: this.props.i18nRegistry.translate.bind(this.props.i18nRegistry),
+ close: function close() {
+ return _this5.toggleConfirmationDialog(false);
+ },
+ send: this.sendNewsletter
})
);
}
@@ -496,8 +543,7 @@
module.exports = (0, _readFromConsumerApi2.default)('vendor')().plow;
/***/ }),
-/* 14 */,
-/* 15 */
+/* 14 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -562,19 +608,23 @@
translate('Neos.Neos:Main:cancel')
), _react2.default.createElement(
_reactUiComponents.Button,
- { onClick: function onClick() {
+ { disabled: !this.state.email.includes('@'), onClick: function onClick() {
return send(_this2.state.email);
}, style: 'brand' },
translate('Psmb.Newsletter:Main:js.send')
)]
},
- translate('Psmb.Newsletter:Main:js.testEmailLabel'),
- _react2.default.createElement(_reactUiComponents.TextInput, {
- onChange: function onChange(email) {
- return _this2.setState({ email: email });
- },
- value: this.state.email
- })
+ _react2.default.createElement(
+ 'div',
+ { style: { padding: '16px' } },
+ translate('Psmb.Newsletter:Main:js.testEmailLabel'),
+ _react2.default.createElement(_reactUiComponents.TextInput, {
+ onChange: function onChange(email) {
+ return _this2.setState({ email: email });
+ },
+ value: this.state.email
+ })
+ )
);
}
}]);
@@ -588,6 +638,62 @@
}, _temp);
exports.default = TestConfirmationDialog;
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _react = __webpack_require__(8);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactUiComponents = __webpack_require__(9);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var ConfirmationDialog = function ConfirmationDialog(_ref) {
+ var isOpen = _ref.isOpen,
+ translate = _ref.translate,
+ close = _ref.close,
+ send = _ref.send;
+
+ return _react2.default.createElement(
+ _reactUiComponents.Dialog,
+ {
+ isOpen: isOpen,
+ title: translate('Psmb.Newsletter:Main:js.testConfirmationTitle'),
+ onRequestClose: close,
+ actions: [_react2.default.createElement(
+ _reactUiComponents.Button,
+ { onClick: close, style: 'clean' },
+ translate('Neos.Neos:Main:cancel')
+ ), _react2.default.createElement(
+ _reactUiComponents.Button,
+ { onClick: send, style: 'brand' },
+ translate('Psmb.Newsletter:Main:js.send')
+ )]
+ },
+ _react2.default.createElement(
+ 'div',
+ { style: { padding: '16px' } },
+ translate('Psmb.Newsletter:Main:js.confirmationDescription')
+ )
+ );
+ };
+ ConfirmationDialog.propTypes = {
+ isOpen: _react.PropTypes.bool,
+ translate: _react.PropTypes.func.isRequired,
+ close: _react.PropTypes.func.isRequired,
+ send: _react.PropTypes.func.isRequired
+ };
+
+ exports.default = ConfirmationDialog;
+
/***/ })
/******/ ]);
//# sourceMappingURL=Plugin.js.map
\ No newline at end of file
diff --git a/Resources/Public/JavaScript/NewsletterView/Plugin.js.map b/Resources/Public/JavaScript/NewsletterView/Plugin.js.map
index e93682e..2ce3c83 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 824c5c075dfb6053e1ab","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"],"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","isTest","email","sendEndpointUrl","csrfToken","document","getElementById","dataset","data","URLSearchParams","set","props","focusedNodeContextPath","replace","state","selectedSubscription","method","body","NewsletterView","i18nRegistry","CR","Nodes","focusedNodePathSelector","getNodeByContextPath","nodeByContextPath","subscriptions","confirmationDialogIsOpen","isError","isSent","selectSubscription","bind","sendTestNewsletter","toggleTestConfirmationDialog","node","setState","isOpen","status","translate","propTypes","string","func","isRequired","module","exports","React","ReactUiComponents","reactRedux","NeosUiReduxStore","NeosUiDecorators","plow","TestConfirmationDialog","close","send","bool"],"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,WAAZ,EAAyBI,OAAzB,CAAiC,eAAO;AACpCF,gBAAOG,cAAP,CAAsBJ,GAAtB,EAA2BK,GAA3B,EAAgCZ,oBAAoBM,YAAYM,GAAZ,CAApB,CAAhC;AACH,MAFD;;AAIAJ,YAAOG,cAAP,CAAsBJ,GAAtB,EAA2B,WAA3B,EAAwCP,oBACpC,wBAAuBK,SAAvB,CADoC,CAAxC;;AAIAG,YAAOG,cAAP,CAAsBE,MAAtB,EAA8B,qBAA9B,EAAqDb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AA;;AAAA,qJACTA,KADS;;AAEf,eAAKG,KAAL,GAAa;AACTZ,oBAAO;AADE,UAAb;AAFe;AAKlB;;;;kCAEQ;AAAA;;AAAA,0BACoC,KAAKS,KADzC;AAAA,iBACEwB,MADF,UACEA,MADF;AAAA,iBACUE,SADV,UACUA,SADV;AAAA,iBACqBc,KADrB,UACqBA,KADrB;AAAA,iBAC4BC,IAD5B,UAC4BA,IAD5B;;AAEL,oBACI;AAAA;AAAA;AACI,6BAAQjB,MADZ;AAEI,4BAAOE,UAAU,+CAAV,CAFX;AAGI,qCAAgBc,KAHpB;AAII,8BAAS,CACL;AAAA;AAAA,2BAAQ,SAASA,KAAjB,EAAwB,OAAM,OAA9B;AAAuCd,mCAAU,uBAAV;AAAvC,sBADK,EAEL;AAAA;AAAA,2BAAQ,SAAS;AAAA,wCAAMe,KAAK,OAAKtC,KAAL,CAAWZ,KAAhB,CAAN;AAAA,8BAAjB,EAA+C,OAAM,OAArD;AAA8DmC,mCAAU,8BAAV;AAA9D,sBAFK;AAJb;AASKA,2BAAU,wCAAV,CATL;AAUI;AACI,+BAAU;AAAA,gCAAS,OAAKH,QAAL,CAAc,EAAChC,YAAD,EAAd,CAAT;AAAA,sBADd;AAEI,4BAAO,KAAKY,KAAL,CAAWZ;AAFtB;AAVJ,cADJ;AAiBH;;;;6BAjCMoC,S,GAAY;AACfH,aAAQ,iBAAUkB,IADH;AAEfhB,gBAAW,iBAAUG,IAAV,CAAeC,UAFX;AAGfU,YAAO,iBAAUX,IAAV,CAAeC,UAHP;AAIfW,WAAM,iBAAUZ,IAAV,CAAeC;AAJN,E;mBAFFS,sB","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 824c5c075dfb6053e1ab","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, Dialog, TextInput} 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';\n\nconst fetchSubscriptions = nodeType => fetch(`/newsletter/getSubscriptions?nodeType=${nodeType}`, {\n credentials: 'include'\n}).then(response => response.json());\n\nconst sendNewsletter = (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', this.props.focusedNodeContextPath.replace(/user-.+\\;/, 'live;'));\n data.set('subscription', this.state.selectedSubscription);\n data.set('__csrfToken', csrfToken);\n if (isTest && email) {\n data.set('email', email);\n }\n 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 isError: null,\n isSent: null\n };\n this.selectSubscription = this.selectSubscription.bind(this);\n this.sendTestNewsletter = this.sendTestNewsletter.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 toggleTestConfirmationDialog(isOpen) {\n this.setState({confirmationDialogIsOpen: isOpen})\n }\n\n selectSubscription(value) {\n this.setState({selectedSubscription: value});\n }\n\n sendTestNewsletter(email) {\n const isTest = true;\n sendNewsletter(isTest, email).then(json => json.status === 'success' ? this.setState({isSent: true}) : this.setState({isError: true}));\n this.toggleTestConfirmationDialog(false);\n }\n\n render() {\n return (\n \n \n \n \n\n toggleTestConfirmationDialog(false)}\n send={this.sendTestNewsletter}\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 \n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/TestConfirmationDialog.js"],"sourceRoot":""}
\ No newline at end of file
+{"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;;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,EAA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AAeC,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 \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 \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