diff --git a/Resources/public/js/ContentTree.module.js b/Resources/public/js/ContentTree.module.js index f3960001..9b8bb462 100644 --- a/Resources/public/js/ContentTree.module.js +++ b/Resources/public/js/ContentTree.module.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ContentTree=t(require("react"),require("prop-types")):(e.eZ=e.eZ||{},e.eZ.modules=e.eZ.modules||{},e.eZ.modules.ContentTree=t(e.React,e.PropTypes))}("undefined"!=typeof self?self:this,function(e,t){return function(e){var t={};function s(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,s),n.l=!0,n.exports}return s.m=e,s.c=t,s.d=function(e,t,i){s.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=62)}({0:function(t,s){t.exports=e},1:function(e,s){e.exports=t},2:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(s(0)),n=a(s(1));function a(e){return e&&e.__esModule?e:{default:e}}const o=e=>{const t=e.customPath?e.customPath:`/bundles/ezplatformadminui/img/ez-icons.svg#${e.name}`;let s="ez-icon";return e.extraClasses&&(s=`${s} ${e.extraClasses}`),i.default.createElement("svg",{className:s},i.default.createElement("use",{xlinkHref:t}))};o.propTypes={extraClasses:n.default.string.isRequired,name:n.default.string,customPath:n.default.string},o.defaultProps={customPath:null,name:null},t.default=o},3:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getBasicRequestInit=(({token:e,siteaccess:t})=>({headers:{"X-Siteaccess":t,"X-CSRF-Token":e},mode:"same-origin",credentials:"same-origin"}));const i=t.handleRequestError=(e=>{if(!e.ok)throw Error(e.statusText);return e});t.handleRequestResponse=(e=>i(e).json()),t.handleRequestResponseStatus=(e=>i(e).status)},4:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=t.NOTIFICATION_INFO_LABEL="info",n=t.NOTIFICATION_SUCCESS_LABEL="success",a=t.NOTIFICATION_WARNING_LABEL="warning",o=t.NOTIFICATION_ERROR_LABEL="danger",r=t.showNotification=(e=>{const t=new CustomEvent("ez-notify",{detail:e});document.body.dispatchEvent(t)});t.showInfoNotification=(e=>{r({message:e,label:i})}),t.showSuccessNotification=(e=>{r({message:e,label:n})}),t.showWarningNotification=(e=>{r({message:e,label:a})}),t.showErrorNotification=(e=>{const t=e instanceof Error?e.message:e;r({message:t,label:o})})},62:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(0),n=d(i),a=d(s(1)),o=d(s(63)),r=s(66);function d(e){return e&&e.__esModule?e:{default:e}}const u="ez-content-tree-subtree";class l extends i.Component{constructor(e){super(e),this.setInitialItemsState=this.setInitialItemsState.bind(this),this.loadMoreSubitems=this.loadMoreSubitems.bind(this),this.updateSubtreeAfterItemToggle=this.updateSubtreeAfterItemToggle.bind(this);const t=localStorage.getItem(u);this.items=e.preloadedLocations;try{this.subtree=t?JSON.parse(t):null}catch(e){this.subtree=null}}componentDidMount(){this.items.length||(this.subtree?(0,r.loadSubtree)(this.props.restInfo,this.subtree,e=>{this.setInitialItemsState(e[0])}):(0,r.loadLocationItems)(this.props.rootLocationId,this.setInitialItemsState))}setInitialItemsState(e){this.items=[e],this.subtree=this.generateSubtree(this.items),this.forceUpdate()}loadMoreSubitems({parentLocationId:e,offset:t,limit:s,path:i},n){(0,r.loadLocationItems)(e,this.updateLocationsStateAfterLoadingMoreItems.bind(this,i,n),s,t)}updateLocationsStateAfterLoadingMoreItems(e,t,s){const i=this.findItem(this.items,e.split(","));i&&(i.subitems=[...i.subitems,...s.subitems],this.updateSubtreeAfterLoadMoreItems(e),t(),this.forceUpdate())}updateSubtreeAfterLoadMoreItems(e){const t=this.findItem(this.items,e.split(","));this.updateItemInSubtree(this.subtree[0],t,e.split(",")),this.saveSubtree()}updateSubtreeAfterItemToggle(e,t){const s=this.findItem(this.items,e.split(","));t?this.addItemToSubtree(this.subtree[0],s,e.split(",")):this.removeItemFromSubtree(this.subtree[0],s,e.split(",")),this.saveSubtree()}addItemToSubtree(e,t,s){const i=this.findParentSubtree(e,t,s);if(!i)return;const n=this.props.subitemsLoadLimit;i.children.push({"_media-type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode",locationId:t.locationId,limit:Math.ceil(t.subitems.length/n)*n,offset:0,children:[]})}removeItemFromSubtree(e,t,s){const i=this.findParentSubtree(e,t,s);if(!i)return;const n=i.children.findIndex(e=>parseInt(e.locationId,10)===parseInt(s[1],10));n>-1&&i.children.splice(n,1)}updateItemInSubtree(e,t,s){const i=this.findParentSubtree(e,t,s);if(!i)return;const n=i.children.findIndex(e=>e.locationId===parseInt(s[1],10));n>-1&&(i.children[n].limit=t.subitems.length)}saveSubtree(){localStorage.setItem(u,JSON.stringify(this.subtree))}findParentSubtree(e,t,s){if(s.length<2)return;if(2===s.length)return e;const i=e.children.find(e=>e.locationId===parseInt(s[1],10));return s.shift(),this.findParentSubtree(i,t,s)}generateSubtree(e){const t=[],s=this.props.subitemsLoadLimit;for(const i of e){!i.subitems.length||t.push({"_media-type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode",locationId:i.locationId,limit:Math.ceil(i.subitems.length/s)*s,offset:0,children:this.generateSubtree(i.subitems)})}return t}findItem(e,t){const s=1===t.length,i=e.find(e=>e.locationId===parseInt(t[0],10));return i?s?i:i.hasOwnProperty("subitems")&&Array.isArray(i.subitems)?(t.shift(),this.findItem(i.subitems,t)):null:null}render(){var e=this.props;const t=e.currentLocationId,s=e.subitemsLoadLimit,i={items:this.items,currentLocationId:t,subitemsLoadLimit:s,loadMoreSubitems:this.loadMoreSubitems,afterItemToggle:this.updateSubtreeAfterItemToggle};return n.default.createElement(o.default,i)}}t.default=l,eZ.addConfig("modules.ContentTree",l),l.propTypes={rootLocationId:a.default.number.isRequired,currentLocationId:a.default.number.isRequired,preloadedLocations:a.default.arrayOf(a.default.object),subitemsLoadLimit:a.default.number,restInfo:a.default.shape({token:a.default.string.isRequired,siteaccess:a.default.string.isRequired}).isRequired},l.defaultProps={rootLocationId:2,preloadedLocations:[],subitemsLoadLimit:10}},63:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(0),n=r(i),a=r(s(1)),o=r(s(64));function r(e){return e&&e.__esModule?e:{default:e}}const d="ez-is-tree-resizing";class u extends i.Component{constructor(e){super(e),this.changeContainerWidth=this.changeContainerWidth.bind(this),this.addWidthChangeListener=this.addWidthChangeListener.bind(this),this.handleResizeEnd=this.handleResizeEnd.bind(this),this._refTreeContainer=n.default.createRef(),this.state={resizeStartPositionX:0,containerWidth:0,resizedContainerWidth:0,isResizing:!1}}componentWillUnmount(){this.clearDocumentResizingListeners()}changeContainerWidth({clientX:e}){const t=e;this.setState(e=>({resizedContainerWidth:e.containerWidth+(t-e.resizeStartPositionX)}))}addWidthChangeListener({nativeEvent:e}){const t=e.clientX,s=this._refTreeContainer.current.getBoundingClientRect().width;window.document.addEventListener("mousemove",this.changeContainerWidth,!1),window.document.addEventListener("mouseup",this.handleResizeEnd,!1),window.document.body.classList.add(d),this.setState(()=>({resizeStartPositionX:t,containerWidth:s,isResizing:!0}))}handleResizeEnd(){this.clearDocumentResizingListeners(),this.setState(e=>({resizeStartPositionX:0,containerWidth:e.resizedContainerWidth,isResizing:!1}))}clearDocumentResizingListeners(){window.document.removeEventListener("mousemove",this.changeContainerWidth),window.document.removeEventListener("mouseup",this.handleResizeEnd),window.document.body.classList.remove(d)}render(){var e=this.state;const t=e.isResizing,s=e.containerWidth,i=e.resizedContainerWidth;var a=this.props;const r=a.items,d=a.loadMoreSubitems,u=a.currentLocationId,l=a.subitemsLoadLimit,c=a.afterItemToggle,m=t?i:s,h=r.length?r[0].subitems:[],f=r.length?""+r[0].locationId:"",p={className:"m-tree",ref:this._refTreeContainer},b={items:h,path:f,loadMoreSubitems:d,currentLocationId:u,subitemsLoadLimit:l,afterItemToggle:c};return m&&(p.style={width:`${m}px`}),n.default.createElement("div",p,n.default.createElement(o.default,b),n.default.createElement("div",{className:"m-tree__resize-handler",onMouseDown:this.addWidthChangeListener}))}}t.default=u,u.propTypes={items:a.default.array.isRequired,loadMoreSubitems:a.default.func.isRequired,currentLocationId:a.default.number.isRequired,subitemsLoadLimit:a.default.number,afterItemToggle:a.default.func.isRequired}},64:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t{const l={loadMoreSubitems:t,currentLocationId:s,subitemsLoadLimit:r,afterItemToggle:u},c={loadMoreSubitems:t,afterItemToggle:u};return n.default.createElement("ul",{className:"c-list"},e.map(e=>{const t=a&&a.length,u=window.Routing.generate("_ezpublishLocation",{locationId:e.locationId}),m=`${t?a+",":""}${e.locationId}`,h=e.subitems;return n.default.createElement(o.default,i({},e,c,{key:e.locationId,selected:e.locationId===s,subitemsLoadLimit:r,href:u,path:m}),h.length?n.default.createElement(d,i({path:m,items:h},l)):null)}))};d.propTypes={path:a.default.string.isRequired,items:a.default.array.isRequired,loadMoreSubitems:a.default.func.isRequired,currentLocationId:a.default.number.isRequired,subitemsLoadLimit:a.default.number,afterItemToggle:a.default.func.isRequired},t.default=d},65:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(0),n=r(i),a=r(s(1)),o=r(s(2));function r(e){return e&&e.__esModule?e:{default:e}}class d extends i.Component{constructor(e){super(e),this.toggleExpandedState=this.toggleExpandedState.bind(this),this.cancelLoadingState=this.cancelLoadingState.bind(this),this.loadMoreSubitems=this.loadMoreSubitems.bind(this),this.handleAfterExpandedStateChange=this.handleAfterExpandedStateChange.bind(this),this.state={isExpanded:!!e.subitems.length,isLoading:!1}}cancelLoadingState(){this.setState(()=>({isLoading:!1}))}toggleExpandedState(){this.setState(e=>({isExpanded:!e.isExpanded}),()=>{var e=this.props;(0,e.afterItemToggle)(e.path,this.state.isExpanded),this.handleAfterExpandedStateChange()})}handleAfterExpandedStateChange(){this.state.isExpanded&&!this.props.subitems.length&&this.loadMoreSubitems()}loadMoreSubitems(){if(this.state.isLoading)return;var e=this.props;const t=e.subitems,s=e.path,i=e.locationId,n=e.loadMoreSubitems;this.setState(()=>({isLoading:!0}),()=>n({path:s,parentLocationId:i,offset:t.length,limit:this.props.subitemsLoadLimit},this.cancelLoadingState))}checkCanLoadMore(){var e=this.props;const t=e.subitems,s=e.totalSubitemsCount;return t.length{const r=new Request(`/api/ezp/v2/location/tree/load-subitems/${e}/${s}/${a}`,{method:"GET",mode:"same-origin",credentials:"same-origin",headers:{Accept:"application/vnd.ez.api.ContentTreeNode+json"}});fetch(r).then(i.handleRequestResponse).then(e=>{const t=e.ContentTreeNode;return t.children=t.children.map(o),o(t)}).then(t).catch(n.showErrorNotification)}),t.loadSubtree=(({token:e,siteaccess:t},s,o)=>{const r=new Request("/api/ezp/v2/location/tree/load-subtree",{method:"POST",mode:"same-origin",credentials:"same-origin",body:JSON.stringify({LoadSubtreeRequest:{"_media-type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequest",nodes:s}}),headers:{Accept:"application/vnd.ez.api.ContentTreeRoot+json","Content-Type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequest+json","X-Siteaccess":t,"X-CSRF-Token":e}});fetch(r).then(i.handleRequestResponse).then(e=>{const t=e.ContentTreeRoot.ContentTreeNodeList;return a(t)}).then(o).catch(n.showErrorNotification)});const a=e=>{const t=[];for(const s of e)o(s),s.subitems=a(s.subitems),t.push(s);return t},o=e=>(e.totalSubitemsCount=e.totalChildrenCount,e.subitems=e.children,e.totalSubitemsCount=e.totalChildrenCount,delete e.totalChildrenCount,delete e.children,delete e.displayLimit,e)}}).default}); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ContentTree=t(require("react"),require("prop-types")):(e.eZ=e.eZ||{},e.eZ.modules=e.eZ.modules||{},e.eZ.modules.ContentTree=t(e.React,e.PropTypes))}("undefined"!=typeof self?self:this,function(e,t){return function(e){var t={};function s(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,s),n.l=!0,n.exports}return s.m=e,s.c=t,s.d=function(e,t,i){s.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=62)}({0:function(t,s){t.exports=e},1:function(e,s){e.exports=t},2:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(s(0)),n=a(s(1));function a(e){return e&&e.__esModule?e:{default:e}}const o=e=>{const t=e.customPath?e.customPath:`/bundles/ezplatformadminui/img/ez-icons.svg#${e.name}`;let s="ez-icon";return e.extraClasses&&(s=`${s} ${e.extraClasses}`),i.default.createElement("svg",{className:s},i.default.createElement("use",{xlinkHref:t}))};o.propTypes={extraClasses:n.default.string.isRequired,name:n.default.string,customPath:n.default.string},o.defaultProps={customPath:null,name:null},t.default=o},3:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getBasicRequestInit=(({token:e,siteaccess:t})=>({headers:{"X-Siteaccess":t,"X-CSRF-Token":e},mode:"same-origin",credentials:"same-origin"}));const i=t.handleRequestError=(e=>{if(!e.ok)throw Error(e.statusText);return e});t.handleRequestResponse=(e=>i(e).json()),t.handleRequestResponseStatus=(e=>i(e).status)},4:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=t.NOTIFICATION_INFO_LABEL="info",n=t.NOTIFICATION_SUCCESS_LABEL="success",a=t.NOTIFICATION_WARNING_LABEL="warning",o=t.NOTIFICATION_ERROR_LABEL="danger",r=t.showNotification=(e=>{const t=new CustomEvent("ez-notify",{detail:e});document.body.dispatchEvent(t)});t.showInfoNotification=(e=>{r({message:e,label:i})}),t.showSuccessNotification=(e=>{r({message:e,label:n})}),t.showWarningNotification=(e=>{r({message:e,label:a})}),t.showErrorNotification=(e=>{const t=e instanceof Error?e.message:e;r({message:t,label:o})})},62:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(0),n=d(i),a=d(s(1)),o=d(s(63)),r=s(66);function d(e){return e&&e.__esModule?e:{default:e}}const u="ez-content-tree-subtree";class l extends i.Component{constructor(e){super(e),this.setInitialItemsState=this.setInitialItemsState.bind(this),this.loadMoreSubitems=this.loadMoreSubitems.bind(this),this.updateSubtreeAfterItemToggle=this.updateSubtreeAfterItemToggle.bind(this);const t=localStorage.getItem(u);this.items=e.preloadedLocations,this.subtree=t?JSON.parse(t):null}componentDidMount(){this.items.length||(this.subtree?(0,r.loadSubtree)(this.props.restInfo,this.subtree,e=>{this.setInitialItemsState(e[0])}):(0,r.loadLocationItems)(this.props.rootLocationId,this.setInitialItemsState))}setInitialItemsState(e){this.items=[e],this.subtree=this.generateSubtree(this.items),this.forceUpdate()}loadMoreSubitems({parentLocationId:e,offset:t,limit:s,path:i},n){(0,r.loadLocationItems)(e,this.updateLocationsStateAfterLoadingMoreItems.bind(this,i,n),s,t)}updateLocationsStateAfterLoadingMoreItems(e,t,s){const i=this.findItem(this.items,e.split(","));i&&(i.subitems=[...i.subitems,...s.subitems],this.updateSubtreeAfterLoadMoreItems(e),t(),this.forceUpdate())}updateSubtreeAfterLoadMoreItems(e){const t=this.findItem(this.items,e.split(","));this.updateItemInSubtree(this.subtree[0],t,e.split(",")),this.saveSubtree()}updateSubtreeAfterItemToggle(e,t){const s=this.findItem(this.items,e.split(","));t?this.addItemToSubtree(this.subtree[0],s,e.split(",")):this.removeItemFromSubtree(this.subtree[0],s,e.split(",")),this.saveSubtree()}addItemToSubtree(e,t,s){const i=this.findParentSubtree(e,s);if(!i)return;const n=this.props.subitemsLoadLimit;i.children.push({"_media-type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode",locationId:t.locationId,limit:Math.ceil(t.subitems.length/n)*n,offset:0,children:[]})}removeItemFromSubtree(e,t,s){const i=this.findParentSubtree(e,s);if(!i)return;const n=i.children.findIndex(e=>e.locationId===parseInt(s[1],10));n>-1&&i.children.splice(n,1)}updateItemInSubtree(e,t,s){const i=this.findParentSubtree(e,s);if(!i)return;const n=i.children.findIndex(e=>e.locationId===parseInt(s[1],10));n>-1&&(i.children[n].limit=t.subitems.length)}saveSubtree(){localStorage.setItem(u,JSON.stringify(this.subtree))}findParentSubtree(e,t){if(t.length<2)return;if(2===t.length)return e;const s=e.children.find(e=>e.locationId===parseInt(t[1],10));return t.shift(),this.findParentSubtree(s,t)}generateSubtree(e){const t=[],s=this.props.subitemsLoadLimit;for(const i of e){!i.subitems.length||t.push({"_media-type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode",locationId:i.locationId,limit:Math.ceil(i.subitems.length/s)*s,offset:0,children:this.generateSubtree(i.subitems)})}return t}findItem(e,t){const s=1===t.length,i=e.find(e=>e.locationId===parseInt(t[0],10));return i?s?i:i.hasOwnProperty("subitems")&&Array.isArray(i.subitems)?(t.shift(),this.findItem(i.subitems,t)):null:null}render(){var e=this.props;const t=e.currentLocationId,s=e.subitemsLoadLimit,i={items:this.items,currentLocationId:t,subitemsLoadLimit:s,loadMoreSubitems:this.loadMoreSubitems,afterItemToggle:this.updateSubtreeAfterItemToggle};return n.default.createElement(o.default,i)}}t.default=l,eZ.addConfig("modules.ContentTree",l),l.propTypes={rootLocationId:a.default.number.isRequired,currentLocationId:a.default.number.isRequired,preloadedLocations:a.default.arrayOf(a.default.object),subitemsLoadLimit:a.default.number,restInfo:a.default.shape({token:a.default.string.isRequired,siteaccess:a.default.string.isRequired}).isRequired},l.defaultProps={rootLocationId:2,preloadedLocations:[],subitemsLoadLimit:10}},63:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(0),n=r(i),a=r(s(1)),o=r(s(64));function r(e){return e&&e.__esModule?e:{default:e}}const d="ez-is-tree-resizing";class u extends i.Component{constructor(e){super(e),this.changeContainerWidth=this.changeContainerWidth.bind(this),this.addWidthChangeListener=this.addWidthChangeListener.bind(this),this.handleResizeEnd=this.handleResizeEnd.bind(this),this._refTreeContainer=n.default.createRef(),this.state={resizeStartPositionX:0,containerWidth:0,resizedContainerWidth:0,isResizing:!1}}componentWillUnmount(){this.clearDocumentResizingListeners()}changeContainerWidth({clientX:e}){const t=e;this.setState(e=>({resizedContainerWidth:e.containerWidth+(t-e.resizeStartPositionX)}))}addWidthChangeListener({nativeEvent:e}){const t=e.clientX,s=this._refTreeContainer.current.getBoundingClientRect().width;window.document.addEventListener("mousemove",this.changeContainerWidth,!1),window.document.addEventListener("mouseup",this.handleResizeEnd,!1),window.document.body.classList.add(d),this.setState(()=>({resizeStartPositionX:t,containerWidth:s,isResizing:!0}))}handleResizeEnd(){this.clearDocumentResizingListeners(),this.setState(e=>({resizeStartPositionX:0,containerWidth:e.resizedContainerWidth,isResizing:!1}))}clearDocumentResizingListeners(){window.document.removeEventListener("mousemove",this.changeContainerWidth),window.document.removeEventListener("mouseup",this.handleResizeEnd),window.document.body.classList.remove(d)}render(){var e=this.state;const t=e.isResizing,s=e.containerWidth,i=e.resizedContainerWidth;var a=this.props;const r=a.items,d=a.loadMoreSubitems,u=a.currentLocationId,l=a.subitemsLoadLimit,c=a.afterItemToggle,m=t?i:s,h=r.length?r[0].subitems:[],f=r.length?""+r[0].locationId:"",p={className:"m-tree",ref:this._refTreeContainer},b={items:h,path:f,loadMoreSubitems:d,currentLocationId:u,subitemsLoadLimit:l,afterItemToggle:c};return m&&(p.style={width:`${m}px`}),n.default.createElement("div",p,n.default.createElement(o.default,b),n.default.createElement("div",{className:"m-tree__resize-handler",onMouseDown:this.addWidthChangeListener}))}}t.default=u,u.propTypes={items:a.default.array.isRequired,loadMoreSubitems:a.default.func.isRequired,currentLocationId:a.default.number.isRequired,subitemsLoadLimit:a.default.number,afterItemToggle:a.default.func.isRequired}},64:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t{const l={loadMoreSubitems:t,currentLocationId:s,subitemsLoadLimit:r,afterItemToggle:u},c={loadMoreSubitems:t,afterItemToggle:u};return n.default.createElement("ul",{className:"c-list"},e.map(e=>{const t=a&&a.length,u=window.Routing.generate("_ezpublishLocation",{locationId:e.locationId}),m=`${t?a+",":""}${e.locationId}`,h=e.subitems;return n.default.createElement(o.default,i({},e,c,{key:e.locationId,selected:e.locationId===s,subitemsLoadLimit:r,href:u,path:m}),h.length?n.default.createElement(d,i({path:m,items:h},l)):null)}))};d.propTypes={path:a.default.string.isRequired,items:a.default.array.isRequired,loadMoreSubitems:a.default.func.isRequired,currentLocationId:a.default.number.isRequired,subitemsLoadLimit:a.default.number,afterItemToggle:a.default.func.isRequired},t.default=d},65:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(0),n=r(i),a=r(s(1)),o=r(s(2));function r(e){return e&&e.__esModule?e:{default:e}}class d extends i.Component{constructor(e){super(e),this.toggleExpandedState=this.toggleExpandedState.bind(this),this.cancelLoadingState=this.cancelLoadingState.bind(this),this.loadMoreSubitems=this.loadMoreSubitems.bind(this),this.handleAfterExpandedStateChange=this.handleAfterExpandedStateChange.bind(this),this.state={isExpanded:!!e.subitems.length,isLoading:!1}}cancelLoadingState(){this.setState(()=>({isLoading:!1}))}toggleExpandedState(){this.setState(e=>({isExpanded:!e.isExpanded}),()=>{var e=this.props;(0,e.afterItemToggle)(e.path,this.state.isExpanded),this.handleAfterExpandedStateChange()})}handleAfterExpandedStateChange(){this.state.isExpanded&&!this.props.subitems.length&&this.loadMoreSubitems()}loadMoreSubitems(){if(this.state.isLoading)return;var e=this.props;const t=e.subitems,s=e.path,i=e.locationId,n=e.loadMoreSubitems;this.setState(()=>({isLoading:!0}),()=>n({path:s,parentLocationId:i,offset:t.length,limit:this.props.subitemsLoadLimit},this.cancelLoadingState))}checkCanLoadMore(){var e=this.props;const t=e.subitems,s=e.totalSubitemsCount;return t.length{const r=new Request(`/api/ezp/v2/location/tree/load-subitems/${e}/${s}/${a}`,{method:"GET",mode:"same-origin",credentials:"same-origin",headers:{Accept:"application/vnd.ez.api.ContentTreeNode+json"}});fetch(r).then(i.handleRequestResponse).then(e=>{const t=e.ContentTreeNode;return t.children=t.children.map(o),o(t)}).then(t).catch(n.showErrorNotification)}),t.loadSubtree=(({token:e,siteaccess:t},s,o)=>{const r=new Request("/api/ezp/v2/location/tree/load-subtree",{method:"POST",mode:"same-origin",credentials:"same-origin",body:JSON.stringify({LoadSubtreeRequest:{"_media-type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequest",nodes:s}}),headers:{Accept:"application/vnd.ez.api.ContentTreeRoot+json","Content-Type":"application/vnd.ez.api.ContentTreeLoadSubtreeRequest+json","X-Siteaccess":t,"X-CSRF-Token":e}});fetch(r).then(i.handleRequestResponse).then(e=>{const t=e.ContentTreeRoot.ContentTreeNodeList;return a(t)}).then(o).catch(n.showErrorNotification)});const a=e=>e.map(e=>(o(e),e.subitems=a(e.subitems),e)),o=e=>(e.totalSubitemsCount=e.totalChildrenCount,e.subitems=e.children,delete e.totalChildrenCount,delete e.children,delete e.displayLimit,e)}}).default}); //# sourceMappingURL=ContentTree.module.js.map \ No newline at end of file diff --git a/Resources/public/js/ContentTree.module.js.map b/Resources/public/js/ContentTree.module.js.map index 1b0e14eb..2c658833 100644 --- a/Resources/public/js/ContentTree.module.js.map +++ b/Resources/public/js/ContentTree.module.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b2275d860cd52e01c324","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/common/helpers/request.helper.js","webpack:///./src/modules/common/services/notification.service.js","webpack:///./src/modules/content-tree/content.tree.module.js","webpack:///./src/modules/content-tree/components/content-tree/content.tree.js","webpack:///./src/modules/content-tree/components/list/list.component.js","webpack:///./src/modules/content-tree/components/list-item/list.item.component.js","webpack:///./src/modules/content-tree/services/content.tree.service.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","getBasicRequestInit","token","siteaccess","headers","X-Siteaccess","X-CSRF-Token","mode","credentials","handleRequestError","response","ok","Error","statusText","handleRequestResponse","json","handleRequestResponseStatus","status","NOTIFICATION_INFO_LABEL","NOTIFICATION_SUCCESS_LABEL","NOTIFICATION_WARNING_LABEL","NOTIFICATION_ERROR_LABEL","showNotification","detail","event","CustomEvent","document","body","dispatchEvent","showInfoNotification","message","label","showSuccessNotification","showWarningNotification","showErrorNotification","error","_react","_contentTree","KEY_CONTENT_TREE_SUBTREE","ContentTreeModule","Component","constructor","super","setInitialItemsState","bind","loadMoreSubitems","updateSubtreeAfterItemToggle","savedSubtree","localStorage","getItem","items","preloadedLocations","subtree","JSON","parse","e","componentDidMount","length","loadSubtree","restInfo","loadedSubtree","loadLocationItems","rootLocationId","location","generateSubtree","forceUpdate","parentLocationId","offset","limit","path","successCallback","updateLocationsStateAfterLoadingMoreItems","item","findItem","split","subitems","updateSubtreeAfterLoadMoreItems","updateItemInSubtree","saveSubtree","isExpanded","addItemToSubtree","removeItemFromSubtree","parentSubtree","findParentSubtree","subitemsLoadLimit","children","push","_media-type","locationId","Math","ceil","index","findIndex","element","parseInt","splice","setItem","stringify","subtreeSubtree","find","shift","itemsWithoutLeafs","isLast","Array","isArray","render","_props","currentLocationId","attrs","afterItemToggle","_content2","eZ","addConfig","number","arrayOf","shape","CLASS_IS_TREE_RESIZING","ContentTree","changeContainerWidth","addWidthChangeListener","handleResizeEnd","_refTreeContainer","React","createRef","state","resizeStartPositionX","containerWidth","resizedContainerWidth","isResizing","componentWillUnmount","clearDocumentResizingListeners","clientX","currentPositionX","setState","nativeEvent","current","getBoundingClientRect","width","window","addEventListener","classList","add","removeEventListener","remove","_state","rootLocationSubitems","rootLocationPath","containerAttrs","ref","listAttrs","style","_list2","onMouseDown","array","func","List","listItemAttrs","map","hasPreviousPath","locationHref","Routing","generate","itemPath","_listItem2","_extends","key","selected","href","ListItem","toggleExpandedState","cancelLoadingState","handleAfterExpandedStateChange","isLoading","_props2","checkCanLoadMore","_props3","totalSubitemsCount","renderIcon","_props4","contentTypeIdentifier","iconAttrs","helpers","contentType","getContentTypeIconUrl","_icon2","renderLoadMoreBtn","loadingSpinner","showMoreLabel","Translator","trans","loadingMoreLabel","btnLabel","type","onClick","_props5","isInvisible","itemAttrs","togglerAttrs","hidden","tabIndex","bool","isContainer","_request","_notification","callback","request","Request","method","Accept","fetch","then","data","ContentTreeNode","mapChildrenToSubitems","catch","LoadSubtreeRequest","nodes","Content-Type","ContentTreeRoot","ContentTreeNodeList","mapChildrenToSubitemsDeep","tree","parsedSubtree","totalChildrenCount","displayLimit"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,eACA,mBAAAC,eAAAC,IACAD,QAAA,sBAAAJ,GACA,iBAAAC,QACAA,QAAA,YAAAD,EAAAG,QAAA,SAAAA,QAAA,gBAEAJ,EAAA,GAAAA,EAAA,OAA+BA,EAAA,WAAAA,EAAA,eAAq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K,aAETjK","file":"ContentTree.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ContentTree\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"ContentTree\"] = factory(root[\"React\"], root[\"PropTypes\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 62);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b2275d860cd52e01c324","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","/**\n * Returns basic RequestInit object for Request\n *\n * @function getBasicRequestInit\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @returns {RequestInit}\n */\nexport const getBasicRequestInit = ({ token, siteaccess }) => {\n return {\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n };\n};\n\n/**\n * Handles request error\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Response}\n */\nexport const handleRequestError = (response) => {\n if (!response.ok) {\n throw Error(response.statusText);\n }\n\n return response;\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Error|Promise}\n */\nexport const handleRequestResponse = (response) => {\n return handleRequestError(response).json();\n};\n\n/**\n * Handles request response; returns status if response is OK\n *\n * @function handleRequestResponseStatus\n * @param {Response} response\n * @returns {number}\n */\nexport const handleRequestResponseStatus = (response) => {\n return handleRequestError(response).status;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/request.helper.js","export const NOTIFICATION_INFO_LABEL = 'info';\nexport const NOTIFICATION_SUCCESS_LABEL = 'success';\nexport const NOTIFICATION_WARNING_LABEL = 'warning';\nexport const NOTIFICATION_ERROR_LABEL = 'danger';\n\n/**\n * Dispatches notification event\n *\n * @method showNotification\n * @param {{message: string, label: string}} detail\n */\nexport const showNotification = (detail) => {\n const event = new CustomEvent('ez-notify', {\n detail,\n });\n\n document.body.dispatchEvent(event);\n};\n\n/**\n * Dispatches info notification event\n *\n * @method showInfoNotification\n * @param {String} message\n */\nexport const showInfoNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_INFO_LABEL,\n });\n};\n\n/**\n * Dispatches success notification event\n *\n * @method showSuccessNotification\n * @param {String} message\n */\nexport const showSuccessNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_SUCCESS_LABEL,\n });\n};\n\n/**\n * Dispatches warning notification event\n *\n * @method showWarningNotification\n * @param {String} message\n */\nexport const showWarningNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_WARNING_LABEL,\n });\n};\n\n/**\n * Dispatches error notification event\n *\n * @method showErrorNotification\n * @param {(string|Error)} error\n */\nexport const showErrorNotification = (error) => {\n const isErrorObj = error instanceof Error;\n const message = isErrorObj ? error.message : error;\n\n showNotification({\n message,\n label: NOTIFICATION_ERROR_LABEL,\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/services/notification.service.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ContentTree from './components/content-tree/content.tree';\nimport { loadLocationItems, loadSubtree } from './services/content.tree.service';\n\nconst KEY_CONTENT_TREE_SUBTREE = 'ez-content-tree-subtree';\n\nexport default class ContentTreeModule extends Component {\n constructor(props) {\n super(props);\n\n this.setInitialItemsState = this.setInitialItemsState.bind(this);\n this.loadMoreSubitems = this.loadMoreSubitems.bind(this);\n this.updateSubtreeAfterItemToggle = this.updateSubtreeAfterItemToggle.bind(this);\n\n const savedSubtree = localStorage.getItem(KEY_CONTENT_TREE_SUBTREE);\n\n this.items = props.preloadedLocations;\n\n try {\n this.subtree = savedSubtree ? JSON.parse(savedSubtree) : null;\n } catch (e) {\n this.subtree = null;\n }\n }\n\n componentDidMount() {\n if (this.items.length) {\n return;\n }\n\n if (this.subtree) {\n loadSubtree(this.props.restInfo, this.subtree, (loadedSubtree) => {\n this.setInitialItemsState(loadedSubtree[0]);\n });\n\n return;\n }\n\n loadLocationItems(this.props.rootLocationId, this.setInitialItemsState);\n }\n\n setInitialItemsState(location) {\n this.items = [location];\n this.subtree = this.generateSubtree(this.items);\n\n this.forceUpdate();\n }\n\n loadMoreSubitems({ parentLocationId, offset, limit, path }, successCallback) {\n loadLocationItems(\n parentLocationId,\n this.updateLocationsStateAfterLoadingMoreItems.bind(this, path, successCallback),\n limit,\n offset\n );\n }\n\n updateLocationsStateAfterLoadingMoreItems(path, successCallback, location) {\n const item = this.findItem(this.items, path.split(','));\n\n if (!item) {\n return;\n }\n\n item.subitems = [...item.subitems, ...location.subitems];\n\n this.updateSubtreeAfterLoadMoreItems(path);\n successCallback();\n this.forceUpdate();\n }\n\n updateSubtreeAfterLoadMoreItems(path) {\n const item = this.findItem(this.items, path.split(','));\n\n this.updateItemInSubtree(this.subtree[0], item, path.split(','));\n this.saveSubtree();\n }\n\n updateSubtreeAfterItemToggle(path, isExpanded) {\n const item = this.findItem(this.items, path.split(','));\n\n if (isExpanded) {\n this.addItemToSubtree(this.subtree[0], item, path.split(','));\n } else {\n this.removeItemFromSubtree(this.subtree[0], item, path.split(','));\n }\n\n this.saveSubtree();\n }\n\n addItemToSubtree(subtree, item, path) {\n const parentSubtree = this.findParentSubtree(subtree, item, path);\n\n if (!parentSubtree) {\n return;\n }\n\n const { subitemsLoadLimit } = this.props;\n\n parentSubtree.children.push({\n '_media-type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode',\n locationId: item.locationId,\n limit: Math.ceil(item.subitems.length / subitemsLoadLimit) * subitemsLoadLimit,\n offset: 0,\n children: [],\n });\n }\n\n removeItemFromSubtree(subtree, item, path) {\n const parentSubtree = this.findParentSubtree(subtree, item, path);\n\n if (!parentSubtree) {\n return;\n }\n\n const index = parentSubtree.children.findIndex((element) => parseInt(element.locationId, 10) === parseInt(path[1], 10));\n\n if (index > -1) {\n parentSubtree.children.splice(index, 1);\n }\n }\n\n updateItemInSubtree(subtree, item, path) {\n const parentSubtree = this.findParentSubtree(subtree, item, path);\n\n if (!parentSubtree) {\n return;\n }\n\n const index = parentSubtree.children.findIndex((element) => element.locationId === parseInt(path[1], 10));\n\n if (index > -1) {\n parentSubtree.children[index].limit = item.subitems.length;\n }\n }\n\n saveSubtree() {\n localStorage.setItem(KEY_CONTENT_TREE_SUBTREE, JSON.stringify(this.subtree));\n }\n\n findParentSubtree(subtree, item, path) {\n if (path.length < 2) {\n return;\n }\n\n const isParent = path.length === 2;\n\n if (isParent) {\n return subtree;\n }\n\n const subtreeSubtree = subtree.children.find((element) => element.locationId === parseInt(path[1], 10));\n\n path.shift();\n\n return this.findParentSubtree(subtreeSubtree, item, path);\n }\n\n generateSubtree(items) {\n const itemsWithoutLeafs = [];\n const { subitemsLoadLimit } = this.props;\n\n for (const item of items) {\n const isLeaf = !item.subitems.length;\n\n if (!isLeaf) {\n itemsWithoutLeafs.push({\n '_media-type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode',\n locationId: item.locationId,\n limit: Math.ceil(item.subitems.length / subitemsLoadLimit) * subitemsLoadLimit,\n offset: 0,\n children: this.generateSubtree(item.subitems),\n });\n }\n }\n\n return itemsWithoutLeafs;\n }\n\n findItem(items, path) {\n const isLast = path.length === 1;\n const item = items.find((element) => element.locationId === parseInt(path[0], 10));\n\n if (!item) {\n return null;\n }\n\n if (isLast) {\n return item;\n }\n\n if (!(item.hasOwnProperty('subitems') && Array.isArray(item.subitems))) {\n return null;\n }\n\n path.shift();\n\n return this.findItem(item.subitems, path);\n }\n\n render() {\n const { currentLocationId, subitemsLoadLimit } = this.props;\n const attrs = {\n items: this.items,\n currentLocationId,\n subitemsLoadLimit,\n loadMoreSubitems: this.loadMoreSubitems,\n afterItemToggle: this.updateSubtreeAfterItemToggle,\n };\n\n return ;\n }\n}\n\neZ.addConfig('modules.ContentTree', ContentTreeModule);\n\nContentTreeModule.propTypes = {\n rootLocationId: PropTypes.number.isRequired,\n currentLocationId: PropTypes.number.isRequired,\n preloadedLocations: PropTypes.arrayOf(PropTypes.object),\n subitemsLoadLimit: PropTypes.number,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nContentTreeModule.defaultProps = {\n rootLocationId: 2,\n preloadedLocations: [],\n subitemsLoadLimit: 10,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/content.tree.module.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport List from '../list/list.component';\n\nconst CLASS_IS_TREE_RESIZING = 'ez-is-tree-resizing';\n\nexport default class ContentTree extends Component {\n constructor(props) {\n super(props);\n\n this.changeContainerWidth = this.changeContainerWidth.bind(this);\n this.addWidthChangeListener = this.addWidthChangeListener.bind(this);\n this.handleResizeEnd = this.handleResizeEnd.bind(this);\n this._refTreeContainer = React.createRef();\n\n this.state = {\n resizeStartPositionX: 0,\n containerWidth: 0,\n resizedContainerWidth: 0,\n isResizing: false,\n };\n }\n\n componentWillUnmount() {\n this.clearDocumentResizingListeners();\n }\n\n changeContainerWidth({ clientX }) {\n const currentPositionX = clientX;\n\n this.setState((state) => ({\n resizedContainerWidth: state.containerWidth + (currentPositionX - state.resizeStartPositionX),\n }));\n }\n\n addWidthChangeListener({ nativeEvent }) {\n const resizeStartPositionX = nativeEvent.clientX;\n const containerWidth = this._refTreeContainer.current.getBoundingClientRect().width;\n\n window.document.addEventListener('mousemove', this.changeContainerWidth, false);\n window.document.addEventListener('mouseup', this.handleResizeEnd, false);\n window.document.body.classList.add(CLASS_IS_TREE_RESIZING);\n\n this.setState(() => ({ resizeStartPositionX, containerWidth, isResizing: true }));\n }\n\n handleResizeEnd() {\n this.clearDocumentResizingListeners();\n\n this.setState((state) => ({\n resizeStartPositionX: 0,\n containerWidth: state.resizedContainerWidth,\n isResizing: false,\n }));\n }\n\n clearDocumentResizingListeners() {\n window.document.removeEventListener('mousemove', this.changeContainerWidth);\n window.document.removeEventListener('mouseup', this.handleResizeEnd);\n window.document.body.classList.remove(CLASS_IS_TREE_RESIZING);\n }\n\n render() {\n const { isResizing, containerWidth, resizedContainerWidth } = this.state;\n const { items, loadMoreSubitems, currentLocationId, subitemsLoadLimit, afterItemToggle } = this.props;\n const width = isResizing ? resizedContainerWidth : containerWidth;\n const rootLocationSubitems = items.length ? items[0].subitems : [];\n const rootLocationPath = items.length ? '' + items[0].locationId : '';\n const containerAttrs = { className: 'm-tree', ref: this._refTreeContainer };\n const listAttrs = {\n items: rootLocationSubitems,\n path: rootLocationPath,\n loadMoreSubitems,\n currentLocationId,\n subitemsLoadLimit,\n afterItemToggle,\n };\n\n if (width) {\n containerAttrs.style = { width: `${width}px` };\n }\n\n return (\n
\n \n
\n
\n );\n }\n}\n\nContentTree.propTypes = {\n items: PropTypes.array.isRequired,\n loadMoreSubitems: PropTypes.func.isRequired,\n currentLocationId: PropTypes.number.isRequired,\n subitemsLoadLimit: PropTypes.number,\n afterItemToggle: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/components/content-tree/content.tree.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item/list.item.component';\n\nconst List = ({ items, loadMoreSubitems, currentLocationId, path, subitemsLoadLimit, afterItemToggle }) => {\n const listAttrs = { loadMoreSubitems, currentLocationId, subitemsLoadLimit, afterItemToggle };\n const listItemAttrs = { loadMoreSubitems, afterItemToggle };\n\n return (\n
    \n {items.map((item) => {\n const hasPreviousPath = path && path.length;\n const locationHref = window.Routing.generate('_ezpublishLocation', { locationId: item.locationId });\n const itemPath = `${hasPreviousPath ? path + ',' : ''}${item.locationId}`;\n const { subitems } = item;\n\n return (\n \n {subitems.length ? : null}\n \n );\n })}\n
\n );\n};\n\nList.propTypes = {\n path: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired,\n loadMoreSubitems: PropTypes.func.isRequired,\n currentLocationId: PropTypes.number.isRequired,\n subitemsLoadLimit: PropTypes.number,\n afterItemToggle: PropTypes.func.isRequired,\n};\n\nexport default List;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/components/list/list.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nclass ListItem extends Component {\n constructor(props) {\n super(props);\n\n this.toggleExpandedState = this.toggleExpandedState.bind(this);\n this.cancelLoadingState = this.cancelLoadingState.bind(this);\n this.loadMoreSubitems = this.loadMoreSubitems.bind(this);\n this.handleAfterExpandedStateChange = this.handleAfterExpandedStateChange.bind(this);\n\n this.state = {\n isExpanded: !!props.subitems.length,\n isLoading: false,\n };\n }\n\n cancelLoadingState() {\n this.setState(() => ({ isLoading: false }));\n }\n\n toggleExpandedState() {\n this.setState(\n (state) => ({ isExpanded: !state.isExpanded }),\n () => {\n const { afterItemToggle, path } = this.props;\n\n afterItemToggle(path, this.state.isExpanded);\n this.handleAfterExpandedStateChange();\n }\n );\n }\n\n handleAfterExpandedStateChange() {\n const loadInitialItems = this.state.isExpanded && !this.props.subitems.length;\n\n if (loadInitialItems) {\n this.loadMoreSubitems();\n }\n }\n\n loadMoreSubitems() {\n if (this.state.isLoading) {\n return;\n }\n\n const { subitems, path, locationId, loadMoreSubitems } = this.props;\n\n this.setState(\n () => ({ isLoading: true }),\n () =>\n loadMoreSubitems(\n {\n path,\n parentLocationId: locationId,\n offset: subitems.length,\n limit: this.props.subitemsLoadLimit,\n },\n this.cancelLoadingState\n )\n );\n }\n\n checkCanLoadMore() {\n const { subitems, totalSubitemsCount } = this.props;\n\n return subitems.length < totalSubitemsCount;\n }\n\n /**\n * Renders an icon of a content type\n *\n * @method renderIcon\n * @returns {JSX.Element}\n */\n renderIcon() {\n const { contentTypeIdentifier, selected } = this.props;\n const iconAttrs = {\n extraClasses: `ez-icon--small ez-icon--${selected ? 'light' : 'dark'}`,\n };\n\n if (!this.state.isLoading || this.props.subitems.length) {\n iconAttrs.customPath =\n eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier) || eZ.helpers.contentType.getContentTypeIconUrl('file');\n } else {\n iconAttrs.name = 'spinner';\n iconAttrs.extraClasses = `${iconAttrs.extraClasses} ez-spin`;\n }\n\n return (\n \n \n \n );\n }\n\n renderLoadMoreBtn() {\n const { subitems } = this.props;\n\n if (!this.state.isExpanded || !this.checkCanLoadMore() || !subitems.length) {\n return null;\n }\n\n const { isLoading } = this.state;\n let loadingSpinner = null;\n const showMoreLabel = Translator.trans(/*@Desc(\"Show more\")*/ 'show_more', {}, 'content_tree');\n const loadingMoreLabel = Translator.trans(/*@Desc(\"Loading more...\")*/ 'loading_more', {}, 'content_tree');\n const btnLabel = isLoading ? loadingMoreLabel : showMoreLabel;\n\n if (isLoading) {\n loadingSpinner = ;\n }\n\n return (\n \n );\n }\n\n render() {\n const { totalSubitemsCount, children, isInvisible, selected, href, name } = this.props;\n const itemClassName = 'c-list-item';\n const togglerClassName = 'c-list-item__toggler';\n const itemAttrs = { className: itemClassName };\n const togglerAttrs = {\n className: togglerClassName,\n onClick: this.toggleExpandedState,\n hidden: !totalSubitemsCount,\n tabIndex: -1,\n };\n\n if (totalSubitemsCount) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--has-sub-items`;\n }\n\n if (this.checkCanLoadMore()) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--can-load-more`;\n }\n\n if (this.state.isExpanded) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--is-expanded`;\n }\n\n if (isInvisible) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--is-hidden`;\n }\n\n if (selected) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--is-selected`;\n togglerAttrs.className = `${togglerAttrs.className} ${togglerClassName}--light`;\n }\n\n return (\n
  • \n \n {children}\n {this.renderLoadMoreBtn()}\n
  • \n );\n }\n}\n\nListItem.propTypes = {\n path: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n contentTypeIdentifier: PropTypes.string.isRequired,\n totalSubitemsCount: PropTypes.number.isRequired,\n subitems: PropTypes.array.isRequired,\n children: PropTypes.element,\n hidden: PropTypes.bool.isRequired,\n isContainer: PropTypes.bool.isRequired,\n selected: PropTypes.bool.isRequired,\n locationId: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n isInvisible: PropTypes.bool.isRequired,\n loadMoreSubitems: PropTypes.func.isRequired,\n subitemsLoadLimit: PropTypes.number,\n afterItemToggle: PropTypes.func.isRequired,\n};\n\nListItem.defaultProps = {\n hidden: false,\n};\n\nexport default ListItem;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/components/list-item/list.item.component.js","import { handleRequestResponse } from '../../common/helpers/request.helper';\nimport { showErrorNotification } from '../../common/services/notification.service';\n\nconst ENDPOINT_LOAD_SUBITEMS = '/api/ezp/v2/location/tree/load-subitems';\nconst ENDPOINT_LOAD_SUBTREE = '/api/ezp/v2/location/tree/load-subtree';\n\nexport const loadLocationItems = (parentLocationId, callback, limit = 50, offset = 0) => {\n const request = new Request(`${ENDPOINT_LOAD_SUBITEMS}/${parentLocationId}/${limit}/${offset}`, {\n method: 'GET',\n mode: 'same-origin',\n credentials: 'same-origin',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTreeNode+json',\n },\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then((data) => {\n const location = data.ContentTreeNode;\n\n location.children = location.children.map(mapChildrenToSubitems);\n\n return mapChildrenToSubitems(location);\n })\n .then(callback)\n .catch(showErrorNotification);\n};\n\nexport const loadSubtree = ({ token, siteaccess }, subtree, callback) => {\n const request = new Request(`${ENDPOINT_LOAD_SUBTREE}`, {\n method: 'POST',\n mode: 'same-origin',\n credentials: 'same-origin',\n body: JSON.stringify({\n LoadSubtreeRequest: {\n \"_media-type\": \"application/vnd.ez.api.ContentTreeLoadSubtreeRequest\",\n nodes: subtree,\n },\n }),\n\n headers: {\n Accept: 'application/vnd.ez.api.ContentTreeRoot+json',\n 'Content-Type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequest+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then((data) => {\n const loadedSubtree = data.ContentTreeRoot.ContentTreeNodeList;\n\n return mapChildrenToSubitemsDeep(loadedSubtree);\n })\n .then(callback)\n .catch(showErrorNotification);\n};\n\nconst mapChildrenToSubitemsDeep = (tree) => {\n const parsedSubtree = [];\n\n for (const subtree of tree) {\n mapChildrenToSubitems(subtree);\n subtree.subitems = mapChildrenToSubitemsDeep(subtree.subitems);\n\n parsedSubtree.push(subtree);\n }\n\n return parsedSubtree;\n};\n\nconst mapChildrenToSubitems = (location) => {\n location.totalSubitemsCount = location.totalChildrenCount;\n location.subitems = location.children;\n location.totalSubitemsCount = location.totalChildrenCount;\n\n delete location.totalChildrenCount;\n delete location.children;\n delete location.displayLimit;\n\n return location;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/services/content.tree.service.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 9e3e3de79ce53e8fc1c1","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/common/helpers/request.helper.js","webpack:///./src/modules/common/services/notification.service.js","webpack:///./src/modules/content-tree/content.tree.module.js","webpack:///./src/modules/content-tree/components/content-tree/content.tree.js","webpack:///./src/modules/content-tree/components/list/list.component.js","webpack:///./src/modules/content-tree/components/list-item/list.item.component.js","webpack:///./src/modules/content-tree/services/content.tree.service.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","getBasicRequestInit","token","siteaccess","headers","X-Siteaccess","X-CSRF-Token","mode","credentials","handleRequestError","response","ok","Error","statusText","handleRequestResponse","json","handleRequestResponseStatus","status","NOTIFICATION_INFO_LABEL","NOTIFICATION_SUCCESS_LABEL","NOTIFICATION_WARNING_LABEL","NOTIFICATION_ERROR_LABEL","showNotification","detail","event","CustomEvent","document","body","dispatchEvent","showInfoNotification","message","label","showSuccessNotification","showWarningNotification","showErrorNotification","error","_react","_contentTree","KEY_CONTENT_TREE_SUBTREE","ContentTreeModule","Component","constructor","super","setInitialItemsState","bind","loadMoreSubitems","updateSubtreeAfterItemToggle","savedSubtree","localStorage","getItem","items","preloadedLocations","subtree","JSON","parse","componentDidMount","length","loadSubtree","restInfo","loadedSubtree","loadLocationItems","rootLocationId","location","generateSubtree","forceUpdate","parentLocationId","offset","limit","path","successCallback","updateLocationsStateAfterLoadingMoreItems","item","findItem","split","subitems","updateSubtreeAfterLoadMoreItems","updateItemInSubtree","saveSubtree","isExpanded","addItemToSubtree","removeItemFromSubtree","parentSubtree","findParentSubtree","subitemsLoadLimit","children","push","_media-type","locationId","Math","ceil","index","findIndex","element","parseInt","splice","setItem","stringify","subtreeSubtree","find","shift","itemsWithoutLeafs","isLast","Array","isArray","render","_props","currentLocationId","attrs","afterItemToggle","_content2","eZ","addConfig","number","arrayOf","shape","CLASS_IS_TREE_RESIZING","ContentTree","changeContainerWidth","addWidthChangeListener","handleResizeEnd","_refTreeContainer","React","createRef","state","resizeStartPositionX","containerWidth","resizedContainerWidth","isResizing","componentWillUnmount","clearDocumentResizingListeners","clientX","currentPositionX","setState","nativeEvent","current","getBoundingClientRect","width","window","addEventListener","classList","add","removeEventListener","remove","_state","rootLocationSubitems","rootLocationPath","containerAttrs","ref","listAttrs","style","_list2","onMouseDown","array","func","List","listItemAttrs","map","hasPreviousPath","locationHref","Routing","generate","itemPath","_listItem2","_extends","key","selected","href","ListItem","toggleExpandedState","cancelLoadingState","handleAfterExpandedStateChange","isLoading","_props2","checkCanLoadMore","_props3","totalSubitemsCount","renderIcon","_props4","contentTypeIdentifier","iconAttrs","helpers","contentType","getContentTypeIconUrl","_icon2","renderLoadMoreBtn","loadingSpinner","showMoreLabel","Translator","trans","loadingMoreLabel","btnLabel","type","onClick","_props5","isInvisible","itemAttrs","togglerAttrs","hidden","tabIndex","bool","isContainer","_request","_notification","callback","request","Request","method","Accept","fetch","then","data","ContentTreeNode","mapChildrenToSubitems","catch","LoadSubtreeRequest","nodes","Content-Type","ContentTreeRoot","ContentTreeNodeList","mapChildren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EAAyBtJ,IAC3BA,EAASiH,mBAAqBjH,EAAS+J,mBACvC/J,EAASY,SAAWZ,EAASsB,gBAEtBtB,EAAS+J,0BACT/J,EAASsB,gBACTtB,EAASgK,aAEThK","file":"ContentTree.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ContentTree\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"ContentTree\"] = factory(root[\"React\"], root[\"PropTypes\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 62);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9e3e3de79ce53e8fc1c1","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","/**\n * Returns basic RequestInit object for Request\n *\n * @function getBasicRequestInit\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @returns {RequestInit}\n */\nexport const getBasicRequestInit = ({ token, siteaccess }) => {\n return {\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n };\n};\n\n/**\n * Handles request error\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Response}\n */\nexport const handleRequestError = (response) => {\n if (!response.ok) {\n throw Error(response.statusText);\n }\n\n return response;\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Error|Promise}\n */\nexport const handleRequestResponse = (response) => {\n return handleRequestError(response).json();\n};\n\n/**\n * Handles request response; returns status if response is OK\n *\n * @function handleRequestResponseStatus\n * @param {Response} response\n * @returns {number}\n */\nexport const handleRequestResponseStatus = (response) => {\n return handleRequestError(response).status;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/request.helper.js","export const NOTIFICATION_INFO_LABEL = 'info';\nexport const NOTIFICATION_SUCCESS_LABEL = 'success';\nexport const NOTIFICATION_WARNING_LABEL = 'warning';\nexport const NOTIFICATION_ERROR_LABEL = 'danger';\n\n/**\n * Dispatches notification event\n *\n * @method showNotification\n * @param {{message: string, label: string}} detail\n */\nexport const showNotification = (detail) => {\n const event = new CustomEvent('ez-notify', {\n detail,\n });\n\n document.body.dispatchEvent(event);\n};\n\n/**\n * Dispatches info notification event\n *\n * @method showInfoNotification\n * @param {String} message\n */\nexport const showInfoNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_INFO_LABEL,\n });\n};\n\n/**\n * Dispatches success notification event\n *\n * @method showSuccessNotification\n * @param {String} message\n */\nexport const showSuccessNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_SUCCESS_LABEL,\n });\n};\n\n/**\n * Dispatches warning notification event\n *\n * @method showWarningNotification\n * @param {String} message\n */\nexport const showWarningNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_WARNING_LABEL,\n });\n};\n\n/**\n * Dispatches error notification event\n *\n * @method showErrorNotification\n * @param {(string|Error)} error\n */\nexport const showErrorNotification = (error) => {\n const isErrorObj = error instanceof Error;\n const message = isErrorObj ? error.message : error;\n\n showNotification({\n message,\n label: NOTIFICATION_ERROR_LABEL,\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/services/notification.service.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ContentTree from './components/content-tree/content.tree';\nimport { loadLocationItems, loadSubtree } from './services/content.tree.service';\n\nconst KEY_CONTENT_TREE_SUBTREE = 'ez-content-tree-subtree';\n\nexport default class ContentTreeModule extends Component {\n constructor(props) {\n super(props);\n\n this.setInitialItemsState = this.setInitialItemsState.bind(this);\n this.loadMoreSubitems = this.loadMoreSubitems.bind(this);\n this.updateSubtreeAfterItemToggle = this.updateSubtreeAfterItemToggle.bind(this);\n\n const savedSubtree = localStorage.getItem(KEY_CONTENT_TREE_SUBTREE);\n\n this.items = props.preloadedLocations;\n this.subtree = savedSubtree ? JSON.parse(savedSubtree) : null;\n }\n\n componentDidMount() {\n if (this.items.length) {\n return;\n }\n\n if (this.subtree) {\n loadSubtree(this.props.restInfo, this.subtree, (loadedSubtree) => {\n this.setInitialItemsState(loadedSubtree[0]);\n });\n\n return;\n }\n\n loadLocationItems(this.props.rootLocationId, this.setInitialItemsState);\n }\n\n setInitialItemsState(location) {\n this.items = [location];\n this.subtree = this.generateSubtree(this.items);\n\n this.forceUpdate();\n }\n\n loadMoreSubitems({ parentLocationId, offset, limit, path }, successCallback) {\n loadLocationItems(\n parentLocationId,\n this.updateLocationsStateAfterLoadingMoreItems.bind(this, path, successCallback),\n limit,\n offset\n );\n }\n\n updateLocationsStateAfterLoadingMoreItems(path, successCallback, location) {\n const item = this.findItem(this.items, path.split(','));\n\n if (!item) {\n return;\n }\n\n item.subitems = [...item.subitems, ...location.subitems];\n\n this.updateSubtreeAfterLoadMoreItems(path);\n successCallback();\n this.forceUpdate();\n }\n\n updateSubtreeAfterLoadMoreItems(path) {\n const item = this.findItem(this.items, path.split(','));\n\n this.updateItemInSubtree(this.subtree[0], item, path.split(','));\n this.saveSubtree();\n }\n\n updateSubtreeAfterItemToggle(path, isExpanded) {\n const item = this.findItem(this.items, path.split(','));\n\n if (isExpanded) {\n this.addItemToSubtree(this.subtree[0], item, path.split(','));\n } else {\n this.removeItemFromSubtree(this.subtree[0], item, path.split(','));\n }\n\n this.saveSubtree();\n }\n\n addItemToSubtree(subtree, item, path) {\n const parentSubtree = this.findParentSubtree(subtree, path);\n\n if (!parentSubtree) {\n return;\n }\n\n const { subitemsLoadLimit } = this.props;\n\n parentSubtree.children.push({\n '_media-type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode',\n locationId: item.locationId,\n limit: Math.ceil(item.subitems.length / subitemsLoadLimit) * subitemsLoadLimit,\n offset: 0,\n children: [],\n });\n }\n\n removeItemFromSubtree(subtree, item, path) {\n const parentSubtree = this.findParentSubtree(subtree, path);\n\n if (!parentSubtree) {\n return;\n }\n\n const index = parentSubtree.children.findIndex((element) => element.locationId === parseInt(path[1], 10));\n\n if (index > -1) {\n parentSubtree.children.splice(index, 1);\n }\n }\n\n updateItemInSubtree(subtree, item, path) {\n const parentSubtree = this.findParentSubtree(subtree, path);\n\n if (!parentSubtree) {\n return;\n }\n\n const index = parentSubtree.children.findIndex((element) => element.locationId === parseInt(path[1], 10));\n\n if (index > -1) {\n parentSubtree.children[index].limit = item.subitems.length;\n }\n }\n\n saveSubtree() {\n localStorage.setItem(KEY_CONTENT_TREE_SUBTREE, JSON.stringify(this.subtree));\n }\n\n findParentSubtree(subtree, path) {\n if (path.length < 2) {\n return;\n }\n\n const isParent = path.length === 2;\n\n if (isParent) {\n return subtree;\n }\n\n const subtreeSubtree = subtree.children.find((element) => element.locationId === parseInt(path[1], 10));\n\n path.shift();\n\n return this.findParentSubtree(subtreeSubtree, path);\n }\n\n generateSubtree(items) {\n const itemsWithoutLeafs = [];\n const { subitemsLoadLimit } = this.props;\n\n for (const item of items) {\n const isLeaf = !item.subitems.length;\n\n if (!isLeaf) {\n itemsWithoutLeafs.push({\n '_media-type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequestNode',\n locationId: item.locationId,\n limit: Math.ceil(item.subitems.length / subitemsLoadLimit) * subitemsLoadLimit,\n offset: 0,\n children: this.generateSubtree(item.subitems),\n });\n }\n }\n\n return itemsWithoutLeafs;\n }\n\n findItem(items, path) {\n const isLast = path.length === 1;\n const item = items.find((element) => element.locationId === parseInt(path[0], 10));\n\n if (!item) {\n return null;\n }\n\n if (isLast) {\n return item;\n }\n\n if (!(item.hasOwnProperty('subitems') && Array.isArray(item.subitems))) {\n return null;\n }\n\n path.shift();\n\n return this.findItem(item.subitems, path);\n }\n\n render() {\n const { currentLocationId, subitemsLoadLimit } = this.props;\n const attrs = {\n items: this.items,\n currentLocationId,\n subitemsLoadLimit,\n loadMoreSubitems: this.loadMoreSubitems,\n afterItemToggle: this.updateSubtreeAfterItemToggle,\n };\n\n return ;\n }\n}\n\neZ.addConfig('modules.ContentTree', ContentTreeModule);\n\nContentTreeModule.propTypes = {\n rootLocationId: PropTypes.number.isRequired,\n currentLocationId: PropTypes.number.isRequired,\n preloadedLocations: PropTypes.arrayOf(PropTypes.object),\n subitemsLoadLimit: PropTypes.number,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nContentTreeModule.defaultProps = {\n rootLocationId: 2,\n preloadedLocations: [],\n subitemsLoadLimit: 10,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/content.tree.module.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport List from '../list/list.component';\n\nconst CLASS_IS_TREE_RESIZING = 'ez-is-tree-resizing';\n\nexport default class ContentTree extends Component {\n constructor(props) {\n super(props);\n\n this.changeContainerWidth = this.changeContainerWidth.bind(this);\n this.addWidthChangeListener = this.addWidthChangeListener.bind(this);\n this.handleResizeEnd = this.handleResizeEnd.bind(this);\n this._refTreeContainer = React.createRef();\n\n this.state = {\n resizeStartPositionX: 0,\n containerWidth: 0,\n resizedContainerWidth: 0,\n isResizing: false,\n };\n }\n\n componentWillUnmount() {\n this.clearDocumentResizingListeners();\n }\n\n changeContainerWidth({ clientX }) {\n const currentPositionX = clientX;\n\n this.setState((state) => ({\n resizedContainerWidth: state.containerWidth + (currentPositionX - state.resizeStartPositionX),\n }));\n }\n\n addWidthChangeListener({ nativeEvent }) {\n const resizeStartPositionX = nativeEvent.clientX;\n const containerWidth = this._refTreeContainer.current.getBoundingClientRect().width;\n\n window.document.addEventListener('mousemove', this.changeContainerWidth, false);\n window.document.addEventListener('mouseup', this.handleResizeEnd, false);\n window.document.body.classList.add(CLASS_IS_TREE_RESIZING);\n\n this.setState(() => ({ resizeStartPositionX, containerWidth, isResizing: true }));\n }\n\n handleResizeEnd() {\n this.clearDocumentResizingListeners();\n\n this.setState((state) => ({\n resizeStartPositionX: 0,\n containerWidth: state.resizedContainerWidth,\n isResizing: false,\n }));\n }\n\n clearDocumentResizingListeners() {\n window.document.removeEventListener('mousemove', this.changeContainerWidth);\n window.document.removeEventListener('mouseup', this.handleResizeEnd);\n window.document.body.classList.remove(CLASS_IS_TREE_RESIZING);\n }\n\n render() {\n const { isResizing, containerWidth, resizedContainerWidth } = this.state;\n const { items, loadMoreSubitems, currentLocationId, subitemsLoadLimit, afterItemToggle } = this.props;\n const width = isResizing ? resizedContainerWidth : containerWidth;\n const rootLocationSubitems = items.length ? items[0].subitems : [];\n const rootLocationPath = items.length ? '' + items[0].locationId : '';\n const containerAttrs = { className: 'm-tree', ref: this._refTreeContainer };\n const listAttrs = {\n items: rootLocationSubitems,\n path: rootLocationPath,\n loadMoreSubitems,\n currentLocationId,\n subitemsLoadLimit,\n afterItemToggle,\n };\n\n if (width) {\n containerAttrs.style = { width: `${width}px` };\n }\n\n return (\n
    \n \n
    \n
    \n );\n }\n}\n\nContentTree.propTypes = {\n items: PropTypes.array.isRequired,\n loadMoreSubitems: PropTypes.func.isRequired,\n currentLocationId: PropTypes.number.isRequired,\n subitemsLoadLimit: PropTypes.number,\n afterItemToggle: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/components/content-tree/content.tree.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item/list.item.component';\n\nconst List = ({ items, loadMoreSubitems, currentLocationId, path, subitemsLoadLimit, afterItemToggle }) => {\n const listAttrs = { loadMoreSubitems, currentLocationId, subitemsLoadLimit, afterItemToggle };\n const listItemAttrs = { loadMoreSubitems, afterItemToggle };\n\n return (\n
      \n {items.map((item) => {\n const hasPreviousPath = path && path.length;\n const locationHref = window.Routing.generate('_ezpublishLocation', { locationId: item.locationId });\n const itemPath = `${hasPreviousPath ? path + ',' : ''}${item.locationId}`;\n const { subitems } = item;\n\n return (\n \n {subitems.length ? : null}\n \n );\n })}\n
    \n );\n};\n\nList.propTypes = {\n path: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired,\n loadMoreSubitems: PropTypes.func.isRequired,\n currentLocationId: PropTypes.number.isRequired,\n subitemsLoadLimit: PropTypes.number,\n afterItemToggle: PropTypes.func.isRequired,\n};\n\nexport default List;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/components/list/list.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nclass ListItem extends Component {\n constructor(props) {\n super(props);\n\n this.toggleExpandedState = this.toggleExpandedState.bind(this);\n this.cancelLoadingState = this.cancelLoadingState.bind(this);\n this.loadMoreSubitems = this.loadMoreSubitems.bind(this);\n this.handleAfterExpandedStateChange = this.handleAfterExpandedStateChange.bind(this);\n\n this.state = {\n isExpanded: !!props.subitems.length,\n isLoading: false,\n };\n }\n\n cancelLoadingState() {\n this.setState(() => ({ isLoading: false }));\n }\n\n toggleExpandedState() {\n this.setState(\n (state) => ({ isExpanded: !state.isExpanded }),\n () => {\n const { afterItemToggle, path } = this.props;\n\n afterItemToggle(path, this.state.isExpanded);\n this.handleAfterExpandedStateChange();\n }\n );\n }\n\n handleAfterExpandedStateChange() {\n const loadInitialItems = this.state.isExpanded && !this.props.subitems.length;\n\n if (loadInitialItems) {\n this.loadMoreSubitems();\n }\n }\n\n loadMoreSubitems() {\n if (this.state.isLoading) {\n return;\n }\n\n const { subitems, path, locationId, loadMoreSubitems } = this.props;\n\n this.setState(\n () => ({ isLoading: true }),\n () =>\n loadMoreSubitems(\n {\n path,\n parentLocationId: locationId,\n offset: subitems.length,\n limit: this.props.subitemsLoadLimit,\n },\n this.cancelLoadingState\n )\n );\n }\n\n checkCanLoadMore() {\n const { subitems, totalSubitemsCount } = this.props;\n\n return subitems.length < totalSubitemsCount;\n }\n\n /**\n * Renders an icon of a content type\n *\n * @method renderIcon\n * @returns {JSX.Element}\n */\n renderIcon() {\n const { contentTypeIdentifier, selected } = this.props;\n const iconAttrs = {\n extraClasses: `ez-icon--small ez-icon--${selected ? 'light' : 'dark'}`,\n };\n\n if (!this.state.isLoading || this.props.subitems.length) {\n iconAttrs.customPath =\n eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier) || eZ.helpers.contentType.getContentTypeIconUrl('file');\n } else {\n iconAttrs.name = 'spinner';\n iconAttrs.extraClasses = `${iconAttrs.extraClasses} ez-spin`;\n }\n\n return (\n \n \n \n );\n }\n\n renderLoadMoreBtn() {\n const { subitems } = this.props;\n\n if (!this.state.isExpanded || !this.checkCanLoadMore() || !subitems.length) {\n return null;\n }\n\n const { isLoading } = this.state;\n let loadingSpinner = null;\n const showMoreLabel = Translator.trans(/*@Desc(\"Show more\")*/ 'show_more', {}, 'content_tree');\n const loadingMoreLabel = Translator.trans(/*@Desc(\"Loading more...\")*/ 'loading_more', {}, 'content_tree');\n const btnLabel = isLoading ? loadingMoreLabel : showMoreLabel;\n\n if (isLoading) {\n loadingSpinner = ;\n }\n\n return (\n \n );\n }\n\n render() {\n const { totalSubitemsCount, children, isInvisible, selected, href, name } = this.props;\n const itemClassName = 'c-list-item';\n const togglerClassName = 'c-list-item__toggler';\n const itemAttrs = { className: itemClassName };\n const togglerAttrs = {\n className: togglerClassName,\n onClick: this.toggleExpandedState,\n hidden: !totalSubitemsCount,\n tabIndex: -1,\n };\n\n if (totalSubitemsCount) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--has-sub-items`;\n }\n\n if (this.checkCanLoadMore()) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--can-load-more`;\n }\n\n if (this.state.isExpanded) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--is-expanded`;\n }\n\n if (isInvisible) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--is-hidden`;\n }\n\n if (selected) {\n itemAttrs.className = `${itemAttrs.className} ${itemClassName}--is-selected`;\n togglerAttrs.className = `${togglerAttrs.className} ${togglerClassName}--light`;\n }\n\n return (\n
  • \n \n {children}\n {this.renderLoadMoreBtn()}\n
  • \n );\n }\n}\n\nListItem.propTypes = {\n path: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n contentTypeIdentifier: PropTypes.string.isRequired,\n totalSubitemsCount: PropTypes.number.isRequired,\n subitems: PropTypes.array.isRequired,\n children: PropTypes.element,\n hidden: PropTypes.bool.isRequired,\n isContainer: PropTypes.bool.isRequired,\n selected: PropTypes.bool.isRequired,\n locationId: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n isInvisible: PropTypes.bool.isRequired,\n loadMoreSubitems: PropTypes.func.isRequired,\n subitemsLoadLimit: PropTypes.number,\n afterItemToggle: PropTypes.func.isRequired,\n};\n\nListItem.defaultProps = {\n hidden: false,\n};\n\nexport default ListItem;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/components/list-item/list.item.component.js","import { handleRequestResponse } from '../../common/helpers/request.helper';\nimport { showErrorNotification } from '../../common/services/notification.service';\n\nconst ENDPOINT_LOAD_SUBITEMS = '/api/ezp/v2/location/tree/load-subitems';\nconst ENDPOINT_LOAD_SUBTREE = '/api/ezp/v2/location/tree/load-subtree';\n\nexport const loadLocationItems = (parentLocationId, callback, limit = 50, offset = 0) => {\n const request = new Request(`${ENDPOINT_LOAD_SUBITEMS}/${parentLocationId}/${limit}/${offset}`, {\n method: 'GET',\n mode: 'same-origin',\n credentials: 'same-origin',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTreeNode+json',\n },\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then((data) => {\n const location = data.ContentTreeNode;\n\n location.children = location.children.map(mapChildrenToSubitems);\n\n return mapChildrenToSubitems(location);\n })\n .then(callback)\n .catch(showErrorNotification);\n};\n\nexport const loadSubtree = ({ token, siteaccess }, subtree, callback) => {\n const request = new Request(`${ENDPOINT_LOAD_SUBTREE}`, {\n method: 'POST',\n mode: 'same-origin',\n credentials: 'same-origin',\n body: JSON.stringify({\n LoadSubtreeRequest: {\n '_media-type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequest',\n nodes: subtree,\n },\n }),\n headers: {\n Accept: 'application/vnd.ez.api.ContentTreeRoot+json',\n 'Content-Type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequest+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then((data) => {\n const loadedSubtree = data.ContentTreeRoot.ContentTreeNodeList;\n\n return mapChildrenToSubitemsDeep(loadedSubtree);\n })\n .then(callback)\n .catch(showErrorNotification);\n};\n\nconst mapChildrenToSubitemsDeep = (tree) =>\n tree.map((subtree) => {\n mapChildrenToSubitems(subtree);\n subtree.subitems = mapChildrenToSubitemsDeep(subtree.subitems);\n\n return subtree;\n });\n\nconst mapChildrenToSubitems = (location) => {\n location.totalSubitemsCount = location.totalChildrenCount;\n location.subitems = location.children;\n\n delete location.totalChildrenCount;\n delete location.children;\n delete location.displayLimit;\n\n return location;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/content-tree/services/content.tree.service.js"],"sourceRoot":""} \ No newline at end of file diff --git a/Resources/public/js/MultiFileUpload.module.js.map b/Resources/public/js/MultiFileUpload.module.js.map index 58f067e9..6af467ce 100644 --- a/Resources/public/js/MultiFileUpload.module.js.map +++ b/Resources/public/js/MultiFileUpload.module.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b2275d860cd52e01c324","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/multi-file-upload/helpers/text.helper.js","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/multi-file-upload/multi.file.upload.module.js","webpack:///./src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js","webpack:///./src/modules/multi-file-upload/components/drop-area/drop.area.component.js","webpack:///./src/modules/multi-file-upload/components/upload-list/upload.list.component.js","webpack:///./src/modules/multi-file-upload/components/upload-list/upload.item.component.js","webpack:///./src/modules/multi-file-upload/components/progress-bar/progress.bar.component.js","webpack:///./src/modules/multi-file-upload/services/multi.file.upload.service.js","webpack:///./src/modules/common/tooltip-popup/tooltip.popup.component.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","fileSizeToString","filesize","decimalUnits","size","parseInt","unitIndex","toFixed","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","_react","_multiFileUpload","MultiFileUploadModule","Component","constructor","super","popupVisible","_itemsUploaded","itemsToUpload","length","handleDropOnWindow","bind","handleAfterUpload","showUploadPopup","hidePopup","processUploadedFiles","state","allowDropOnWindow","uploadDisabled","values","contentCreatePermissionsConfig","every","isEnabled","componentDidMount","manageDropEvent","componentDidUpdate","_state","window","addEventListener","preventDefaultAction","setState","assign","onPopupClose","itemsUploaded","event","removeEventListener","extractDroppedFilesList","list","nativeEvent","dataTransfer","target","Array","from","files","map","file","id","Math","floor","random","Date","now","preventDefault","stopPropagation","renderBtn","withUploadButton","attrs","title","Translator","trans","onClick","type","disabled","_icon2","renderPopup","visible","onClose","onAfterUpload","_uploadPopup2","render","eZ","addConfig","adminUiConfig","shape","multiFileUpload","defaultMappings","arrayOf","fallbackContentType","locationMappings","maxFileSize","number","token","siteaccess","parentInfo","contentTypeIdentifier","contentTypeId","locationPath","language","checkCanUpload","func","createFileStruct","deleteFile","publishFile","array","bool","contentTypesMap","CLASS_SCROLL_DISABLED","UploadPopupModule","uploadFiles","document","body","classList","add","componentWillUnmount","remove","UNSAFE_componentWillReceiveProps","filter","stateItem","find","propItem","tooltipAttrs","listAttrs","_tooltipPopup2","_extends","_dropArea2","onDrop","_uploadList2","popupTitle","onUpload","onUploadEnd","onUploadFail","onItemEdit","onItemRemove","_text","DropAreaComponent","_refFileInput","openFileSelector","handleUpload","click","maxFileSizeMessage","dropActionMessage","uploadBtnLabel","multiple","tabIndex","ref","hidden","onChange","UploadListComponent","items","item","data","handleAfterAbort","uploaded","total","handleAfterDelete","renderItemToUpload","renderItem","isUploaded","onAfterAbort","renderUploadedItem","onAfterDelete","customAttrs","_props","key","_uploadItem2","uploadedItemsListTitle","UploadItemComponent","handleFileSizeNotAllowed","handleFileTypeNotAllowed","handleContentTypeNotAllowed","handleEditBtnClick","handleUploadAbort","handleUploadError","handleUploadLoad","handleUploadProgress","handleUploadEnd","handleLoadStart","handleFileDeleted","abortUploading","contentInfoInput","contentVersionInfoInput","contentVersionNoInput","contentEditBtn","uploading","disallowed","disallowedType","disallowedSize","disallowedContentType","aborted","failed","deleted","progress","xhr","struct","totalSize","uploadedSize","querySelector","config","callbacks","fileTypeNotAllowedCallback","fileSizeNotAllowedCallback","contentTypeNotAllowedCallback","then","initPublishFile","upload","onabort","onerror","onload","onprogress","onloadstart","fraction","loaded","JSON","parse","response","abort","getContentTypeIdentifier","_props2","Content","contentTypeHref","ContentType","_href","contentType","identifier","renderIcon","contentTypeIconUrl","helpers","getContentTypeIconUrl","renderProgressBar","_progressBar2","renderErrorMessage","_state2","isError","cannotUploadMessage","disallowedTypeMessage","disallowedSizeMessage","disallowedContentTypeMessage","msg","renderSuccessMessage","_state3","isSuccess","message","renderAbortBtn","_state4","label","content","contentId","_id","languageCode","CurrentVersion","Version","VersionInfo","VersionTranslationInfo","Language","versionNo","value","checked","renderEditBtn","_state5","renderDeleteBtn","_state6","ProgressBarComponent","style","width","handleRequestResponse","ok","Error","text","findFileTypeMapping","mappings","mimeTypes","checkFileTypeAllowed","locationMapping","isMimeTypeAllowed","detectContentTypeMapping","prepareStruct","parentLocation","endsWith","slice","mapping","request","Request","method","headers","Accept","X-Siteaccess","X-CSRF-Token","credentials","mode","fetch","getContentTypeByIdentifier","json","catch","notification","showErrorNotification","fields","fieldDefinitionIdentifier","nameFieldIdentifier","fieldValue","contentFieldIdentifier","fileName","fileReader","result","replace","ContentCreate","ContentTypeInfoList","mainLanguageCode","LocationCreate","ParentLocation","sortField","sortOrder","Section","alwaysAvailable","remoteId","modificationDate","toISOString","field","createDraft","requestEventHandlers","XMLHttpRequest","stringify","Content-Type","Promise","resolve","reject","open","onreadystatechange","onSuccess","onError","readyState","status","statusText","keys","uploadEvents","ontimeout","headerType","setRequestHeader","send","contentTypeConfig","canCreateContent","params","readAsDataURL","FileReader","callback","X-HTTP-Method-Override","TooltipPopupComponent","children","node"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD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C,GAAGkJ,QAAQmE,aAAaC,sBAAsB,gDAW7DjM,aAAa,GAAGV,QAAOC,cAAcqG,EAAQsJ,KACtD,MAAM/D,EAAU,IAAIC,QAAQxF,EAAOyB,QAAQG,OACvC6D,OAAQ,SACRC,SACIE,eAAgBjM,EAChBkM,eAAgBnM,GAEpBqM,KAAM,OACND,YAAa,gBAGjBE,MAAMT,GACD9E,KAAK8D,GACL9D,KAAK6I,GACLnD,MAAM,IAAM/P,OAAO2C,GAAGkJ,QAAQmE,aAAaC,sBAAsB,+HCzV1E,QAAA3U,EAAA,QACAA,EAAA,QACAA,EAAA,uDAEA,MAAM8X,EAAyB7V,IAC3B,MAAMsE,GACFnE,UAAW,kBACXkJ,QAASrJ,EAAM+E,SAGnB,OACI1E,EAAAC,QAAAC,cAAA,MAAS+D,EACLjE,EAAAC,QAAAC,cAAA,OAAKJ,UAAU,2BACXE,EAAAC,QAAAC,cAAA,OAAKJ,UAAU,0BAA0BH,EAAMuE,OAC/ClE,EAAAC,QAAAC,cAAA,OAAKJ,UAAU,yBAAyBuE,QAAS1E,EAAMgF,QAASmE,SAAS,MACrE9I,EAAAC,QAAAC,cAACsE,EAAAvE,SAAK9B,KAAK,UAAU4B,aAAa,sBAG1CC,EAAAC,QAAAC,cAAA,OAAKJ,UAAU,4BAA4BH,EAAM8V,YAK7DD,EAAsBpV,WAClB8D,MAAO7D,UAAUC,OAAOC,WACxBkV,SAAUpV,UAAUqV,KAAKnV,WACzBmE,QAASrE,UAAUkG,KAAKhG,WACxBoE,QAAStE,UAAU6F,MAGvBsP,EAAsBhV,cAClBmE,QAAS,kBAGE6Q","file":"MultiFileUpload.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MultiFileUpload\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"MultiFileUpload\"] = factory(root[\"React\"], root[\"PropTypes\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 55);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b2275d860cd52e01c324","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","/**\n * Returns a filesize as a formatted string\n *\n * @function fileSizeToString\n * @param {Number} filesize\n * @returns {String}\n */\nexport const fileSizeToString = (filesize) => {\n const units = ['bytes', 'KB', 'MB', 'GB'];\n const kilobyte = 1024;\n let size = parseInt(filesize, 10) || 0;\n let unitIndex = 0;\n let decimalUnits;\n\n while (size >= kilobyte) {\n size = size / kilobyte;\n unitIndex++;\n }\n\n decimalUnits = unitIndex < 1 ? 0 : 1;\n\n return size.toFixed(size >= 10 || decimalUnits) + ' ' + units[unitIndex];\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/helpers/text.helper.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport UploadPopupComponent from './components/upload-popup/upload.popup.component';\nimport { createFileStruct, publishFile, deleteFile, checkCanUpload } from './services/multi.file.upload.service';\nimport Icon from '../common/icon/icon';\n\nexport default class MultiFileUploadModule extends Component {\n constructor(props) {\n super(props);\n\n let popupVisible = true;\n\n this._itemsUploaded = [];\n\n if (!props.itemsToUpload || !props.itemsToUpload.length) {\n popupVisible = false;\n }\n\n this.handleDropOnWindow = this.handleDropOnWindow.bind(this);\n this.handleAfterUpload = this.handleAfterUpload.bind(this);\n this.showUploadPopup = this.showUploadPopup.bind(this);\n this.hidePopup = this.hidePopup.bind(this);\n this.processUploadedFiles = this.processUploadedFiles.bind(this);\n\n this.state = {\n popupVisible,\n itemsToUpload: props.itemsToUpload,\n allowDropOnWindow: true,\n uploadDisabled: Object.values(props.contentCreatePermissionsConfig).every((isEnabled) => !isEnabled),\n };\n }\n\n componentDidMount() {\n this.manageDropEvent();\n }\n\n componentDidUpdate() {\n this.manageDropEvent();\n }\n\n /**\n * Attaches `drop` and `dragover` events handlers on window\n *\n * @method manageDropEvent\n * @memberof MultiFileUploadModule\n */\n manageDropEvent() {\n const { uploadDisabled, popupVisible, itemsToUpload } = this.state;\n\n if (!uploadDisabled && !popupVisible && !itemsToUpload.length) {\n window.addEventListener('drop', this.handleDropOnWindow, false);\n window.addEventListener('dragover', this.preventDefaultAction, false);\n }\n }\n\n /**\n * Hides multi file upload popup\n *\n * @method hidePopup\n * @memberof MultiFileUploadModule\n */\n hidePopup() {\n this.setState((state) => Object.assign({}, state, { popupVisible: false }));\n\n this.props.onPopupClose(this._itemsUploaded);\n }\n\n /**\n * Displays multi file upload popup\n *\n * @method showUploadPopup\n * @memberof MultiFileUploadModule\n */\n showUploadPopup() {\n this.setState((state) =>\n Object.assign({}, state, {\n popupVisible: true,\n itemsToUpload: [],\n })\n );\n }\n\n /**\n * Keeps information about uploaded files.\n * We want to avoid component rerendering so it's stored in an object instance property.\n *\n * @method handleAfterUpload\n * @param {Array} itemsUploaded\n * @memberof MultiFileUploadModule\n */\n handleAfterUpload(itemsUploaded) {\n this._itemsUploaded = itemsUploaded;\n }\n\n /**\n * Handles dropping on window.\n * When file/files are dropped onto window the `drop` and `dragover` event handlers are removed.\n *\n * @method handleDropOnWindow\n * @param {Event} event\n * @memberof MultiFileUploadModule\n */\n handleDropOnWindow(event) {\n this.preventDefaultAction(event);\n\n const itemsToUpload = this.processUploadedFiles(event);\n\n // Covers the case when dragging and dropping page elements inside the browser,\n // like links, images, etc.\n if (!this.state.allowDropOnWindow || !itemsToUpload.length) {\n return;\n }\n\n window.removeEventListener('drop', this.handleDropOnWindow, false);\n window.removeEventListener('dragover', this.preventDefaultAction, false);\n\n this.setState((state) =>\n Object.assign({}, state, {\n itemsToUpload,\n popupVisible: true,\n allowDropOnWindow: false,\n })\n );\n }\n\n /**\n * Extracts information about dropped files\n *\n * @method extractDroppedFilesList\n * @param {Event} event\n * @returns {undefined|Array}\n * @memberof MultiFileUploadModule\n */\n extractDroppedFilesList(event) {\n let list;\n\n if (event.nativeEvent) {\n list = event.nativeEvent.dataTransfer || event.nativeEvent.target;\n } else {\n list = event.dataTransfer;\n }\n\n return list;\n }\n\n /**\n * Processes uploaded files and generates an unique file id\n *\n * @method processUploadedFiles\n * @param {Event} event\n * @returns {Array}\n * @memberof MultiFileUploadModule\n */\n processUploadedFiles(event) {\n const list = this.extractDroppedFilesList(event);\n\n return Array.from(list.files).map((file) => ({\n id: Math.floor(Math.random() * Date.now()),\n file,\n }));\n }\n\n /**\n * Prevents default event actions\n *\n * @method preventDefaultAction\n * @param {Event} event\n * @memberof MultiFileUploadModule\n */\n preventDefaultAction(event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n /**\n * Renders multi file upload button,\n * that allows to open multi file upload popup.\n *\n * @method renderBtn\n * @returns {null|Element}\n * @memberof MultiFileUploadModule\n */\n renderBtn() {\n if (!this.props.withUploadButton) {\n return null;\n }\n\n const uploadDisabled = this.state.uploadDisabled;\n const title = Translator.trans(/*@Desc(\"Upload sub-items\")*/ 'multi_file_upload_open_btn.label', {}, 'multi_file_upload');\n const attrs = { className: 'm-mfu__btn--upload', title, onClick: this.showUploadPopup, type: 'button' };\n\n if (uploadDisabled) {\n delete attrs.onClick;\n\n attrs.disabled = true;\n }\n\n return (\n \n );\n }\n\n /**\n * Renders a popup\n *\n * @method renderPopup\n * @returns {null|Element}\n * @memberof MultiFileUploadModule\n */\n renderPopup() {\n if (!this.state.popupVisible) {\n return null;\n }\n\n const attrs = {\n ...this.props,\n visible: true,\n onClose: this.hidePopup,\n itemsToUpload: this.state.itemsToUpload,\n onAfterUpload: this.handleAfterUpload,\n preventDefaultAction: this.preventDefaultAction,\n processUploadedFiles: this.processUploadedFiles,\n };\n\n return ;\n }\n\n render() {\n return (\n
    \n {this.renderBtn()}\n {this.renderPopup()}\n
    \n );\n }\n}\n\neZ.addConfig('modules.MultiFileUpload', MultiFileUploadModule);\n\nMultiFileUploadModule.propTypes = {\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n checkCanUpload: PropTypes.func,\n createFileStruct: PropTypes.func,\n deleteFile: PropTypes.func,\n onPopupClose: PropTypes.func,\n publishFile: PropTypes.func,\n itemsToUpload: PropTypes.array,\n withUploadButton: PropTypes.bool,\n contentCreatePermissionsConfig: PropTypes.object,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nMultiFileUploadModule.defaultProps = {\n checkCanUpload,\n createFileStruct,\n deleteFile,\n onPopupClose: () => {},\n publishFile,\n itemsToUpload: [],\n withUploadButton: true,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/multi.file.upload.module.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TooltipPopup from '../../../common/tooltip-popup/tooltip.popup.component';\nimport DropAreaComponent from '../drop-area/drop.area.component';\nimport UploadListComponent from '../upload-list/upload.list.component';\n\nconst CLASS_SCROLL_DISABLED = 'ez-scroll-disabled';\n\nexport default class UploadPopupModule extends Component {\n constructor(props) {\n super(props);\n\n this.uploadFiles = this.uploadFiles.bind(this);\n\n this.state = { itemsToUpload: props.itemsToUpload };\n }\n\n componentDidMount() {\n window.document.body.classList.add(CLASS_SCROLL_DISABLED);\n }\n\n componentWillUnmount() {\n window.document.body.classList.remove(CLASS_SCROLL_DISABLED);\n }\n\n UNSAFE_componentWillReceiveProps(props) {\n this.setState((state) => {\n const stateItems = state.itemsToUpload.filter(\n (stateItem) => !props.itemsToUpload.find((propItem) => propItem.id === stateItem.id)\n );\n\n return { itemsToUpload: [...stateItems, ...props.itemsToUpload] };\n });\n }\n\n /**\n * Uploads files\n *\n * @method uploadFiles\n * @param {Array} itemsToUpload\n * @memberof UploadPopupModule\n */\n uploadFiles(itemsToUpload) {\n this.setState(() => ({ itemsToUpload }));\n }\n\n render() {\n const tooltipAttrs = this.props;\n const listAttrs = {\n ...tooltipAttrs,\n itemsToUpload: this.state.itemsToUpload,\n };\n const title = Translator.trans(/*@Desc(\"Multi-file upload\")*/ 'upload_popup.title', {}, 'multi_file_upload');\n\n return (\n
    \n \n \n \n \n
    \n );\n }\n}\n\nUploadPopupModule.propTypes = {\n popupTitle: PropTypes.string.isRequired,\n visible: PropTypes.bool,\n onUpload: PropTypes.func,\n onUploadEnd: PropTypes.func,\n onUploadFail: PropTypes.func,\n onItemEdit: PropTypes.func,\n onItemRemove: PropTypes.func,\n onClose: PropTypes.func,\n itemsToUpload: PropTypes.array,\n onAfterUpload: PropTypes.func.isRequired,\n createFileStruct: PropTypes.func.isRequired,\n publishFile: PropTypes.func.isRequired,\n deleteFile: PropTypes.func.isRequired,\n checkCanUpload: PropTypes.func.isRequired,\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n preventDefaultAction: PropTypes.func.isRequired,\n processUploadedFiles: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nUploadPopupModule.defaultProps = {\n visible: true,\n itemsToUpload: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { fileSizeToString } from '../../helpers/text.helper';\nimport Icon from '../../../common/icon/icon';\n\nexport default class DropAreaComponent extends Component {\n constructor(props) {\n super(props);\n\n this._refFileInput = null;\n\n this.openFileSelector = this.openFileSelector.bind(this);\n this.handleUpload = this.handleUpload.bind(this);\n }\n\n /**\n * Opens a browser native file selector\n *\n * @method openFileSelector\n * @param {Event} event\n * @memberof DropAreaComponent\n */\n openFileSelector(event) {\n event.preventDefault();\n\n this._refFileInput.click();\n }\n\n /**\n * Handles file upload\n *\n * @method handleUpload\n * @param {Event} event\n * @memberof DropAreaComponent\n */\n handleUpload(event) {\n this.props.preventDefaultAction(event);\n this.props.onDrop(this.props.processUploadedFiles(event));\n }\n\n componentDidMount() {\n window.addEventListener('drop', this.props.preventDefaultAction, false);\n window.addEventListener('dragover', this.props.preventDefaultAction, false);\n }\n\n componentWillUnmount() {\n window.removeEventListener('drop', this.props.preventDefaultAction, false);\n window.removeEventListener('dragover', this.props.preventDefaultAction, false);\n }\n\n render() {\n const maxFileSizeMessage = Translator.trans(/*@Desc(\"Max file size:\")*/ 'max_file_size.message', {}, 'multi_file_upload');\n const dropActionMessage = Translator.trans(\n /*@Desc(\"Drag and drop your files on browser window or upload them\")*/ 'drop_action.message',\n {},\n 'multi_file_upload'\n );\n const uploadBtnLabel = Translator.trans(/*@Desc(\"Upload sub-items\")*/ 'upload_btn.label', {}, 'multi_file_upload');\n\n return (\n
    \n
    {dropActionMessage}
    \n
    \n \n {uploadBtnLabel}\n
    \n
    \n ({maxFileSizeMessage} {fileSizeToString(this.props.maxFileSize)})\n
    \n (this._refFileInput = ref)}\n id=\"mfu-files\"\n type=\"file\"\n name=\"files[]\"\n hidden\n multiple\n onChange={this.handleUpload}\n />\n \n );\n }\n}\n\nDropAreaComponent.propTypes = {\n onDrop: PropTypes.func.isRequired,\n maxFileSize: PropTypes.number.isRequired,\n processUploadedFiles: PropTypes.func.isRequired,\n preventDefaultAction: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/drop-area/drop.area.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport UploadItemComponent from './upload.item.component';\n\nexport default class UploadListComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n itemsToUpload: props.itemsToUpload,\n items: [],\n };\n }\n\n UNSAFE_componentWillReceiveProps(props) {\n this.setState((state) => {\n const stateItems = state.itemsToUpload.filter(\n (stateItem) => !props.itemsToUpload.find((propItem) => propItem.id === stateItem.id)\n );\n\n return { itemsToUpload: [...stateItems, ...props.itemsToUpload] };\n });\n }\n\n componentDidUpdate() {\n this.props.onAfterUpload(this.state.items);\n }\n\n /**\n * Handles after file upload event\n *\n * @method handleAfterUpload\n * @param {Object} item\n * @memberof UploadListComponent\n */\n handleAfterUpload(item) {\n this.setState((state) => ({\n itemsToUpload: state.itemsToUpload.filter((data) => data.id !== item.id),\n items: [...state.items, item],\n }));\n }\n\n /**\n * Handles after file upload abort event\n *\n * @method handleAfterAbort\n * @param {Object} item\n * @memberof UploadListComponent\n */\n handleAfterAbort(item) {\n this.setState((state) => {\n const items = state.items.filter((data) => data.id !== item.id);\n const itemsToUpload = state.itemsToUpload.filter((data) => data.id !== item.id);\n\n return Object.assign({}, state, {\n uploaded: items.length,\n total: items.length + itemsToUpload.length,\n itemsToUpload,\n items,\n });\n });\n }\n\n /**\n * Handles after file delete event\n *\n * @method handleAfterDelete\n * @param {Object} item\n * @memberof UploadListComponent\n */\n handleAfterDelete(item) {\n this.setState((state) => {\n const items = state.items.filter((data) => data.id !== item.id);\n const itemsToUpload = state.itemsToUpload.filter((data) => data.id !== item.id);\n\n return Object.assign({}, state, {\n uploaded: items.length,\n total: items.length + itemsToUpload.length,\n itemsToUpload,\n items,\n });\n });\n }\n\n /**\n * Renders an item to upload\n *\n * @method renderItemToUpload\n * @param {Object} item\n * @memberof UploadListComponent\n * @returns {Element}\n */\n renderItemToUpload(item) {\n return this.renderItem(item, {\n isUploaded: false,\n createFileStruct: this.props.createFileStruct,\n publishFile: this.props.publishFile,\n onAfterAbort: this.handleAfterAbort.bind(this),\n onAfterUpload: this.handleAfterUpload.bind(this),\n checkCanUpload: this.props.checkCanUpload,\n });\n }\n\n /**\n * Renders an uploaded item\n *\n * @method renderUploadedItem\n * @param {Object} item\n * @memberof UploadListComponent\n * @returns {Element}\n */\n renderUploadedItem(item) {\n return this.renderItem(item, {\n isUploaded: true,\n deleteFile: this.props.deleteFile,\n onAfterDelete: this.handleAfterDelete.bind(this),\n });\n }\n\n /**\n * Renders an item\n *\n * @method renderItem\n * @param {Object} item\n * @param {Object} customAttrs component's custom attrs\n * @memberof UploadListComponent\n * @returns {Element}\n */\n renderItem(item, customAttrs) {\n const { adminUiConfig, parentInfo, contentCreatePermissionsConfig, contentTypesMap } = this.props;\n const attrs = Object.assign(\n {\n key: item.id,\n data: item,\n adminUiConfig,\n parentInfo,\n contentCreatePermissionsConfig,\n contentTypesMap,\n },\n customAttrs\n );\n\n return ;\n }\n\n render() {\n const { items, itemsToUpload } = this.state;\n const uploaded = items.length;\n const total = uploaded + itemsToUpload.length;\n\n return (\n
    \n
    \n {this.props.uploadedItemsListTitle} ({uploaded}/{total})\n
    \n
    \n {itemsToUpload.map(this.renderItemToUpload.bind(this))}\n {items.map(this.renderUploadedItem.bind(this))}\n
    \n
    \n );\n }\n}\n\nUploadListComponent.propTypes = {\n itemsToUpload: PropTypes.arrayOf(PropTypes.object),\n onAfterUpload: PropTypes.func.isRequired,\n createFileStruct: PropTypes.func.isRequired,\n publishFile: PropTypes.func.isRequired,\n deleteFile: PropTypes.func.isRequired,\n checkCanUpload: PropTypes.func.isRequired,\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n uploadedItemsListTitle: PropTypes.string.isRequired,\n contentCreatePermissionsConfig: PropTypes.object.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nUploadListComponent.defaultProps = {\n itemsToUpload: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/upload-list/upload.list.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport ProgressBarComponent from '../progress-bar/progress.bar.component';\nimport { fileSizeToString } from '../../helpers/text.helper';\nimport Icon from '../../../common/icon/icon';\n\nexport default class UploadItemComponent extends Component {\n constructor(props) {\n super(props);\n\n this.handleFileSizeNotAllowed = this.handleFileSizeNotAllowed.bind(this);\n this.handleFileTypeNotAllowed = this.handleFileTypeNotAllowed.bind(this);\n this.handleContentTypeNotAllowed = this.handleContentTypeNotAllowed.bind(this);\n this.handleEditBtnClick = this.handleEditBtnClick.bind(this);\n this.handleUploadAbort = this.handleUploadAbort.bind(this);\n this.handleUploadError = this.handleUploadError.bind(this);\n this.handleUploadLoad = this.handleUploadLoad.bind(this);\n this.handleUploadProgress = this.handleUploadProgress.bind(this);\n this.handleUploadEnd = this.handleUploadEnd.bind(this);\n this.handleLoadStart = this.handleLoadStart.bind(this);\n this.handleFileDeleted = this.handleFileDeleted.bind(this);\n this.abortUploading = this.abortUploading.bind(this);\n this.deleteFile = this.deleteFile.bind(this);\n this.contentInfoInput = null;\n this.contentVersionInfoInput = null;\n this.contentVersionNoInput = null;\n this.contentEditBtn = null;\n this.state = {\n uploading: false,\n uploaded: props.isUploaded,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n aborted: false,\n failed: false,\n deleted: false,\n progress: 0,\n xhr: null,\n struct: props.data.struct || null,\n totalSize: fileSizeToString(props.data.file.size),\n uploadedSize: '0',\n };\n }\n\n componentDidMount() {\n const {\n data,\n adminUiConfig,\n parentInfo,\n createFileStruct,\n isUploaded,\n checkCanUpload,\n contentCreatePermissionsConfig,\n } = this.props;\n\n this.contentInfoInput = window.document.querySelector('#form_subitems_content_edit_content_info');\n this.contentVersionInfoInput = window.document.querySelector('#form_subitems_content_edit_version_info_content_info');\n this.contentVersionNoInput = window.document.querySelector('#form_subitems_content_edit_version_info_version_no');\n this.contentEditBtn = window.document.querySelector('#form_subitems_content_edit_create');\n\n if (isUploaded) {\n return;\n }\n\n const config = {\n ...adminUiConfig.multiFileUpload,\n contentCreatePermissionsConfig,\n };\n const callbacks = {\n fileTypeNotAllowedCallback: this.handleFileTypeNotAllowed,\n fileSizeNotAllowedCallback: this.handleFileSizeNotAllowed,\n contentTypeNotAllowedCallback: this.handleContentTypeNotAllowed,\n };\n\n if (!checkCanUpload(data.file, parentInfo, config, callbacks)) {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n\n return;\n }\n\n createFileStruct(data.file, {\n parentInfo,\n config: adminUiConfig,\n }).then(this.initPublishFile.bind(this, adminUiConfig));\n }\n\n /**\n * Initializes file-based content publishing\n *\n * @method initPublishFile\n * @param {Object} restInfo config object containing token and siteaccess properties\n * @param {Object} struct\n * @memberof UploadItemComponent\n */\n initPublishFile({ token, siteaccess }, struct) {\n this.props.publishFile(\n { struct, token, siteaccess },\n {\n upload: {\n onabort: this.handleUploadAbort,\n onerror: this.handleUploadError,\n onload: this.handleUploadLoad,\n onprogress: this.handleUploadProgress,\n },\n onloadstart: this.handleLoadStart,\n onerror: this.handleUploadError,\n },\n this.handleUploadEnd\n );\n }\n\n /**\n * Handles the case when a file cannot be upload because of file type\n *\n * @method handleFileTypeNotAllowed\n * @memberof UploadItemComponent\n */\n handleFileTypeNotAllowed() {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n disallowedType: true,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n }\n\n /**\n * Handles the case when a file cannot be upload because of file size\n *\n * @method handleFileSizeNotAllowed\n * @memberof UploadItemComponent\n */\n handleFileSizeNotAllowed() {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n disallowedType: false,\n disallowedSize: true,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n }\n\n handleContentTypeNotAllowed() {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: true,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n }\n\n /**\n * Handles the upload load start event\n *\n * @method handleLoadStart\n * @param {Event} event\n * @memberof UploadItemComponent\n */\n handleLoadStart(event) {\n this.setState(() => ({\n uploading: true,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: false,\n xhr: event.target,\n }));\n }\n\n /**\n * Handles the upload abort event\n *\n * @method handleUploadAbort\n * @memberof UploadItemComponent\n */\n handleUploadAbort() {\n this.setState(() => ({\n uploading: false,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: true,\n failed: false,\n }));\n }\n\n /**\n * Handles the upload error event\n *\n * @method handleUploadError\n * @memberof UploadItemComponent\n */\n handleUploadError() {\n this.setState((state) => ({\n uploading: false,\n disallowed: state.disallowed,\n disallowedSize: state.disallowedSize,\n disallowedType: state.disallowedType,\n disallowedContentType: state.disallowedContentType,\n uploaded: false,\n aborted: state.aborted,\n failed: true,\n }));\n }\n\n /**\n * Handles the upload load event\n *\n * @method handleUploadLoad\n * @memberof UploadItemComponent\n */\n handleUploadLoad() {\n this.setState(() => ({\n uploading: false,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: true,\n aborted: false,\n failed: false,\n }));\n }\n\n /**\n * Handles the upload progress event\n *\n * @method handleUploadProgress\n * @param {Event} event\n * @memberof UploadItemComponent\n */\n handleUploadProgress(event) {\n const fraction = event.loaded / event.total;\n const progress = parseInt(fraction * 100, 10);\n\n this.setState(() => ({\n uploadedSize: fileSizeToString(fraction * parseInt(this.props.data.file.size, 10)),\n uploading: true,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: false,\n progress,\n }));\n }\n\n /**\n * Handles the upload end event\n *\n * @method handleUploadEnd\n * @memberof UploadItemComponent\n */\n handleUploadEnd() {\n this.setState(\n (state) => {\n const struct = JSON.parse(state.xhr.response);\n\n return {\n struct,\n uploading: false,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: true,\n aborted: false,\n failed: false,\n };\n },\n () => {\n const data = this.props.data;\n\n this.props.onAfterUpload({ ...data, struct: this.state.struct });\n }\n );\n }\n\n /**\n * Aborts file upload\n *\n * @method abortUploading\n * @memberof UploadItemComponent\n */\n abortUploading() {\n this.state.xhr.abort();\n this.props.onAfterAbort(this.props.data);\n }\n\n /**\n * Deletes a file\n *\n * @method deleteFile\n * @memberof UploadItemComponent\n */\n deleteFile() {\n this.setState(\n () => ({ deleted: true }),\n () => this.props.deleteFile(this.props.adminUiConfig, this.state.struct, this.handleFileDeleted)\n );\n }\n\n /**\n * Handles the file deleted event\n *\n * @method handleFileDeleted\n * @memberof UploadItemComponent\n */\n handleFileDeleted() {\n this.props.onAfterDelete(this.props.data);\n }\n\n /**\n * Returns content type identifier \n * based on Content object returned from server after upload\n *\n * @method getContentTypeIdentifier\n * @memberof UploadItemComponent\n * @returns {String|null}\n */\n getContentTypeIdentifier() {\n const { contentTypesMap, data } = this.props;\n\n if (!data.struct || !data.struct.Content) {\n return null\n }\n\n const contentTypeHref = data.struct.Content.ContentType._href;\n const contentType = contentTypesMap ? contentTypesMap[contentTypeHref] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n\n return contentTypeIdentifier;\n }\n\n /**\n * Renders an icon of a content type\n *\n * @method renderIcon\n * @returns {JSX.Element|null}\n */\n renderIcon() {\n const contentTypeIdentifier = this.getContentTypeIdentifier();\n\n if (!contentTypeIdentifier) {\n return null;\n }\n\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return ;\n }\n\n /**\n * Renders a progress bar\n *\n * @method renderProgressBar\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderProgressBar() {\n const { uploaded, aborted, progress, totalSize, uploadedSize, disallowed } = this.state;\n\n if (this.props.isUploaded || uploaded || aborted || disallowed) {\n return null;\n }\n\n return ;\n }\n\n /**\n * Renders an error message\n *\n * @method renderErrorMessage\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderErrorMessage() {\n const { uploaded, aborted, disallowedType, disallowedSize, failed, uploading, disallowedContentType } = this.state;\n const isError = !uploaded && !aborted && (disallowedSize || disallowedType || disallowedContentType) && failed && !uploading;\n const cannotUploadMessage = Translator.trans(/*@Desc(\"Cannot upload file\")*/ 'cannot_upload.message', {}, 'multi_file_upload');\n const disallowedTypeMessage = Translator.trans(\n /*@Desc(\"File type is not allowed\")*/ 'disallowed_type.message',\n {},\n 'multi_file_upload'\n );\n const disallowedSizeMessage = Translator.trans(\n /*@Desc(\"File size is not allowed\")*/ 'disallowed_size.message',\n {},\n 'multi_file_upload'\n );\n const disallowedContentTypeMessage = Translator.trans(\n /*@Desc(\"You do not have permission to create this content item\")*/ 'disallowed_content_type.message',\n {},\n 'multi_file_upload'\n );\n let msg = cannotUploadMessage;\n\n if (disallowedType) {\n msg = disallowedTypeMessage;\n }\n\n if (disallowedSize) {\n msg = disallowedSizeMessage;\n }\n\n if (disallowedContentType) {\n msg = disallowedContentTypeMessage;\n }\n\n return isError ?
    {msg}
    : null;\n }\n\n /**\n * Renders an error message\n *\n * @method renderErrorMessage\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderSuccessMessage() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const isSuccess = uploaded && !aborted && !(disallowedSize || disallowedType) && !failed && !uploading;\n const message = Translator.trans(/*@Desc(\"Uploaded\")*/ 'upload.success.message', {}, 'multi_file_upload');\n\n return isSuccess ?
    {message}
    : null;\n }\n\n /**\n * Renders an abort upload button\n *\n * @method renderAbortBtn\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderAbortBtn() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const canAbort = !uploaded && !aborted && !disallowedSize && !disallowedType && !failed && uploading;\n\n if (!canAbort) {\n return null;\n }\n\n const label = Translator.trans(/*@Desc(\"Abort\")*/ 'abort.label', {}, 'multi_file_upload');\n\n return (\n \n \n
    \n );\n }\n\n /**\n * Handles the edit button click event. Fills in the hidden form to redirect a user to a correct content edit location.\n *\n * @method handleEditBtnClick\n * @memberof UploadItemComponent\n * @param {Event} event\n */\n handleEditBtnClick(event) {\n event.preventDefault();\n\n const { struct } = this.state;\n const content = struct.Content;\n const contentId = content._id;\n const languageCode = content.CurrentVersion.Version.VersionInfo.VersionTranslationInfo.Language['0'].languageCode;\n const versionNo = content.CurrentVersion.Version.VersionInfo.versionNo;\n\n this.contentInfoInput.value = contentId;\n this.contentVersionInfoInput.value = contentId;\n this.contentVersionNoInput.value = versionNo;\n window.document.querySelector(`#form_subitems_content_edit_language_${languageCode}`).checked = true;\n this.contentEditBtn.click();\n }\n\n /**\n * Renders an edit content button\n *\n * @method renderEditBtn\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderEditBtn() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const canEdit = this.props.isUploaded || (uploaded && !aborted && !(disallowedSize || disallowedType) && !failed && !uploading);\n\n if (!canEdit) {\n return null;\n }\n\n const label = Translator.trans(/*@Desc(\"Edit\")*/ 'edit.label', {}, 'multi_file_upload');\n\n return (\n \n \n
    \n );\n }\n\n /**\n * Renders an delete content button\n *\n * @method renderDeleteBtn\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderDeleteBtn() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const canDelete = this.props.isUploaded || (uploaded && !aborted && !(disallowedSize || disallowedType) && !failed && !uploading);\n\n if (!canDelete) {\n return null;\n }\n\n const label = Translator.trans(/*@Desc(\"Delete\")*/ 'delete.label', {}, 'multi_file_upload');\n\n return (\n \n \n \n );\n }\n\n render() {\n if (this.state.deleted) {\n return null;\n }\n\n return (\n
    \n
    {this.renderIcon()}
    \n
    \n
    {this.props.data.file.name}
    \n
    {this.state.uploaded ? this.state.totalSize : ''}
    \n
    \n
    \n {this.renderErrorMessage()}\n {this.renderSuccessMessage()}\n {this.renderProgressBar()}\n
    \n
    \n {this.renderAbortBtn()}\n {this.renderEditBtn()}\n {this.renderDeleteBtn()}\n
    \n
    \n );\n }\n}\n\nUploadItemComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onAfterUpload: PropTypes.func.isRequired,\n onAfterAbort: PropTypes.func.isRequired,\n onAfterDelete: PropTypes.func.isRequired,\n isUploaded: PropTypes.bool.isRequired,\n createFileStruct: PropTypes.func.isRequired,\n publishFile: PropTypes.func.isRequired,\n deleteFile: PropTypes.func.isRequired,\n checkCanUpload: PropTypes.func.isRequired,\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n contentCreatePermissionsConfig: PropTypes.object,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nUploadItemComponent.defaultProps = {\n isUploaded: false,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/upload-list/upload.item.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ProgressBarComponent = (props) => {\n return (\n
    \n
    \n
    {`${props.progress}%`}
    \n
    \n {props.uploaded} of {props.total}\n
    \n
    \n );\n};\n\nProgressBarComponent.propTypes = {\n progress: PropTypes.number.isRequired,\n uploaded: PropTypes.string.isRequired,\n total: PropTypes.string.isRequired,\n};\n\nexport default ProgressBarComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/progress-bar/progress.bar.component.js","/**\n * Handles ready state change of request\n *\n * @function handleOnReadyStateChange\n * @param {XMLHttpRequest} xhr\n * @param {Function} onSuccess\n * @param {Function} onError\n */\nconst handleOnReadyStateChange = (xhr, onSuccess, onError) => {\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (xhr.status === 0 && xhr.statusText === '') {\n // request aborted\n return;\n }\n\n if (xhr.status >= 400 || !xhr.status) {\n onError(xhr);\n\n return;\n }\n\n onSuccess(JSON.parse(xhr.response));\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {String|Response}\n */\nconst handleRequestResponse = (response) => {\n if (!response.ok) {\n throw Error(response.text());\n }\n\n return response;\n};\n\n/**\n * Read file handler\n *\n * @function readFile\n * @param {File} file\n * @param {Function} resolve\n * @param {Function} reject\n */\nconst readFile = function(file, resolve, reject) {\n this.addEventListener('load', () => resolve({ fileReader: this, file }), false);\n this.addEventListener('error', () => reject(), false);\n this.readAsDataURL(file);\n};\n\n/**\n * Finds a content type mapping based on a file type\n *\n * @function findFileTypeMapping\n * @param {Array} mappings\n * @param {File} file\n * @returns {Object|undefined}\n */\nconst findFileTypeMapping = (mappings, file) => mappings.find((item) => item.mimeTypes.find((type) => type === file.type));\n\n/**\n * Checks if file's MIME Type is allowed\n *\n * @function isMimeTypeAllowed\n * @param {Array} mappings\n * @param {File} file\n * @returns {Boolean}\n */\nconst isMimeTypeAllowed = (mappings, file) => !!findFileTypeMapping(mappings, file);\n\n/**\n * Checks if file type is allowed\n *\n * @function checkFileTypeAllowed\n * @param {File} file\n * @param {Object} locationMapping\n * @returns {Boolean}\n */\nconst checkFileTypeAllowed = (file, locationMapping) => (!locationMapping ? true : isMimeTypeAllowed(locationMapping.mappings, file));\n\n/**\n * Detects a content type for a given file\n *\n * @function detectContentTypeMapping\n * @param {File} file\n * @param {Object} parentInfo\n * @param {Object} config\n * @returns {Object} detected content type config\n */\nconst detectContentTypeMapping = (file, parentInfo, config) => {\n const locationMapping = config.locationMappings.find((item) => item.contentTypeIdentifier === parentInfo.contentTypeIdentifier);\n const mappings = locationMapping ? locationMapping.mappings : config.defaultMappings;\n\n return findFileTypeMapping(mappings, file) || config.fallbackContentType;\n};\n\n/**\n * Gets content type identifier\n *\n * @function getContentTypeByIdentifier\n * @param {Object} params params object containing token and siteaccess properties\n * @param {String} identifier content type identifier\n * @returns {Promise}\n */\nconst getContentTypeByIdentifier = ({ token, siteaccess }, identifier) => {\n const request = new Request(`/api/ezp/v2/content/types?identifier=${identifier}`, {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n credentials: 'same-origin',\n mode: 'cors',\n });\n\n return fetch(request).then(handleRequestResponse);\n};\n\n/**\n * Prepares a ContentCreate struct based on an uploaded file type\n *\n * @function prepareStruct\n * @param {Object} params params object containing parentInfo and config properties\n * @param {Object} data file data containing File object and FileReader object\n * @returns {Promise}\n */\nconst prepareStruct = ({ parentInfo, config }, data) => {\n let parentLocation = `/api/ezp/v2/content/locations${parentInfo.locationPath}`;\n\n parentLocation = parentLocation.endsWith('/') ? parentLocation.slice(0, -1) : parentLocation;\n\n const mapping = detectContentTypeMapping(data.file, parentInfo, config.multiFileUpload);\n\n return getContentTypeByIdentifier(config, mapping.contentTypeIdentifier)\n .then((response) => response.json())\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot get content type by identifier'))\n .then((response) => {\n const fields = [\n { fieldDefinitionIdentifier: mapping.nameFieldIdentifier, fieldValue: data.file.name },\n {\n fieldDefinitionIdentifier: mapping.contentFieldIdentifier,\n fieldValue: { fileName: data.file.name, data: data.fileReader.result.replace(/^.*;base64,/, '') },\n },\n ];\n\n const struct = {\n ContentCreate: {\n ContentType: { _href: response.ContentTypeInfoList.ContentType[0]._href },\n mainLanguageCode: parentInfo.language,\n LocationCreate: { ParentLocation: { _href: parentLocation }, sortField: 'PATH', sortOrder: 'ASC' },\n Section: null,\n alwaysAvailable: true,\n remoteId: null,\n modificationDate: new Date().toISOString(),\n fields: { field: fields },\n },\n };\n\n return struct;\n })\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot create content structure'));\n};\n\n/**\n * Creates a content draft\n *\n * @function createDraft\n * @param {Object} params params object containing struct, token and siteaccess properties\n * @param {Object} requestEventHandlers object containing a list of callbacks\n * @returns {Promise}\n */\nconst createDraft = ({ struct, token, siteaccess }, requestEventHandlers) => {\n const xhr = new XMLHttpRequest();\n const body = JSON.stringify(struct);\n const headers = {\n Accept: 'application/vnd.ez.api.Content+json',\n 'Content-Type': 'application/vnd.ez.api.ContentCreate+json',\n 'X-CSRF-Token': token,\n 'X-Siteaccess': siteaccess,\n };\n\n return new Promise((resolve, reject) => {\n xhr.open('POST', '/api/ezp/v2/content/objects', true);\n\n xhr.onreadystatechange = handleOnReadyStateChange.bind(null, xhr, resolve, reject);\n\n if (requestEventHandlers && Object.keys(requestEventHandlers).length) {\n const uploadEvents = requestEventHandlers.upload;\n\n if (uploadEvents && Object.keys(uploadEvents).length) {\n xhr.upload.onabort = uploadEvents.onabort;\n xhr.upload.onerror = reject;\n xhr.upload.onload = uploadEvents.onload;\n xhr.upload.onprogress = uploadEvents.onprogress;\n xhr.upload.ontimeout = uploadEvents.ontimeout;\n }\n\n xhr.onerror = reject;\n xhr.onloadstart = requestEventHandlers.onloadstart;\n }\n\n for (let headerType in headers) {\n if (headers.hasOwnProperty(headerType)) {\n xhr.setRequestHeader(headerType, headers[headerType]);\n }\n }\n\n xhr.send(body);\n });\n};\n\n/**\n * Publishes a content draft\n *\n * @function publishDraft\n * @param {Object} params params object containing token and siteaccess properties\n * @param {Object} response object containing created draft struct\n * @returns {Promise}\n */\nconst publishDraft = ({ token, siteaccess }, response) => {\n if (!response || !response.hasOwnProperty('Content')) {\n return Promise.reject('Cannot publish content based on an uploaded file');\n }\n\n const request = new Request(response.Content.CurrentVersion.Version._href, {\n method: 'POST',\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n 'X-HTTP-Method-Override': 'PUBLISH',\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n return fetch(request).then(handleRequestResponse);\n};\n\n/**\n * Checks whether a content based on an uploaded file can be created\n *\n * @function canCreateContent\n * @param {File} file\n * @param {Object} parentInfo parent info hash\n * @param {Object} config multi file upload config\n * @returns {Boolean}\n */\nconst canCreateContent = (file, parentInfo, config) => {\n if (!config.hasOwnProperty('contentCreatePermissionsConfig') || !config.contentCreatePermissionsConfig) {\n return true;\n }\n\n const contentTypeConfig = detectContentTypeMapping(file, parentInfo, config);\n\n return config.contentCreatePermissionsConfig[contentTypeConfig.contentTypeIdentifier];\n};\n\n/**\n * Checks if a file can be uploaded\n *\n * @function checkCanUpload\n * @param {File} file\n * @param {Object} parentInfo parent info hash\n * @param {Object} config multi file upload config\n * @param {Object} callbacks a list of callbacks\n * @returns {Boolean}\n */\nexport const checkCanUpload = (file, parentInfo, config, callbacks) => {\n const locationMapping = config.locationMappings.find((item) => item.contentTypeIdentifier === parentInfo.contentTypeIdentifier);\n\n if (!canCreateContent(file, parentInfo, config)) {\n callbacks.contentTypeNotAllowedCallback();\n\n return false;\n }\n\n if (!checkFileTypeAllowed(file, locationMapping)) {\n callbacks.fileTypeNotAllowedCallback();\n\n return false;\n }\n\n if (file.size > config.maxFileSize) {\n callbacks.fileSizeNotAllowedCallback();\n\n return false;\n }\n\n return true;\n};\n\n/**\n * Creates a ContentCreate struct based on a file\n *\n * @function createFileStruct\n * @param {File} file\n * @param {Object} params struct params\n * @returns {Promise}\n */\nexport const createFileStruct = (file, params) => new Promise(readFile.bind(new FileReader(), file)).then(prepareStruct.bind(null, params));\n\n/**\n * Publishes file\n *\n * @function publishFile\n * @param {Object} data file data\n * @param {Object} requestEventHandlers a list of request event handlers\n * @param {Function} callback a success callback\n */\nexport const publishFile = (data, requestEventHandlers, callback) => {\n createDraft(data, requestEventHandlers)\n .then(publishDraft.bind(null, data))\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('An error occurred while publishing a file'));\n};\n\n/**\n * Deletes file\n *\n * @function deleteFile\n * @param {Object} systemInfo system info containing: token and siteaccess info.\n * @param {Object} struct Content struct\n * @param {Function} callback file deleted callback\n */\nexport const deleteFile = ({ token, siteaccess }, struct, callback) => {\n const request = new Request(struct.Content._href, {\n method: 'DELETE',\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('An error occurred while deleting a file'));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/services/multi.file.upload.service.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon/icon';\n\nconst TooltipPopupComponent = (props) => {\n const attrs = {\n className: 'c-tooltip-popup',\n hidden: !props.visible,\n };\n\n return (\n
    \n
    \n
    {props.title}
    \n
    \n \n
    \n
    \n
    {props.children}
    \n
    \n );\n};\n\nTooltipPopupComponent.propTypes = {\n title: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired,\n visible: PropTypes.bool.isRequired,\n onClose: PropTypes.func,\n};\n\nTooltipPopupComponent.defaultProps = {\n onClose: () => {},\n};\n\nexport default TooltipPopupComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/tooltip-popup/tooltip.popup.component.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 9e3e3de79ce53e8fc1c1","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/multi-file-upload/helpers/text.helper.js","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/multi-file-upload/multi.file.upload.module.js","webpack:///./src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js","webpack:///./src/modules/multi-file-upload/components/drop-area/drop.area.component.js","webpack:///./src/modules/multi-file-upload/components/upload-list/upload.list.component.js","webpack:///./src/modules/multi-file-upload/components/upload-list/upload.item.component.js","webpack:///./src/modules/multi-file-upload/components/progress-bar/progress.bar.component.js","webpack:///./src/modules/multi-file-upload/services/multi.file.upload.service.js","webpack:///./src/modules/common/tooltip-popup/tooltip.popup.component.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","fileSizeToString","filesize","decimalUnits","size","parseInt","unitIndex","toFixed","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","_react","_multiFileUpload","MultiFileUploadModule","Component","constructor","super","popupVisible","_itemsUploaded","itemsToUpload","length","handleDropOnWindow","bind","handleAfterUpload","showUploadPopup","hidePopup","processUploadedFiles","state","allowDropOnWindow","uploadDisabled","values","contentCreatePermissionsConfig","every","isEnabled","componentDidMount","manageDropEvent","componentDidUpdate","_state","window","addEventListener","preventDefaultAction","setState","assign","onPopupClose","itemsUploaded","event","removeEventListener","extractDroppedFilesList","list","nativeEvent","dataTransfer","target","Array","from","files","map","file","id","Math","floor","random","Date","now","preventDefault","stopPropagation","renderBtn","withUploadButton","attrs","title","Translator","trans","onClick","type","disabled","_icon2","renderPopup","visible","onClose","onAfterUpload","_uploadPopup2","render","eZ","addConfig","adminUiConfig","shape","multiFileUpload","defaultMappings","arrayOf","fallbackContentType","locationMappings","maxFileSize","number","token","siteaccess","parentInfo","contentTypeIdentifier","contentTypeId","locationPath","language","checkCanUpload","func","createFileStruct","deleteFile","publishFile","array","bool","contentTypesMap","CLASS_SCROLL_DISABLED","UploadPopupModule","uploadFiles","document","body","classList","add","componentWillUnmount","remove","UNSAFE_componentWillReceiveProps","filter","stateItem","find","propItem","tooltipAttrs","listAttrs","_tooltipPopup2","_extends","_dropArea2","onDrop","_uploadList2","popupTitle","onUpload","onUploadEnd","onUploadFail","onItemEdit","onItemRemove","_text","DropAreaComponent","_refFileInput","openFileSelector","handleUpload","click","maxFileSizeMessage","dropActionMessage","uploadBtnLabel","multiple","tabIndex","ref","hidden","onChange","UploadListComponent","items","item","data","handleAfterAbort","uploaded","total","handleAfterDelete","renderItemToUpload","renderItem","isUploaded","onAfterAbort","renderUploadedItem","onAfterDelete","customAttrs","_props","key","_uploadItem2","uploadedItemsListTitle","UploadItemComponent","handleFileSizeNotAllowed","handleFileTypeNotAllowed","handleContentTypeNotAllowed","handleEditBtnClick","handleUploadAbort","handleUploadError","handleUploadLoad","handleUploadProgress","handleUploadEnd","handleLoadStart","handleFileDeleted","abortUploading","contentInfoInput","contentVersionInfoInput","contentVersionNoInput","contentEditBtn","uploading","disallowed","disallowedType","disallowedSize","disallowedContentType","aborted","failed","deleted","progress","xhr","struct","totalSize","uploadedSize","querySelector","config","callbacks","fileTypeNotAllowedCallback","fileSizeNotAllowedCallback","contentTypeNotAllowedCallback","then","initPublishFile","upload","onabort","onerror","onload","onprogress","onloadstart","fraction","loaded","JSON","parse","response","abort","getContentTypeIdentifier","_props2","Content","contentTypeHref","ContentType","_href","contentType","identifier","renderIcon","contentTypeIconUrl","helpers","getContentTypeIconUrl","renderProgressBar","_progressBar2","renderErrorMessage","_state2","isError","cannotUploadMessage","disallowedTypeMessage","disallowedSizeMessage","disallowedContentTypeMessage","msg","renderSuccessMessage","_state3","isSuccess","message","renderAbortBtn","_state4","label","content","contentId","_id","languageCode","CurrentVersion","Version","VersionInfo","VersionTranslationInfo","Language","versionNo","value","checked","renderEditBtn","_state5","renderDeleteBtn","_state6","ProgressBarComponent","style","width","handleRequestResponse","ok","Error","text","findFileTypeMapping","mappings","mimeTypes","checkFileTypeAllowed","locationMapping","isMimeTypeAllowed","detectContentTypeMapping","prepareStruct","parentLocation","endsWith","slice","mapping","request","Request","method","headers","Accept","X-Siteaccess","X-CSRF-Token","credentials","mode","fetch","getContentTypeByIdentifier","json","catch","notification","showErrorNotification","fields","fieldDefinitionIdentifier","nameFieldIdentifier","fieldValue","contentFieldIdentifier","fileName","fileReader","result","replace","ContentCreate","ContentTypeInfoList","mainLanguageCode","LocationCreate","ParentLocation","sortField","sortOrder","Section","alwaysAvailable","remoteId","modificationDate","toISOString","field","createDraft","requestEventHandlers","XMLHttpRequest","stringify","Content-Type","Promise","resolve","reject","open","onreadystatechange","onSuccess","onError","readyState","status","statusText","keys","uploadEvents","ontimeout","headerType","setRequestHeader","send","contentTypeConfig","canCreateContent","params","readAsDataURL","FileReader","callback","X-HTTP-Method-Override","TooltipPopupComponent","children","node"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,eACA,mBAAAC,eAAAC,IACAD,QAAA,sBAAAJ,GACA,iBAAAC,QACAA,QAAA,gBAAAD,EAAAG,QAAA,SAAAA,QAAA,gBAEAJ,EAAA,GAAAA,EAAA,OAA+BA,EAAA,WAAAA,EAAA,eAAqDA,EAAA,2BAAAC,EAAAD,EAAA,MAAAA,EAAA,YARpF,CASC,oBAAAO,UAAAC,KAAA,SAAAC,EAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAX,QAGA,IAAAC,EAAAQ,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAb,YAUA,OANAc,EAAAH,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAA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AAAC,QAAAC,cAAA,OAAKJ,UAAU,2BACXE,EAAAC,QAAAC,cAAA,OAAKJ,UAAU,0BAA0BH,EAAMuE,OAC/ClE,EAAAC,QAAAC,cAAA,OAAKJ,UAAU,yBAAyBuE,QAAS1E,EAAMgF,QAASmE,SAAS,MACrE9I,EAAAC,QAAAC,cAACsE,EAAAvE,SAAK9B,KAAK,UAAU4B,aAAa,sBAG1CC,EAAAC,QAAAC,cAAA,OAAKJ,UAAU,4BAA4BH,EAAM8V,YAK7DD,EAAsBpV,WAClB8D,MAAO7D,UAAUC,OAAOC,WACxBkV,SAAUpV,UAAUqV,KAAKnV,WACzBmE,QAASrE,UAAUkG,KAAKhG,WACxBoE,QAAStE,UAAU6F,MAGvBsP,EAAsBhV,cAClBmE,QAAS,kBAGE6Q","file":"MultiFileUpload.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MultiFileUpload\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"MultiFileUpload\"] = factory(root[\"React\"], root[\"PropTypes\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 55);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9e3e3de79ce53e8fc1c1","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","/**\n * Returns a filesize as a formatted string\n *\n * @function fileSizeToString\n * @param {Number} filesize\n * @returns {String}\n */\nexport const fileSizeToString = (filesize) => {\n const units = ['bytes', 'KB', 'MB', 'GB'];\n const kilobyte = 1024;\n let size = parseInt(filesize, 10) || 0;\n let unitIndex = 0;\n let decimalUnits;\n\n while (size >= kilobyte) {\n size = size / kilobyte;\n unitIndex++;\n }\n\n decimalUnits = unitIndex < 1 ? 0 : 1;\n\n return size.toFixed(size >= 10 || decimalUnits) + ' ' + units[unitIndex];\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/helpers/text.helper.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport UploadPopupComponent from './components/upload-popup/upload.popup.component';\nimport { createFileStruct, publishFile, deleteFile, checkCanUpload } from './services/multi.file.upload.service';\nimport Icon from '../common/icon/icon';\n\nexport default class MultiFileUploadModule extends Component {\n constructor(props) {\n super(props);\n\n let popupVisible = true;\n\n this._itemsUploaded = [];\n\n if (!props.itemsToUpload || !props.itemsToUpload.length) {\n popupVisible = false;\n }\n\n this.handleDropOnWindow = this.handleDropOnWindow.bind(this);\n this.handleAfterUpload = this.handleAfterUpload.bind(this);\n this.showUploadPopup = this.showUploadPopup.bind(this);\n this.hidePopup = this.hidePopup.bind(this);\n this.processUploadedFiles = this.processUploadedFiles.bind(this);\n\n this.state = {\n popupVisible,\n itemsToUpload: props.itemsToUpload,\n allowDropOnWindow: true,\n uploadDisabled: Object.values(props.contentCreatePermissionsConfig).every((isEnabled) => !isEnabled),\n };\n }\n\n componentDidMount() {\n this.manageDropEvent();\n }\n\n componentDidUpdate() {\n this.manageDropEvent();\n }\n\n /**\n * Attaches `drop` and `dragover` events handlers on window\n *\n * @method manageDropEvent\n * @memberof MultiFileUploadModule\n */\n manageDropEvent() {\n const { uploadDisabled, popupVisible, itemsToUpload } = this.state;\n\n if (!uploadDisabled && !popupVisible && !itemsToUpload.length) {\n window.addEventListener('drop', this.handleDropOnWindow, false);\n window.addEventListener('dragover', this.preventDefaultAction, false);\n }\n }\n\n /**\n * Hides multi file upload popup\n *\n * @method hidePopup\n * @memberof MultiFileUploadModule\n */\n hidePopup() {\n this.setState((state) => Object.assign({}, state, { popupVisible: false }));\n\n this.props.onPopupClose(this._itemsUploaded);\n }\n\n /**\n * Displays multi file upload popup\n *\n * @method showUploadPopup\n * @memberof MultiFileUploadModule\n */\n showUploadPopup() {\n this.setState((state) =>\n Object.assign({}, state, {\n popupVisible: true,\n itemsToUpload: [],\n })\n );\n }\n\n /**\n * Keeps information about uploaded files.\n * We want to avoid component rerendering so it's stored in an object instance property.\n *\n * @method handleAfterUpload\n * @param {Array} itemsUploaded\n * @memberof MultiFileUploadModule\n */\n handleAfterUpload(itemsUploaded) {\n this._itemsUploaded = itemsUploaded;\n }\n\n /**\n * Handles dropping on window.\n * When file/files are dropped onto window the `drop` and `dragover` event handlers are removed.\n *\n * @method handleDropOnWindow\n * @param {Event} event\n * @memberof MultiFileUploadModule\n */\n handleDropOnWindow(event) {\n this.preventDefaultAction(event);\n\n const itemsToUpload = this.processUploadedFiles(event);\n\n // Covers the case when dragging and dropping page elements inside the browser,\n // like links, images, etc.\n if (!this.state.allowDropOnWindow || !itemsToUpload.length) {\n return;\n }\n\n window.removeEventListener('drop', this.handleDropOnWindow, false);\n window.removeEventListener('dragover', this.preventDefaultAction, false);\n\n this.setState((state) =>\n Object.assign({}, state, {\n itemsToUpload,\n popupVisible: true,\n allowDropOnWindow: false,\n })\n );\n }\n\n /**\n * Extracts information about dropped files\n *\n * @method extractDroppedFilesList\n * @param {Event} event\n * @returns {undefined|Array}\n * @memberof MultiFileUploadModule\n */\n extractDroppedFilesList(event) {\n let list;\n\n if (event.nativeEvent) {\n list = event.nativeEvent.dataTransfer || event.nativeEvent.target;\n } else {\n list = event.dataTransfer;\n }\n\n return list;\n }\n\n /**\n * Processes uploaded files and generates an unique file id\n *\n * @method processUploadedFiles\n * @param {Event} event\n * @returns {Array}\n * @memberof MultiFileUploadModule\n */\n processUploadedFiles(event) {\n const list = this.extractDroppedFilesList(event);\n\n return Array.from(list.files).map((file) => ({\n id: Math.floor(Math.random() * Date.now()),\n file,\n }));\n }\n\n /**\n * Prevents default event actions\n *\n * @method preventDefaultAction\n * @param {Event} event\n * @memberof MultiFileUploadModule\n */\n preventDefaultAction(event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n /**\n * Renders multi file upload button,\n * that allows to open multi file upload popup.\n *\n * @method renderBtn\n * @returns {null|Element}\n * @memberof MultiFileUploadModule\n */\n renderBtn() {\n if (!this.props.withUploadButton) {\n return null;\n }\n\n const uploadDisabled = this.state.uploadDisabled;\n const title = Translator.trans(/*@Desc(\"Upload sub-items\")*/ 'multi_file_upload_open_btn.label', {}, 'multi_file_upload');\n const attrs = { className: 'm-mfu__btn--upload', title, onClick: this.showUploadPopup, type: 'button' };\n\n if (uploadDisabled) {\n delete attrs.onClick;\n\n attrs.disabled = true;\n }\n\n return (\n \n );\n }\n\n /**\n * Renders a popup\n *\n * @method renderPopup\n * @returns {null|Element}\n * @memberof MultiFileUploadModule\n */\n renderPopup() {\n if (!this.state.popupVisible) {\n return null;\n }\n\n const attrs = {\n ...this.props,\n visible: true,\n onClose: this.hidePopup,\n itemsToUpload: this.state.itemsToUpload,\n onAfterUpload: this.handleAfterUpload,\n preventDefaultAction: this.preventDefaultAction,\n processUploadedFiles: this.processUploadedFiles,\n };\n\n return ;\n }\n\n render() {\n return (\n
    \n {this.renderBtn()}\n {this.renderPopup()}\n
    \n );\n }\n}\n\neZ.addConfig('modules.MultiFileUpload', MultiFileUploadModule);\n\nMultiFileUploadModule.propTypes = {\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n checkCanUpload: PropTypes.func,\n createFileStruct: PropTypes.func,\n deleteFile: PropTypes.func,\n onPopupClose: PropTypes.func,\n publishFile: PropTypes.func,\n itemsToUpload: PropTypes.array,\n withUploadButton: PropTypes.bool,\n contentCreatePermissionsConfig: PropTypes.object,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nMultiFileUploadModule.defaultProps = {\n checkCanUpload,\n createFileStruct,\n deleteFile,\n onPopupClose: () => {},\n publishFile,\n itemsToUpload: [],\n withUploadButton: true,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/multi.file.upload.module.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TooltipPopup from '../../../common/tooltip-popup/tooltip.popup.component';\nimport DropAreaComponent from '../drop-area/drop.area.component';\nimport UploadListComponent from '../upload-list/upload.list.component';\n\nconst CLASS_SCROLL_DISABLED = 'ez-scroll-disabled';\n\nexport default class UploadPopupModule extends Component {\n constructor(props) {\n super(props);\n\n this.uploadFiles = this.uploadFiles.bind(this);\n\n this.state = { itemsToUpload: props.itemsToUpload };\n }\n\n componentDidMount() {\n window.document.body.classList.add(CLASS_SCROLL_DISABLED);\n }\n\n componentWillUnmount() {\n window.document.body.classList.remove(CLASS_SCROLL_DISABLED);\n }\n\n UNSAFE_componentWillReceiveProps(props) {\n this.setState((state) => {\n const stateItems = state.itemsToUpload.filter(\n (stateItem) => !props.itemsToUpload.find((propItem) => propItem.id === stateItem.id)\n );\n\n return { itemsToUpload: [...stateItems, ...props.itemsToUpload] };\n });\n }\n\n /**\n * Uploads files\n *\n * @method uploadFiles\n * @param {Array} itemsToUpload\n * @memberof UploadPopupModule\n */\n uploadFiles(itemsToUpload) {\n this.setState(() => ({ itemsToUpload }));\n }\n\n render() {\n const tooltipAttrs = this.props;\n const listAttrs = {\n ...tooltipAttrs,\n itemsToUpload: this.state.itemsToUpload,\n };\n const title = Translator.trans(/*@Desc(\"Multi-file upload\")*/ 'upload_popup.title', {}, 'multi_file_upload');\n\n return (\n
    \n \n \n \n \n
    \n );\n }\n}\n\nUploadPopupModule.propTypes = {\n popupTitle: PropTypes.string.isRequired,\n visible: PropTypes.bool,\n onUpload: PropTypes.func,\n onUploadEnd: PropTypes.func,\n onUploadFail: PropTypes.func,\n onItemEdit: PropTypes.func,\n onItemRemove: PropTypes.func,\n onClose: PropTypes.func,\n itemsToUpload: PropTypes.array,\n onAfterUpload: PropTypes.func.isRequired,\n createFileStruct: PropTypes.func.isRequired,\n publishFile: PropTypes.func.isRequired,\n deleteFile: PropTypes.func.isRequired,\n checkCanUpload: PropTypes.func.isRequired,\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n preventDefaultAction: PropTypes.func.isRequired,\n processUploadedFiles: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nUploadPopupModule.defaultProps = {\n visible: true,\n itemsToUpload: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { fileSizeToString } from '../../helpers/text.helper';\nimport Icon from '../../../common/icon/icon';\n\nexport default class DropAreaComponent extends Component {\n constructor(props) {\n super(props);\n\n this._refFileInput = null;\n\n this.openFileSelector = this.openFileSelector.bind(this);\n this.handleUpload = this.handleUpload.bind(this);\n }\n\n /**\n * Opens a browser native file selector\n *\n * @method openFileSelector\n * @param {Event} event\n * @memberof DropAreaComponent\n */\n openFileSelector(event) {\n event.preventDefault();\n\n this._refFileInput.click();\n }\n\n /**\n * Handles file upload\n *\n * @method handleUpload\n * @param {Event} event\n * @memberof DropAreaComponent\n */\n handleUpload(event) {\n this.props.preventDefaultAction(event);\n this.props.onDrop(this.props.processUploadedFiles(event));\n }\n\n componentDidMount() {\n window.addEventListener('drop', this.props.preventDefaultAction, false);\n window.addEventListener('dragover', this.props.preventDefaultAction, false);\n }\n\n componentWillUnmount() {\n window.removeEventListener('drop', this.props.preventDefaultAction, false);\n window.removeEventListener('dragover', this.props.preventDefaultAction, false);\n }\n\n render() {\n const maxFileSizeMessage = Translator.trans(/*@Desc(\"Max file size:\")*/ 'max_file_size.message', {}, 'multi_file_upload');\n const dropActionMessage = Translator.trans(\n /*@Desc(\"Drag and drop your files on browser window or upload them\")*/ 'drop_action.message',\n {},\n 'multi_file_upload'\n );\n const uploadBtnLabel = Translator.trans(/*@Desc(\"Upload sub-items\")*/ 'upload_btn.label', {}, 'multi_file_upload');\n\n return (\n
    \n
    {dropActionMessage}
    \n
    \n \n {uploadBtnLabel}\n
    \n
    \n ({maxFileSizeMessage} {fileSizeToString(this.props.maxFileSize)})\n
    \n (this._refFileInput = ref)}\n id=\"mfu-files\"\n type=\"file\"\n name=\"files[]\"\n hidden\n multiple\n onChange={this.handleUpload}\n />\n \n );\n }\n}\n\nDropAreaComponent.propTypes = {\n onDrop: PropTypes.func.isRequired,\n maxFileSize: PropTypes.number.isRequired,\n processUploadedFiles: PropTypes.func.isRequired,\n preventDefaultAction: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/drop-area/drop.area.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport UploadItemComponent from './upload.item.component';\n\nexport default class UploadListComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n itemsToUpload: props.itemsToUpload,\n items: [],\n };\n }\n\n UNSAFE_componentWillReceiveProps(props) {\n this.setState((state) => {\n const stateItems = state.itemsToUpload.filter(\n (stateItem) => !props.itemsToUpload.find((propItem) => propItem.id === stateItem.id)\n );\n\n return { itemsToUpload: [...stateItems, ...props.itemsToUpload] };\n });\n }\n\n componentDidUpdate() {\n this.props.onAfterUpload(this.state.items);\n }\n\n /**\n * Handles after file upload event\n *\n * @method handleAfterUpload\n * @param {Object} item\n * @memberof UploadListComponent\n */\n handleAfterUpload(item) {\n this.setState((state) => ({\n itemsToUpload: state.itemsToUpload.filter((data) => data.id !== item.id),\n items: [...state.items, item],\n }));\n }\n\n /**\n * Handles after file upload abort event\n *\n * @method handleAfterAbort\n * @param {Object} item\n * @memberof UploadListComponent\n */\n handleAfterAbort(item) {\n this.setState((state) => {\n const items = state.items.filter((data) => data.id !== item.id);\n const itemsToUpload = state.itemsToUpload.filter((data) => data.id !== item.id);\n\n return Object.assign({}, state, {\n uploaded: items.length,\n total: items.length + itemsToUpload.length,\n itemsToUpload,\n items,\n });\n });\n }\n\n /**\n * Handles after file delete event\n *\n * @method handleAfterDelete\n * @param {Object} item\n * @memberof UploadListComponent\n */\n handleAfterDelete(item) {\n this.setState((state) => {\n const items = state.items.filter((data) => data.id !== item.id);\n const itemsToUpload = state.itemsToUpload.filter((data) => data.id !== item.id);\n\n return Object.assign({}, state, {\n uploaded: items.length,\n total: items.length + itemsToUpload.length,\n itemsToUpload,\n items,\n });\n });\n }\n\n /**\n * Renders an item to upload\n *\n * @method renderItemToUpload\n * @param {Object} item\n * @memberof UploadListComponent\n * @returns {Element}\n */\n renderItemToUpload(item) {\n return this.renderItem(item, {\n isUploaded: false,\n createFileStruct: this.props.createFileStruct,\n publishFile: this.props.publishFile,\n onAfterAbort: this.handleAfterAbort.bind(this),\n onAfterUpload: this.handleAfterUpload.bind(this),\n checkCanUpload: this.props.checkCanUpload,\n });\n }\n\n /**\n * Renders an uploaded item\n *\n * @method renderUploadedItem\n * @param {Object} item\n * @memberof UploadListComponent\n * @returns {Element}\n */\n renderUploadedItem(item) {\n return this.renderItem(item, {\n isUploaded: true,\n deleteFile: this.props.deleteFile,\n onAfterDelete: this.handleAfterDelete.bind(this),\n });\n }\n\n /**\n * Renders an item\n *\n * @method renderItem\n * @param {Object} item\n * @param {Object} customAttrs component's custom attrs\n * @memberof UploadListComponent\n * @returns {Element}\n */\n renderItem(item, customAttrs) {\n const { adminUiConfig, parentInfo, contentCreatePermissionsConfig, contentTypesMap } = this.props;\n const attrs = Object.assign(\n {\n key: item.id,\n data: item,\n adminUiConfig,\n parentInfo,\n contentCreatePermissionsConfig,\n contentTypesMap,\n },\n customAttrs\n );\n\n return ;\n }\n\n render() {\n const { items, itemsToUpload } = this.state;\n const uploaded = items.length;\n const total = uploaded + itemsToUpload.length;\n\n return (\n
    \n
    \n {this.props.uploadedItemsListTitle} ({uploaded}/{total})\n
    \n
    \n {itemsToUpload.map(this.renderItemToUpload.bind(this))}\n {items.map(this.renderUploadedItem.bind(this))}\n
    \n
    \n );\n }\n}\n\nUploadListComponent.propTypes = {\n itemsToUpload: PropTypes.arrayOf(PropTypes.object),\n onAfterUpload: PropTypes.func.isRequired,\n createFileStruct: PropTypes.func.isRequired,\n publishFile: PropTypes.func.isRequired,\n deleteFile: PropTypes.func.isRequired,\n checkCanUpload: PropTypes.func.isRequired,\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n uploadedItemsListTitle: PropTypes.string.isRequired,\n contentCreatePermissionsConfig: PropTypes.object.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nUploadListComponent.defaultProps = {\n itemsToUpload: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/upload-list/upload.list.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport ProgressBarComponent from '../progress-bar/progress.bar.component';\nimport { fileSizeToString } from '../../helpers/text.helper';\nimport Icon from '../../../common/icon/icon';\n\nexport default class UploadItemComponent extends Component {\n constructor(props) {\n super(props);\n\n this.handleFileSizeNotAllowed = this.handleFileSizeNotAllowed.bind(this);\n this.handleFileTypeNotAllowed = this.handleFileTypeNotAllowed.bind(this);\n this.handleContentTypeNotAllowed = this.handleContentTypeNotAllowed.bind(this);\n this.handleEditBtnClick = this.handleEditBtnClick.bind(this);\n this.handleUploadAbort = this.handleUploadAbort.bind(this);\n this.handleUploadError = this.handleUploadError.bind(this);\n this.handleUploadLoad = this.handleUploadLoad.bind(this);\n this.handleUploadProgress = this.handleUploadProgress.bind(this);\n this.handleUploadEnd = this.handleUploadEnd.bind(this);\n this.handleLoadStart = this.handleLoadStart.bind(this);\n this.handleFileDeleted = this.handleFileDeleted.bind(this);\n this.abortUploading = this.abortUploading.bind(this);\n this.deleteFile = this.deleteFile.bind(this);\n this.contentInfoInput = null;\n this.contentVersionInfoInput = null;\n this.contentVersionNoInput = null;\n this.contentEditBtn = null;\n this.state = {\n uploading: false,\n uploaded: props.isUploaded,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n aborted: false,\n failed: false,\n deleted: false,\n progress: 0,\n xhr: null,\n struct: props.data.struct || null,\n totalSize: fileSizeToString(props.data.file.size),\n uploadedSize: '0',\n };\n }\n\n componentDidMount() {\n const {\n data,\n adminUiConfig,\n parentInfo,\n createFileStruct,\n isUploaded,\n checkCanUpload,\n contentCreatePermissionsConfig,\n } = this.props;\n\n this.contentInfoInput = window.document.querySelector('#form_subitems_content_edit_content_info');\n this.contentVersionInfoInput = window.document.querySelector('#form_subitems_content_edit_version_info_content_info');\n this.contentVersionNoInput = window.document.querySelector('#form_subitems_content_edit_version_info_version_no');\n this.contentEditBtn = window.document.querySelector('#form_subitems_content_edit_create');\n\n if (isUploaded) {\n return;\n }\n\n const config = {\n ...adminUiConfig.multiFileUpload,\n contentCreatePermissionsConfig,\n };\n const callbacks = {\n fileTypeNotAllowedCallback: this.handleFileTypeNotAllowed,\n fileSizeNotAllowedCallback: this.handleFileSizeNotAllowed,\n contentTypeNotAllowedCallback: this.handleContentTypeNotAllowed,\n };\n\n if (!checkCanUpload(data.file, parentInfo, config, callbacks)) {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n\n return;\n }\n\n createFileStruct(data.file, {\n parentInfo,\n config: adminUiConfig,\n }).then(this.initPublishFile.bind(this, adminUiConfig));\n }\n\n /**\n * Initializes file-based content publishing\n *\n * @method initPublishFile\n * @param {Object} restInfo config object containing token and siteaccess properties\n * @param {Object} struct\n * @memberof UploadItemComponent\n */\n initPublishFile({ token, siteaccess }, struct) {\n this.props.publishFile(\n { struct, token, siteaccess },\n {\n upload: {\n onabort: this.handleUploadAbort,\n onerror: this.handleUploadError,\n onload: this.handleUploadLoad,\n onprogress: this.handleUploadProgress,\n },\n onloadstart: this.handleLoadStart,\n onerror: this.handleUploadError,\n },\n this.handleUploadEnd\n );\n }\n\n /**\n * Handles the case when a file cannot be upload because of file type\n *\n * @method handleFileTypeNotAllowed\n * @memberof UploadItemComponent\n */\n handleFileTypeNotAllowed() {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n disallowedType: true,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n }\n\n /**\n * Handles the case when a file cannot be upload because of file size\n *\n * @method handleFileSizeNotAllowed\n * @memberof UploadItemComponent\n */\n handleFileSizeNotAllowed() {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n disallowedType: false,\n disallowedSize: true,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n }\n\n handleContentTypeNotAllowed() {\n this.setState(() => ({\n uploading: false,\n disallowed: true,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: true,\n uploaded: false,\n aborted: false,\n failed: true,\n }));\n }\n\n /**\n * Handles the upload load start event\n *\n * @method handleLoadStart\n * @param {Event} event\n * @memberof UploadItemComponent\n */\n handleLoadStart(event) {\n this.setState(() => ({\n uploading: true,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: false,\n xhr: event.target,\n }));\n }\n\n /**\n * Handles the upload abort event\n *\n * @method handleUploadAbort\n * @memberof UploadItemComponent\n */\n handleUploadAbort() {\n this.setState(() => ({\n uploading: false,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: true,\n failed: false,\n }));\n }\n\n /**\n * Handles the upload error event\n *\n * @method handleUploadError\n * @memberof UploadItemComponent\n */\n handleUploadError() {\n this.setState((state) => ({\n uploading: false,\n disallowed: state.disallowed,\n disallowedSize: state.disallowedSize,\n disallowedType: state.disallowedType,\n disallowedContentType: state.disallowedContentType,\n uploaded: false,\n aborted: state.aborted,\n failed: true,\n }));\n }\n\n /**\n * Handles the upload load event\n *\n * @method handleUploadLoad\n * @memberof UploadItemComponent\n */\n handleUploadLoad() {\n this.setState(() => ({\n uploading: false,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: true,\n aborted: false,\n failed: false,\n }));\n }\n\n /**\n * Handles the upload progress event\n *\n * @method handleUploadProgress\n * @param {Event} event\n * @memberof UploadItemComponent\n */\n handleUploadProgress(event) {\n const fraction = event.loaded / event.total;\n const progress = parseInt(fraction * 100, 10);\n\n this.setState(() => ({\n uploadedSize: fileSizeToString(fraction * parseInt(this.props.data.file.size, 10)),\n uploading: true,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: false,\n aborted: false,\n failed: false,\n progress,\n }));\n }\n\n /**\n * Handles the upload end event\n *\n * @method handleUploadEnd\n * @memberof UploadItemComponent\n */\n handleUploadEnd() {\n this.setState(\n (state) => {\n const struct = JSON.parse(state.xhr.response);\n\n return {\n struct,\n uploading: false,\n disallowed: false,\n disallowedType: false,\n disallowedSize: false,\n disallowedContentType: false,\n uploaded: true,\n aborted: false,\n failed: false,\n };\n },\n () => {\n const data = this.props.data;\n\n this.props.onAfterUpload({ ...data, struct: this.state.struct });\n }\n );\n }\n\n /**\n * Aborts file upload\n *\n * @method abortUploading\n * @memberof UploadItemComponent\n */\n abortUploading() {\n this.state.xhr.abort();\n this.props.onAfterAbort(this.props.data);\n }\n\n /**\n * Deletes a file\n *\n * @method deleteFile\n * @memberof UploadItemComponent\n */\n deleteFile() {\n this.setState(\n () => ({ deleted: true }),\n () => this.props.deleteFile(this.props.adminUiConfig, this.state.struct, this.handleFileDeleted)\n );\n }\n\n /**\n * Handles the file deleted event\n *\n * @method handleFileDeleted\n * @memberof UploadItemComponent\n */\n handleFileDeleted() {\n this.props.onAfterDelete(this.props.data);\n }\n\n /**\n * Returns content type identifier \n * based on Content object returned from server after upload\n *\n * @method getContentTypeIdentifier\n * @memberof UploadItemComponent\n * @returns {String|null}\n */\n getContentTypeIdentifier() {\n const { contentTypesMap, data } = this.props;\n\n if (!data.struct || !data.struct.Content) {\n return null\n }\n\n const contentTypeHref = data.struct.Content.ContentType._href;\n const contentType = contentTypesMap ? contentTypesMap[contentTypeHref] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n\n return contentTypeIdentifier;\n }\n\n /**\n * Renders an icon of a content type\n *\n * @method renderIcon\n * @returns {JSX.Element|null}\n */\n renderIcon() {\n const contentTypeIdentifier = this.getContentTypeIdentifier();\n\n if (!contentTypeIdentifier) {\n return null;\n }\n\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return ;\n }\n\n /**\n * Renders a progress bar\n *\n * @method renderProgressBar\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderProgressBar() {\n const { uploaded, aborted, progress, totalSize, uploadedSize, disallowed } = this.state;\n\n if (this.props.isUploaded || uploaded || aborted || disallowed) {\n return null;\n }\n\n return ;\n }\n\n /**\n * Renders an error message\n *\n * @method renderErrorMessage\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderErrorMessage() {\n const { uploaded, aborted, disallowedType, disallowedSize, failed, uploading, disallowedContentType } = this.state;\n const isError = !uploaded && !aborted && (disallowedSize || disallowedType || disallowedContentType) && failed && !uploading;\n const cannotUploadMessage = Translator.trans(/*@Desc(\"Cannot upload file\")*/ 'cannot_upload.message', {}, 'multi_file_upload');\n const disallowedTypeMessage = Translator.trans(\n /*@Desc(\"File type is not allowed\")*/ 'disallowed_type.message',\n {},\n 'multi_file_upload'\n );\n const disallowedSizeMessage = Translator.trans(\n /*@Desc(\"File size is not allowed\")*/ 'disallowed_size.message',\n {},\n 'multi_file_upload'\n );\n const disallowedContentTypeMessage = Translator.trans(\n /*@Desc(\"You do not have permission to create this content item\")*/ 'disallowed_content_type.message',\n {},\n 'multi_file_upload'\n );\n let msg = cannotUploadMessage;\n\n if (disallowedType) {\n msg = disallowedTypeMessage;\n }\n\n if (disallowedSize) {\n msg = disallowedSizeMessage;\n }\n\n if (disallowedContentType) {\n msg = disallowedContentTypeMessage;\n }\n\n return isError ?
    {msg}
    : null;\n }\n\n /**\n * Renders an error message\n *\n * @method renderErrorMessage\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderSuccessMessage() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const isSuccess = uploaded && !aborted && !(disallowedSize || disallowedType) && !failed && !uploading;\n const message = Translator.trans(/*@Desc(\"Uploaded\")*/ 'upload.success.message', {}, 'multi_file_upload');\n\n return isSuccess ?
    {message}
    : null;\n }\n\n /**\n * Renders an abort upload button\n *\n * @method renderAbortBtn\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderAbortBtn() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const canAbort = !uploaded && !aborted && !disallowedSize && !disallowedType && !failed && uploading;\n\n if (!canAbort) {\n return null;\n }\n\n const label = Translator.trans(/*@Desc(\"Abort\")*/ 'abort.label', {}, 'multi_file_upload');\n\n return (\n \n \n
    \n );\n }\n\n /**\n * Handles the edit button click event. Fills in the hidden form to redirect a user to a correct content edit location.\n *\n * @method handleEditBtnClick\n * @memberof UploadItemComponent\n * @param {Event} event\n */\n handleEditBtnClick(event) {\n event.preventDefault();\n\n const { struct } = this.state;\n const content = struct.Content;\n const contentId = content._id;\n const languageCode = content.CurrentVersion.Version.VersionInfo.VersionTranslationInfo.Language['0'].languageCode;\n const versionNo = content.CurrentVersion.Version.VersionInfo.versionNo;\n\n this.contentInfoInput.value = contentId;\n this.contentVersionInfoInput.value = contentId;\n this.contentVersionNoInput.value = versionNo;\n window.document.querySelector(`#form_subitems_content_edit_language_${languageCode}`).checked = true;\n this.contentEditBtn.click();\n }\n\n /**\n * Renders an edit content button\n *\n * @method renderEditBtn\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderEditBtn() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const canEdit = this.props.isUploaded || (uploaded && !aborted && !(disallowedSize || disallowedType) && !failed && !uploading);\n\n if (!canEdit) {\n return null;\n }\n\n const label = Translator.trans(/*@Desc(\"Edit\")*/ 'edit.label', {}, 'multi_file_upload');\n\n return (\n \n \n \n );\n }\n\n /**\n * Renders an delete content button\n *\n * @method renderDeleteBtn\n * @memberof UploadItemComponent\n * @returns {null|Element}\n */\n renderDeleteBtn() {\n const { uploaded, aborted, disallowedSize, disallowedType, failed, uploading } = this.state;\n const canDelete = this.props.isUploaded || (uploaded && !aborted && !(disallowedSize || disallowedType) && !failed && !uploading);\n\n if (!canDelete) {\n return null;\n }\n\n const label = Translator.trans(/*@Desc(\"Delete\")*/ 'delete.label', {}, 'multi_file_upload');\n\n return (\n \n \n \n );\n }\n\n render() {\n if (this.state.deleted) {\n return null;\n }\n\n return (\n
    \n
    {this.renderIcon()}
    \n
    \n
    {this.props.data.file.name}
    \n
    {this.state.uploaded ? this.state.totalSize : ''}
    \n
    \n
    \n {this.renderErrorMessage()}\n {this.renderSuccessMessage()}\n {this.renderProgressBar()}\n
    \n
    \n {this.renderAbortBtn()}\n {this.renderEditBtn()}\n {this.renderDeleteBtn()}\n
    \n
    \n );\n }\n}\n\nUploadItemComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onAfterUpload: PropTypes.func.isRequired,\n onAfterAbort: PropTypes.func.isRequired,\n onAfterDelete: PropTypes.func.isRequired,\n isUploaded: PropTypes.bool.isRequired,\n createFileStruct: PropTypes.func.isRequired,\n publishFile: PropTypes.func.isRequired,\n deleteFile: PropTypes.func.isRequired,\n checkCanUpload: PropTypes.func.isRequired,\n adminUiConfig: PropTypes.shape({\n multiFileUpload: PropTypes.shape({\n defaultMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n fallbackContentType: PropTypes.object.isRequired,\n locationMappings: PropTypes.arrayOf(PropTypes.object).isRequired,\n maxFileSize: PropTypes.number.isRequired,\n }).isRequired,\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n parentInfo: PropTypes.shape({\n contentTypeIdentifier: PropTypes.string.isRequired,\n contentTypeId: PropTypes.number.isRequired,\n locationPath: PropTypes.string.isRequired,\n language: PropTypes.string.isRequired,\n }).isRequired,\n contentCreatePermissionsConfig: PropTypes.object,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nUploadItemComponent.defaultProps = {\n isUploaded: false,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/upload-list/upload.item.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ProgressBarComponent = (props) => {\n return (\n
    \n
    \n
    {`${props.progress}%`}
    \n
    \n {props.uploaded} of {props.total}\n
    \n
    \n );\n};\n\nProgressBarComponent.propTypes = {\n progress: PropTypes.number.isRequired,\n uploaded: PropTypes.string.isRequired,\n total: PropTypes.string.isRequired,\n};\n\nexport default ProgressBarComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/components/progress-bar/progress.bar.component.js","/**\n * Handles ready state change of request\n *\n * @function handleOnReadyStateChange\n * @param {XMLHttpRequest} xhr\n * @param {Function} onSuccess\n * @param {Function} onError\n */\nconst handleOnReadyStateChange = (xhr, onSuccess, onError) => {\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (xhr.status === 0 && xhr.statusText === '') {\n // request aborted\n return;\n }\n\n if (xhr.status >= 400 || !xhr.status) {\n onError(xhr);\n\n return;\n }\n\n onSuccess(JSON.parse(xhr.response));\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {String|Response}\n */\nconst handleRequestResponse = (response) => {\n if (!response.ok) {\n throw Error(response.text());\n }\n\n return response;\n};\n\n/**\n * Read file handler\n *\n * @function readFile\n * @param {File} file\n * @param {Function} resolve\n * @param {Function} reject\n */\nconst readFile = function(file, resolve, reject) {\n this.addEventListener('load', () => resolve({ fileReader: this, file }), false);\n this.addEventListener('error', () => reject(), false);\n this.readAsDataURL(file);\n};\n\n/**\n * Finds a content type mapping based on a file type\n *\n * @function findFileTypeMapping\n * @param {Array} mappings\n * @param {File} file\n * @returns {Object|undefined}\n */\nconst findFileTypeMapping = (mappings, file) => mappings.find((item) => item.mimeTypes.find((type) => type === file.type));\n\n/**\n * Checks if file's MIME Type is allowed\n *\n * @function isMimeTypeAllowed\n * @param {Array} mappings\n * @param {File} file\n * @returns {Boolean}\n */\nconst isMimeTypeAllowed = (mappings, file) => !!findFileTypeMapping(mappings, file);\n\n/**\n * Checks if file type is allowed\n *\n * @function checkFileTypeAllowed\n * @param {File} file\n * @param {Object} locationMapping\n * @returns {Boolean}\n */\nconst checkFileTypeAllowed = (file, locationMapping) => (!locationMapping ? true : isMimeTypeAllowed(locationMapping.mappings, file));\n\n/**\n * Detects a content type for a given file\n *\n * @function detectContentTypeMapping\n * @param {File} file\n * @param {Object} parentInfo\n * @param {Object} config\n * @returns {Object} detected content type config\n */\nconst detectContentTypeMapping = (file, parentInfo, config) => {\n const locationMapping = config.locationMappings.find((item) => item.contentTypeIdentifier === parentInfo.contentTypeIdentifier);\n const mappings = locationMapping ? locationMapping.mappings : config.defaultMappings;\n\n return findFileTypeMapping(mappings, file) || config.fallbackContentType;\n};\n\n/**\n * Gets content type identifier\n *\n * @function getContentTypeByIdentifier\n * @param {Object} params params object containing token and siteaccess properties\n * @param {String} identifier content type identifier\n * @returns {Promise}\n */\nconst getContentTypeByIdentifier = ({ token, siteaccess }, identifier) => {\n const request = new Request(`/api/ezp/v2/content/types?identifier=${identifier}`, {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n credentials: 'same-origin',\n mode: 'cors',\n });\n\n return fetch(request).then(handleRequestResponse);\n};\n\n/**\n * Prepares a ContentCreate struct based on an uploaded file type\n *\n * @function prepareStruct\n * @param {Object} params params object containing parentInfo and config properties\n * @param {Object} data file data containing File object and FileReader object\n * @returns {Promise}\n */\nconst prepareStruct = ({ parentInfo, config }, data) => {\n let parentLocation = `/api/ezp/v2/content/locations${parentInfo.locationPath}`;\n\n parentLocation = parentLocation.endsWith('/') ? parentLocation.slice(0, -1) : parentLocation;\n\n const mapping = detectContentTypeMapping(data.file, parentInfo, config.multiFileUpload);\n\n return getContentTypeByIdentifier(config, mapping.contentTypeIdentifier)\n .then((response) => response.json())\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot get content type by identifier'))\n .then((response) => {\n const fields = [\n { fieldDefinitionIdentifier: mapping.nameFieldIdentifier, fieldValue: data.file.name },\n {\n fieldDefinitionIdentifier: mapping.contentFieldIdentifier,\n fieldValue: { fileName: data.file.name, data: data.fileReader.result.replace(/^.*;base64,/, '') },\n },\n ];\n\n const struct = {\n ContentCreate: {\n ContentType: { _href: response.ContentTypeInfoList.ContentType[0]._href },\n mainLanguageCode: parentInfo.language,\n LocationCreate: { ParentLocation: { _href: parentLocation }, sortField: 'PATH', sortOrder: 'ASC' },\n Section: null,\n alwaysAvailable: true,\n remoteId: null,\n modificationDate: new Date().toISOString(),\n fields: { field: fields },\n },\n };\n\n return struct;\n })\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot create content structure'));\n};\n\n/**\n * Creates a content draft\n *\n * @function createDraft\n * @param {Object} params params object containing struct, token and siteaccess properties\n * @param {Object} requestEventHandlers object containing a list of callbacks\n * @returns {Promise}\n */\nconst createDraft = ({ struct, token, siteaccess }, requestEventHandlers) => {\n const xhr = new XMLHttpRequest();\n const body = JSON.stringify(struct);\n const headers = {\n Accept: 'application/vnd.ez.api.Content+json',\n 'Content-Type': 'application/vnd.ez.api.ContentCreate+json',\n 'X-CSRF-Token': token,\n 'X-Siteaccess': siteaccess,\n };\n\n return new Promise((resolve, reject) => {\n xhr.open('POST', '/api/ezp/v2/content/objects', true);\n\n xhr.onreadystatechange = handleOnReadyStateChange.bind(null, xhr, resolve, reject);\n\n if (requestEventHandlers && Object.keys(requestEventHandlers).length) {\n const uploadEvents = requestEventHandlers.upload;\n\n if (uploadEvents && Object.keys(uploadEvents).length) {\n xhr.upload.onabort = uploadEvents.onabort;\n xhr.upload.onerror = reject;\n xhr.upload.onload = uploadEvents.onload;\n xhr.upload.onprogress = uploadEvents.onprogress;\n xhr.upload.ontimeout = uploadEvents.ontimeout;\n }\n\n xhr.onerror = reject;\n xhr.onloadstart = requestEventHandlers.onloadstart;\n }\n\n for (let headerType in headers) {\n if (headers.hasOwnProperty(headerType)) {\n xhr.setRequestHeader(headerType, headers[headerType]);\n }\n }\n\n xhr.send(body);\n });\n};\n\n/**\n * Publishes a content draft\n *\n * @function publishDraft\n * @param {Object} params params object containing token and siteaccess properties\n * @param {Object} response object containing created draft struct\n * @returns {Promise}\n */\nconst publishDraft = ({ token, siteaccess }, response) => {\n if (!response || !response.hasOwnProperty('Content')) {\n return Promise.reject('Cannot publish content based on an uploaded file');\n }\n\n const request = new Request(response.Content.CurrentVersion.Version._href, {\n method: 'POST',\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n 'X-HTTP-Method-Override': 'PUBLISH',\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n return fetch(request).then(handleRequestResponse);\n};\n\n/**\n * Checks whether a content based on an uploaded file can be created\n *\n * @function canCreateContent\n * @param {File} file\n * @param {Object} parentInfo parent info hash\n * @param {Object} config multi file upload config\n * @returns {Boolean}\n */\nconst canCreateContent = (file, parentInfo, config) => {\n if (!config.hasOwnProperty('contentCreatePermissionsConfig') || !config.contentCreatePermissionsConfig) {\n return true;\n }\n\n const contentTypeConfig = detectContentTypeMapping(file, parentInfo, config);\n\n return config.contentCreatePermissionsConfig[contentTypeConfig.contentTypeIdentifier];\n};\n\n/**\n * Checks if a file can be uploaded\n *\n * @function checkCanUpload\n * @param {File} file\n * @param {Object} parentInfo parent info hash\n * @param {Object} config multi file upload config\n * @param {Object} callbacks a list of callbacks\n * @returns {Boolean}\n */\nexport const checkCanUpload = (file, parentInfo, config, callbacks) => {\n const locationMapping = config.locationMappings.find((item) => item.contentTypeIdentifier === parentInfo.contentTypeIdentifier);\n\n if (!canCreateContent(file, parentInfo, config)) {\n callbacks.contentTypeNotAllowedCallback();\n\n return false;\n }\n\n if (!checkFileTypeAllowed(file, locationMapping)) {\n callbacks.fileTypeNotAllowedCallback();\n\n return false;\n }\n\n if (file.size > config.maxFileSize) {\n callbacks.fileSizeNotAllowedCallback();\n\n return false;\n }\n\n return true;\n};\n\n/**\n * Creates a ContentCreate struct based on a file\n *\n * @function createFileStruct\n * @param {File} file\n * @param {Object} params struct params\n * @returns {Promise}\n */\nexport const createFileStruct = (file, params) => new Promise(readFile.bind(new FileReader(), file)).then(prepareStruct.bind(null, params));\n\n/**\n * Publishes file\n *\n * @function publishFile\n * @param {Object} data file data\n * @param {Object} requestEventHandlers a list of request event handlers\n * @param {Function} callback a success callback\n */\nexport const publishFile = (data, requestEventHandlers, callback) => {\n createDraft(data, requestEventHandlers)\n .then(publishDraft.bind(null, data))\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('An error occurred while publishing a file'));\n};\n\n/**\n * Deletes file\n *\n * @function deleteFile\n * @param {Object} systemInfo system info containing: token and siteaccess info.\n * @param {Object} struct Content struct\n * @param {Function} callback file deleted callback\n */\nexport const deleteFile = ({ token, siteaccess }, struct, callback) => {\n const request = new Request(struct.Content._href, {\n method: 'DELETE',\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('An error occurred while deleting a file'));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/multi-file-upload/services/multi.file.upload.service.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon/icon';\n\nconst TooltipPopupComponent = (props) => {\n const attrs = {\n className: 'c-tooltip-popup',\n hidden: !props.visible,\n };\n\n return (\n
    \n
    \n
    {props.title}
    \n
    \n \n
    \n
    \n
    {props.children}
    \n
    \n );\n};\n\nTooltipPopupComponent.propTypes = {\n title: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired,\n visible: PropTypes.bool.isRequired,\n onClose: PropTypes.func,\n};\n\nTooltipPopupComponent.defaultProps = {\n onClose: () => {},\n};\n\nexport default TooltipPopupComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/tooltip-popup/tooltip.popup.component.js"],"sourceRoot":""} \ No newline at end of file diff --git a/Resources/public/js/SubItems.module.js.map b/Resources/public/js/SubItems.module.js.map index 6c04c7a5..16fc7291 100644 --- a/Resources/public/js/SubItems.module.js.map +++ b/Resources/public/js/SubItems.module.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b2275d860cd52e01c324","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/common/helpers/request.helper.js","webpack:///./src/modules/common/helpers/deep.clone.helper.js","webpack:///./src/modules/sub-items/components/table-view/table.view.component.js","webpack:///./src/modules/sub-items/sub.items.module.js","webpack:///external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}","webpack:///./src/modules/sub-items/components/view-switcher/view.switcher.component.js","webpack:///./src/modules/sub-items/components/view-switcher/view.switcher.button.component.js","webpack:///./src/modules/sub-items/components/sub-items-list/sub.items.list.component.js","webpack:///./src/modules/sub-items/components/table-view/table.view.item.component.js","webpack:///./src/modules/sub-items/components/table-view/table.view.columns.toggler.js","webpack:///./src/modules/sub-items/components/table-view/table.view.columns.toggler.list.element.js","webpack:///./src/modules/sub-items/components/grid-view/grid.view.component.js","webpack:///./src/modules/sub-items/components/grid-view/grid.view.item.component.js","webpack:///./src/modules/common/popup/popup.component.js","webpack:///external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}","webpack:///./src/modules/sub-items/components/action-btn/action.btn.js","webpack:///./src/modules/sub-items/components/pagination/pagination.component.js","webpack:///./src/modules/sub-items/components/pagination/pagination.button.component.js","webpack:///./src/modules/sub-items/components/no-items/no.items.component.js","webpack:///./src/modules/sub-items/services/sub.items.service.js","webpack:///./src/modules/sub-items/services/bulk.service.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","__WEBPACK_EXTERNAL_MODULE_15__","__WEBPACK_EXTERNAL_MODULE_25__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","getBasicRequestInit","token","siteaccess","headers","X-Siteaccess","X-CSRF-Token","mode","credentials","handleRequestError","response","ok","Error","statusText","handleRequestResponse","json","handleRequestResponseStatus","status","deepClone","data","clonedData","toString","apply","length","_react","KEY_CONTENT_NAME","KEY_DATE_MODIFIED","KEY_LOCATION_PRIORITY","SORTKEY_MAP","[object Object]","COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY","DEFAULT_COLUMNS_VISIBILITY","modified","contentType","priority","translations","TABLE_CELL_CLASS","TABLE_HEAD_CLASS","TABLE_CELL_SORT_CLASS","headerLabels","Translator","trans","TableViewComponent","Component","constructor","super","sortByName","bind","sortByDate","sortByPriority","renderItem","selectAll","setColumnsVisibilityInLocalStorage","toggleColumnVisibility","_refColumnsTogglerButton","createRef","state","columnsVisibility","getColumnsVisibilityFromLocalStorage","columnsVisibilityData","localStorage","getItem","JSON","parse","stringify","setItem","onSortChange","event","toggleAllItemsSelect","target","checked","column","setState","_props","contentTypesMap","handleItemPriorityUpdate","handleEditItem","generateLink","languages","onItemSelect","isSelected","selectedLocationsIds","has","location","id","_tableViewItem2","_extends","key","onItemPriorityUpdate","renderModifiedHeader","onClick","tabIndex","renderContentTypeHeader","renderPriorityHeader","renderTranslationsHeader","renderHead","headClass","items","_props2","sortClause","sortOrder","anyLocationSelected","size","type","onChange","_tableViewColumns2","render","content","map","arrayOf","func","instanceOf","Set","_subItems","_bulkService","ASCENDING_SORT_ORDER","DESCENDING_SORT_ORDER","DEFAULT_SORT_ORDER","SubItemsModule","afterPriorityUpdated","loadContentItems","loadContentTypes","updateItemsState","switchView","toggleItemSelection","toggleAllPageItemsSelection","onMoveBtnClick","closeUdw","onUdwConfirm","onDeleteBtnClick","closeBulkDeletePopup","onBulkDeletePopupConfirm","afterBulkDelete","changePage","changeSorting","_refListViewWrapper","React","bulkDeleteModalContainer","udwContainer","sortClauseData","getDefaultSortClause","sortClauses","activeView","activePageItems","selectedItems","Map","totalCount","offset","isDuringBulkOperation","isUdwOpened","isBulkDeletePopupVisible","activePageIndex","listViewHeight","order","componentDidMount","document","getElementById","classList","add","body","appendChild","componentDidUpdate","_state","itemsPerPage","limit","pagesCount","Math","ceil","loadPage","componentWillUnmount","removeChild","objKeys","keys","updateListViewHeight","current","offsetHeight","pageIndex","loadLocation","then","catch","errorMessage","window","eZ","helpers","notification","showErrorNotification","restInfo","locationId","parentLocationId","_state2","queryConfig","Promise","resolve","loadContentInfo","View","invalidResponseFormatMessage","locations","Result","searchHits","searchHit","contentIds","item","value","Location","ContentInfo","Content","_id","contentInfo","count","contentItems","itemsData","promises","contentTypeId","ContentType","_href","loadContentType","all","contentTypes","pageItems","itemLocation","respectiveContent","find","buildContentTypesMap","reduce","total","updateTotalCountState","discardActivePageItems","getSortOrder","newSortClause","currentSortOrder","getOppositeSortOrder","updateLocationPriority","updateItemLocation","itemIndex","findIndex","updatedItem","_deepCloneHelper2","updatedPageItems","updatedSelectedItems","set","delete","select","selectItems","locationsIds","locationsIdsSet","deselectItems","itemsToSelect","newSelectedItems","newSelection","filter","deselectAllItems","toggleBulkOperationStatusState","toggleUdw","bulkMove","locationsToMove","values","bulkMoveLocations","afterBulkMove","movedLocations","notMovedLocations","modalTableTitle","itemsCount","notificationMessage","notMovedCount","handleBulkOperationFailedNotification","message","locationName","Name","locationHref","showSuccessNotification","show","selectedLocation","renderUdw","UniversalDiscovery","_props3","udwConfigBulkMoveItems","excludedMoveLocations","title","udwProps","onCancel","onConfirm","canSelectContent","callback","includes","ReactDOM","createPortal","toggleBulkDeletePopup","bulkDelete","locationsToDelete","bulkMoveLocationsToTrash","deletedLocations","notDeletedLocations","notDeletedCount","failedLocations","failedItemsData","contentTypeIdentifier","identifier","contentTypeName","adminUiConfig","contentTypeNames","contentName","showWarningNotification","notificationNode","showModalBtn","querySelector","addEventListener","showBulkActionFailedModal","renderConfirmationPopupFooter","cancelLabel","confirmLabel","Fragment","data-dismiss","renderConfirmationPopup","confirmationMessage","_popup2","onClose","isVisible","isLoading","footerChildren","noHeader","getPageSelectedLocationsIds","_state3","pageLocationsIds","renderExtraActions","action","index","Action","component","attrs","renderPaginationInfo","_state4","viewingCount","dangerouslySetInnerHTML","__html","renderPagination","_state5","isPaginationDisabled","_paginationComponent2","proximity","onPageChange","disabled","renderBulkMoveBtn","label","_actionBtn2","renderBulkDeleteBtn","renderSpinner","style","height","_icon2","renderNoItems","_noItemsComponent2","renderListView","_state6","selectedPageLocationsIds","_subItemsListComponent2","listTitle","_state7","bulkBtnDisabled","listClassName","extraActions","_viewSwitcherComponent2","onViewChange","isDisabled","ref","addConfig","number","shape","parseInt","subItems","ViewSwitcherComponent","componentClassName","listViewBtnLabel","gridViewBtnLabel","_viewSwitcherButton2","icon","bool","ViewSwitcherButton","iconAttrs","views","table","grid","GridViewComponent","SubItemsListComponent","TableViewItemComponent","PureComponent","storePriorityValue","enablePriorityInput","handleSubmit","handleCancel","handleEdit","onSelectCheckboxChange","setPriorityInputRef","_refPriorityInput","priorityValue","priorityInputEnabled","startingPriorityValue","preventDefault","renderPriorityCell","inputAttrs","defaultValue","priorityWrapperAttrs","innerWrapperAttrs","hidden","renderModifiedCell","formatShortDateWithTimezone","timezone","Date","lastModificationDate","renderContentTypeCell","notAvailableLabel","renderTranslationsCell","CurrentVersion","Version","VersionInfo","VersionTranslationInfo","Language","langauge","mappings","languageCode","renderTranslation","translation","_props4","editLabel","linkAttrs","href","contentTypeIconUrl","getContentTypeIconUrl","_tableView","DEFAULT_PANEL_HEIGHT","TableViewColumnsTogglerComponent","togglePanel","hidePanel","_refTogglerButton","_refPanel","isOpen","buttonBottomDocumentOffset","panelHeight","getBtnBottomDocumentOffset","removeEventListener","buttonTopOffset","getBoundingClientRect","top","scrollY","documentElement","scrollHeight","closest","renderPanel","measuredPanelHeight","panelAttrs","entries","columnKey","isColumnVisible","_tableViewColumnsTogglerList2","TableViewColumnsTogglerListElement","readOnly","_gridViewItem2","GridViewItemComponent","imageField","Fields","field","fieldTypeIdentifier","hasImage","fieldValue","uri","path","image","contentTypeIcon","src","alt","CLASS_NON_SCROLLABLE","CLASS_MODAL_OPEN","MODAL_CONFIG","backdrop","keyboard","MODAL_SIZE_CLASS","small","medium","large","Popup","_refModal","setModalRef","onKeyUp","_jquery2","modal","focus","hasFocus","attachModalEventHandlers","remove","UNSAFE_componentWillReceiveProps","onConfigIframeLoad","on","one","originalEvent","which","keyCode","renderHeader","closeBtnLabel","renderHeadline","aria-label","renderSubtitle","subtitle","renderFooter","additionalClasses","modalAttrs","undefined","toggle","role","children","element","ActionButton","PaginationComponent","paginationDisabled","backLabel","nextLabel","previousPage","nextPage","isFirstPage","isLastPage","paginationButtons","pages","wereDots","push","computePages","page","_paginationButton2","PaginationButtonComponent","Number","isInteger","noItemsMessage","_requestHelper","HEADERS_CREATE_VIEW","Accept","Content-Type","ViewInput","public","LocationQuery","Criteria","FacetBuilders","SortClauses","Filter","ParentLocationIdCriterion","request","Request","method","fetch","ids","join","ContentQuery","ContentIdCriterion","X-HTTP-Method-Override","LocationUpdate","sortField","HEADERS_BULK","newLocationHref","requestBodyOperations","getBulkMoveRequestOperations","makeBulkRequest","processBulkResponse","destination","operations","forEach","Destination","successCode","BulkOperationResponse","locationsMatches","respectiveItem","statusCode","success","fail","bulkOperations"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,aAAAA,QAAA,WACA,mBAAAC,eAAAC,IACAD,QAAA,2CAAAJ,GACA,iBAAAC,QACAA,QAAA,SAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,aAAAA,QAAA,YAEAJ,EAAA,GAAAA,EAAA,OAA+BA,EAAA,WAAAA,EAAA,eAAqDA,EAAA,oBAAAC,EAAAD,EAAA,MAAAA,EAAA,UAAAA,EAAA,SAAAA,EAAA,SARpF,CASC,oBAAAO,UAAAC,KAAA,SAAAC,EAAAC,EAAAC,EAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAb,QAGA,IAAAC,EAAAU,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAf,YAUA,OANAgB,EAAAH,GAAAI,KAAAhB,EAAAD,QAAAC,IAAAD,QAAAY,GAGAX,EAAAc,GAAA,EAGAd,EAAAD,QAqCA,OAhCAY,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAApB,EAAAqB,EAAAC,GACAV,EAAAW,EAAAvB,EAAAqB,IACAG,OA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1D1B,EAAkBtE,EAAUU,EAVJ,4BAUoCsF,KAG3B,CAACtF,EAAW0W,KAC7C,MAAMC,KAYN,OAVA3W,EAAU4W,QAAS7d,IACf4d,EAAW5d,EAASC,KAChB2X,IAAK5X,EAASmI,MACdyU,OAAQ,OACR3hB,SACI6iB,YAAaH,MAKlBC,IAGLF,EAAsB,CAACzW,EAAW8W,EAAaxR,EAAUhR,KAAa,MAChEqiB,EAAeriB,EAASyiB,sBAAxBJ,WACFK,EAAmB/kB,OAAO4d,QAAQ8G,GAAYhV,OAChD,CAACqV,GAAmBzX,EAAYjL,MAC5B,MAAM2iB,EAAiBjX,EAAUyB,KAAM1I,GAAaA,EAASC,KAAO2R,SAASpL,EAAY,KASzF,OARkBjL,EAAS4iB,aAAeJ,EAGtCE,EAAiBG,QAAQ9C,KAAK4C,GAE9BD,EAAiBI,KAAK/C,KAAK4C,GAGxBD,IAETG,WAAaC,UAGnB9R,EAAS0R,EAAiBG,QAASH,EAAiBI,OAGlDZ,EAAkB,EAAG1iB,QAAOC,cAAcuiB,EAAuBhR,KACnE,MAAMmQ,EAAU,IAAIC,QAlDF,oBAmDdC,OAAQ,OACR3hB,aACOoiB,GACHniB,eAAgBF,EAChBG,eAAgBJ,IAEpB6J,KAAMjG,KAAKE,WACPyf,gBACIV,WAAYL,KAGpBniB,KAAM,cACNC,YAAa,gBAGjBwhB,MAAMH,GACD3W,KAAKpK,yBACLoK,KAAKwG,GACLvG,MAAM,KACH,MAAMsF,EAAUjO,WAAWC,MAC+E,gCAEtG,aAGJ4I,OAAOC,GAAGC,QAAQC,aAAaC,sBAAsBgF","file":"SubItems.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"), require(\"react-dom\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\", \"react-dom\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SubItems\"] = factory(require(\"react\"), require(\"prop-types\"), require(\"react-dom\"), require(\"jquery\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"SubItems\"] = factory(root[\"React\"], root[\"PropTypes\"], root[\"ReactDOM\"], root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_15__, __WEBPACK_EXTERNAL_MODULE_25__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b2275d860cd52e01c324","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","/**\n * Returns basic RequestInit object for Request\n *\n * @function getBasicRequestInit\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @returns {RequestInit}\n */\nexport const getBasicRequestInit = ({ token, siteaccess }) => {\n return {\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n };\n};\n\n/**\n * Handles request error\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Response}\n */\nexport const handleRequestError = (response) => {\n if (!response.ok) {\n throw Error(response.statusText);\n }\n\n return response;\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Error|Promise}\n */\nexport const handleRequestResponse = (response) => {\n return handleRequestError(response).json();\n};\n\n/**\n * Handles request response; returns status if response is OK\n *\n * @function handleRequestResponseStatus\n * @param {Response} response\n * @returns {number}\n */\nexport const handleRequestResponseStatus = (response) => {\n return handleRequestError(response).status;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/request.helper.js","/**\n * Clones any object. Faster alternative to `JSON.parse(JSON.stringify)`\n *\n * @function deepClone\n * @param {Any} data\n * @returns {Any} cloned data\n */\nconst deepClone = (data) => {\n let clonedData;\n\n if (typeof data !== 'object') {\n return data;\n }\n\n if (!data) {\n return data;\n }\n\n if (Object.prototype.toString.apply(data) === '[object Array]') {\n clonedData = [];\n\n for (let i = 0; i < data.length; i++) {\n clonedData[i] = deepClone(data[i]);\n }\n\n return clonedData;\n }\n\n clonedData = {};\n\n for (let i in data) {\n if (data.hasOwnProperty(i)) {\n clonedData[i] = deepClone(data[i]);\n }\n }\n\n return clonedData;\n};\n\nexport default deepClone;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/deep.clone.helper.js","import React, { Component, createRef } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TableViewItemComponent from './table.view.item.component';\nimport TableViewColumnsTogglerComponent from './table.view.columns.toggler';\n\nconst KEY_CONTENT_NAME = 'ContentName';\nconst KEY_DATE_MODIFIED = 'DateModified';\nconst KEY_LOCATION_PRIORITY = 'LocationPriority';\nconst SORTKEY_MAP = {\n [KEY_CONTENT_NAME]: 'name',\n [KEY_DATE_MODIFIED]: 'date',\n [KEY_LOCATION_PRIORITY]: 'priority',\n};\nconst COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY = 'sub-items_columns-visibility';\nconst DEFAULT_COLUMNS_VISIBILITY = {\n modified: true,\n contentType: true,\n priority: true,\n translations: true,\n};\nconst TABLE_CELL_CLASS = 'c-table-view__cell';\nconst TABLE_HEAD_CLASS = `${TABLE_CELL_CLASS} ${TABLE_CELL_CLASS}--head`;\nconst TABLE_CELL_SORT_CLASS = `${TABLE_CELL_CLASS} ${TABLE_CELL_CLASS}--sortable`;\nexport const headerLabels = {\n name: Translator.trans(/*@Desc(\"Name\")*/ 'items_table.header.name', {}, 'sub_items'),\n modified: Translator.trans(/*@Desc(\"Modified\")*/ 'items_table.header.modified', {}, 'sub_items'),\n contentType: Translator.trans(/*@Desc(\"Content type\")*/ 'items_table.header.content_type', {}, 'sub_items'),\n priority: Translator.trans(/*@Desc(\"Priority\")*/ 'items_table.header.priority', {}, 'sub_items'),\n translations: Translator.trans(/*@Desc(\"Translations\")*/ 'items_table.header.translations', {}, 'sub_items'),\n};\n\nexport default class TableViewComponent extends Component {\n constructor(props) {\n super(props);\n\n this.sortByName = this.sortByName.bind(this);\n this.sortByDate = this.sortByDate.bind(this);\n this.sortByPriority = this.sortByPriority.bind(this);\n this.renderItem = this.renderItem.bind(this);\n this.selectAll = this.selectAll.bind(this);\n this.setColumnsVisibilityInLocalStorage = this.setColumnsVisibilityInLocalStorage.bind(this);\n this.toggleColumnVisibility = this.toggleColumnVisibility.bind(this);\n\n this._refColumnsTogglerButton = createRef();\n\n this.state = {\n columnsVisibility: this.getColumnsVisibilityFromLocalStorage(),\n };\n }\n\n getColumnsVisibilityFromLocalStorage() {\n const columnsVisibilityData = localStorage.getItem(COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY);\n\n return columnsVisibilityData ? JSON.parse(columnsVisibilityData) : DEFAULT_COLUMNS_VISIBILITY;\n }\n\n setColumnsVisibilityInLocalStorage() {\n const columnsVisibilityData = JSON.stringify(this.state.columnsVisibility);\n\n localStorage.setItem(COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY, columnsVisibilityData);\n }\n\n /**\n * Changes sort to name\n */\n sortByName() {\n const { onSortChange } = this.props;\n\n onSortChange(KEY_CONTENT_NAME);\n }\n\n /**\n * Changes sort to modification date\n */\n sortByDate() {\n const { onSortChange } = this.props;\n\n onSortChange(KEY_DATE_MODIFIED);\n }\n\n /**\n * Changes sort to priority\n */\n sortByPriority() {\n const { onSortChange } = this.props;\n\n onSortChange(KEY_LOCATION_PRIORITY);\n }\n\n /**\n * Selects all visible items\n *\n * @param {Event} event\n */\n selectAll(event) {\n const { toggleAllItemsSelect } = this.props;\n const isSelectAction = event.target.checked;\n\n toggleAllItemsSelect(isSelectAction);\n }\n\n toggleColumnVisibility(column) {\n this.setState(\n (state) => ({\n columnsVisibility: {\n ...state.columnsVisibility,\n [column]: !state.columnsVisibility[column],\n },\n }),\n this.setColumnsVisibilityInLocalStorage\n );\n }\n\n /**\n * Renders single list item\n *\n * @method renderItem\n * @param {Object} data\n * @returns {JSX.Element}\n * @memberof TableViewComponent\n */\n renderItem(data) {\n const { columnsVisibility } = this.state;\n const {\n contentTypesMap,\n handleItemPriorityUpdate,\n handleEditItem,\n generateLink,\n languages,\n onItemSelect,\n selectedLocationsIds,\n } = this.props;\n const isSelected = selectedLocationsIds.has(data.location.id);\n\n return (\n \n );\n }\n\n renderModifiedHeader() {\n if (!this.state.columnsVisibility.modified) {\n return null;\n }\n\n return (\n \n {headerLabels.modified}\n \n );\n }\n\n renderContentTypeHeader() {\n if (!this.state.columnsVisibility.contentType) {\n return null;\n }\n\n return (\n \n {headerLabels.contentType}\n \n );\n }\n\n renderPriorityHeader() {\n if (!this.state.columnsVisibility.priority) {\n return null;\n }\n\n return (\n \n {headerLabels.priority}\n \n );\n }\n\n renderTranslationsHeader() {\n if (!this.state.columnsVisibility.translations) {\n return null;\n }\n\n return (\n \n {headerLabels.translations}\n \n );\n }\n\n /**\n * Renders table's head\n *\n * @method renderHead\n * @returns {JSX.Element|null}\n * @memberof GridViewComponent\n */\n renderHead() {\n const cellClass = 'c-table-view__cell';\n const { items } = this.props;\n let headClass = 'c-table-view__head';\n\n if (!items.length) {\n return null;\n }\n\n const { sortClause, sortOrder } = this.props;\n\n if (sortClause) {\n const headSortOrderClass = sortOrder === 'ascending' ? `${headClass}--sort-asc` : `${headClass}--sort-desc`;\n const headSortByClass = `${headClass}--sort-by-${SORTKEY_MAP[sortClause]}`;\n\n headClass = `${headClass} ${headSortOrderClass} ${headSortByClass}`;\n }\n\n const { columnsVisibility } = this.state;\n const { selectedLocationsIds } = this.props;\n const anyLocationSelected = !!selectedLocationsIds.size;\n\n return (\n \n \n \n \n \n \n \n {headerLabels.name}\n \n {this.renderModifiedHeader()}\n {this.renderContentTypeHeader()}\n {this.renderPriorityHeader()}\n {this.renderTranslationsHeader()}\n \n \n \n \n \n );\n }\n\n render() {\n const { items } = this.props;\n const content = items.map(this.renderItem);\n\n return (\n
    \n
    \n \n {this.renderHead()}\n {content}\n
    \n
    \n
    \n );\n }\n}\n\nTableViewComponent.propTypes = {\n items: PropTypes.arrayOf(PropTypes.object).isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n handleItemPriorityUpdate: PropTypes.func.isRequired,\n generateLink: PropTypes.func.isRequired,\n handleEditItem: PropTypes.func.isRequired,\n languages: PropTypes.object.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n toggleAllItemsSelect: PropTypes.func.isRequired,\n selectedLocationsIds: PropTypes.instanceOf(Set),\n onSortChange: PropTypes.func.isRequired,\n sortClause: PropTypes.string.isRequired,\n sortOrder: PropTypes.string.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.component.js","import React, { Component, Fragment } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\n\nimport ViewSwitcherComponent from './components/view-switcher/view.switcher.component.js';\nimport SubItemsListComponent from './components/sub-items-list/sub.items.list.component.js';\nimport Popup from '../common/popup/popup.component';\nimport ActionButton from './components/action-btn/action.btn.js';\nimport PaginationComponent from './components/pagination/pagination.component.js';\nimport NoItemsComponent from './components/no-items/no.items.component.js';\nimport Icon from '../common/icon/icon.js';\n\nimport deepClone from '../common/helpers/deep.clone.helper.js';\nimport { updateLocationPriority, loadLocation, loadContentInfo, loadContentType, loadContentTypes } from './services/sub.items.service';\nimport { bulkMoveLocations, bulkMoveLocationsToTrash } from './services/bulk.service.js';\n\nconst ASCENDING_SORT_ORDER = 'ascending';\nconst DESCENDING_SORT_ORDER = 'descending';\nconst DEFAULT_SORT_ORDER = ASCENDING_SORT_ORDER;\n\nexport default class SubItemsModule extends Component {\n constructor(props) {\n super(props);\n\n this.afterPriorityUpdated = this.afterPriorityUpdated.bind(this);\n this.loadContentItems = this.loadContentItems.bind(this);\n this.loadContentTypes = this.loadContentTypes.bind(this);\n this.updateItemsState = this.updateItemsState.bind(this);\n this.switchView = this.switchView.bind(this);\n this.handleItemPriorityUpdate = this.handleItemPriorityUpdate.bind(this);\n this.toggleItemSelection = this.toggleItemSelection.bind(this);\n this.toggleAllPageItemsSelection = this.toggleAllPageItemsSelection.bind(this);\n this.onMoveBtnClick = this.onMoveBtnClick.bind(this);\n this.closeUdw = this.closeUdw.bind(this);\n this.onUdwConfirm = this.onUdwConfirm.bind(this);\n this.onDeleteBtnClick = this.onDeleteBtnClick.bind(this);\n this.closeBulkDeletePopup = this.closeBulkDeletePopup.bind(this);\n this.onBulkDeletePopupConfirm = this.onBulkDeletePopupConfirm.bind(this);\n this.afterBulkDelete = this.afterBulkDelete.bind(this);\n this.changePage = this.changePage.bind(this);\n this.changeSorting = this.changeSorting.bind(this);\n\n this._refListViewWrapper = React.createRef();\n this.bulkDeleteModalContainer = null;\n this.udwContainer = null;\n\n const sortClauseData = this.getDefaultSortClause(props.sortClauses);\n\n this.state = {\n activeView: props.activeView,\n activePageItems: props.items,\n selectedItems: new Map(),\n contentTypesMap: props.contentTypesMap,\n totalCount: props.totalCount,\n offset: props.offset,\n isDuringBulkOperation: false,\n isUdwOpened: false,\n isBulkDeletePopupVisible: false,\n activePageIndex: 0,\n listViewHeight: null,\n sortClause: sortClauseData.name,\n sortOrder: sortClauseData.order,\n };\n }\n\n componentDidMount() {\n this.udwContainer = document.getElementById('react-udw');\n this.bulkDeleteModalContainer = document.createElement('div');\n this.bulkDeleteModalContainer.classList.add('m-sub-items__bulk-delete-modal-container');\n document.body.appendChild(this.bulkDeleteModalContainer);\n }\n\n componentDidUpdate() {\n const { activePageIndex, activePageItems, totalCount } = this.state;\n const { limit: itemsPerPage } = this.props;\n const pagesCount = Math.ceil(totalCount / itemsPerPage);\n const pageDoesNotExist = activePageIndex > pagesCount - 1 && activePageIndex !== 0;\n\n if (pageDoesNotExist) {\n this.setState({\n activePageIndex: pagesCount - 1,\n });\n\n return;\n }\n\n const shouldLoadPage = !activePageItems;\n\n if (shouldLoadPage) {\n this.loadPage(activePageIndex);\n }\n }\n\n componentWillUnmount() {\n document.body.removeChild(this.bulkDeleteModalContainer);\n }\n\n getDefaultSortClause(sortClauses) {\n const objKeys = Object.keys(sortClauses);\n\n if (!objKeys.length) {\n return { name: null, order: null };\n }\n\n const name = objKeys[0];\n const order = sortClauses[name];\n\n return { name, order };\n }\n\n updateListViewHeight() {\n this.setState(() => ({\n listViewHeight: this._refListViewWrapper.current.offsetHeight,\n }));\n }\n\n /**\n * Loads items into the list\n *\n * @method loadPage\n * @memberof SubItemsModule\n */\n loadPage(pageIndex) {\n this.loadLocation(pageIndex)\n .then(this.loadContentItems)\n .then(this.loadContentTypes)\n .then(this.updateItemsState)\n .catch(() => {\n const errorMessage = Translator.trans(\n /*@Desc(\"An error occurred while loading items in the Sub Items module\")*/ 'page.loading_error.message',\n {},\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showErrorNotification(errorMessage);\n });\n }\n\n /**\n * Loads location data\n *\n * @param {Number} pageIndex\n * @method loadLocation\n * @returns {Promise}\n * @memberof SubItemsModule\n */\n loadLocation(pageIndex) {\n const { limit: itemsPerPage, loadLocation, restInfo, parentLocationId: locationId } = this.props;\n const { sortClause, sortOrder } = this.state;\n const offset = pageIndex * itemsPerPage;\n const sortClauses = {\n [sortClause]: sortOrder,\n };\n const queryConfig = { locationId, limit: itemsPerPage, sortClauses, offset };\n\n return new Promise((resolve) => loadLocation(restInfo, queryConfig, resolve));\n }\n\n /**\n * Loads content items from location\n *\n * @method loadContentItems\n * @param {Object} response query results\n * @returns {Promise}\n * @memberof SubItemsModule\n */\n loadContentItems(response) {\n const { loadContentInfo, restInfo } = this.props;\n\n if (!response || !response.View) {\n const invalidResponseFormatMessage = Translator.trans(\n /*@Desc(\"Invalid response format\")*/ 'load_content_items.invalid_response_format.error.message',\n {},\n 'sub_items'\n );\n\n throw new Error(invalidResponseFormatMessage);\n }\n\n const locations = response.View.Result.searchHits.searchHit;\n\n return new Promise((resolve) => {\n const contentIds = locations.map((item) => item.value.Location.ContentInfo.Content._id);\n\n loadContentInfo(restInfo, contentIds, (contentInfo) => {\n const totalCount = response.View.Result.count;\n\n resolve({\n locations,\n totalCount,\n contentItems: contentInfo.View.Result.searchHits.searchHit.map((searchHit) => searchHit.value.Content),\n });\n });\n });\n }\n\n /**\n * Loads content types info\n *\n * @method loadContentTypes\n * @param {Object} itemsData\n * @returns {Promise}\n * @memberof SubItemsModule\n */\n loadContentTypes(itemsData) {\n const promises = itemsData.contentItems.map(\n (content) =>\n new Promise((resolve) => {\n const contentTypeId = content.ContentType._href;\n\n if (!this.state.contentTypesMap[contentTypeId]) {\n this.props.loadContentType(contentTypeId, this.props.restInfo, (response) => resolve(response));\n } else {\n resolve({ ContentType: this.state.contentTypesMap[contentTypeId] });\n }\n })\n );\n\n return Promise.all(promises).then((contentTypes) => {\n itemsData.contentTypes = contentTypes;\n\n return itemsData;\n });\n }\n\n /**\n * Updates module state by updating items list\n *\n * @method updateItemsState\n * @param {Object} responses\n * @memberof SubItemsModule\n */\n updateItemsState({ locations, contentItems, totalCount, contentTypes }) {\n const pageItems = locations.map((location) => {\n const itemLocation = location.value.Location;\n const respectiveContent = contentItems.find((content) => content._id === itemLocation.ContentInfo.Content._id);\n\n return {\n location: itemLocation,\n content: respectiveContent,\n };\n });\n\n this.setState((state) => ({\n activePageItems: pageItems,\n totalCount,\n contentTypesMap: {\n ...state.contentTypesMap,\n ...this.buildContentTypesMap(contentTypes),\n },\n }));\n }\n\n /**\n * Builds content types map\n *\n * @method buildContentTypesMap\n * @param {Array} contentTypes\n * @returns {Object}\n * @memberof SubItemsModule\n */\n buildContentTypesMap(contentTypes) {\n if (!contentTypes) {\n return {};\n }\n\n return contentTypes.reduce((total, item) => {\n total[item.ContentType._href] = item.ContentType;\n\n return total;\n }, {});\n }\n\n updateTotalCountState(totalCount) {\n this.setState(() => ({\n totalCount,\n }));\n }\n\n discardActivePageItems() {\n this.updateListViewHeight();\n this.setState(() => ({\n activePageItems: null,\n }));\n }\n\n changeSorting(sortClause) {\n this.updateListViewHeight();\n this.setState((state) => ({\n sortClause,\n sortOrder: this.getSortOrder(state.sortClause, sortClause, state.sortOrder),\n activePageItems: null,\n }));\n }\n\n getSortOrder(sortClause, newSortClause, currentSortOrder) {\n return newSortClause === sortClause ? this.getOppositeSortOrder(currentSortOrder) : DEFAULT_SORT_ORDER;\n }\n\n getOppositeSortOrder(sortOrder) {\n return sortOrder === ASCENDING_SORT_ORDER ? DESCENDING_SORT_ORDER : ASCENDING_SORT_ORDER;\n }\n\n /**\n * Updates item priority\n *\n * @method handleItemPriorityUpdate\n * @param {Object} data data hash containing: priority, location, token, siteaccess\n * @memberof SubItemsModule\n */\n handleItemPriorityUpdate(data) {\n this.props.updateLocationPriority({ ...data, ...this.props.restInfo }, this.afterPriorityUpdated);\n }\n\n /**\n * Updates module state after item's priority has been updated\n *\n * @method afterPriorityUpdated\n * @param {Object} response\n * @memberof SubItemsModule\n */\n afterPriorityUpdated(response) {\n if (this.state.sortClause === 'LocationPriority') {\n this.discardActivePageItems();\n return;\n }\n\n this.updateItemLocation(response.Location);\n }\n\n updateItemLocation(location) {\n this.setState(({ activePageItems }) => {\n const itemIndex = activePageItems.findIndex((item) => item.location.id === location.id);\n\n if (itemIndex === -1) {\n return null;\n }\n\n const item = activePageItems[itemIndex];\n const updatedItem = deepClone(item);\n const updatedPageItems = [...activePageItems];\n\n updatedItem.location = location;\n updatedPageItems[itemIndex] = updatedItem;\n\n return {\n activePageItems: updatedPageItems,\n };\n });\n }\n\n /**\n * Switches active view\n *\n * @method switchView\n * @param {String} activeView\n * @memberof SubItemsModule\n */\n switchView(activeView) {\n this.setState(() => ({ activeView }));\n }\n\n toggleItemSelection(item, isSelected) {\n const { selectedItems } = this.state;\n const updatedSelectedItems = new Map(selectedItems);\n const locationId = item.location.id;\n\n if (isSelected) {\n updatedSelectedItems.set(locationId, item);\n } else {\n updatedSelectedItems.delete(locationId);\n }\n\n this.setState(() => ({ selectedItems: updatedSelectedItems }));\n }\n\n toggleAllPageItemsSelection(select) {\n const { activePageItems } = this.state;\n\n if (select) {\n this.selectItems(activePageItems);\n } else {\n const locationsIds = activePageItems.map((item) => item.location.id);\n const locationsIdsSet = new Set(locationsIds);\n\n this.deselectItems(locationsIdsSet);\n }\n }\n\n /**\n *\n * @param {Array} itemsToSelect\n */\n selectItems(itemsToSelect) {\n const { selectedItems } = this.state;\n const newSelectedItems = itemsToSelect.map((item) => [item.location.id, item]);\n const newSelection = new Map([...selectedItems, ...newSelectedItems]);\n\n this.setState(() => ({ selectedItems: newSelection }));\n }\n\n /**\n * Deselects items with locations with provided IDs.\n *\n * @param {Set} locationsIds\n */\n deselectItems(locationsIds) {\n const { selectedItems } = this.state;\n const newSelection = new Map([...selectedItems].filter(([locationId]) => !locationsIds.has(locationId)));\n\n this.setState(() => ({ selectedItems: newSelection }));\n }\n\n deselectAllItems() {\n this.setState(() => ({ selectedItems: new Map() }));\n }\n\n toggleBulkOperationStatusState(isDuringBulkOperation) {\n this.setState(() => ({\n isDuringBulkOperation,\n }));\n }\n\n onMoveBtnClick() {\n this.toggleUdw(true);\n }\n\n bulkMove(location) {\n this.toggleBulkOperationStatusState(true);\n\n const { restInfo } = this.props;\n const { selectedItems } = this.state;\n const locationsToMove = [...selectedItems.values()].map(({ location }) => location);\n\n bulkMoveLocations(restInfo, locationsToMove, location._href, this.afterBulkMove.bind(this, selectedItems, location));\n }\n\n afterBulkMove(selectedItems, location, movedLocations, notMovedLocations) {\n const { totalCount } = this.state;\n\n this.updateTotalCountState(totalCount - movedLocations.length);\n this.deselectAllItems();\n this.discardActivePageItems();\n\n this.toggleBulkOperationStatusState(false);\n\n if (notMovedLocations.length) {\n const modalTableTitle = Translator.trans(\n /*@Desc(\"Content items cannot be moved (%itemsCount%)\")*/ 'bulk_move.error.modal.table_title',\n {\n itemsCount: notMovedLocations.length,\n },\n 'sub_items'\n );\n const notificationMessage = Translator.trans(\n /*@Desc(\"%notMovedCount% of the %totalCount% selected item(s) could not be moved because you do not have proper user permissions. Click here for more information.
    Please contact your Administrator to obtain permissions.\")*/ 'bulk_move.error.message',\n {\n notMovedCount: notMovedLocations.length,\n totalCount: movedLocations.length + notMovedLocations.length,\n },\n 'sub_items'\n );\n\n this.handleBulkOperationFailedNotification(selectedItems, notMovedLocations, modalTableTitle, notificationMessage);\n }\n\n if (movedLocations.length) {\n const message = Translator.trans(\n /*@Desc(\"The selected content item(s) have been sent to %locationName%\")*/ 'bulk_move.success.message',\n {\n locationName: location.ContentInfo.Content.Name,\n locationHref: this.props.generateLink(location.id),\n },\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showSuccessNotification(message);\n }\n }\n\n toggleUdw(show) {\n this.setState(() => ({\n isUdwOpened: show,\n }));\n }\n\n closeUdw() {\n this.toggleUdw(false);\n }\n\n onUdwConfirm([selectedLocation]) {\n this.closeUdw();\n this.bulkMove(selectedLocation);\n }\n\n renderUdw() {\n const { isUdwOpened } = this.state;\n\n if (!isUdwOpened) {\n return null;\n }\n\n const UniversalDiscovery = window.eZ.modules.UniversalDiscovery;\n const { restInfo, parentLocationId, udwConfigBulkMoveItems } = this.props;\n const { selectedItems } = this.state;\n const selectedItemsLocationsIds = [...selectedItems.values()].map(({ location }) => location.id);\n const excludedMoveLocations = [parentLocationId, ...selectedItemsLocationsIds];\n const title = Translator.trans(/*@Desc(\"Choose location\")*/ 'udw.choose_location.title', {}, 'sub_items');\n const udwProps = {\n title,\n restInfo,\n onCancel: this.closeUdw,\n onConfirm: this.onUdwConfirm,\n canSelectContent: ({ item }, callback) => {\n callback(!excludedMoveLocations.includes(item.id));\n },\n ...udwConfigBulkMoveItems,\n };\n\n return ReactDOM.createPortal(, this.udwContainer);\n }\n\n onDeleteBtnClick() {\n this.toggleBulkDeletePopup(true);\n }\n\n bulkDelete() {\n this.toggleBulkOperationStatusState(true);\n\n const { restInfo } = this.props;\n const { selectedItems } = this.state;\n const locationsToDelete = [...selectedItems.values()].map(({ location }) => location);\n\n bulkMoveLocationsToTrash(restInfo, locationsToDelete, this.afterBulkDelete.bind(this, selectedItems));\n }\n\n afterBulkDelete(selectedItems, deletedLocations, notDeletedLocations) {\n const { totalCount } = this.state;\n\n this.updateTotalCountState(totalCount - deletedLocations.length);\n this.deselectAllItems();\n this.discardActivePageItems();\n\n this.toggleBulkOperationStatusState(false);\n\n if (notDeletedLocations.length) {\n const modalTableTitle = Translator.trans(\n /*@Desc(\"Content item(s) cannot be sent to trash (%itemsCount%)\")*/ 'bulk_delete.error.modal.table_title',\n {\n itemsCount: notDeletedLocations.length,\n },\n 'sub_items'\n );\n const message = Translator.trans(\n /*@Desc(\"%notDeletedCount% of the %totalCount% selected item(s) could not be deleted because you do not have proper user permissions. Click here for more information.
    Please contact your Administrator to obtain permissions.\")*/ 'bulk_delete.error.message',\n {\n notDeletedCount: notDeletedLocations.length,\n totalCount: deletedLocations.length + notDeletedLocations.length,\n },\n 'sub_items'\n );\n\n this.handleBulkOperationFailedNotification(selectedItems, notDeletedLocations, modalTableTitle, message);\n } else {\n const message = Translator.trans(\n /*@Desc(\"The selected content item(s) have been sent to trash\")*/ 'bulk_delete.success.message',\n {},\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showSuccessNotification(message);\n }\n }\n\n toggleBulkDeletePopup(show) {\n this.setState(() => ({\n isBulkDeletePopupVisible: show,\n }));\n }\n\n closeBulkDeletePopup() {\n this.toggleBulkDeletePopup(false);\n }\n\n onBulkDeletePopupConfirm() {\n this.closeBulkDeletePopup();\n this.bulkDelete();\n }\n\n /**\n * Shows warning notification which has a button.\n * Clicking the button should cause appearance of the modal\n * with list of items, which failed to be deleted/moved.\n *\n * @param {Map} selectedItems\n * @param {Array} failedLocations\n * @param {String} modalTableTitle\n * @param {String} notificationMessage\n */\n handleBulkOperationFailedNotification(selectedItems, failedLocations, modalTableTitle, notificationMessage) {\n const { contentTypesMap } = this.state;\n const failedItemsData = failedLocations.map(({ id: locationId }) => {\n const item = selectedItems.get(locationId);\n const contentType = contentTypesMap[item.content.ContentType._href];\n const contentTypeIdentifier = contentType.identifier;\n const contentTypeName = window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier];\n\n return {\n contentTypeName,\n contentName: item.content.Name,\n };\n });\n\n window.eZ.helpers.notification.showWarningNotification(notificationMessage, (notificationNode) => {\n const showModalBtn = notificationNode.querySelector('.ez-notification-btn--show-modal');\n\n if (!showModalBtn) {\n return;\n }\n\n showModalBtn.addEventListener('click', this.props.showBulkActionFailedModal.bind(null, modalTableTitle, failedItemsData));\n });\n }\n\n renderConfirmationPopupFooter() {\n const cancelLabel = Translator.trans(/*@Desc(\"Cancel\")*/ 'bulk_delete.popup.cancel', {}, 'sub_items');\n const confirmLabel = Translator.trans(/*@Desc(\"Send to trash\")*/ 'bulk_delete.popup.confirm', {}, 'sub_items');\n\n return (\n \n \n {cancelLabel}\n \n \n \n );\n }\n\n renderConfirmationPopup() {\n const { isBulkDeletePopupVisible } = this.state;\n\n if (!isBulkDeletePopupVisible) {\n return null;\n }\n\n const confirmationMessage = Translator.trans(\n /*@Desc(\"Are you sure you want to send the selected content item(s) to trash?\")*/ 'bulk_delete.popup.message',\n {},\n 'sub_items'\n );\n\n return ReactDOM.createPortal(\n \n
    {confirmationMessage}
    \n ,\n this.bulkDeleteModalContainer\n );\n }\n\n changePage(pageIndex) {\n this.updateListViewHeight();\n this.setState(() => ({\n activePageIndex: pageIndex,\n activePageItems: null,\n }));\n }\n\n getPageSelectedLocationsIds() {\n const { selectedItems, activePageItems } = this.state;\n const selectedLocationsIds = [...selectedItems.keys()];\n const pageLocationsIds = [...activePageItems.map((item) => item.location.id)];\n const selectedPageLocationsIds = new Set(pageLocationsIds.filter((locationId) => selectedLocationsIds.includes(locationId)));\n\n return selectedPageLocationsIds;\n }\n\n /**\n * Renders extra actions\n *\n * @method renderExtraActions\n * @param {Object} action\n * @returns {JSX.Element}\n * @memberof SubItemsModule\n */\n renderExtraActions(action, index) {\n const Action = action.component;\n\n return ;\n }\n\n /**\n * Renders pagination info,\n * which is information about how many items of all user is\n * viewing at the moment\n *\n * @method renderPaginationInfo\n * @returns {JSX.Element}\n */\n renderPaginationInfo() {\n const { totalCount, activePageItems } = this.state;\n const viewingCount = activePageItems ? activePageItems.length : 0;\n\n const message = Translator.trans(\n /*@Desc(\"Viewing %viewingCount% out of %totalCount% sub-items\")*/ 'viewing_message',\n {\n viewingCount,\n totalCount,\n },\n 'sub_items'\n );\n\n return
    ;\n }\n\n /**\n * Renders pagination\n *\n * @method renderPagination\n * @returns {JSX.Element|null}\n * @memberof SubItemsModule\n */\n renderPagination() {\n const { limit: itemsPerPage } = this.props;\n const { totalCount } = this.state;\n const lessThanOnePage = totalCount <= itemsPerPage;\n\n if (lessThanOnePage) {\n return null;\n }\n\n const { activePageIndex, activePageItems, isDuringBulkOperation } = this.state;\n const isActivePageLoaded = !!activePageItems;\n const isPaginationDisabled = !isActivePageLoaded || isDuringBulkOperation;\n\n return (\n \n );\n }\n\n renderBulkMoveBtn(disabled) {\n const label = Translator.trans(/*@Desc(\"Move selected items\")*/ 'move_btn.label', {}, 'sub_items');\n\n return ;\n }\n\n renderBulkDeleteBtn(disabled) {\n const label = Translator.trans(/*@Desc(\"Delete selected items\")*/ 'trash_btn.label', {}, 'sub_items');\n\n return ;\n }\n\n renderSpinner() {\n const { activePageItems } = this.state;\n const isActivePageLoaded = !!activePageItems;\n\n if (isActivePageLoaded) {\n return null;\n }\n\n const { listViewHeight } = this.state;\n const spinnerMinHeight = 90;\n const style = {\n height: listViewHeight && listViewHeight > spinnerMinHeight ? listViewHeight : spinnerMinHeight,\n };\n\n return (\n
    \n
    \n \n
    \n
    \n );\n }\n\n renderNoItems() {\n if (this.state.totalCount) {\n return null;\n }\n\n return ;\n }\n\n renderListView() {\n const { activePageItems, sortClause, sortOrder } = this.state;\n const pageLoaded = !!activePageItems;\n\n if (!pageLoaded) {\n return null;\n }\n\n const selectedPageLocationsIds = this.getPageSelectedLocationsIds();\n\n return (\n \n );\n }\n\n render() {\n const listTitle = Translator.trans(/*@Desc(\"Sub-items\")*/ 'items_list.title', {}, 'sub_items');\n const { selectedItems, activeView, totalCount, isDuringBulkOperation, activePageItems } = this.state;\n const nothingSelected = !selectedItems.size;\n const isTableViewActive = activeView === 'table';\n const pageLoaded = !!activePageItems;\n const bulkBtnDisabled = nothingSelected || !isTableViewActive || !pageLoaded;\n let listClassName = 'm-sub-items__list';\n\n if (isDuringBulkOperation) {\n listClassName = `${listClassName} ${listClassName}--processing`;\n }\n\n return (\n
    \n
    \n
    \n {listTitle} ({this.state.totalCount})\n
    \n
    \n {this.props.extraActions.map(this.renderExtraActions)}\n {this.renderBulkMoveBtn(bulkBtnDisabled)}\n {this.renderBulkDeleteBtn(bulkBtnDisabled)}\n
    \n \n
    \n
    \n {this.renderSpinner()}\n {this.renderListView()}\n {this.renderNoItems()}\n
    \n {this.renderPaginationInfo()}\n {this.renderPagination()}\n {this.renderUdw()}\n {this.renderConfirmationPopup()}\n
    \n );\n }\n}\n\neZ.addConfig('modules.SubItems', SubItemsModule);\n\nSubItemsModule.propTypes = {\n parentLocationId: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n loadContentInfo: PropTypes.func,\n loadContentType: PropTypes.func,\n loadContentTypes: PropTypes.func,\n loadLocation: PropTypes.func,\n sortClauses: PropTypes.object,\n updateLocationPriority: PropTypes.func,\n activeView: PropTypes.string,\n extraActions: PropTypes.arrayOf(\n PropTypes.shape({\n component: PropTypes.func,\n attrs: PropTypes.object,\n })\n ),\n items: PropTypes.arrayOf(PropTypes.object),\n limit: PropTypes.number,\n offset: PropTypes.number,\n handleEditItem: PropTypes.func.isRequired,\n generateLink: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object,\n totalCount: PropTypes.number,\n languages: PropTypes.object,\n udwConfigBulkMoveItems: PropTypes.object.isRequired,\n showBulkActionFailedModal: PropTypes.func.isRequired,\n};\n\nSubItemsModule.defaultProps = {\n loadContentInfo,\n loadContentType,\n loadContentTypes,\n loadLocation,\n sortClauses: {},\n updateLocationPriority,\n activeView: 'table',\n extraActions: [],\n languages: window.eZ.adminUiConfig.languages,\n items: [],\n limit: parseInt(window.eZ.adminUiConfig.subItems.limit, 10),\n offset: 0,\n contentTypesMap: {},\n totalCount: 0,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/sub.items.module.js","module.exports = __WEBPACK_EXTERNAL_MODULE_15__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}\n// module id = 15\n// module chunks = 1","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ViewSwitcherButton from './view.switcher.button.component';\n\nconst ViewSwitcherComponent = ({ onViewChange, activeView, isDisabled }) => {\n let componentClassName = 'c-view-switcher';\n\n if (isDisabled) {\n componentClassName = `${componentClassName} ${componentClassName}--disabled`;\n }\n\n const listViewBtnLabel = Translator.trans(/*@Desc(\"View as list\")*/ 'switch_to_list_view.btn.label', {}, 'sub_items');\n const gridViewBtnLabel = Translator.trans(/*@Desc(\"View as grid\")*/ 'switch_to_grid_view.btn.label', {}, 'sub_items');\n\n return (\n
    \n \n \n
    \n );\n};\n\nViewSwitcherComponent.propTypes = {\n onViewChange: PropTypes.func.isRequired,\n activeView: PropTypes.string.isRequired,\n isDisabled: PropTypes.bool.isRequired,\n};\n\nexport default ViewSwitcherComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/view-switcher/view.switcher.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst ViewSwitcherButton = ({ id, icon, title, onClick, activeView, isDisabled }) => {\n const baseClassName = 'c-view-switcher-btn';\n const attrs = {\n id,\n onClick: () => onClick(id),\n className: baseClassName,\n title,\n tabIndex: '-1',\n };\n const iconAttrs = {\n name: icon,\n extraClasses: 'ez-icon--secondary ez-icon--small',\n };\n\n if (activeView === id) {\n attrs.className = `${baseClassName} ${baseClassName}--active`;\n iconAttrs.extraClasses = 'ez-icon--light ez-icon--small';\n }\n\n if (isDisabled) {\n attrs.className = `${attrs.className} ${baseClassName}--disabled`;\n }\n\n return (\n
    \n \n
    \n );\n};\n\nViewSwitcherButton.propTypes = {\n id: PropTypes.string.isRequired,\n activeView: PropTypes.string.isRequired,\n isDisabled: PropTypes.bool.isRequired,\n icon: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nexport default ViewSwitcherButton;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/view-switcher/view.switcher.button.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TableViewComponent from '../table-view/table.view.component.js';\nimport GridViewComponent from '../grid-view/grid.view.component.js';\n\nconst views = {\n table: TableViewComponent,\n grid: GridViewComponent,\n};\n\nconst SubItemsListComponent = (props) => {\n const Component = views[props.activeView];\n\n return ;\n};\n\nSubItemsListComponent.propTypes = {\n activeView: PropTypes.string.isRequired,\n items: PropTypes.arrayOf(PropTypes.object),\n contentTypesMap: PropTypes.object.isRequired,\n handleItemPriorityUpdate: PropTypes.func.isRequired,\n languages: PropTypes.object.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n toggleAllItemsSelect: PropTypes.func.isRequired,\n selectedLocationsIds: PropTypes.instanceOf(Set).isRequired,\n onSortChange: PropTypes.func.isRequired,\n sortClause: PropTypes.string.isRequired,\n sortOrder: PropTypes.string.isRequired,\n};\n\nexport default SubItemsListComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/sub-items-list/sub.items.list.component.js","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nexport default class TableViewItemComponent extends PureComponent {\n constructor(props) {\n super(props);\n\n this.storePriorityValue = this.storePriorityValue.bind(this);\n this.enablePriorityInput = this.enablePriorityInput.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleEdit = this.handleEdit.bind(this);\n this.onSelectCheckboxChange = this.onSelectCheckboxChange.bind(this);\n this.setPriorityInputRef = this.setPriorityInputRef.bind(this);\n\n this._refPriorityInput = null;\n\n this.state = {\n priorityValue: props.location.priority,\n priorityInputEnabled: false,\n startingPriorityValue: props.location.priority,\n };\n }\n\n /**\n * Enables priority input field\n *\n * @method enablePriorityInput\n * @memberof TableViewItemComponent\n */\n enablePriorityInput() {\n this.setState(() => ({ priorityInputEnabled: true }));\n }\n\n /**\n * Handles priority update cancel action.\n * Restores previous value and blocks the priority input.\n *\n * @method handleCancel\n * @param {Event} event\n * @memberof TableViewItemComponent\n */\n handleCancel(event) {\n event.preventDefault();\n\n this.setState((state) => ({\n priorityInputEnabled: false,\n priorityValue: state.startingPriorityValue,\n }));\n }\n\n /**\n * Handles submit action.\n * Updates priority value.\n *\n * @method handleSubmit\n * @param {Event} event\n * @memberof TableViewItemComponent\n */\n handleSubmit(event) {\n event.preventDefault();\n\n this.props.onItemPriorityUpdate({\n location: this.props.location._href,\n priority: this._refPriorityInput.value,\n });\n\n this.setState(() => ({\n priorityValue: this._refPriorityInput.value,\n priorityInputEnabled: false,\n startingPriorityValue: this._refPriorityInput.value,\n }));\n }\n\n /**\n * Stores priority value\n *\n * @method storePriorityValue\n * @param {Event} event\n * @memberof TableViewItemComponent\n */\n storePriorityValue(event) {\n event.preventDefault();\n\n this.setState(() => ({ priorityValue: this._refPriorityInput.value }));\n }\n\n /**\n * Handles edit action.\n *\n * @method handleEdit\n * @memberof TableViewItemComponent\n */\n handleEdit() {\n this.props.handleEditItem(this.props.content);\n }\n\n setPriorityInputRef(ref) {\n this._refPriorityInput = ref;\n }\n\n /**\n * Renders a priority cell with input field\n *\n * @method renderPriorityCell\n * @returns {JSX.Element}\n * @memberof TableViewItemComponent\n */\n renderPriorityCell() {\n const inputAttrs = {\n type: 'number',\n defaultValue: this.state.priorityValue,\n onChange: this.storePriorityValue,\n };\n const priorityWrapperAttrs = {};\n const innerWrapperAttrs = {};\n\n if (!this.props.columnsVisibility.priority) {\n return null;\n }\n\n if (!this.state.priorityInputEnabled) {\n inputAttrs.disabled = true;\n delete inputAttrs.defaultValue;\n inputAttrs.value = this.state.priorityValue;\n priorityWrapperAttrs.onClick = this.enablePriorityInput;\n priorityWrapperAttrs.className = 'c-table-view-item__inner-wrapper c-table-view-item__inner-wrapper--disabled';\n innerWrapperAttrs.hidden = true;\n }\n\n return (\n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n );\n }\n\n renderModifiedCell() {\n if (!this.props.columnsVisibility.modified) {\n return null;\n }\n\n const { content } = this.props;\n const { formatShortDateWithTimezone } = window.eZ.helpers.timezone;\n\n return (\n \n
    {formatShortDateWithTimezone(new Date(content.lastModificationDate))}
    \n \n );\n }\n\n renderContentTypeCell() {\n if (!this.props.columnsVisibility.contentType) {\n return null;\n }\n\n const { content, contentTypesMap } = this.props;\n const notAvailableLabel = Translator.trans(/*@Desc(\"N/A\")*/ 'content_type.not_available.label', {}, 'sub_items');\n const contentType = contentTypesMap[content.ContentType._href];\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const contentTypeName = contentTypeIdentifier ? window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier] : notAvailableLabel;\n\n return (\n \n
    {contentTypeName}
    \n \n );\n }\n\n renderTranslationsCell() {\n if (!this.props.columnsVisibility.translations) {\n return null;\n }\n\n const { content, languages } = this.props;\n const translations = content.CurrentVersion.Version.VersionInfo.VersionTranslationInfo.Language.map((langauge) => {\n return languages.mappings[langauge.languageCode].name;\n });\n\n return (\n {translations.map(this.renderTranslation)}\n );\n }\n\n /**\n * Renders a translation item\n *\n * @method renderTranslation\n * @returns {JSX.Element}\n * @memberof TableViewItemComponent\n */\n renderTranslation(translation, index) {\n return (\n \n {translation}\n \n );\n }\n\n /**\n * Calls onItemSelect callback for given item\n *\n * @param {Event} event\n */\n onSelectCheckboxChange(event) {\n const { location, content, onItemSelect } = this.props;\n const isSelected = event.target.checked;\n\n onItemSelect({ content, location }, isSelected);\n }\n\n render() {\n const { content, location, isSelected, contentTypesMap, generateLink } = this.props;\n const editLabel = Translator.trans(/*@Desc(\"Edit\")*/ 'edit_item_btn.label', {}, 'sub_items');\n const contentType = contentTypesMap[content.ContentType._href];\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const linkAttrs = {\n className: 'c-table-view-item__link c-table-view-item__text-wrapper',\n title: content.Name,\n href: generateLink(location.id),\n };\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return (\n \n \n \n \n \n \n \n \n {content.Name}\n \n {this.renderModifiedCell()}\n {this.renderContentTypeCell()}\n {this.renderPriorityCell()}\n {this.renderTranslationsCell()}\n \n \n
    \n \n
    \n \n \n \n );\n }\n}\n\nTableViewItemComponent.propTypes = {\n content: PropTypes.object.isRequired,\n location: PropTypes.object.isRequired,\n isSelected: PropTypes.bool.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemPriorityUpdate: PropTypes.func.isRequired,\n handleEditItem: PropTypes.func.isRequired,\n generateLink: PropTypes.func.isRequired,\n languages: PropTypes.object.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n columnsVisibility: PropTypes.object.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.item.component.js","import React, { Component, createRef } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Icon from '../../../common/icon/icon';\nimport TableViewColumnsTogglerListElement from './table.view.columns.toggler.list.element';\nimport { headerLabels } from './table.view.component';\n\nconst DEFAULT_PANEL_HEIGHT = 200;\n\nexport default class TableViewColumnsTogglerComponent extends Component {\n constructor(props) {\n super(props);\n\n this.togglePanel = this.togglePanel.bind(this);\n this.hidePanel = this.hidePanel.bind(this);\n\n this._refTogglerButton = createRef();\n this._refPanel = createRef();\n\n this.state = {\n isOpen: false,\n buttonBottomDocumentOffset: null,\n panelHeight: null,\n };\n }\n\n componentDidMount() {\n document.addEventListener('click', this.hidePanel, false);\n\n this.setState(() => ({\n buttonBottomDocumentOffset: this.getBtnBottomDocumentOffset(),\n }));\n }\n\n componentDidUpdate() {\n const { isOpen, panelHeight } = this.state;\n\n if (isOpen && panelHeight === null) {\n this.setState({\n panelHeight: this._refPanel.offsetHeight,\n });\n }\n }\n\n componentWillUnmount() {\n document.removeEventListener('click', this.hidePanel);\n }\n\n getBtnBottomDocumentOffset() {\n const buttonTopOffset = this._refTogglerButton.current.getBoundingClientRect().top + window.scrollY;\n\n return document.documentElement.scrollHeight - buttonTopOffset;\n }\n\n hidePanel({ target }) {\n if (!this.state.isOpen) {\n return;\n }\n\n const isClickInsideToggler = target.closest('.c-table-view-columns-toggler');\n\n if (!isClickInsideToggler) {\n this.setState(() => ({\n isOpen: false,\n }));\n }\n }\n\n togglePanel() {\n this.setState((state) => ({\n isOpen: !state.isOpen,\n }));\n }\n\n renderPanel() {\n if (!this.state.isOpen) {\n return null;\n }\n\n const { columnsVisibility, toggleColumnVisibility } = this.props;\n const { buttonBottomDocumentOffset, panelHeight: measuredPanelHeight } = this.state;\n const panelHeight = measuredPanelHeight ? measuredPanelHeight : DEFAULT_PANEL_HEIGHT;\n const panelAttrs = { className: 'c-table-view-columns-toggler__panel', ref: this._refPanel };\n\n if (buttonBottomDocumentOffset < panelHeight) {\n panelAttrs.className = `${panelAttrs.className} ${panelAttrs.className}--above-btn`;\n }\n\n return (\n
    \n
      \n {Object.entries(columnsVisibility).map(([columnKey, isColumnVisible]) => {\n const label = headerLabels[columnKey];\n\n return (\n \n );\n })}\n
    \n
    \n );\n }\n\n render() {\n return (\n
    \n \n \n \n {this.renderPanel()}\n
    \n );\n }\n}\n\nTableViewColumnsTogglerComponent.propTypes = {\n columnsVisibility: PropTypes.object.isRequired,\n toggleColumnVisibility: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.columns.toggler.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst TableViewColumnsTogglerListElement = ({ label, isColumnVisible, toggleColumnVisibility, columnKey }) => {\n return (\n
  • toggleColumnVisibility(columnKey)}>\n
    \n \n \n
    \n
  • \n );\n};\n\nTableViewColumnsTogglerListElement.propTypes = {\n label: PropTypes.string.isRequired,\n columnKey: PropTypes.string.isRequired,\n isColumnVisible: PropTypes.bool.isRequired,\n toggleColumnVisibility: PropTypes.func.isRequired,\n};\n\nexport default TableViewColumnsTogglerListElement;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.columns.toggler.list.element.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport GridViewItemComponent from './grid.view.item.component';\n\nconst GridViewComponent = (props) => {\n const { items, contentTypesMap, generateLink } = props;\n\n return (\n
    \n {items.map((data) => (\n \n ))}\n
    \n );\n};\nGridViewComponent.propTypes = {\n items: PropTypes.arrayOf(PropTypes.object),\n contentTypesMap: PropTypes.object,\n generateLink: PropTypes.func.isRequired,\n};\n\nexport default GridViewComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/grid-view/grid.view.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst GridViewItemComponent = ({ content, location, generateLink, contentTypesMap }) => {\n const imageField = content.CurrentVersion.Version.Fields.field.find((item) => item.fieldTypeIdentifier === 'ezimage');\n const imageClassName = 'c-grid-view-item__image';\n const hasImage = imageField && imageField.fieldValue && imageField.fieldValue.uri && imageField.fieldValue.path;\n const contentType = contentTypesMap ? contentTypesMap[content.ContentType._href] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n let image = (\n
    \n \n
    \n );\n let contentTypeIcon = '';\n\n if (hasImage) {\n image = {`${imageField.fieldValue.path}`};\n contentTypeIcon = (\n
    \n \n
    \n );\n }\n\n return (\n \n {contentTypeIcon}\n
    {image}
    \n
    {content.Name}
    \n
    \n );\n};\n\nGridViewItemComponent.propTypes = {\n content: PropTypes.object.isRequired,\n location: PropTypes.object.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n generateLink: PropTypes.func.isRequired,\n};\n\nexport default GridViewItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/grid-view/grid.view.item.component.js","import React, { Component } from 'react';\nimport $ from 'jquery';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon/icon';\n\nconst CLASS_NON_SCROLLABLE = 'ezs-non-scrollable';\nconst CLASS_MODAL_OPEN = 'modal-open';\nconst MODAL_CONFIG = {\n backdrop: 'static',\n keyboard: true,\n};\nconst MODAL_SIZE_CLASS = {\n small: 'modal-sm',\n medium: '',\n large: 'modal-lg',\n};\n\nclass Popup extends Component {\n constructor(props) {\n super(props);\n\n this._refModal = null;\n\n this.setModalRef = this.setModalRef.bind(this);\n this.onKeyUp = this.onKeyUp.bind(this);\n\n this.state = { isVisible: props.isVisible, isLoading: props.isLoading };\n }\n\n componentDidMount() {\n const { isVisible: show } = this.state;\n\n if (show) {\n $(this._refModal).modal({ ...MODAL_CONFIG, show, focus: this.props.hasFocus });\n\n this.attachModalEventHandlers();\n }\n }\n\n componentDidUpdate() {\n const { isVisible: show } = this.state;\n\n $(this._refModal).modal({ ...MODAL_CONFIG, show, focus: this.props.hasFocus });\n\n if (show) {\n this.attachModalEventHandlers();\n }\n }\n\n componentWillUnmount() {\n $(this._refModal).modal('hide');\n document.body.classList.remove(CLASS_MODAL_OPEN, CLASS_NON_SCROLLABLE);\n }\n\n UNSAFE_componentWillReceiveProps({ isVisible, onConfigIframeLoad, isLoading }) {\n this.setState((state) => ({ ...state, isVisible, onConfigIframeLoad, isLoading }));\n }\n\n attachModalEventHandlers() {\n const modal = $(this._refModal);\n\n modal.on('keyup', this.onKeyUp);\n modal.one('hidden.bs.modal', this.props.onClose);\n }\n\n onKeyUp(event) {\n const { originalEvent } = event;\n const escKeyCode = 27;\n const escKeyPressed = originalEvent && (originalEvent.which === escKeyCode || originalEvent.keyCode === escKeyCode);\n\n if (escKeyPressed) {\n this.props.onClose();\n }\n }\n\n setModalRef(component) {\n this._refModal = component;\n }\n\n renderHeader() {\n const closeBtnLabel = Translator.trans(/*@Desc(\"Close\")*/ 'popup.close.label', {}, 'universal_discovery_widget');\n\n return (\n
    \n {this.renderHeadline()}\n \n \n \n
    \n );\n }\n\n renderHeadline() {\n const { title } = this.props;\n\n if (!title) {\n return null;\n }\n\n return (\n

    \n {this.props.title}\n {this.renderSubtitle()}\n

    \n );\n }\n\n renderSubtitle() {\n const { subtitle } = this.props;\n\n if (!subtitle) {\n return null;\n }\n\n return {subtitle};\n }\n\n renderFooter() {\n const { footerChildren } = this.props;\n\n if (!footerChildren) {\n return;\n }\n\n return
    {footerChildren}
    ;\n }\n\n render() {\n const { isVisible } = this.state;\n const { additionalClasses, size, noHeader } = this.props;\n const modalAttrs = {\n className: 'c-popup modal fade',\n ref: this.setModalRef,\n tabIndex: this.props.hasFocus ? -1 : undefined,\n };\n\n document.body.classList.toggle(CLASS_MODAL_OPEN, isVisible);\n document.body.classList.toggle(CLASS_NON_SCROLLABLE, isVisible);\n\n if (additionalClasses) {\n modalAttrs.className = `${modalAttrs.className} ${additionalClasses}`;\n }\n\n if (noHeader) {\n modalAttrs.className = `${modalAttrs.className} c-popup--no-header`;\n }\n\n return (\n
    \n
    \n
    \n {this.renderHeader()}\n
    {this.props.children}
    \n {this.renderFooter()}\n
    \n
    \n
    \n );\n }\n}\n\nPopup.propTypes = {\n isVisible: PropTypes.bool,\n isLoading: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n onConfigIframeLoad: PropTypes.func,\n children: PropTypes.element.isRequired,\n title: PropTypes.string,\n subtitle: PropTypes.string,\n hasFocus: PropTypes.bool,\n additionalClasses: PropTypes.string,\n footerChildren: PropTypes.element,\n size: PropTypes.string,\n noHeader: PropTypes.bool,\n};\n\nPopup.defaultProps = {\n isVisible: false,\n isLoading: true,\n hasFocus: true,\n size: 'large',\n noHeader: false,\n onConfigIframeLoad: () => {},\n};\n\nexport default Popup;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/popup/popup.component.js","module.exports = __WEBPACK_EXTERNAL_MODULE_25__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}\n// module id = 25\n// module chunks = 1","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst ActionButton = (props) => {\n const { disabled, onClick, label, type } = props;\n const baseClassName = 'c-action-btn';\n const handleClick = () => {\n if (!disabled) {\n onClick();\n }\n };\n const attrs = {\n className: `${baseClassName}`,\n title: label,\n tabIndex: '-1',\n onClick: handleClick,\n };\n\n attrs.className = disabled ? `${attrs.className} ${baseClassName}--disabled` : attrs.className;\n attrs.className = type ? `${attrs.className} ${baseClassName}--${type}` : attrs.className;\n\n return (\n
    \n \n
    \n );\n};\n\nActionButton.propTypes = {\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool.isRequired,\n type: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nexport default ActionButton;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/action-btn/action.btn.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport PaginationButtonComponent from './pagination.button.component';\n\nconst DOTS = '...';\n\n/**\n * Computes array with pagination pages.\n *\n * Example 1: [ 1, \"...\", 5, 6, 7, 8, 9, 10 ] (for: proximity = 2; pagesNumber = 10; activePageIndex = 7)\n * Example 2: [ 1, \"...\", 3, 4, 5, 6, 7, \"...\", 10 ] (for: proximity = 2; pagesNumber = 10; activePageIndex = 5)\n * Example 3: [ 1, \"...\", 8, 9, 10, 11, 12, \"...\", 20 ] (for: proximity = 2; pagesNumber = 20; activePageIndex = 10)\n *\n * @param {Object} params\n * @param {Number} params.proximity\n * @param {Number} params.activePageIndex\n * @param {Number} params.pagesCount\n *\n * @returns {Array}\n */\nconst computePages = ({ proximity, activePageIndex, pagesCount }) => {\n const pages = [];\n let wereDots = false;\n\n for (let i = 1; i <= pagesCount; i++) {\n const isFirstPage = i === 1;\n const isLastPage = i === pagesCount;\n const isInRange = i >= activePageIndex + 1 - proximity && i <= activePageIndex + 1 + proximity;\n\n if (isFirstPage || isLastPage || isInRange) {\n pages.push(i);\n wereDots = false;\n } else if (!wereDots) {\n pages.push(DOTS);\n wereDots = true;\n }\n }\n\n return pages;\n};\n\nconst PaginationComponent = ({ totalCount, itemsPerPage, proximity, activePageIndex, onPageChange, disabled: paginationDisabled }) => {\n const pagesCount = Math.ceil(totalCount / itemsPerPage);\n const backLabel = Translator.trans(/*@Desc(\"Back\")*/ 'pagination.back', {}, 'sub_items');\n const nextLabel = Translator.trans(/*@Desc(\"Next\")*/ 'pagination.next', {}, 'sub_items');\n const previousPage = activePageIndex - 1;\n const nextPage = activePageIndex + 1;\n const isFirstPage = activePageIndex === 0;\n const isLastPage = activePageIndex + 1 === pagesCount;\n const pages = computePages({ proximity, activePageIndex, pagesCount });\n const paginationButtons = pages.map((page, index) => {\n if (page === DOTS) {\n return ;\n }\n\n const isCurrentPage = page === activePageIndex + 1;\n const additionalClasses = isCurrentPage ? 'active' : '';\n const label = '' + page;\n\n return (\n \n );\n });\n\n return (\n
      \n \n {paginationButtons}\n \n
    \n );\n};\n\nPaginationComponent.propTypes = {\n proximity: PropTypes.number.isRequired,\n itemsPerPage: PropTypes.number.isRequired,\n activePageIndex: PropTypes.number.isRequired,\n totalCount: PropTypes.number.isRequired,\n onPageChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n};\n\nexport default PaginationComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/pagination/pagination.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst PaginationButtonComponent = ({ label, disabled, additionalClasses, onPageChange, pageIndex }) => {\n const handleClick = () => {\n if (!disabled && Number.isInteger(pageIndex)) {\n onPageChange(pageIndex);\n }\n };\n\n let className = `c-pagination-button page-item ${additionalClasses}`;\n\n className = disabled ? `${className} disabled` : className;\n\n return (\n
  • \n \n
  • \n );\n};\n\nPaginationButtonComponent.propTypes = {\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onPageChange: PropTypes.func,\n pageIndex: PropTypes.number,\n additionalClasses: PropTypes.string,\n};\n\nPaginationButtonComponent.defaultProps = {\n disabled: false,\n additionalClasses: '',\n onPageChange: () => {},\n};\n\nexport default PaginationButtonComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/pagination/pagination.button.component.js","import React from 'react';\n\nconst NoItemsComponent = () => {\n const noItemsMessage = Translator.trans(/*@Desc(\"This location has no sub-items\")*/ 'no_items.message', {}, 'sub_items');\n\n return
    {noItemsMessage}
    ;\n};\n\nexport default NoItemsComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/no-items/no.items.component.js","import { handleRequestResponse } from '../../common/helpers/request.helper.js';\n\nconst HEADERS_CREATE_VIEW = {\n Accept: 'application/vnd.ez.api.View+json; version=1.1',\n 'Content-Type': 'application/vnd.ez.api.ViewInput+json; version=1.1',\n};\nconst ENDPOINT_CREATE_VIEW = '/api/ezp/v2/views';\n\n/**\n * Loads location struct\n *\n * @function loadLocation\n * @param {Object} restInfo - contains:\n * @param {String} restInfo.token\n * @param {String} restInfo.siteaccess\n * @param {Object} queryConfig - contains:\n * @param {Number} queryConfig.locationId\n * @param {Number} queryConfig.limit\n * @param {Number} queryConfig.offset\n * @param {Object} queryConfig.sortClauses\n * @param {Function} callback\n */\nexport const loadLocation = ({ token, siteaccess }, { locationId = 2, limit = 10, offset = 0, sortClauses }, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `subitems-load-location-${locationId}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: sortClauses,\n Filter: { ParentLocationIdCriterion: locationId },\n limit,\n offset,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: {\n ...HEADERS_CREATE_VIEW,\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n body,\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load location'));\n};\n\n/**\n * Loads content info\n *\n * @function loadContentInfo\n * @param {Array} contentIds\n * @param {Function} callback\n */\nexport const loadContentInfo = ({ token, siteaccess }, contentIds, callback) => {\n const ids = contentIds.join();\n const body = JSON.stringify({\n ViewInput: {\n identifier: `subitems-load-content-info-${ids}`,\n public: false,\n ContentQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Filter: { ContentIdCriterion: `${ids}` },\n limit: contentIds.length,\n offset: 0,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: {\n ...HEADERS_CREATE_VIEW,\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n body,\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load content info'));\n};\n\n/**\n * Loads content types\n *\n * @function loadContentTypes\n * @param {Function} callback\n */\nexport const loadContentTypes = ({ token, siteaccess }, callback) => {\n const request = new Request('/api/ezp/v2/content/types', {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load content types'));\n};\n\n/**\n * Loads content types\n *\n * @function loadContentType\n * @param {Function} callback\n */\nexport const loadContentType = (id, { token, siteaccess }, callback) => {\n const request = new Request(id, {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentType+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load a content type'));\n};\n\n/**\n * Updates location priority\n *\n * @function updateLocationPriority\n * @param {Object} params params hash containing: priority, location, token, siteaccess properties\n * @param {Function} callback\n */\nexport const updateLocationPriority = ({ priority, location, token, siteaccess }, callback) => {\n const request = new Request(location, {\n method: 'POST',\n headers: {\n Accept: 'application/vnd.ez.api.Location+json',\n 'Content-Type': 'application/vnd.ez.api.LocationUpdate+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n 'X-HTTP-Method-Override': 'PATCH',\n },\n credentials: 'same-origin',\n mode: 'cors',\n body: JSON.stringify({\n LocationUpdate: {\n priority: priority,\n sortField: 'PATH',\n sortOrder: 'ASC',\n },\n }),\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('An error occurred while updating location priority'));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/services/sub.items.service.js","import { handleRequestResponse } from '../../common/helpers/request.helper.js';\n\nconst HEADERS_BULK = {\n Accept: 'application/vnd.ez.api.BulkOperationResponse+json',\n 'Content-Type': 'application/vnd.ez.api.BulkOperation+json',\n};\nconst TRASH_FAKE_LOCATION = '/api/ezp/v2/content/trash';\nconst ENDPOINT_BULK = '/api/ezp/v2/bulk';\n\nexport const bulkMoveLocations = (restInfo, locations, newLocationHref, callback) => {\n const requestBodyOperations = getBulkMoveRequestOperations(locations, newLocationHref);\n\n makeBulkRequest(restInfo, requestBodyOperations, processBulkResponse.bind(null, locations, 201, callback));\n};\n\nexport const bulkMoveLocationsToTrash = (restInfo, locations, callback) => {\n bulkMoveLocations(restInfo, locations, TRASH_FAKE_LOCATION, callback);\n};\n\nconst getBulkMoveRequestOperations = (locations, destination) => {\n const operations = {};\n\n locations.forEach((location) => {\n operations[location.id] = {\n uri: location._href,\n method: 'MOVE',\n headers: {\n Destination: destination,\n },\n };\n });\n\n return operations;\n};\n\nconst processBulkResponse = (locations, successCode, callback, response) => {\n const { operations } = response.BulkOperationResponse;\n const locationsMatches = Object.entries(operations).reduce(\n (locationsMatches, [locationId, response]) => {\n const respectiveItem = locations.find((location) => location.id === parseInt(locationId, 10));\n const isSuccess = response.statusCode === successCode;\n\n if (isSuccess) {\n locationsMatches.success.push(respectiveItem);\n } else {\n locationsMatches.fail.push(respectiveItem);\n }\n\n return locationsMatches;\n },\n { success: [], fail: [] }\n );\n\n callback(locationsMatches.success, locationsMatches.fail);\n};\n\nconst makeBulkRequest = ({ token, siteaccess }, requestBodyOperations, callback) => {\n const request = new Request(ENDPOINT_BULK, {\n method: 'POST',\n headers: {\n ...HEADERS_BULK,\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n body: JSON.stringify({\n bulkOperations: {\n operations: requestBodyOperations,\n },\n }),\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => {\n const message = Translator.trans(\n /*@Desc(\"An unexpected error occurred while deleting the content item(s). Please try again later.\")*/ 'bulk_request.error.message',\n {},\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showErrorNotification(message);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/services/bulk.service.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 9e3e3de79ce53e8fc1c1","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/common/helpers/request.helper.js","webpack:///./src/modules/common/helpers/deep.clone.helper.js","webpack:///./src/modules/sub-items/components/table-view/table.view.component.js","webpack:///./src/modules/sub-items/sub.items.module.js","webpack:///external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}","webpack:///./src/modules/sub-items/components/view-switcher/view.switcher.component.js","webpack:///./src/modules/sub-items/components/view-switcher/view.switcher.button.component.js","webpack:///./src/modules/sub-items/components/sub-items-list/sub.items.list.component.js","webpack:///./src/modules/sub-items/components/table-view/table.view.item.component.js","webpack:///./src/modules/sub-items/components/table-view/table.view.columns.toggler.js","webpack:///./src/modules/sub-items/components/table-view/table.view.columns.toggler.list.element.js","webpack:///./src/modules/sub-items/components/grid-view/grid.view.component.js","webpack:///./src/modules/sub-items/components/grid-view/grid.view.item.component.js","webpack:///./src/modules/common/popup/popup.component.js","webpack:///external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}","webpack:///./src/modules/sub-items/components/action-btn/action.btn.js","webpack:///./src/modules/sub-items/components/pagination/pagination.component.js","webpack:///./src/modules/sub-items/components/pagination/pagination.button.component.js","webpack:///./src/modules/sub-items/components/no-items/no.items.component.js","webpack:///./src/modules/sub-items/services/sub.items.service.js","webpack:///./src/modules/sub-items/services/bulk.service.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","__WEBPACK_EXTERNAL_MODULE_15__","__WEBPACK_EXTERNAL_MODULE_25__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","getBasicRequestInit","token","siteaccess","headers","X-Siteaccess","X-CSRF-Token","mode","credentials","handleRequestError","response","ok","Error","statusText","handleRequestResponse","json","handleRequestResponseStatus","status","deepClone","data","clonedData","toString","apply","length","_react","KEY_CONTENT_NAME","KEY_DATE_MODIFIED","KEY_LOCATION_PRIORITY","SORTKEY_MAP","[object Object]","COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY","DEFAULT_COLUMNS_VISIBILITY","modified","contentType","priority","translations","TABLE_CELL_CLASS","TABLE_HEAD_CLASS","TABLE_CELL_SORT_CLASS","headerLabels","Translator","trans","TableViewComponent","Component","constructor","super","sortByName","bind","sortByDate","sortByPriority","renderItem","selectAll","setColumnsVisibilityInLocalStorage","toggleColumnVisibility","_refColumnsTogglerButton","createRef","state","columnsVisibility","getColumnsVisibilityFromLocalStorage","columnsVisibilityData","localStorage","getItem","JSON","parse","stringify","setItem","onSortChange","event","toggleAllItemsSelect","target","checked","column","setState","_props","contentTypesMap","handleItemPriorityUpdate","handleEditItem","generateLink","languages","onItemSelect","isSelected","selectedLocationsIds","has","location","id","_tableViewItem2","_extends","key","onItemPriorityUpdate","renderModifiedHeader","onClick","tabIndex","renderContentTypeHeader","renderPriorityHeader","renderTranslationsHeader","renderHead","headClass","items","_props2","sortClause","sortOrder","anyLocationSelected","size","type","onChange","_tableViewColumns2","render","content","map","arrayOf","func","instanceOf","Set","_subItems","_bulkService","ASCENDING_SORT_ORDER","DESCENDING_SORT_ORDER","DEFAULT_SORT_ORDER","SubItemsModule","afterPriorityUpdated","loadContentItems","loadContentTypes","updateItemsState","switchView","toggleItemSelection","toggleAllPageItemsSelection","onMoveBtnClick","closeUdw","onUdwConfirm","onDeleteBtnClick","closeBulkDeletePopup","onBulkDeletePopupConfirm","afterBulkDelete","changePage","changeSorting","_refListViewWrapper","React","bulkDeleteModalContainer","udwContainer","sortClauseData","getDefaultSortClause","sortClauses","activeView","activePageItems","selectedItems","Map","totalCount","offset","isDuringBulkOperation","isUdwOpened","isBulkDeletePopupVisible","activePageIndex","listViewHeight","order","componentDidMount","document","getElementById","classList","add","body","appendChild","componentDidUpdate","_state","itemsPerPage","limit","pagesCount","Math","ceil","loadPage","componentWillUnmount","removeChild","objKeys","keys","updateListViewHeight","current","offsetHeight","pageIndex","loadLocation","then","catch","errorMessage","window","eZ","helpers","notification","showErrorNotification","restInfo","locationId","parentLocationId","_state2","queryConfig","Promise","resolve","loadContentInfo","View","invalidResponseFormatMessage","locations","Result","searchHits","searchHit","contentIds","item","value","Location","ContentInfo","Content","_id","contentInfo","count","contentItems","itemsData","promises","contentTypeId","ContentType","_href","loadContentType","all","contentTypes","pageItems","itemLocation","respectiveContent","find","buildContentTypesMap","reduce","total","updateTotalCountState","discardActivePageItems","getSortOrder","newSortClause","currentSortOrder","getOppositeSortOrder","updateLocationPriority","updateItemLocation","itemIndex","findIndex","updatedItem","_deepCloneHelper2","updatedPageItems","updatedSelectedItems","set","delete","select","selectItems","locationsIds","locationsIdsSet","deselectItems","itemsToSelect","newSelectedItems","newSelection","filter","deselectAllItems","toggleBulkOperationStatusState","toggleUdw","bulkMove","locationsToMove","values","bulkMoveLocations","afterBulkMove","movedLocations","notMovedLocations","modalTableTitle","itemsCount","notificationMessage","notMovedCount","handleBulkOperationFailedNotification","message","locationName","Name","locationHref","showSuccessNotification","show","selectedLocation","renderUdw","UniversalDiscovery","_props3","udwConfigBulkMoveItems","excludedMoveLocations","title","udwProps","onCancel","onConfirm","canSelectContent","callback","includes","ReactDOM","createPortal","toggleBulkDeletePopup","bulkDelete","locationsToDelete","bulkMoveLocationsToTrash","deletedLocations","notDeletedLocations","notDeletedCount","failedLocations","failedItemsData","contentTypeIdentifier","identifier","contentTypeName","adminUiConfig","contentTypeNames","contentName","showWarningNotification","notificationNode","showModalBtn","querySelector","addEventListener","showBulkActionFailedModal","renderConfirmationPopupFooter","cancelLabel","confirmLabel","Fragment","data-dismiss","renderConfirmationPopup","confirmationMessage","_popup2","onClose","isVisible","isLoading","footerChildren","noHeader","getPageSelectedLocationsIds","_state3","pageLocationsIds","renderExtraActions","action","index","Action","component","attrs","renderPaginationInfo","_state4","viewingCount","dangerouslySetInnerHTML","__html","renderPagination","_state5","isPaginationDisabled","_paginationComponent2","proximity","onPageChange","disabled","renderBulkMoveBtn","label","_actionBtn2","renderBulkDeleteBtn","renderSpinner","style","height","_icon2","renderNoItems","_noItemsComponent2","renderListView","_state6","selectedPageLocationsIds","_subItemsListComponent2","listTitle","_state7","bulkBtnDisabled","listClassName","extraActions","_viewSwitcherComponent2","onViewChange","isDisabled","ref","addConfig","number","shape","parseInt","subItems","ViewSwitcherComponent","componentClassName","listViewBtnLabel","gridViewBtnLabel","_viewSwitcherButton2","icon","bool","ViewSwitcherButton","iconAttrs","views","table","grid","GridViewComponent","SubItemsListComponent","TableViewItemComponent","PureComponent","storePriorityValue","enablePriorityInput","handleSubmit","handleCancel","handleEdit","onSelectCheckboxChange","setPriorityInputRef","_refPriorityInput","priorityValue","priorityInputEnabled","startingPriorityValue","preventDefault","renderPriorityCell","inputAttrs","defaultValue","priorityWrapperAttrs","innerWrapperAttrs","hidden","renderModifiedCell","formatShortDateWithTimezone","timezone","Date","lastModificationDate","renderContentTypeCell","notAvailableLabel","renderTranslationsCell","CurrentVersion","Version","VersionInfo","VersionTranslationInfo","Language","langauge","mappings","languageCode","renderTranslation","translation","_props4","editLabel","linkAttrs","href","contentTypeIconUrl","getContentTypeIconUrl","_tableView","DEFAULT_PANEL_HEIGHT","TableViewColumnsTogglerComponent","togglePanel","hidePanel","_refTogglerButton","_refPanel","isOpen","buttonBottomDocumentOffset","panelHeight","getBtnBottomDocumentOffset","removeEventListener","buttonTopOffset","getBoundingClientRect","top","scrollY","documentElement","scrollHeight","closest","renderPanel","measuredPanelHeight","panelAttrs","entries","columnKey","isColumnVisible","_tableViewColumnsTogglerList2","TableViewColumnsTogglerListElement","readOnly","_gridViewItem2","GridViewItemComponent","imageField","Fields","field","fieldTypeIdentifier","hasImage","fieldValue","uri","path","image","contentTypeIcon","src","alt","CLASS_NON_SCROLLABLE","CLASS_MODAL_OPEN","MODAL_CONFIG","backdrop","keyboard","MODAL_SIZE_CLASS","small","medium","large","Popup","_refModal","setModalRef","onKeyUp","_jquery2","modal","focus","hasFocus","attachModalEventHandlers","remove","UNSAFE_componentWillReceiveProps","onConfigIframeLoad","on","one","originalEvent","which","keyCode","renderHeader","closeBtnLabel","renderHeadline","aria-label","renderSubtitle","subtitle","renderFooter","additionalClasses","modalAttrs","undefined","toggle","role","children","element","ActionButton","PaginationComponent","paginationDisabled","backLabel","nextLabel","previousPage","nextPage","isFirstPage","isLastPage","paginationButtons","pages","wereDots","push","computePages","page","_paginationButton2","PaginationButtonComponent","Number","isInteger","noItemsMessage","_requestHelper","HEADERS_CREATE_VIEW","Accept","Content-Type","ViewInput","public","LocationQuery","Criteria","FacetBuilders","SortClauses","Filter","ParentLocationIdCriterion","request","Request","method","fetch","ids","join","ContentQuery","ContentIdCriterion","X-HTTP-Method-Override","LocationUpdate","sortField","HEADERS_BULK","newLocationHref","requestBodyOperations","getBulkMoveRequestOperations","makeBulkRequest","processBulkResponse","destination","operations","forEach","Destination","successCode","BulkOperationResponse","locationsMatches","respectiveItem","statusCode","success","fail","bulkOperations"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,aAAAA,QAAA,WACA,mBAAAC,eAAAC,IACAD,QAAA,2CAAAJ,GACA,iBAAAC,QACAA,QAAA,SAAAD,EAAAG,QAAA,SAAAA,QAAA,cAAAA,QAAA,aAAAA,QAAA,YAEAJ,EAAA,GAAAA,EAAA,OAA+BA,EAAA,WAAAA,EAAA,eAAqDA,EAAA,oBAAAC,EAAAD,EAAA,MAAAA,EAAA,UAAAA,EAAA,SAAAA,EAAA,SARpF,CASC,oBAAAO,UAAAC,KAAA,SAAAC,EAAAC,EAAAC,EAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAb,QAGA,IAAAC,EAAAU,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAf,YAUA,OANAgB,EAAAH,GAAAI,KAAAhB,EAAAD,QAAAC,IAAAD,QAAAY,GAGAX,EAAAc,GAAA,EAGAd,EAAAD,QAqCA,OAhCAY,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAApB,EAAAqB,EAAAC,GACAV,EAAAW,EAAAvB,EAAAqB,IACAG,OAAAC,eAAAzB,EAAAqB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAA5B,GACA,IAAAqB,EAAArB,KAAA6B,WACA,WAA2B,OAAA7B,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAW,EAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,OAAAR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,EAAeriB,EAASyiB,sBAAxBJ,WACFK,EAAmB/kB,OAAO4d,QAAQ8G,GAAYhV,OAChD,CAACqV,GAAmBzX,EAAYjL,MAC5B,MAAM2iB,EAAiBjX,EAAUyB,KAAM1I,GAAaA,EAASC,KAAO2R,SAASpL,EAAY,KASzF,OARkBjL,EAAS4iB,aAAeJ,EAGtCE,EAAiBG,QAAQ9C,KAAK4C,GAE9BD,EAAiBI,KAAK/C,KAAK4C,GAGxBD,IAETG,WAAaC,UAGnB9R,EAAS0R,EAAiBG,QAASH,EAAiBI,OAGlDZ,EAAkB,EAAG1iB,QAAOC,cAAcuiB,EAAuBhR,KACnE,MAAMmQ,EAAU,IAAIC,QAlDF,oBAmDdC,OAAQ,OACR3hB,aACOoiB,GACHniB,eAAgBF,EAChBG,eAAgBJ,IAEpB6J,KAAMjG,KAAKE,WACPyf,gBACIV,WAAYL,KAGpBniB,KAAM,cACNC,YAAa,gBAGjBwhB,MAAMH,GACD3W,KAAKpK,yBACLoK,KAAKwG,GACLvG,MAAM,KACH,MAAMsF,EAAUjO,WAAWC,MAC+E,gCAEtG,aAGJ4I,OAAOC,GAAGC,QAAQC,aAAaC,sBAAsBgF","file":"SubItems.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"), require(\"react-dom\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\", \"react-dom\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SubItems\"] = factory(require(\"react\"), require(\"prop-types\"), require(\"react-dom\"), require(\"jquery\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"SubItems\"] = factory(root[\"React\"], root[\"PropTypes\"], root[\"ReactDOM\"], root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_15__, __WEBPACK_EXTERNAL_MODULE_25__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9e3e3de79ce53e8fc1c1","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","/**\n * Returns basic RequestInit object for Request\n *\n * @function getBasicRequestInit\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @returns {RequestInit}\n */\nexport const getBasicRequestInit = ({ token, siteaccess }) => {\n return {\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n };\n};\n\n/**\n * Handles request error\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Response}\n */\nexport const handleRequestError = (response) => {\n if (!response.ok) {\n throw Error(response.statusText);\n }\n\n return response;\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Error|Promise}\n */\nexport const handleRequestResponse = (response) => {\n return handleRequestError(response).json();\n};\n\n/**\n * Handles request response; returns status if response is OK\n *\n * @function handleRequestResponseStatus\n * @param {Response} response\n * @returns {number}\n */\nexport const handleRequestResponseStatus = (response) => {\n return handleRequestError(response).status;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/request.helper.js","/**\n * Clones any object. Faster alternative to `JSON.parse(JSON.stringify)`\n *\n * @function deepClone\n * @param {Any} data\n * @returns {Any} cloned data\n */\nconst deepClone = (data) => {\n let clonedData;\n\n if (typeof data !== 'object') {\n return data;\n }\n\n if (!data) {\n return data;\n }\n\n if (Object.prototype.toString.apply(data) === '[object Array]') {\n clonedData = [];\n\n for (let i = 0; i < data.length; i++) {\n clonedData[i] = deepClone(data[i]);\n }\n\n return clonedData;\n }\n\n clonedData = {};\n\n for (let i in data) {\n if (data.hasOwnProperty(i)) {\n clonedData[i] = deepClone(data[i]);\n }\n }\n\n return clonedData;\n};\n\nexport default deepClone;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/deep.clone.helper.js","import React, { Component, createRef } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TableViewItemComponent from './table.view.item.component';\nimport TableViewColumnsTogglerComponent from './table.view.columns.toggler';\n\nconst KEY_CONTENT_NAME = 'ContentName';\nconst KEY_DATE_MODIFIED = 'DateModified';\nconst KEY_LOCATION_PRIORITY = 'LocationPriority';\nconst SORTKEY_MAP = {\n [KEY_CONTENT_NAME]: 'name',\n [KEY_DATE_MODIFIED]: 'date',\n [KEY_LOCATION_PRIORITY]: 'priority',\n};\nconst COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY = 'sub-items_columns-visibility';\nconst DEFAULT_COLUMNS_VISIBILITY = {\n modified: true,\n contentType: true,\n priority: true,\n translations: true,\n};\nconst TABLE_CELL_CLASS = 'c-table-view__cell';\nconst TABLE_HEAD_CLASS = `${TABLE_CELL_CLASS} ${TABLE_CELL_CLASS}--head`;\nconst TABLE_CELL_SORT_CLASS = `${TABLE_CELL_CLASS} ${TABLE_CELL_CLASS}--sortable`;\nexport const headerLabels = {\n name: Translator.trans(/*@Desc(\"Name\")*/ 'items_table.header.name', {}, 'sub_items'),\n modified: Translator.trans(/*@Desc(\"Modified\")*/ 'items_table.header.modified', {}, 'sub_items'),\n contentType: Translator.trans(/*@Desc(\"Content type\")*/ 'items_table.header.content_type', {}, 'sub_items'),\n priority: Translator.trans(/*@Desc(\"Priority\")*/ 'items_table.header.priority', {}, 'sub_items'),\n translations: Translator.trans(/*@Desc(\"Translations\")*/ 'items_table.header.translations', {}, 'sub_items'),\n};\n\nexport default class TableViewComponent extends Component {\n constructor(props) {\n super(props);\n\n this.sortByName = this.sortByName.bind(this);\n this.sortByDate = this.sortByDate.bind(this);\n this.sortByPriority = this.sortByPriority.bind(this);\n this.renderItem = this.renderItem.bind(this);\n this.selectAll = this.selectAll.bind(this);\n this.setColumnsVisibilityInLocalStorage = this.setColumnsVisibilityInLocalStorage.bind(this);\n this.toggleColumnVisibility = this.toggleColumnVisibility.bind(this);\n\n this._refColumnsTogglerButton = createRef();\n\n this.state = {\n columnsVisibility: this.getColumnsVisibilityFromLocalStorage(),\n };\n }\n\n getColumnsVisibilityFromLocalStorage() {\n const columnsVisibilityData = localStorage.getItem(COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY);\n\n return columnsVisibilityData ? JSON.parse(columnsVisibilityData) : DEFAULT_COLUMNS_VISIBILITY;\n }\n\n setColumnsVisibilityInLocalStorage() {\n const columnsVisibilityData = JSON.stringify(this.state.columnsVisibility);\n\n localStorage.setItem(COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY, columnsVisibilityData);\n }\n\n /**\n * Changes sort to name\n */\n sortByName() {\n const { onSortChange } = this.props;\n\n onSortChange(KEY_CONTENT_NAME);\n }\n\n /**\n * Changes sort to modification date\n */\n sortByDate() {\n const { onSortChange } = this.props;\n\n onSortChange(KEY_DATE_MODIFIED);\n }\n\n /**\n * Changes sort to priority\n */\n sortByPriority() {\n const { onSortChange } = this.props;\n\n onSortChange(KEY_LOCATION_PRIORITY);\n }\n\n /**\n * Selects all visible items\n *\n * @param {Event} event\n */\n selectAll(event) {\n const { toggleAllItemsSelect } = this.props;\n const isSelectAction = event.target.checked;\n\n toggleAllItemsSelect(isSelectAction);\n }\n\n toggleColumnVisibility(column) {\n this.setState(\n (state) => ({\n columnsVisibility: {\n ...state.columnsVisibility,\n [column]: !state.columnsVisibility[column],\n },\n }),\n this.setColumnsVisibilityInLocalStorage\n );\n }\n\n /**\n * Renders single list item\n *\n * @method renderItem\n * @param {Object} data\n * @returns {JSX.Element}\n * @memberof TableViewComponent\n */\n renderItem(data) {\n const { columnsVisibility } = this.state;\n const {\n contentTypesMap,\n handleItemPriorityUpdate,\n handleEditItem,\n generateLink,\n languages,\n onItemSelect,\n selectedLocationsIds,\n } = this.props;\n const isSelected = selectedLocationsIds.has(data.location.id);\n\n return (\n \n );\n }\n\n renderModifiedHeader() {\n if (!this.state.columnsVisibility.modified) {\n return null;\n }\n\n return (\n \n {headerLabels.modified}\n \n );\n }\n\n renderContentTypeHeader() {\n if (!this.state.columnsVisibility.contentType) {\n return null;\n }\n\n return (\n \n {headerLabels.contentType}\n \n );\n }\n\n renderPriorityHeader() {\n if (!this.state.columnsVisibility.priority) {\n return null;\n }\n\n return (\n \n {headerLabels.priority}\n \n );\n }\n\n renderTranslationsHeader() {\n if (!this.state.columnsVisibility.translations) {\n return null;\n }\n\n return (\n \n {headerLabels.translations}\n \n );\n }\n\n /**\n * Renders table's head\n *\n * @method renderHead\n * @returns {JSX.Element|null}\n * @memberof GridViewComponent\n */\n renderHead() {\n const cellClass = 'c-table-view__cell';\n const { items } = this.props;\n let headClass = 'c-table-view__head';\n\n if (!items.length) {\n return null;\n }\n\n const { sortClause, sortOrder } = this.props;\n\n if (sortClause) {\n const headSortOrderClass = sortOrder === 'ascending' ? `${headClass}--sort-asc` : `${headClass}--sort-desc`;\n const headSortByClass = `${headClass}--sort-by-${SORTKEY_MAP[sortClause]}`;\n\n headClass = `${headClass} ${headSortOrderClass} ${headSortByClass}`;\n }\n\n const { columnsVisibility } = this.state;\n const { selectedLocationsIds } = this.props;\n const anyLocationSelected = !!selectedLocationsIds.size;\n\n return (\n \n \n \n \n \n \n \n {headerLabels.name}\n \n {this.renderModifiedHeader()}\n {this.renderContentTypeHeader()}\n {this.renderPriorityHeader()}\n {this.renderTranslationsHeader()}\n \n \n \n \n \n );\n }\n\n render() {\n const { items } = this.props;\n const content = items.map(this.renderItem);\n\n return (\n
    \n
    \n \n {this.renderHead()}\n {content}\n
    \n
    \n
    \n );\n }\n}\n\nTableViewComponent.propTypes = {\n items: PropTypes.arrayOf(PropTypes.object).isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n handleItemPriorityUpdate: PropTypes.func.isRequired,\n generateLink: PropTypes.func.isRequired,\n handleEditItem: PropTypes.func.isRequired,\n languages: PropTypes.object.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n toggleAllItemsSelect: PropTypes.func.isRequired,\n selectedLocationsIds: PropTypes.instanceOf(Set),\n onSortChange: PropTypes.func.isRequired,\n sortClause: PropTypes.string.isRequired,\n sortOrder: PropTypes.string.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.component.js","import React, { Component, Fragment } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\n\nimport ViewSwitcherComponent from './components/view-switcher/view.switcher.component.js';\nimport SubItemsListComponent from './components/sub-items-list/sub.items.list.component.js';\nimport Popup from '../common/popup/popup.component';\nimport ActionButton from './components/action-btn/action.btn.js';\nimport PaginationComponent from './components/pagination/pagination.component.js';\nimport NoItemsComponent from './components/no-items/no.items.component.js';\nimport Icon from '../common/icon/icon.js';\n\nimport deepClone from '../common/helpers/deep.clone.helper.js';\nimport { updateLocationPriority, loadLocation, loadContentInfo, loadContentType, loadContentTypes } from './services/sub.items.service';\nimport { bulkMoveLocations, bulkMoveLocationsToTrash } from './services/bulk.service.js';\n\nconst ASCENDING_SORT_ORDER = 'ascending';\nconst DESCENDING_SORT_ORDER = 'descending';\nconst DEFAULT_SORT_ORDER = ASCENDING_SORT_ORDER;\n\nexport default class SubItemsModule extends Component {\n constructor(props) {\n super(props);\n\n this.afterPriorityUpdated = this.afterPriorityUpdated.bind(this);\n this.loadContentItems = this.loadContentItems.bind(this);\n this.loadContentTypes = this.loadContentTypes.bind(this);\n this.updateItemsState = this.updateItemsState.bind(this);\n this.switchView = this.switchView.bind(this);\n this.handleItemPriorityUpdate = this.handleItemPriorityUpdate.bind(this);\n this.toggleItemSelection = this.toggleItemSelection.bind(this);\n this.toggleAllPageItemsSelection = this.toggleAllPageItemsSelection.bind(this);\n this.onMoveBtnClick = this.onMoveBtnClick.bind(this);\n this.closeUdw = this.closeUdw.bind(this);\n this.onUdwConfirm = this.onUdwConfirm.bind(this);\n this.onDeleteBtnClick = this.onDeleteBtnClick.bind(this);\n this.closeBulkDeletePopup = this.closeBulkDeletePopup.bind(this);\n this.onBulkDeletePopupConfirm = this.onBulkDeletePopupConfirm.bind(this);\n this.afterBulkDelete = this.afterBulkDelete.bind(this);\n this.changePage = this.changePage.bind(this);\n this.changeSorting = this.changeSorting.bind(this);\n\n this._refListViewWrapper = React.createRef();\n this.bulkDeleteModalContainer = null;\n this.udwContainer = null;\n\n const sortClauseData = this.getDefaultSortClause(props.sortClauses);\n\n this.state = {\n activeView: props.activeView,\n activePageItems: props.items,\n selectedItems: new Map(),\n contentTypesMap: props.contentTypesMap,\n totalCount: props.totalCount,\n offset: props.offset,\n isDuringBulkOperation: false,\n isUdwOpened: false,\n isBulkDeletePopupVisible: false,\n activePageIndex: 0,\n listViewHeight: null,\n sortClause: sortClauseData.name,\n sortOrder: sortClauseData.order,\n };\n }\n\n componentDidMount() {\n this.udwContainer = document.getElementById('react-udw');\n this.bulkDeleteModalContainer = document.createElement('div');\n this.bulkDeleteModalContainer.classList.add('m-sub-items__bulk-delete-modal-container');\n document.body.appendChild(this.bulkDeleteModalContainer);\n }\n\n componentDidUpdate() {\n const { activePageIndex, activePageItems, totalCount } = this.state;\n const { limit: itemsPerPage } = this.props;\n const pagesCount = Math.ceil(totalCount / itemsPerPage);\n const pageDoesNotExist = activePageIndex > pagesCount - 1 && activePageIndex !== 0;\n\n if (pageDoesNotExist) {\n this.setState({\n activePageIndex: pagesCount - 1,\n });\n\n return;\n }\n\n const shouldLoadPage = !activePageItems;\n\n if (shouldLoadPage) {\n this.loadPage(activePageIndex);\n }\n }\n\n componentWillUnmount() {\n document.body.removeChild(this.bulkDeleteModalContainer);\n }\n\n getDefaultSortClause(sortClauses) {\n const objKeys = Object.keys(sortClauses);\n\n if (!objKeys.length) {\n return { name: null, order: null };\n }\n\n const name = objKeys[0];\n const order = sortClauses[name];\n\n return { name, order };\n }\n\n updateListViewHeight() {\n this.setState(() => ({\n listViewHeight: this._refListViewWrapper.current.offsetHeight,\n }));\n }\n\n /**\n * Loads items into the list\n *\n * @method loadPage\n * @memberof SubItemsModule\n */\n loadPage(pageIndex) {\n this.loadLocation(pageIndex)\n .then(this.loadContentItems)\n .then(this.loadContentTypes)\n .then(this.updateItemsState)\n .catch(() => {\n const errorMessage = Translator.trans(\n /*@Desc(\"An error occurred while loading items in the Sub Items module\")*/ 'page.loading_error.message',\n {},\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showErrorNotification(errorMessage);\n });\n }\n\n /**\n * Loads location data\n *\n * @param {Number} pageIndex\n * @method loadLocation\n * @returns {Promise}\n * @memberof SubItemsModule\n */\n loadLocation(pageIndex) {\n const { limit: itemsPerPage, loadLocation, restInfo, parentLocationId: locationId } = this.props;\n const { sortClause, sortOrder } = this.state;\n const offset = pageIndex * itemsPerPage;\n const sortClauses = {\n [sortClause]: sortOrder,\n };\n const queryConfig = { locationId, limit: itemsPerPage, sortClauses, offset };\n\n return new Promise((resolve) => loadLocation(restInfo, queryConfig, resolve));\n }\n\n /**\n * Loads content items from location\n *\n * @method loadContentItems\n * @param {Object} response query results\n * @returns {Promise}\n * @memberof SubItemsModule\n */\n loadContentItems(response) {\n const { loadContentInfo, restInfo } = this.props;\n\n if (!response || !response.View) {\n const invalidResponseFormatMessage = Translator.trans(\n /*@Desc(\"Invalid response format\")*/ 'load_content_items.invalid_response_format.error.message',\n {},\n 'sub_items'\n );\n\n throw new Error(invalidResponseFormatMessage);\n }\n\n const locations = response.View.Result.searchHits.searchHit;\n\n return new Promise((resolve) => {\n const contentIds = locations.map((item) => item.value.Location.ContentInfo.Content._id);\n\n loadContentInfo(restInfo, contentIds, (contentInfo) => {\n const totalCount = response.View.Result.count;\n\n resolve({\n locations,\n totalCount,\n contentItems: contentInfo.View.Result.searchHits.searchHit.map((searchHit) => searchHit.value.Content),\n });\n });\n });\n }\n\n /**\n * Loads content types info\n *\n * @method loadContentTypes\n * @param {Object} itemsData\n * @returns {Promise}\n * @memberof SubItemsModule\n */\n loadContentTypes(itemsData) {\n const promises = itemsData.contentItems.map(\n (content) =>\n new Promise((resolve) => {\n const contentTypeId = content.ContentType._href;\n\n if (!this.state.contentTypesMap[contentTypeId]) {\n this.props.loadContentType(contentTypeId, this.props.restInfo, (response) => resolve(response));\n } else {\n resolve({ ContentType: this.state.contentTypesMap[contentTypeId] });\n }\n })\n );\n\n return Promise.all(promises).then((contentTypes) => {\n itemsData.contentTypes = contentTypes;\n\n return itemsData;\n });\n }\n\n /**\n * Updates module state by updating items list\n *\n * @method updateItemsState\n * @param {Object} responses\n * @memberof SubItemsModule\n */\n updateItemsState({ locations, contentItems, totalCount, contentTypes }) {\n const pageItems = locations.map((location) => {\n const itemLocation = location.value.Location;\n const respectiveContent = contentItems.find((content) => content._id === itemLocation.ContentInfo.Content._id);\n\n return {\n location: itemLocation,\n content: respectiveContent,\n };\n });\n\n this.setState((state) => ({\n activePageItems: pageItems,\n totalCount,\n contentTypesMap: {\n ...state.contentTypesMap,\n ...this.buildContentTypesMap(contentTypes),\n },\n }));\n }\n\n /**\n * Builds content types map\n *\n * @method buildContentTypesMap\n * @param {Array} contentTypes\n * @returns {Object}\n * @memberof SubItemsModule\n */\n buildContentTypesMap(contentTypes) {\n if (!contentTypes) {\n return {};\n }\n\n return contentTypes.reduce((total, item) => {\n total[item.ContentType._href] = item.ContentType;\n\n return total;\n }, {});\n }\n\n updateTotalCountState(totalCount) {\n this.setState(() => ({\n totalCount,\n }));\n }\n\n discardActivePageItems() {\n this.updateListViewHeight();\n this.setState(() => ({\n activePageItems: null,\n }));\n }\n\n changeSorting(sortClause) {\n this.updateListViewHeight();\n this.setState((state) => ({\n sortClause,\n sortOrder: this.getSortOrder(state.sortClause, sortClause, state.sortOrder),\n activePageItems: null,\n }));\n }\n\n getSortOrder(sortClause, newSortClause, currentSortOrder) {\n return newSortClause === sortClause ? this.getOppositeSortOrder(currentSortOrder) : DEFAULT_SORT_ORDER;\n }\n\n getOppositeSortOrder(sortOrder) {\n return sortOrder === ASCENDING_SORT_ORDER ? DESCENDING_SORT_ORDER : ASCENDING_SORT_ORDER;\n }\n\n /**\n * Updates item priority\n *\n * @method handleItemPriorityUpdate\n * @param {Object} data data hash containing: priority, location, token, siteaccess\n * @memberof SubItemsModule\n */\n handleItemPriorityUpdate(data) {\n this.props.updateLocationPriority({ ...data, ...this.props.restInfo }, this.afterPriorityUpdated);\n }\n\n /**\n * Updates module state after item's priority has been updated\n *\n * @method afterPriorityUpdated\n * @param {Object} response\n * @memberof SubItemsModule\n */\n afterPriorityUpdated(response) {\n if (this.state.sortClause === 'LocationPriority') {\n this.discardActivePageItems();\n return;\n }\n\n this.updateItemLocation(response.Location);\n }\n\n updateItemLocation(location) {\n this.setState(({ activePageItems }) => {\n const itemIndex = activePageItems.findIndex((item) => item.location.id === location.id);\n\n if (itemIndex === -1) {\n return null;\n }\n\n const item = activePageItems[itemIndex];\n const updatedItem = deepClone(item);\n const updatedPageItems = [...activePageItems];\n\n updatedItem.location = location;\n updatedPageItems[itemIndex] = updatedItem;\n\n return {\n activePageItems: updatedPageItems,\n };\n });\n }\n\n /**\n * Switches active view\n *\n * @method switchView\n * @param {String} activeView\n * @memberof SubItemsModule\n */\n switchView(activeView) {\n this.setState(() => ({ activeView }));\n }\n\n toggleItemSelection(item, isSelected) {\n const { selectedItems } = this.state;\n const updatedSelectedItems = new Map(selectedItems);\n const locationId = item.location.id;\n\n if (isSelected) {\n updatedSelectedItems.set(locationId, item);\n } else {\n updatedSelectedItems.delete(locationId);\n }\n\n this.setState(() => ({ selectedItems: updatedSelectedItems }));\n }\n\n toggleAllPageItemsSelection(select) {\n const { activePageItems } = this.state;\n\n if (select) {\n this.selectItems(activePageItems);\n } else {\n const locationsIds = activePageItems.map((item) => item.location.id);\n const locationsIdsSet = new Set(locationsIds);\n\n this.deselectItems(locationsIdsSet);\n }\n }\n\n /**\n *\n * @param {Array} itemsToSelect\n */\n selectItems(itemsToSelect) {\n const { selectedItems } = this.state;\n const newSelectedItems = itemsToSelect.map((item) => [item.location.id, item]);\n const newSelection = new Map([...selectedItems, ...newSelectedItems]);\n\n this.setState(() => ({ selectedItems: newSelection }));\n }\n\n /**\n * Deselects items with locations with provided IDs.\n *\n * @param {Set} locationsIds\n */\n deselectItems(locationsIds) {\n const { selectedItems } = this.state;\n const newSelection = new Map([...selectedItems].filter(([locationId]) => !locationsIds.has(locationId)));\n\n this.setState(() => ({ selectedItems: newSelection }));\n }\n\n deselectAllItems() {\n this.setState(() => ({ selectedItems: new Map() }));\n }\n\n toggleBulkOperationStatusState(isDuringBulkOperation) {\n this.setState(() => ({\n isDuringBulkOperation,\n }));\n }\n\n onMoveBtnClick() {\n this.toggleUdw(true);\n }\n\n bulkMove(location) {\n this.toggleBulkOperationStatusState(true);\n\n const { restInfo } = this.props;\n const { selectedItems } = this.state;\n const locationsToMove = [...selectedItems.values()].map(({ location }) => location);\n\n bulkMoveLocations(restInfo, locationsToMove, location._href, this.afterBulkMove.bind(this, selectedItems, location));\n }\n\n afterBulkMove(selectedItems, location, movedLocations, notMovedLocations) {\n const { totalCount } = this.state;\n\n this.updateTotalCountState(totalCount - movedLocations.length);\n this.deselectAllItems();\n this.discardActivePageItems();\n\n this.toggleBulkOperationStatusState(false);\n\n if (notMovedLocations.length) {\n const modalTableTitle = Translator.trans(\n /*@Desc(\"Content items cannot be moved (%itemsCount%)\")*/ 'bulk_move.error.modal.table_title',\n {\n itemsCount: notMovedLocations.length,\n },\n 'sub_items'\n );\n const notificationMessage = Translator.trans(\n /*@Desc(\"%notMovedCount% of the %totalCount% selected item(s) could not be moved because you do not have proper user permissions. Click here for more information.
    Please contact your Administrator to obtain permissions.\")*/ 'bulk_move.error.message',\n {\n notMovedCount: notMovedLocations.length,\n totalCount: movedLocations.length + notMovedLocations.length,\n },\n 'sub_items'\n );\n\n this.handleBulkOperationFailedNotification(selectedItems, notMovedLocations, modalTableTitle, notificationMessage);\n }\n\n if (movedLocations.length) {\n const message = Translator.trans(\n /*@Desc(\"The selected content item(s) have been sent to %locationName%\")*/ 'bulk_move.success.message',\n {\n locationName: location.ContentInfo.Content.Name,\n locationHref: this.props.generateLink(location.id),\n },\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showSuccessNotification(message);\n }\n }\n\n toggleUdw(show) {\n this.setState(() => ({\n isUdwOpened: show,\n }));\n }\n\n closeUdw() {\n this.toggleUdw(false);\n }\n\n onUdwConfirm([selectedLocation]) {\n this.closeUdw();\n this.bulkMove(selectedLocation);\n }\n\n renderUdw() {\n const { isUdwOpened } = this.state;\n\n if (!isUdwOpened) {\n return null;\n }\n\n const UniversalDiscovery = window.eZ.modules.UniversalDiscovery;\n const { restInfo, parentLocationId, udwConfigBulkMoveItems } = this.props;\n const { selectedItems } = this.state;\n const selectedItemsLocationsIds = [...selectedItems.values()].map(({ location }) => location.id);\n const excludedMoveLocations = [parentLocationId, ...selectedItemsLocationsIds];\n const title = Translator.trans(/*@Desc(\"Choose location\")*/ 'udw.choose_location.title', {}, 'sub_items');\n const udwProps = {\n title,\n restInfo,\n onCancel: this.closeUdw,\n onConfirm: this.onUdwConfirm,\n canSelectContent: ({ item }, callback) => {\n callback(!excludedMoveLocations.includes(item.id));\n },\n ...udwConfigBulkMoveItems,\n };\n\n return ReactDOM.createPortal(, this.udwContainer);\n }\n\n onDeleteBtnClick() {\n this.toggleBulkDeletePopup(true);\n }\n\n bulkDelete() {\n this.toggleBulkOperationStatusState(true);\n\n const { restInfo } = this.props;\n const { selectedItems } = this.state;\n const locationsToDelete = [...selectedItems.values()].map(({ location }) => location);\n\n bulkMoveLocationsToTrash(restInfo, locationsToDelete, this.afterBulkDelete.bind(this, selectedItems));\n }\n\n afterBulkDelete(selectedItems, deletedLocations, notDeletedLocations) {\n const { totalCount } = this.state;\n\n this.updateTotalCountState(totalCount - deletedLocations.length);\n this.deselectAllItems();\n this.discardActivePageItems();\n\n this.toggleBulkOperationStatusState(false);\n\n if (notDeletedLocations.length) {\n const modalTableTitle = Translator.trans(\n /*@Desc(\"Content item(s) cannot be sent to trash (%itemsCount%)\")*/ 'bulk_delete.error.modal.table_title',\n {\n itemsCount: notDeletedLocations.length,\n },\n 'sub_items'\n );\n const message = Translator.trans(\n /*@Desc(\"%notDeletedCount% of the %totalCount% selected item(s) could not be deleted because you do not have proper user permissions. Click here for more information.
    Please contact your Administrator to obtain permissions.\")*/ 'bulk_delete.error.message',\n {\n notDeletedCount: notDeletedLocations.length,\n totalCount: deletedLocations.length + notDeletedLocations.length,\n },\n 'sub_items'\n );\n\n this.handleBulkOperationFailedNotification(selectedItems, notDeletedLocations, modalTableTitle, message);\n } else {\n const message = Translator.trans(\n /*@Desc(\"The selected content item(s) have been sent to trash\")*/ 'bulk_delete.success.message',\n {},\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showSuccessNotification(message);\n }\n }\n\n toggleBulkDeletePopup(show) {\n this.setState(() => ({\n isBulkDeletePopupVisible: show,\n }));\n }\n\n closeBulkDeletePopup() {\n this.toggleBulkDeletePopup(false);\n }\n\n onBulkDeletePopupConfirm() {\n this.closeBulkDeletePopup();\n this.bulkDelete();\n }\n\n /**\n * Shows warning notification which has a button.\n * Clicking the button should cause appearance of the modal\n * with list of items, which failed to be deleted/moved.\n *\n * @param {Map} selectedItems\n * @param {Array} failedLocations\n * @param {String} modalTableTitle\n * @param {String} notificationMessage\n */\n handleBulkOperationFailedNotification(selectedItems, failedLocations, modalTableTitle, notificationMessage) {\n const { contentTypesMap } = this.state;\n const failedItemsData = failedLocations.map(({ id: locationId }) => {\n const item = selectedItems.get(locationId);\n const contentType = contentTypesMap[item.content.ContentType._href];\n const contentTypeIdentifier = contentType.identifier;\n const contentTypeName = window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier];\n\n return {\n contentTypeName,\n contentName: item.content.Name,\n };\n });\n\n window.eZ.helpers.notification.showWarningNotification(notificationMessage, (notificationNode) => {\n const showModalBtn = notificationNode.querySelector('.ez-notification-btn--show-modal');\n\n if (!showModalBtn) {\n return;\n }\n\n showModalBtn.addEventListener('click', this.props.showBulkActionFailedModal.bind(null, modalTableTitle, failedItemsData));\n });\n }\n\n renderConfirmationPopupFooter() {\n const cancelLabel = Translator.trans(/*@Desc(\"Cancel\")*/ 'bulk_delete.popup.cancel', {}, 'sub_items');\n const confirmLabel = Translator.trans(/*@Desc(\"Send to trash\")*/ 'bulk_delete.popup.confirm', {}, 'sub_items');\n\n return (\n \n \n {cancelLabel}\n \n \n \n );\n }\n\n renderConfirmationPopup() {\n const { isBulkDeletePopupVisible } = this.state;\n\n if (!isBulkDeletePopupVisible) {\n return null;\n }\n\n const confirmationMessage = Translator.trans(\n /*@Desc(\"Are you sure you want to send the selected content item(s) to trash?\")*/ 'bulk_delete.popup.message',\n {},\n 'sub_items'\n );\n\n return ReactDOM.createPortal(\n \n
    {confirmationMessage}
    \n ,\n this.bulkDeleteModalContainer\n );\n }\n\n changePage(pageIndex) {\n this.updateListViewHeight();\n this.setState(() => ({\n activePageIndex: pageIndex,\n activePageItems: null,\n }));\n }\n\n getPageSelectedLocationsIds() {\n const { selectedItems, activePageItems } = this.state;\n const selectedLocationsIds = [...selectedItems.keys()];\n const pageLocationsIds = [...activePageItems.map((item) => item.location.id)];\n const selectedPageLocationsIds = new Set(pageLocationsIds.filter((locationId) => selectedLocationsIds.includes(locationId)));\n\n return selectedPageLocationsIds;\n }\n\n /**\n * Renders extra actions\n *\n * @method renderExtraActions\n * @param {Object} action\n * @returns {JSX.Element}\n * @memberof SubItemsModule\n */\n renderExtraActions(action, index) {\n const Action = action.component;\n\n return ;\n }\n\n /**\n * Renders pagination info,\n * which is information about how many items of all user is\n * viewing at the moment\n *\n * @method renderPaginationInfo\n * @returns {JSX.Element}\n */\n renderPaginationInfo() {\n const { totalCount, activePageItems } = this.state;\n const viewingCount = activePageItems ? activePageItems.length : 0;\n\n const message = Translator.trans(\n /*@Desc(\"Viewing %viewingCount% out of %totalCount% sub-items\")*/ 'viewing_message',\n {\n viewingCount,\n totalCount,\n },\n 'sub_items'\n );\n\n return
    ;\n }\n\n /**\n * Renders pagination\n *\n * @method renderPagination\n * @returns {JSX.Element|null}\n * @memberof SubItemsModule\n */\n renderPagination() {\n const { limit: itemsPerPage } = this.props;\n const { totalCount } = this.state;\n const lessThanOnePage = totalCount <= itemsPerPage;\n\n if (lessThanOnePage) {\n return null;\n }\n\n const { activePageIndex, activePageItems, isDuringBulkOperation } = this.state;\n const isActivePageLoaded = !!activePageItems;\n const isPaginationDisabled = !isActivePageLoaded || isDuringBulkOperation;\n\n return (\n \n );\n }\n\n renderBulkMoveBtn(disabled) {\n const label = Translator.trans(/*@Desc(\"Move selected items\")*/ 'move_btn.label', {}, 'sub_items');\n\n return ;\n }\n\n renderBulkDeleteBtn(disabled) {\n const label = Translator.trans(/*@Desc(\"Delete selected items\")*/ 'trash_btn.label', {}, 'sub_items');\n\n return ;\n }\n\n renderSpinner() {\n const { activePageItems } = this.state;\n const isActivePageLoaded = !!activePageItems;\n\n if (isActivePageLoaded) {\n return null;\n }\n\n const { listViewHeight } = this.state;\n const spinnerMinHeight = 90;\n const style = {\n height: listViewHeight && listViewHeight > spinnerMinHeight ? listViewHeight : spinnerMinHeight,\n };\n\n return (\n
    \n
    \n \n
    \n
    \n );\n }\n\n renderNoItems() {\n if (this.state.totalCount) {\n return null;\n }\n\n return ;\n }\n\n renderListView() {\n const { activePageItems, sortClause, sortOrder } = this.state;\n const pageLoaded = !!activePageItems;\n\n if (!pageLoaded) {\n return null;\n }\n\n const selectedPageLocationsIds = this.getPageSelectedLocationsIds();\n\n return (\n \n );\n }\n\n render() {\n const listTitle = Translator.trans(/*@Desc(\"Sub-items\")*/ 'items_list.title', {}, 'sub_items');\n const { selectedItems, activeView, totalCount, isDuringBulkOperation, activePageItems } = this.state;\n const nothingSelected = !selectedItems.size;\n const isTableViewActive = activeView === 'table';\n const pageLoaded = !!activePageItems;\n const bulkBtnDisabled = nothingSelected || !isTableViewActive || !pageLoaded;\n let listClassName = 'm-sub-items__list';\n\n if (isDuringBulkOperation) {\n listClassName = `${listClassName} ${listClassName}--processing`;\n }\n\n return (\n
    \n
    \n
    \n {listTitle} ({this.state.totalCount})\n
    \n
    \n {this.props.extraActions.map(this.renderExtraActions)}\n {this.renderBulkMoveBtn(bulkBtnDisabled)}\n {this.renderBulkDeleteBtn(bulkBtnDisabled)}\n
    \n \n
    \n
    \n {this.renderSpinner()}\n {this.renderListView()}\n {this.renderNoItems()}\n
    \n {this.renderPaginationInfo()}\n {this.renderPagination()}\n {this.renderUdw()}\n {this.renderConfirmationPopup()}\n
    \n );\n }\n}\n\neZ.addConfig('modules.SubItems', SubItemsModule);\n\nSubItemsModule.propTypes = {\n parentLocationId: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n loadContentInfo: PropTypes.func,\n loadContentType: PropTypes.func,\n loadContentTypes: PropTypes.func,\n loadLocation: PropTypes.func,\n sortClauses: PropTypes.object,\n updateLocationPriority: PropTypes.func,\n activeView: PropTypes.string,\n extraActions: PropTypes.arrayOf(\n PropTypes.shape({\n component: PropTypes.func,\n attrs: PropTypes.object,\n })\n ),\n items: PropTypes.arrayOf(PropTypes.object),\n limit: PropTypes.number,\n offset: PropTypes.number,\n handleEditItem: PropTypes.func.isRequired,\n generateLink: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object,\n totalCount: PropTypes.number,\n languages: PropTypes.object,\n udwConfigBulkMoveItems: PropTypes.object.isRequired,\n showBulkActionFailedModal: PropTypes.func.isRequired,\n};\n\nSubItemsModule.defaultProps = {\n loadContentInfo,\n loadContentType,\n loadContentTypes,\n loadLocation,\n sortClauses: {},\n updateLocationPriority,\n activeView: 'table',\n extraActions: [],\n languages: window.eZ.adminUiConfig.languages,\n items: [],\n limit: parseInt(window.eZ.adminUiConfig.subItems.limit, 10),\n offset: 0,\n contentTypesMap: {},\n totalCount: 0,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/sub.items.module.js","module.exports = __WEBPACK_EXTERNAL_MODULE_15__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}\n// module id = 15\n// module chunks = 1","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ViewSwitcherButton from './view.switcher.button.component';\n\nconst ViewSwitcherComponent = ({ onViewChange, activeView, isDisabled }) => {\n let componentClassName = 'c-view-switcher';\n\n if (isDisabled) {\n componentClassName = `${componentClassName} ${componentClassName}--disabled`;\n }\n\n const listViewBtnLabel = Translator.trans(/*@Desc(\"View as list\")*/ 'switch_to_list_view.btn.label', {}, 'sub_items');\n const gridViewBtnLabel = Translator.trans(/*@Desc(\"View as grid\")*/ 'switch_to_grid_view.btn.label', {}, 'sub_items');\n\n return (\n
    \n \n \n
    \n );\n};\n\nViewSwitcherComponent.propTypes = {\n onViewChange: PropTypes.func.isRequired,\n activeView: PropTypes.string.isRequired,\n isDisabled: PropTypes.bool.isRequired,\n};\n\nexport default ViewSwitcherComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/view-switcher/view.switcher.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst ViewSwitcherButton = ({ id, icon, title, onClick, activeView, isDisabled }) => {\n const baseClassName = 'c-view-switcher-btn';\n const attrs = {\n id,\n onClick: () => onClick(id),\n className: baseClassName,\n title,\n tabIndex: '-1',\n };\n const iconAttrs = {\n name: icon,\n extraClasses: 'ez-icon--secondary ez-icon--small',\n };\n\n if (activeView === id) {\n attrs.className = `${baseClassName} ${baseClassName}--active`;\n iconAttrs.extraClasses = 'ez-icon--light ez-icon--small';\n }\n\n if (isDisabled) {\n attrs.className = `${attrs.className} ${baseClassName}--disabled`;\n }\n\n return (\n
    \n \n
    \n );\n};\n\nViewSwitcherButton.propTypes = {\n id: PropTypes.string.isRequired,\n activeView: PropTypes.string.isRequired,\n isDisabled: PropTypes.bool.isRequired,\n icon: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nexport default ViewSwitcherButton;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/view-switcher/view.switcher.button.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TableViewComponent from '../table-view/table.view.component.js';\nimport GridViewComponent from '../grid-view/grid.view.component.js';\n\nconst views = {\n table: TableViewComponent,\n grid: GridViewComponent,\n};\n\nconst SubItemsListComponent = (props) => {\n const Component = views[props.activeView];\n\n return ;\n};\n\nSubItemsListComponent.propTypes = {\n activeView: PropTypes.string.isRequired,\n items: PropTypes.arrayOf(PropTypes.object),\n contentTypesMap: PropTypes.object.isRequired,\n handleItemPriorityUpdate: PropTypes.func.isRequired,\n languages: PropTypes.object.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n toggleAllItemsSelect: PropTypes.func.isRequired,\n selectedLocationsIds: PropTypes.instanceOf(Set).isRequired,\n onSortChange: PropTypes.func.isRequired,\n sortClause: PropTypes.string.isRequired,\n sortOrder: PropTypes.string.isRequired,\n};\n\nexport default SubItemsListComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/sub-items-list/sub.items.list.component.js","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nexport default class TableViewItemComponent extends PureComponent {\n constructor(props) {\n super(props);\n\n this.storePriorityValue = this.storePriorityValue.bind(this);\n this.enablePriorityInput = this.enablePriorityInput.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleEdit = this.handleEdit.bind(this);\n this.onSelectCheckboxChange = this.onSelectCheckboxChange.bind(this);\n this.setPriorityInputRef = this.setPriorityInputRef.bind(this);\n\n this._refPriorityInput = null;\n\n this.state = {\n priorityValue: props.location.priority,\n priorityInputEnabled: false,\n startingPriorityValue: props.location.priority,\n };\n }\n\n /**\n * Enables priority input field\n *\n * @method enablePriorityInput\n * @memberof TableViewItemComponent\n */\n enablePriorityInput() {\n this.setState(() => ({ priorityInputEnabled: true }));\n }\n\n /**\n * Handles priority update cancel action.\n * Restores previous value and blocks the priority input.\n *\n * @method handleCancel\n * @param {Event} event\n * @memberof TableViewItemComponent\n */\n handleCancel(event) {\n event.preventDefault();\n\n this.setState((state) => ({\n priorityInputEnabled: false,\n priorityValue: state.startingPriorityValue,\n }));\n }\n\n /**\n * Handles submit action.\n * Updates priority value.\n *\n * @method handleSubmit\n * @param {Event} event\n * @memberof TableViewItemComponent\n */\n handleSubmit(event) {\n event.preventDefault();\n\n this.props.onItemPriorityUpdate({\n location: this.props.location._href,\n priority: this._refPriorityInput.value,\n });\n\n this.setState(() => ({\n priorityValue: this._refPriorityInput.value,\n priorityInputEnabled: false,\n startingPriorityValue: this._refPriorityInput.value,\n }));\n }\n\n /**\n * Stores priority value\n *\n * @method storePriorityValue\n * @param {Event} event\n * @memberof TableViewItemComponent\n */\n storePriorityValue(event) {\n event.preventDefault();\n\n this.setState(() => ({ priorityValue: this._refPriorityInput.value }));\n }\n\n /**\n * Handles edit action.\n *\n * @method handleEdit\n * @memberof TableViewItemComponent\n */\n handleEdit() {\n this.props.handleEditItem(this.props.content);\n }\n\n setPriorityInputRef(ref) {\n this._refPriorityInput = ref;\n }\n\n /**\n * Renders a priority cell with input field\n *\n * @method renderPriorityCell\n * @returns {JSX.Element}\n * @memberof TableViewItemComponent\n */\n renderPriorityCell() {\n const inputAttrs = {\n type: 'number',\n defaultValue: this.state.priorityValue,\n onChange: this.storePriorityValue,\n };\n const priorityWrapperAttrs = {};\n const innerWrapperAttrs = {};\n\n if (!this.props.columnsVisibility.priority) {\n return null;\n }\n\n if (!this.state.priorityInputEnabled) {\n inputAttrs.disabled = true;\n delete inputAttrs.defaultValue;\n inputAttrs.value = this.state.priorityValue;\n priorityWrapperAttrs.onClick = this.enablePriorityInput;\n priorityWrapperAttrs.className = 'c-table-view-item__inner-wrapper c-table-view-item__inner-wrapper--disabled';\n innerWrapperAttrs.hidden = true;\n }\n\n return (\n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n );\n }\n\n renderModifiedCell() {\n if (!this.props.columnsVisibility.modified) {\n return null;\n }\n\n const { content } = this.props;\n const { formatShortDateWithTimezone } = window.eZ.helpers.timezone;\n\n return (\n \n
    {formatShortDateWithTimezone(new Date(content.lastModificationDate))}
    \n \n );\n }\n\n renderContentTypeCell() {\n if (!this.props.columnsVisibility.contentType) {\n return null;\n }\n\n const { content, contentTypesMap } = this.props;\n const notAvailableLabel = Translator.trans(/*@Desc(\"N/A\")*/ 'content_type.not_available.label', {}, 'sub_items');\n const contentType = contentTypesMap[content.ContentType._href];\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const contentTypeName = contentTypeIdentifier ? window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier] : notAvailableLabel;\n\n return (\n \n
    {contentTypeName}
    \n \n );\n }\n\n renderTranslationsCell() {\n if (!this.props.columnsVisibility.translations) {\n return null;\n }\n\n const { content, languages } = this.props;\n const translations = content.CurrentVersion.Version.VersionInfo.VersionTranslationInfo.Language.map((langauge) => {\n return languages.mappings[langauge.languageCode].name;\n });\n\n return (\n {translations.map(this.renderTranslation)}\n );\n }\n\n /**\n * Renders a translation item\n *\n * @method renderTranslation\n * @returns {JSX.Element}\n * @memberof TableViewItemComponent\n */\n renderTranslation(translation, index) {\n return (\n \n {translation}\n \n );\n }\n\n /**\n * Calls onItemSelect callback for given item\n *\n * @param {Event} event\n */\n onSelectCheckboxChange(event) {\n const { location, content, onItemSelect } = this.props;\n const isSelected = event.target.checked;\n\n onItemSelect({ content, location }, isSelected);\n }\n\n render() {\n const { content, location, isSelected, contentTypesMap, generateLink } = this.props;\n const editLabel = Translator.trans(/*@Desc(\"Edit\")*/ 'edit_item_btn.label', {}, 'sub_items');\n const contentType = contentTypesMap[content.ContentType._href];\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const linkAttrs = {\n className: 'c-table-view-item__link c-table-view-item__text-wrapper',\n title: content.Name,\n href: generateLink(location.id),\n };\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return (\n \n \n \n \n \n \n \n \n {content.Name}\n \n {this.renderModifiedCell()}\n {this.renderContentTypeCell()}\n {this.renderPriorityCell()}\n {this.renderTranslationsCell()}\n \n \n
    \n \n
    \n \n \n \n );\n }\n}\n\nTableViewItemComponent.propTypes = {\n content: PropTypes.object.isRequired,\n location: PropTypes.object.isRequired,\n isSelected: PropTypes.bool.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemPriorityUpdate: PropTypes.func.isRequired,\n handleEditItem: PropTypes.func.isRequired,\n generateLink: PropTypes.func.isRequired,\n languages: PropTypes.object.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n columnsVisibility: PropTypes.object.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.item.component.js","import React, { Component, createRef } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Icon from '../../../common/icon/icon';\nimport TableViewColumnsTogglerListElement from './table.view.columns.toggler.list.element';\nimport { headerLabels } from './table.view.component';\n\nconst DEFAULT_PANEL_HEIGHT = 200;\n\nexport default class TableViewColumnsTogglerComponent extends Component {\n constructor(props) {\n super(props);\n\n this.togglePanel = this.togglePanel.bind(this);\n this.hidePanel = this.hidePanel.bind(this);\n\n this._refTogglerButton = createRef();\n this._refPanel = createRef();\n\n this.state = {\n isOpen: false,\n buttonBottomDocumentOffset: null,\n panelHeight: null,\n };\n }\n\n componentDidMount() {\n document.addEventListener('click', this.hidePanel, false);\n\n this.setState(() => ({\n buttonBottomDocumentOffset: this.getBtnBottomDocumentOffset(),\n }));\n }\n\n componentDidUpdate() {\n const { isOpen, panelHeight } = this.state;\n\n if (isOpen && panelHeight === null) {\n this.setState({\n panelHeight: this._refPanel.offsetHeight,\n });\n }\n }\n\n componentWillUnmount() {\n document.removeEventListener('click', this.hidePanel);\n }\n\n getBtnBottomDocumentOffset() {\n const buttonTopOffset = this._refTogglerButton.current.getBoundingClientRect().top + window.scrollY;\n\n return document.documentElement.scrollHeight - buttonTopOffset;\n }\n\n hidePanel({ target }) {\n if (!this.state.isOpen) {\n return;\n }\n\n const isClickInsideToggler = target.closest('.c-table-view-columns-toggler');\n\n if (!isClickInsideToggler) {\n this.setState(() => ({\n isOpen: false,\n }));\n }\n }\n\n togglePanel() {\n this.setState((state) => ({\n isOpen: !state.isOpen,\n }));\n }\n\n renderPanel() {\n if (!this.state.isOpen) {\n return null;\n }\n\n const { columnsVisibility, toggleColumnVisibility } = this.props;\n const { buttonBottomDocumentOffset, panelHeight: measuredPanelHeight } = this.state;\n const panelHeight = measuredPanelHeight ? measuredPanelHeight : DEFAULT_PANEL_HEIGHT;\n const panelAttrs = { className: 'c-table-view-columns-toggler__panel', ref: this._refPanel };\n\n if (buttonBottomDocumentOffset < panelHeight) {\n panelAttrs.className = `${panelAttrs.className} ${panelAttrs.className}--above-btn`;\n }\n\n return (\n
    \n
      \n {Object.entries(columnsVisibility).map(([columnKey, isColumnVisible]) => {\n const label = headerLabels[columnKey];\n\n return (\n \n );\n })}\n
    \n
    \n );\n }\n\n render() {\n return (\n
    \n \n \n \n {this.renderPanel()}\n
    \n );\n }\n}\n\nTableViewColumnsTogglerComponent.propTypes = {\n columnsVisibility: PropTypes.object.isRequired,\n toggleColumnVisibility: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.columns.toggler.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst TableViewColumnsTogglerListElement = ({ label, isColumnVisible, toggleColumnVisibility, columnKey }) => {\n return (\n
  • toggleColumnVisibility(columnKey)}>\n
    \n \n \n
    \n
  • \n );\n};\n\nTableViewColumnsTogglerListElement.propTypes = {\n label: PropTypes.string.isRequired,\n columnKey: PropTypes.string.isRequired,\n isColumnVisible: PropTypes.bool.isRequired,\n toggleColumnVisibility: PropTypes.func.isRequired,\n};\n\nexport default TableViewColumnsTogglerListElement;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/table-view/table.view.columns.toggler.list.element.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport GridViewItemComponent from './grid.view.item.component';\n\nconst GridViewComponent = (props) => {\n const { items, contentTypesMap, generateLink } = props;\n\n return (\n
    \n {items.map((data) => (\n \n ))}\n
    \n );\n};\nGridViewComponent.propTypes = {\n items: PropTypes.arrayOf(PropTypes.object),\n contentTypesMap: PropTypes.object,\n generateLink: PropTypes.func.isRequired,\n};\n\nexport default GridViewComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/grid-view/grid.view.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst GridViewItemComponent = ({ content, location, generateLink, contentTypesMap }) => {\n const imageField = content.CurrentVersion.Version.Fields.field.find((item) => item.fieldTypeIdentifier === 'ezimage');\n const imageClassName = 'c-grid-view-item__image';\n const hasImage = imageField && imageField.fieldValue && imageField.fieldValue.uri && imageField.fieldValue.path;\n const contentType = contentTypesMap ? contentTypesMap[content.ContentType._href] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n let image = (\n
    \n \n
    \n );\n let contentTypeIcon = '';\n\n if (hasImage) {\n image = {`${imageField.fieldValue.path}`};\n contentTypeIcon = (\n
    \n \n
    \n );\n }\n\n return (\n \n {contentTypeIcon}\n
    {image}
    \n
    {content.Name}
    \n
    \n );\n};\n\nGridViewItemComponent.propTypes = {\n content: PropTypes.object.isRequired,\n location: PropTypes.object.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n generateLink: PropTypes.func.isRequired,\n};\n\nexport default GridViewItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/grid-view/grid.view.item.component.js","import React, { Component } from 'react';\nimport $ from 'jquery';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon/icon';\n\nconst CLASS_NON_SCROLLABLE = 'ezs-non-scrollable';\nconst CLASS_MODAL_OPEN = 'modal-open';\nconst MODAL_CONFIG = {\n backdrop: 'static',\n keyboard: true,\n};\nconst MODAL_SIZE_CLASS = {\n small: 'modal-sm',\n medium: '',\n large: 'modal-lg',\n};\n\nclass Popup extends Component {\n constructor(props) {\n super(props);\n\n this._refModal = null;\n\n this.setModalRef = this.setModalRef.bind(this);\n this.onKeyUp = this.onKeyUp.bind(this);\n\n this.state = { isVisible: props.isVisible, isLoading: props.isLoading };\n }\n\n componentDidMount() {\n const { isVisible: show } = this.state;\n\n if (show) {\n $(this._refModal).modal({ ...MODAL_CONFIG, show, focus: this.props.hasFocus });\n\n this.attachModalEventHandlers();\n }\n }\n\n componentDidUpdate() {\n const { isVisible: show } = this.state;\n\n $(this._refModal).modal({ ...MODAL_CONFIG, show, focus: this.props.hasFocus });\n\n if (show) {\n this.attachModalEventHandlers();\n }\n }\n\n componentWillUnmount() {\n $(this._refModal).modal('hide');\n document.body.classList.remove(CLASS_MODAL_OPEN, CLASS_NON_SCROLLABLE);\n }\n\n UNSAFE_componentWillReceiveProps({ isVisible, onConfigIframeLoad, isLoading }) {\n this.setState((state) => ({ ...state, isVisible, onConfigIframeLoad, isLoading }));\n }\n\n attachModalEventHandlers() {\n const modal = $(this._refModal);\n\n modal.on('keyup', this.onKeyUp);\n modal.one('hidden.bs.modal', this.props.onClose);\n }\n\n onKeyUp(event) {\n const { originalEvent } = event;\n const escKeyCode = 27;\n const escKeyPressed = originalEvent && (originalEvent.which === escKeyCode || originalEvent.keyCode === escKeyCode);\n\n if (escKeyPressed) {\n this.props.onClose();\n }\n }\n\n setModalRef(component) {\n this._refModal = component;\n }\n\n renderHeader() {\n const closeBtnLabel = Translator.trans(/*@Desc(\"Close\")*/ 'popup.close.label', {}, 'universal_discovery_widget');\n\n return (\n
    \n {this.renderHeadline()}\n \n \n \n
    \n );\n }\n\n renderHeadline() {\n const { title } = this.props;\n\n if (!title) {\n return null;\n }\n\n return (\n

    \n {this.props.title}\n {this.renderSubtitle()}\n

    \n );\n }\n\n renderSubtitle() {\n const { subtitle } = this.props;\n\n if (!subtitle) {\n return null;\n }\n\n return {subtitle};\n }\n\n renderFooter() {\n const { footerChildren } = this.props;\n\n if (!footerChildren) {\n return;\n }\n\n return
    {footerChildren}
    ;\n }\n\n render() {\n const { isVisible } = this.state;\n const { additionalClasses, size, noHeader } = this.props;\n const modalAttrs = {\n className: 'c-popup modal fade',\n ref: this.setModalRef,\n tabIndex: this.props.hasFocus ? -1 : undefined,\n };\n\n document.body.classList.toggle(CLASS_MODAL_OPEN, isVisible);\n document.body.classList.toggle(CLASS_NON_SCROLLABLE, isVisible);\n\n if (additionalClasses) {\n modalAttrs.className = `${modalAttrs.className} ${additionalClasses}`;\n }\n\n if (noHeader) {\n modalAttrs.className = `${modalAttrs.className} c-popup--no-header`;\n }\n\n return (\n
    \n
    \n
    \n {this.renderHeader()}\n
    {this.props.children}
    \n {this.renderFooter()}\n
    \n
    \n
    \n );\n }\n}\n\nPopup.propTypes = {\n isVisible: PropTypes.bool,\n isLoading: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n onConfigIframeLoad: PropTypes.func,\n children: PropTypes.element.isRequired,\n title: PropTypes.string,\n subtitle: PropTypes.string,\n hasFocus: PropTypes.bool,\n additionalClasses: PropTypes.string,\n footerChildren: PropTypes.element,\n size: PropTypes.string,\n noHeader: PropTypes.bool,\n};\n\nPopup.defaultProps = {\n isVisible: false,\n isLoading: true,\n hasFocus: true,\n size: 'large',\n noHeader: false,\n onConfigIframeLoad: () => {},\n};\n\nexport default Popup;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/popup/popup.component.js","module.exports = __WEBPACK_EXTERNAL_MODULE_25__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}\n// module id = 25\n// module chunks = 1","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst ActionButton = (props) => {\n const { disabled, onClick, label, type } = props;\n const baseClassName = 'c-action-btn';\n const handleClick = () => {\n if (!disabled) {\n onClick();\n }\n };\n const attrs = {\n className: `${baseClassName}`,\n title: label,\n tabIndex: '-1',\n onClick: handleClick,\n };\n\n attrs.className = disabled ? `${attrs.className} ${baseClassName}--disabled` : attrs.className;\n attrs.className = type ? `${attrs.className} ${baseClassName}--${type}` : attrs.className;\n\n return (\n
    \n \n
    \n );\n};\n\nActionButton.propTypes = {\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool.isRequired,\n type: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nexport default ActionButton;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/action-btn/action.btn.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport PaginationButtonComponent from './pagination.button.component';\n\nconst DOTS = '...';\n\n/**\n * Computes array with pagination pages.\n *\n * Example 1: [ 1, \"...\", 5, 6, 7, 8, 9, 10 ] (for: proximity = 2; pagesNumber = 10; activePageIndex = 7)\n * Example 2: [ 1, \"...\", 3, 4, 5, 6, 7, \"...\", 10 ] (for: proximity = 2; pagesNumber = 10; activePageIndex = 5)\n * Example 3: [ 1, \"...\", 8, 9, 10, 11, 12, \"...\", 20 ] (for: proximity = 2; pagesNumber = 20; activePageIndex = 10)\n *\n * @param {Object} params\n * @param {Number} params.proximity\n * @param {Number} params.activePageIndex\n * @param {Number} params.pagesCount\n *\n * @returns {Array}\n */\nconst computePages = ({ proximity, activePageIndex, pagesCount }) => {\n const pages = [];\n let wereDots = false;\n\n for (let i = 1; i <= pagesCount; i++) {\n const isFirstPage = i === 1;\n const isLastPage = i === pagesCount;\n const isInRange = i >= activePageIndex + 1 - proximity && i <= activePageIndex + 1 + proximity;\n\n if (isFirstPage || isLastPage || isInRange) {\n pages.push(i);\n wereDots = false;\n } else if (!wereDots) {\n pages.push(DOTS);\n wereDots = true;\n }\n }\n\n return pages;\n};\n\nconst PaginationComponent = ({ totalCount, itemsPerPage, proximity, activePageIndex, onPageChange, disabled: paginationDisabled }) => {\n const pagesCount = Math.ceil(totalCount / itemsPerPage);\n const backLabel = Translator.trans(/*@Desc(\"Back\")*/ 'pagination.back', {}, 'sub_items');\n const nextLabel = Translator.trans(/*@Desc(\"Next\")*/ 'pagination.next', {}, 'sub_items');\n const previousPage = activePageIndex - 1;\n const nextPage = activePageIndex + 1;\n const isFirstPage = activePageIndex === 0;\n const isLastPage = activePageIndex + 1 === pagesCount;\n const pages = computePages({ proximity, activePageIndex, pagesCount });\n const paginationButtons = pages.map((page, index) => {\n if (page === DOTS) {\n return ;\n }\n\n const isCurrentPage = page === activePageIndex + 1;\n const additionalClasses = isCurrentPage ? 'active' : '';\n const label = '' + page;\n\n return (\n \n );\n });\n\n return (\n
      \n \n {paginationButtons}\n \n
    \n );\n};\n\nPaginationComponent.propTypes = {\n proximity: PropTypes.number.isRequired,\n itemsPerPage: PropTypes.number.isRequired,\n activePageIndex: PropTypes.number.isRequired,\n totalCount: PropTypes.number.isRequired,\n onPageChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n};\n\nexport default PaginationComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/pagination/pagination.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst PaginationButtonComponent = ({ label, disabled, additionalClasses, onPageChange, pageIndex }) => {\n const handleClick = () => {\n if (!disabled && Number.isInteger(pageIndex)) {\n onPageChange(pageIndex);\n }\n };\n\n let className = `c-pagination-button page-item ${additionalClasses}`;\n\n className = disabled ? `${className} disabled` : className;\n\n return (\n
  • \n \n
  • \n );\n};\n\nPaginationButtonComponent.propTypes = {\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onPageChange: PropTypes.func,\n pageIndex: PropTypes.number,\n additionalClasses: PropTypes.string,\n};\n\nPaginationButtonComponent.defaultProps = {\n disabled: false,\n additionalClasses: '',\n onPageChange: () => {},\n};\n\nexport default PaginationButtonComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/pagination/pagination.button.component.js","import React from 'react';\n\nconst NoItemsComponent = () => {\n const noItemsMessage = Translator.trans(/*@Desc(\"This location has no sub-items\")*/ 'no_items.message', {}, 'sub_items');\n\n return
    {noItemsMessage}
    ;\n};\n\nexport default NoItemsComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/components/no-items/no.items.component.js","import { handleRequestResponse } from '../../common/helpers/request.helper.js';\n\nconst HEADERS_CREATE_VIEW = {\n Accept: 'application/vnd.ez.api.View+json; version=1.1',\n 'Content-Type': 'application/vnd.ez.api.ViewInput+json; version=1.1',\n};\nconst ENDPOINT_CREATE_VIEW = '/api/ezp/v2/views';\n\n/**\n * Loads location struct\n *\n * @function loadLocation\n * @param {Object} restInfo - contains:\n * @param {String} restInfo.token\n * @param {String} restInfo.siteaccess\n * @param {Object} queryConfig - contains:\n * @param {Number} queryConfig.locationId\n * @param {Number} queryConfig.limit\n * @param {Number} queryConfig.offset\n * @param {Object} queryConfig.sortClauses\n * @param {Function} callback\n */\nexport const loadLocation = ({ token, siteaccess }, { locationId = 2, limit = 10, offset = 0, sortClauses }, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `subitems-load-location-${locationId}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: sortClauses,\n Filter: { ParentLocationIdCriterion: locationId },\n limit,\n offset,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: {\n ...HEADERS_CREATE_VIEW,\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n body,\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load location'));\n};\n\n/**\n * Loads content info\n *\n * @function loadContentInfo\n * @param {Array} contentIds\n * @param {Function} callback\n */\nexport const loadContentInfo = ({ token, siteaccess }, contentIds, callback) => {\n const ids = contentIds.join();\n const body = JSON.stringify({\n ViewInput: {\n identifier: `subitems-load-content-info-${ids}`,\n public: false,\n ContentQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Filter: { ContentIdCriterion: `${ids}` },\n limit: contentIds.length,\n offset: 0,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: {\n ...HEADERS_CREATE_VIEW,\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n body,\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load content info'));\n};\n\n/**\n * Loads content types\n *\n * @function loadContentTypes\n * @param {Function} callback\n */\nexport const loadContentTypes = ({ token, siteaccess }, callback) => {\n const request = new Request('/api/ezp/v2/content/types', {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load content types'));\n};\n\n/**\n * Loads content types\n *\n * @function loadContentType\n * @param {Function} callback\n */\nexport const loadContentType = (id, { token, siteaccess }, callback) => {\n const request = new Request(id, {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentType+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'cors',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot load a content type'));\n};\n\n/**\n * Updates location priority\n *\n * @function updateLocationPriority\n * @param {Object} params params hash containing: priority, location, token, siteaccess properties\n * @param {Function} callback\n */\nexport const updateLocationPriority = ({ priority, location, token, siteaccess }, callback) => {\n const request = new Request(location, {\n method: 'POST',\n headers: {\n Accept: 'application/vnd.ez.api.Location+json',\n 'Content-Type': 'application/vnd.ez.api.LocationUpdate+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n 'X-HTTP-Method-Override': 'PATCH',\n },\n credentials: 'same-origin',\n mode: 'cors',\n body: JSON.stringify({\n LocationUpdate: {\n priority: priority,\n sortField: 'PATH',\n sortOrder: 'ASC',\n },\n }),\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('An error occurred while updating location priority'));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/services/sub.items.service.js","import { handleRequestResponse } from '../../common/helpers/request.helper.js';\n\nconst HEADERS_BULK = {\n Accept: 'application/vnd.ez.api.BulkOperationResponse+json',\n 'Content-Type': 'application/vnd.ez.api.BulkOperation+json',\n};\nconst TRASH_FAKE_LOCATION = '/api/ezp/v2/content/trash';\nconst ENDPOINT_BULK = '/api/ezp/v2/bulk';\n\nexport const bulkMoveLocations = (restInfo, locations, newLocationHref, callback) => {\n const requestBodyOperations = getBulkMoveRequestOperations(locations, newLocationHref);\n\n makeBulkRequest(restInfo, requestBodyOperations, processBulkResponse.bind(null, locations, 201, callback));\n};\n\nexport const bulkMoveLocationsToTrash = (restInfo, locations, callback) => {\n bulkMoveLocations(restInfo, locations, TRASH_FAKE_LOCATION, callback);\n};\n\nconst getBulkMoveRequestOperations = (locations, destination) => {\n const operations = {};\n\n locations.forEach((location) => {\n operations[location.id] = {\n uri: location._href,\n method: 'MOVE',\n headers: {\n Destination: destination,\n },\n };\n });\n\n return operations;\n};\n\nconst processBulkResponse = (locations, successCode, callback, response) => {\n const { operations } = response.BulkOperationResponse;\n const locationsMatches = Object.entries(operations).reduce(\n (locationsMatches, [locationId, response]) => {\n const respectiveItem = locations.find((location) => location.id === parseInt(locationId, 10));\n const isSuccess = response.statusCode === successCode;\n\n if (isSuccess) {\n locationsMatches.success.push(respectiveItem);\n } else {\n locationsMatches.fail.push(respectiveItem);\n }\n\n return locationsMatches;\n },\n { success: [], fail: [] }\n );\n\n callback(locationsMatches.success, locationsMatches.fail);\n};\n\nconst makeBulkRequest = ({ token, siteaccess }, requestBodyOperations, callback) => {\n const request = new Request(ENDPOINT_BULK, {\n method: 'POST',\n headers: {\n ...HEADERS_BULK,\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n body: JSON.stringify({\n bulkOperations: {\n operations: requestBodyOperations,\n },\n }),\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(() => {\n const message = Translator.trans(\n /*@Desc(\"An unexpected error occurred while deleting the content item(s). Please try again later.\")*/ 'bulk_request.error.message',\n {},\n 'sub_items'\n );\n\n window.eZ.helpers.notification.showErrorNotification(message);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/sub-items/services/bulk.service.js"],"sourceRoot":""} \ No newline at end of file diff --git a/Resources/public/js/UniversalDiscovery.module.js.map b/Resources/public/js/UniversalDiscovery.module.js.map index 8aba15ab..13e3eeb8 100644 --- a/Resources/public/js/UniversalDiscovery.module.js.map +++ b/Resources/public/js/UniversalDiscovery.module.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b2275d860cd52e01c324","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/common/helpers/request.helper.js","webpack:///./src/modules/common/services/notification.service.js","webpack:///./src/modules/common/helpers/deep.clone.helper.js","webpack:///./src/modules/universal-discovery/components/tab-content/tab.content.panel.component.js","webpack:///./src/modules/universal-discovery/services/universal.discovery.service.js","webpack:///./src/modules/common/tooltip-popup/tooltip.popup.component.js","webpack:///./src/modules/universal-discovery/components/finder/finder.component.js","webpack:///./src/modules/universal-discovery/components/select-content-button/select.content.button.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.component.js","webpack:///./src/modules/universal-discovery/universal.discovery.module.js","webpack:///./src/modules/universal-discovery/components/tab-nav/tab.nav.item.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/finder.panel.component.js","webpack:///./src/modules/universal-discovery/components/finder/finder.tree.branch.component.js","webpack:///./src/modules/universal-discovery/components/finder/finder.tree.leaf.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/search.panel.component.js","webpack:///./src/modules/universal-discovery/components/search/search.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.pagination.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.item.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.header.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/create.panel.component.js","webpack:///./src/modules/universal-discovery/components/create/create.component.js","webpack:///./src/modules/universal-discovery/components/create/choose.language.component.js","webpack:///./src/modules/universal-discovery/components/create/choose.content.type.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/bookmarks.panel.component.js","webpack:///./src/modules/universal-discovery/components/bookmarks/bookmarks.component.js","webpack:///./src/modules/universal-discovery/components/content-creator/content.creator.component.js","webpack:///./src/modules/universal-discovery/components/selected-content/selected.content.component.js","webpack:///./src/modules/universal-discovery/components/selected-content/selected.content.item.component.js","webpack:///./src/modules/universal-discovery/components/selected-content/selected.content.popup.component.js","webpack:///./src/modules/universal-discovery/components/content-meta-preview/content.meta.preview.component.js","webpack:///./src/modules/universal-discovery/services/bookmark.service.js","webpack:///./src/modules/common/helpers/compare.helper.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","getBasicRequestInit","token","siteaccess","headers","X-Siteaccess","X-CSRF-Token","mode","credentials","handleRequestError","response","ok","Error","statusText","handleRequestResponse","json","handleRequestResponseStatus","status","NOTIFICATION_INFO_LABEL","NOTIFICATION_SUCCESS_LABEL","NOTIFICATION_WARNING_LABEL","NOTIFICATION_ERROR_LABEL","showNotification","detail","event","CustomEvent","document","body","dispatchEvent","showInfoNotification","message","label","showSuccessNotification","showWarningNotification","showErrorNotification","error","deepClone","data","clonedData","toString","apply","length","TabContentPanelComponent","attrs","id","isVisible","hidden","children","bool","node","_notification","_requestHelper","HEADERS_CREATE_VIEW","Accept","Content-Type","QUERY_LIMIT","loadPreselectedLocationData","startingLocationId","locationId","limit","callback","endpoint","window","Routing","generate","request","Request","fetch","then","catch","loadContentInfo","contentId","JSON","stringify","ViewInput","identifier","public","ContentQuery","Criteria","FacetBuilders","SortClauses","Filter","ContentIdCriterion","offset","method","assign","loadLocation","LocationQuery","LocationIdCriterion","checkCreatePermission","contentTypeIdentifier","languageCode","findLocationsByParentLocationId","parentLocationId","sortClauses","SectionIdentifier","ParentLocationIdCriterion","findContentBySearchQuery","query","Query","FullTextCriterion","loadContentTypes","TooltipPopupComponent","visible","title","onClick","onClose","tabIndex","_icon2","func","_react","_universalDiscovery","FinderComponent","Component","constructor","super","state","locationsMap","activeLocations","lastSelectedItem","appendMoreItems","bind","updateLocationsData","findLocationChildren","loadBranchLeaves","onLoadMore","renderBranch","setBranchContainerRef","setPreselectedState","preselectedItem","componentDidMount","isForcedLocation","allowedLocations","allowedIncludesPreselected","includes","preselectedLocation","isPreselectedLocation","loadPreselectedData","_extends","restInfo","componentDidUpdate","updateBranchesContainerScroll","UNSAFE_componentWillReceiveProps","nextProps","isShowingUp","setState","onItemSelect","Promise","resolve","createPreselectedLocationData","locations","Location","setPreselectedLocationData","subitems","createItem","parent","location","items","map","value","createData","count","totalCount","childCount","item","entries","forEach","key","parseInt","depth","_deepClone2","locationBranch","View","Result","searchHits","searchHit","[object Object]","keys","container","_refBranchesContainer","scrollLeft","scrollWidth","clientWidth","parentLocation","values","find","getLocationSortClauses","results","updateBranchActiveLocations","locationDepth","_props","sortFieldMappings","sortOrderMappings","sortField","sortOrder","onDataLoaded","updateSelectedBranches","updateActiveLocations","filter","reduce","total","selectedLocations","_finderTreeBranch2","onItemClick","onBranchClick","maxHeight","allowContainersOnly","contentTypesMap","multiple","selectedContent","onSelectContent","canSelectContent","onItemRemove","ref","render","style","number","shape","array","SelectContentButtonComponent","toggleEnabledState","handleSelect","handleUnselect","selectContentEnabled","checkCanSelectContent","stopPropagation","_props2","isSelected","iconId","type","onPreview","labels","contentTableItem","notAvailable","ContentTableComponent","perPage","activePage","pages","splitToPages","setActivePage","renderItem","UNSAFE_componentWillMount","ensurePageItemsLoaded","maxPage","Math","floor","index","pageIndex","push","requireItemsCount","_state","min","_contentTableItem2","renderHeader","_contentTableHeader2","renderPagination","_state2","pagesCount","paginationAttrs","minIndex","maxIndex","activeIndex","onChange","_contentTablePagination2","renderPageSpinner","renderPage","_state3","itemsCount","noItemsMessage","_bookmark","_compare","TAB_BROWSE","TAB_SEARCH","TAB_CREATE","TAB_BOOKMARKS","CLASS_SCROLL_DISABLED","CONTENT_META_PREVIEW_BASE_STATE","contentMeta","isPreviewMetaReady","isLocationAllowed","UniversalDiscoveryModule","selectedContentType","isForcedLanguage","cotfAllowedLanguages","cotfForcedLanguage","isForcedContentType","cotfAllowedContentTypes","cotfAllowedLocations","onLanguageSelected","onContentTypeSelected","handlePublish","togglePanel","setContentTypesMap","updateSelectedContent","renderSinglePanel","renderSingleTab","handleConfirm","handleSingleConfirm","setCreateModeState","updateContentMetaWithCurrentVersion","toggleBookmark","onBookmarkAdded","onBookmarkRemoved","setBookmarkLoadingStatus","requireBookmarksCount","onBookmarksLoaded","updatePermissionsState","setCanSelectContentState","updateMaxHeightState","setMainContainerRef","setContentContainerRef","loadingBookmarksLocationsIds","_refMainContainer","_refContentContainer","findContentType","tabsLabels","browse","Translator","trans","search","create","bookmarks","activeTab","mainContainerRestHeight","selectedLanguage","isCreateMode","hasPermission","userBookmarksCount","userBookmarksItems","bookmarksRequiredCount","bookmarksDuringLoadingCount","bookmarked","classList","add","addEventListener","initializeBookmarks","clientHeight","componentWillUnmount","remove","removeEventListener","prevProps","prevState","ContentInfo","Content","_id","loadBookmarks","BookmarkList","updatedContentMeta","currentVersion","CurrentVersion","contentType","contentTypes","group","result","onConfirm","addContentTypeInfo","clonedItem","ContentType","ContentTypeInfo","_href","contentMetaWithContentTypeInfo","dispatchBookmarkChangeEvent","isLoading","isBookmarkLoading","fetchBookmarkStatus","checkIsBookmarked","isBookmarked","setIsBookmarked","removeBookmark","addBookmark","onBookmarkToggled","itemToRemoveLocation","areSameLocations","closeContentMetaPreview","addedBookmarkLocation","bookmarkLocation","itemsToLoadCount","loadedBookmarksCount","newBookmarksRequiredCount","max","bookmarksToLoadCount","isAlreadySelected","isOverLimit","selectedItemsLimit","contentTypeInfo","isAllowedContentType","ContentTypeInfoList","renderContentMetaPreview","languages","isContentBookmarked","_contentMetaPreview2","ready","renderSelectedContent","_selectedContent2","itemsLimit","getTabConfig","iconIdentifier","renderTabs","_props3","extraTabs","visibleTabs","onlyContentOnTheFly","tabsToRender","tab","config","_tabNavItem2","renderPanels","_props4","cotfPreselectedContentType","cotfPreselectedLanguage","cotfPreselectedLocation","_state4","browsePanelConfig","panel","FinderPanelComponent","searchPanelConfig","SearchPanelComponent","bookmarksPanelConfig","BookmarksPanelComponent","createPanelConfig","CreatePanelComponent","forcedLanguage","preselectedLanguage","allowedLanguages","preselectedContentType","allowedContentTypes","panelsToRender","console","warn","Panel","_props5","searchResultsPerPage","bookmarksPerPage","_state5","renderConfirmBtn","_state6","disabled","confirmBtnLabel","checkPermission","access","renderCreateBtn","isDataSelected","createContentLabel","renderPermissionError","noPermissionMessage","renderNotAllowedLocationError","locationNotAllowedMessage","metaPreviewClassName","containerClassName","_contentCreator2","selectedLocationId","onCancel","cancelBtnLabel","eZ","addConfig","arrayOf","adminUiConfig","universalDiscoveryWidget","TabNavItemComponent","wrapperAttrs","_tabContentPanel2","_finder2","FinderTreeBranchComponent","expandBranch","removeLoadingStateFromItem","updateSelectedLocations","renderLeaf","currentlyLoadingLocationId","isLoadingChildren","contentTypeHref","isContainer","isSelectable","selected","_finderTreeLeaf2","remoteId","renderLoadMore","loadMoreLabel","height","FinderTreeLeafComponent","handleClick","target","closest","getContentTypeIdentifier","renderIcon","contentTypeIconUrl","helpers","getContentTypeIconUrl","renderLoadingIcon","renderSelectContentBtn","_selectContentButton2","content","componentClassName","isNotSelectableClassName","join","Name","searchAttrs","_search2","SearchComponent","isSearching","submitDisabled","updateItemsState","searchContent","onRequireItemsCount","toggleSubmitButtonState","setSearchInputRef","isClickEvent","nativeEvent","isEnterKeyEvent","keyCode","_refSearchInput","notification","renderSubmitBtn","btnAttrs","svgExtraClasses","btnLabel","trim","tableTitle","onKeyUp","_contentTable2","ContentTablePaginationComponent","btnFirstLabel","btnPrevLabel","btnNextLabel","btnLastLabel","btnClass","firstAttrs","prevAttrs","nextAttrs","lastAttrs","ContentTableItemComponent","notAvailableLabel","contentTypeName","contentTypeNames","nameLabel","typeLabel","componentProps","finderProps","chooseLanguageAndContentTypeTitle","selectLocationTitle","_create2","CreateComponent","_chooseLanguage2","_chooseContentType2","ChooseLanguageComponent","updateSelection","renderOption","selectedLanguageCode","priority","mappings","language","renderOptions","selectAttrs","selectLanguageTitle","ChooseContentTypeComponent","hasPreselectedAllowedContentType","isPreselectedContentType","_filterTimeout","updateFilterQuery","renderGroup","filterQuery","updateSelectedItem","toLowerCase","clearTimeout","setTimeout","isNotSelectable","groupName","groupAttrs","every","selectContentTypeTitle","typeToRefinePlaceholder","placeholder","getBookmarksAttrs","getWrapperAttrs","bookmarksAttrs","_bookmarks2","BookmarksComponent","renderTable","noBookmarksMessage","renderSpinner","renderNoBookmarksInfo","ContentCreatorComponent","handleIframeLoad","enablePublishBtn","disablePublishBtn","renderPublishBtn","_refIframe","iframeLoading","publishBtnDisabled","contentWindow","onbeforeunload","querySelector","click","iframeWindow","iframeDoc","iframeUrl","generateIframeUrl","pathname","loadLocationInfo","onunload","setAttribute","renderLoadingSpinner","publishLabel","cancelLabel","contentClass","src","onLoad","SelectedContentComponent","PureComponent","isPopupVisible","hidePopup","togglePopup","renderSelectedItem","_selectedContentItem2","onRemove","renderLimitLabel","limitLabel","limitLabelText","renderSelectedItems","_selectedContentPopup2","getTitle","titles","infoCssClasses","noConfirmedContentTitle","SelectedContentItemComponent","names","icon","SelectedContentPopupComponent","_tooltipPopup2","any","ContentMetaPreviewComponent","imageUri","translations","getImageUri","imageField","Version","Fields","field","fieldTypeIdentifier","fieldValue","uri","getTranslations","VersionInfo","VersionTranslationInfo","Language","renderTranslation","translation","renderImagePreview","imagePreviewNotAvailableLabel","alt","Fragment","renderBookmarkIcon","bookmarkIconId","wrapperClassName","formatShortDateWithTimezone","timezone","lastModifiedLabel","creationDateLabel","translationsLabel","Date","lastModificationDate","publishedDate","basicRequestInit","location1","location2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,eACA,mBAAAC,eAAAC,IACAD,QAAA,sBAAAJ,GACA,iBAAAC,QACAA,QAAA,mBAAAD,EAAAG,QAAA,SAAAA,QAAA,gBAEAJ,EAAA,GAAAA,EAAA,OAA+BA,EAAA,WAAAA,EAAA,eAAqDA,EAAA,8BAAAC,EAAAD,EAAA,MAAAA,EAAA,YARpF,CASC,oBAAAO,UAAAC,KAAA,SAAAC,EAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAX,QAGA,IAAAC,EAAAQ,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAb,YAUA,OANAc,EAAAH,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAY,GAAA,EAGAZ,EAAAD,QAqCA,OAhCAU,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAlB,EAAAmB,EAAAC,GACAV,EAAAW,EAAArB,EAAAmB,IACAG,OAAAC,eAAAvB,EAAAmB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAA1B,GACA,IAAAmB,EAAAnB,KAAA2B,WACA,WAA2B,OAAA3B,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAS,EAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ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,UAKZjB,MAAMF,GACDG,KAAM1D,IAAa,MACRO,EAAWP,EAAXO,OAER,OAPqB,MAOjBA,GANoB,MAMeA,EAPlB,MAQVA,GAGJ,EAAAkC,EAAA1C,oBAAmBC,KAE7B0D,KAAKR,GACLS,MAAMnC,0GChGFkV,mBAAmB,EAACkS,EAAWC,IAAcD,EAAU1mB,KAAO2mB,EAAU3mB","file":"UniversalDiscovery.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"UniversalDiscovery\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"UniversalDiscovery\"] = factory(root[\"React\"], root[\"PropTypes\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 32);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b2275d860cd52e01c324","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","/**\n * Returns basic RequestInit object for Request\n *\n * @function getBasicRequestInit\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @returns {RequestInit}\n */\nexport const getBasicRequestInit = ({ token, siteaccess }) => {\n return {\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n };\n};\n\n/**\n * Handles request error\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Response}\n */\nexport const handleRequestError = (response) => {\n if (!response.ok) {\n throw Error(response.statusText);\n }\n\n return response;\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Error|Promise}\n */\nexport const handleRequestResponse = (response) => {\n return handleRequestError(response).json();\n};\n\n/**\n * Handles request response; returns status if response is OK\n *\n * @function handleRequestResponseStatus\n * @param {Response} response\n * @returns {number}\n */\nexport const handleRequestResponseStatus = (response) => {\n return handleRequestError(response).status;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/request.helper.js","export const NOTIFICATION_INFO_LABEL = 'info';\nexport const NOTIFICATION_SUCCESS_LABEL = 'success';\nexport const NOTIFICATION_WARNING_LABEL = 'warning';\nexport const NOTIFICATION_ERROR_LABEL = 'danger';\n\n/**\n * Dispatches notification event\n *\n * @method showNotification\n * @param {{message: string, label: string}} detail\n */\nexport const showNotification = (detail) => {\n const event = new CustomEvent('ez-notify', {\n detail,\n });\n\n document.body.dispatchEvent(event);\n};\n\n/**\n * Dispatches info notification event\n *\n * @method showInfoNotification\n * @param {String} message\n */\nexport const showInfoNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_INFO_LABEL,\n });\n};\n\n/**\n * Dispatches success notification event\n *\n * @method showSuccessNotification\n * @param {String} message\n */\nexport const showSuccessNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_SUCCESS_LABEL,\n });\n};\n\n/**\n * Dispatches warning notification event\n *\n * @method showWarningNotification\n * @param {String} message\n */\nexport const showWarningNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_WARNING_LABEL,\n });\n};\n\n/**\n * Dispatches error notification event\n *\n * @method showErrorNotification\n * @param {(string|Error)} error\n */\nexport const showErrorNotification = (error) => {\n const isErrorObj = error instanceof Error;\n const message = isErrorObj ? error.message : error;\n\n showNotification({\n message,\n label: NOTIFICATION_ERROR_LABEL,\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/services/notification.service.js","/**\n * Clones any object. Faster alternative to `JSON.parse(JSON.stringify)`\n *\n * @function deepClone\n * @param {Any} data\n * @returns {Any} cloned data\n */\nconst deepClone = (data) => {\n let clonedData;\n\n if (typeof data !== 'object') {\n return data;\n }\n\n if (!data) {\n return data;\n }\n\n if (Object.prototype.toString.apply(data) === '[object Array]') {\n clonedData = [];\n\n for (let i = 0; i < data.length; i++) {\n clonedData[i] = deepClone(data[i]);\n }\n\n return clonedData;\n }\n\n clonedData = {};\n\n for (let i in data) {\n if (data.hasOwnProperty(i)) {\n clonedData[i] = deepClone(data[i]);\n }\n }\n\n return clonedData;\n};\n\nexport default deepClone;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/deep.clone.helper.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst TabContentPanelComponent = (props) => {\n const attrs = {\n id: props.id,\n className: 'c-tab-content-panel',\n };\n\n if (!props.isVisible) {\n attrs.hidden = true;\n }\n\n return
    {props.children}
    ;\n};\n\nTabContentPanelComponent.propTypes = {\n id: PropTypes.string.isRequired,\n isVisible: PropTypes.bool.isRequired,\n children: PropTypes.node.isRequired,\n};\n\nexport default TabContentPanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/tab.content.panel.component.js","import { showErrorNotification } from '../../common/services/notification.service';\nimport { handleRequestResponse } from '../../common/helpers/request.helper.js';\n\nconst HEADERS_CREATE_VIEW = {\n Accept: 'application/vnd.ez.api.View+json; version=1.1',\n 'Content-Type': 'application/vnd.ez.api.ViewInput+json; version=1.1',\n};\nexport const QUERY_LIMIT = 50;\nconst ENDPOINT_CREATE_VIEW = '/api/ezp/v2/views';\n\n/**\n * Loads preselected location data\n *\n * @function loadPreselectedLocationData\n * @param {String} startingLocationId\n * @param {String} locationId\n * @param {Number} limit\n * @param {Function} callback\n */\nexport const loadPreselectedLocationData = ({ startingLocationId, locationId, limit = QUERY_LIMIT }, callback) => {\n const endpoint = window.Routing.generate('ezplatform.udw.preselected_location.data', {\n startingLocationId,\n locationId,\n limit,\n });\n const request = new Request(endpoint, {\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Loads content info\n *\n * @function loadContentInfo\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} contentId\n * @param {Function} callback\n */\nexport const loadContentInfo = ({ token, siteaccess }, contentId, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-load-content-info-${contentId}`,\n public: false,\n ContentQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Filter: { ContentIdCriterion: `${contentId}` },\n limit: 1,\n offset: 0,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Loads location\n *\n * @function loadLocation\n * @param {Object} params params hash containing REST config: token and siteaccess properties; locationId and offset\n * @param {Function} callback\n */\nexport const loadLocation = ({ token, siteaccess, locationId, limit = QUERY_LIMIT, offset = 0 }, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-location-by-id-${locationId}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Filter: { LocationIdCriterion: locationId },\n limit,\n offset,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Checks if user has permission to create content\n *\n * @function checkCreatePermission\n * @param {Object} params params hash containing REST config: token, siteaccess, contentTypeIdentifier, languageCode, locationId\n * @param {Function} callback\n */\nexport const checkCreatePermission = ({ token, contentTypeIdentifier, languageCode, locationId }, callback) => {\n const endpoint = window.Routing.generate('ezplatform.content_on_the_fly.has_access', {\n languageCode: languageCode,\n contentTypeIdentifier: contentTypeIdentifier,\n locationId: locationId,\n });\n const request = new Request(endpoint, {\n method: 'GET',\n headers: { 'X-CSRF-Token': token },\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Finds locations related to the parent location\n *\n * @function findLocationsByParentLocationId\n * @param {Object} params params hash containing REST config: token and siteaccess properties; parentLocationId and offset; sortClauses\n * @param {Function} callback\n */\nexport const findLocationsByParentLocationId = (\n { token, siteaccess, parentLocationId, limit = QUERY_LIMIT, offset = 0, sortClauses = { SectionIdentifier: 'ascending' } },\n callback\n) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-locations-by-parent-location-id-${parentLocationId}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: sortClauses,\n Filter: { ParentLocationIdCriterion: parentLocationId },\n limit,\n offset,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then((json) =>\n callback({\n parentLocationId,\n offset,\n data: json,\n })\n )\n .catch(showErrorNotification);\n};\n\n/**\n * Finds content matching a given text query\n *\n * @function findContentBySearchQuery\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} query\n * @param {Function} callback\n */\nexport const findContentBySearchQuery = ({ token, siteaccess }, query, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-locations-by-search-query-${query}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Query: { FullTextCriterion: query },\n limit: QUERY_LIMIT,\n offset: 0,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Loads content types\n *\n * @function loadContentTypes\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {Function} callback\n */\nexport const loadContentTypes = ({ token, siteaccess }, callback) => {\n const request = new Request('/api/ezp/v2/content/types', {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/services/universal.discovery.service.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon/icon';\n\nconst TooltipPopupComponent = (props) => {\n const attrs = {\n className: 'c-tooltip-popup',\n hidden: !props.visible,\n };\n\n return (\n
    \n
    \n
    {props.title}
    \n
    \n \n
    \n
    \n
    {props.children}
    \n
    \n );\n};\n\nTooltipPopupComponent.propTypes = {\n title: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired,\n visible: PropTypes.bool.isRequired,\n onClose: PropTypes.func,\n};\n\nTooltipPopupComponent.defaultProps = {\n onClose: () => {},\n};\n\nexport default TooltipPopupComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/tooltip-popup/tooltip.popup.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport FinderTreeBranchComponent from './finder.tree.branch.component';\nimport { loadPreselectedLocationData, QUERY_LIMIT } from '../../services/universal.discovery.service';\nimport deepClone from '../../../common/helpers/deep.clone.helper';\n\nexport default class FinderComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n locationsMap: {},\n activeLocations: {},\n lastSelectedItem: null,\n limit: QUERY_LIMIT,\n };\n\n this.appendMoreItems = this.appendMoreItems.bind(this);\n this.updateLocationsData = this.updateLocationsData.bind(this);\n this.findLocationChildren = this.findLocationChildren.bind(this);\n this.loadBranchLeaves = this.loadBranchLeaves.bind(this);\n this.onLoadMore = this.onLoadMore.bind(this);\n this.renderBranch = this.renderBranch.bind(this);\n this.setBranchContainerRef = this.setBranchContainerRef.bind(this);\n this.setPreselectedState = this.setPreselectedState.bind(this);\n\n this.locationsMap = {};\n this.activeLocations = {};\n this.preselectedItem = null;\n }\n\n componentDidMount() {\n const isForcedLocation = this.props.allowedLocations.length === 1;\n const allowedIncludesPreselected = this.props.allowedLocations.includes(this.props.preselectedLocation);\n const isPreselectedLocation = this.props.preselectedLocation && (!this.props.allowedLocations.length || allowedIncludesPreselected);\n\n if (isForcedLocation) {\n this.loadPreselectedData(this.props.allowedLocations[0], true);\n } else if (isPreselectedLocation) {\n this.loadPreselectedData(this.props.preselectedLocation, true);\n } else {\n this.props.findLocationsByParentLocationId(\n { ...this.props.restInfo, parentLocationId: this.props.startingLocationId },\n this.updateLocationsData\n );\n }\n }\n\n componentDidUpdate() {\n this.updateBranchesContainerScroll();\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const isShowingUp = nextProps.isVisible && nextProps.isVisible !== this.props.isVisible;\n\n if (this.preselectedItem && this.locationsMap && this.activeLocations && isShowingUp) {\n this.setState(this.setPreselectedState, () => nextProps.isVisible && this.props.onItemSelect(this.preselectedItem));\n }\n }\n\n setPreselectedState() {\n return { locationsMap: this.locationsMap, activeLocations: this.activeLocations };\n }\n\n /**\n * Load data of preselected location.\n *\n * @method loadPreselectedData\n * @param {String} locationId\n * @memberof FinderComponent\n */\n loadPreselectedData(locationId) {\n const promise = new Promise((resolve) =>\n loadPreselectedLocationData({ startingLocationId: this.props.startingLocationId, locationId }, resolve)\n );\n\n promise.then((response) => {\n this.createPreselectedLocationData(response);\n this.preselectedItem = response.locations[locationId].Location;\n this.setPreselectedLocationData();\n });\n }\n\n /**\n * Create preselected location data.\n *\n * @method createPreselectedLocationData\n * @param {Object} locations\n * @param {Object} subitems\n * @memberof FinderComponent\n */\n createPreselectedLocationData({ locations, subitems }) {\n const createItem = ({ parent, offset = 0, children, location }) => {\n const createData = (items) => {\n return items.locations.map((value) => {\n return { value };\n });\n };\n const data = children ? createData(children) : [];\n const count = children ? children.totalCount : location.childCount;\n\n return { count, data, offset, parent, location };\n };\n\n if (subitems[1]) {\n const item = createItem({ parent: 1, children: subitems[1] });\n\n this.locationsMap[1] = item;\n this.activeLocations[0] = item;\n }\n\n Object.entries(locations).forEach(([key, value]) => {\n const item = createItem({\n parent: parseInt(key, 10),\n children: subitems[key],\n location: value.Location,\n });\n\n this.locationsMap[key] = item;\n this.activeLocations[value.Location.depth] = item;\n });\n }\n\n /**\n * Sets preselected location data.\n *\n * @method setPreselectedLocationData\n * @memberof FinderComponent\n */\n setPreselectedLocationData() {\n this.setState(this.setPreselectedState, () => this.props.isVisible && this.props.onItemSelect(this.preselectedItem));\n }\n\n /**\n * Updates locations based state attributes: activeLocations and locationsMap\n *\n * @method updateLocationsData\n * @param {Object} params params hash containing: parentLocationId, data and offset properties\n * @memberof FinderComponent\n */\n updateLocationsData({ parentLocationId, data, offset }, location = null) {\n this.setState((state) => {\n const activeLocations = deepClone(state.activeLocations);\n const locationBranch = {\n location,\n parent: parentLocationId,\n data: data.View.Result.searchHits.searchHit,\n count: data.View.Result.count,\n offset,\n };\n const locationsMap = { ...deepClone(state.locationsMap), [parentLocationId]: locationBranch };\n\n if (!Object.keys(activeLocations).length) {\n activeLocations[0] = locationBranch;\n }\n\n return { activeLocations, locationsMap };\n });\n }\n\n /**\n * Updates the left scroll position of branches container\n *\n * @method updateBranchesContainerScroll\n * @memberof FinderComponent\n */\n updateBranchesContainerScroll() {\n const container = this._refBranchesContainer;\n\n if (container) {\n container.scrollLeft = container.scrollWidth - container.clientWidth;\n }\n }\n\n /**\n * Handles loading more items for a selected parent location\n *\n * @method onLoadMore\n * @param {Object} parentLocation\n * @memberof FinderComponent\n */\n onLoadMore(parentLocation) {\n const limit = this.state.limit;\n const offset = Object.values(this.state.activeLocations).find((location) => location.parent === parentLocation.id).offset + limit;\n const sortClauses = this.getLocationSortClauses(parentLocation);\n\n this.props.findLocationsByParentLocationId(\n { ...this.props.restInfo, parentLocationId: parentLocation.id, limit, offset, sortClauses },\n this.appendMoreItems\n );\n }\n\n /**\n * Appends more subitems for a selected location\n *\n * @method appendMoreItems\n * @param {Object} response object containing information about: parentLocationId, offset and data\n * @memberof FinderComponent\n */\n appendMoreItems({ parentLocationId, offset, data }) {\n this.setState((state) => {\n const activeLocations = deepClone(state.activeLocations);\n const locationsMap = deepClone(state.locationsMap);\n\n Object.keys(activeLocations).forEach((key) => {\n const location = activeLocations[key];\n\n if (location.parent === parentLocationId) {\n const results = [...location.data, ...data.View.Result.searchHits.searchHit];\n\n location.offset = offset;\n location.data = results;\n locationsMap[parentLocationId] = location;\n }\n });\n\n return { activeLocations, locationsMap };\n });\n }\n\n /**\n * Loads branch children (sub-items)\n *\n * @method loadBranchLeaves\n * @param {Object} parentLocation\n * @memberof FinderComponent\n */\n loadBranchLeaves(parentLocation) {\n const sortClauses = this.getLocationSortClauses(parentLocation);\n const promise = new Promise((resolve) =>\n this.props.findLocationsByParentLocationId(\n {\n ...this.props.restInfo,\n parentLocationId: parentLocation.id,\n sortClauses,\n },\n resolve\n )\n );\n\n promise.then((response) => {\n this.updateLocationsData(response, parentLocation);\n this.updateBranchActiveLocations(parentLocation.id);\n });\n }\n\n /**\n * Updates branch active locations\n *\n * @method updateBranchActiveLocations\n * @param {String} parent the parent id\n * @memberof FinderComponent\n */\n updateBranchActiveLocations(parent) {\n const activeLocations = deepClone(this.state.activeLocations);\n const depth = Object.keys(activeLocations).find((locationDepth) => activeLocations[locationDepth].parent === parent);\n\n activeLocations[depth] = this.state.locationsMap[parent];\n\n this.setState(() => ({ activeLocations }));\n }\n\n /**\n * Generates sort clause for location\n *\n * @method getLocationSortClauses\n * @param {Object} location\n * @returns {Object} sortClauses for given location\n * @memberof FinderComponent\n */\n getLocationSortClauses(location) {\n const { sortFieldMappings, sortOrderMappings } = this.props;\n const sortField = sortFieldMappings[location.sortField];\n const sortOrder = sortOrderMappings[location.sortOrder];\n\n if (!sortField || !sortOrder) {\n return {};\n }\n\n return { [sortField]: sortOrder };\n }\n\n /**\n * Finds location children (sub-items)\n *\n * @method findLocationChildren\n * @param {Object} params\n * @param {String} params.parent parent location id\n * @param {Object} params.location\n * @param {Function} params.onDataLoaded\n * @memberof FinderComponent\n */\n findLocationChildren({ parent, location, onDataLoaded }) {\n if (this.props.allowedLocations.length === 1) {\n return;\n }\n\n this.setState(() => ({ lastSelectedItem: parent }));\n\n if (this.state.locationsMap[parent]) {\n this.updateSelectedBranches(location, onDataLoaded);\n this.props.onItemSelect(location);\n\n return;\n }\n\n const sortClauses = this.getLocationSortClauses(location);\n const promise = new Promise((resolve) =>\n this.props.findLocationsByParentLocationId(\n {\n ...this.props.restInfo,\n parentLocationId: parent,\n sortClauses,\n },\n resolve\n )\n );\n\n promise.then((response) => {\n this.updateLocationsData(response, location);\n this.updateSelectedBranches(location, onDataLoaded);\n\n this.props.onItemSelect(location);\n });\n }\n\n /**\n * Updates selected branches state\n *\n * @param {Object} location location struct\n * @param {Function} onDataLoaded\n * @memberof FinderComponent\n */\n updateSelectedBranches(location, onDataLoaded) {\n this.setState(this.updateActiveLocations.bind(this, location), onDataLoaded);\n }\n\n /**\n * Updates active locations info\n *\n * @method updateActiveLocations\n * @param {Object} location location struct\n * @param {Object} state component state\n * @returns {Object}\n * @memberof FinderComponent\n */\n updateActiveLocations(location, state) {\n const locationDepth = parseInt(location.depth, 10);\n const activeLocations = Object.keys(state.activeLocations)\n .filter((key) => parseInt(key, 10) < locationDepth)\n .reduce((total, depth) => {\n depth = parseInt(depth, 10);\n\n total[depth] = state.activeLocations[depth];\n\n return total;\n }, {});\n\n activeLocations[locationDepth] = state.locationsMap[location.id];\n\n return { activeLocations };\n }\n\n /**\n * Renders branch (the sub items container)\n *\n * @method renderBranch\n * @param {Object} params params hash containing: parent, count and data properties\n * @returns {null|Element}\n * @memberof FinderComponent\n */\n renderBranch({ parent, data, count, location }) {\n const { lastSelectedItem } = this.state;\n\n if (!data || !count) {\n return null;\n }\n\n const activeLocations = Object.values(this.state.activeLocations);\n const selectedLocations = activeLocations.map((item) => item.parent);\n\n return (\n \n );\n }\n\n setBranchContainerRef(ref) {\n this._refBranchesContainer = ref;\n }\n\n render() {\n const activeLocations = Object.values(this.state.activeLocations);\n\n if (!activeLocations.length) {\n return null;\n }\n\n return (\n
    \n
    \n {activeLocations.map(this.renderBranch)}\n
    \n
    \n );\n }\n}\n\nFinderComponent.propTypes = {\n multiple: PropTypes.bool.isRequired,\n maxHeight: PropTypes.number.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n startingLocationId: PropTypes.number.isRequired,\n findLocationsByParentLocationId: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n allowContainersOnly: PropTypes.bool,\n contentTypesMap: PropTypes.object,\n preselectedLocation: PropTypes.number,\n allowedLocations: PropTypes.array,\n isVisible: PropTypes.bool,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\nFinderComponent.defaultProps = {\n allowedLocations: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/finder/finder.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nexport default class SelectContentButtonComponent extends Component {\n constructor(props) {\n super(props);\n\n this.toggleEnabledState = this.toggleEnabledState.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n this.handleUnselect = this.handleUnselect.bind(this);\n\n this.state = {\n selectContentEnabled: true,\n };\n }\n\n componentDidMount() {\n this.checkCanSelectContent();\n }\n\n componentDidUpdate() {\n this.checkCanSelectContent();\n }\n\n checkCanSelectContent() {\n const { location, canSelectContent } = this.props;\n\n canSelectContent(location, this.toggleEnabledState);\n }\n\n toggleEnabledState(selectContentEnabled) {\n if (this.state.selectContentEnabled === selectContentEnabled) {\n return;\n }\n\n this.setState((state) => ({ ...state, selectContentEnabled }));\n }\n\n handleSelect(event) {\n event.stopPropagation();\n\n this.props.onSelectContent(this.props.location);\n }\n\n handleUnselect(event) {\n event.stopPropagation();\n\n this.props.onItemRemove(this.props.location.id);\n }\n\n render() {\n const { multiple, isSelected } = this.props;\n const iconId = isSelected ? 'checkmark' : 'create';\n const attrs = {\n type: 'button',\n className: 'c-select-content-button',\n onClick: isSelected ? this.handleUnselect : this.handleSelect,\n };\n\n if (!multiple || (!isSelected && !this.state.selectContentEnabled)) {\n return null;\n }\n\n if (isSelected) {\n attrs.className = `${attrs.className} ${attrs.className}--selected`;\n }\n\n return (\n \n );\n }\n}\n\nSelectContentButtonComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onPreview: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemClick: PropTypes.func,\n labels: PropTypes.shape({\n contentTableItem: PropTypes.shape({\n notAvailable: PropTypes.string.isRequired,\n }).isRequired,\n }).isRequired,\n location: PropTypes.object.isRequired,\n isSelected: PropTypes.bool.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/select-content-button/select.content.button.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nimport ContentTablePaginationComponent from './content.table.pagination.component';\nimport ContentTableItemComponent from './content.table.item.component';\nimport ContentTableHeaderComponent from './content.table.header.component';\n\nexport default class ContentTableComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n items: props.items,\n perPage: props.perPage,\n activePage: 0,\n pages: this.splitToPages(props.items, props.perPage),\n count: props.count,\n };\n\n this.setActivePage = this.setActivePage.bind(this);\n this.renderItem = this.renderItem.bind(this);\n }\n\n UNSAFE_componentWillMount() {\n this.ensurePageItemsLoaded(0);\n }\n\n UNSAFE_componentWillReceiveProps({ items, perPage, count }) {\n const maxPage = !count ? 0 : Math.floor((count - 1) / perPage);\n\n this.setState((state) => ({\n items,\n count,\n activePage: state.activePage <= maxPage ? state.activePage : maxPage,\n pages: this.splitToPages(items, perPage),\n }));\n }\n\n /**\n * Splits items into pages\n *\n * @method splitToPages\n * @param {Array} items\n * @param {Number} perPage\n * @returns {Array}\n * @memberof ContentTableComponent\n */\n splitToPages(items, perPage) {\n return items.reduce((pages, item, index) => {\n const pageIndex = Math.floor(index / perPage);\n\n if (!pages[pageIndex]) {\n pages[pageIndex] = [];\n }\n\n pages[pageIndex].push(item);\n\n return pages;\n }, []);\n }\n\n ensurePageItemsLoaded(activePage) {\n const { requireItemsCount } = this.props;\n const { count, perPage } = this.state;\n const itemsNeededCount = Math.min(perPage * (activePage + 1), count);\n\n requireItemsCount(itemsNeededCount);\n }\n\n /**\n * Sets active page index state\n *\n * @method setActivePage\n * @param {Number} activePage\n * @memberof ContentTableComponent\n */\n setActivePage(activePage) {\n this.ensurePageItemsLoaded(activePage);\n\n this.setState(() => ({ activePage }));\n }\n\n /**\n * Renders single item\n *\n * @method renderItem\n * @param {Object} item\n * @returns {Element}\n * @memberof ContentTableComponent\n */\n renderItem(item) {\n const location = item.Location;\n const { contentTypesMap, onItemSelect, selectedContent, onSelectContent, canSelectContent, onItemRemove, multiple } = this.props;\n\n return (\n onItemSelect(location)}\n selectedContent={selectedContent}\n onSelectContent={onSelectContent}\n canSelectContent={canSelectContent}\n onItemRemove={onItemRemove}\n multiple={multiple}\n />\n );\n }\n\n /**\n * Renders single search results item\n *\n * @method renderHeader\n * @returns {Element}\n * @memberof ContentTableComponent\n */\n renderHeader() {\n const { items } = this.state;\n const showHeader = !!items.length;\n\n if (!showHeader) {\n return null;\n }\n\n return ;\n }\n\n /**\n * Renders pagination\n *\n * @method renderPagination\n * @returns {Element}\n * @memberof ContentTableComponent\n */\n renderPagination() {\n const { activePage, count, perPage } = this.state;\n const pagesCount = !count ? 0 : Math.floor((count - 1) / perPage) + 1;\n const paginationAttrs = {\n minIndex: 0,\n maxIndex: pagesCount - 1,\n activeIndex: activePage,\n onChange: this.setActivePage,\n };\n\n if (!pagesCount || paginationAttrs.minIndex === paginationAttrs.maxIndex) {\n return null;\n }\n\n return ;\n }\n\n renderPageSpinner() {\n return ;\n }\n\n renderPage() {\n const { pages, activePage, perPage, count } = this.state;\n const itemsCount = this.state.items.length;\n const neededItemsCount = Math.min((activePage + 1) * perPage, count);\n const allNeededItemsLoaded = itemsCount >= neededItemsCount;\n\n if (!allNeededItemsLoaded) {\n return this.renderPageSpinner();\n }\n\n const pageToRender = !itemsCount ? [] : pages[activePage];\n\n return pageToRender.map(this.renderItem);\n }\n\n render() {\n const { title, count } = this.props;\n\n if (!count) {\n return null;\n }\n\n return (\n
    \n
    \n {title} ({count})\n
    \n {this.renderHeader()}\n
    {this.renderPage()}
    \n {this.renderPagination()}\n
    \n );\n }\n}\n\nContentTableComponent.propTypes = {\n items: PropTypes.array.isRequired,\n count: PropTypes.number.isRequired,\n perPage: PropTypes.number.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemClick: PropTypes.func,\n title: PropTypes.string.isRequired,\n noItemsMessage: PropTypes.string,\n requireItemsCount: PropTypes.func.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\nContentTableComponent.defaultProps = {\n onItemClick: null,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabNavItemComponent from './components/tab-nav/tab.nav.item.component';\nimport FinderPanelComponent from './components/tab-content/finder.panel.component';\nimport SearchPanelComponent from './components/tab-content/search.panel.component';\nimport CreatePanelComponent from './components/tab-content/create.panel.component';\nimport BookmarksPanelComponent from './components/tab-content/bookmarks.panel.component';\nimport ContentCreatorComponent from './components/content-creator/content.creator.component';\nimport SelectedContentComponent from './components/selected-content/selected.content.component';\nimport ContentMetaPreviewComponent from './components/content-meta-preview/content.meta.preview.component';\nimport {\n loadContentInfo,\n loadContentTypes,\n findLocationsByParentLocationId,\n findContentBySearchQuery,\n checkCreatePermission,\n} from './services/universal.discovery.service';\nimport { checkIsBookmarked, loadBookmarks, addBookmark, removeBookmark } from './services/bookmark.service';\nimport { showErrorNotification } from '../common/services/notification.service';\nimport { areSameLocations } from '../common/helpers/compare.helper';\nimport deepClone from '../common/helpers/deep.clone.helper';\n\nexport const TAB_BROWSE = 'browse';\nexport const TAB_SEARCH = 'search';\nexport const TAB_CREATE = 'create';\nexport const TAB_BOOKMARKS = 'bookmarks';\n\nconst CLASS_SCROLL_DISABLED = 'ez-scroll-disabled';\nconst CONTENT_META_PREVIEW_BASE_STATE = {\n contentMeta: null,\n isPreviewMetaReady: false,\n isLocationAllowed: true,\n};\n\nexport default class UniversalDiscoveryModule extends Component {\n constructor(props) {\n super(props);\n\n let selectedContentType = {};\n const isForcedLanguage = props.cotfAllowedLanguages.length === 1 || props.cotfForcedLanguage;\n const isForcedContentType = props.cotfAllowedContentTypes.length === 1;\n const isForcedLocation = props.cotfAllowedLocations.length === 1;\n\n this.onLanguageSelected = this.onLanguageSelected.bind(this);\n this.onContentTypeSelected = this.onContentTypeSelected.bind(this);\n this.handlePublish = this.handlePublish.bind(this);\n this.togglePanel = this.togglePanel.bind(this);\n this.setContentTypesMap = this.setContentTypesMap.bind(this);\n this.canSelectContent = this.canSelectContent.bind(this);\n this.updateSelectedContent = this.updateSelectedContent.bind(this);\n this.onItemRemove = this.onItemRemove.bind(this);\n this.onItemSelect = this.onItemSelect.bind(this);\n this.renderSinglePanel = this.renderSinglePanel.bind(this);\n this.renderSingleTab = this.renderSingleTab.bind(this);\n this.handleConfirm = this.handleConfirm.bind(this);\n this.handleSingleConfirm = this.handleSingleConfirm.bind(this);\n this.setCreateModeState = this.setCreateModeState.bind(this);\n this.updateContentMetaWithCurrentVersion = this.updateContentMetaWithCurrentVersion.bind(this);\n this.toggleBookmark = this.toggleBookmark.bind(this);\n this.onBookmarkAdded = this.onBookmarkAdded.bind(this);\n this.onBookmarkRemoved = this.onBookmarkRemoved.bind(this);\n this.setBookmarkLoadingStatus = this.setBookmarkLoadingStatus.bind(this);\n this.requireBookmarksCount = this.requireBookmarksCount.bind(this);\n this.onBookmarksLoaded = this.onBookmarksLoaded.bind(this);\n this.updatePermissionsState = this.updatePermissionsState.bind(this);\n this.setCanSelectContentState = this.setCanSelectContentState.bind(this);\n this.updateMaxHeightState = this.updateMaxHeightState.bind(this);\n this.setMainContainerRef = this.setMainContainerRef.bind(this);\n this.setContentContainerRef = this.setContentContainerRef.bind(this);\n\n this.loadingBookmarksLocationsIds = {};\n this._refMainContainer;\n this._refContentContainer;\n\n if (isForcedContentType) {\n selectedContentType = this.findContentType(props.cotfAllowedContentTypes[0]);\n }\n\n this.tabsLabels = {\n browse: Translator.trans(/*@Desc(\"Browse\")*/ 'browse.tab.label', {}, 'universal_discovery_widget'),\n search: Translator.trans(/*@Desc(\"Search\")*/ 'search.tab.label', {}, 'universal_discovery_widget'),\n create: Translator.trans(/*@Desc(\"Create\")*/ 'create.tab.label', {}, 'universal_discovery_widget'),\n bookmarks: Translator.trans(/*@Desc(\"Bookmarks\")*/ 'bookmarks.tab.label', {}, 'universal_discovery_widget'),\n };\n\n this.state = {\n activeTab: props.activeTab,\n contentTypesMap: {},\n selectedContent: [],\n maxHeight: props.maxHeight,\n mainContainerRestHeight: 0,\n selectedLanguage: {},\n selectedContentType,\n isCreateMode: isForcedLanguage && isForcedContentType && isForcedLocation,\n hasPermission: true,\n userBookmarksCount: null,\n userBookmarksItems: [],\n bookmarksRequiredCount: 0,\n bookmarksDuringLoadingCount: 0,\n bookmarked: {},\n canSelectContent: false,\n ...CONTENT_META_PREVIEW_BASE_STATE,\n };\n }\n\n componentDidMount() {\n this.props.loadContentTypes(this.props.restInfo, this.setContentTypesMap);\n\n if (!this._refContentContainer) {\n return null;\n }\n\n window.document.body.classList.add(CLASS_SCROLL_DISABLED);\n window.addEventListener('resize', this.updateMaxHeightState, false);\n\n this.initializeBookmarks();\n\n this.setState(() => ({\n maxHeight: this._refContentContainer.clientHeight,\n mainContainerRestHeight: this._refMainContainer.clientHeight - this._refContentContainer.clientHeight,\n }));\n }\n\n componentWillUnmount() {\n window.document.body.classList.remove(CLASS_SCROLL_DISABLED);\n window.removeEventListener('resize', this.updateMaxHeightState);\n }\n\n componentDidUpdate(prevProps, prevState) {\n const { contentMeta, isPreviewMetaReady } = this.state;\n\n if (!!contentMeta && contentMeta !== prevState.contentMeta && !isPreviewMetaReady) {\n const contentId = contentMeta.ContentInfo.Content._id;\n\n this.props.loadContentInfo(this.props.restInfo, contentId, this.updateContentMetaWithCurrentVersion.bind(this, contentId));\n }\n\n if (!this.props.multiple) {\n this.canSelectContent(contentMeta, this.setCanSelectContentState);\n }\n }\n\n /**\n * Updates the maxHeight state\n *\n * @method updateMaxHeightState\n * @memberof UniversalDiscoveryModule\n */\n updateMaxHeightState() {\n this.setState(() => ({\n maxHeight: this._refMainContainer.clientHeight - this.state.mainContainerRestHeight,\n }));\n }\n\n /**\n * Sets the can select content state.\n *\n * @method setCanSelectContentState\n * @param {Boolean} canSelectContent\n * @memberof UniversalDiscoveryModule\n */\n setCanSelectContentState(canSelectContent) {\n if (this.state.canSelectContent === canSelectContent) {\n return;\n }\n\n this.setState(() => ({ canSelectContent }));\n }\n\n /**\n * Loads first 10 user's bookmarks (or less if user doesn't have that many bookmarks).\n * Sets total count of user's bookmarks.\n *\n * @method initializeBookmarks\n * @memberof UniversalDiscoveryModule\n */\n initializeBookmarks() {\n const { restInfo } = this.props;\n const bookmarksLoaded = new Promise((resolve) => loadBookmarks(restInfo, 10, 0, resolve));\n\n bookmarksLoaded\n .then(({ BookmarkList }) =>\n this.setState(() => ({\n userBookmarksCount: BookmarkList.count,\n userBookmarksItems: BookmarkList.items,\n }))\n )\n .catch(showErrorNotification);\n }\n\n /**\n * Updates selected content item meta with a current version info object\n *\n * @method updateContentMetaWithCurrentVersion\n * @param {Number} contentId ID of content for which we fetched CurrentVersion\n * @param {Object} response\n */\n updateContentMetaWithCurrentVersion(contentId, response) {\n const { contentMeta } = this.state;\n\n if (!contentMeta || contentMeta.ContentInfo.Content._id !== contentId) {\n return;\n }\n\n const updatedContentMeta = deepClone(contentMeta);\n const currentVersion = response.View.Result.searchHits.searchHit[0].value.Content.CurrentVersion;\n\n updatedContentMeta.CurrentVersion = currentVersion;\n\n this.setState(() => ({ contentMeta: updatedContentMeta, isPreviewMetaReady: true }));\n }\n\n /**\n * Finds a content type data\n *\n * @method findContentType\n * @param {String} identifier\n * @returns {Object}\n */\n findContentType(identifier) {\n let contentType = null;\n\n Object.values(this.props.contentTypes).forEach((group) => {\n const result = group.find((contentType) => contentType.identifier === identifier);\n\n if (result) {\n contentType = result;\n }\n });\n\n return contentType;\n }\n\n /**\n * Handles selection confirm action\n *\n * @method handleConfirm\n */\n handleConfirm() {\n this.props.onConfirm(this.addContentTypeInfo(this.state.selectedContent));\n }\n\n handleSingleConfirm() {\n this.setState(\n (state) => ({ selectedContent: [state.contentMeta] }),\n () => this.props.onConfirm(this.addContentTypeInfo(this.state.selectedContent))\n );\n }\n\n /**\n * Handles create content action\n *\n * @method setCreateModeState\n */\n setCreateModeState() {\n this.setState(() => ({ isCreateMode: true }));\n }\n\n /**\n * Handles publish content action\n *\n * @method handlePublish\n * @param {Object} location\n */\n handlePublish(location) {\n this.props.onConfirm(this.addContentTypeInfo([location]));\n }\n\n /**\n * Adds a content type info to a content\n *\n * @method addContentTypeInfo\n * @param {Array} items\n * @returns {Array}\n */\n addContentTypeInfo(items) {\n const { contentTypesMap } = this.state;\n\n return items.map((item) => {\n const clonedItem = deepClone(item);\n const contentType = clonedItem.ContentInfo.Content.ContentType;\n\n clonedItem.ContentInfo.Content.ContentTypeInfo = contentTypesMap[contentType._href];\n\n return clonedItem;\n });\n }\n\n /**\n * Handles selected contet item removal action\n *\n * @method onItemRemove\n * @param {String} id\n */\n onItemRemove(id) {\n this.setState((state) => ({\n selectedContent: state.selectedContent.filter((item) => item.id !== id),\n }));\n }\n\n /**\n * Handles item selected action\n *\n * @method onItemSelect\n * @param {Object} contentMeta\n */\n onItemSelect(contentMeta) {\n this.setState(\n () => CONTENT_META_PREVIEW_BASE_STATE,\n () => {\n const isLocationAllowed =\n !this.props.cotfAllowedLocations.length || this.props.cotfAllowedLocations.includes(contentMeta.id);\n const contentMetaWithContentTypeInfo = this.addContentTypeInfo([contentMeta])[0];\n\n this.setState(() => ({\n contentMeta: contentMetaWithContentTypeInfo,\n isLocationAllowed,\n isPreviewMetaReady: false,\n }));\n }\n );\n }\n\n /**\n * Fires `ez-bookmark-change` event\n *\n * @method dispatchBookmarkChangeEvent\n * @param {Number} locationId\n * @param {Boolean} bookmarked\n */\n dispatchBookmarkChangeEvent(locationId, bookmarked) {\n const event = new CustomEvent('ez-bookmark-change', { detail: { bookmarked, locationId } });\n\n document.body.dispatchEvent(event);\n }\n\n /**\n * Sets loading status of bookmark\n *\n * @method setBookmarkLoadingStatus\n * @param {String} locationId\n * @param {Boolean} isLoading\n * @memberof UniversalDiscoveryModule\n */\n setBookmarkLoadingStatus(locationId, isLoading) {\n this.loadingBookmarksLocationsIds[locationId] = isLoading;\n }\n\n /**\n * Returns true if bookmark is loading, otherwise returns false\n *\n * @method isBookmarkLoading\n * @param {String} locationId\n * @memberof UniversalDiscoveryModule\n */\n isBookmarkLoading(locationId) {\n return !!this.loadingBookmarksLocationsIds[locationId];\n }\n\n /**\n * Checks whether location is already bookmarked\n *\n * @method fetchBookmarkStatus\n * @param {String} locationId\n * @memberof UniversalDiscoveryModule\n */\n fetchBookmarkStatus(locationId) {\n if (this.isBookmarkLoading(locationId)) {\n return;\n }\n\n this.setBookmarkLoadingStatus(locationId, true);\n\n const { restInfo } = this.props;\n const checked = new Promise((resolve) => checkIsBookmarked(restInfo, locationId, resolve));\n\n checked\n .then((isBookmarked) => {\n this.setIsBookmarked(locationId, isBookmarked);\n this.setBookmarkLoadingStatus(locationId, false);\n })\n .catch(showErrorNotification);\n }\n\n /**\n * Sets bookmark value in the state\n *\n * @method setIsBookmarked\n * @param {String} locationId\n * @param {Boolean} isBookmarked\n * @memberof ContentMetaPreviewComponent\n */\n setIsBookmarked(locationId, isBookmarked) {\n this.setState((state) => {\n const bookmarked = { ...state.bookmarked };\n\n bookmarked[locationId] = isBookmarked;\n\n return { bookmarked };\n });\n }\n\n /**\n * Removes or adds bookmark depending on if it exists or not\n *\n * @method toggleBookmark\n * @param {Object} location\n * @memberof UniversalDiscoveryModule\n */\n toggleBookmark(location) {\n const locationId = location.id;\n const isBookmarked = this.isBookmarked(locationId);\n\n if (this.isBookmarkLoading(locationId)) {\n return;\n }\n\n this.setBookmarkLoadingStatus(locationId, true);\n\n const { restInfo } = this.props;\n const toggleBookmark = isBookmarked ? removeBookmark : addBookmark;\n const onBookmarkToggled = isBookmarked ? this.onBookmarkRemoved : this.onBookmarkAdded;\n const bookmarkToggled = new Promise((resolve) => toggleBookmark(restInfo, locationId, resolve));\n\n bookmarkToggled\n .then(() => {\n onBookmarkToggled(location);\n this.setBookmarkLoadingStatus(locationId, false);\n })\n .catch(showErrorNotification);\n }\n\n /**\n * Returns\n *\n * @method isBookmarked\n * @param {String} locationId\n * @returns {Boolean}\n * @memberof UniversalDiscoveryModule\n */\n isBookmarked(locationId) {\n const { bookmarked } = this.state;\n const locationBookmarkChecked = locationId in bookmarked;\n\n if (!locationBookmarkChecked) {\n this.fetchBookmarkStatus(locationId);\n return null;\n }\n\n return bookmarked[locationId];\n }\n\n /**\n * Called on bookmarked removed\n *\n * @method onBookmarkRemoved\n * @param {Object} itemToRemoveLocation\n * @memberof UniversalDiscoveryModule\n */\n onBookmarkRemoved(itemToRemoveLocation) {\n this.setState(\n (state) => ({\n userBookmarksCount: state.userBookmarksCount - 1,\n userBookmarksItems: state.userBookmarksItems.filter((item) => !areSameLocations(item.Location, itemToRemoveLocation)),\n }),\n () => {\n this.setIsBookmarked(itemToRemoveLocation.id, false);\n\n const { activeTab } = this.state;\n\n if (activeTab === TAB_BOOKMARKS) {\n this.closeContentMetaPreview();\n }\n\n this.dispatchBookmarkChangeEvent(itemToRemoveLocation.id, false);\n }\n );\n }\n\n /**\n * Called on bookmarked added\n *\n * @method onBookmarkAdded\n * @param {Object} addedBookmarkLocation\n * @memberof UniversalDiscoveryModule\n */\n onBookmarkAdded(addedBookmarkLocation) {\n this.setState(\n (state) => ({\n userBookmarksCount: state.userBookmarksCount + 1,\n userBookmarksItems: [{ Location: addedBookmarkLocation }, ...state.userBookmarksItems],\n }),\n () => {\n this.setIsBookmarked(addedBookmarkLocation.id, true);\n this.dispatchBookmarkChangeEvent(addedBookmarkLocation.id, true);\n }\n );\n }\n\n /**\n * Called on bookmarks loaded\n *\n * @method onBookmarksLoaded\n * @param {Object} { BookmarksList }\n * @memberof UniversalDiscoveryModule\n */\n onBookmarksLoaded({ BookmarkList }) {\n const { items } = BookmarkList;\n\n this.setState(\n (state) => ({\n bookmarksDuringLoadingCount: state.bookmarksDuringLoadingCount - items.length,\n userBookmarksItems: [...items, ...state.userBookmarksItems],\n }),\n () => items.forEach((bookmarkLocation) => this.setIsBookmarked(bookmarkLocation.Location.id, true))\n );\n }\n\n /**\n * Loads bookmarks\n *\n * @method loadBookmarks\n * @param {Number} itemsToLoadCount\n * @memberof UniversalDiscoveryModule\n */\n loadBookmarks(itemsToLoadCount) {\n const { restInfo } = this.props;\n const offset = this.state.userBookmarksItems.length;\n const bookmarksLoaded = new Promise((resolve) => loadBookmarks(restInfo, itemsToLoadCount, offset, resolve));\n\n bookmarksLoaded.then(this.onBookmarksLoaded).catch(showErrorNotification);\n }\n\n /**\n * Ensures that enough bookmarks are loaded\n *\n * @method requireBookmarksCount\n * @param {String} locationId\n * @memberof UniversalDiscoveryModule\n */\n requireBookmarksCount(count) {\n this.setState((state) => {\n const { bookmarksRequiredCount, bookmarksDuringLoadingCount, userBookmarksItems } = state;\n const loadedBookmarksCount = userBookmarksItems.length;\n const newBookmarksRequiredCount = Math.max(count, bookmarksRequiredCount);\n const bookmarksToLoadCount = newBookmarksRequiredCount - loadedBookmarksCount - bookmarksDuringLoadingCount;\n\n if (!!bookmarksToLoadCount) {\n this.loadBookmarks(bookmarksToLoadCount);\n }\n\n return {\n bookmarksDuringLoadingCount: bookmarksDuringLoadingCount + bookmarksToLoadCount,\n bookmarksRequiredCount: newBookmarksRequiredCount,\n };\n });\n }\n\n /**\n * Updates language selected state\n *\n * @method onLanguageSelected\n * @param {String} selectedLanguage\n */\n onLanguageSelected(selectedLanguage) {\n this.setState(() => ({ selectedLanguage }));\n }\n\n /**\n * Updates selected content type state\n *\n * @method onContentTypeSelected\n * @param {Object} selectedContentType\n */\n onContentTypeSelected(selectedContentType) {\n this.setState(() => ({ selectedContentType }));\n }\n\n /**\n * Updates selected content state\n *\n * @method updateSelectedContent\n */\n updateSelectedContent(location) {\n const selectedContent = !this.props.multiple ? [location] : [...this.state.selectedContent, location];\n\n this.setState(() => ({ selectedContent }));\n }\n\n /**\n * Does checking whether a content can be selected\n *\n * @method canSelectContent\n * @param {Object} data\n * @param {Function} callback\n * @returns {Boolean}\n */\n canSelectContent(data, callback) {\n if (!data) {\n return callback(false);\n }\n\n const { selectedContent, contentTypesMap } = this.state;\n const isAlreadySelected = selectedContent.find((item) => item.ContentInfo.Content._id === data.ContentInfo.Content._id);\n const isOverLimit = !!this.props.selectedItemsLimit && selectedContent.length >= this.props.selectedItemsLimit;\n const contentTypeInfo = contentTypesMap[data.ContentInfo.Content.ContentType._href];\n const isAllowedContentType =\n !this.props.cotfAllowedContentTypes.length || this.props.cotfAllowedContentTypes.includes(contentTypeInfo.identifier);\n\n if (isAlreadySelected || isOverLimit || !isAllowedContentType) {\n return callback(false);\n }\n\n data.ContentInfo.Content.ContentTypeInfo = contentTypeInfo;\n\n return this.props.canSelectContent({ item: data, itemsCount: selectedContent.length }, callback);\n }\n\n /**\n * Toggles visible panel state\n *\n * @method togglePanel\n * @param {String} activeTab\n */\n togglePanel(activeTab) {\n this.setState(() => ({ activeTab, ...CONTENT_META_PREVIEW_BASE_STATE }));\n }\n\n /**\n * Closes CMP (Content Meta Preview)\n *\n * @method closeContentMetaPreview\n */\n closeContentMetaPreview() {\n this.setState(() => ({ ...CONTENT_META_PREVIEW_BASE_STATE }));\n }\n\n /**\n * Sets content types map state\n *\n * @method setContentTypesMap\n * @param {Object} response\n */\n setContentTypesMap(response) {\n if (!response || !response.ContentTypeInfoList) {\n return;\n }\n\n const contentTypesMap = response.ContentTypeInfoList.ContentType.reduce((total, item) => {\n total[item._href] = item;\n\n return total;\n }, {});\n\n this.setState(() => ({ contentTypesMap }));\n }\n\n /**\n * Renders content meta preview\n *\n * @method renderContentMetaPreview\n * @returns {Element}\n */\n renderContentMetaPreview() {\n if (!this.state.contentMeta) {\n return null;\n }\n\n const { contentTypesMap, maxHeight, activeTab, contentMeta, isPreviewMetaReady } = this.state;\n const { loadContentInfo, restInfo, languages } = this.props;\n const isContentBookmarked = this.isBookmarked(contentMeta.id);\n\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Renders selected content list\n *\n * @method renderSelectedContent\n * @returns {Element}\n */\n renderSelectedContent() {\n const items = this.state.selectedContent;\n const { selectedItemsLimit, multiple } = this.props;\n\n if (this.state.activeTab === TAB_CREATE || !multiple) {\n return null;\n }\n\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Gets a specific tab config\n *\n * @method getTabConfig\n * @param {String} id\n * @param {String} iconIdentifier\n * @returns {Object}\n */\n getTabConfig(id, iconIdentifier) {\n return {\n id,\n iconIdentifier: iconIdentifier ? iconIdentifier : id,\n title: this.tabsLabels[id],\n onClick: this.togglePanel,\n isSelected: this.state.activeTab === id,\n };\n }\n\n /**\n * Renders tabs\n *\n * @method renderTabs\n * @returns {Element}\n */\n renderTabs() {\n const { extraTabs, visibleTabs, onlyContentOnTheFly } = this.props;\n\n const browseTabConfig = this.getTabConfig(TAB_BROWSE);\n const searchTabConfig = this.getTabConfig(TAB_SEARCH);\n const createTabConfig = this.getTabConfig(TAB_CREATE);\n const bookmarksTabConfig = this.getTabConfig(TAB_BOOKMARKS, 'bookmark');\n\n let tabsToRender = [browseTabConfig, searchTabConfig, createTabConfig, bookmarksTabConfig, ...extraTabs];\n\n // @Deprecated - `onlyContentOnTheFly` will be removed in 2.0\n if (visibleTabs.length === 1 || onlyContentOnTheFly) {\n return null;\n }\n\n if (visibleTabs.length) {\n tabsToRender = visibleTabs.map((tab) => {\n return tabsToRender.find((config) => config.id === tab);\n });\n }\n\n return ;\n }\n\n /**\n * Renders a single tabs\n *\n * @method renderSingleTab\n * @param {Object} tab\n * @returns {Element}\n */\n renderSingleTab(tab) {\n const attrs = { id: tab.id, title: tab.title, onClick: this.togglePanel, isSelected: this.state.activeTab === tab.id };\n\n if (tab.iconIdentifier) {\n attrs.iconIdentifier = tab.iconIdentifier;\n }\n\n return ;\n }\n\n /**\n * Renders panels\n *\n * @method renderPanels\n * @returns {Element}\n */\n renderPanels() {\n const {\n extraTabs,\n visibleTabs,\n sortFieldMappings,\n sortOrderMappings,\n languages,\n contentTypes,\n cotfPreselectedContentType,\n cotfForcedLanguage,\n cotfAllowedLanguages,\n cotfPreselectedLanguage,\n cotfAllowedContentTypes,\n cotfPreselectedLocation,\n cotfAllowedLocations,\n onlyContentOnTheFly,\n } = this.props;\n const { userBookmarksItems, userBookmarksCount, contentTypesMap } = this.state;\n const browsePanelConfig = { id: TAB_BROWSE, panel: FinderPanelComponent, attrs: { sortFieldMappings, sortOrderMappings } };\n const searchPanelConfig = { id: TAB_SEARCH, panel: SearchPanelComponent };\n const bookmarksPanelConfig = {\n id: TAB_BOOKMARKS,\n panel: BookmarksPanelComponent,\n attrs: { userBookmarksItems, userBookmarksCount, requireBookmarksCount: this.requireBookmarksCount },\n };\n const createPanelConfig = {\n id: TAB_CREATE,\n panel: CreatePanelComponent,\n attrs: {\n languages,\n contentTypes,\n onLanguageSelected: this.onLanguageSelected,\n onContentTypeSelected: this.onContentTypeSelected,\n contentTypesMap: this.state.contentTypesMap,\n forcedLanguage: cotfForcedLanguage,\n preselectedLanguage: cotfPreselectedLanguage,\n allowedLanguages: cotfAllowedLanguages,\n preselectedContentType: cotfPreselectedContentType,\n allowedContentTypes: cotfAllowedContentTypes,\n preselectedLocation: cotfPreselectedLocation,\n allowedLocations: cotfAllowedLocations,\n sortFieldMappings,\n sortOrderMappings,\n },\n };\n let panelsToRender = [browsePanelConfig, searchPanelConfig, createPanelConfig, bookmarksPanelConfig, ...extraTabs];\n\n if (!Object.keys(contentTypesMap).length) {\n return null;\n }\n\n if (onlyContentOnTheFly) {\n console.warn('[DEPRECATED] onlyContentOnTheFly parameter is deprecated');\n console.warn('[DEPRECATED] it will be removed from ezplatform-admin-ui-modules 2.0');\n console.warn('[DEPRECATED] use visibleTabs instead');\n\n return
    {this.renderSinglePanel(createPanelConfig)}
    ;\n }\n\n if (visibleTabs.length) {\n panelsToRender = visibleTabs.map((tab) => panelsToRender.find((config) => config.id === tab));\n }\n\n return
    {panelsToRender.map(this.renderSinglePanel)}
    ;\n }\n\n /**\n * Renders a single panel\n *\n * @method renderSinglePanel\n * @param {Object} item\n * @returns {Element}\n */\n renderSinglePanel(item) {\n const Panel = item.panel;\n const {\n startingLocationId,\n findLocationsByParentLocationId,\n findContentBySearchQuery,\n multiple,\n searchResultsPerPage,\n bookmarksPerPage,\n restInfo,\n allowContainersOnly,\n } = this.props;\n\n const { activeTab, maxHeight, contentTypesMap, selectedContent } = this.state;\n const isVisible = activeTab === item.id;\n\n if (!isVisible) {\n return null;\n }\n\n const attrs = {\n isVisible,\n onItemSelect: this.onItemSelect,\n maxHeight: maxHeight - 32,\n id: item.id,\n allowContainersOnly,\n startingLocationId,\n findLocationsByParentLocationId,\n findContentBySearchQuery,\n contentTypesMap,\n multiple,\n searchResultsPerPage,\n bookmarksPerPage,\n restInfo,\n selectedContent,\n onSelectContent: this.updateSelectedContent,\n canSelectContent: this.canSelectContent,\n onItemRemove: this.onItemRemove,\n ...item.attrs,\n };\n\n return ;\n }\n\n /**\n * Renders a confirm button\n *\n * @method renderConfirmBtn\n * @returns {Element}\n */\n renderConfirmBtn() {\n const { activeTab, selectedContent, canSelectContent, isPreviewMetaReady } = this.state;\n const { multiple } = this.props;\n const onClick = multiple ? this.handleConfirm : this.handleSingleConfirm;\n const attrs = {\n className: 'm-ud__action m-ud__action--confirm',\n type: 'button',\n onClick,\n };\n\n if (activeTab === TAB_CREATE) {\n return null;\n }\n\n if ((multiple && !selectedContent.length) || (!multiple && (!isPreviewMetaReady || !canSelectContent))) {\n attrs.disabled = true;\n attrs.title = 'The Content Type is not allowed for selection';\n }\n\n const confirmBtnLabel = Translator.trans(/*@Desc(\"Confirm\")*/ 'confirm.label', {}, 'universal_discovery_widget');\n\n return ;\n }\n\n /**\n * Does a permission checking\n *\n * @method renderSinglePanel\n * @param {Object} item\n * @returns {Element}\n */\n checkPermission() {\n checkCreatePermission(\n {\n token: this.props.restInfo.token,\n contentTypeIdentifier: this.state.selectedContentType.identifier,\n languageCode: this.state.selectedLanguage.languageCode,\n locationId: this.state.contentMeta.id,\n },\n this.updatePermissionsState\n );\n }\n\n /**\n * Updates a permission state\n *\n * @method updatePermissionsState\n * @param {Object} response\n */\n updatePermissionsState(response) {\n this.setState(() => ({ hasPermission: response.access }));\n }\n\n /**\n * Renders a create content button\n *\n * @method renderCreateBtn\n * @returns {Element}\n */\n renderCreateBtn() {\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType.identifier && this.state.contentMeta;\n const attrs = {\n type: 'button',\n className: 'm-ud__action m-ud__action--create-content',\n onClick: this.setCreateModeState,\n disabled: !this.state.hasPermission || !isDataSelected || !this.state.isLocationAllowed,\n };\n\n if (this.state.activeTab !== TAB_CREATE) {\n return null;\n }\n\n if (isDataSelected) {\n this.checkPermission();\n }\n\n const createContentLabel = Translator.trans(\n /*@Desc(\"Create content\")*/ 'content_on_the_fly.create_content.label',\n {},\n 'universal_discovery_widget'\n );\n\n return ;\n }\n\n /**\n * Renders permission error\n *\n * @method renderPermissionError\n * @returns {Element}\n */\n renderPermissionError() {\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType && this.state.contentMeta;\n\n if (this.state.hasPermission || !isDataSelected) {\n return null;\n }\n\n const noPermissionMessage = Translator.trans(\n /*@Desc(\"Sorry, but you don't have permission for this action. Please contact your site Admin.\")*/ 'content_on_the_fly.no_permission.message',\n {},\n 'universal_discovery_widget'\n );\n\n return {noPermissionMessage};\n }\n\n /**\n * Renders not allowed location error\n *\n * @method renderNotAllowedLocationError\n * @returns {Element}\n */\n renderNotAllowedLocationError() {\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType && this.state.contentMeta;\n\n if (this.state.isLocationAllowed || !isDataSelected || this.state.activeTab !== TAB_CREATE) {\n return null;\n }\n\n const locationNotAllowedMessage = Translator.trans(\n /*@Desc(\"Sorry, but this location is not selectable.\")*/ 'content_on_the_fly.location_not_allowed.message',\n {},\n 'universal_discovery_widget'\n );\n\n return {locationNotAllowedMessage};\n }\n\n setMainContainerRef(ref) {\n this._refMainContainer = ref;\n }\n\n setContentContainerRef(ref) {\n this._refContentContainer = ref;\n }\n\n render() {\n const componentClassName = 'm-ud';\n const metaPreviewClassName = !!this.state.contentMeta ? `${componentClassName}--with-preview` : '';\n const selectedContentClassName = this.state.selectedContent.length ? `${componentClassName}--with-selected-content` : '';\n const containerClassName = `${componentClassName} ${selectedContentClassName} ${metaPreviewClassName}`;\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType.identifier && this.state.contentMeta;\n\n if (this.state.isCreateMode && this.state.activeTab === TAB_CREATE && isDataSelected && this.state.hasPermission) {\n return (\n \n );\n }\n\n const cancelBtnLabel = Translator.trans(/*@Desc(\"Cancel\")*/ 'cancel.label', {}, 'universal_discovery_widget');\n\n return (\n
    \n
    \n

    {this.props.title}

    \n
    \n {this.renderTabs()}\n
    \n {this.renderPanels()}\n {this.renderContentMetaPreview()}\n
    \n
    \n {this.renderSelectedContent()}\n
    \n {this.renderPermissionError()}\n {this.renderNotAllowedLocationError()}\n \n {this.renderConfirmBtn()}\n {this.renderCreateBtn()}\n
    \n
    \n
    \n
    \n
    \n );\n }\n}\n\neZ.addConfig('modules.UniversalDiscovery', UniversalDiscoveryModule);\n\nUniversalDiscoveryModule.propTypes = {\n onConfirm: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n title: PropTypes.string,\n multiple: PropTypes.bool,\n activeTab: PropTypes.string,\n loadContentInfo: PropTypes.func,\n loadContentTypes: PropTypes.func,\n canSelectContent: PropTypes.func,\n selectedItemsLimit: PropTypes.number,\n startingLocationId: PropTypes.number,\n findContentBySearchQuery: PropTypes.func,\n findLocationsByParentLocationId: PropTypes.func,\n extraTabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n panel: PropTypes.func.isRequired,\n attrs: PropTypes.object,\n })\n ),\n maxHeight: PropTypes.number,\n searchResultsPerPage: PropTypes.number,\n bookmarksPerPage: PropTypes.number,\n languages: PropTypes.object,\n contentTypes: PropTypes.object,\n allowContainersOnly: PropTypes.bool.isRequired,\n\n // @Deprecated - to be removed in 2.0\n onlyContentOnTheFly: PropTypes.bool,\n // @Deprecated - to be removed in 2.0\n cotfForcedLanguage: PropTypes.string,\n\n cotfPreselectedLanguage: PropTypes.string,\n cotfAllowedLanguages: PropTypes.array,\n cotfPreselectedContentType: PropTypes.string,\n cotfAllowedContentTypes: PropTypes.array,\n cotfPreselectedLocation: PropTypes.number,\n cotfAllowedLocations: PropTypes.array,\n visibleTabs: PropTypes.array,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n};\n\nUniversalDiscoveryModule.defaultProps = {\n title: 'Find content',\n multiple: true,\n selectedItemsLimit: 0,\n activeTab: TAB_BROWSE,\n loadContentInfo,\n loadContentTypes,\n findContentBySearchQuery,\n findLocationsByParentLocationId,\n canSelectContent: (item, callback) => callback(true),\n extraTabs: window.eZ.adminUiConfig.universalDiscoveryWidget.extraTabs || [],\n startingLocationId: 1,\n maxHeight: 500,\n searchResultsPerPage: 10,\n bookmarksPerPage: 10,\n languages: window.eZ.adminUiConfig.languages,\n contentTypes: window.eZ.adminUiConfig.contentTypes,\n allowContainersOnly: false,\n onlyContentOnTheFly: false,\n cotfForcedLanguage: '',\n cotfPreselectedLanguage: '',\n cotfAllowedLanguages: [],\n cotfPreselectedContentType: '',\n cotfAllowedContentTypes: [],\n cotfPreselectedLocation: null,\n cotfAllowedLocations: [],\n visibleTabs: [],\n sortFieldMappings: window.eZ.adminUiConfig.sortFieldMappings,\n sortOrderMappings: window.eZ.adminUiConfig.sortOrderMappings,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/universal.discovery.module.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst TabNavItemComponent = (props) => {\n const attrs = {\n type: 'button',\n className: `c-tab-nav-item ${props.isSelected ? 'c-tab-nav-item--selected' : ''}`,\n onClick: () => props.onClick(props.id),\n };\n\n return (\n
    \n \n
    \n );\n};\n\nTabNavItemComponent.propTypes = {\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n isSelected: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n iconIdentifier: PropTypes.string.isRequired,\n};\n\nexport default TabNavItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-nav/tab.nav.item.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport FinderComponent from '../finder/finder.component';\n\nconst FinderPanelComponent = (props) => {\n const wrapperAttrs = { className: 'c-finder-panel' };\n\n if (!props.isVisible) {\n wrapperAttrs.hidden = true;\n }\n\n return (\n
    \n \n \n \n
    \n );\n};\n\nFinderPanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n startingLocationId: PropTypes.number.isRequired,\n findLocationsByParentLocationId: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n allowContainersOnly: PropTypes.bool.isRequired,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\nexport default FinderPanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/finder.panel.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport FinderTreeLeafComponent from './finder.tree.leaf.component';\n\nexport default class FinderTreeBranchComponent extends Component {\n constructor(props) {\n super(props);\n\n this.expandBranch = this.expandBranch.bind(this);\n this.onLoadMore = this.onLoadMore.bind(this);\n this.removeLoadingStateFromItem = this.removeLoadingStateFromItem.bind(this);\n this.updateSelectedLocations = this.updateSelectedLocations.bind(this);\n this.renderLeaf = this.renderLeaf.bind(this);\n\n this.state = {\n currentlyLoadingLocationId: false,\n selectedLocationId: null,\n };\n }\n\n /**\n * Updates selected locations state\n *\n * @method updateSelectedLocations\n * @param {Object} location location struct\n * @memberof FinderTreeBranchComponent\n */\n updateSelectedLocations(location) {\n this.setState(\n () => ({ currentlyLoadingLocationId: location.id, selectedLocationId: location.id }),\n () =>\n this.props.onItemClick({\n parent: location.id,\n location,\n onDataLoaded: this.removeLoadingStateFromItem,\n })\n );\n }\n\n removeLoadingStateFromItem() {\n this.setState(() => ({ currentlyLoadingLocationId: false }));\n }\n\n expandBranch() {\n this.props.onBranchClick(this.props.parentLocation);\n }\n\n /**\n * Renders leaf (the single content item)\n *\n * @method renderLeaf\n * @param {Object} data location response\n * @returns {Element}\n * @memberof FinderTreeBranchComponent\n */\n renderLeaf(data) {\n const location = data.value.Location;\n const isLoadingChildren = location.id === this.state.currentlyLoadingLocationId;\n const contentTypesMap = this.props.contentTypesMap;\n const contentTypeHref = location.ContentInfo.Content.ContentType._href;\n const isContainer = contentTypesMap && contentTypesMap[contentTypeHref] && contentTypesMap[contentTypeHref].isContainer;\n const isSelectable = !(this.props.allowContainersOnly && !isContainer);\n const selected = location.id === this.state.selectedLocationId;\n\n return (\n \n );\n }\n\n onLoadMore() {\n this.props.onLoadMore(this.props.parentLocation);\n }\n\n /**\n * Render load more button\n *\n * @method renderLoadMore\n * @returns {Element}\n * @memberof FinderTreeBranchComponent\n */\n renderLoadMore() {\n const { items, total } = this.props;\n\n if (!items.length || items.length === total) {\n return null;\n }\n\n const loadMoreLabel = Translator.trans(/*@Desc(\"Load more\")*/ 'finder.branch.load_more.label', {}, 'universal_discovery_widget');\n\n return (\n \n );\n }\n\n render() {\n const items = this.props.items;\n const attrs = {\n className: 'c-finder-tree-branch',\n style: { height: `${this.props.maxHeight}px` },\n };\n\n if (!items.length) {\n attrs.className = `${attrs.className} c-finder-tree-branch--collapsed`;\n attrs.onClick = this.expandBranch;\n }\n\n return (\n
    \n
    \n {this.props.items.map(this.renderLeaf)}\n {this.renderLoadMore()}\n
    \n
    \n );\n }\n}\n\nFinderTreeBranchComponent.propTypes = {\n items: PropTypes.array.isRequired,\n total: PropTypes.number.isRequired,\n parentLocation: PropTypes.object,\n onItemClick: PropTypes.func.isRequired,\n onBranchClick: PropTypes.func.isRequired,\n selectedLocations: PropTypes.array.isRequired,\n onLoadMore: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n allowContainersOnly: PropTypes.bool,\n contentTypesMap: PropTypes.object,\n allowedLocations: PropTypes.array.isRequired,\n multiple: PropTypes.bool.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/finder/finder.tree.branch.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport SelectContentButtonComponent from '../select-content-button/select.content.button.component';\nimport Icon from '../../../common/icon/icon';\n\nexport default class FinderTreeLeafComponent extends Component {\n constructor(props) {\n super(props);\n\n this.handleClick = this.handleClick.bind(this);\n }\n\n /**\n * Handles clicks on a leaf\n *\n * @method handleClick\n * @memberof FinderTreeLeafComponent\n */\n handleClick(event) {\n const { location, isSelectable, onClick } = this.props;\n\n if (!isSelectable || event.target.closest('.c-finder-tree-leaf__btn--toggle-selection')) {\n return;\n }\n\n onClick(location);\n }\n\n getContentTypeIdentifier() {\n const { contentTypesMap, location } = this.props;\n const contentTypeHref = location.ContentInfo.Content.ContentType._href;\n const contentType = contentTypesMap ? contentTypesMap[contentTypeHref] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n\n return contentTypeIdentifier;\n }\n\n /**\n * Renders an icon of a content type\n *\n * @method renderIcon\n * @returns {JSX.Element|null}\n */\n renderIcon() {\n const contentTypeIdentifier = this.getContentTypeIdentifier();\n\n if (!contentTypeIdentifier) {\n return null;\n }\n\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n let extraClasses = 'ez-icon--small';\n\n if (this.props.selected) {\n extraClasses = `${extraClasses} ez-icon--light`;\n }\n\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Renders a loading state icon\n *\n * @method renderLoadingIcon\n * @returns {JSX.Element|null}\n * @memberof FinderTreeLeafComponent\n */\n renderLoadingIcon() {\n if (!this.props.selected || !this.props.isLoadingChildren) {\n return null;\n }\n\n return ;\n }\n\n renderSelectContentBtn() {\n const {\n isSelectable,\n multiple,\n selectedContent,\n location,\n onSelectContent,\n onItemRemove,\n canSelectContent,\n isLoadingChildren,\n } = this.props;\n\n if (!isSelectable || isLoadingChildren || !multiple) {\n return null;\n }\n\n return (\n content.id === location.id)}\n location={location}\n onSelectContent={onSelectContent}\n onItemRemove={onItemRemove}\n canSelectContent={canSelectContent}\n />\n );\n }\n\n render() {\n const { location, selected, isSelectable, isLoadingChildren, allowedLocations } = this.props;\n const isForcedLocation = allowedLocations.length === 1;\n const componentClassName = 'c-finder-tree-leaf';\n const isSelectedClassName = selected ? `${componentClassName}--selected` : '';\n const isNotSelectableClassName = !isSelectable || isForcedLocation ? `${componentClassName}--not-selectable` : '';\n const hasChildrenClassName = location.childCount ? `${componentClassName}--has-children` : '';\n const isLoadingChildrenClassName = isLoadingChildren ? `${componentClassName}--loading` : '';\n const attrs = {\n className: [\n componentClassName,\n isSelectedClassName,\n hasChildrenClassName,\n isLoadingChildrenClassName,\n isNotSelectableClassName,\n ].join(' '),\n };\n\n if (!isForcedLocation) {\n attrs.onClick = this.handleClick;\n }\n\n return (\n
    \n {this.renderIcon()}\n {location.ContentInfo.Content.Name}\n {this.renderLoadingIcon()}\n {this.renderSelectContentBtn()}\n
    \n );\n }\n}\n\nFinderTreeLeafComponent.propTypes = {\n location: PropTypes.object.isRequired,\n onClick: PropTypes.func.isRequired,\n selected: PropTypes.bool.isRequired,\n isLoadingChildren: PropTypes.bool.isRequired,\n isSelectable: PropTypes.bool.isRequired,\n allowedLocations: PropTypes.array.isRequired,\n multiple: PropTypes.bool.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/finder/finder.tree.leaf.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport SearchComponent from '../search/search.component';\n\nconst SearchPanelComponent = (props) => {\n const wrapperAttrs = { className: 'c-search-panel' };\n const {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n searchResultsPerPage,\n restInfo,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n } = props;\n const searchAttrs = Object.assign(\n {},\n {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n searchResultsPerPage,\n restInfo,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n }\n );\n\n if (!props.isVisible) {\n wrapperAttrs.hidden = true;\n }\n\n return (\n
    \n \n \n \n
    \n );\n};\n\nSearchPanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n findContentBySearchQuery: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n searchResultsPerPage: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\nexport default SearchPanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/search.panel.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\nimport ContentTableComponent from '../content-table/content.table.component';\n\nexport default class SearchComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n items: [],\n isSearching: false,\n submitDisabled: true,\n };\n\n this.updateItemsState = this.updateItemsState.bind(this);\n this.searchContent = this.searchContent.bind(this);\n this.onRequireItemsCount = this.onRequireItemsCount.bind(this);\n this.toggleSubmitButtonState = this.toggleSubmitButtonState.bind(this);\n this.setSearchInputRef = this.setSearchInputRef.bind(this);\n }\n\n /**\n * Searches content by a query\n *\n * @method searchContent\n * @param {Event} event\n * @memberof SearchComponent\n */\n searchContent(event) {\n const isClickEvent = event.nativeEvent.type === 'click';\n const isEnterKeyEvent = event.nativeEvent.type === 'keyup' && event.nativeEvent.keyCode === 13;\n\n if (this.state.submitDisabled || (!isClickEvent && !isEnterKeyEvent)) {\n return;\n }\n\n this.setState(\n () => ({ isSearching: true }),\n () => {\n const promise = new Promise((resolve) =>\n this.props.findContentBySearchQuery(this.props.restInfo, this._refSearchInput.value, resolve)\n );\n\n promise\n .then(this.updateItemsState)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot find content'));\n }\n );\n }\n\n /**\n * Updates items state with search results\n *\n * @param {Object} response content query REST endpoint response\n * @memberof SearchComponent\n */\n updateItemsState(response) {\n this.setState(() => ({\n items: response.View.Result.searchHits.searchHit.map((item) => item.value),\n isSearching: false,\n }));\n }\n\n /**\n * Checks whether a requested amount items fits the actual number of items.\n *\n * @method onRequireItemsCount\n * @param {Number} count\n */\n onRequireItemsCount(count) {\n const { items } = this.state;\n\n if (count > items.length) {\n throw new Error('All items loaded.');\n }\n }\n\n /**\n * Renders the submit button\n *\n * @method renderSubmitBtn\n */\n renderSubmitBtn() {\n const btnAttrs = { className: 'c-search__submit', type: 'button' };\n let svgExtraClasses = 'ez-icon--small ez-icon--light';\n const btnLabel = Translator.trans(/*@Desc(\"Search\")*/ 'search.submit.label', {}, 'universal_discovery_widget');\n let iconIdentifier = 'search';\n\n if (this.state.isSearching) {\n btnAttrs.className = `${btnAttrs.className} c-search__submit--loading`;\n btnAttrs.disabled = true;\n svgExtraClasses = `${svgExtraClasses} ez-spin ez-icon-x2 ez-icon-spinner`;\n iconIdentifier = 'spinner';\n } else if (this.state.submitDisabled) {\n btnAttrs.disabled = true;\n } else {\n btnAttrs.onClick = this.searchContent;\n }\n\n return (\n \n );\n }\n\n /**\n * Toggles the submit button state.\n * Disables it when the search query is empty.\n *\n * @method toggleSubmitButtonState\n */\n toggleSubmitButtonState() {\n this.setState(() => ({ submitDisabled: !this._refSearchInput.value.trim().length }));\n }\n\n /**\n * Set a reference to the search input HTMLElement node\n *\n * @method setSearchInputRef\n * @param {HTMLElement} ref\n */\n setSearchInputRef(ref) {\n this._refSearchInput = ref;\n }\n\n render() {\n const {\n onItemSelect,\n searchResultsPerPage,\n contentTypesMap,\n maxHeight,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n multiple,\n } = this.props;\n const title = Translator.trans(/*@Desc(\"Search\")*/ 'search.title', {}, 'universal_discovery_widget');\n const tableTitle = Translator.trans(/*@Desc(\"Search results\")*/ 'search.content_table.title', {}, 'universal_discovery_widget');\n\n return (\n
    \n
    {title}:
    \n
    \n \n {this.renderSubmitBtn()}\n
    \n \n
    \n );\n }\n}\n\nSearchComponent.propTypes = {\n findContentBySearchQuery: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n searchResultsPerPage: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/search/search.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ContentTablePaginationComponent = (props) => {\n const { minIndex, activeIndex, maxIndex, onChange } = props;\n const btnFirstLabel = Translator.trans(/*@Desc(\"First\")*/ 'pagination.first', {}, 'universal_discovery_widget');\n const btnPrevLabel = Translator.trans(/*@Desc(\"Previous\")*/ 'pagination.prev', {}, 'universal_discovery_widget');\n const btnNextLabel = Translator.trans(/*@Desc(\"Next\")*/ 'pagination.next', {}, 'universal_discovery_widget');\n const btnLastLabel = Translator.trans(/*@Desc(\"Last\")*/ 'pagination.last', {}, 'universal_discovery_widget');\n const btnClass = 'c-content-table-pagination__btn';\n const firstAttrs = {\n type: 'button',\n onClick: () => onChange(minIndex),\n className: `${btnClass} ${btnClass}--first`,\n };\n const prevAttrs = {\n type: 'button',\n onClick: () => onChange(activeIndex - 1),\n className: `${btnClass} ${btnClass}--prev ${btnClass}--middle`,\n };\n const nextAttrs = {\n type: 'button',\n onClick: () => onChange(activeIndex + 1),\n className: `${btnClass} ${btnClass}--next ${btnClass}--middle`,\n };\n const lastAttrs = {\n type: 'button',\n onClick: () => onChange(maxIndex),\n className: `${btnClass} ${btnClass}--last`,\n };\n\n if (activeIndex === minIndex) {\n firstAttrs.disabled = true;\n prevAttrs.disabled = true;\n }\n\n if (activeIndex === maxIndex) {\n nextAttrs.disabled = true;\n lastAttrs.disabled = true;\n }\n\n return (\n
    \n \n \n \n \n
    \n );\n};\n\nContentTablePaginationComponent.propTypes = {\n minIndex: PropTypes.number.isRequired,\n maxIndex: PropTypes.number.isRequired,\n activeIndex: PropTypes.number.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n\nexport default ContentTablePaginationComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.pagination.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport SelectContentButtonComponent from '../select-content-button/select.content.button.component';\nimport Icon from '../../../common/icon/icon';\n\nconst ContentTableItemComponent = (props) => {\n const { onPreview, data, contentTypesMap, multiple, selectedContent, onSelectContent, onItemRemove, canSelectContent } = props;\n const notAvailableLabel = Translator.trans(/*@Desc(\"N/A\")*/ 'content_table.not_available.label', {}, 'universal_discovery_widget');\n const item = data.ContentInfo.Content;\n const contentType = contentTypesMap ? contentTypesMap[item.ContentType._href] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const contentTypeName = contentTypeIdentifier ? window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier] : notAvailableLabel;\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return (\n
    \n
    \n \n
    \n
    \n {item.Name}\n
    \n
    \n {contentTypeName}\n
    \n
    \n \n
    \n
    \n );\n};\n\nContentTableItemComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onPreview: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemClick: PropTypes.func,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\nexport default ContentTableItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.item.component.js","import React from 'react';\n\nconst ContentTableHeaderComponent = () => {\n const nameLabel = Translator.trans(/*@Desc(\"Name\")*/ 'content_table.header.name', {}, 'universal_discovery_widget');\n const typeLabel = Translator.trans(/*@Desc(\"Content Type\")*/ 'content_table.header.type', {}, 'universal_discovery_widget');\n\n return (\n
    \n
    \n
    {nameLabel}
    \n
    {typeLabel}
    \n
    \n
    \n );\n};\n\nexport default ContentTableHeaderComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.header.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport FinderComponent from '../finder/finder.component';\nimport CreateComponent from '../create/create.component';\n\nconst CreatePanelComponent = (props) => {\n const wrapperAttrs = { className: 'c-create-panel' };\n const maxHeight = props.maxHeight - 24;\n const componentProps = { ...props, maxHeight, allowContainersOnly: true };\n const finderProps = { ...componentProps, multiple: false };\n const chooseLanguageAndContentTypeTitle = Translator.trans(\n /*@Desc(\"Choose Language and Content Type\")*/ 'content_on_the_fly.choose_language_and_content_type.title',\n {},\n 'universal_discovery_widget'\n );\n const selectLocationTitle = Translator.trans(\n /*@Desc(\"Select Location\")*/ 'content_on_the_fly.select_location.title',\n {},\n 'universal_discovery_widget'\n );\n\n if (!props.isVisible) {\n wrapperAttrs.hidden = true;\n }\n\n return (\n
    \n \n
    \n
    1) {chooseLanguageAndContentTypeTitle}
    \n \n
    \n
    \n
    2) {selectLocationTitle}
    \n \n
    \n
    \n
    \n );\n};\n\nCreatePanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n startingLocationId: PropTypes.number.isRequired,\n findLocationsByParentLocationId: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n languages: PropTypes.object.isRequired,\n contentTypes: PropTypes.object.isRequired,\n onLanguageSelected: PropTypes.func.isRequired,\n onContentTypeSelected: PropTypes.func.isRequired,\n forcedLanguage: PropTypes.string.isRequired,\n preselectedLocation: PropTypes.number,\n allowedLocations: PropTypes.array.isRequired,\n allowedLanguages: PropTypes.array.isRequired,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n};\n\nexport default CreatePanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/create.panel.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ChooseLanguageComponent from './choose.language.component';\nimport ChooseContentTypeComponent from './choose.content.type.component';\n\nconst CreateComponent = (props) => {\n return (\n
    \n \n \n
    \n );\n};\n\nCreateComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n languages: PropTypes.object.isRequired,\n contentTypes: PropTypes.object.isRequired,\n onLanguageSelected: PropTypes.func.isRequired,\n onContentTypeSelected: PropTypes.func.isRequired,\n forcedLanguage: PropTypes.string.isRequired,\n allowedLanguages: PropTypes.array.isRequired,\n preselectedContentType: PropTypes.string,\n allowedContentTypes: PropTypes.array.isRequired,\n preselectedLanguage: PropTypes.string,\n};\n\nexport default CreateComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/create/create.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class ChooseLanguageComponent extends Component {\n constructor(props) {\n super(props);\n\n this.updateSelection = this.updateSelection.bind(this);\n this.renderOption = this.renderOption.bind(this);\n\n let selectedLanguageCode = props.allowedLanguages.length ? props.allowedLanguages[0] : props.languages.priority[0];\n\n if (props.preselectedLanguage) {\n selectedLanguageCode = props.preselectedLanguage;\n }\n\n if (props.forcedLanguage) {\n console.warn('[DEPRECATED] cotfForcedLanguage parameter is deprecated');\n console.warn('[DEPRECATED] it will be removed from ezplatform-admin-ui-modules 2.0');\n console.warn('[DEPRECATED] use cotfAllowedLanguages instead');\n\n selectedLanguageCode = props.forcedLanguage;\n }\n\n if (props.allowedLanguages.length === 1) {\n selectedLanguageCode = props.allowedLanguages[0];\n }\n\n this.state = {\n selectedLanguage: props.languages.mappings[selectedLanguageCode],\n };\n }\n\n componentDidMount() {\n this.props.onLanguageSelected(this.state.selectedLanguage);\n }\n\n updateSelection(event) {\n const languageCode = event.target.value;\n const selectedLanguage = this.props.languages.mappings[languageCode];\n\n this.props.onLanguageSelected(selectedLanguage);\n\n this.setState((state) => Object.assign({}, state, { selectedLanguage }));\n }\n\n renderOption(languageCode, index) {\n const language = this.props.languages.mappings[languageCode];\n const attrs = {\n key: index,\n value: language.languageCode,\n };\n\n if (this.state.selectedLanguage.languageCode === languageCode) {\n attrs.selected = true;\n }\n\n return ;\n }\n\n renderOptions() {\n const { allowedLanguages, languages } = this.props;\n const languagesList = allowedLanguages.length ? allowedLanguages : languages.priority;\n\n return languagesList.map(this.renderOption);\n }\n\n render() {\n const selectAttrs = {\n className: 'form-control',\n onChange: this.updateSelection,\n };\n const selectLanguageTitle = Translator.trans(\n /*@Desc(\"Select a language\")*/ 'content_on_the_fly.select_language.title',\n {},\n 'universal_discovery_widget'\n );\n\n if (this.props.forcedLanguage) {\n console.warn('[DEPRECATED] forcedLanguage parameter is deprecated');\n console.warn('[DEPRECATED] it will be removed from ezplatform-admin-ui-modules 2.0');\n console.warn('[DEPRECATED] use allowedLanguages instead');\n }\n\n // @Deprecated - `forcedLanguage` will be removed in 2.0\n if (this.props.allowedLanguages.length === 1 || this.props.forcedLanguage) {\n selectAttrs.disabled = true;\n }\n\n return (\n
    \n

    {selectLanguageTitle}

    \n
    \n \n
    \n
    \n );\n }\n}\n\nChooseLanguageComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n languages: PropTypes.object.isRequired,\n onLanguageSelected: PropTypes.func.isRequired,\n forcedLanguage: PropTypes.string.isRequired,\n allowedLanguages: PropTypes.array.isRequired,\n preselectedLanguage: PropTypes.string,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/create/choose.language.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class ChooseContentTypeComponent extends Component {\n constructor(props) {\n super(props);\n\n let selectedContentType = {};\n const { allowedContentTypes, preselectedContentType } = props;\n const isForcedContentType = allowedContentTypes.length === 1;\n const hasPreselectedAllowedContentType = !allowedContentTypes.length || allowedContentTypes.includes(props.preselectedContentType);\n const isPreselectedContentType = preselectedContentType && hasPreselectedAllowedContentType;\n\n this._filterTimeout = null;\n\n this.updateFilterQuery = this.updateFilterQuery.bind(this);\n this.renderGroup = this.renderGroup.bind(this);\n this.renderItem = this.renderItem.bind(this);\n\n if (isForcedContentType) {\n selectedContentType = this.findContentType(allowedContentTypes[0]);\n } else if (isPreselectedContentType) {\n selectedContentType = this.findContentType(preselectedContentType);\n }\n\n this.state = {\n selectedContentType,\n filterQuery: '',\n };\n }\n\n componentDidMount() {\n this.props.onContentTypeSelected(this.state.selectedContentType);\n }\n\n findContentType(identifier) {\n let contentType = null;\n\n Object.values(this.props.contentTypes).forEach((group) => {\n const result = group.find((contentType) => contentType.identifier === identifier);\n\n if (result) {\n contentType = result;\n }\n });\n\n return contentType;\n }\n\n updateSelectedItem(selectedContentType) {\n this.props.onContentTypeSelected(selectedContentType);\n\n this.setState((state) => Object.assign({}, state, { selectedContentType }));\n }\n\n updateFilterQuery(event) {\n const filterQuery = event.target.value.toLowerCase();\n\n window.clearTimeout(this._filterTimeout);\n\n this._filterTimeout = window.setTimeout(() => {\n this.setState((state) => Object.assign({}, state, { filterQuery }));\n }, 200);\n }\n\n renderItem(item, index) {\n const isNotSelectable = this.props.allowedContentTypes.length && !this.props.allowedContentTypes.includes(item.identifier);\n const attrs = {\n className: 'c-choose-content-type__group-item',\n key: index,\n };\n\n if (this.state.selectedContentType.identifier === item.identifier) {\n attrs.className = `${attrs.className} is-selected`;\n }\n\n if (isNotSelectable) {\n attrs.className = `${attrs.className} is-not-selectable`;\n }\n\n if (!isNotSelectable) {\n attrs.onClick = this.updateSelectedItem.bind(this, item);\n }\n\n if (this.state.filterQuery && !item.name.toLowerCase().includes(this.state.filterQuery)) {\n attrs.hidden = true;\n }\n\n return
    {item.name}
    ;\n }\n\n renderGroup(groupName, index) {\n const items = this.props.contentTypes[groupName];\n const groupAttrs = {};\n\n if (this.state.filterQuery && items.every((item) => !item.name.toLowerCase().includes(this.state.filterQuery))) {\n groupAttrs.hidden = true;\n }\n\n return (\n
    \n
    \n {groupName}\n
    \n {items.map(this.renderItem)}\n
    \n );\n }\n\n render() {\n const { maxHeight, contentTypes } = this.props;\n const selectContentTypeTitle = Translator.trans(\n /*@Desc(\"Select a Content Type\")*/ 'content_on_the_fly.select_a_content_type.title',\n {},\n 'universal_discovery_widget'\n );\n const typeToRefinePlaceholder = Translator.trans(\n /*@Desc(\"Type to refine\")*/ 'content_on_the_fly.type_to_refine.placeholder',\n {},\n 'universal_discovery_widget'\n );\n\n return (\n
    \n

    {selectContentTypeTitle}

    \n
    \n \n
    \n {Object.keys(contentTypes).map(this.renderGroup)}\n
    \n
    \n
    \n );\n }\n}\n\nChooseContentTypeComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n contentTypes: PropTypes.object.isRequired,\n onContentTypeSelected: PropTypes.func.isRequired,\n preselectedContentType: PropTypes.string,\n allowedContentTypes: PropTypes.array.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/create/choose.content.type.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport BookmarksComponent from '../bookmarks/bookmarks.component';\n\nexport default class BookmarksPanelComponent extends Component {\n getBookmarksAttrs() {\n const {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n bookmarksPerPage,\n restInfo,\n userBookmarksItems,\n userBookmarksCount,\n requireBookmarksCount,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n } = this.props;\n\n return {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n bookmarksPerPage,\n restInfo,\n userBookmarksItems,\n userBookmarksCount,\n requireBookmarksCount,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n };\n }\n\n getWrapperAttrs() {\n const { isVisible } = this.props;\n\n return {\n hidden: !isVisible,\n };\n }\n\n render() {\n const wrapperAttrs = this.getWrapperAttrs();\n const bookmarksAttrs = this.getBookmarksAttrs();\n\n return (\n
    \n \n \n \n
    \n );\n }\n}\n\nBookmarksPanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n findContentBySearchQuery: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n bookmarksPerPage: PropTypes.number.isRequired,\n userBookmarksItems: PropTypes.array,\n userBookmarksCount: PropTypes.number,\n requireBookmarksCount: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/bookmarks.panel.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nimport ContentTableComponent from '../content-table/content.table.component';\n\nexport default class BookmarksComponent extends Component {\n renderTable() {\n const { userBookmarksCount, userBookmarksItems } = this.props;\n\n if (userBookmarksCount === null) {\n return null;\n }\n\n const {\n onItemSelect,\n bookmarksPerPage,\n contentTypesMap,\n requireBookmarksCount,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n multiple,\n } = this.props;\n const noBookmarksMessage = Translator.trans(\n /*@Desc(\"No content items. Content items you bookmark will appear here.\")*/ 'bookmarks_table.no_bookmarks.message',\n {},\n 'universal_discovery_widget'\n );\n const tableTitle = Translator.trans(/*@Desc(\"Bookmarks\")*/ 'bookmarks_table.title', {}, 'universal_discovery_widget');\n\n return (\n \n );\n }\n\n renderSpinner() {\n const { userBookmarksCount } = this.props;\n\n if (userBookmarksCount === null) {\n return ;\n }\n }\n\n renderNoBookmarksInfo() {\n const { userBookmarksCount } = this.props;\n const noBookmarksMessage = Translator.trans(\n /*@Desc(\"No content items. Content items you bookmark will appear here.\")*/ 'bookmarks_table.no_bookmarks.message',\n {},\n 'universal_discovery_widget'\n );\n\n if (!userBookmarksCount) {\n return
    {noBookmarksMessage}
    ;\n }\n }\n\n render() {\n const { maxHeight } = this.props;\n\n return (\n
    \n {this.renderSpinner()}\n {this.renderNoBookmarksInfo()}\n {this.renderTable()}\n
    \n );\n }\n}\n\nBookmarksComponent.propTypes = {\n findContentBySearchQuery: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n bookmarksPerPage: PropTypes.number.isRequired,\n userBookmarksCount: PropTypes.number,\n userBookmarksItems: PropTypes.array,\n requireBookmarksCount: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/bookmarks/bookmarks.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nimport { loadLocation } from '../../services/universal.discovery.service';\n\nexport default class ContentCreatorComponent extends Component {\n constructor(props) {\n super(props);\n\n this.handleIframeLoad = this.handleIframeLoad.bind(this);\n this.handlePublish = this.handlePublish.bind(this);\n this.enablePublishBtn = this.enablePublishBtn.bind(this);\n this.disablePublishBtn = this.disablePublishBtn.bind(this);\n this.renderPublishBtn = this.renderPublishBtn.bind(this);\n\n this._refIframe = null;\n\n this.state = {\n iframeLoading: true,\n publishBtnDisabled: false,\n };\n }\n\n handlePublish() {\n this._refIframe.contentWindow.onbeforeunload = () => {};\n this._refIframe.contentWindow.document.body.querySelector('#ezrepoforms_content_edit_publish').click();\n }\n\n handleIframeLoad() {\n const iframeWindow = this._refIframe.contentWindow;\n const iframeDoc = iframeWindow.document;\n const locationId = iframeDoc.querySelector('meta[name=\"LocationID\"]');\n const iframeUrl = this.generateIframeUrl();\n\n if (iframeWindow.location.pathname !== iframeUrl && !locationId) {\n this._refIframe.setAttribute('src', iframeUrl);\n\n return;\n }\n\n if (locationId) {\n this.loadLocationInfo(locationId.content);\n } else {\n this.setState((state) => Object.assign({}, state, { iframeLoading: false }));\n\n iframeWindow.onbeforeunload = () => {\n return '';\n };\n iframeWindow.onunload = () => {\n this.setState((state) => Object.assign({}, state, { iframeLoading: true }));\n };\n }\n\n iframeDoc.body.addEventListener('fbFormBuilderLoaded', this.disablePublishBtn, false);\n iframeDoc.body.addEventListener('fbFormBuilderUnloaded', this.enablePublishBtn, false);\n }\n\n enablePublishBtn() {\n this.setState(() => ({ publishBtnDisabled: false }));\n }\n\n disablePublishBtn() {\n this.setState(() => ({ publishBtnDisabled: true }));\n }\n\n loadLocationInfo(locationId) {\n const { loadLocation, handlePublish, restInfo } = this.props;\n const promise = new Promise((resolve) => loadLocation(Object.assign({}, restInfo, { locationId }), resolve));\n\n promise.then((response) => {\n handlePublish(response.View.Result.searchHits.searchHit[0].value.Location);\n });\n }\n\n generateIframeUrl() {\n const { selectedLocationId, selectedLanguage, selectedContentType } = this.props;\n\n return window.Routing.generate('ezplatform.content_on_the_fly.create', {\n locationId: selectedLocationId,\n languageCode: selectedLanguage.languageCode,\n contentTypeIdentifier: selectedContentType.identifier,\n });\n }\n\n /**\n * Renders a loading state spinner\n *\n * @method renderLoadingSpinner\n * @returns {Element}\n * @memberof FinderTreeLeafComponent\n */\n renderLoadingSpinner() {\n if (!this.state.iframeLoading) {\n return null;\n }\n\n return ;\n }\n\n renderPublishBtn() {\n const publishLabel = Translator.trans(/*@Desc(\"Publish\")*/ 'content_on_the_fly.publish.label', {}, 'universal_discovery_widget');\n const attrs = {\n className: 'm-ud__action m-ud__action--publish',\n onClick: this.handlePublish,\n type: 'button',\n };\n\n if (this.state.publishBtnDisabled) {\n attrs.disabled = true;\n }\n\n return ;\n }\n\n render() {\n const { selectedContentType, selectedLanguage, maxHeight, onCancel } = this.props;\n const title = Translator.trans(\n /*@Desc(\"Creating - %contentType% in %language%\")*/ 'content_on_the_fly.creating_content.title',\n {\n contentType: selectedContentType.name,\n language: selectedLanguage.name,\n },\n 'universal_discovery_widget'\n );\n const cancelLabel = Translator.trans(/*@Desc(\"Cancel\")*/ 'cancel.label', {}, 'universal_discovery_widget');\n const iframeUrl = this.generateIframeUrl();\n const contentClass = this.state.iframeLoading ? 'm-ud__content is-loading' : 'm-ud__content';\n\n return (\n
    \n
    \n

    {title}

    \n
    \n
    \n {this.renderLoadingSpinner()}\n (this._refIframe = ref)}\n className=\"c-content-creator__iframe\"\n onLoad={this.handleIframeLoad}\n style={{ height: `${maxHeight + 32}px` }}\n />\n
    \n
    \n
    \n \n {this.renderPublishBtn()}\n
    \n
    \n
    \n
    \n
    \n );\n }\n}\n\nContentCreatorComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n selectedLanguage: PropTypes.object.isRequired,\n selectedContentType: PropTypes.object.isRequired,\n selectedLocationId: PropTypes.number.isRequired,\n onCancel: PropTypes.func.isRequired,\n handlePublish: PropTypes.func.isRequired,\n loadLocation: PropTypes.func,\n restInfo: PropTypes.object.isRequired,\n setMainContainerRef: PropTypes.func.isRequired,\n};\n\nContentCreatorComponent.defaultProps = {\n loadLocation,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-creator/content.creator.component.js","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\n\nimport SelectedContentItemComponent from './selected.content.item.component';\nimport SelectedContentPopupComponent from './selected.content.popup.component';\n\nexport default class SelectedContentComponent extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n isPopupVisible: false,\n };\n\n this.hidePopup = this.hidePopup.bind(this);\n this.togglePopup = this.togglePopup.bind(this);\n this.renderSelectedItem = this.renderSelectedItem.bind(this);\n }\n\n /**\n * Toggles popup visible state\n *\n * @method togglePopup\n * @memberof SelectedContentComponent\n */\n togglePopup() {\n this.setState((state, props) => ({ isPopupVisible: !state.isPopupVisible && !!props.items.length }));\n }\n\n /**\n * Hides popup\n *\n * @method hidePopup\n * @memberof SelectedContentComponent\n */\n hidePopup() {\n this.setState(() => ({ isPopupVisible: false }));\n }\n\n /**\n * Renders a selected content item\n *\n * @method renderSelectedItem\n * @param {Object} item\n * @returns {Element}\n * @memberof SelectedContentComponent\n */\n renderSelectedItem(item) {\n return (\n \n );\n }\n\n /**\n * Renders a limit information label\n *\n * @method renderLimitLabel\n * @returns {Element}\n * @memberof SelectedContentComponent\n */\n renderLimitLabel() {\n let limitLabel = '';\n\n if (this.props.itemsLimit && this.props.multiple) {\n const limitLabelText = Translator.trans(\n /*@Desc(\"Limit %items% max\")*/ 'select_content.limit.label',\n {\n items: this.props.itemsLimit,\n },\n 'universal_discovery_widget'\n );\n\n limitLabel = {limitLabelText};\n }\n\n return limitLabel;\n }\n\n /**\n * Renders selected items info\n *\n * @method renderSelectedItems\n * @returns {Element}\n * @memberof SelectedContentComponent\n */\n renderSelectedItems() {\n if (!this.props.items.length) {\n return null;\n }\n\n return (\n \n {this.props.items.map(this.renderSelectedItem)}\n \n );\n }\n\n /**\n * Gets component title\n *\n * @method getTitle\n * @returns {String}\n * @memberof SelectedContentComponent\n */\n getTitle() {\n let title = Translator.trans(/*@Desc(\"Confirmed items\")*/ 'select_content.confirmed_items.title', {}, 'universal_discovery_widget');\n const total = this.props.items.length;\n\n if (total) {\n title = `${title} (${total})`;\n }\n\n return title;\n }\n\n render() {\n const { items } = this.props;\n const titles = items.map((item) => item.ContentInfo.Content.Name).join(', ');\n const anyItemSelected = !!items.length;\n const cssClassOnAnyItemSelected = anyItemSelected ? 'c-selected-content__info--any-item-selected' : '';\n const infoCssClasses = `c-selected-content__info ${cssClassOnAnyItemSelected}`;\n const noConfirmedContentTitle = Translator.trans(\n /*@Desc(\"No confirmed content yet\")*/ 'select_content.no_confirmed_content.title',\n {},\n 'universal_discovery_widget'\n );\n\n return (\n
    \n {this.renderSelectedItems()}\n
    \n {this.getTitle()}\n {this.renderLimitLabel()}\n
    {titles.length ? titles : noConfirmedContentTitle}
    \n
    \n
    \n );\n }\n}\n\nSelectedContentComponent.propTypes = {\n items: PropTypes.array.isRequired,\n multiple: PropTypes.bool.isRequired,\n itemsLimit: PropTypes.number.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nSelectedContentComponent.defaultProps = {\n items: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/selected-content/selected.content.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst SelectedContentItemComponent = ({ data, onRemove }) => {\n const contentTypeInfo = data.ContentInfo.Content.ContentTypeInfo;\n const notAvailableLabel = Translator.trans(/*@Desc(\"N/A\")*/ 'select_content.not_available.label', {}, 'universal_discovery_widget');\n const contentTypeName = contentTypeInfo ? contentTypeInfo.names.value[0]['#text'] : notAvailableLabel;\n let icon;\n\n if (contentTypeInfo) {\n icon = ;\n }\n\n return (\n
    \n
    \n
    {data.ContentInfo.Content.Name}
    \n
    \n {icon} {contentTypeName}\n
    \n
    \n
    onRemove(data.id)} tabIndex=\"-1\">\n \n
    \n
    \n );\n};\n\nSelectedContentItemComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onRemove: PropTypes.func.isRequired,\n};\n\nexport default SelectedContentItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/selected-content/selected.content.item.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport PopupComponent from '../../../common/tooltip-popup/tooltip.popup.component';\n\nconst SelectedContentPopupComponent = (props) => {\n return (\n
    \n {props.children}\n
    \n );\n};\n\nSelectedContentPopupComponent.propTypes = {\n children: PropTypes.any.isRequired,\n};\n\nexport default SelectedContentPopupComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/selected-content/selected.content.popup.component.js","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nexport default class ContentMetaPreviewComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = { imageUri: '', translations: [] };\n\n this.toggleBookmark = this.toggleBookmark.bind(this);\n }\n\n /**\n * Renders an icon related to a content type\n *\n * @method renderIcon\n * @returns {JSX.Element|null}\n * @memberof ContentMetaPreviewComponent\n */\n renderIcon() {\n const contentTypeInfo = this.props.data.ContentInfo.Content.ContentTypeInfo;\n\n if (!contentTypeInfo) {\n return null;\n }\n\n const contentTypeIdentifier = contentTypeInfo.identifier;\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return ;\n }\n\n /**\n * Gets image URI to image preview from content meta\n *\n * @method getImageUri\n * @returns {String}\n * @memberof ContentMetaPreviewComponent\n */\n getImageUri(data) {\n if (!data || !data.CurrentVersion) {\n return '';\n }\n\n const version = data.CurrentVersion.Version;\n const imageField = version.Fields.field.find((field) => field.fieldTypeIdentifier === 'ezimage');\n\n return imageField && imageField.fieldValue ? imageField.fieldValue.uri : '';\n }\n\n /**\n * Gets list of translations from content meta\n *\n * @method getTranslations\n * @returns {Array}\n * @memberof ContentMetaPreviewComponent\n */\n getTranslations(data) {\n if (!data || !data.CurrentVersion) {\n return [];\n }\n\n const version = data.CurrentVersion.Version;\n const versionLanguages = version.VersionInfo.VersionTranslationInfo.Language;\n\n return versionLanguages.map((language) => this.props.languages.mappings[language.languageCode].name);\n }\n\n /**\n * Renders a translation item\n *\n * @method renderTranslation\n * @returns {Element}\n * @memberof ContentMetaPreviewComponent\n */\n renderTranslation(translation, index) {\n return (\n \n {translation}\n \n );\n }\n\n /**\n * Renders image preview\n *\n * @method renderImagePreview\n * @returns {Element}\n * @memberof ContentMetaPreviewComponent\n */\n renderImagePreview() {\n const { data } = this.props;\n\n if (!data.CurrentVersion) {\n return ;\n }\n\n const imageUri = this.getImageUri(data);\n const imagePreviewNotAvailableLabel = Translator.trans(\n /*@Desc(\"Content preview is not available\")*/ 'content_meta_preview.image_preview_not_available.info',\n {},\n 'universal_discovery_widget'\n );\n\n if (!imageUri.length) {\n return {imagePreviewNotAvailableLabel};\n }\n\n return \"\";\n }\n\n /**\n * Toggles bookmark\n *\n * @method toggleBookmark\n * @memberof ContentMetaPreviewComponent\n */\n toggleBookmark() {\n const { toggleBookmark, data } = this.props;\n\n toggleBookmark(data);\n }\n\n /**\n * Renders bookmark icon\n *\n * @method renderBookmarkIcon\n * @memberof ContentMetaPreviewComponent\n */\n renderBookmarkIcon() {\n const { isBookmarked } = this.props;\n\n const bookmarkIconId = isBookmarked ? 'bookmark-active' : 'bookmark';\n const action = isBookmarked ? 'remove' : 'add';\n const wrapperClassName = `ez-add-to-bookmarks__icon-wrapper ez-add-to-bookmarks__icon-wrapper--${action}`;\n\n return (\n
    \n \n
    \n );\n }\n\n render() {\n const { data, maxHeight } = this.props;\n const content = data.ContentInfo.Content;\n const contentTypeIdentifier = content.ContentTypeInfo.identifier;\n const contentTypeName = window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier];\n const { formatShortDateWithTimezone } = window.eZ.helpers.timezone;\n const translations = this.getTranslations(data);\n const title = Translator.trans(/*@Desc(\"Content Meta Preview\")*/ 'content_meta_preview.title', {}, 'universal_discovery_widget');\n const lastModifiedLabel = Translator.trans(\n /*@Desc(\"Last modified\")*/ 'content_meta_preview.last_modified.label',\n {},\n 'universal_discovery_widget'\n );\n const creationDateLabel = Translator.trans(\n /*@Desc(\"Creation date\")*/ 'content_meta_preview.creation_date.label',\n {},\n 'universal_discovery_widget'\n );\n const translationsLabel = Translator.trans(\n /*@Desc(\"Translations\")*/ 'content_meta_preview.translations.label',\n {},\n 'universal_discovery_widget'\n );\n\n return (\n
    \n

    {title}

    \n
    \n
    \n
    \n {this.renderIcon()} {contentTypeName}\n
    \n
    {this.renderBookmarkIcon()}
    \n
    \n
    \n
    {this.renderImagePreview()}
    \n
    {content.Name}
    \n
    \n

    {lastModifiedLabel}:

    \n {formatShortDateWithTimezone(new Date(content.lastModificationDate))}\n
    \n
    \n

    {creationDateLabel}:

    \n {formatShortDateWithTimezone(new Date(content.publishedDate))}\n
    \n
    \n

    {translationsLabel}:

    \n {translations.map(this.renderTranslation)}\n
    \n
    \n
    \n
    \n );\n }\n}\n\nContentMetaPreviewComponent.propTypes = {\n data: PropTypes.object.isRequired,\n isBookmarked: PropTypes.bool,\n toggleBookmark: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n maxHeight: PropTypes.number.isRequired,\n activeTab: PropTypes.string.isRequired,\n languages: PropTypes.object.isRequired,\n ready: PropTypes.bool.isRequired,\n};\n\nContentMetaPreviewComponent.defaultProps = {\n isBookmarked: null,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-meta-preview/content.meta.preview.component.js","import { showErrorNotification } from '../../common/services/notification.service';\nimport {\n getBasicRequestInit,\n handleRequestResponse,\n handleRequestError,\n handleRequestResponseStatus,\n} from '../../common/helpers/request.helper.js';\n\nconst ENDPOINT_BOOKMARK = '/api/ezp/v2/bookmark';\n\n/**\n * Loads bookmarks\n *\n * @function loadBookmarks\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {Function} callback\n */\nexport const loadBookmarks = (restInfo, limit, offset, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}?limit=${limit}&offset=${offset}`, {\n ...basicRequestInit,\n method: 'GET',\n headers: {\n ...basicRequestInit.headers,\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n },\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Adds bookmark\n *\n * @function addBookmark\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} locationId location id\n * @param {Function} callback\n */\nexport const addBookmark = (restInfo, locationId, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}/${locationId}`, {\n ...basicRequestInit,\n method: 'POST',\n });\n\n fetch(request)\n .then(handleRequestResponseStatus)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Removes bookmark\n *\n * @function removeBookmark\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} locationId location id\n * @param {Function} callback\n */\nexport const removeBookmark = (restInfo, locationId, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}/${locationId}`, {\n ...basicRequestInit,\n method: 'DELETE',\n });\n\n fetch(request)\n .then(handleRequestResponseStatus)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Checks if given location is bookmarked\n *\n * @function checkIsBookmarked\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} locationId location id\n * @param {Function} callback\n */\nexport const checkIsBookmarked = (restInfo, locationId, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}/${locationId}`, {\n ...basicRequestInit,\n method: 'HEAD',\n });\n const bookmarkedStatusCode = 200;\n const notBookmarkedStatusCode = 404;\n\n fetch(request)\n .then((response) => {\n const { status } = response;\n\n if (status === bookmarkedStatusCode || status === notBookmarkedStatusCode) {\n return status === bookmarkedStatusCode;\n }\n\n return handleRequestError(response);\n })\n .then(callback)\n .catch(showErrorNotification);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/services/bookmark.service.js","/**\n * Checks if are the same locations\n *\n * @function areSameLocations\n * @param {Object} location1\n * @param {Object} location2\n * @returns {Boolean}\n */\nexport const areSameLocations = (location1, location2) => location1.id === location2.id;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/compare.helper.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 9e3e3de79ce53e8fc1c1","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}","webpack:///./src/modules/common/icon/icon.js","webpack:///./src/modules/common/helpers/request.helper.js","webpack:///./src/modules/common/services/notification.service.js","webpack:///./src/modules/common/helpers/deep.clone.helper.js","webpack:///./src/modules/universal-discovery/components/tab-content/tab.content.panel.component.js","webpack:///./src/modules/universal-discovery/services/universal.discovery.service.js","webpack:///./src/modules/common/tooltip-popup/tooltip.popup.component.js","webpack:///./src/modules/universal-discovery/components/finder/finder.component.js","webpack:///./src/modules/universal-discovery/components/select-content-button/select.content.button.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.component.js","webpack:///./src/modules/universal-discovery/universal.discovery.module.js","webpack:///./src/modules/universal-discovery/components/tab-nav/tab.nav.item.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/finder.panel.component.js","webpack:///./src/modules/universal-discovery/components/finder/finder.tree.branch.component.js","webpack:///./src/modules/universal-discovery/components/finder/finder.tree.leaf.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/search.panel.component.js","webpack:///./src/modules/universal-discovery/components/search/search.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.pagination.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.item.component.js","webpack:///./src/modules/universal-discovery/components/content-table/content.table.header.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/create.panel.component.js","webpack:///./src/modules/universal-discovery/components/create/create.component.js","webpack:///./src/modules/universal-discovery/components/create/choose.language.component.js","webpack:///./src/modules/universal-discovery/components/create/choose.content.type.component.js","webpack:///./src/modules/universal-discovery/components/tab-content/bookmarks.panel.component.js","webpack:///./src/modules/universal-discovery/components/bookmarks/bookmarks.component.js","webpack:///./src/modules/universal-discovery/components/content-creator/content.creator.component.js","webpack:///./src/modules/universal-discovery/components/selected-content/selected.content.component.js","webpack:///./src/modules/universal-discovery/components/selected-content/selected.content.item.component.js","webpack:///./src/modules/universal-discovery/components/selected-content/selected.content.popup.component.js","webpack:///./src/modules/universal-discovery/components/content-meta-preview/content.meta.preview.component.js","webpack:///./src/modules/universal-discovery/services/bookmark.service.js","webpack:///./src/modules/common/helpers/compare.helper.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_1__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Icon","props","linkHref","customPath","className","extraClasses","_react2","default","createElement","xlinkHref","propTypes","PropTypes","string","isRequired","defaultProps","getBasicRequestInit","token","siteaccess","headers","X-Siteaccess","X-CSRF-Token","mode","credentials","handleRequestError","response","ok","Error","statusText","handleRequestResponse","json","handleRequestResponseStatus","status","NOTIFICATION_INFO_LABEL","NOTIFICATION_SUCCESS_LABEL","NOTIFICATION_WARNING_LABEL","NOTIFICATION_ERROR_LABEL","showNotification","detail","event","CustomEvent","document","body","dispatchEvent","showInfoNotification","message","label","showSuccessNotification","showWarningNotification","showErrorNotification","error","deepClone","data","clonedData","toString","apply","length","TabContentPanelComponent","attrs","id","isVisible","hidden","children","bool","node","_notification","_requestHelper","HEADERS_CREATE_VIEW","Accept","Content-Type","QUERY_LIMIT","loadPreselectedLocationData","startingLocationId","locationId","limit","callback","endpoint","window","Routing","generate","request","Request","fetch","then","catch","loadContentInfo","contentId","JSON","stringify","ViewInput","identifier","public","ContentQuery","Criteria","FacetBuilders","SortClauses","Filter","ContentIdCriterion","offset","method","assign","loadLocation","LocationQuery","LocationIdCriterion","checkCreatePermission","contentTypeIdentifier","languageCode","findLocationsByParentLocationId","parentLocationId","sortClauses","SectionIdentifier","ParentLocationIdCriterion","findContentBySearchQuery","query","Query","FullTextCriterion","loadContentTypes","TooltipPopupComponent","visible","title","onClick","onClose","tabIndex","_icon2","func","_react","_universalDiscovery","FinderComponent","Component","constructor","super","state","locationsMap","activeLocations","lastSelectedItem","appendMoreItems","bind","updateLocationsData","findLocationChildren","loadBranchLeaves","onLoadMore","renderBranch","setBranchContainerRef","setPreselectedState","preselectedItem","componentDidMount","isForcedLocation","allowedLocations","allowedIncludesPreselected","includes","preselectedLocation","isPreselectedLocation","loadPreselectedData","_extends","restInfo","componentDidUpdate","updateBranchesContainerScroll","UNSAFE_componentWillReceiveProps","nextProps","isShowingUp","setState","onItemSelect","Promise","resolve","createPreselectedLocationData","locations","Location","setPreselectedLocationData","subitems","createItem","parent","location","items","map","value","createData","count","totalCount","childCount","item","entries","forEach","key","parseInt","depth","_deepClone2","locationBranch","View","Result","searchHits","searchHit","[object Object]","keys","container","_refBranchesContainer","scrollLeft","scrollWidth","clientWidth","parentLocation","values","find","getLocationSortClauses","results","updateBranchActiveLocations","locationDepth","_props","sortFieldMappings","sortOrderMappings","sortField","sortOrder","onDataLoaded","updateSelectedBranches","updateActiveLocations","filter","reduce","total","selectedLocations","_finderTreeBranch2","onItemClick","onBranchClick","maxHeight","allowContainersOnly","contentTypesMap","multiple","selectedContent","onSelectContent","canSelectContent","onItemRemove","ref","render","style","number","shape","array","SelectContentButtonComponent","toggleEnabledState","handleSelect","handleUnselect","selectContentEnabled","checkCanSelectContent","stopPropagation","_props2","isSelected","iconId","type","onPreview","labels","contentTableItem","notAvailable","ContentTableComponent","perPage","activePage","pages","splitToPages","setActivePage","renderItem","UNSAFE_componentWillMount","ensurePageItemsLoaded","maxPage","Math","floor","index","pageIndex","push","requireItemsCount","_state","min","_contentTableItem2","renderHeader","_contentTableHeader2","renderPagination","_state2","pagesCount","paginationAttrs","minIndex","maxIndex","activeIndex","onChange","_contentTablePagination2","renderPageSpinner","renderPage","_state3","itemsCount","noItemsMessage","_bookmark","_compare","TAB_BROWSE","TAB_SEARCH","TAB_CREATE","TAB_BOOKMARKS","CLASS_SCROLL_DISABLED","CONTENT_META_PREVIEW_BASE_STATE","contentMeta","isPreviewMetaReady","isLocationAllowed","UniversalDiscoveryModule","selectedContentType","isForcedLanguage","cotfAllowedLanguages","cotfForcedLanguage","isForcedContentType","cotfAllowedContentTypes","cotfAllowedLocations","onLanguageSelected","onContentTypeSelected","handlePublish","togglePanel","setContentTypesMap","updateSelectedContent","renderSinglePanel","renderSingleTab","handleConfirm","handleSingleConfirm","setCreateModeState","updateContentMetaWithCurrentVersion","toggleBookmark","onBookmarkAdded","onBookmarkRemoved","setBookmarkLoadingStatus","requireBookmarksCount","onBookmarksLoaded","updatePermissionsState","setCanSelectContentState","updateMaxHeightState","setMainContainerRef","setContentContainerRef","loadingBookmarksLocationsIds","_refMainContainer","_refContentContainer","findContentType","tabsLabels","browse","Translator","trans","search","create","bookmarks","activeTab","mainContainerRestHeight","selectedLanguage","isCreateMode","hasPermission","userBookmarksCount","userBookmarksItems","bookmarksRequiredCount","bookmarksDuringLoadingCount","bookmarked","classList","add","addEventListener","initializeBookmarks","clientHeight","componentWillUnmount","remove","removeEventListener","prevProps","prevState","ContentInfo","Content","_id","loadBookmarks","BookmarkList","updatedContentMeta","currentVersion","CurrentVersion","contentType","contentTypes","group","result","onConfirm","addContentTypeInfo","clonedItem","ContentType","ContentTypeInfo","_href","contentMetaWithContentTypeInfo","dispatchBookmarkChangeEvent","isLoading","isBookmarkLoading","fetchBookmarkStatus","checkIsBookmarked","isBookmarked","setIsBookmarked","removeBookmark","addBookmark","onBookmarkToggled","itemToRemoveLocation","areSameLocations","closeContentMetaPreview","addedBookmarkLocation","bookmarkLocation","itemsToLoadCount","loadedBookmarksCount","newBookmarksRequiredCount","max","bookmarksToLoadCount","isAlreadySelected","isOverLimit","selectedItemsLimit","contentTypeInfo","isAllowedContentType","ContentTypeInfoList","renderContentMetaPreview","languages","isContentBookmarked","_contentMetaPreview2","ready","renderSelectedContent","_selectedContent2","itemsLimit","getTabConfig","iconIdentifier","renderTabs","_props3","extraTabs","visibleTabs","onlyContentOnTheFly","tabsToRender","tab","config","_tabNavItem2","renderPanels","_props4","cotfPreselectedContentType","cotfPreselectedLanguage","cotfPreselectedLocation","_state4","browsePanelConfig","panel","FinderPanelComponent","searchPanelConfig","SearchPanelComponent","bookmarksPanelConfig","BookmarksPanelComponent","createPanelConfig","CreatePanelComponent","forcedLanguage","preselectedLanguage","allowedLanguages","preselectedContentType","allowedContentTypes","panelsToRender","console","warn","Panel","_props5","searchResultsPerPage","bookmarksPerPage","_state5","renderConfirmBtn","_state6","disabled","confirmBtnLabel","checkPermission","access","renderCreateBtn","isDataSelected","createContentLabel","renderPermissionError","noPermissionMessage","renderNotAllowedLocationError","locationNotAllowedMessage","metaPreviewClassName","containerClassName","_contentCreator2","selectedLocationId","onCancel","cancelBtnLabel","eZ","addConfig","arrayOf","adminUiConfig","universalDiscoveryWidget","TabNavItemComponent","wrapperAttrs","_tabContentPanel2","_finder2","FinderTreeBranchComponent","expandBranch","removeLoadingStateFromItem","updateSelectedLocations","renderLeaf","currentlyLoadingLocationId","isLoadingChildren","contentTypeHref","isContainer","isSelectable","selected","_finderTreeLeaf2","remoteId","renderLoadMore","loadMoreLabel","height","FinderTreeLeafComponent","handleClick","target","closest","getContentTypeIdentifier","renderIcon","contentTypeIconUrl","helpers","getContentTypeIconUrl","renderLoadingIcon","renderSelectContentBtn","_selectContentButton2","content","componentClassName","isNotSelectableClassName","join","Name","searchAttrs","_search2","SearchComponent","isSearching","submitDisabled","updateItemsState","searchContent","onRequireItemsCount","toggleSubmitButtonState","setSearchInputRef","isClickEvent","nativeEvent","isEnterKeyEvent","keyCode","_refSearchInput","notification","renderSubmitBtn","btnAttrs","svgExtraClasses","btnLabel","trim","tableTitle","onKeyUp","_contentTable2","ContentTablePaginationComponent","btnFirstLabel","btnPrevLabel","btnNextLabel","btnLastLabel","btnClass","firstAttrs","prevAttrs","nextAttrs","lastAttrs","ContentTableItemComponent","notAvailableLabel","contentTypeName","contentTypeNames","nameLabel","typeLabel","componentProps","finderProps","chooseLanguageAndContentTypeTitle","selectLocationTitle","_create2","CreateComponent","_chooseLanguage2","_chooseContentType2","ChooseLanguageComponent","updateSelection","renderOption","selectedLanguageCode","priority","mappings","language","renderOptions","selectAttrs","selectLanguageTitle","ChooseContentTypeComponent","hasPreselectedAllowedContentType","isPreselectedContentType","_filterTimeout","updateFilterQuery","renderGroup","filterQuery","updateSelectedItem","toLowerCase","clearTimeout","setTimeout","isNotSelectable","groupName","groupAttrs","every","selectContentTypeTitle","typeToRefinePlaceholder","placeholder","getBookmarksAttrs","getWrapperAttrs","bookmarksAttrs","_bookmarks2","BookmarksComponent","renderTable","noBookmarksMessage","renderSpinner","renderNoBookmarksInfo","ContentCreatorComponent","handleIframeLoad","enablePublishBtn","disablePublishBtn","renderPublishBtn","_refIframe","iframeLoading","publishBtnDisabled","contentWindow","onbeforeunload","querySelector","click","iframeWindow","iframeDoc","iframeUrl","generateIframeUrl","pathname","loadLocationInfo","onunload","setAttribute","renderLoadingSpinner","publishLabel","cancelLabel","contentClass","src","onLoad","SelectedContentComponent","PureComponent","isPopupVisible","hidePopup","togglePopup","renderSelectedItem","_selectedContentItem2","onRemove","renderLimitLabel","limitLabel","limitLabelText","renderSelectedItems","_selectedContentPopup2","getTitle","titles","infoCssClasses","noConfirmedContentTitle","SelectedContentItemComponent","names","icon","SelectedContentPopupComponent","_tooltipPopup2","any","ContentMetaPreviewComponent","imageUri","translations","getImageUri","imageField","Version","Fields","field","fieldTypeIdentifier","fieldValue","uri","getTranslations","VersionInfo","VersionTranslationInfo","Language","renderTranslation","translation","renderImagePreview","imagePreviewNotAvailableLabel","alt","Fragment","renderBookmarkIcon","bookmarkIconId","wrapperClassName","formatShortDateWithTimezone","timezone","lastModifiedLabel","creationDateLabel","translationsLabel","Date","lastModificationDate","publishedDate","basicRequestInit","location1","location2"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,eACA,mBAAAC,eAAAC,IACAD,QAAA,sBAAAJ,GACA,iBAAAC,QACAA,QAAA,mBAAAD,EAAAG,QAAA,SAAAA,QAAA,gBAEAJ,EAAA,GAAAA,EAAA,OAA+BA,EAAA,WAAAA,EAAA,eAAqDA,EAAA,8BAAAC,EAAAD,EAAA,MAAAA,EAAA,YARpF,CASC,oBAAAO,UAAAC,KAAA,SAAAC,EAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAX,QAGA,IAAAC,EAAAQ,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAb,YAUA,OANAc,EAAAH,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAY,GAA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ACLoD,KAAKR,GACLS,MAAMnC,2BAWF8U,iBAAiB,EAACrO,EAAUjF,EAAYE,KACjD,MAAMylB,GAAmB,EAAAlmB,EAAAlD,qBAAoB0I,GACvC1E,EAAU,IAAIC,gCAAgCR,IAApCgF,KACT2gB,GACHjkB,OAAQ,YAGZjB,MAAMF,GACDG,KAAKpD,+BACLoD,KAAKR,GACLS,MAAMnC,2BAWF2U,oBAAoB,EAAClO,EAAUjF,EAAYE,KACpD,MAAMylB,GAAmB,EAAAlmB,EAAAlD,qBAAoB0I,GACvC1E,EAAU,IAAIC,gCAAgCR,IAApCgF,KACT2gB,GACHjkB,OAAQ,UAKZjB,MAAMF,GACDG,KAAM1D,IAAa,MACRO,EAAWP,EAAXO,OAER,OAPqB,MAOjBA,GANoB,MAMeA,EAPlB,MAQVA,GAGJ,EAAAkC,EAAA1C,oBAAmBC,KAE7B0D,KAAKR,GACLS,MAAMnC,0GChGFkV,mBAAmB,EAACkS,EAAWC,IAAcD,EAAU1mB,KAAO2mB,EAAU3mB","file":"UniversalDiscovery.module.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"UniversalDiscovery\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"eZ\"] = root[\"eZ\"] || {}, root[\"eZ\"][\"modules\"] = root[\"eZ\"][\"modules\"] || {}, root[\"eZ\"][\"modules\"][\"UniversalDiscovery\"] = factory(root[\"React\"], root[\"PropTypes\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 32);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9e3e3de79ce53e8fc1c1","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0 1 2 3","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"PropTypes\",\"commonjs2\":\"prop-types\",\"commonjs\":\"prop-types\",\"amd\":\"prop-types\"}\n// module id = 1\n// module chunks = 0 1 2 3","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Icon = (props) => {\n const linkHref = props.customPath ? props.customPath : `/bundles/ezplatformadminui/img/ez-icons.svg#${props.name}`;\n let className = 'ez-icon';\n\n if (props.extraClasses) {\n className = `${className} ${props.extraClasses}`;\n }\n\n return (\n \n \n \n );\n};\n\nIcon.propTypes = {\n extraClasses: PropTypes.string.isRequired,\n name: PropTypes.string,\n customPath: PropTypes.string,\n};\n\nIcon.defaultProps = {\n customPath: null,\n name: null,\n};\n\nexport default Icon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/icon/icon.js","/**\n * Returns basic RequestInit object for Request\n *\n * @function getBasicRequestInit\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @returns {RequestInit}\n */\nexport const getBasicRequestInit = ({ token, siteaccess }) => {\n return {\n headers: {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n };\n};\n\n/**\n * Handles request error\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Response}\n */\nexport const handleRequestError = (response) => {\n if (!response.ok) {\n throw Error(response.statusText);\n }\n\n return response;\n};\n\n/**\n * Handles request response\n *\n * @function handleRequestResponse\n * @param {Response} response\n * @returns {Error|Promise}\n */\nexport const handleRequestResponse = (response) => {\n return handleRequestError(response).json();\n};\n\n/**\n * Handles request response; returns status if response is OK\n *\n * @function handleRequestResponseStatus\n * @param {Response} response\n * @returns {number}\n */\nexport const handleRequestResponseStatus = (response) => {\n return handleRequestError(response).status;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/request.helper.js","export const NOTIFICATION_INFO_LABEL = 'info';\nexport const NOTIFICATION_SUCCESS_LABEL = 'success';\nexport const NOTIFICATION_WARNING_LABEL = 'warning';\nexport const NOTIFICATION_ERROR_LABEL = 'danger';\n\n/**\n * Dispatches notification event\n *\n * @method showNotification\n * @param {{message: string, label: string}} detail\n */\nexport const showNotification = (detail) => {\n const event = new CustomEvent('ez-notify', {\n detail,\n });\n\n document.body.dispatchEvent(event);\n};\n\n/**\n * Dispatches info notification event\n *\n * @method showInfoNotification\n * @param {String} message\n */\nexport const showInfoNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_INFO_LABEL,\n });\n};\n\n/**\n * Dispatches success notification event\n *\n * @method showSuccessNotification\n * @param {String} message\n */\nexport const showSuccessNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_SUCCESS_LABEL,\n });\n};\n\n/**\n * Dispatches warning notification event\n *\n * @method showWarningNotification\n * @param {String} message\n */\nexport const showWarningNotification = (message) => {\n showNotification({\n message,\n label: NOTIFICATION_WARNING_LABEL,\n });\n};\n\n/**\n * Dispatches error notification event\n *\n * @method showErrorNotification\n * @param {(string|Error)} error\n */\nexport const showErrorNotification = (error) => {\n const isErrorObj = error instanceof Error;\n const message = isErrorObj ? error.message : error;\n\n showNotification({\n message,\n label: NOTIFICATION_ERROR_LABEL,\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/services/notification.service.js","/**\n * Clones any object. Faster alternative to `JSON.parse(JSON.stringify)`\n *\n * @function deepClone\n * @param {Any} data\n * @returns {Any} cloned data\n */\nconst deepClone = (data) => {\n let clonedData;\n\n if (typeof data !== 'object') {\n return data;\n }\n\n if (!data) {\n return data;\n }\n\n if (Object.prototype.toString.apply(data) === '[object Array]') {\n clonedData = [];\n\n for (let i = 0; i < data.length; i++) {\n clonedData[i] = deepClone(data[i]);\n }\n\n return clonedData;\n }\n\n clonedData = {};\n\n for (let i in data) {\n if (data.hasOwnProperty(i)) {\n clonedData[i] = deepClone(data[i]);\n }\n }\n\n return clonedData;\n};\n\nexport default deepClone;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/deep.clone.helper.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst TabContentPanelComponent = (props) => {\n const attrs = {\n id: props.id,\n className: 'c-tab-content-panel',\n };\n\n if (!props.isVisible) {\n attrs.hidden = true;\n }\n\n return
    {props.children}
    ;\n};\n\nTabContentPanelComponent.propTypes = {\n id: PropTypes.string.isRequired,\n isVisible: PropTypes.bool.isRequired,\n children: PropTypes.node.isRequired,\n};\n\nexport default TabContentPanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/tab.content.panel.component.js","import { showErrorNotification } from '../../common/services/notification.service';\nimport { handleRequestResponse } from '../../common/helpers/request.helper.js';\n\nconst HEADERS_CREATE_VIEW = {\n Accept: 'application/vnd.ez.api.View+json; version=1.1',\n 'Content-Type': 'application/vnd.ez.api.ViewInput+json; version=1.1',\n};\nexport const QUERY_LIMIT = 50;\nconst ENDPOINT_CREATE_VIEW = '/api/ezp/v2/views';\n\n/**\n * Loads preselected location data\n *\n * @function loadPreselectedLocationData\n * @param {String} startingLocationId\n * @param {String} locationId\n * @param {Number} limit\n * @param {Function} callback\n */\nexport const loadPreselectedLocationData = ({ startingLocationId, locationId, limit = QUERY_LIMIT }, callback) => {\n const endpoint = window.Routing.generate('ezplatform.udw.preselected_location.data', {\n startingLocationId,\n locationId,\n limit,\n });\n const request = new Request(endpoint, {\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Loads content info\n *\n * @function loadContentInfo\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} contentId\n * @param {Function} callback\n */\nexport const loadContentInfo = ({ token, siteaccess }, contentId, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-load-content-info-${contentId}`,\n public: false,\n ContentQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Filter: { ContentIdCriterion: `${contentId}` },\n limit: 1,\n offset: 0,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Loads location\n *\n * @function loadLocation\n * @param {Object} params params hash containing REST config: token and siteaccess properties; locationId and offset\n * @param {Function} callback\n */\nexport const loadLocation = ({ token, siteaccess, locationId, limit = QUERY_LIMIT, offset = 0 }, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-location-by-id-${locationId}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Filter: { LocationIdCriterion: locationId },\n limit,\n offset,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Checks if user has permission to create content\n *\n * @function checkCreatePermission\n * @param {Object} params params hash containing REST config: token, siteaccess, contentTypeIdentifier, languageCode, locationId\n * @param {Function} callback\n */\nexport const checkCreatePermission = ({ token, contentTypeIdentifier, languageCode, locationId }, callback) => {\n const endpoint = window.Routing.generate('ezplatform.content_on_the_fly.has_access', {\n languageCode: languageCode,\n contentTypeIdentifier: contentTypeIdentifier,\n locationId: locationId,\n });\n const request = new Request(endpoint, {\n method: 'GET',\n headers: { 'X-CSRF-Token': token },\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Finds locations related to the parent location\n *\n * @function findLocationsByParentLocationId\n * @param {Object} params params hash containing REST config: token and siteaccess properties; parentLocationId and offset; sortClauses\n * @param {Function} callback\n */\nexport const findLocationsByParentLocationId = (\n { token, siteaccess, parentLocationId, limit = QUERY_LIMIT, offset = 0, sortClauses = { SectionIdentifier: 'ascending' } },\n callback\n) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-locations-by-parent-location-id-${parentLocationId}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: sortClauses,\n Filter: { ParentLocationIdCriterion: parentLocationId },\n limit,\n offset,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then((json) =>\n callback({\n parentLocationId,\n offset,\n data: json,\n })\n )\n .catch(showErrorNotification);\n};\n\n/**\n * Finds content matching a given text query\n *\n * @function findContentBySearchQuery\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} query\n * @param {Function} callback\n */\nexport const findContentBySearchQuery = ({ token, siteaccess }, query, callback) => {\n const body = JSON.stringify({\n ViewInput: {\n identifier: `udw-locations-by-search-query-${query}`,\n public: false,\n LocationQuery: {\n Criteria: {},\n FacetBuilders: {},\n SortClauses: {},\n Query: { FullTextCriterion: query },\n limit: QUERY_LIMIT,\n offset: 0,\n },\n },\n });\n const request = new Request(ENDPOINT_CREATE_VIEW, {\n method: 'POST',\n headers: Object.assign({}, HEADERS_CREATE_VIEW, {\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n }),\n body,\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Loads content types\n *\n * @function loadContentTypes\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {Function} callback\n */\nexport const loadContentTypes = ({ token, siteaccess }, callback) => {\n const request = new Request('/api/ezp/v2/content/types', {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n 'X-Siteaccess': siteaccess,\n 'X-CSRF-Token': token,\n },\n mode: 'same-origin',\n credentials: 'same-origin',\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/services/universal.discovery.service.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon/icon';\n\nconst TooltipPopupComponent = (props) => {\n const attrs = {\n className: 'c-tooltip-popup',\n hidden: !props.visible,\n };\n\n return (\n
    \n
    \n
    {props.title}
    \n
    \n \n
    \n
    \n
    {props.children}
    \n
    \n );\n};\n\nTooltipPopupComponent.propTypes = {\n title: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired,\n visible: PropTypes.bool.isRequired,\n onClose: PropTypes.func,\n};\n\nTooltipPopupComponent.defaultProps = {\n onClose: () => {},\n};\n\nexport default TooltipPopupComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/tooltip-popup/tooltip.popup.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport FinderTreeBranchComponent from './finder.tree.branch.component';\nimport { loadPreselectedLocationData, QUERY_LIMIT } from '../../services/universal.discovery.service';\nimport deepClone from '../../../common/helpers/deep.clone.helper';\n\nexport default class FinderComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n locationsMap: {},\n activeLocations: {},\n lastSelectedItem: null,\n limit: QUERY_LIMIT,\n };\n\n this.appendMoreItems = this.appendMoreItems.bind(this);\n this.updateLocationsData = this.updateLocationsData.bind(this);\n this.findLocationChildren = this.findLocationChildren.bind(this);\n this.loadBranchLeaves = this.loadBranchLeaves.bind(this);\n this.onLoadMore = this.onLoadMore.bind(this);\n this.renderBranch = this.renderBranch.bind(this);\n this.setBranchContainerRef = this.setBranchContainerRef.bind(this);\n this.setPreselectedState = this.setPreselectedState.bind(this);\n\n this.locationsMap = {};\n this.activeLocations = {};\n this.preselectedItem = null;\n }\n\n componentDidMount() {\n const isForcedLocation = this.props.allowedLocations.length === 1;\n const allowedIncludesPreselected = this.props.allowedLocations.includes(this.props.preselectedLocation);\n const isPreselectedLocation = this.props.preselectedLocation && (!this.props.allowedLocations.length || allowedIncludesPreselected);\n\n if (isForcedLocation) {\n this.loadPreselectedData(this.props.allowedLocations[0], true);\n } else if (isPreselectedLocation) {\n this.loadPreselectedData(this.props.preselectedLocation, true);\n } else {\n this.props.findLocationsByParentLocationId(\n { ...this.props.restInfo, parentLocationId: this.props.startingLocationId },\n this.updateLocationsData\n );\n }\n }\n\n componentDidUpdate() {\n this.updateBranchesContainerScroll();\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const isShowingUp = nextProps.isVisible && nextProps.isVisible !== this.props.isVisible;\n\n if (this.preselectedItem && this.locationsMap && this.activeLocations && isShowingUp) {\n this.setState(this.setPreselectedState, () => nextProps.isVisible && this.props.onItemSelect(this.preselectedItem));\n }\n }\n\n setPreselectedState() {\n return { locationsMap: this.locationsMap, activeLocations: this.activeLocations };\n }\n\n /**\n * Load data of preselected location.\n *\n * @method loadPreselectedData\n * @param {String} locationId\n * @memberof FinderComponent\n */\n loadPreselectedData(locationId) {\n const promise = new Promise((resolve) =>\n loadPreselectedLocationData({ startingLocationId: this.props.startingLocationId, locationId }, resolve)\n );\n\n promise.then((response) => {\n this.createPreselectedLocationData(response);\n this.preselectedItem = response.locations[locationId].Location;\n this.setPreselectedLocationData();\n });\n }\n\n /**\n * Create preselected location data.\n *\n * @method createPreselectedLocationData\n * @param {Object} locations\n * @param {Object} subitems\n * @memberof FinderComponent\n */\n createPreselectedLocationData({ locations, subitems }) {\n const createItem = ({ parent, offset = 0, children, location }) => {\n const createData = (items) => {\n return items.locations.map((value) => {\n return { value };\n });\n };\n const data = children ? createData(children) : [];\n const count = children ? children.totalCount : location.childCount;\n\n return { count, data, offset, parent, location };\n };\n\n if (subitems[1]) {\n const item = createItem({ parent: 1, children: subitems[1] });\n\n this.locationsMap[1] = item;\n this.activeLocations[0] = item;\n }\n\n Object.entries(locations).forEach(([key, value]) => {\n const item = createItem({\n parent: parseInt(key, 10),\n children: subitems[key],\n location: value.Location,\n });\n\n this.locationsMap[key] = item;\n this.activeLocations[value.Location.depth] = item;\n });\n }\n\n /**\n * Sets preselected location data.\n *\n * @method setPreselectedLocationData\n * @memberof FinderComponent\n */\n setPreselectedLocationData() {\n this.setState(this.setPreselectedState, () => this.props.isVisible && this.props.onItemSelect(this.preselectedItem));\n }\n\n /**\n * Updates locations based state attributes: activeLocations and locationsMap\n *\n * @method updateLocationsData\n * @param {Object} params params hash containing: parentLocationId, data and offset properties\n * @memberof FinderComponent\n */\n updateLocationsData({ parentLocationId, data, offset }, location = null) {\n this.setState((state) => {\n const activeLocations = deepClone(state.activeLocations);\n const locationBranch = {\n location,\n parent: parentLocationId,\n data: data.View.Result.searchHits.searchHit,\n count: data.View.Result.count,\n offset,\n };\n const locationsMap = { ...deepClone(state.locationsMap), [parentLocationId]: locationBranch };\n\n if (!Object.keys(activeLocations).length) {\n activeLocations[0] = locationBranch;\n }\n\n return { activeLocations, locationsMap };\n });\n }\n\n /**\n * Updates the left scroll position of branches container\n *\n * @method updateBranchesContainerScroll\n * @memberof FinderComponent\n */\n updateBranchesContainerScroll() {\n const container = this._refBranchesContainer;\n\n if (container) {\n container.scrollLeft = container.scrollWidth - container.clientWidth;\n }\n }\n\n /**\n * Handles loading more items for a selected parent location\n *\n * @method onLoadMore\n * @param {Object} parentLocation\n * @memberof FinderComponent\n */\n onLoadMore(parentLocation) {\n const limit = this.state.limit;\n const offset = Object.values(this.state.activeLocations).find((location) => location.parent === parentLocation.id).offset + limit;\n const sortClauses = this.getLocationSortClauses(parentLocation);\n\n this.props.findLocationsByParentLocationId(\n { ...this.props.restInfo, parentLocationId: parentLocation.id, limit, offset, sortClauses },\n this.appendMoreItems\n );\n }\n\n /**\n * Appends more subitems for a selected location\n *\n * @method appendMoreItems\n * @param {Object} response object containing information about: parentLocationId, offset and data\n * @memberof FinderComponent\n */\n appendMoreItems({ parentLocationId, offset, data }) {\n this.setState((state) => {\n const activeLocations = deepClone(state.activeLocations);\n const locationsMap = deepClone(state.locationsMap);\n\n Object.keys(activeLocations).forEach((key) => {\n const location = activeLocations[key];\n\n if (location.parent === parentLocationId) {\n const results = [...location.data, ...data.View.Result.searchHits.searchHit];\n\n location.offset = offset;\n location.data = results;\n locationsMap[parentLocationId] = location;\n }\n });\n\n return { activeLocations, locationsMap };\n });\n }\n\n /**\n * Loads branch children (sub-items)\n *\n * @method loadBranchLeaves\n * @param {Object} parentLocation\n * @memberof FinderComponent\n */\n loadBranchLeaves(parentLocation) {\n const sortClauses = this.getLocationSortClauses(parentLocation);\n const promise = new Promise((resolve) =>\n this.props.findLocationsByParentLocationId(\n {\n ...this.props.restInfo,\n parentLocationId: parentLocation.id,\n sortClauses,\n },\n resolve\n )\n );\n\n promise.then((response) => {\n this.updateLocationsData(response, parentLocation);\n this.updateBranchActiveLocations(parentLocation.id);\n });\n }\n\n /**\n * Updates branch active locations\n *\n * @method updateBranchActiveLocations\n * @param {String} parent the parent id\n * @memberof FinderComponent\n */\n updateBranchActiveLocations(parent) {\n const activeLocations = deepClone(this.state.activeLocations);\n const depth = Object.keys(activeLocations).find((locationDepth) => activeLocations[locationDepth].parent === parent);\n\n activeLocations[depth] = this.state.locationsMap[parent];\n\n this.setState(() => ({ activeLocations }));\n }\n\n /**\n * Generates sort clause for location\n *\n * @method getLocationSortClauses\n * @param {Object} location\n * @returns {Object} sortClauses for given location\n * @memberof FinderComponent\n */\n getLocationSortClauses(location) {\n const { sortFieldMappings, sortOrderMappings } = this.props;\n const sortField = sortFieldMappings[location.sortField];\n const sortOrder = sortOrderMappings[location.sortOrder];\n\n if (!sortField || !sortOrder) {\n return {};\n }\n\n return { [sortField]: sortOrder };\n }\n\n /**\n * Finds location children (sub-items)\n *\n * @method findLocationChildren\n * @param {Object} params\n * @param {String} params.parent parent location id\n * @param {Object} params.location\n * @param {Function} params.onDataLoaded\n * @memberof FinderComponent\n */\n findLocationChildren({ parent, location, onDataLoaded }) {\n if (this.props.allowedLocations.length === 1) {\n return;\n }\n\n this.setState(() => ({ lastSelectedItem: parent }));\n\n if (this.state.locationsMap[parent]) {\n this.updateSelectedBranches(location, onDataLoaded);\n this.props.onItemSelect(location);\n\n return;\n }\n\n const sortClauses = this.getLocationSortClauses(location);\n const promise = new Promise((resolve) =>\n this.props.findLocationsByParentLocationId(\n {\n ...this.props.restInfo,\n parentLocationId: parent,\n sortClauses,\n },\n resolve\n )\n );\n\n promise.then((response) => {\n this.updateLocationsData(response, location);\n this.updateSelectedBranches(location, onDataLoaded);\n\n this.props.onItemSelect(location);\n });\n }\n\n /**\n * Updates selected branches state\n *\n * @param {Object} location location struct\n * @param {Function} onDataLoaded\n * @memberof FinderComponent\n */\n updateSelectedBranches(location, onDataLoaded) {\n this.setState(this.updateActiveLocations.bind(this, location), onDataLoaded);\n }\n\n /**\n * Updates active locations info\n *\n * @method updateActiveLocations\n * @param {Object} location location struct\n * @param {Object} state component state\n * @returns {Object}\n * @memberof FinderComponent\n */\n updateActiveLocations(location, state) {\n const locationDepth = parseInt(location.depth, 10);\n const activeLocations = Object.keys(state.activeLocations)\n .filter((key) => parseInt(key, 10) < locationDepth)\n .reduce((total, depth) => {\n depth = parseInt(depth, 10);\n\n total[depth] = state.activeLocations[depth];\n\n return total;\n }, {});\n\n activeLocations[locationDepth] = state.locationsMap[location.id];\n\n return { activeLocations };\n }\n\n /**\n * Renders branch (the sub items container)\n *\n * @method renderBranch\n * @param {Object} params params hash containing: parent, count and data properties\n * @returns {null|Element}\n * @memberof FinderComponent\n */\n renderBranch({ parent, data, count, location }) {\n const { lastSelectedItem } = this.state;\n\n if (!data || !count) {\n return null;\n }\n\n const activeLocations = Object.values(this.state.activeLocations);\n const selectedLocations = activeLocations.map((item) => item.parent);\n\n return (\n \n );\n }\n\n setBranchContainerRef(ref) {\n this._refBranchesContainer = ref;\n }\n\n render() {\n const activeLocations = Object.values(this.state.activeLocations);\n\n if (!activeLocations.length) {\n return null;\n }\n\n return (\n
    \n
    \n {activeLocations.map(this.renderBranch)}\n
    \n
    \n );\n }\n}\n\nFinderComponent.propTypes = {\n multiple: PropTypes.bool.isRequired,\n maxHeight: PropTypes.number.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n startingLocationId: PropTypes.number.isRequired,\n findLocationsByParentLocationId: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n allowContainersOnly: PropTypes.bool,\n contentTypesMap: PropTypes.object,\n preselectedLocation: PropTypes.number,\n allowedLocations: PropTypes.array,\n isVisible: PropTypes.bool,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\nFinderComponent.defaultProps = {\n allowedLocations: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/finder/finder.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nexport default class SelectContentButtonComponent extends Component {\n constructor(props) {\n super(props);\n\n this.toggleEnabledState = this.toggleEnabledState.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n this.handleUnselect = this.handleUnselect.bind(this);\n\n this.state = {\n selectContentEnabled: true,\n };\n }\n\n componentDidMount() {\n this.checkCanSelectContent();\n }\n\n componentDidUpdate() {\n this.checkCanSelectContent();\n }\n\n checkCanSelectContent() {\n const { location, canSelectContent } = this.props;\n\n canSelectContent(location, this.toggleEnabledState);\n }\n\n toggleEnabledState(selectContentEnabled) {\n if (this.state.selectContentEnabled === selectContentEnabled) {\n return;\n }\n\n this.setState((state) => ({ ...state, selectContentEnabled }));\n }\n\n handleSelect(event) {\n event.stopPropagation();\n\n this.props.onSelectContent(this.props.location);\n }\n\n handleUnselect(event) {\n event.stopPropagation();\n\n this.props.onItemRemove(this.props.location.id);\n }\n\n render() {\n const { multiple, isSelected } = this.props;\n const iconId = isSelected ? 'checkmark' : 'create';\n const attrs = {\n type: 'button',\n className: 'c-select-content-button',\n onClick: isSelected ? this.handleUnselect : this.handleSelect,\n };\n\n if (!multiple || (!isSelected && !this.state.selectContentEnabled)) {\n return null;\n }\n\n if (isSelected) {\n attrs.className = `${attrs.className} ${attrs.className}--selected`;\n }\n\n return (\n \n );\n }\n}\n\nSelectContentButtonComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onPreview: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemClick: PropTypes.func,\n labels: PropTypes.shape({\n contentTableItem: PropTypes.shape({\n notAvailable: PropTypes.string.isRequired,\n }).isRequired,\n }).isRequired,\n location: PropTypes.object.isRequired,\n isSelected: PropTypes.bool.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/select-content-button/select.content.button.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nimport ContentTablePaginationComponent from './content.table.pagination.component';\nimport ContentTableItemComponent from './content.table.item.component';\nimport ContentTableHeaderComponent from './content.table.header.component';\n\nexport default class ContentTableComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n items: props.items,\n perPage: props.perPage,\n activePage: 0,\n pages: this.splitToPages(props.items, props.perPage),\n count: props.count,\n };\n\n this.setActivePage = this.setActivePage.bind(this);\n this.renderItem = this.renderItem.bind(this);\n }\n\n UNSAFE_componentWillMount() {\n this.ensurePageItemsLoaded(0);\n }\n\n UNSAFE_componentWillReceiveProps({ items, perPage, count }) {\n const maxPage = !count ? 0 : Math.floor((count - 1) / perPage);\n\n this.setState((state) => ({\n items,\n count,\n activePage: state.activePage <= maxPage ? state.activePage : maxPage,\n pages: this.splitToPages(items, perPage),\n }));\n }\n\n /**\n * Splits items into pages\n *\n * @method splitToPages\n * @param {Array} items\n * @param {Number} perPage\n * @returns {Array}\n * @memberof ContentTableComponent\n */\n splitToPages(items, perPage) {\n return items.reduce((pages, item, index) => {\n const pageIndex = Math.floor(index / perPage);\n\n if (!pages[pageIndex]) {\n pages[pageIndex] = [];\n }\n\n pages[pageIndex].push(item);\n\n return pages;\n }, []);\n }\n\n ensurePageItemsLoaded(activePage) {\n const { requireItemsCount } = this.props;\n const { count, perPage } = this.state;\n const itemsNeededCount = Math.min(perPage * (activePage + 1), count);\n\n requireItemsCount(itemsNeededCount);\n }\n\n /**\n * Sets active page index state\n *\n * @method setActivePage\n * @param {Number} activePage\n * @memberof ContentTableComponent\n */\n setActivePage(activePage) {\n this.ensurePageItemsLoaded(activePage);\n\n this.setState(() => ({ activePage }));\n }\n\n /**\n * Renders single item\n *\n * @method renderItem\n * @param {Object} item\n * @returns {Element}\n * @memberof ContentTableComponent\n */\n renderItem(item) {\n const location = item.Location;\n const { contentTypesMap, onItemSelect, selectedContent, onSelectContent, canSelectContent, onItemRemove, multiple } = this.props;\n\n return (\n onItemSelect(location)}\n selectedContent={selectedContent}\n onSelectContent={onSelectContent}\n canSelectContent={canSelectContent}\n onItemRemove={onItemRemove}\n multiple={multiple}\n />\n );\n }\n\n /**\n * Renders single search results item\n *\n * @method renderHeader\n * @returns {Element}\n * @memberof ContentTableComponent\n */\n renderHeader() {\n const { items } = this.state;\n const showHeader = !!items.length;\n\n if (!showHeader) {\n return null;\n }\n\n return ;\n }\n\n /**\n * Renders pagination\n *\n * @method renderPagination\n * @returns {Element}\n * @memberof ContentTableComponent\n */\n renderPagination() {\n const { activePage, count, perPage } = this.state;\n const pagesCount = !count ? 0 : Math.floor((count - 1) / perPage) + 1;\n const paginationAttrs = {\n minIndex: 0,\n maxIndex: pagesCount - 1,\n activeIndex: activePage,\n onChange: this.setActivePage,\n };\n\n if (!pagesCount || paginationAttrs.minIndex === paginationAttrs.maxIndex) {\n return null;\n }\n\n return ;\n }\n\n renderPageSpinner() {\n return ;\n }\n\n renderPage() {\n const { pages, activePage, perPage, count } = this.state;\n const itemsCount = this.state.items.length;\n const neededItemsCount = Math.min((activePage + 1) * perPage, count);\n const allNeededItemsLoaded = itemsCount >= neededItemsCount;\n\n if (!allNeededItemsLoaded) {\n return this.renderPageSpinner();\n }\n\n const pageToRender = !itemsCount ? [] : pages[activePage];\n\n return pageToRender.map(this.renderItem);\n }\n\n render() {\n const { title, count } = this.props;\n\n if (!count) {\n return null;\n }\n\n return (\n
    \n
    \n {title} ({count})\n
    \n {this.renderHeader()}\n
    {this.renderPage()}
    \n {this.renderPagination()}\n
    \n );\n }\n}\n\nContentTableComponent.propTypes = {\n items: PropTypes.array.isRequired,\n count: PropTypes.number.isRequired,\n perPage: PropTypes.number.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemClick: PropTypes.func,\n title: PropTypes.string.isRequired,\n noItemsMessage: PropTypes.string,\n requireItemsCount: PropTypes.func.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\nContentTableComponent.defaultProps = {\n onItemClick: null,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabNavItemComponent from './components/tab-nav/tab.nav.item.component';\nimport FinderPanelComponent from './components/tab-content/finder.panel.component';\nimport SearchPanelComponent from './components/tab-content/search.panel.component';\nimport CreatePanelComponent from './components/tab-content/create.panel.component';\nimport BookmarksPanelComponent from './components/tab-content/bookmarks.panel.component';\nimport ContentCreatorComponent from './components/content-creator/content.creator.component';\nimport SelectedContentComponent from './components/selected-content/selected.content.component';\nimport ContentMetaPreviewComponent from './components/content-meta-preview/content.meta.preview.component';\nimport {\n loadContentInfo,\n loadContentTypes,\n findLocationsByParentLocationId,\n findContentBySearchQuery,\n checkCreatePermission,\n} from './services/universal.discovery.service';\nimport { checkIsBookmarked, loadBookmarks, addBookmark, removeBookmark } from './services/bookmark.service';\nimport { showErrorNotification } from '../common/services/notification.service';\nimport { areSameLocations } from '../common/helpers/compare.helper';\nimport deepClone from '../common/helpers/deep.clone.helper';\n\nexport const TAB_BROWSE = 'browse';\nexport const TAB_SEARCH = 'search';\nexport const TAB_CREATE = 'create';\nexport const TAB_BOOKMARKS = 'bookmarks';\n\nconst CLASS_SCROLL_DISABLED = 'ez-scroll-disabled';\nconst CONTENT_META_PREVIEW_BASE_STATE = {\n contentMeta: null,\n isPreviewMetaReady: false,\n isLocationAllowed: true,\n};\n\nexport default class UniversalDiscoveryModule extends Component {\n constructor(props) {\n super(props);\n\n let selectedContentType = {};\n const isForcedLanguage = props.cotfAllowedLanguages.length === 1 || props.cotfForcedLanguage;\n const isForcedContentType = props.cotfAllowedContentTypes.length === 1;\n const isForcedLocation = props.cotfAllowedLocations.length === 1;\n\n this.onLanguageSelected = this.onLanguageSelected.bind(this);\n this.onContentTypeSelected = this.onContentTypeSelected.bind(this);\n this.handlePublish = this.handlePublish.bind(this);\n this.togglePanel = this.togglePanel.bind(this);\n this.setContentTypesMap = this.setContentTypesMap.bind(this);\n this.canSelectContent = this.canSelectContent.bind(this);\n this.updateSelectedContent = this.updateSelectedContent.bind(this);\n this.onItemRemove = this.onItemRemove.bind(this);\n this.onItemSelect = this.onItemSelect.bind(this);\n this.renderSinglePanel = this.renderSinglePanel.bind(this);\n this.renderSingleTab = this.renderSingleTab.bind(this);\n this.handleConfirm = this.handleConfirm.bind(this);\n this.handleSingleConfirm = this.handleSingleConfirm.bind(this);\n this.setCreateModeState = this.setCreateModeState.bind(this);\n this.updateContentMetaWithCurrentVersion = this.updateContentMetaWithCurrentVersion.bind(this);\n this.toggleBookmark = this.toggleBookmark.bind(this);\n this.onBookmarkAdded = this.onBookmarkAdded.bind(this);\n this.onBookmarkRemoved = this.onBookmarkRemoved.bind(this);\n this.setBookmarkLoadingStatus = this.setBookmarkLoadingStatus.bind(this);\n this.requireBookmarksCount = this.requireBookmarksCount.bind(this);\n this.onBookmarksLoaded = this.onBookmarksLoaded.bind(this);\n this.updatePermissionsState = this.updatePermissionsState.bind(this);\n this.setCanSelectContentState = this.setCanSelectContentState.bind(this);\n this.updateMaxHeightState = this.updateMaxHeightState.bind(this);\n this.setMainContainerRef = this.setMainContainerRef.bind(this);\n this.setContentContainerRef = this.setContentContainerRef.bind(this);\n\n this.loadingBookmarksLocationsIds = {};\n this._refMainContainer;\n this._refContentContainer;\n\n if (isForcedContentType) {\n selectedContentType = this.findContentType(props.cotfAllowedContentTypes[0]);\n }\n\n this.tabsLabels = {\n browse: Translator.trans(/*@Desc(\"Browse\")*/ 'browse.tab.label', {}, 'universal_discovery_widget'),\n search: Translator.trans(/*@Desc(\"Search\")*/ 'search.tab.label', {}, 'universal_discovery_widget'),\n create: Translator.trans(/*@Desc(\"Create\")*/ 'create.tab.label', {}, 'universal_discovery_widget'),\n bookmarks: Translator.trans(/*@Desc(\"Bookmarks\")*/ 'bookmarks.tab.label', {}, 'universal_discovery_widget'),\n };\n\n this.state = {\n activeTab: props.activeTab,\n contentTypesMap: {},\n selectedContent: [],\n maxHeight: props.maxHeight,\n mainContainerRestHeight: 0,\n selectedLanguage: {},\n selectedContentType,\n isCreateMode: isForcedLanguage && isForcedContentType && isForcedLocation,\n hasPermission: true,\n userBookmarksCount: null,\n userBookmarksItems: [],\n bookmarksRequiredCount: 0,\n bookmarksDuringLoadingCount: 0,\n bookmarked: {},\n canSelectContent: false,\n ...CONTENT_META_PREVIEW_BASE_STATE,\n };\n }\n\n componentDidMount() {\n this.props.loadContentTypes(this.props.restInfo, this.setContentTypesMap);\n\n if (!this._refContentContainer) {\n return null;\n }\n\n window.document.body.classList.add(CLASS_SCROLL_DISABLED);\n window.addEventListener('resize', this.updateMaxHeightState, false);\n\n this.initializeBookmarks();\n\n this.setState(() => ({\n maxHeight: this._refContentContainer.clientHeight,\n mainContainerRestHeight: this._refMainContainer.clientHeight - this._refContentContainer.clientHeight,\n }));\n }\n\n componentWillUnmount() {\n window.document.body.classList.remove(CLASS_SCROLL_DISABLED);\n window.removeEventListener('resize', this.updateMaxHeightState);\n }\n\n componentDidUpdate(prevProps, prevState) {\n const { contentMeta, isPreviewMetaReady } = this.state;\n\n if (!!contentMeta && contentMeta !== prevState.contentMeta && !isPreviewMetaReady) {\n const contentId = contentMeta.ContentInfo.Content._id;\n\n this.props.loadContentInfo(this.props.restInfo, contentId, this.updateContentMetaWithCurrentVersion.bind(this, contentId));\n }\n\n if (!this.props.multiple) {\n this.canSelectContent(contentMeta, this.setCanSelectContentState);\n }\n }\n\n /**\n * Updates the maxHeight state\n *\n * @method updateMaxHeightState\n * @memberof UniversalDiscoveryModule\n */\n updateMaxHeightState() {\n this.setState(() => ({\n maxHeight: this._refMainContainer.clientHeight - this.state.mainContainerRestHeight,\n }));\n }\n\n /**\n * Sets the can select content state.\n *\n * @method setCanSelectContentState\n * @param {Boolean} canSelectContent\n * @memberof UniversalDiscoveryModule\n */\n setCanSelectContentState(canSelectContent) {\n if (this.state.canSelectContent === canSelectContent) {\n return;\n }\n\n this.setState(() => ({ canSelectContent }));\n }\n\n /**\n * Loads first 10 user's bookmarks (or less if user doesn't have that many bookmarks).\n * Sets total count of user's bookmarks.\n *\n * @method initializeBookmarks\n * @memberof UniversalDiscoveryModule\n */\n initializeBookmarks() {\n const { restInfo } = this.props;\n const bookmarksLoaded = new Promise((resolve) => loadBookmarks(restInfo, 10, 0, resolve));\n\n bookmarksLoaded\n .then(({ BookmarkList }) =>\n this.setState(() => ({\n userBookmarksCount: BookmarkList.count,\n userBookmarksItems: BookmarkList.items,\n }))\n )\n .catch(showErrorNotification);\n }\n\n /**\n * Updates selected content item meta with a current version info object\n *\n * @method updateContentMetaWithCurrentVersion\n * @param {Number} contentId ID of content for which we fetched CurrentVersion\n * @param {Object} response\n */\n updateContentMetaWithCurrentVersion(contentId, response) {\n const { contentMeta } = this.state;\n\n if (!contentMeta || contentMeta.ContentInfo.Content._id !== contentId) {\n return;\n }\n\n const updatedContentMeta = deepClone(contentMeta);\n const currentVersion = response.View.Result.searchHits.searchHit[0].value.Content.CurrentVersion;\n\n updatedContentMeta.CurrentVersion = currentVersion;\n\n this.setState(() => ({ contentMeta: updatedContentMeta, isPreviewMetaReady: true }));\n }\n\n /**\n * Finds a content type data\n *\n * @method findContentType\n * @param {String} identifier\n * @returns {Object}\n */\n findContentType(identifier) {\n let contentType = null;\n\n Object.values(this.props.contentTypes).forEach((group) => {\n const result = group.find((contentType) => contentType.identifier === identifier);\n\n if (result) {\n contentType = result;\n }\n });\n\n return contentType;\n }\n\n /**\n * Handles selection confirm action\n *\n * @method handleConfirm\n */\n handleConfirm() {\n this.props.onConfirm(this.addContentTypeInfo(this.state.selectedContent));\n }\n\n handleSingleConfirm() {\n this.setState(\n (state) => ({ selectedContent: [state.contentMeta] }),\n () => this.props.onConfirm(this.addContentTypeInfo(this.state.selectedContent))\n );\n }\n\n /**\n * Handles create content action\n *\n * @method setCreateModeState\n */\n setCreateModeState() {\n this.setState(() => ({ isCreateMode: true }));\n }\n\n /**\n * Handles publish content action\n *\n * @method handlePublish\n * @param {Object} location\n */\n handlePublish(location) {\n this.props.onConfirm(this.addContentTypeInfo([location]));\n }\n\n /**\n * Adds a content type info to a content\n *\n * @method addContentTypeInfo\n * @param {Array} items\n * @returns {Array}\n */\n addContentTypeInfo(items) {\n const { contentTypesMap } = this.state;\n\n return items.map((item) => {\n const clonedItem = deepClone(item);\n const contentType = clonedItem.ContentInfo.Content.ContentType;\n\n clonedItem.ContentInfo.Content.ContentTypeInfo = contentTypesMap[contentType._href];\n\n return clonedItem;\n });\n }\n\n /**\n * Handles selected contet item removal action\n *\n * @method onItemRemove\n * @param {String} id\n */\n onItemRemove(id) {\n this.setState((state) => ({\n selectedContent: state.selectedContent.filter((item) => item.id !== id),\n }));\n }\n\n /**\n * Handles item selected action\n *\n * @method onItemSelect\n * @param {Object} contentMeta\n */\n onItemSelect(contentMeta) {\n this.setState(\n () => CONTENT_META_PREVIEW_BASE_STATE,\n () => {\n const isLocationAllowed =\n !this.props.cotfAllowedLocations.length || this.props.cotfAllowedLocations.includes(contentMeta.id);\n const contentMetaWithContentTypeInfo = this.addContentTypeInfo([contentMeta])[0];\n\n this.setState(() => ({\n contentMeta: contentMetaWithContentTypeInfo,\n isLocationAllowed,\n isPreviewMetaReady: false,\n }));\n }\n );\n }\n\n /**\n * Fires `ez-bookmark-change` event\n *\n * @method dispatchBookmarkChangeEvent\n * @param {Number} locationId\n * @param {Boolean} bookmarked\n */\n dispatchBookmarkChangeEvent(locationId, bookmarked) {\n const event = new CustomEvent('ez-bookmark-change', { detail: { bookmarked, locationId } });\n\n document.body.dispatchEvent(event);\n }\n\n /**\n * Sets loading status of bookmark\n *\n * @method setBookmarkLoadingStatus\n * @param {String} locationId\n * @param {Boolean} isLoading\n * @memberof UniversalDiscoveryModule\n */\n setBookmarkLoadingStatus(locationId, isLoading) {\n this.loadingBookmarksLocationsIds[locationId] = isLoading;\n }\n\n /**\n * Returns true if bookmark is loading, otherwise returns false\n *\n * @method isBookmarkLoading\n * @param {String} locationId\n * @memberof UniversalDiscoveryModule\n */\n isBookmarkLoading(locationId) {\n return !!this.loadingBookmarksLocationsIds[locationId];\n }\n\n /**\n * Checks whether location is already bookmarked\n *\n * @method fetchBookmarkStatus\n * @param {String} locationId\n * @memberof UniversalDiscoveryModule\n */\n fetchBookmarkStatus(locationId) {\n if (this.isBookmarkLoading(locationId)) {\n return;\n }\n\n this.setBookmarkLoadingStatus(locationId, true);\n\n const { restInfo } = this.props;\n const checked = new Promise((resolve) => checkIsBookmarked(restInfo, locationId, resolve));\n\n checked\n .then((isBookmarked) => {\n this.setIsBookmarked(locationId, isBookmarked);\n this.setBookmarkLoadingStatus(locationId, false);\n })\n .catch(showErrorNotification);\n }\n\n /**\n * Sets bookmark value in the state\n *\n * @method setIsBookmarked\n * @param {String} locationId\n * @param {Boolean} isBookmarked\n * @memberof ContentMetaPreviewComponent\n */\n setIsBookmarked(locationId, isBookmarked) {\n this.setState((state) => {\n const bookmarked = { ...state.bookmarked };\n\n bookmarked[locationId] = isBookmarked;\n\n return { bookmarked };\n });\n }\n\n /**\n * Removes or adds bookmark depending on if it exists or not\n *\n * @method toggleBookmark\n * @param {Object} location\n * @memberof UniversalDiscoveryModule\n */\n toggleBookmark(location) {\n const locationId = location.id;\n const isBookmarked = this.isBookmarked(locationId);\n\n if (this.isBookmarkLoading(locationId)) {\n return;\n }\n\n this.setBookmarkLoadingStatus(locationId, true);\n\n const { restInfo } = this.props;\n const toggleBookmark = isBookmarked ? removeBookmark : addBookmark;\n const onBookmarkToggled = isBookmarked ? this.onBookmarkRemoved : this.onBookmarkAdded;\n const bookmarkToggled = new Promise((resolve) => toggleBookmark(restInfo, locationId, resolve));\n\n bookmarkToggled\n .then(() => {\n onBookmarkToggled(location);\n this.setBookmarkLoadingStatus(locationId, false);\n })\n .catch(showErrorNotification);\n }\n\n /**\n * Returns\n *\n * @method isBookmarked\n * @param {String} locationId\n * @returns {Boolean}\n * @memberof UniversalDiscoveryModule\n */\n isBookmarked(locationId) {\n const { bookmarked } = this.state;\n const locationBookmarkChecked = locationId in bookmarked;\n\n if (!locationBookmarkChecked) {\n this.fetchBookmarkStatus(locationId);\n return null;\n }\n\n return bookmarked[locationId];\n }\n\n /**\n * Called on bookmarked removed\n *\n * @method onBookmarkRemoved\n * @param {Object} itemToRemoveLocation\n * @memberof UniversalDiscoveryModule\n */\n onBookmarkRemoved(itemToRemoveLocation) {\n this.setState(\n (state) => ({\n userBookmarksCount: state.userBookmarksCount - 1,\n userBookmarksItems: state.userBookmarksItems.filter((item) => !areSameLocations(item.Location, itemToRemoveLocation)),\n }),\n () => {\n this.setIsBookmarked(itemToRemoveLocation.id, false);\n\n const { activeTab } = this.state;\n\n if (activeTab === TAB_BOOKMARKS) {\n this.closeContentMetaPreview();\n }\n\n this.dispatchBookmarkChangeEvent(itemToRemoveLocation.id, false);\n }\n );\n }\n\n /**\n * Called on bookmarked added\n *\n * @method onBookmarkAdded\n * @param {Object} addedBookmarkLocation\n * @memberof UniversalDiscoveryModule\n */\n onBookmarkAdded(addedBookmarkLocation) {\n this.setState(\n (state) => ({\n userBookmarksCount: state.userBookmarksCount + 1,\n userBookmarksItems: [{ Location: addedBookmarkLocation }, ...state.userBookmarksItems],\n }),\n () => {\n this.setIsBookmarked(addedBookmarkLocation.id, true);\n this.dispatchBookmarkChangeEvent(addedBookmarkLocation.id, true);\n }\n );\n }\n\n /**\n * Called on bookmarks loaded\n *\n * @method onBookmarksLoaded\n * @param {Object} { BookmarksList }\n * @memberof UniversalDiscoveryModule\n */\n onBookmarksLoaded({ BookmarkList }) {\n const { items } = BookmarkList;\n\n this.setState(\n (state) => ({\n bookmarksDuringLoadingCount: state.bookmarksDuringLoadingCount - items.length,\n userBookmarksItems: [...items, ...state.userBookmarksItems],\n }),\n () => items.forEach((bookmarkLocation) => this.setIsBookmarked(bookmarkLocation.Location.id, true))\n );\n }\n\n /**\n * Loads bookmarks\n *\n * @method loadBookmarks\n * @param {Number} itemsToLoadCount\n * @memberof UniversalDiscoveryModule\n */\n loadBookmarks(itemsToLoadCount) {\n const { restInfo } = this.props;\n const offset = this.state.userBookmarksItems.length;\n const bookmarksLoaded = new Promise((resolve) => loadBookmarks(restInfo, itemsToLoadCount, offset, resolve));\n\n bookmarksLoaded.then(this.onBookmarksLoaded).catch(showErrorNotification);\n }\n\n /**\n * Ensures that enough bookmarks are loaded\n *\n * @method requireBookmarksCount\n * @param {String} locationId\n * @memberof UniversalDiscoveryModule\n */\n requireBookmarksCount(count) {\n this.setState((state) => {\n const { bookmarksRequiredCount, bookmarksDuringLoadingCount, userBookmarksItems } = state;\n const loadedBookmarksCount = userBookmarksItems.length;\n const newBookmarksRequiredCount = Math.max(count, bookmarksRequiredCount);\n const bookmarksToLoadCount = newBookmarksRequiredCount - loadedBookmarksCount - bookmarksDuringLoadingCount;\n\n if (!!bookmarksToLoadCount) {\n this.loadBookmarks(bookmarksToLoadCount);\n }\n\n return {\n bookmarksDuringLoadingCount: bookmarksDuringLoadingCount + bookmarksToLoadCount,\n bookmarksRequiredCount: newBookmarksRequiredCount,\n };\n });\n }\n\n /**\n * Updates language selected state\n *\n * @method onLanguageSelected\n * @param {String} selectedLanguage\n */\n onLanguageSelected(selectedLanguage) {\n this.setState(() => ({ selectedLanguage }));\n }\n\n /**\n * Updates selected content type state\n *\n * @method onContentTypeSelected\n * @param {Object} selectedContentType\n */\n onContentTypeSelected(selectedContentType) {\n this.setState(() => ({ selectedContentType }));\n }\n\n /**\n * Updates selected content state\n *\n * @method updateSelectedContent\n */\n updateSelectedContent(location) {\n const selectedContent = !this.props.multiple ? [location] : [...this.state.selectedContent, location];\n\n this.setState(() => ({ selectedContent }));\n }\n\n /**\n * Does checking whether a content can be selected\n *\n * @method canSelectContent\n * @param {Object} data\n * @param {Function} callback\n * @returns {Boolean}\n */\n canSelectContent(data, callback) {\n if (!data) {\n return callback(false);\n }\n\n const { selectedContent, contentTypesMap } = this.state;\n const isAlreadySelected = selectedContent.find((item) => item.ContentInfo.Content._id === data.ContentInfo.Content._id);\n const isOverLimit = !!this.props.selectedItemsLimit && selectedContent.length >= this.props.selectedItemsLimit;\n const contentTypeInfo = contentTypesMap[data.ContentInfo.Content.ContentType._href];\n const isAllowedContentType =\n !this.props.cotfAllowedContentTypes.length || this.props.cotfAllowedContentTypes.includes(contentTypeInfo.identifier);\n\n if (isAlreadySelected || isOverLimit || !isAllowedContentType) {\n return callback(false);\n }\n\n data.ContentInfo.Content.ContentTypeInfo = contentTypeInfo;\n\n return this.props.canSelectContent({ item: data, itemsCount: selectedContent.length }, callback);\n }\n\n /**\n * Toggles visible panel state\n *\n * @method togglePanel\n * @param {String} activeTab\n */\n togglePanel(activeTab) {\n this.setState(() => ({ activeTab, ...CONTENT_META_PREVIEW_BASE_STATE }));\n }\n\n /**\n * Closes CMP (Content Meta Preview)\n *\n * @method closeContentMetaPreview\n */\n closeContentMetaPreview() {\n this.setState(() => ({ ...CONTENT_META_PREVIEW_BASE_STATE }));\n }\n\n /**\n * Sets content types map state\n *\n * @method setContentTypesMap\n * @param {Object} response\n */\n setContentTypesMap(response) {\n if (!response || !response.ContentTypeInfoList) {\n return;\n }\n\n const contentTypesMap = response.ContentTypeInfoList.ContentType.reduce((total, item) => {\n total[item._href] = item;\n\n return total;\n }, {});\n\n this.setState(() => ({ contentTypesMap }));\n }\n\n /**\n * Renders content meta preview\n *\n * @method renderContentMetaPreview\n * @returns {Element}\n */\n renderContentMetaPreview() {\n if (!this.state.contentMeta) {\n return null;\n }\n\n const { contentTypesMap, maxHeight, activeTab, contentMeta, isPreviewMetaReady } = this.state;\n const { loadContentInfo, restInfo, languages } = this.props;\n const isContentBookmarked = this.isBookmarked(contentMeta.id);\n\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Renders selected content list\n *\n * @method renderSelectedContent\n * @returns {Element}\n */\n renderSelectedContent() {\n const items = this.state.selectedContent;\n const { selectedItemsLimit, multiple } = this.props;\n\n if (this.state.activeTab === TAB_CREATE || !multiple) {\n return null;\n }\n\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Gets a specific tab config\n *\n * @method getTabConfig\n * @param {String} id\n * @param {String} iconIdentifier\n * @returns {Object}\n */\n getTabConfig(id, iconIdentifier) {\n return {\n id,\n iconIdentifier: iconIdentifier ? iconIdentifier : id,\n title: this.tabsLabels[id],\n onClick: this.togglePanel,\n isSelected: this.state.activeTab === id,\n };\n }\n\n /**\n * Renders tabs\n *\n * @method renderTabs\n * @returns {Element}\n */\n renderTabs() {\n const { extraTabs, visibleTabs, onlyContentOnTheFly } = this.props;\n\n const browseTabConfig = this.getTabConfig(TAB_BROWSE);\n const searchTabConfig = this.getTabConfig(TAB_SEARCH);\n const createTabConfig = this.getTabConfig(TAB_CREATE);\n const bookmarksTabConfig = this.getTabConfig(TAB_BOOKMARKS, 'bookmark');\n\n let tabsToRender = [browseTabConfig, searchTabConfig, createTabConfig, bookmarksTabConfig, ...extraTabs];\n\n // @Deprecated - `onlyContentOnTheFly` will be removed in 2.0\n if (visibleTabs.length === 1 || onlyContentOnTheFly) {\n return null;\n }\n\n if (visibleTabs.length) {\n tabsToRender = visibleTabs.map((tab) => {\n return tabsToRender.find((config) => config.id === tab);\n });\n }\n\n return ;\n }\n\n /**\n * Renders a single tabs\n *\n * @method renderSingleTab\n * @param {Object} tab\n * @returns {Element}\n */\n renderSingleTab(tab) {\n const attrs = { id: tab.id, title: tab.title, onClick: this.togglePanel, isSelected: this.state.activeTab === tab.id };\n\n if (tab.iconIdentifier) {\n attrs.iconIdentifier = tab.iconIdentifier;\n }\n\n return ;\n }\n\n /**\n * Renders panels\n *\n * @method renderPanels\n * @returns {Element}\n */\n renderPanels() {\n const {\n extraTabs,\n visibleTabs,\n sortFieldMappings,\n sortOrderMappings,\n languages,\n contentTypes,\n cotfPreselectedContentType,\n cotfForcedLanguage,\n cotfAllowedLanguages,\n cotfPreselectedLanguage,\n cotfAllowedContentTypes,\n cotfPreselectedLocation,\n cotfAllowedLocations,\n onlyContentOnTheFly,\n } = this.props;\n const { userBookmarksItems, userBookmarksCount, contentTypesMap } = this.state;\n const browsePanelConfig = { id: TAB_BROWSE, panel: FinderPanelComponent, attrs: { sortFieldMappings, sortOrderMappings } };\n const searchPanelConfig = { id: TAB_SEARCH, panel: SearchPanelComponent };\n const bookmarksPanelConfig = {\n id: TAB_BOOKMARKS,\n panel: BookmarksPanelComponent,\n attrs: { userBookmarksItems, userBookmarksCount, requireBookmarksCount: this.requireBookmarksCount },\n };\n const createPanelConfig = {\n id: TAB_CREATE,\n panel: CreatePanelComponent,\n attrs: {\n languages,\n contentTypes,\n onLanguageSelected: this.onLanguageSelected,\n onContentTypeSelected: this.onContentTypeSelected,\n contentTypesMap: this.state.contentTypesMap,\n forcedLanguage: cotfForcedLanguage,\n preselectedLanguage: cotfPreselectedLanguage,\n allowedLanguages: cotfAllowedLanguages,\n preselectedContentType: cotfPreselectedContentType,\n allowedContentTypes: cotfAllowedContentTypes,\n preselectedLocation: cotfPreselectedLocation,\n allowedLocations: cotfAllowedLocations,\n sortFieldMappings,\n sortOrderMappings,\n },\n };\n let panelsToRender = [browsePanelConfig, searchPanelConfig, createPanelConfig, bookmarksPanelConfig, ...extraTabs];\n\n if (!Object.keys(contentTypesMap).length) {\n return null;\n }\n\n if (onlyContentOnTheFly) {\n console.warn('[DEPRECATED] onlyContentOnTheFly parameter is deprecated');\n console.warn('[DEPRECATED] it will be removed from ezplatform-admin-ui-modules 2.0');\n console.warn('[DEPRECATED] use visibleTabs instead');\n\n return
    {this.renderSinglePanel(createPanelConfig)}
    ;\n }\n\n if (visibleTabs.length) {\n panelsToRender = visibleTabs.map((tab) => panelsToRender.find((config) => config.id === tab));\n }\n\n return
    {panelsToRender.map(this.renderSinglePanel)}
    ;\n }\n\n /**\n * Renders a single panel\n *\n * @method renderSinglePanel\n * @param {Object} item\n * @returns {Element}\n */\n renderSinglePanel(item) {\n const Panel = item.panel;\n const {\n startingLocationId,\n findLocationsByParentLocationId,\n findContentBySearchQuery,\n multiple,\n searchResultsPerPage,\n bookmarksPerPage,\n restInfo,\n allowContainersOnly,\n } = this.props;\n\n const { activeTab, maxHeight, contentTypesMap, selectedContent } = this.state;\n const isVisible = activeTab === item.id;\n\n if (!isVisible) {\n return null;\n }\n\n const attrs = {\n isVisible,\n onItemSelect: this.onItemSelect,\n maxHeight: maxHeight - 32,\n id: item.id,\n allowContainersOnly,\n startingLocationId,\n findLocationsByParentLocationId,\n findContentBySearchQuery,\n contentTypesMap,\n multiple,\n searchResultsPerPage,\n bookmarksPerPage,\n restInfo,\n selectedContent,\n onSelectContent: this.updateSelectedContent,\n canSelectContent: this.canSelectContent,\n onItemRemove: this.onItemRemove,\n ...item.attrs,\n };\n\n return ;\n }\n\n /**\n * Renders a confirm button\n *\n * @method renderConfirmBtn\n * @returns {Element}\n */\n renderConfirmBtn() {\n const { activeTab, selectedContent, canSelectContent, isPreviewMetaReady } = this.state;\n const { multiple } = this.props;\n const onClick = multiple ? this.handleConfirm : this.handleSingleConfirm;\n const attrs = {\n className: 'm-ud__action m-ud__action--confirm',\n type: 'button',\n onClick,\n };\n\n if (activeTab === TAB_CREATE) {\n return null;\n }\n\n if ((multiple && !selectedContent.length) || (!multiple && (!isPreviewMetaReady || !canSelectContent))) {\n attrs.disabled = true;\n attrs.title = 'The Content Type is not allowed for selection';\n }\n\n const confirmBtnLabel = Translator.trans(/*@Desc(\"Confirm\")*/ 'confirm.label', {}, 'universal_discovery_widget');\n\n return ;\n }\n\n /**\n * Does a permission checking\n *\n * @method renderSinglePanel\n * @param {Object} item\n * @returns {Element}\n */\n checkPermission() {\n checkCreatePermission(\n {\n token: this.props.restInfo.token,\n contentTypeIdentifier: this.state.selectedContentType.identifier,\n languageCode: this.state.selectedLanguage.languageCode,\n locationId: this.state.contentMeta.id,\n },\n this.updatePermissionsState\n );\n }\n\n /**\n * Updates a permission state\n *\n * @method updatePermissionsState\n * @param {Object} response\n */\n updatePermissionsState(response) {\n this.setState(() => ({ hasPermission: response.access }));\n }\n\n /**\n * Renders a create content button\n *\n * @method renderCreateBtn\n * @returns {Element}\n */\n renderCreateBtn() {\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType.identifier && this.state.contentMeta;\n const attrs = {\n type: 'button',\n className: 'm-ud__action m-ud__action--create-content',\n onClick: this.setCreateModeState,\n disabled: !this.state.hasPermission || !isDataSelected || !this.state.isLocationAllowed,\n };\n\n if (this.state.activeTab !== TAB_CREATE) {\n return null;\n }\n\n if (isDataSelected) {\n this.checkPermission();\n }\n\n const createContentLabel = Translator.trans(\n /*@Desc(\"Create content\")*/ 'content_on_the_fly.create_content.label',\n {},\n 'universal_discovery_widget'\n );\n\n return ;\n }\n\n /**\n * Renders permission error\n *\n * @method renderPermissionError\n * @returns {Element}\n */\n renderPermissionError() {\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType && this.state.contentMeta;\n\n if (this.state.hasPermission || !isDataSelected) {\n return null;\n }\n\n const noPermissionMessage = Translator.trans(\n /*@Desc(\"Sorry, but you don't have permission for this action. Please contact your site Admin.\")*/ 'content_on_the_fly.no_permission.message',\n {},\n 'universal_discovery_widget'\n );\n\n return {noPermissionMessage};\n }\n\n /**\n * Renders not allowed location error\n *\n * @method renderNotAllowedLocationError\n * @returns {Element}\n */\n renderNotAllowedLocationError() {\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType && this.state.contentMeta;\n\n if (this.state.isLocationAllowed || !isDataSelected || this.state.activeTab !== TAB_CREATE) {\n return null;\n }\n\n const locationNotAllowedMessage = Translator.trans(\n /*@Desc(\"Sorry, but this location is not selectable.\")*/ 'content_on_the_fly.location_not_allowed.message',\n {},\n 'universal_discovery_widget'\n );\n\n return {locationNotAllowedMessage};\n }\n\n setMainContainerRef(ref) {\n this._refMainContainer = ref;\n }\n\n setContentContainerRef(ref) {\n this._refContentContainer = ref;\n }\n\n render() {\n const componentClassName = 'm-ud';\n const metaPreviewClassName = !!this.state.contentMeta ? `${componentClassName}--with-preview` : '';\n const selectedContentClassName = this.state.selectedContent.length ? `${componentClassName}--with-selected-content` : '';\n const containerClassName = `${componentClassName} ${selectedContentClassName} ${metaPreviewClassName}`;\n const isDataSelected = this.state.selectedLanguage && this.state.selectedContentType.identifier && this.state.contentMeta;\n\n if (this.state.isCreateMode && this.state.activeTab === TAB_CREATE && isDataSelected && this.state.hasPermission) {\n return (\n \n );\n }\n\n const cancelBtnLabel = Translator.trans(/*@Desc(\"Cancel\")*/ 'cancel.label', {}, 'universal_discovery_widget');\n\n return (\n
    \n
    \n

    {this.props.title}

    \n
    \n {this.renderTabs()}\n
    \n {this.renderPanels()}\n {this.renderContentMetaPreview()}\n
    \n
    \n {this.renderSelectedContent()}\n
    \n {this.renderPermissionError()}\n {this.renderNotAllowedLocationError()}\n \n {this.renderConfirmBtn()}\n {this.renderCreateBtn()}\n
    \n
    \n
    \n
    \n
    \n );\n }\n}\n\neZ.addConfig('modules.UniversalDiscovery', UniversalDiscoveryModule);\n\nUniversalDiscoveryModule.propTypes = {\n onConfirm: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n title: PropTypes.string,\n multiple: PropTypes.bool,\n activeTab: PropTypes.string,\n loadContentInfo: PropTypes.func,\n loadContentTypes: PropTypes.func,\n canSelectContent: PropTypes.func,\n selectedItemsLimit: PropTypes.number,\n startingLocationId: PropTypes.number,\n findContentBySearchQuery: PropTypes.func,\n findLocationsByParentLocationId: PropTypes.func,\n extraTabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n panel: PropTypes.func.isRequired,\n attrs: PropTypes.object,\n })\n ),\n maxHeight: PropTypes.number,\n searchResultsPerPage: PropTypes.number,\n bookmarksPerPage: PropTypes.number,\n languages: PropTypes.object,\n contentTypes: PropTypes.object,\n allowContainersOnly: PropTypes.bool.isRequired,\n\n // @Deprecated - to be removed in 2.0\n onlyContentOnTheFly: PropTypes.bool,\n // @Deprecated - to be removed in 2.0\n cotfForcedLanguage: PropTypes.string,\n\n cotfPreselectedLanguage: PropTypes.string,\n cotfAllowedLanguages: PropTypes.array,\n cotfPreselectedContentType: PropTypes.string,\n cotfAllowedContentTypes: PropTypes.array,\n cotfPreselectedLocation: PropTypes.number,\n cotfAllowedLocations: PropTypes.array,\n visibleTabs: PropTypes.array,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n};\n\nUniversalDiscoveryModule.defaultProps = {\n title: 'Find content',\n multiple: true,\n selectedItemsLimit: 0,\n activeTab: TAB_BROWSE,\n loadContentInfo,\n loadContentTypes,\n findContentBySearchQuery,\n findLocationsByParentLocationId,\n canSelectContent: (item, callback) => callback(true),\n extraTabs: window.eZ.adminUiConfig.universalDiscoveryWidget.extraTabs || [],\n startingLocationId: 1,\n maxHeight: 500,\n searchResultsPerPage: 10,\n bookmarksPerPage: 10,\n languages: window.eZ.adminUiConfig.languages,\n contentTypes: window.eZ.adminUiConfig.contentTypes,\n allowContainersOnly: false,\n onlyContentOnTheFly: false,\n cotfForcedLanguage: '',\n cotfPreselectedLanguage: '',\n cotfAllowedLanguages: [],\n cotfPreselectedContentType: '',\n cotfAllowedContentTypes: [],\n cotfPreselectedLocation: null,\n cotfAllowedLocations: [],\n visibleTabs: [],\n sortFieldMappings: window.eZ.adminUiConfig.sortFieldMappings,\n sortOrderMappings: window.eZ.adminUiConfig.sortOrderMappings,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/universal.discovery.module.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst TabNavItemComponent = (props) => {\n const attrs = {\n type: 'button',\n className: `c-tab-nav-item ${props.isSelected ? 'c-tab-nav-item--selected' : ''}`,\n onClick: () => props.onClick(props.id),\n };\n\n return (\n
    \n \n
    \n );\n};\n\nTabNavItemComponent.propTypes = {\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n isSelected: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n iconIdentifier: PropTypes.string.isRequired,\n};\n\nexport default TabNavItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-nav/tab.nav.item.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport FinderComponent from '../finder/finder.component';\n\nconst FinderPanelComponent = (props) => {\n const wrapperAttrs = { className: 'c-finder-panel' };\n\n if (!props.isVisible) {\n wrapperAttrs.hidden = true;\n }\n\n return (\n
    \n \n \n \n
    \n );\n};\n\nFinderPanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n startingLocationId: PropTypes.number.isRequired,\n findLocationsByParentLocationId: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n allowContainersOnly: PropTypes.bool.isRequired,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\nexport default FinderPanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/finder.panel.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport FinderTreeLeafComponent from './finder.tree.leaf.component';\n\nexport default class FinderTreeBranchComponent extends Component {\n constructor(props) {\n super(props);\n\n this.expandBranch = this.expandBranch.bind(this);\n this.onLoadMore = this.onLoadMore.bind(this);\n this.removeLoadingStateFromItem = this.removeLoadingStateFromItem.bind(this);\n this.updateSelectedLocations = this.updateSelectedLocations.bind(this);\n this.renderLeaf = this.renderLeaf.bind(this);\n\n this.state = {\n currentlyLoadingLocationId: false,\n selectedLocationId: null,\n };\n }\n\n /**\n * Updates selected locations state\n *\n * @method updateSelectedLocations\n * @param {Object} location location struct\n * @memberof FinderTreeBranchComponent\n */\n updateSelectedLocations(location) {\n this.setState(\n () => ({ currentlyLoadingLocationId: location.id, selectedLocationId: location.id }),\n () =>\n this.props.onItemClick({\n parent: location.id,\n location,\n onDataLoaded: this.removeLoadingStateFromItem,\n })\n );\n }\n\n removeLoadingStateFromItem() {\n this.setState(() => ({ currentlyLoadingLocationId: false }));\n }\n\n expandBranch() {\n this.props.onBranchClick(this.props.parentLocation);\n }\n\n /**\n * Renders leaf (the single content item)\n *\n * @method renderLeaf\n * @param {Object} data location response\n * @returns {Element}\n * @memberof FinderTreeBranchComponent\n */\n renderLeaf(data) {\n const location = data.value.Location;\n const isLoadingChildren = location.id === this.state.currentlyLoadingLocationId;\n const contentTypesMap = this.props.contentTypesMap;\n const contentTypeHref = location.ContentInfo.Content.ContentType._href;\n const isContainer = contentTypesMap && contentTypesMap[contentTypeHref] && contentTypesMap[contentTypeHref].isContainer;\n const isSelectable = !(this.props.allowContainersOnly && !isContainer);\n const selected = location.id === this.state.selectedLocationId;\n\n return (\n \n );\n }\n\n onLoadMore() {\n this.props.onLoadMore(this.props.parentLocation);\n }\n\n /**\n * Render load more button\n *\n * @method renderLoadMore\n * @returns {Element}\n * @memberof FinderTreeBranchComponent\n */\n renderLoadMore() {\n const { items, total } = this.props;\n\n if (!items.length || items.length === total) {\n return null;\n }\n\n const loadMoreLabel = Translator.trans(/*@Desc(\"Load more\")*/ 'finder.branch.load_more.label', {}, 'universal_discovery_widget');\n\n return (\n \n );\n }\n\n render() {\n const items = this.props.items;\n const attrs = {\n className: 'c-finder-tree-branch',\n style: { height: `${this.props.maxHeight}px` },\n };\n\n if (!items.length) {\n attrs.className = `${attrs.className} c-finder-tree-branch--collapsed`;\n attrs.onClick = this.expandBranch;\n }\n\n return (\n
    \n
    \n {this.props.items.map(this.renderLeaf)}\n {this.renderLoadMore()}\n
    \n
    \n );\n }\n}\n\nFinderTreeBranchComponent.propTypes = {\n items: PropTypes.array.isRequired,\n total: PropTypes.number.isRequired,\n parentLocation: PropTypes.object,\n onItemClick: PropTypes.func.isRequired,\n onBranchClick: PropTypes.func.isRequired,\n selectedLocations: PropTypes.array.isRequired,\n onLoadMore: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n allowContainersOnly: PropTypes.bool,\n contentTypesMap: PropTypes.object,\n allowedLocations: PropTypes.array.isRequired,\n multiple: PropTypes.bool.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/finder/finder.tree.branch.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport SelectContentButtonComponent from '../select-content-button/select.content.button.component';\nimport Icon from '../../../common/icon/icon';\n\nexport default class FinderTreeLeafComponent extends Component {\n constructor(props) {\n super(props);\n\n this.handleClick = this.handleClick.bind(this);\n }\n\n /**\n * Handles clicks on a leaf\n *\n * @method handleClick\n * @memberof FinderTreeLeafComponent\n */\n handleClick(event) {\n const { location, isSelectable, onClick } = this.props;\n\n if (!isSelectable || event.target.closest('.c-finder-tree-leaf__btn--toggle-selection')) {\n return;\n }\n\n onClick(location);\n }\n\n getContentTypeIdentifier() {\n const { contentTypesMap, location } = this.props;\n const contentTypeHref = location.ContentInfo.Content.ContentType._href;\n const contentType = contentTypesMap ? contentTypesMap[contentTypeHref] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n\n return contentTypeIdentifier;\n }\n\n /**\n * Renders an icon of a content type\n *\n * @method renderIcon\n * @returns {JSX.Element|null}\n */\n renderIcon() {\n const contentTypeIdentifier = this.getContentTypeIdentifier();\n\n if (!contentTypeIdentifier) {\n return null;\n }\n\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n let extraClasses = 'ez-icon--small';\n\n if (this.props.selected) {\n extraClasses = `${extraClasses} ez-icon--light`;\n }\n\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Renders a loading state icon\n *\n * @method renderLoadingIcon\n * @returns {JSX.Element|null}\n * @memberof FinderTreeLeafComponent\n */\n renderLoadingIcon() {\n if (!this.props.selected || !this.props.isLoadingChildren) {\n return null;\n }\n\n return ;\n }\n\n renderSelectContentBtn() {\n const {\n isSelectable,\n multiple,\n selectedContent,\n location,\n onSelectContent,\n onItemRemove,\n canSelectContent,\n isLoadingChildren,\n } = this.props;\n\n if (!isSelectable || isLoadingChildren || !multiple) {\n return null;\n }\n\n return (\n content.id === location.id)}\n location={location}\n onSelectContent={onSelectContent}\n onItemRemove={onItemRemove}\n canSelectContent={canSelectContent}\n />\n );\n }\n\n render() {\n const { location, selected, isSelectable, isLoadingChildren, allowedLocations } = this.props;\n const isForcedLocation = allowedLocations.length === 1;\n const componentClassName = 'c-finder-tree-leaf';\n const isSelectedClassName = selected ? `${componentClassName}--selected` : '';\n const isNotSelectableClassName = !isSelectable || isForcedLocation ? `${componentClassName}--not-selectable` : '';\n const hasChildrenClassName = location.childCount ? `${componentClassName}--has-children` : '';\n const isLoadingChildrenClassName = isLoadingChildren ? `${componentClassName}--loading` : '';\n const attrs = {\n className: [\n componentClassName,\n isSelectedClassName,\n hasChildrenClassName,\n isLoadingChildrenClassName,\n isNotSelectableClassName,\n ].join(' '),\n };\n\n if (!isForcedLocation) {\n attrs.onClick = this.handleClick;\n }\n\n return (\n
    \n {this.renderIcon()}\n {location.ContentInfo.Content.Name}\n {this.renderLoadingIcon()}\n {this.renderSelectContentBtn()}\n
    \n );\n }\n}\n\nFinderTreeLeafComponent.propTypes = {\n location: PropTypes.object.isRequired,\n onClick: PropTypes.func.isRequired,\n selected: PropTypes.bool.isRequired,\n isLoadingChildren: PropTypes.bool.isRequired,\n isSelectable: PropTypes.bool.isRequired,\n allowedLocations: PropTypes.array.isRequired,\n multiple: PropTypes.bool.isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/finder/finder.tree.leaf.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport SearchComponent from '../search/search.component';\n\nconst SearchPanelComponent = (props) => {\n const wrapperAttrs = { className: 'c-search-panel' };\n const {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n searchResultsPerPage,\n restInfo,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n } = props;\n const searchAttrs = Object.assign(\n {},\n {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n searchResultsPerPage,\n restInfo,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n }\n );\n\n if (!props.isVisible) {\n wrapperAttrs.hidden = true;\n }\n\n return (\n
    \n \n \n \n
    \n );\n};\n\nSearchPanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n findContentBySearchQuery: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n searchResultsPerPage: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\nexport default SearchPanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/search.panel.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\nimport ContentTableComponent from '../content-table/content.table.component';\n\nexport default class SearchComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n items: [],\n isSearching: false,\n submitDisabled: true,\n };\n\n this.updateItemsState = this.updateItemsState.bind(this);\n this.searchContent = this.searchContent.bind(this);\n this.onRequireItemsCount = this.onRequireItemsCount.bind(this);\n this.toggleSubmitButtonState = this.toggleSubmitButtonState.bind(this);\n this.setSearchInputRef = this.setSearchInputRef.bind(this);\n }\n\n /**\n * Searches content by a query\n *\n * @method searchContent\n * @param {Event} event\n * @memberof SearchComponent\n */\n searchContent(event) {\n const isClickEvent = event.nativeEvent.type === 'click';\n const isEnterKeyEvent = event.nativeEvent.type === 'keyup' && event.nativeEvent.keyCode === 13;\n\n if (this.state.submitDisabled || (!isClickEvent && !isEnterKeyEvent)) {\n return;\n }\n\n this.setState(\n () => ({ isSearching: true }),\n () => {\n const promise = new Promise((resolve) =>\n this.props.findContentBySearchQuery(this.props.restInfo, this._refSearchInput.value, resolve)\n );\n\n promise\n .then(this.updateItemsState)\n .catch(() => window.eZ.helpers.notification.showErrorNotification('Cannot find content'));\n }\n );\n }\n\n /**\n * Updates items state with search results\n *\n * @param {Object} response content query REST endpoint response\n * @memberof SearchComponent\n */\n updateItemsState(response) {\n this.setState(() => ({\n items: response.View.Result.searchHits.searchHit.map((item) => item.value),\n isSearching: false,\n }));\n }\n\n /**\n * Checks whether a requested amount items fits the actual number of items.\n *\n * @method onRequireItemsCount\n * @param {Number} count\n */\n onRequireItemsCount(count) {\n const { items } = this.state;\n\n if (count > items.length) {\n throw new Error('All items loaded.');\n }\n }\n\n /**\n * Renders the submit button\n *\n * @method renderSubmitBtn\n */\n renderSubmitBtn() {\n const btnAttrs = { className: 'c-search__submit', type: 'button' };\n let svgExtraClasses = 'ez-icon--small ez-icon--light';\n const btnLabel = Translator.trans(/*@Desc(\"Search\")*/ 'search.submit.label', {}, 'universal_discovery_widget');\n let iconIdentifier = 'search';\n\n if (this.state.isSearching) {\n btnAttrs.className = `${btnAttrs.className} c-search__submit--loading`;\n btnAttrs.disabled = true;\n svgExtraClasses = `${svgExtraClasses} ez-spin ez-icon-x2 ez-icon-spinner`;\n iconIdentifier = 'spinner';\n } else if (this.state.submitDisabled) {\n btnAttrs.disabled = true;\n } else {\n btnAttrs.onClick = this.searchContent;\n }\n\n return (\n \n );\n }\n\n /**\n * Toggles the submit button state.\n * Disables it when the search query is empty.\n *\n * @method toggleSubmitButtonState\n */\n toggleSubmitButtonState() {\n this.setState(() => ({ submitDisabled: !this._refSearchInput.value.trim().length }));\n }\n\n /**\n * Set a reference to the search input HTMLElement node\n *\n * @method setSearchInputRef\n * @param {HTMLElement} ref\n */\n setSearchInputRef(ref) {\n this._refSearchInput = ref;\n }\n\n render() {\n const {\n onItemSelect,\n searchResultsPerPage,\n contentTypesMap,\n maxHeight,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n multiple,\n } = this.props;\n const title = Translator.trans(/*@Desc(\"Search\")*/ 'search.title', {}, 'universal_discovery_widget');\n const tableTitle = Translator.trans(/*@Desc(\"Search results\")*/ 'search.content_table.title', {}, 'universal_discovery_widget');\n\n return (\n
    \n
    {title}:
    \n
    \n \n {this.renderSubmitBtn()}\n
    \n \n
    \n );\n }\n}\n\nSearchComponent.propTypes = {\n findContentBySearchQuery: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n searchResultsPerPage: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/search/search.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ContentTablePaginationComponent = (props) => {\n const { minIndex, activeIndex, maxIndex, onChange } = props;\n const btnFirstLabel = Translator.trans(/*@Desc(\"First\")*/ 'pagination.first', {}, 'universal_discovery_widget');\n const btnPrevLabel = Translator.trans(/*@Desc(\"Previous\")*/ 'pagination.prev', {}, 'universal_discovery_widget');\n const btnNextLabel = Translator.trans(/*@Desc(\"Next\")*/ 'pagination.next', {}, 'universal_discovery_widget');\n const btnLastLabel = Translator.trans(/*@Desc(\"Last\")*/ 'pagination.last', {}, 'universal_discovery_widget');\n const btnClass = 'c-content-table-pagination__btn';\n const firstAttrs = {\n type: 'button',\n onClick: () => onChange(minIndex),\n className: `${btnClass} ${btnClass}--first`,\n };\n const prevAttrs = {\n type: 'button',\n onClick: () => onChange(activeIndex - 1),\n className: `${btnClass} ${btnClass}--prev ${btnClass}--middle`,\n };\n const nextAttrs = {\n type: 'button',\n onClick: () => onChange(activeIndex + 1),\n className: `${btnClass} ${btnClass}--next ${btnClass}--middle`,\n };\n const lastAttrs = {\n type: 'button',\n onClick: () => onChange(maxIndex),\n className: `${btnClass} ${btnClass}--last`,\n };\n\n if (activeIndex === minIndex) {\n firstAttrs.disabled = true;\n prevAttrs.disabled = true;\n }\n\n if (activeIndex === maxIndex) {\n nextAttrs.disabled = true;\n lastAttrs.disabled = true;\n }\n\n return (\n
    \n \n \n \n \n
    \n );\n};\n\nContentTablePaginationComponent.propTypes = {\n minIndex: PropTypes.number.isRequired,\n maxIndex: PropTypes.number.isRequired,\n activeIndex: PropTypes.number.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n\nexport default ContentTablePaginationComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.pagination.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport SelectContentButtonComponent from '../select-content-button/select.content.button.component';\nimport Icon from '../../../common/icon/icon';\n\nconst ContentTableItemComponent = (props) => {\n const { onPreview, data, contentTypesMap, multiple, selectedContent, onSelectContent, onItemRemove, canSelectContent } = props;\n const notAvailableLabel = Translator.trans(/*@Desc(\"N/A\")*/ 'content_table.not_available.label', {}, 'universal_discovery_widget');\n const item = data.ContentInfo.Content;\n const contentType = contentTypesMap ? contentTypesMap[item.ContentType._href] : null;\n const contentTypeIdentifier = contentType ? contentType.identifier : null;\n const contentTypeName = contentTypeIdentifier ? window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier] : notAvailableLabel;\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return (\n
    \n
    \n \n
    \n
    \n {item.Name}\n
    \n
    \n {contentTypeName}\n
    \n
    \n \n
    \n
    \n );\n};\n\nContentTableItemComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onPreview: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n onItemClick: PropTypes.func,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\nexport default ContentTableItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.item.component.js","import React from 'react';\n\nconst ContentTableHeaderComponent = () => {\n const nameLabel = Translator.trans(/*@Desc(\"Name\")*/ 'content_table.header.name', {}, 'universal_discovery_widget');\n const typeLabel = Translator.trans(/*@Desc(\"Content Type\")*/ 'content_table.header.type', {}, 'universal_discovery_widget');\n\n return (\n
    \n
    \n
    {nameLabel}
    \n
    {typeLabel}
    \n
    \n
    \n );\n};\n\nexport default ContentTableHeaderComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-table/content.table.header.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport FinderComponent from '../finder/finder.component';\nimport CreateComponent from '../create/create.component';\n\nconst CreatePanelComponent = (props) => {\n const wrapperAttrs = { className: 'c-create-panel' };\n const maxHeight = props.maxHeight - 24;\n const componentProps = { ...props, maxHeight, allowContainersOnly: true };\n const finderProps = { ...componentProps, multiple: false };\n const chooseLanguageAndContentTypeTitle = Translator.trans(\n /*@Desc(\"Choose Language and Content Type\")*/ 'content_on_the_fly.choose_language_and_content_type.title',\n {},\n 'universal_discovery_widget'\n );\n const selectLocationTitle = Translator.trans(\n /*@Desc(\"Select Location\")*/ 'content_on_the_fly.select_location.title',\n {},\n 'universal_discovery_widget'\n );\n\n if (!props.isVisible) {\n wrapperAttrs.hidden = true;\n }\n\n return (\n
    \n \n
    \n
    1) {chooseLanguageAndContentTypeTitle}
    \n \n
    \n
    \n
    2) {selectLocationTitle}
    \n \n
    \n
    \n
    \n );\n};\n\nCreatePanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n startingLocationId: PropTypes.number.isRequired,\n findLocationsByParentLocationId: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n languages: PropTypes.object.isRequired,\n contentTypes: PropTypes.object.isRequired,\n onLanguageSelected: PropTypes.func.isRequired,\n onContentTypeSelected: PropTypes.func.isRequired,\n forcedLanguage: PropTypes.string.isRequired,\n preselectedLocation: PropTypes.number,\n allowedLocations: PropTypes.array.isRequired,\n allowedLanguages: PropTypes.array.isRequired,\n sortFieldMappings: PropTypes.object.isRequired,\n sortOrderMappings: PropTypes.object.isRequired,\n};\n\nexport default CreatePanelComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/create.panel.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ChooseLanguageComponent from './choose.language.component';\nimport ChooseContentTypeComponent from './choose.content.type.component';\n\nconst CreateComponent = (props) => {\n return (\n
    \n \n \n
    \n );\n};\n\nCreateComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n languages: PropTypes.object.isRequired,\n contentTypes: PropTypes.object.isRequired,\n onLanguageSelected: PropTypes.func.isRequired,\n onContentTypeSelected: PropTypes.func.isRequired,\n forcedLanguage: PropTypes.string.isRequired,\n allowedLanguages: PropTypes.array.isRequired,\n preselectedContentType: PropTypes.string,\n allowedContentTypes: PropTypes.array.isRequired,\n preselectedLanguage: PropTypes.string,\n};\n\nexport default CreateComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/create/create.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class ChooseLanguageComponent extends Component {\n constructor(props) {\n super(props);\n\n this.updateSelection = this.updateSelection.bind(this);\n this.renderOption = this.renderOption.bind(this);\n\n let selectedLanguageCode = props.allowedLanguages.length ? props.allowedLanguages[0] : props.languages.priority[0];\n\n if (props.preselectedLanguage) {\n selectedLanguageCode = props.preselectedLanguage;\n }\n\n if (props.forcedLanguage) {\n console.warn('[DEPRECATED] cotfForcedLanguage parameter is deprecated');\n console.warn('[DEPRECATED] it will be removed from ezplatform-admin-ui-modules 2.0');\n console.warn('[DEPRECATED] use cotfAllowedLanguages instead');\n\n selectedLanguageCode = props.forcedLanguage;\n }\n\n if (props.allowedLanguages.length === 1) {\n selectedLanguageCode = props.allowedLanguages[0];\n }\n\n this.state = {\n selectedLanguage: props.languages.mappings[selectedLanguageCode],\n };\n }\n\n componentDidMount() {\n this.props.onLanguageSelected(this.state.selectedLanguage);\n }\n\n updateSelection(event) {\n const languageCode = event.target.value;\n const selectedLanguage = this.props.languages.mappings[languageCode];\n\n this.props.onLanguageSelected(selectedLanguage);\n\n this.setState((state) => Object.assign({}, state, { selectedLanguage }));\n }\n\n renderOption(languageCode, index) {\n const language = this.props.languages.mappings[languageCode];\n const attrs = {\n key: index,\n value: language.languageCode,\n };\n\n if (this.state.selectedLanguage.languageCode === languageCode) {\n attrs.selected = true;\n }\n\n return ;\n }\n\n renderOptions() {\n const { allowedLanguages, languages } = this.props;\n const languagesList = allowedLanguages.length ? allowedLanguages : languages.priority;\n\n return languagesList.map(this.renderOption);\n }\n\n render() {\n const selectAttrs = {\n className: 'form-control',\n onChange: this.updateSelection,\n };\n const selectLanguageTitle = Translator.trans(\n /*@Desc(\"Select a language\")*/ 'content_on_the_fly.select_language.title',\n {},\n 'universal_discovery_widget'\n );\n\n if (this.props.forcedLanguage) {\n console.warn('[DEPRECATED] forcedLanguage parameter is deprecated');\n console.warn('[DEPRECATED] it will be removed from ezplatform-admin-ui-modules 2.0');\n console.warn('[DEPRECATED] use allowedLanguages instead');\n }\n\n // @Deprecated - `forcedLanguage` will be removed in 2.0\n if (this.props.allowedLanguages.length === 1 || this.props.forcedLanguage) {\n selectAttrs.disabled = true;\n }\n\n return (\n
    \n

    {selectLanguageTitle}

    \n
    \n \n
    \n
    \n );\n }\n}\n\nChooseLanguageComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n languages: PropTypes.object.isRequired,\n onLanguageSelected: PropTypes.func.isRequired,\n forcedLanguage: PropTypes.string.isRequired,\n allowedLanguages: PropTypes.array.isRequired,\n preselectedLanguage: PropTypes.string,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/create/choose.language.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class ChooseContentTypeComponent extends Component {\n constructor(props) {\n super(props);\n\n let selectedContentType = {};\n const { allowedContentTypes, preselectedContentType } = props;\n const isForcedContentType = allowedContentTypes.length === 1;\n const hasPreselectedAllowedContentType = !allowedContentTypes.length || allowedContentTypes.includes(props.preselectedContentType);\n const isPreselectedContentType = preselectedContentType && hasPreselectedAllowedContentType;\n\n this._filterTimeout = null;\n\n this.updateFilterQuery = this.updateFilterQuery.bind(this);\n this.renderGroup = this.renderGroup.bind(this);\n this.renderItem = this.renderItem.bind(this);\n\n if (isForcedContentType) {\n selectedContentType = this.findContentType(allowedContentTypes[0]);\n } else if (isPreselectedContentType) {\n selectedContentType = this.findContentType(preselectedContentType);\n }\n\n this.state = {\n selectedContentType,\n filterQuery: '',\n };\n }\n\n componentDidMount() {\n this.props.onContentTypeSelected(this.state.selectedContentType);\n }\n\n findContentType(identifier) {\n let contentType = null;\n\n Object.values(this.props.contentTypes).forEach((group) => {\n const result = group.find((contentType) => contentType.identifier === identifier);\n\n if (result) {\n contentType = result;\n }\n });\n\n return contentType;\n }\n\n updateSelectedItem(selectedContentType) {\n this.props.onContentTypeSelected(selectedContentType);\n\n this.setState((state) => Object.assign({}, state, { selectedContentType }));\n }\n\n updateFilterQuery(event) {\n const filterQuery = event.target.value.toLowerCase();\n\n window.clearTimeout(this._filterTimeout);\n\n this._filterTimeout = window.setTimeout(() => {\n this.setState((state) => Object.assign({}, state, { filterQuery }));\n }, 200);\n }\n\n renderItem(item, index) {\n const isNotSelectable = this.props.allowedContentTypes.length && !this.props.allowedContentTypes.includes(item.identifier);\n const attrs = {\n className: 'c-choose-content-type__group-item',\n key: index,\n };\n\n if (this.state.selectedContentType.identifier === item.identifier) {\n attrs.className = `${attrs.className} is-selected`;\n }\n\n if (isNotSelectable) {\n attrs.className = `${attrs.className} is-not-selectable`;\n }\n\n if (!isNotSelectable) {\n attrs.onClick = this.updateSelectedItem.bind(this, item);\n }\n\n if (this.state.filterQuery && !item.name.toLowerCase().includes(this.state.filterQuery)) {\n attrs.hidden = true;\n }\n\n return
    {item.name}
    ;\n }\n\n renderGroup(groupName, index) {\n const items = this.props.contentTypes[groupName];\n const groupAttrs = {};\n\n if (this.state.filterQuery && items.every((item) => !item.name.toLowerCase().includes(this.state.filterQuery))) {\n groupAttrs.hidden = true;\n }\n\n return (\n
    \n
    \n {groupName}\n
    \n {items.map(this.renderItem)}\n
    \n );\n }\n\n render() {\n const { maxHeight, contentTypes } = this.props;\n const selectContentTypeTitle = Translator.trans(\n /*@Desc(\"Select a Content Type\")*/ 'content_on_the_fly.select_a_content_type.title',\n {},\n 'universal_discovery_widget'\n );\n const typeToRefinePlaceholder = Translator.trans(\n /*@Desc(\"Type to refine\")*/ 'content_on_the_fly.type_to_refine.placeholder',\n {},\n 'universal_discovery_widget'\n );\n\n return (\n
    \n

    {selectContentTypeTitle}

    \n
    \n \n
    \n {Object.keys(contentTypes).map(this.renderGroup)}\n
    \n
    \n
    \n );\n }\n}\n\nChooseContentTypeComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n contentTypes: PropTypes.object.isRequired,\n onContentTypeSelected: PropTypes.func.isRequired,\n preselectedContentType: PropTypes.string,\n allowedContentTypes: PropTypes.array.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/create/choose.content.type.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport TabContentPanelComponent from './tab.content.panel.component';\nimport BookmarksComponent from '../bookmarks/bookmarks.component';\n\nexport default class BookmarksPanelComponent extends Component {\n getBookmarksAttrs() {\n const {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n bookmarksPerPage,\n restInfo,\n userBookmarksItems,\n userBookmarksCount,\n requireBookmarksCount,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n } = this.props;\n\n return {\n multiple,\n findContentBySearchQuery,\n onItemSelect,\n maxHeight,\n contentTypesMap,\n bookmarksPerPage,\n restInfo,\n userBookmarksItems,\n userBookmarksCount,\n requireBookmarksCount,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n };\n }\n\n getWrapperAttrs() {\n const { isVisible } = this.props;\n\n return {\n hidden: !isVisible,\n };\n }\n\n render() {\n const wrapperAttrs = this.getWrapperAttrs();\n const bookmarksAttrs = this.getBookmarksAttrs();\n\n return (\n
    \n \n \n \n
    \n );\n }\n}\n\nBookmarksPanelComponent.propTypes = {\n isVisible: PropTypes.bool.isRequired,\n multiple: PropTypes.bool.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n findContentBySearchQuery: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n bookmarksPerPage: PropTypes.number.isRequired,\n userBookmarksItems: PropTypes.array,\n userBookmarksCount: PropTypes.number,\n requireBookmarksCount: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/tab-content/bookmarks.panel.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nimport ContentTableComponent from '../content-table/content.table.component';\n\nexport default class BookmarksComponent extends Component {\n renderTable() {\n const { userBookmarksCount, userBookmarksItems } = this.props;\n\n if (userBookmarksCount === null) {\n return null;\n }\n\n const {\n onItemSelect,\n bookmarksPerPage,\n contentTypesMap,\n requireBookmarksCount,\n selectedContent,\n onSelectContent,\n canSelectContent,\n onItemRemove,\n multiple,\n } = this.props;\n const noBookmarksMessage = Translator.trans(\n /*@Desc(\"No content items. Content items you bookmark will appear here.\")*/ 'bookmarks_table.no_bookmarks.message',\n {},\n 'universal_discovery_widget'\n );\n const tableTitle = Translator.trans(/*@Desc(\"Bookmarks\")*/ 'bookmarks_table.title', {}, 'universal_discovery_widget');\n\n return (\n \n );\n }\n\n renderSpinner() {\n const { userBookmarksCount } = this.props;\n\n if (userBookmarksCount === null) {\n return ;\n }\n }\n\n renderNoBookmarksInfo() {\n const { userBookmarksCount } = this.props;\n const noBookmarksMessage = Translator.trans(\n /*@Desc(\"No content items. Content items you bookmark will appear here.\")*/ 'bookmarks_table.no_bookmarks.message',\n {},\n 'universal_discovery_widget'\n );\n\n if (!userBookmarksCount) {\n return
    {noBookmarksMessage}
    ;\n }\n }\n\n render() {\n const { maxHeight } = this.props;\n\n return (\n
    \n {this.renderSpinner()}\n {this.renderNoBookmarksInfo()}\n {this.renderTable()}\n
    \n );\n }\n}\n\nBookmarksComponent.propTypes = {\n findContentBySearchQuery: PropTypes.func.isRequired,\n onItemSelect: PropTypes.func.isRequired,\n maxHeight: PropTypes.number.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n bookmarksPerPage: PropTypes.number.isRequired,\n userBookmarksCount: PropTypes.number,\n userBookmarksItems: PropTypes.array,\n requireBookmarksCount: PropTypes.func.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n selectedContent: PropTypes.array.isRequired,\n onSelectContent: PropTypes.func.isRequired,\n canSelectContent: PropTypes.func.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n multiple: PropTypes.bool.isRequired,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/bookmarks/bookmarks.component.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nimport { loadLocation } from '../../services/universal.discovery.service';\n\nexport default class ContentCreatorComponent extends Component {\n constructor(props) {\n super(props);\n\n this.handleIframeLoad = this.handleIframeLoad.bind(this);\n this.handlePublish = this.handlePublish.bind(this);\n this.enablePublishBtn = this.enablePublishBtn.bind(this);\n this.disablePublishBtn = this.disablePublishBtn.bind(this);\n this.renderPublishBtn = this.renderPublishBtn.bind(this);\n\n this._refIframe = null;\n\n this.state = {\n iframeLoading: true,\n publishBtnDisabled: false,\n };\n }\n\n handlePublish() {\n this._refIframe.contentWindow.onbeforeunload = () => {};\n this._refIframe.contentWindow.document.body.querySelector('#ezrepoforms_content_edit_publish').click();\n }\n\n handleIframeLoad() {\n const iframeWindow = this._refIframe.contentWindow;\n const iframeDoc = iframeWindow.document;\n const locationId = iframeDoc.querySelector('meta[name=\"LocationID\"]');\n const iframeUrl = this.generateIframeUrl();\n\n if (iframeWindow.location.pathname !== iframeUrl && !locationId) {\n this._refIframe.setAttribute('src', iframeUrl);\n\n return;\n }\n\n if (locationId) {\n this.loadLocationInfo(locationId.content);\n } else {\n this.setState((state) => Object.assign({}, state, { iframeLoading: false }));\n\n iframeWindow.onbeforeunload = () => {\n return '';\n };\n iframeWindow.onunload = () => {\n this.setState((state) => Object.assign({}, state, { iframeLoading: true }));\n };\n }\n\n iframeDoc.body.addEventListener('fbFormBuilderLoaded', this.disablePublishBtn, false);\n iframeDoc.body.addEventListener('fbFormBuilderUnloaded', this.enablePublishBtn, false);\n }\n\n enablePublishBtn() {\n this.setState(() => ({ publishBtnDisabled: false }));\n }\n\n disablePublishBtn() {\n this.setState(() => ({ publishBtnDisabled: true }));\n }\n\n loadLocationInfo(locationId) {\n const { loadLocation, handlePublish, restInfo } = this.props;\n const promise = new Promise((resolve) => loadLocation(Object.assign({}, restInfo, { locationId }), resolve));\n\n promise.then((response) => {\n handlePublish(response.View.Result.searchHits.searchHit[0].value.Location);\n });\n }\n\n generateIframeUrl() {\n const { selectedLocationId, selectedLanguage, selectedContentType } = this.props;\n\n return window.Routing.generate('ezplatform.content_on_the_fly.create', {\n locationId: selectedLocationId,\n languageCode: selectedLanguage.languageCode,\n contentTypeIdentifier: selectedContentType.identifier,\n });\n }\n\n /**\n * Renders a loading state spinner\n *\n * @method renderLoadingSpinner\n * @returns {Element}\n * @memberof FinderTreeLeafComponent\n */\n renderLoadingSpinner() {\n if (!this.state.iframeLoading) {\n return null;\n }\n\n return ;\n }\n\n renderPublishBtn() {\n const publishLabel = Translator.trans(/*@Desc(\"Publish\")*/ 'content_on_the_fly.publish.label', {}, 'universal_discovery_widget');\n const attrs = {\n className: 'm-ud__action m-ud__action--publish',\n onClick: this.handlePublish,\n type: 'button',\n };\n\n if (this.state.publishBtnDisabled) {\n attrs.disabled = true;\n }\n\n return ;\n }\n\n render() {\n const { selectedContentType, selectedLanguage, maxHeight, onCancel } = this.props;\n const title = Translator.trans(\n /*@Desc(\"Creating - %contentType% in %language%\")*/ 'content_on_the_fly.creating_content.title',\n {\n contentType: selectedContentType.name,\n language: selectedLanguage.name,\n },\n 'universal_discovery_widget'\n );\n const cancelLabel = Translator.trans(/*@Desc(\"Cancel\")*/ 'cancel.label', {}, 'universal_discovery_widget');\n const iframeUrl = this.generateIframeUrl();\n const contentClass = this.state.iframeLoading ? 'm-ud__content is-loading' : 'm-ud__content';\n\n return (\n
    \n
    \n

    {title}

    \n
    \n
    \n {this.renderLoadingSpinner()}\n (this._refIframe = ref)}\n className=\"c-content-creator__iframe\"\n onLoad={this.handleIframeLoad}\n style={{ height: `${maxHeight + 32}px` }}\n />\n
    \n
    \n
    \n \n {this.renderPublishBtn()}\n
    \n
    \n
    \n
    \n
    \n );\n }\n}\n\nContentCreatorComponent.propTypes = {\n maxHeight: PropTypes.number.isRequired,\n selectedLanguage: PropTypes.object.isRequired,\n selectedContentType: PropTypes.object.isRequired,\n selectedLocationId: PropTypes.number.isRequired,\n onCancel: PropTypes.func.isRequired,\n handlePublish: PropTypes.func.isRequired,\n loadLocation: PropTypes.func,\n restInfo: PropTypes.object.isRequired,\n setMainContainerRef: PropTypes.func.isRequired,\n};\n\nContentCreatorComponent.defaultProps = {\n loadLocation,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-creator/content.creator.component.js","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\n\nimport SelectedContentItemComponent from './selected.content.item.component';\nimport SelectedContentPopupComponent from './selected.content.popup.component';\n\nexport default class SelectedContentComponent extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n isPopupVisible: false,\n };\n\n this.hidePopup = this.hidePopup.bind(this);\n this.togglePopup = this.togglePopup.bind(this);\n this.renderSelectedItem = this.renderSelectedItem.bind(this);\n }\n\n /**\n * Toggles popup visible state\n *\n * @method togglePopup\n * @memberof SelectedContentComponent\n */\n togglePopup() {\n this.setState((state, props) => ({ isPopupVisible: !state.isPopupVisible && !!props.items.length }));\n }\n\n /**\n * Hides popup\n *\n * @method hidePopup\n * @memberof SelectedContentComponent\n */\n hidePopup() {\n this.setState(() => ({ isPopupVisible: false }));\n }\n\n /**\n * Renders a selected content item\n *\n * @method renderSelectedItem\n * @param {Object} item\n * @returns {Element}\n * @memberof SelectedContentComponent\n */\n renderSelectedItem(item) {\n return (\n \n );\n }\n\n /**\n * Renders a limit information label\n *\n * @method renderLimitLabel\n * @returns {Element}\n * @memberof SelectedContentComponent\n */\n renderLimitLabel() {\n let limitLabel = '';\n\n if (this.props.itemsLimit && this.props.multiple) {\n const limitLabelText = Translator.trans(\n /*@Desc(\"Limit %items% max\")*/ 'select_content.limit.label',\n {\n items: this.props.itemsLimit,\n },\n 'universal_discovery_widget'\n );\n\n limitLabel = {limitLabelText};\n }\n\n return limitLabel;\n }\n\n /**\n * Renders selected items info\n *\n * @method renderSelectedItems\n * @returns {Element}\n * @memberof SelectedContentComponent\n */\n renderSelectedItems() {\n if (!this.props.items.length) {\n return null;\n }\n\n return (\n \n {this.props.items.map(this.renderSelectedItem)}\n \n );\n }\n\n /**\n * Gets component title\n *\n * @method getTitle\n * @returns {String}\n * @memberof SelectedContentComponent\n */\n getTitle() {\n let title = Translator.trans(/*@Desc(\"Confirmed items\")*/ 'select_content.confirmed_items.title', {}, 'universal_discovery_widget');\n const total = this.props.items.length;\n\n if (total) {\n title = `${title} (${total})`;\n }\n\n return title;\n }\n\n render() {\n const { items } = this.props;\n const titles = items.map((item) => item.ContentInfo.Content.Name).join(', ');\n const anyItemSelected = !!items.length;\n const cssClassOnAnyItemSelected = anyItemSelected ? 'c-selected-content__info--any-item-selected' : '';\n const infoCssClasses = `c-selected-content__info ${cssClassOnAnyItemSelected}`;\n const noConfirmedContentTitle = Translator.trans(\n /*@Desc(\"No confirmed content yet\")*/ 'select_content.no_confirmed_content.title',\n {},\n 'universal_discovery_widget'\n );\n\n return (\n
    \n {this.renderSelectedItems()}\n
    \n {this.getTitle()}\n {this.renderLimitLabel()}\n
    {titles.length ? titles : noConfirmedContentTitle}
    \n
    \n
    \n );\n }\n}\n\nSelectedContentComponent.propTypes = {\n items: PropTypes.array.isRequired,\n multiple: PropTypes.bool.isRequired,\n itemsLimit: PropTypes.number.isRequired,\n onItemRemove: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n};\n\nSelectedContentComponent.defaultProps = {\n items: [],\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/selected-content/selected.content.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nconst SelectedContentItemComponent = ({ data, onRemove }) => {\n const contentTypeInfo = data.ContentInfo.Content.ContentTypeInfo;\n const notAvailableLabel = Translator.trans(/*@Desc(\"N/A\")*/ 'select_content.not_available.label', {}, 'universal_discovery_widget');\n const contentTypeName = contentTypeInfo ? contentTypeInfo.names.value[0]['#text'] : notAvailableLabel;\n let icon;\n\n if (contentTypeInfo) {\n icon = ;\n }\n\n return (\n
    \n
    \n
    {data.ContentInfo.Content.Name}
    \n
    \n {icon} {contentTypeName}\n
    \n
    \n
    onRemove(data.id)} tabIndex=\"-1\">\n \n
    \n
    \n );\n};\n\nSelectedContentItemComponent.propTypes = {\n data: PropTypes.object.isRequired,\n onRemove: PropTypes.func.isRequired,\n};\n\nexport default SelectedContentItemComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/selected-content/selected.content.item.component.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport PopupComponent from '../../../common/tooltip-popup/tooltip.popup.component';\n\nconst SelectedContentPopupComponent = (props) => {\n return (\n
    \n {props.children}\n
    \n );\n};\n\nSelectedContentPopupComponent.propTypes = {\n children: PropTypes.any.isRequired,\n};\n\nexport default SelectedContentPopupComponent;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/selected-content/selected.content.popup.component.js","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../../../common/icon/icon';\n\nexport default class ContentMetaPreviewComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = { imageUri: '', translations: [] };\n\n this.toggleBookmark = this.toggleBookmark.bind(this);\n }\n\n /**\n * Renders an icon related to a content type\n *\n * @method renderIcon\n * @returns {JSX.Element|null}\n * @memberof ContentMetaPreviewComponent\n */\n renderIcon() {\n const contentTypeInfo = this.props.data.ContentInfo.Content.ContentTypeInfo;\n\n if (!contentTypeInfo) {\n return null;\n }\n\n const contentTypeIdentifier = contentTypeInfo.identifier;\n const contentTypeIconUrl = eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);\n\n return ;\n }\n\n /**\n * Gets image URI to image preview from content meta\n *\n * @method getImageUri\n * @returns {String}\n * @memberof ContentMetaPreviewComponent\n */\n getImageUri(data) {\n if (!data || !data.CurrentVersion) {\n return '';\n }\n\n const version = data.CurrentVersion.Version;\n const imageField = version.Fields.field.find((field) => field.fieldTypeIdentifier === 'ezimage');\n\n return imageField && imageField.fieldValue ? imageField.fieldValue.uri : '';\n }\n\n /**\n * Gets list of translations from content meta\n *\n * @method getTranslations\n * @returns {Array}\n * @memberof ContentMetaPreviewComponent\n */\n getTranslations(data) {\n if (!data || !data.CurrentVersion) {\n return [];\n }\n\n const version = data.CurrentVersion.Version;\n const versionLanguages = version.VersionInfo.VersionTranslationInfo.Language;\n\n return versionLanguages.map((language) => this.props.languages.mappings[language.languageCode].name);\n }\n\n /**\n * Renders a translation item\n *\n * @method renderTranslation\n * @returns {Element}\n * @memberof ContentMetaPreviewComponent\n */\n renderTranslation(translation, index) {\n return (\n \n {translation}\n \n );\n }\n\n /**\n * Renders image preview\n *\n * @method renderImagePreview\n * @returns {Element}\n * @memberof ContentMetaPreviewComponent\n */\n renderImagePreview() {\n const { data } = this.props;\n\n if (!data.CurrentVersion) {\n return ;\n }\n\n const imageUri = this.getImageUri(data);\n const imagePreviewNotAvailableLabel = Translator.trans(\n /*@Desc(\"Content preview is not available\")*/ 'content_meta_preview.image_preview_not_available.info',\n {},\n 'universal_discovery_widget'\n );\n\n if (!imageUri.length) {\n return {imagePreviewNotAvailableLabel};\n }\n\n return \"\";\n }\n\n /**\n * Toggles bookmark\n *\n * @method toggleBookmark\n * @memberof ContentMetaPreviewComponent\n */\n toggleBookmark() {\n const { toggleBookmark, data } = this.props;\n\n toggleBookmark(data);\n }\n\n /**\n * Renders bookmark icon\n *\n * @method renderBookmarkIcon\n * @memberof ContentMetaPreviewComponent\n */\n renderBookmarkIcon() {\n const { isBookmarked } = this.props;\n\n const bookmarkIconId = isBookmarked ? 'bookmark-active' : 'bookmark';\n const action = isBookmarked ? 'remove' : 'add';\n const wrapperClassName = `ez-add-to-bookmarks__icon-wrapper ez-add-to-bookmarks__icon-wrapper--${action}`;\n\n return (\n
    \n \n
    \n );\n }\n\n render() {\n const { data, maxHeight } = this.props;\n const content = data.ContentInfo.Content;\n const contentTypeIdentifier = content.ContentTypeInfo.identifier;\n const contentTypeName = window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier];\n const { formatShortDateWithTimezone } = window.eZ.helpers.timezone;\n const translations = this.getTranslations(data);\n const title = Translator.trans(/*@Desc(\"Content Meta Preview\")*/ 'content_meta_preview.title', {}, 'universal_discovery_widget');\n const lastModifiedLabel = Translator.trans(\n /*@Desc(\"Last modified\")*/ 'content_meta_preview.last_modified.label',\n {},\n 'universal_discovery_widget'\n );\n const creationDateLabel = Translator.trans(\n /*@Desc(\"Creation date\")*/ 'content_meta_preview.creation_date.label',\n {},\n 'universal_discovery_widget'\n );\n const translationsLabel = Translator.trans(\n /*@Desc(\"Translations\")*/ 'content_meta_preview.translations.label',\n {},\n 'universal_discovery_widget'\n );\n\n return (\n
    \n

    {title}

    \n
    \n
    \n
    \n {this.renderIcon()} {contentTypeName}\n
    \n
    {this.renderBookmarkIcon()}
    \n
    \n
    \n
    {this.renderImagePreview()}
    \n
    {content.Name}
    \n
    \n

    {lastModifiedLabel}:

    \n {formatShortDateWithTimezone(new Date(content.lastModificationDate))}\n
    \n
    \n

    {creationDateLabel}:

    \n {formatShortDateWithTimezone(new Date(content.publishedDate))}\n
    \n
    \n

    {translationsLabel}:

    \n {translations.map(this.renderTranslation)}\n
    \n
    \n
    \n
    \n );\n }\n}\n\nContentMetaPreviewComponent.propTypes = {\n data: PropTypes.object.isRequired,\n isBookmarked: PropTypes.bool,\n toggleBookmark: PropTypes.func.isRequired,\n contentTypesMap: PropTypes.object.isRequired,\n restInfo: PropTypes.shape({\n token: PropTypes.string.isRequired,\n siteaccess: PropTypes.string.isRequired,\n }).isRequired,\n maxHeight: PropTypes.number.isRequired,\n activeTab: PropTypes.string.isRequired,\n languages: PropTypes.object.isRequired,\n ready: PropTypes.bool.isRequired,\n};\n\nContentMetaPreviewComponent.defaultProps = {\n isBookmarked: null,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/components/content-meta-preview/content.meta.preview.component.js","import { showErrorNotification } from '../../common/services/notification.service';\nimport {\n getBasicRequestInit,\n handleRequestResponse,\n handleRequestError,\n handleRequestResponseStatus,\n} from '../../common/helpers/request.helper.js';\n\nconst ENDPOINT_BOOKMARK = '/api/ezp/v2/bookmark';\n\n/**\n * Loads bookmarks\n *\n * @function loadBookmarks\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {Function} callback\n */\nexport const loadBookmarks = (restInfo, limit, offset, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}?limit=${limit}&offset=${offset}`, {\n ...basicRequestInit,\n method: 'GET',\n headers: {\n ...basicRequestInit.headers,\n Accept: 'application/vnd.ez.api.ContentTypeInfoList+json',\n },\n });\n\n fetch(request)\n .then(handleRequestResponse)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Adds bookmark\n *\n * @function addBookmark\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} locationId location id\n * @param {Function} callback\n */\nexport const addBookmark = (restInfo, locationId, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}/${locationId}`, {\n ...basicRequestInit,\n method: 'POST',\n });\n\n fetch(request)\n .then(handleRequestResponseStatus)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Removes bookmark\n *\n * @function removeBookmark\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} locationId location id\n * @param {Function} callback\n */\nexport const removeBookmark = (restInfo, locationId, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}/${locationId}`, {\n ...basicRequestInit,\n method: 'DELETE',\n });\n\n fetch(request)\n .then(handleRequestResponseStatus)\n .then(callback)\n .catch(showErrorNotification);\n};\n\n/**\n * Checks if given location is bookmarked\n *\n * @function checkIsBookmarked\n * @param {Object} restInfo REST config hash containing: token and siteaccess properties\n * @param {String} locationId location id\n * @param {Function} callback\n */\nexport const checkIsBookmarked = (restInfo, locationId, callback) => {\n const basicRequestInit = getBasicRequestInit(restInfo);\n const request = new Request(`${ENDPOINT_BOOKMARK}/${locationId}`, {\n ...basicRequestInit,\n method: 'HEAD',\n });\n const bookmarkedStatusCode = 200;\n const notBookmarkedStatusCode = 404;\n\n fetch(request)\n .then((response) => {\n const { status } = response;\n\n if (status === bookmarkedStatusCode || status === notBookmarkedStatusCode) {\n return status === bookmarkedStatusCode;\n }\n\n return handleRequestError(response);\n })\n .then(callback)\n .catch(showErrorNotification);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/universal-discovery/services/bookmark.service.js","/**\n * Checks if are the same locations\n *\n * @function areSameLocations\n * @param {Object} location1\n * @param {Object} location2\n * @returns {Boolean}\n */\nexport const areSameLocations = (location1, location2) => location1.id === location2.id;\n\n\n\n// WEBPACK FOOTER //\n// ./src/modules/common/helpers/compare.helper.js"],"sourceRoot":""} \ No newline at end of file diff --git a/src/modules/content-tree/content.tree.module.js b/src/modules/content-tree/content.tree.module.js index e2043ebc..e2aa173c 100644 --- a/src/modules/content-tree/content.tree.module.js +++ b/src/modules/content-tree/content.tree.module.js @@ -16,12 +16,7 @@ export default class ContentTreeModule extends Component { const savedSubtree = localStorage.getItem(KEY_CONTENT_TREE_SUBTREE); this.items = props.preloadedLocations; - - try { - this.subtree = savedSubtree ? JSON.parse(savedSubtree) : null; - } catch (e) { - this.subtree = null; - } + this.subtree = savedSubtree ? JSON.parse(savedSubtree) : null; } componentDidMount() { @@ -90,7 +85,7 @@ export default class ContentTreeModule extends Component { } addItemToSubtree(subtree, item, path) { - const parentSubtree = this.findParentSubtree(subtree, item, path); + const parentSubtree = this.findParentSubtree(subtree, path); if (!parentSubtree) { return; @@ -108,13 +103,13 @@ export default class ContentTreeModule extends Component { } removeItemFromSubtree(subtree, item, path) { - const parentSubtree = this.findParentSubtree(subtree, item, path); + const parentSubtree = this.findParentSubtree(subtree, path); if (!parentSubtree) { return; } - const index = parentSubtree.children.findIndex((element) => parseInt(element.locationId, 10) === parseInt(path[1], 10)); + const index = parentSubtree.children.findIndex((element) => element.locationId === parseInt(path[1], 10)); if (index > -1) { parentSubtree.children.splice(index, 1); @@ -122,7 +117,7 @@ export default class ContentTreeModule extends Component { } updateItemInSubtree(subtree, item, path) { - const parentSubtree = this.findParentSubtree(subtree, item, path); + const parentSubtree = this.findParentSubtree(subtree, path); if (!parentSubtree) { return; @@ -139,7 +134,7 @@ export default class ContentTreeModule extends Component { localStorage.setItem(KEY_CONTENT_TREE_SUBTREE, JSON.stringify(this.subtree)); } - findParentSubtree(subtree, item, path) { + findParentSubtree(subtree, path) { if (path.length < 2) { return; } @@ -154,7 +149,7 @@ export default class ContentTreeModule extends Component { path.shift(); - return this.findParentSubtree(subtreeSubtree, item, path); + return this.findParentSubtree(subtreeSubtree, path); } generateSubtree(items) { diff --git a/src/modules/content-tree/services/content.tree.service.js b/src/modules/content-tree/services/content.tree.service.js index 23ca6baa..8a0f6d73 100644 --- a/src/modules/content-tree/services/content.tree.service.js +++ b/src/modules/content-tree/services/content.tree.service.js @@ -34,11 +34,10 @@ export const loadSubtree = ({ token, siteaccess }, subtree, callback) => { credentials: 'same-origin', body: JSON.stringify({ LoadSubtreeRequest: { - "_media-type": "application/vnd.ez.api.ContentTreeLoadSubtreeRequest", + '_media-type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequest', nodes: subtree, }, }), - headers: { Accept: 'application/vnd.ez.api.ContentTreeRoot+json', 'Content-Type': 'application/vnd.ez.api.ContentTreeLoadSubtreeRequest+json', @@ -58,23 +57,17 @@ export const loadSubtree = ({ token, siteaccess }, subtree, callback) => { .catch(showErrorNotification); }; -const mapChildrenToSubitemsDeep = (tree) => { - const parsedSubtree = []; - - for (const subtree of tree) { +const mapChildrenToSubitemsDeep = (tree) => + tree.map((subtree) => { mapChildrenToSubitems(subtree); subtree.subitems = mapChildrenToSubitemsDeep(subtree.subitems); - parsedSubtree.push(subtree); - } - - return parsedSubtree; -}; + return subtree; + }); const mapChildrenToSubitems = (location) => { location.totalSubitemsCount = location.totalChildrenCount; location.subitems = location.children; - location.totalSubitemsCount = location.totalChildrenCount; delete location.totalChildrenCount; delete location.children;