text: (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{
  
  /***/ 2212:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(47));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(43));var _slicedToArray2=_interopRequireDefault(__webpack_require__(18));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactRouterDom=__webpack_require__(39);var _lodash=__webpack_require__(10);var _strapiHelperPlugin=__webpack_require__(8);var _custom=__webpack_require__(66);var _reactIntl=__webpack_require__(17);var _pluginId=_interopRequireDefault(__webpack_require__(104));var _getRequestUrl=_interopRequireDefault(__webpack_require__(757));var _FieldsReorder=_interopRequireDefault(__webpack_require__(2354));var _FormTitle=_interopRequireDefault(__webpack_require__(2363));var _LayoutTitle=_interopRequireDefault(__webpack_require__(2364));var _PopupForm=_interopRequireDefault(__webpack_require__(2255));var _SettingsViewWrapper=_interopRequireDefault(__webpack_require__(2256));var _SortableList=_interopRequireDefault(__webpack_require__(2365));var _layout=__webpack_require__(2283);var _getComponents=_interopRequireDefault(__webpack_require__(2262));var _LayoutDndProvider=_interopRequireDefault(__webpack_require__(759));var _getInputProps=_interopRequireDefault(__webpack_require__(2367));var _reducer=_interopRequireWildcard(__webpack_require__(2368));var EditSettingsView=function EditSettingsView(_ref){var currentEnvironment=_ref.currentEnvironment,deleteLayout=_ref.deleteLayout,deleteLayouts=_ref.deleteLayouts,componentsAndModelsMainPossibleMainFields=_ref.componentsAndModelsMainPossibleMainFields,push=_ref.history.push,plugins=_ref.plugins,slug=_ref.slug;var _useParams=(0,_reactRouterDom.useParams)(),componentSlug=_useParams.componentSlug,type=_useParams.type;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent;var _useReducer=(0,_react.useReducer)(_reducer["default"],_reducer.initialState),_useReducer2=(0,_slicedToArray2["default"])(_useReducer,2),reducerState=_useReducer2[0],dispatch=_useReducer2[1];var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isModalFormOpen=_useState2[0],setIsModalFormOpen=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),isDraggingSibling=_useState4[0],setIsDraggingSibling=_useState4[1];var fieldsReorderClassName=type==='content-types'?'col-8':'col-12';var abortController=new AbortController();var signal=abortController.signal;var _reducerState$toJS=reducerState.toJS(),componentLayouts=_reducerState$toJS.componentLayouts,isLoading=_reducerState$toJS.isLoading,initialData=_reducerState$toJS.initialData,metaToEdit=_reducerState$toJS.metaToEdit,modifiedData=_reducerState$toJS.modifiedData,metaForm=_reducerState$toJS.metaForm;var getAttributes=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','attributes'],{});},[modifiedData]);var getName=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','info','name'],'');},[modifiedData]);var getEditLayout=(0,_react.useCallback)(function(){return(0,_lodash.get)(modifiedData,['layouts','edit'],[]);},[modifiedData]);var getForm=function getForm(){return Object.keys((0,_lodash.get)(modifiedData,['metadatas',metaToEdit,'edit'],{})).filter(function(meta){return meta!=='visible';});};var getRelationsLayout=(0,_react.useCallback)(function(){return(0,_lodash.get)(modifiedData,['layouts','editRelations'],[]);},[modifiedData]);var getEditRelationsRemaingFields=function getEditRelationsRemaingFields(){var attributes=getAttributes;var displayedFields=getRelationsLayout();return Object.keys(attributes).filter(function(attr){return(0,_lodash.get)(attributes,[attr,'type'],'')==='relation';}).filter(function(attr){return displayedFields.indexOf(attr)===-1;});};var getEditRemainingFields=function getEditRemainingFields(){var attributes=getAttributes;var metadatas=(0,_lodash.get)(modifiedData,['metadatas'],{});var displayedFields=getEditLayout().reduce(function(acc,curr){return[].concat((0,_toConsumableArray2["default"])(acc),(0,_toConsumableArray2["default"])(curr.rowContent));},[]);return Object.keys(attributes).filter(function(attr){return(0,_lodash.get)(attributes,[attr,'type'],'')!=='relation';}).filter(function(attr){return(0,_lodash.get)(metadatas,[attr,'edit','visible'],false)===true;}).filter(function(attr){return displayedFields.findIndex(function(el){return el.name===attr;})===-1;});};var getSelectedItemSelectOptions=(0,_react.useCallback)(function(formType){if(formType!=='relation'&&formType!=='component'){return[];}var targetKey=formType==='component'?'component':'targetModel';var key=(0,_lodash.get)(modifiedData,['schema','attributes',metaToEdit,targetKey],'');return(0,_lodash.get)(componentsAndModelsMainPossibleMainFields,[key],[]);},[metaToEdit,componentsAndModelsMainPossibleMainFields,modifiedData]);(0,_react.useEffect)(function(){var getData=/*#__PURE__*/function(){var _ref2=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){var _yield$request,data;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("".concat(type,"/").concat(slug||componentSlug)),{method:'GET',signal:signal});case 3:_yield$request=_context.sent;data=_yield$request.data;dispatch({type:'GET_DATA_SUCCEEDED',data:data.contentType||data.component,componentLayouts:data.components});_context.next=11;break;case 8:_context.prev=8;_context.t0=_context["catch"](0);if(_context.t0.code!==20){strapi.notification.error('notification.error');}case 11:case"end":return _context.stop();}}},_callee,null,[[0,8]]);}));return function getData(){return _ref2.apply(this,arguments);};}();getData();return function(){abortController.abort();};// eslint-disable-next-line react-hooks/exhaustive-deps
  },[slug,type,componentSlug]);var handleChange=function handleChange(_ref3){var _ref3$target=_ref3.target,name=_ref3$target.name,value=_ref3$target.value;dispatch({type:'ON_CHANGE',keys:name.split('.'),value:value});};var handleChangeMeta=function handleChangeMeta(_ref4){var _ref4$target=_ref4.target,name=_ref4$target.name,value=_ref4$target.value;dispatch({type:'ON_CHANGE_META',keys:name.split('.'),value:value});};var handleConfirm=/*#__PURE__*/function(){var _ref5=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){var body;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;body=(0,_lodash.cloneDeep)(modifiedData);// We need to send the unformated edit layout
  (0,_lodash.set)(body,'layouts.edit',(0,_layout.unformatLayout)(body.layouts.edit));delete body.schema;delete body.uid;delete body.isComponent;delete body.category;delete body.apiID;_context2.next=10;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("".concat(type,"/").concat(slug||componentSlug)),{method:'PUT',body:body,signal:signal});case 10:dispatch({type:'SUBMIT_SUCCEEDED'});if(slug){deleteLayout(slug);}if(componentSlug){deleteLayouts();}emitEvent('didEditEditSettings');_context2.next=19;break;case 16:_context2.prev=16;_context2.t0=_context2["catch"](0);strapi.notification.error('notification.error');case 19:case"end":return _context2.stop();}}},_callee2,null,[[0,16]]);}));return function handleConfirm(){return _ref5.apply(this,arguments);};}();var handleSubmitMetaForm=function handleSubmitMetaForm(e){e.preventDefault();dispatch({type:'SUBMIT_META_FORM'});toggleModalForm();};var moveItem=function moveItem(dragIndex,hoverIndex,dragRowIndex,hoverRowIndex){// Same row = just reorder
  if(dragRowIndex===hoverRowIndex){dispatch({type:'REORDER_ROW',dragRowIndex:dragRowIndex,dragIndex:dragIndex,hoverIndex:hoverIndex});}else{dispatch({type:'REORDER_DIFF_ROW',dragIndex:dragIndex,hoverIndex:hoverIndex,dragRowIndex:dragRowIndex,hoverRowIndex:hoverRowIndex});}};var moveRow=function moveRow(dragRowIndex,hoverRowIndex){dispatch({type:'MOVE_ROW',dragRowIndex:dragRowIndex,hoverRowIndex:hoverRowIndex});};var toggleModalForm=function toggleModalForm(){setIsModalFormOpen(function(prevState){return!prevState;});};var renderForm=function renderForm(){return getForm().map(function(meta,index){var formType=(0,_lodash.get)(getAttributes,[metaToEdit,'type']);if(formType==='dynamiczone'&&!['label','description'].includes(meta)){return null;}if((formType==='component'||formType==='media')&&meta!=='label'){return null;}if((formType==='json'||formType==='boolean')&&meta==='placeholder'){return null;}if(formType==='richtext'&&meta==='editable'){return null;}return/*#__PURE__*/_react["default"].createElement("div",{className:"col-6",key:meta},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title.description")},function(description){return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_lodash.get)((0,_getInputProps["default"])(meta),'label.id','app.utils.defaultMessage')},function(label){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,{autoFocus:index===0,description:meta==='mainField'?description:'',label:label,name:meta,type:(0,_getInputProps["default"])(meta).type,onBlur:function onBlur(){},value:(0,_lodash.get)(metaForm,meta,''),onChange:handleChangeMeta,options:getSelectedItemSelectOptions(formType)});});}));});};return/*#__PURE__*/_react["default"].createElement(_LayoutDndProvider["default"],{attributes:getAttributes,buttonData:getEditRemainingFields(),componentLayouts:componentLayouts,goTo:push,isDraggingSibling:isDraggingSibling,layout:getEditLayout(),metadatas:(0,_lodash.get)(modifiedData,['metadatas'],{}),moveItem:moveItem,moveRow:moveRow,onAddData:function onAddData(name){dispatch({type:'ON_ADD_DATA',name:name});},relationsLayout:getRelationsLayout(),removeField:function removeField(rowIndex,fieldIndex){dispatch({type:'REMOVE_FIELD',rowIndex:rowIndex,fieldIndex:fieldIndex});},setEditFieldToSelect:function setEditFieldToSelect(name){dispatch({type:'SET_FIELD_TO_EDIT',name:name});toggleModalForm();},setIsDraggingSibling:setIsDraggingSibling,selectedItemName:metaToEdit},/*#__PURE__*/_react["default"].createElement(_SettingsViewWrapper["default"],{inputs:[{label:{id:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title")},description:{id:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title.description")},type:'select',name:'settings.mainField',customBootstrapClass:'col-md-4',selectOptions:['id'],didCheckErrors:false,validations:{}}],initialData:initialData,isLoading:isLoading,modifiedData:modifiedData,name:getName,onChange:handleChange,onConfirmReset:function onConfirmReset(){dispatch({type:'ON_RESET'});},onConfirmSubmit:handleConfirm,slug:slug||componentSlug,isEditSettings:true},/*#__PURE__*/_react["default"].createElement("div",{className:"row"},/*#__PURE__*/_react["default"].createElement(_LayoutTitle["default"],{className:fieldsReorderClassName},/*#__PURE__*/_react["default"].createElement("div",{style:{display:'flex',justifyContent:'space-between'}},/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement(_FormTitle["default"],{title:"".concat(_pluginId["default"],".global.displayedFields"),description:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.description")})),/*#__PURE__*/_react["default"].createElement("div",{style:{marginTop:-6}},(0,_getComponents["default"])('editSettingsView','left.links',plugins,currentEnvironment,slug,push,{componentSlug:componentSlug,type:type,modifiedData:modifiedData})))),type!=='components'&&/*#__PURE__*/_react["default"].createElement(_LayoutTitle["default"],{className:"col-4"},/*#__PURE__*/_react["default"].createElement(_FormTitle["default"],{title:"".concat(_pluginId["default"],".containers.SettingPage.relations"),description:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.description")})),/*#__PURE__*/_react["default"].createElement(_FieldsReorder["default"],{className:fieldsReorderClassName}),type!=='components'&&/*#__PURE__*/_react["default"].createElement(_SortableList["default"],{addItem:function addItem(name){dispatch({type:'ADD_RELATION',name:name});},buttonData:getEditRelationsRemaingFields(),moveItem:function moveItem(dragIndex,hoverIndex){dispatch({type:'MOVE_RELATION',dragIndex:dragIndex,hoverIndex:hoverIndex});},removeItem:function removeItem(index){dispatch({type:'REMOVE_RELATION',index:index});}}))),/*#__PURE__*/_react["default"].createElement(_PopupForm["default"],{headerId:"".concat(_pluginId["default"],".containers.EditSettingsView.modal-form.edit-field"),isOpen:isModalFormOpen,onClosed:function onClosed(){dispatch({type:'UNSET_FIELD_TO_EDIT'});},onSubmit:handleSubmitMetaForm,onToggle:toggleModalForm,renderForm:renderForm,subHeaderContent:metaToEdit,type:(0,_lodash.get)(getAttributes,[metaToEdit,'type'],'')}));};EditSettingsView.defaultProps={slug:null};EditSettingsView.propTypes={currentEnvironment:_propTypes["default"].string.isRequired,deleteLayout:_propTypes["default"].func.isRequired,deleteLayouts:_propTypes["default"].func.isRequired,componentsAndModelsMainPossibleMainFields:_propTypes["default"].object.isRequired,history:_propTypes["default"].shape({push:_propTypes["default"].func}).isRequired,location:_propTypes["default"].shape({search:_propTypes["default"].string.isRequired}).isRequired,plugins:_propTypes["default"].object.isRequired,slug:_propTypes["default"].string};var _default=EditSettingsView;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2225:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 18px 30px 18px 30px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Container=_styledComponents["default"].div(_templateObject());var _default=Container;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2231:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _pluginId=_interopRequireDefault(__webpack_require__(104));var getTrad=function getTrad(id){return"".concat(_pluginId["default"],".").concat(id);};var _default=getTrad;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2238:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  .btn-group button {\n    line-height: 28px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var SortWrapper=_styledComponents["default"].div(_templateObject());var _default=SortWrapper;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2253:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactFontawesome=__webpack_require__(37);var _Wrapper=_interopRequireDefault(__webpack_require__(2254));var DynamicComponentCard=function DynamicComponentCard(_ref){var children=_ref.children,componentUid=_ref.componentUid,friendlyName=_ref.friendlyName,icon=_ref.icon,_onClick=_ref.onClick;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{onClick:function onClick(e){e.preventDefault();e.stopPropagation();_onClick(componentUid);}},/*#__PURE__*/_react["default"].createElement("button",{className:"component-icon",type:"button"},/*#__PURE__*/_react["default"].createElement(_reactFontawesome.FontAwesomeIcon,{icon:icon})),/*#__PURE__*/_react["default"].createElement("div",{className:"component-uid"},/*#__PURE__*/_react["default"].createElement("span",null,friendlyName)),children);};DynamicComponentCard.defaultProps={children:null,friendlyName:'',onClick:function onClick(){},icon:'smile'};DynamicComponentCard.propTypes={children:_propTypes["default"].node,componentUid:_propTypes["default"].string.isRequired,friendlyName:_propTypes["default"].string,icon:_propTypes["default"].string,onClick:_propTypes["default"].func};var _default=DynamicComponentCard;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2254:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  height: 90px;\n  width: 139px !important;\n  margin-right: 10px;\n  padding: 18px 10px;\n  background-color: #ffffff;\n  color: #919bae;\n  text-align: center;\n  border-radius: 2px;\n  cursor: pointer;\n  border: 1px solid #ffffff;\n\n  button {\n    outline: 0;\n  }\n\n  .component-uid {\n    width: 119px;\n    text-overflow: ellipsis;\n    overflow: hidden;\n    white-space: nowrap;\n    color: #919bae;\n    font-weight: 500;\n    font-size: 13px;\n    line-height: normal;\n  }\n\n  .component-icon {\n    width: 35px;\n    height: 35px;\n    margin-bottom: 5px;\n    line-height: 35px;\n    align-self: center;\n    border-radius: 50%;\n    background-color: #e9eaeb;\n    color: #b4b6ba;\n    padding: 0;\n    i,\n    svg {\n      margin: auto;\n      display: block;\n    }\n  }\n\n  &:hover {\n    background-color: #e6f0fb;\n    color: #007eff;\n    border: 1px solid #aed4fb;\n\n    .component-icon {\n      background-color: #aed4fb;\n      color: #007eff;\n    }\n    .component-uid {\n      color: #007eff;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2255:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _strapiHelperPlugin=__webpack_require__(8);var _reactIntl=__webpack_require__(17);var _lodash=__webpack_require__(10);var _core=__webpack_require__(27);var PopupForm=function PopupForm(_ref){var headerId=_ref.headerId,isOpen=_ref.isOpen,onClosed=_ref.onClosed,onSubmit=_ref.onSubmit,onToggle=_ref.onToggle,renderForm=_ref.renderForm,subHeaderContent=_ref.subHeaderContent,type=_ref.type;var getAttrType=function getAttrType(){if(type==='timestamp'){return'date';}if(['decimal','float','integer','biginter'].includes(type)){return'number';}return type;};return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.Modal,{isOpen:isOpen,onClosed:onClosed,onToggle:onToggle},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModal,null,/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModalTitle,{style:{textTransform:'none'}},/*#__PURE__*/_react["default"].createElement(_core.AttributeIcon,{type:getAttrType(),style:{margin:'auto 20px auto 0'}}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:headerId}))),/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModalTitle,null,/*#__PURE__*/_react["default"].createElement("span",null,(0,_lodash.upperFirst)(subHeaderContent)),/*#__PURE__*/_react["default"].createElement("hr",null)))),/*#__PURE__*/_react["default"].createElement("form",{onSubmit:onSubmit},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalForm,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalBody,null,renderForm())),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalFooter,null,/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_core.Button,{onClick:onToggle,color:"cancel"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.popUpWarning.button.cancel"})),/*#__PURE__*/_react["default"].createElement(_core.Button,{type:"submit",color:"success"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"form.button.done"}))))));};PopupForm.defaultProps={isOpen:false,onClosed:function onClosed(){},onSubmit:function onSubmit(){},onToggle:function onToggle(){},renderForm:function renderForm(){},subHeaderContent:'',type:''};PopupForm.propTypes={headerId:_propTypes["default"].string.isRequired,isOpen:_propTypes["default"].bool,onClosed:_propTypes["default"].func,onSubmit:_propTypes["default"].func,onToggle:_propTypes["default"].func,renderForm:_propTypes["default"].func,subHeaderContent:_propTypes["default"].string,type:_propTypes["default"].string};var _default=PopupForm;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2256:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(47));var _extends2=_interopRequireDefault(__webpack_require__(6));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(43));var _slicedToArray2=_interopRequireDefault(__webpack_require__(18));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(10);var _reactRouterDom=__webpack_require__(39);var _reactIntl=__webpack_require__(17);var _custom=__webpack_require__(66);var _strapiHelperPlugin=__webpack_require__(8);var _pluginId=_interopRequireDefault(__webpack_require__(104));var _Block=_interopRequireDefault(__webpack_require__(2257));var _Container=_interopRequireDefault(__webpack_require__(2225));var _SectionTitle=_interopRequireDefault(__webpack_require__(2259));var _Separator=_interopRequireDefault(__webpack_require__(2261));var SettingsViewWrapper=function SettingsViewWrapper(_ref){var children=_ref.children,goBack=_ref.history.goBack,getListDisplayedFields=_ref.getListDisplayedFields,inputs=_ref.inputs,initialData=_ref.initialData,isEditSettings=_ref.isEditSettings,isLoading=_ref.isLoading,modifiedData=_ref.modifiedData,onChange=_ref.onChange,onConfirmReset=_ref.onConfirmReset,onConfirmSubmit=_ref.onConfirmSubmit,name=_ref.name;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent,formatMessage=_useGlobalContext.formatMessage;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),showWarningCancel=_useState2[0],setWarningCancel=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),showWarningSubmit=_useState4[0],setWarningSubmit=_useState4[1];var getAttributes=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','attributes'],{});},[modifiedData]);var toggleWarningCancel=function toggleWarningCancel(){return setWarningCancel(function(prevState){return!prevState;});};var toggleWarningSubmit=function toggleWarningSubmit(){return setWarningSubmit(function(prevState){return!prevState;});};var getPluginHeaderActions=function getPluginHeaderActions(){return[{color:'cancel',onClick:toggleWarningCancel,label:formatMessage({id:"".concat(_pluginId["default"],".popUpWarning.button.cancel")}),type:'button',disabled:(0,_lodash.isEqual)(modifiedData,initialData),style:{fontWeight:600,paddingLeft:15,paddingRight:15}},{color:'success',label:formatMessage({id:"".concat(_pluginId["default"],".containers.Edit.submit")}),type:'submit',disabled:(0,_lodash.isEqual)(modifiedData,initialData),style:{minWidth:150,fontWeight:600}}];};var headerProps={actions:getPluginHeaderActions(),title:{label:formatMessage({id:"".concat(_pluginId["default"],".components.SettingsViewWrapper.pluginHeader.title")},{name:(0,_lodash.upperFirst)(name)})},content:formatMessage({id:"".concat(_pluginId["default"],".components.SettingsViewWrapper.pluginHeader.description.").concat(isEditSettings?'edit':'list',"-settings")})};var getSelectOptions=function getSelectOptions(input){if(input.name==='settings.defaultSortBy'){return['id'].concat((0,_toConsumableArray2["default"])(getListDisplayedFields().filter(function(name){return(0,_lodash.get)(getAttributes,[name,'type'],'')!=='media'&&name!=='id'&&(0,_lodash.get)(getAttributes,[name,'type'],'')!=='richtext';})));}if(input.name==='settings.mainField'){var attributes=getAttributes;var options=Object.keys(attributes).filter(function(attr){var type=(0,_lodash.get)(attributes,[attr,'type'],'');return!['json','text','relation','component','boolean','date','media','richtext'].includes(type)&&!!type;});return options;}return input.options;};var handleSubmit=function handleSubmit(e){e.preventDefault();toggleWarningSubmit();emitEvent('willSaveContentTypeLayout');};if(isLoading){return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LoadingIndicatorPage,null);}return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.BackHeader,{onClick:goBack}),/*#__PURE__*/_react["default"].createElement(_Container["default"],{className:"container-fluid"},/*#__PURE__*/_react["default"].createElement("form",{onSubmit:handleSubmit},/*#__PURE__*/_react["default"].createElement(_custom.Header,headerProps),/*#__PURE__*/_react["default"].createElement("div",{className:"row",style:{paddingTop:'3px'}},/*#__PURE__*/_react["default"].createElement(_Block["default"],{style:{marginBottom:'13px',paddingBottom:'30px',paddingTop:'24px'}},/*#__PURE__*/_react["default"].createElement(_SectionTitle["default"],{isSettings:true}),/*#__PURE__*/_react["default"].createElement("div",{className:"row"},inputs.map(function(input){return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{key:input.name,id:input.label.id},function(label){return/*#__PURE__*/_react["default"].createElement("div",{className:input.customBootstrapClass},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_lodash.get)(input,'description.id','app.utils.defaultMessage')},function(description){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,(0,_extends2["default"])({},input,{description:description,label:label===' '?null:label,onChange:onChange,options:getSelectOptions(input),value:(0,_lodash.get)(modifiedData,input.name,'')}));}));});}),/*#__PURE__*/_react["default"].createElement("div",{className:"col-12"},/*#__PURE__*/_react["default"].createElement(_Separator["default"],{style:{marginBottom:20}}))),/*#__PURE__*/_react["default"].createElement(_SectionTitle["default"],null),children)),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningCancel,toggleModal:toggleWarningCancel,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.warning.cancelAllSettings"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:function onConfirm(){onConfirmReset();toggleWarningCancel();}}),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningSubmit,toggleModal:toggleWarningSubmit,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.warning.updateAllSettings"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:/*#__PURE__*/(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return onConfirmSubmit();case 2:toggleWarningSubmit();case 3:case"end":return _context.stop();}}},_callee);}))}))));};SettingsViewWrapper.defaultProps={getListDisplayedFields:function getListDisplayedFields(){return[];},inputs:[],initialData:{},isEditSettings:false,modifiedData:{},name:'',onConfirmReset:function onConfirmReset(){},onConfirmSubmit:function(){var _onConfirmSubmit=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:case"end":return _context2.stop();}}},_callee2);}));function onConfirmSubmit(){return _onConfirmSubmit.apply(this,arguments);}return onConfirmSubmit;}(),onSubmit:function onSubmit(){},pluginHeaderProps:{actions:[],description:{id:'app.utils.defaultMessage'},title:{id:'app.utils.defaultMessage',values:{}}}};SettingsViewWrapper.propTypes={children:_propTypes["default"].node.isRequired,getListDisplayedFields:_propTypes["default"].func,history:_propTypes["default"].shape({goBack:_propTypes["default"].func.isRequired}).isRequired,initialData:_propTypes["default"].object,inputs:_propTypes["default"].array,isEditSettings:_propTypes["default"].bool,isLoading:_propTypes["default"].bool.isRequired,modifiedData:_propTypes["default"].object,name:_propTypes["default"].string,onChange:_propTypes["default"].func.isRequired,onConfirmReset:_propTypes["default"].func,onConfirmSubmit:_propTypes["default"].func,onSubmit:_propTypes["default"].func,pluginHeaderProps:_propTypes["default"].shape({actions:_propTypes["default"].array,description:_propTypes["default"].shape({id:_propTypes["default"].string}),title:_propTypes["default"].shape({id:_propTypes["default"].string,values:_propTypes["default"].object})})};var _default=(0,_reactRouterDom.withRouter)(SettingsViewWrapper);exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2257:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(7);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(17);var _components=__webpack_require__(2258);/**
   *
   * Block
   */var renderMsg=function renderMsg(msg){return/*#__PURE__*/_react["default"].createElement("p",null,msg);};var Block=function Block(_ref){var children=_ref.children,description=_ref.description,style=_ref.style,title=_ref.title;return/*#__PURE__*/_react["default"].createElement("div",{className:"col-md-12"},/*#__PURE__*/_react["default"].createElement(_components.Wrapper,{style:style},/*#__PURE__*/_react["default"].createElement(_components.Sub,null,!!title&&/*#__PURE__*/_react["default"].createElement("p",null,/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:title})),!!description&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:description},renderMsg)),children));};Block.defaultProps={children:null,description:null,style:{},title:null};Block.propTypes={children:_propTypes["default"].any,description:_propTypes["default"].string,style:_propTypes["default"].object,title:_propTypes["default"].string};var _default=/*#__PURE__*/(0,_react.memo)(Block);exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2258:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Sub=exports.Wrapper=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-top: 0px;\n  line-height: 18px;\n  > p:first-child {\n    margin-bottom: 1px;\n    font-weight: 700;\n    color: #333740;\n    font-size: 1.8rem;\n  }\n  > p {\n    color: #787e8f;\n    font-size: 13px;\n  }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-bottom: 35px;\n  background: #ffffff;\n  padding: 22px 28px 18px;\n  padding-bottom: 13px;\n  border-radius: 2px;\n  box-shadow: 0 2px 4px #e3e9f3;\n  -webkit-font-smoothing: antialiased;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());exports.Wrapper=Wrapper;var Sub=_styledComponents["default"].div(_templateObject2());exports.Sub=Sub;
  
  /***/ }),
  
  /***/ 2259:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(7);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(17);var _pluginId=_interopRequireDefault(__webpack_require__(104));var _Title=_interopRequireDefault(__webpack_require__(2260));var SectionTitle=function SectionTitle(_ref){var isSettings=_ref.isSettings;var suffix=isSettings?'settings':'view';var msgId="".concat(_pluginId["default"],".containers.SettingPage.").concat(suffix);return/*#__PURE__*/_react["default"].createElement("div",{style:{marginBottom:'18px'}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:msgId},function(msg){return/*#__PURE__*/_react["default"].createElement(_Title["default"],null,msg);}));};SectionTitle.propTypes={isSettings:_propTypes["default"].bool};SectionTitle.defaultProps={isSettings:false};var _default=/*#__PURE__*/(0,_react.memo)(SectionTitle);exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2260:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  color: #787e8f;\n  font-size: 11px;\n  font-weight: 700;\n  letter-spacing: 0.77px;\n  text-transform: uppercase;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Title=_styledComponents["default"].div(_templateObject());var _default=Title;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2261:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-top: 17px;\n  margin-bottom: 24px;\n  border-top: 1px solid #f6f6f6;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Separator=_styledComponents["default"].div(_templateObject());var _default=Separator;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2262:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(43));var _extends2=_interopRequireDefault(__webpack_require__(6));var _react=_interopRequireDefault(__webpack_require__(1));var _lodash=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(104));/**
   * Retrieve external links from injected components
   * @type {Array} List of external links to display
   */var getInjectedComponents=function getInjectedComponents(container,area,plugins,currentEnvironment,slug,push){for(var _len=arguments.length,rest=new Array(_len>6?_len-6:0),_key=6;_key<_len;_key++){rest[_key-6]=arguments[_key];}var componentsToInject=Object.keys(plugins).reduce(function(acc,current){// Retrieve injected compos from plugin
  var currentPlugin=plugins[current];var injectedComponents=(0,_lodash.get)(currentPlugin,'injectedComponents',[]);var compos=injectedComponents.filter(function(compo){return compo.plugin==="".concat(_pluginId["default"],".").concat(container)&&compo.area===area;}).map(function(compo){var Component=compo.component;return/*#__PURE__*/_react["default"].createElement(Component,(0,_extends2["default"])({viewProps:rest,currentEnvironment:currentEnvironment,getModelName:function getModelName(){return slug;},push:push},compo.props,{key:compo.key}));});return[].concat((0,_toConsumableArray2["default"])(acc),(0,_toConsumableArray2["default"])(compos));},[]);return componentsToInject;};var _default=getInjectedComponents;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2281:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(18));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactIntl=__webpack_require__(17);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _icons=__webpack_require__(76);var _reactstrap=__webpack_require__(61);var _getTrad=_interopRequireDefault(__webpack_require__(2231));var _components=__webpack_require__(2355);function Add(_ref){var data=_ref.data,isRelation=_ref.isRelation,_onClick=_ref.onClick,pStyle=_ref.pStyle,style=_ref.style;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1];return/*#__PURE__*/_react["default"].createElement(_components.Wrapper,{isOpen:isOpen,notAllowed:data.length===0,style:style},/*#__PURE__*/_react["default"].createElement(_reactstrap.ButtonDropdown,{isOpen:isOpen,toggle:function toggle(){if(data.length>0){setIsOpen(function(prevState){return!prevState;});}}},/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownToggle,null,/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_getTrad["default"])("containers.SettingPage.".concat(isRelation?'add.relational-field':'add.field'))},function(msg){return/*#__PURE__*/_react["default"].createElement("p",{style:pStyle},/*#__PURE__*/_react["default"].createElement(_icons.Plus,{fill:"#007eff",height:"11px",width:"11px"}),msg);})),/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownMenu,null,data.map(function(item){return/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownItem,{key:item,onClick:function onClick(){_onClick(item);}},item);}))));}Add.defaultProps={data:[],isRelation:false,onClick:function onClick(){},pStyle:{},style:{}};Add.propTypes={data:_propTypes["default"].array,isRelation:_propTypes["default"].bool,onClick:_propTypes["default"].func,pStyle:_propTypes["default"].object,style:_propTypes["default"].object};var _default=/*#__PURE__*/(0,_react.memo)(Add);exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2282:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(18));var _react=_interopRequireWildcard(__webpack_require__(1));var _lodash=__webpack_require__(10);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _DraggedField=_interopRequireDefault(__webpack_require__(760));var _PreviewCarret=_interopRequireDefault(__webpack_require__(763));var _Carret=_interopRequireDefault(__webpack_require__(2358));var _DynamicZoneWrapper=_interopRequireDefault(__webpack_require__(2359));var _Wrapper=_interopRequireDefault(__webpack_require__(2360));var _DynamicComponent=_interopRequireDefault(__webpack_require__(2361));/* eslint-disable react/no-array-index-key */var DraggedFieldWithPreview=/*#__PURE__*/(0,_react.forwardRef)(function(_ref,refs){var goTo=_ref.goTo,componentUid=_ref.componentUid,componentLayouts=_ref.componentLayouts,dynamicZoneComponents=_ref.dynamicZoneComponents,isDragging=_ref.isDragging,label=_ref.label,name=_ref.name,onClickEdit=_ref.onClickEdit,onClickRemove=_ref.onClickRemove,selectedItem=_ref.selectedItem,showLeftCarret=_ref.showLeftCarret,showRightCarret=_ref.showRightCarret,size=_ref.size,style=_ref.style,type=_ref.type;var isHidden=name==='_TEMP_';var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),dragStart=_useState2[0],setDragStart=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),isOverDynamicZone=_useState4[0],setIsOverDynamicZone=_useState4[1];var opacity=isDragging?0.2:1;var isFullSize=size===12;var display=isFullSize&&dragStart?'none':'';var width=isFullSize&&dragStart?0:'100%';var higherFields=['json','text','file','media','component','richtext','dynamiczone'];var withLongerHeight=higherFields.includes(type)&&!dragStart;var getCompoInfos=function getCompoInfos(uid){return(0,_lodash.get)(componentLayouts,[uid,'schema','info'],{name:'',icon:''});};var componentData=(0,_lodash.get)(componentLayouts,[componentUid],{});var componentLayout=(0,_lodash.get)(componentData,['layouts','edit'],[]);var getWrapperWitdh=function getWrapperWitdh(colNum){return"".concat(1/12*colNum*100,"%");};return/*#__PURE__*/_react["default"].createElement("div",{style:{width:getWrapperWitdh(size)},onDrag:function onDrag(){if(isFullSize&&!dragStart){setDragStart(true);}},onDragEnd:function onDragEnd(){if(isFullSize){setDragStart(false);}}},/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{ref:refs.dropRef,withLongerHeight:withLongerHeight,style:style},dragStart&&isFullSize&&/*#__PURE__*/_react["default"].createElement(_PreviewCarret["default"],{style:{marginRight:'-10px'}}),/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,showLeftCarret&&/*#__PURE__*/_react["default"].createElement(_Carret["default"],null),/*#__PURE__*/_react["default"].createElement("div",{className:"sub",style:{width:width,opacity:opacity}},/*#__PURE__*/_react["default"].createElement(_DraggedField["default"],{goTo:goTo,componentUid:componentUid,isHidden:isHidden,isOverDynamicZone:isOverDynamicZone,label:label,name:name,onClick:onClickEdit,onRemove:onClickRemove,ref:refs.dragRef,selectedItem:selectedItem,style:{display:display,marginRight:0,paddingRight:0},type:type,withLongerHeight:withLongerHeight},type==='component'&&componentLayout.map(function(row,i){var marginBottom=i===componentLayout.length-1?'29px':'';var marginTop=i===0?'5px':'';return/*#__PURE__*/_react["default"].createElement("div",{style:{display:'flex',marginBottom:marginBottom,marginTop:marginTop},key:i},row.map(function(field){var fieldType=(0,_lodash.get)(componentData,['schema','attributes',field.name,'type'],'');var label=(0,_lodash.get)(componentData,['metadatas',field.name,'edit','label'],'');return/*#__PURE__*/_react["default"].createElement("div",{key:field.name,style:{width:getWrapperWitdh(field.size),marginBottom:'6px'}},/*#__PURE__*/_react["default"].createElement(_DraggedField["default"],{label:label,name:field.name,isSub:true,withLongerHeight:higherFields.includes(fieldType)}));}));}),type==='dynamiczone'&&/*#__PURE__*/_react["default"].createElement(_DynamicZoneWrapper["default"],null,dynamicZoneComponents.map(function(compo){var _getCompoInfos=getCompoInfos(compo),name=_getCompoInfos.name,icon=_getCompoInfos.icon;return/*#__PURE__*/_react["default"].createElement(_DynamicComponent["default"],{key:compo,componentUid:compo,friendlyName:name,icon:icon,setIsOverDynamicZone:setIsOverDynamicZone});})))),showRightCarret&&/*#__PURE__*/_react["default"].createElement(_Carret["default"],{right:true}))));});DraggedFieldWithPreview.defaultProps={goTo:function goTo(){},componentLayouts:{},componentUid:null,dynamicZoneComponents:[],isDragging:false,label:'',onClickEdit:function onClickEdit(){},onClickRemove:function onClickRemove(){},selectedItem:'',showLeftCarret:false,showRightCarret:false,size:1,style:{},type:'string'};DraggedFieldWithPreview.propTypes={goTo:_propTypes["default"].func,componentLayouts:_propTypes["default"].object,componentUid:_propTypes["default"].string,dynamicZoneComponents:_propTypes["default"].array,isDragging:_propTypes["default"].bool,label:_propTypes["default"].string,name:_propTypes["default"].string.isRequired,onClickEdit:_propTypes["default"].func,onClickRemove:_propTypes["default"].func,selectedItem:_propTypes["default"].string,showLeftCarret:_propTypes["default"].bool,showRightCarret:_propTypes["default"].bool,size:_propTypes["default"].number,style:_propTypes["default"].object,type:_propTypes["default"].string};DraggedFieldWithPreview.displayName='DraggedFieldWithPreview';var _default=DraggedFieldWithPreview;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2283:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  Object.defineProperty(exports,"__esModule",{value:true});exports.unformatLayout=exports.getRowSize=exports.getInputSize=exports.getFieldType=exports.formatLayout=exports.createLayout=void 0;var getRowSize=function getRowSize(arr){return arr.reduce(function(sum,value){return sum+value.size;},0);};exports.getRowSize=getRowSize;var createLayout=function createLayout(arr){return arr.reduce(function(acc,current,index){var row={rowId:index,rowContent:current};return acc.concat(row);},[]);};exports.createLayout=createLayout;var formatLayout=function formatLayout(arr){return arr.reduce(function(acc,current){var toPush=[];var currentRow=current.rowContent.reduce(function(acc2,curr){var acc2Size=getRowSize(acc2);if(curr.name==='_TEMP_'){return acc2;}if(acc2Size+curr.size<=12){acc2.push(curr);}else{toPush.push(curr);}return acc2;},[]);var rowId=acc.length===0?0:Math.max.apply(Math,acc.map(function(o){return o.rowId;}))+1;var currentRowSize=getRowSize(currentRow);if(currentRowSize<12){currentRow.push({name:'_TEMP_',size:12-currentRowSize});}acc.push({rowId:rowId,rowContent:currentRow});if(toPush.length>0){var toPushSize=getRowSize(toPush);if(toPushSize<12){toPush.push({name:'_TEMP_',size:12-toPushSize});}acc.push({rowId:rowId+1,rowContent:toPush});toPush=[];}return acc;},[]).filter(function(row){return row.rowContent.length>0;}).filter(function(row){if(row.rowContent.length===1){return row.rowContent[0].name!=='_TEMP_';}return true;});};exports.formatLayout=formatLayout;var unformatLayout=function unformatLayout(arr){return arr.reduce(function(acc,current){var currentRow=current.rowContent.filter(function(content){return content.name!=='_TEMP_';});return acc.concat([currentRow]);},[]);};exports.unformatLayout=unformatLayout;var getInputSize=function getInputSize(type){switch(type){case'boolean':case'date':case'integer':case'float':case'biginteger':case'decimal':case'time':return 4;case'json':case'component':case'richtext':case'dynamiczone':return 12;default:return 6;}};exports.getInputSize=getInputSize;var getFieldType=function getFieldType(state,name){return state.getIn(['modifiedData','schema','attributes',name,'type']);};exports.getFieldType=getFieldType;
  
  /***/ }),
  
  /***/ 2354:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(7);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(10);var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(756));var _AddDropdown=_interopRequireDefault(__webpack_require__(2281));var _SortWrapper=_interopRequireDefault(__webpack_require__(2238));var _components=_interopRequireDefault(__webpack_require__(2356));var _Item=_interopRequireDefault(__webpack_require__(2357));var FieldsReorder=function FieldsReorder(_ref){var className=_ref.className;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),attributes=_useLayoutDnd.attributes,buttonData=_useLayoutDnd.buttonData,layout=_useLayoutDnd.layout,moveItem=_useLayoutDnd.moveItem,moveRow=_useLayoutDnd.moveRow,onAddData=_useLayoutDnd.onAddData,removeField=_useLayoutDnd.removeField;var getComponent=(0,_react.useCallback)(function(attributeName){return(0,_lodash.get)(attributes,[attributeName,'component'],'');},[attributes]);var getType=(0,_react.useCallback)(function(attributeName){var attribute=(0,_lodash.get)(attributes,[attributeName],{});return attribute.type;},[attributes]);var getDynamicZoneComponents=(0,_react.useCallback)(function(attributeName){var attribute=(0,_lodash.get)(attributes,[attributeName],{});return attribute.components||[];},[attributes]);return/*#__PURE__*/_react["default"].createElement("div",{className:className},/*#__PURE__*/_react["default"].createElement(_SortWrapper["default"],{style:{marginTop:7,paddingTop:11,paddingLeft:5,paddingRight:5,border:'1px dashed #e3e9f3'}},layout.map(function(row,rowIndex){return/*#__PURE__*/_react["default"].createElement(_components["default"],{key:row.rowId,style:{}},row.rowContent.map(function(rowContent,index){var name=rowContent.name,size=rowContent.size;return/*#__PURE__*/_react["default"].createElement(_Item["default"],{componentUid:getComponent(name),dynamicZoneComponents:getDynamicZoneComponents(name),itemIndex:index,key:name,moveRow:moveRow,moveItem:moveItem,name:name,removeField:removeField,rowIndex:rowIndex,size:size,type:getType(name)});}));}),/*#__PURE__*/_react["default"].createElement(_components["default"],{style:{marginBottom:10}},/*#__PURE__*/_react["default"].createElement(_AddDropdown["default"],{data:buttonData,onClick:onAddData,style:{width:'100%',margin:'0 5px'}}))));};FieldsReorder.defaultProps={className:'col-8'};FieldsReorder.propTypes={className:_propTypes["default"].string};var _default=/*#__PURE__*/(0,_react.memo)(FieldsReorder);exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2355:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Wrapper=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireWildcard(__webpack_require__(3));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        > div {\n          > button {\n            cursor: not-allowed !important;\n          }\n        }\n      "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        > div {\n          background-color: #e6f0fb !important;\n          border-color: #aed4fb !important;\n        }\n      "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-left: 29px;\n  > div {\n    height: 30px;\n    width: 100%;\n    justify-content: space-between;\n    background: #ffffff;\n    color: #333740;\n    border-radius: 2px;\n    border: solid 1px #007eff;\n\n    > button {\n      cursor: pointer;\n      padding-left: 10px !important;\n      line-height: 30px;\n      width: 100%;\n      color: #333740;\n      text-align: left;\n      background-color: #ffffff;\n      border: none;\n      font-size: 13px;\n      font-weight: 500;\n      &:focus,\n      &:active,\n      &:hover,\n      &:visited {\n        background-color: transparent !important;\n        box-shadow: none;\n        color: #333740;\n      }\n      > p {\n        position: relative;\n        height: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: center;\n        margin-bottom: 0;\n        margin-top: -1px;\n        color: #007eff !important;\n        font-size: 13px !important;\n        svg {\n          fill: #007eff;\n          margin-right: 7px;\n          vertical-align: initial;\n        }\n      }\n    }\n    > div {\n      max-height: 180px;\n      min-width: calc(100% + 2px);\n      margin-left: -1px;\n      margin-top: -1px;\n      padding: 0;\n      border-top-left-radius: 0 !important;\n      border-top-right-radius: 0;\n      border-color: #e3e9f3 !important;\n      border-top-color: #aed4fb !important;\n      box-shadow: 0 2px 3px rgba(227, 233, 245, 0.5);\n\n      overflow: scroll;\n\n      button {\n        height: 30px;\n        padding-left: 10px !important;\n        line-height: 26px;\n        cursor: pointer;\n        font-size: 13px !important;\n        &:focus,\n        &:active,\n        &:hover,\n        &:hover {\n          background-color: #fafafb !important;\n          color: #333740;\n          outline: 0;\n        }\n        div {\n          margin: 0;\n          white-space: nowrap;\n          overflow: hidden;\n          text-overflow: ellipsis;\n        }\n      }\n    }\n  }\n\n  ","\n\n  ","\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var Wrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var isOpen=_ref.isOpen;if(isOpen){return(0,_styledComponents.css)(_templateObject2());}},function(_ref2){var notAllowed=_ref2.notAllowed;if(notAllowed){return(0,_styledComponents.css)(_templateObject3());}});exports.Wrapper=Wrapper;
  
  /***/ }),
  
  /***/ 2356:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  margin-bottom: 6px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2357:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(18));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactDnd=__webpack_require__(125);var _reactDndHtml5Backend=__webpack_require__(283);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(10);var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(756));var _DraggedFieldWithPreview=_interopRequireDefault(__webpack_require__(2282));var _ItemTypes=_interopRequireDefault(__webpack_require__(755));var Item=function Item(_ref){var componentUid=_ref.componentUid,dynamicZoneComponents=_ref.dynamicZoneComponents,itemIndex=_ref.itemIndex,moveItem=_ref.moveItem,moveRow=_ref.moveRow,name=_ref.name,removeField=_ref.removeField,rowIndex=_ref.rowIndex,size=_ref.size,type=_ref.type;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),goTo=_useLayoutDnd.goTo,componentLayouts=_useLayoutDnd.componentLayouts,metadatas=_useLayoutDnd.metadatas,setEditFieldToSelect=_useLayoutDnd.setEditFieldToSelect,selectedItemName=_useLayoutDnd.selectedItemName,setIsDraggingSibling=_useLayoutDnd.setIsDraggingSibling;var dragRef=(0,_react.useRef)(null);var dropRef=(0,_react.useRef)(null);var _useDrop=(0,_reactDnd.useDrop)({// Source code from http://react-dnd.github.io/react-dnd/examples/sortable/simple
  // And also from https://codesandbox.io/s/6v7l7z68jk
  accept:_ItemTypes["default"].EDIT_FIELD,hover:function hover(item,monitor){if(!dropRef.current){return;}// We use the hover only to reorder full size items
  if(item.size!==12){return;}var dragIndex=monitor.getItem().itemIndex;var hoverIndex=itemIndex;var dragRow=monitor.getItem().rowIndex;var targetRow=rowIndex;// Don't replace item with themselves
  if(dragIndex===hoverIndex&&dragRow===targetRow){return;}// Determine rectangle on screen
  var hoverBoundingRect=dropRef.current.getBoundingClientRect();// Get vertical middle
  var hoverMiddleY=(hoverBoundingRect.bottom-hoverBoundingRect.top)/2;// Determine mouse position
  var clientOffset=monitor.getClientOffset();// Get pixels to the top
  var hoverClientY=clientOffset.y-hoverBoundingRect.top;// Only perform the move when the mouse has crossed half of the items height
  // When dragging downwards, only move when the cursor is below 50%
  // When dragging upwards, only move when the cursor is above 50%
  // Dragging downwards
  if(dragRow<targetRow&&hoverClientY<hoverMiddleY){return;}// Dragging upwards
  if(dragRow>targetRow&&hoverClientY>hoverMiddleY){return;}moveRow(dragRow,targetRow);item.rowIndex=targetRow;item.itemIndex=hoverIndex;},drop:function drop(item,monitor){if(!dropRef.current){return;}var dragIndex=monitor.getItem().itemIndex;var hoverIndex=itemIndex;var dragRow=monitor.getItem().rowIndex;var targetRow=rowIndex;// Don't reorder on drop for full size elements since it is already done in the hover
  if(item.size===12){return;}// Don't replace item with themselves
  if(dragIndex===hoverIndex&&dragRow===targetRow){return;}// Determine rectangle on screen
  var hoverBoundingRect=dropRef.current.getBoundingClientRect();// Scroll window if mouse near vertical edge(100px)
  // Horizontal Check --
  if(Math.abs(monitor.getClientOffset().x-hoverBoundingRect.left)>hoverBoundingRect.width/1.8){moveItem(dragIndex,hoverIndex+1,dragRow,targetRow);item.itemIndex=hoverIndex+1;item.rowIndex=targetRow;return;}// Vertical Check |
  // Time to actually perform the action
  moveItem(dragIndex,hoverIndex,dragRow,targetRow);// Note: we're mutating the monitor item here!
  // Generally it's better to avoid mutations,
  // but it's good here for the sake of performance
  // to avoid expensive index searches.
  item.itemIndex=hoverIndex;item.rowIndex=targetRow;},collect:function collect(monitor){return{canDrop:monitor.canDrop(),clientOffset:monitor.getClientOffset(),isOver:monitor.isOver(),isOverCurrent:monitor.isOver({shallow:true}),itemType:monitor.getItemType()};}}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),_useDrop2$=_useDrop2[0],clientOffset=_useDrop2$.clientOffset,isOver=_useDrop2$.isOver,drop=_useDrop2[1];var _useDrag=(0,_reactDnd.useDrag)({begin:function begin(){setIsDraggingSibling(true);},canDrag:function canDrag(){// Each row of the layout has a max size of 12 (based on bootstrap grid system)
  // So in order to offer a better drop zone we add the _TEMP_ div to complete the remaining substract (12 - existing)
  // Those divs cannot be dragged
  // If we wanted to offer the ability to create new lines in the layout (which will come later)
  // We will need to add a 12 size _TEMP_ div to offer a drop target between each existing row.
  return name!=='_TEMP_';},collect:function collect(monitor){return{isDragging:monitor.isDragging(),getItem:monitor.getItem()};},end:function end(){setIsDraggingSibling(false);},item:{type:_ItemTypes["default"].EDIT_FIELD,itemIndex:itemIndex,rowIndex:rowIndex,name:name,size:size}}),_useDrag2=(0,_slicedToArray2["default"])(_useDrag,3),_useDrag2$=_useDrag2[0],isDragging=_useDrag2$.isDragging,getItem=_useDrag2$.getItem,drag=_useDrag2[1],preview=_useDrag2[2];// Remove the default preview when the item is being dragged
  // The preview is handled by the DragLayer
  (0,_react.useEffect)(function(){preview((0,_reactDndHtml5Backend.getEmptyImage)(),{captureDraggingState:true});},[preview]);// Create the refs
  // We need 1 for the drop target
  // 1 for the drag target
  var refs={dragRef:drag(dragRef),dropRef:drop(dropRef)};var showLeftCarret=false;var showRightCarret=false;if(dropRef.current&&clientOffset){var hoverBoundingRect=dropRef.current.getBoundingClientRect();showLeftCarret=isOver&&getItem.size!==12&&Math.abs(clientOffset.x-hoverBoundingRect.left)<hoverBoundingRect.width/2;showRightCarret=isOver&&getItem.size!==12&&Math.abs(clientOffset.x-hoverBoundingRect.left)>hoverBoundingRect.width/2;if(name==='_TEMP_'){showLeftCarret=isOver&&getItem.size!==12;showRightCarret=false;}}return/*#__PURE__*/_react["default"].createElement(_DraggedFieldWithPreview["default"],{goTo:goTo,componentUid:componentUid,componentLayouts:componentLayouts,dynamicZoneComponents:dynamicZoneComponents,isDragging:isDragging,label:(0,_lodash.get)(metadatas,[name,'edit','label'],''),name:name,onClickEdit:setEditFieldToSelect,onClickRemove:function onClickRemove(e){e.stopPropagation();removeField(rowIndex,itemIndex);},selectedItem:selectedItemName,showLeftCarret:showLeftCarret,showRightCarret:showRightCarret,size:size,type:type,ref:refs});};Item.defaultProps={componentUid:'',dynamicZoneComponents:[],type:'string'};Item.propTypes={componentUid:_propTypes["default"].string,dynamicZoneComponents:_propTypes["default"].array,itemIndex:_propTypes["default"].number.isRequired,moveItem:_propTypes["default"].func.isRequired,moveRow:_propTypes["default"].func.isRequired,name:_propTypes["default"].string.isRequired,removeField:_propTypes["default"].func.isRequired,rowIndex:_propTypes["default"].number.isRequired,size:_propTypes["default"].number.isRequired,type:_propTypes["default"].string};var _default=Item;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2358:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: absolute;\n  ","\n  height: 100%;\n  width: 2px;\n  margin-right: 3px;\n  border-radius: 2px;\n  background: #007eff;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Carret=_styledComponents["default"].div(_templateObject(),function(_ref){var right=_ref.right;if(right){return"\n      right: -4px;\n    ";}return"\n    left: -1px;\n  ";});var _default=Carret;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2359:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  margin: 5px 0 0px 0;\n  overflow: auto;\n  height: 119px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var DynamicZoneWrapper=_styledComponents["default"].div(_templateObject());var _default=DynamicZoneWrapper;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2360:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));var _propTypes=_interopRequireDefault(__webpack_require__(2));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  position: relative;\n  min-height: ",";\n\n  .sub {\n    width: 100%;\n    padding: 0 5px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var withLongerHeight=_ref.withLongerHeight;return withLongerHeight?'102px':'30px';});Wrapper.defaultProps={withLongerHeight:false};Wrapper.propTypes={withLongerHeight:_propTypes["default"].bool};var _default=Wrapper;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2361:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(18));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouterDom=__webpack_require__(39);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _pluginId=_interopRequireDefault(__webpack_require__(104));var _DynamicComponentCard=_interopRequireDefault(__webpack_require__(2253));var _Tooltip=_interopRequireDefault(__webpack_require__(2362));var DynamicComponent=function DynamicComponent(_ref){var componentUid=_ref.componentUid,friendlyName=_ref.friendlyName,icon=_ref.icon,setIsOverDynamicZone=_ref.setIsOverDynamicZone;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),state=_useState2[0],setState=_useState2[1];var _useHistory=(0,_reactRouterDom.useHistory)(),push=_useHistory.push;var handleMouseEvent=function handleMouseEvent(){setIsOverDynamicZone(function(v){return!v;});setState(function(v){return!v;});};return/*#__PURE__*/_react["default"].createElement(_DynamicComponentCard["default"],{componentUid:componentUid,friendlyName:friendlyName,icon:icon,isOver:state,onClick:function onClick(){push("/plugins/".concat(_pluginId["default"],"/ctm-configurations/edit-settings/components/").concat(componentUid,"/"));},onMouseEvent:handleMouseEvent,tradId:"components.DraggableAttr.edit"},/*#__PURE__*/_react["default"].createElement(_Tooltip["default"],{isOver:state},componentUid));};DynamicComponent.defaultProps={friendlyName:'',icon:'smile'};DynamicComponent.propTypes={componentUid:_propTypes["default"].string.isRequired,friendlyName:_propTypes["default"].string,icon:_propTypes["default"].string,setIsOverDynamicZone:_propTypes["default"].func.isRequired};var _default=DynamicComponent;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2362:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: absolute;\n  bottom: -10px;\n  left: 105px;\n  visibility: ",";\n  line-height: 20px;\n  height: 20px;\n  padding: 0 10px;\n  background-color: #000000;\n  font-size: 12px;\n  color: #fff;\n  opacity: 0.5;\n  border: 1px solid #e3e9f3;\n  z-index: 99;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Tooltip=_styledComponents["default"].div(_templateObject(),function(_ref){var isOver=_ref.isOver;return isOver?'visible':'hidden';});var _default=Tooltip;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2363:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(7);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(17);var FormTitle=function FormTitle(_ref){var description=_ref.description,title=_ref.title;return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,!!title&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:title}),!!description&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:description},function(msg){return/*#__PURE__*/_react["default"].createElement("p",null,msg);}));};FormTitle.propTypes={description:_propTypes["default"].string,title:_propTypes["default"].string};FormTitle.defaultProps={description:null,title:null};var _default=/*#__PURE__*/(0,_react.memo)(FormTitle);exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2364:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(4));var _styledComponents=_interopRequireDefault(__webpack_require__(3));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  color: #333740;\n  font-size: 13px;\n  font-weight: 500;\n  line-height: 18px;\n\n  p {\n    margin-top: 2px;\n    margin-bottom: 13px;\n    color: #9ea7b8;\n    font-size: 12px;\n    font-weight: 400;\n    line-height: normal;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var LayoutTitle=_styledComponents["default"].div(_templateObject());var _default=LayoutTitle;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2365:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(7);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(756));var _AddDropdown=_interopRequireDefault(__webpack_require__(2281));var _SortWrapper=_interopRequireDefault(__webpack_require__(2238));var _Item=_interopRequireDefault(__webpack_require__(2366));var SortableList=function SortableList(_ref){var addItem=_ref.addItem,buttonData=_ref.buttonData,moveItem=_ref.moveItem,removeItem=_ref.removeItem;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),relationsLayout=_useLayoutDnd.relationsLayout;return/*#__PURE__*/_react["default"].createElement("div",{className:"col-4"},/*#__PURE__*/_react["default"].createElement(_SortWrapper["default"],{style:{marginTop:7,paddingTop:11,paddingLeft:5,paddingRight:5,border:'1px dashed #e3e9f3'}},relationsLayout.map(function(relationName,index){return/*#__PURE__*/_react["default"].createElement(_Item["default"],{index:index,key:relationName,move:moveItem,name:relationName,removeItem:removeItem});}),/*#__PURE__*/_react["default"].createElement(_AddDropdown["default"],{data:buttonData,isRelation:true,onClick:addItem,style:{marginLeft:10,marginRight:10,marginBottom:13}})));};SortableList.defaultProps={buttonData:[]};SortableList.propTypes={addItem:_propTypes["default"].func.isRequired,buttonData:_propTypes["default"].array,moveItem:_propTypes["default"].func.isRequired,removeItem:_propTypes["default"].func.isRequired};var _default=/*#__PURE__*/(0,_react.memo)(SortableList);exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2366:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireWildcard=__webpack_require__(7);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(18));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactDnd=__webpack_require__(125);var _reactDndHtml5Backend=__webpack_require__(283);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(10);var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(756));var _DraggedFieldWithPreview=_interopRequireDefault(__webpack_require__(2282));var _ItemTypes=_interopRequireDefault(__webpack_require__(755));var Item=function Item(_ref){var index=_ref.index,move=_ref.move,name=_ref.name,removeItem=_ref.removeItem;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),goTo=_useLayoutDnd.goTo,metadatas=_useLayoutDnd.metadatas,selectedItemName=_useLayoutDnd.selectedItemName,setEditFieldToSelect=_useLayoutDnd.setEditFieldToSelect,setIsDraggingSibling=_useLayoutDnd.setIsDraggingSibling;var dragRef=(0,_react.useRef)(null);var dropRef=(0,_react.useRef)(null);// from: https://codesandbox.io/s/github/react-dnd/react-dnd/tree/gh-pages/examples_hooks_js/04-sortable/simple?from-embed
  var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].EDIT_RELATION,hover:function hover(item,monitor){if(!dropRef.current){return;}var dragIndex=item.index;var hoverIndex=index;// Don't replace items with themselves
  if(dragIndex===hoverIndex){return;}// Determine rectangle on screen
  var hoverBoundingRect=dropRef.current.getBoundingClientRect();// Get vertical middle
  var hoverMiddleY=(hoverBoundingRect.bottom-hoverBoundingRect.top)/2;// Determine mouse position
  var clientOffset=monitor.getClientOffset();// Get pixels to the top
  var hoverClientY=clientOffset.y-hoverBoundingRect.top;// Only perform the move when the mouse has crossed half of the items height
  // When dragging downwards, only move when the cursor is below 50%
  // When dragging upwards, only move when the cursor is above 50%
  // Dragging downwards
  if(dragIndex<hoverIndex&&hoverClientY<hoverMiddleY){return;}// Dragging upwards
  if(dragIndex>hoverIndex&&hoverClientY>hoverMiddleY){return;}// Time to actually perform the action
  move(dragIndex,hoverIndex);// Note: we're mutating the monitor item here!
  // Generally it's better to avoid mutations,
  // but it's good here for the sake of performance
  // to avoid expensive index searches.
  item.index=hoverIndex;}}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];var _useDrag=(0,_reactDnd.useDrag)({item:{type:_ItemTypes["default"].EDIT_RELATION,id:name,name:name,index:index},begin:function begin(){// Remove the over state from other components
  // Since it's a dynamic list where items are replaced on the fly we need to disable all the over state
  setIsDraggingSibling(true);},end:function end(){setIsDraggingSibling(false);},collect:function collect(monitor){return{isDragging:monitor.isDragging()};}}),_useDrag2=(0,_slicedToArray2["default"])(_useDrag,3),isDragging=_useDrag2[0].isDragging,drag=_useDrag2[1],preview=_useDrag2[2];(0,_react.useEffect)(function(){preview((0,_reactDndHtml5Backend.getEmptyImage)(),{captureDraggingState:false});},[preview]);// Create the refs
  // We need 1 for the drop target
  // 1 for the drag target
  var refs={dragRef:drag(dragRef),dropRef:drop(dropRef)};return/*#__PURE__*/_react["default"].createElement(_DraggedFieldWithPreview["default"],{isDragging:isDragging,label:(0,_lodash.get)(metadatas,[name,'edit','label'],''),name:name,onClickEdit:function onClickEdit(){return setEditFieldToSelect(name);},onClickRemove:function onClickRemove(e){e.stopPropagation();removeItem(index);},push:goTo,ref:refs,selectedItem:selectedItemName,size:12,style:{marginBottom:6,paddingLeft:5,paddingRight:5},type:"relation",i:index===0});};Item.defaultProps={move:function move(){}};Item.propTypes={index:_propTypes["default"].number.isRequired,move:_propTypes["default"].func,name:_propTypes["default"].string.isRequired,removeItem:_propTypes["default"].func.isRequired};var _default=Item;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2367:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _pluginId=_interopRequireDefault(__webpack_require__(104));var getInputProps=function getInputProps(fieldName){var type;switch(fieldName){case'description':case'label':case'placeholder':type='text';break;case'mainField':type='select';break;case'editable':type='bool';break;default:type='';}var labelId=fieldName==='mainField'?"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title"):"".concat(_pluginId["default"],".form.Input.").concat(fieldName);return{type:type,label:{id:labelId}};};var _default=getInputProps;exports["default"]=_default;
  
  /***/ }),
  
  /***/ 2368:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.initialState=exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(43));var _immutable=__webpack_require__(38);var _lodash=__webpack_require__(10);var _layout=__webpack_require__(2283);var initialState=(0,_immutable.fromJS)({fieldForm:{},componentLayouts:{},metaToEdit:'',initialData:{},isLoading:true,metaForm:{},modifiedData:{}});exports.initialState=initialState;var reducer=function reducer(state,action){var layoutPathEdit=['modifiedData','layouts','edit'];var layoutPathRelations=['modifiedData','layouts','editRelations'];switch(action.type){case'ADD_RELATION':return state.updateIn(layoutPathRelations,function(list){return list.push(action.name);});case'GET_DATA_SUCCEEDED':{var data=(0,_lodash.cloneDeep)(action.data);(0,_lodash.set)(data,['layouts','edit'],(0,_layout.formatLayout)((0,_layout.createLayout)(data.layouts.edit)));return state.update('componentLayouts',function(){return(0,_immutable.fromJS)(action.componentLayouts);}).update('initialData',function(){return(0,_immutable.fromJS)(data||{});}).update('isLoading',function(){return false;}).update('modifiedData',function(){return(0,_immutable.fromJS)(data||{});});}case'MOVE_RELATION':{return state.updateIn(layoutPathRelations,function(list){return list["delete"](action.dragIndex).insert(action.hoverIndex,state.getIn([].concat(layoutPathRelations,[action.dragIndex])));});}case'MOVE_ROW':return state.updateIn(layoutPathEdit,function(list){return list["delete"](action.dragRowIndex).insert(action.hoverRowIndex,state.getIn([].concat(layoutPathEdit,[action.dragRowIndex])));});case'ON_ADD_DATA':{var size=(0,_layout.getInputSize)(state.getIn(['modifiedData','schema','attributes',action.name,'type']));var listSize=state.getIn(layoutPathEdit).size;var newList=state.getIn(layoutPathEdit).updateIn([listSize-1,'rowContent'],function(list){if(list){return list.push({name:action.name,size:size});}return(0,_immutable.fromJS)([{name:action.name,size:size}]);});var formattedList=(0,_layout.formatLayout)(newList.toJS());return state.updateIn(layoutPathEdit,function(){return(0,_immutable.fromJS)(formattedList);});}case'ON_CHANGE':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(){return action.value;});case'ON_CHANGE_META':return state.updateIn(['metaForm'].concat((0,_toConsumableArray2["default"])(action.keys)),function(){return action.value;});case'ON_RESET':return state.update('modifiedData',function(){return state.get('initialData');});case'REMOVE_FIELD':{var row=state.getIn([].concat(layoutPathEdit,[action.rowIndex,'rowContent']));var newState;// Delete the entire row if length is one or if lenght is equal to 2 and the second element is the hidden div used to make the dnd exp smoother
  if(row.size===1||row.size===2&&row.getIn([1,'name'])==='_TEMP_'){newState=state.updateIn(layoutPathEdit,function(list){return list["delete"](action.rowIndex);});}else{newState=state.updateIn([].concat(layoutPathEdit,[action.rowIndex,'rowContent']),function(list){return list["delete"](action.fieldIndex);});}var updatedList=(0,_immutable.fromJS)((0,_layout.formatLayout)(newState.getIn(layoutPathEdit).toJS()));return state.updateIn(layoutPathEdit,function(){return updatedList;});}case'REMOVE_RELATION':return state.updateIn(layoutPathRelations,function(list){return list["delete"](action.index);});case'REORDER_DIFF_ROW':{var _newState=state.updateIn([].concat(layoutPathEdit,[action.dragRowIndex,'rowContent']),function(list){return list.remove(action.dragIndex);}).updateIn([].concat(layoutPathEdit,[action.hoverRowIndex,'rowContent']),function(list){return list.insert(action.hoverIndex,state.getIn([].concat(layoutPathEdit,[action.dragRowIndex,'rowContent',action.dragIndex])));});var _updatedList=(0,_layout.formatLayout)(_newState.getIn(layoutPathEdit).toJS());return state.updateIn(layoutPathEdit,function(){return(0,_immutable.fromJS)(_updatedList);});}case'REORDER_ROW':{var _newState2=state.updateIn([].concat(layoutPathEdit,[action.dragRowIndex,'rowContent']),function(list){return list["delete"](action.dragIndex).insert(action.hoverIndex,list.get(action.dragIndex));});var _updatedList2=(0,_layout.formatLayout)(_newState2.getIn(layoutPathEdit).toJS());return state.updateIn(layoutPathEdit,function(){return(0,_immutable.fromJS)(_updatedList2);});}case'SET_FIELD_TO_EDIT':return state.update('metaToEdit',function(){return action.name;}).updateIn(['metaForm'],function(){return state.getIn(['modifiedData','metadatas',action.name,'edit']);});case'SUBMIT_META_FORM':{var metaPath=['modifiedData','metadatas',state.get('metaToEdit'),'edit'];return state.updateIn(metaPath,function(){return state.getIn(['metaForm']);});}case'SUBMIT_SUCCEEDED':return state.update('initialData',function(){return state.get('modifiedData');});case'UNSET_FIELD_TO_EDIT':return state.update('metaToEdit',function(){return'';}).update('metaForm',function(){return(0,_immutable.fromJS)({});});default:return state;}};var _default=reducer;exports["default"]=_default;
  
  /***/ })
  
  }]);