diff --git a/src/bundle/Controller/ContentOnTheFlyController.php b/src/bundle/Controller/ContentOnTheFlyController.php
new file mode 100644
index 0000000000..1a5a77f1cf
--- /dev/null
+++ b/src/bundle/Controller/ContentOnTheFlyController.php
@@ -0,0 +1,152 @@
+contentService = $contentService;
+ $this->locationService = $locationService;
+ $this->languageService = $languageService;
+ $this->contentActionDispatcher = $contentActionDispatcher;
+ }
+
+ /**
+ * @param Request $request
+ * @param string $languageCode
+ * @param ContentType $contentType
+ * @param Location $parentLocation
+ *
+ * @return ContentCreateOnTheFlyView|Response
+ *
+ * @throws ApiException\NotFoundException
+ * @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType
+ */
+ public function createContentAction(Request $request, string $languageCode, ContentType $contentType, Location $parentLocation)
+ {
+ $language = $this->languageService->loadLanguage($languageCode);
+
+ $data = (new ContentCreateMapper())->mapToFormData($contentType, [
+ 'mainLanguageCode' => $language->languageCode,
+ 'parentLocation' => $this->locationService->newLocationCreateStruct($parentLocation->id),
+ ]);
+
+ $form = $this->createForm(ContentEditType::class, $data, [
+ 'languageCode' => $language->languageCode,
+ 'mainLanguageCode' => $language->languageCode,
+ 'drafts_enabled' => true,
+ ]);
+ $form->handleRequest($request);
+
+ if ($form->isSubmitted() && $form->isValid()) {
+ $this->contentActionDispatcher->dispatchFormAction($form, $data, $form->getClickedButton()->getName());
+ if ($response = $this->contentActionDispatcher->getResponse()) {
+ return $response;
+ }
+ }
+
+ return new ContentCreateOnTheFlyView(null, [
+ 'form' => $form->createView(),
+ 'language' => $language,
+ 'contentType' => $contentType,
+ 'parentLocation' => $parentLocation,
+ ]);
+ }
+
+ /**
+ * @param Request $request
+ * @param string $languageCode
+ * @param ContentType $contentType
+ * @param Location $parentLocation
+ *
+ * @return JsonResponse
+ */
+ public function hasCreateAccessAction(Request $request, string $languageCode, ContentType $contentType, Location $parentLocation)
+ {
+ $response = new JsonResponse();
+
+ try {
+ $contentCreateStruct = $this->contentService->newContentCreateStruct($contentType, $languageCode);
+ $locationCreateStruct = $this->locationService->newLocationCreateStruct($parentLocation->id);
+
+ $permissionResolver = $this->container->get('ezpublish.api.repository')->getPermissionResolver();
+
+ if (!$permissionResolver->canUser('content', 'create', $contentCreateStruct, [$locationCreateStruct])) {
+ throw new UnauthorizedException(
+ 'content',
+ 'create',
+ [
+ 'contentTypeIdentifier' => $contentType->identifier,
+ 'parentLocationId' => $locationCreateStruct->parentLocationId,
+ 'languageCode' => $languageCode,
+ ]
+ );
+ }
+
+ if (!$permissionResolver->canUser('content', 'publish', $contentCreateStruct, [$locationCreateStruct])) {
+ throw new UnauthorizedException(
+ 'content',
+ 'publish',
+ [
+ 'contentTypeIdentifier' => $contentType->identifier,
+ 'parentLocationId' => $locationCreateStruct->parentLocationId,
+ 'languageCode' => $languageCode,
+ ]
+ );
+ }
+
+ $response->setData([
+ 'access' => true,
+ ]);
+ } catch (ApiException\UnauthorizedException $exception) {
+ $response->setData([
+ 'access' => false,
+ 'message' => $exception->getMessage(),
+ ]);
+ }
+
+ return $response;
+ }
+}
diff --git a/src/bundle/ParamConverter/ContentTypeParamConverter.php b/src/bundle/ParamConverter/ContentTypeParamConverter.php
index dc2ab8246d..0428dd4b02 100644
--- a/src/bundle/ParamConverter/ContentTypeParamConverter.php
+++ b/src/bundle/ParamConverter/ContentTypeParamConverter.php
@@ -18,6 +18,7 @@
class ContentTypeParamConverter implements ParamConverterInterface
{
const PARAMETER_CONTENT_TYPE_ID = 'contentTypeId';
+ const PARAMETER_CONTENT_TYPE_IDENTIFIER = 'contentTypeIdentifier';
/** @var ContentTypeService */
private $contentTypeService;
@@ -40,15 +41,20 @@ public function __construct(ContentTypeService $contentTypeGroupService, array $
*/
public function apply(Request $request, ParamConverter $configuration)
{
- if (!$request->get(self::PARAMETER_CONTENT_TYPE_ID)) {
+ if (!$request->get(self::PARAMETER_CONTENT_TYPE_ID) && !$request->get(self::PARAMETER_CONTENT_TYPE_IDENTIFIER)) {
return false;
}
- $id = (int)$request->get(self::PARAMETER_CONTENT_TYPE_ID);
+ if ($request->get(self::PARAMETER_CONTENT_TYPE_ID)) {
+ $id = (int)$request->get(self::PARAMETER_CONTENT_TYPE_ID);
+ $contentType = $this->contentTypeService->loadContentType($id, $this->siteAccessLanguages);
+ } elseif ($request->get(self::PARAMETER_CONTENT_TYPE_IDENTIFIER)) {
+ $identifier = $request->get(self::PARAMETER_CONTENT_TYPE_IDENTIFIER);
+ $contentType = $this->contentTypeService->loadContentTypeByIdentifier($identifier, $this->siteAccessLanguages);
+ }
- $contentType = $this->contentTypeService->loadContentType($id, $this->siteAccessLanguages);
if (!$contentType) {
- throw new NotFoundHttpException("ContentType $id not found!");
+ throw new NotFoundHttpException('ContentType ' . ($id ?? $identifier) . ' not found!');
}
$request->attributes->set($configuration->getName(), $contentType);
diff --git a/src/bundle/Resources/config/default_parameters.yml b/src/bundle/Resources/config/default_parameters.yml
index 13b7722f8f..c8b75ecf80 100644
--- a/src/bundle/Resources/config/default_parameters.yml
+++ b/src/bundle/Resources/config/default_parameters.yml
@@ -5,6 +5,9 @@ parameters:
ezsettings.admin_group.user_edit.templates.update: 'EzPlatformAdminUiBundle:content/content_edit:user_edit.html.twig'
ezsettings.admin_group.user_edit.templates.create: 'EzPlatformAdminUiBundle:content/content_edit:user_create.html.twig'
+ ezsettings.admin_group.content_on_the_fly.templates.create: 'EzPlatformAdminUiBundle:content/content_on_the_fly:content_create_on_the_fly.html.twig'
+ ezsettings.default.content_on_the_fly.templates.create: '%ezsettings.admin_group.content_on_the_fly.templates.create%'
+
ezsettings.global.system_info_view:
pjax_tab:
composer:
diff --git a/src/bundle/Resources/config/routing.yml b/src/bundle/Resources/config/routing.yml
index 98012585e6..7c498b36ab 100644
--- a/src/bundle/Resources/config/routing.yml
+++ b/src/bundle/Resources/config/routing.yml
@@ -540,7 +540,28 @@ ezplatform.user.delete:
#
# Profile
#
+
ezplatform.user_profile.change_password:
path: /user/change-password
defaults:
_controller: 'EzPlatformAdminUiBundle:UserProfile\UserPasswordChange:userPasswordChange'
+
+#
+# Content on the Fly
+#
+
+ezplatform.content_on_the_fly.create:
+ path: /content/create/onthefly/{contentTypeIdentifier}/{languageCode}/{locationId}
+ methods: ['GET', 'POST']
+ defaults:
+ _controller: 'EzPlatformAdminUiBundle:ContentOnTheFly:createContent'
+ options:
+ expose: true
+
+ezplatform.content_on_the_fly.has_access:
+ path: /content/create/onthefly/{contentTypeIdentifier}/{languageCode}/{locationId}/hasaccess
+ methods: ['GET']
+ defaults:
+ _controller: 'EzPlatformAdminUiBundle::ContentOnTheFly:hasCreateAccess'
+ options:
+ expose: true
diff --git a/src/bundle/Resources/config/services.yml b/src/bundle/Resources/config/services.yml
index 09637373fb..1936f96124 100644
--- a/src/bundle/Resources/config/services.yml
+++ b/src/bundle/Resources/config/services.yml
@@ -110,3 +110,13 @@ services:
arguments: [ '@request_stack' ]
tags:
- { name: knp_menu.voter }
+
+ EzSystems\EzPlatformAdminUi\RepositoryForms\View\ViewTemplatesListener:
+ tags:
+ - { name: kernel.event_subscriber }
+ calls:
+ - [setViewTemplate, ['EzSystems\EzPlatformAdminUi\RepositoryForms\View\ContentCreateOnTheFlyView', '$content_on_the_fly.templates.create$']]
+
+ EzSystems\EzPlatformAdminUi\RepositoryForms\Dispatcher\ContentOnTheFlyDispatcher:
+ calls:
+ - [setEventDispatcher, ["@event_dispatcher"]]
diff --git a/src/bundle/Resources/public/js/alloyeditor/dist/ezBtnBlockTextAlignCenter.js b/src/bundle/Resources/public/js/alloyeditor/dist/ezBtnBlockTextAlignCenter.js
index f7239651c0..d2066a42b8 100644
--- a/src/bundle/Resources/public/js/alloyeditor/dist/ezBtnBlockTextAlignCenter.js
+++ b/src/bundle/Resources/public/js/alloyeditor/dist/ezBtnBlockTextAlignCenter.js
@@ -1,4 +1,4 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("AlloyEditor")):"function"==typeof define&&define.amd?define(["react","AlloyEditor"],t):"object"==typeof exports?exports.ezBtnBlockTextAlignCenter=t(require("react"),require("AlloyEditor")):(e.eZ=e.eZ||{},e.eZ.ezAlloyEditor=e.eZ.ezAlloyEditor||{},e.eZ.ezAlloyEditor.ezBtnBlockTextAlignCenter=t(e.React,e.AlloyEditor))}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=24)}([function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(s===setTimeout)return setTimeout(e,0);if((s===n||!s)&&setTimeout)return s=setTimeout,setTimeout(e,0);try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function u(){v&&y&&(v=!1,y.length?d=y.concat(d):h=-1,d.length&&a())}function a(){if(!v){var e=o(u);v=!0;for(var t=d.length;t;){for(y=d,d=[];++h
' + _this3.attributes[attr].label + ': ' + _this3.state.values[attr].value + '
';\n }, '');\n }\n\n /**\n * Update values.\n *\n * @method updateValues\n * @param {Object} event\n */\n\n }, {\n key: 'updateValues',\n value: function updateValues(event) {\n var values = Object.assign({}, this.state.values);\n var value = event.target.type === 'checkbox' ? event.target.checked : event.target.value;\n\n values[event.target.dataset.attrName].value = value;\n\n this.setState({\n values: values\n });\n }\n\n /**\n * Gets the render method map.\n *\n * @method getAttributeRenderMethods\n * @return {Object} the render method map\n */\n\n }, {\n key: 'getAttributeRenderMethods',\n value: function getAttributeRenderMethods() {\n return {\n string: 'renderString',\n boolean: 'renderCheckbox',\n number: 'renderNumber',\n choice: 'renderSelect'\n };\n }\n }]);\n\n return EzBtnCustomTagUpdate;\n}(_ezWidgetbutton2.default);\n\nexports.default = EzBtnCustomTagUpdate;\n\n\nEzBtnCustomTagUpdate.defaultProps = {\n command: 'ezcustomtag',\n modifiesSelection: true\n};\n\nEzBtnCustomTagUpdate.propTypes = {\n editor: _propTypes2.default.object.isRequired,\n label: _propTypes2.default.string.isRequired,\n tabIndex: _propTypes2.default.number.isRequired\n};\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar emptyFunction = __webpack_require__(1);\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar emptyFunction = __webpack_require__(1);\nvar invariant = __webpack_require__(2);\nvar warning = __webpack_require__(6);\nvar assign = __webpack_require__(9);\n\nvar ReactPropTypesSecret = __webpack_require__(3);\nvar checkPropTypes = __webpack_require__(10);\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<${this.attributes[attr].label}: ${this.state.values[attr].value}
`,'');\n }\n\n /**\n * Update values.\n *\n * @method updateValues\n * @param {Object} event\n */\n updateValues(event) {\n const values = Object.assign({}, this.state.values);\n const value = event.target.type === 'checkbox' ? event.target.checked : event.target.value;\n\n values[event.target.dataset.attrName].value = value;\n\n this.setState({\n values: values\n });\n }\n\n /**\n * Gets the render method map.\n *\n * @method getAttributeRenderMethods\n * @return {Object} the render method map\n */\n getAttributeRenderMethods() {\n return {\n string: 'renderString',\n boolean: 'renderCheckbox',\n number: 'renderNumber',\n choice: 'renderSelect'\n }\n }\n}\n\nEzBtnCustomTagUpdate.defaultProps = {\n command: 'ezcustomtag',\n modifiesSelection: true,\n};\n\nEzBtnCustomTagUpdate.propTypes = {\n editor: PropTypes.object.isRequired,\n label: PropTypes.string.isRequired,\n tabIndex: PropTypes.number.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-customtag-update.js","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/warning.js\n// module id = 6\n// module chunks = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34","module.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"AlloyEditor\",\"commonjs2\":\"AlloyEditor\",\"commonjs\":\"AlloyEditor\",\"amd\":\"AlloyEditor\"}\n// module id = 7\n// module chunks = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 40 41 42 43 44","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<' + _this3.attributes[attr].label + ': ' + _this3.state.values[attr].value + '
';\n }, '');\n }\n\n /**\n * Update values.\n *\n * @method updateValues\n * @param {Object} event\n */\n\n }, {\n key: 'updateValues',\n value: function updateValues(event) {\n var values = Object.assign({}, this.state.values);\n var value = event.target.type === 'checkbox' ? event.target.checked : event.target.value;\n\n values[event.target.dataset.attrName].value = value;\n\n this.setState({\n values: values\n });\n }\n\n /**\n * Gets the render method map.\n *\n * @method getAttributeRenderMethods\n * @return {Object} the render method map\n */\n\n }, {\n key: 'getAttributeRenderMethods',\n value: function getAttributeRenderMethods() {\n return {\n string: 'renderString',\n boolean: 'renderCheckbox',\n number: 'renderNumber',\n choice: 'renderSelect'\n };\n }\n }]);\n\n return EzBtnCustomTagUpdate;\n}(_ezWidgetbutton2.default);\n\nexports.default = EzBtnCustomTagUpdate;\n\n\nEzBtnCustomTagUpdate.defaultProps = {\n command: 'ezcustomtag',\n modifiesSelection: true\n};\n\nEzBtnCustomTagUpdate.propTypes = {\n editor: _propTypes2.default.object.isRequired,\n label: _propTypes2.default.string.isRequired,\n tabIndex: _propTypes2.default.number.isRequired\n};\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar emptyFunction = __webpack_require__(1);\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar emptyFunction = __webpack_require__(1);\nvar invariant = __webpack_require__(2);\nvar warning = __webpack_require__(6);\nvar assign = __webpack_require__(9);\n\nvar ReactPropTypesSecret = __webpack_require__(3);\nvar checkPropTypes = __webpack_require__(10);\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<${this.attributes[attr].label}: ${this.state.values[attr].value}
`,'');\n }\n\n /**\n * Update values.\n *\n * @method updateValues\n * @param {Object} event\n */\n updateValues(event) {\n const values = Object.assign({}, this.state.values);\n const value = event.target.type === 'checkbox' ? event.target.checked : event.target.value;\n\n values[event.target.dataset.attrName].value = value;\n\n this.setState({\n values: values\n });\n }\n\n /**\n * Gets the render method map.\n *\n * @method getAttributeRenderMethods\n * @return {Object} the render method map\n */\n getAttributeRenderMethods() {\n return {\n string: 'renderString',\n boolean: 'renderCheckbox',\n number: 'renderNumber',\n choice: 'renderSelect'\n }\n }\n}\n\nEzBtnCustomTagUpdate.defaultProps = {\n command: 'ezcustomtag',\n modifiesSelection: true,\n};\n\nEzBtnCustomTagUpdate.propTypes = {\n editor: PropTypes.object.isRequired,\n label: PropTypes.string.isRequired,\n tabIndex: PropTypes.number.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-customtag-update.js","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/warning.js\n// module id = 6\n// module chunks = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34","module.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"AlloyEditor\",\"commonjs2\":\"AlloyEditor\",\"commonjs\":\"AlloyEditor\",\"amd\":\"AlloyEditor\"}\n// module id = 7\n// module chunks = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 40 41 42 43 44","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<