axe-comments
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -233,3 +233,4 @@ var AxeComments = | ||
'id': _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]).isRequired, | ||
'username': _propTypes2.default.string.isRequired | ||
'username': _propTypes2.default.string.isRequired, | ||
'allowedToDeleteComment': _propTypes2.default.func | ||
}), _propTypes2.default.oneOf([false])]), | ||
@@ -510,3 +511,7 @@ createNewComment: _propTypes2.default.func, | ||
{ className: 'comment' + (comment.stillLoading || comment.deleting ? ' is-loading' : '') }, | ||
this.props.customLabel ? this.props.customLabel(comment) : null, | ||
this.props.customLabel ? _react2.default.createElement( | ||
'span', | ||
{ className: 'custom-label' }, | ||
this.props.customLabel(comment) | ||
) : null, | ||
_react2.default.createElement( | ||
@@ -546,3 +551,3 @@ 'span', | ||
), | ||
this.props.loggedInUser && comment.author_uid && comment.author_uid.toString() === this.props.loggedInUser.id.toString() ? _react2.default.createElement( | ||
this.props.loggedInUser && (comment.author_uid && comment.author_uid.toString() === this.props.loggedInUser.id.toString() || this.props.loggedInUser.allowedToDeleteComment && this.props.loggedInUser.allowedToDeleteComment(comment)) ? _react2.default.createElement( | ||
'span', | ||
@@ -549,0 +554,0 @@ { className: 'delete', onClick: function onClick() { |
@@ -1,1 +0,1 @@ | ||
var AxeComments=function(A){function e(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return A[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var t={};return e.m=A,e.c=t,e.d=function(A,t,r){e.o(A,t)||Object.defineProperty(A,t,{configurable:!1,enumerable:!0,get:r})},e.n=function(A){var t=A&&A.__esModule?function(){return A.default}:function(){return A};return e.d(t,"a",t),t},e.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},e.p="",e(e.s=1)}([function(A,e){A.exports=React},function(A,e,t){t(2),A.exports=t(3)},function(A,e){},function(A,e,t){"use strict";var r=t(4),n=function(A){return A&&A.__esModule?A:{default:A}}(r);A.exports=n.default},function(A,e,t){"use strict";function r(A){return A&&A.__esModule?A:{default:A}}function n(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function o(A,e){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?A:e}function i(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(A,e):A.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=Object.assign||function(A){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(A[r]=t[r])}return A},c=function(){function A(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),l=t(0),s=r(l),u=t(5),m=r(u),g=t(6),d=r(g),f=t(11),p=r(f),D=function(A){function e(A){n(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A));return t.lang=a({},h,A.lang),t}return i(e,A),c(e,[{key:"render",value:function(){var A=this;return s.default.createElement("div",{className:"axe-comments-root"},this.props.showNewCommentForm?s.default.createElement(m.default,{createNewComment:this.props.createNewComment,loggedInUser:this.props.loggedInUser,lang:this.lang}):null,null===this.props.comments&&s.default.createElement("div",{className:"is-loading"})||0===this.props.comments.length&&s.default.createElement("div",{className:"no-comments-yet"},this.lang["no-comments-yet"])||this.props.comments.map(function(e){return s.default.createElement(d.default,{key:e.id,customLabel:A.props.customLabel,comment:e,allowReplyToComment:A.props.allowReplyToComment,loggedInUser:A.props.loggedInUser,deleteComment:A.props.deleteComment,toggleLike:A.props.toggleLike,toggleDislike:A.props.toggleDislike,lang:A.lang})}))}}]),e}(s.default.Component);e.default=D,D.propTypes={allowReplyToComment:p.default.bool,comments:s.default.PropTypes.arrayOf(p.default.shape({author_uid:p.default.oneOfType([p.default.number,p.default.string]),"current_user-vote":p.default.oneOfType([p.default.number,p.default.string]),date:p.default.string.isRequired,guest_author_name:p.default.string,id:p.default.oneOfType([p.default.number,p.default.string]).isRequired,rating:p.default.oneOfType([p.default.number,p.default.string]),stillLoading:p.default.bool,text:p.default.string.isRequired})),customLabel:p.default.func,deleteComment:p.default.func.isRequired,lang:p.default.shape({"no-comments-yet":p.default.string,"comment-author-validation-error":p.default.string,"comment-text-validation-error":p.default.string,"comment-author-placeholder":p.default.string,"comment-placeholder":p.default.string,"add-comment":p.default.string,delete:p.default.string,error:p.default.string,"just-now":p.default.string,"years-ago":p.default.string,"months-ago":p.default.string,"days-ago":p.default.string,"hours-ago":p.default.string,"mins-ago":p.default.string}),loggedInUser:p.default.oneOfType([p.default.shape({id:p.default.oneOfType([p.default.number,p.default.string]).isRequired,username:p.default.string.isRequired}),p.default.oneOf([!1])]),createNewComment:p.default.func,showNewCommentForm:p.default.bool,toggleDislike:p.default.func.isRequired,toggleLike:p.default.func.isRequired};var h={"no-comments-yet":"No comments yet...","comment-author-validation-error":"Your name must be min 3, max 20 characters","comment-text-validation-error":"Your comment cannot be empty, and cannot exceed 2000 characters","comment-author-placeholder":"Your Name","comment-placeholder":"write a comment...","add-comment":"Add Comment",delete:"Delete",error:"Error","just-now":"just now...","years-ago":"years ago","months-ago":"months ago","days-ago":"days ago","hours-ago":"hours ago","mins-ago":"minutes ago"}},function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function n(A,e){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?A:e}function o(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(A,e):A.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function A(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),a=t(0),c=function(A){return A&&A.__esModule?A:{default:A}}(a),l=function(A){function e(A){r(this,e);var t=n(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A));return t.state={commentorName:"",text:""},t.onNewCommentAdd=t.onNewCommentAdd.bind(t),t.onCommentorNameInputChange=t.onCommentorNameInputChange.bind(t),t.onCommentInputChange=t.onCommentInputChange.bind(t),t}return o(e,A),i(e,[{key:"onCommentorNameInputChange",value:function(A){this.setState({commentorName:A.target.value,commentorNameError:!e.isCommentorNameValid(A.target.value)})}},{key:"onCommentInputChange",value:function(A){this.setState({text:A.target.value,textError:!e.isCommentValid(A.target.value)})}},{key:"onNewCommentAdd",value:function(){var A=this,t={};t.showErrors=!1;var r="";this.props.loggedInUser||e.isCommentorNameValid(this.state.commentorName)||(t.commentorNameError=!0,t.showErrors=!0,r+="\n"+this.props.lang["comment-author-validation-error"]),e.isCommentValid(this.state.text)||(t.textError=!0,t.showErrors=!0,r+="\n"+this.props.lang["comment-text-validation-error"]),r?(r=this.props.lang.error+"! \n------ "+r,alert(r)):(t.addingNewComment=!0,this.props.createNewComment&&this.props.createNewComment(this.state.commentorName,this.state.text,function(){A.setState({commentorName:"",text:"",addingNewComment:!1})})),this.setState(t)}},{key:"render",value:function(){return c.default.createElement("div",{className:"add-comment horizontal-align-left"},c.default.createElement("input",{disabled:this.state.addingNewComment||this.props.loggedInUser,value:this.props.loggedInUser?this.props.loggedInUser.username:this.state.commentorName,className:this.state.showErrors&&(this.state.commentorNameError?"invalid":"valid")||"",type:"text",placeholder:this.props.lang["comment-author-placeholder"],onChange:this.onCommentorNameInputChange}),c.default.createElement("textarea",{disabled:this.state.addingNewComment,value:this.state.text,className:this.state.showErrors&&(this.state.textError?"invalid":"valid")||"",placeholder:this.props.lang["comment-placeholder"],onChange:this.onCommentInputChange}),c.default.createElement("button",{disabled:this.state.addingNewComment,onClick:this.onNewCommentAdd},this.props.lang["add-comment"]))}}],[{key:"isCommentorNameValid",value:function(A){return A&&A.length>=3&&A.length<=20}},{key:"isCommentValid",value:function(A){return A&&A.length>=1&&A.length<=2e3}}]),e}(c.default.Component);e.default=l},function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function n(A,e){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?A:e}function o(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(A,e):A.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function A(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),a=t(0),c=function(A){return A&&A.__esModule?A:{default:A}}(a),l=function(A){function e(A){return r(this,e),n(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A))}return o(e,A),i(e,[{key:"render",value:function(){var A=this,e=this.props.comment,r=parseInt(e["current_user-vote"]),n=e.date?function(A){var e=A.split(/[- :]/);return new Date(Date.UTC(e[0],e[1]-1,e[2],e[3],e[4],e[5]))}(e.date):null,o=n?function(e){var t=Math.floor((new Date-e)/1e3),r=Math.floor(t/31536e3);return r>1?r+" "+A.props.lang["years-ago"]:(r=Math.floor(t/2592e3))>1?r+" "+A.props.lang["months-ago"]:(r=Math.floor(t/86400))>1?r+" "+A.props.lang["days-ago"]:(r=Math.floor(t/3600))>1?r+" "+A.props.lang["hours-ago"]:(r=Math.floor(t/60),r>1?r+" "+A.props.lang["mins-ago"]:Math.floor(t)+" "+A.props.lang["seconds-ago"])}(new Date(n)):null;return c.default.createElement("div",{className:"comment"+(e.stillLoading||e.deleting?" is-loading":"")},this.props.customLabel?this.props.customLabel(e):null,c.default.createElement("span",{className:"username"},e.author&&e.author?e.author.username:e.guest_author_name),c.default.createElement("span",null," - "),c.default.createElement("span",{className:"date"},e.date?o:this.props.lang["just-now"]),c.default.createElement("div",{className:"comment-contents"},e.text),c.default.createElement("div",{className:"comment-actions vertical-align-children-middle"},this.props.allowReplyToComment?c.default.createElement("span",null,"Cevap Yaz"):null,c.default.createElement("span",{className:e.rating>0&&"positive"||e.rating<0&&"negative"||"neutral"},e.rating<0?"":"+",e.rating),this.props.loggedInUser&&e.author_uid&&e.author_uid.toString()===this.props.loggedInUser.id.toString()?c.default.createElement("span",{className:"delete",onClick:function(){return A.props.deleteComment(e)}},this.props.lang.delete):null,c.default.createElement("span",{onClick:function(){return A.props.toggleLike(e)},className:1===r?"like liked":"like"},1===r?c.default.createElement("img",{src:t(7)}):c.default.createElement("img",{src:t(8)})),c.default.createElement("span",{onClick:function(){return A.props.toggleDislike(e)},className:-1===r?"dislike disliked":"dislike"},-1===r?c.default.createElement("img",{src:t(9)}):c.default.createElement("img",{src:t(10)}))))}}]),e}(c.default.Component);e.default=l},function(A,e){A.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+IEmuOgAAAARnQU1BAACxjwv8YQUAAAABc1JHQgCuzhzpAAABfVBMVEUAAAArzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzif5VvIJAAAAfnRSTlMAJuv8/f76qKxYJTymqvkDovs/3KABpegLFgjsb1GnxLJxKPhDGRzBIdmej0Cuxs1aMBcRNgRoIwKF6ucsw/Diqz2HviJjHTjzEEpXK7kTMzKV9vcOUoO7vC6YbA0pjosVteZny4K4OpTfcH15H9GBZcCZXdAa4ddkiDmboZPg4nkjAAAB/klEQVR42u3Z6U8TURjF4bfttIOlFMq+r2UTURAVWV1QUFZlR8CFRUDckB3l/O3GhCiNCdA7N3NC8v6+TpPzZJImM3dENE3TNE3TvLWKPzl5T19y9jMjOGvrGWO/oQh/28v2f790Deeq8B+Qc34fp77vf0rZR6Xf+8lQKsD1eb+pDFRA8VdwAVngAj6DCxh2uIBAP6iA6UNQAQXV4ALWwQX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jubqmGdoqysSyl1fAAAB8UlEQVR42u3ZVW9CURCF0YEiLVaFuru7u7u7u7v7/PY+NE0LTVo4nLKTZr7nC3uFXBK4h0iSJEmSJEmSJMmPkrJmjiKtv9ZYtl7+7bUpPhddBbwes3diZn+zuyw+L7f6XBER4Hxm1TgHVHyKVkDLGQdcu0bA5TQrlKMNYElX2WdHribARQ+r5dQEcCvuc2qSFsAsKzekBeBRB9zpAMSp77NLByAvCEC4BkAdgwHzYICNwYAdMKCDwYBSMKCNwYBFMGCbwYA0MGCFwYBOMODUDAa8MBbwagYDrIwF5JrAgEjGAgxGMCCfsYBhIxhww1hAQSoYMMdYwKodDHhkLGDCAQbsMhgQjwawAAQgADTAhAaEoQGTaMAUGmDRdhM4FX8PuHQB3J/vmRPune0nQIKu23BU9XwueV8PIIKUBXo+gwz1M8qNKA3/zruDOiY1LHkSg/w6nP/lMa4fjw8essGAZ8ICihewgPsEggIcy4QF9BMWUEtYQN4gFnBQQVBAfTVhAU2EBVwTFrAZiwVEdxEUUNRHUID5kLCAXsIC0jKxgMpmggIGDAQFmGoIC1gjLMBJWMBWNhaQWEBQgDEuxPsU5Q1oDfU+FXrt54d8n7K+7pfEhB4Q2/C5n55BgMZGPvbtNoJ0exz9/vzgiSRJkiTpP/QGmV9SmiJali0AAAAASUVORK5CYII="},function(A,e){A.exports=PropTypes}]); | ||
var AxeComments=function(A){function e(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return A[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var t={};return e.m=A,e.c=t,e.d=function(A,t,r){e.o(A,t)||Object.defineProperty(A,t,{configurable:!1,enumerable:!0,get:r})},e.n=function(A){var t=A&&A.__esModule?function(){return A.default}:function(){return A};return e.d(t,"a",t),t},e.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},e.p="",e(e.s=1)}([function(A,e){A.exports=React},function(A,e,t){t(2),A.exports=t(3)},function(A,e){},function(A,e,t){"use strict";var r=t(4),n=function(A){return A&&A.__esModule?A:{default:A}}(r);A.exports=n.default},function(A,e,t){"use strict";function r(A){return A&&A.__esModule?A:{default:A}}function n(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function o(A,e){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?A:e}function i(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(A,e):A.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=Object.assign||function(A){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(A[r]=t[r])}return A},c=function(){function A(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),l=t(0),s=r(l),u=t(5),m=r(u),g=t(6),d=r(g),f=t(11),p=r(f),D=function(A){function e(A){n(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A));return t.lang=a({},h,A.lang),t}return i(e,A),c(e,[{key:"render",value:function(){var A=this;return s.default.createElement("div",{className:"axe-comments-root"},this.props.showNewCommentForm?s.default.createElement(m.default,{createNewComment:this.props.createNewComment,loggedInUser:this.props.loggedInUser,lang:this.lang}):null,null===this.props.comments&&s.default.createElement("div",{className:"is-loading"})||0===this.props.comments.length&&s.default.createElement("div",{className:"no-comments-yet"},this.lang["no-comments-yet"])||this.props.comments.map(function(e){return s.default.createElement(d.default,{key:e.id,customLabel:A.props.customLabel,comment:e,allowReplyToComment:A.props.allowReplyToComment,loggedInUser:A.props.loggedInUser,deleteComment:A.props.deleteComment,toggleLike:A.props.toggleLike,toggleDislike:A.props.toggleDislike,lang:A.lang})}))}}]),e}(s.default.Component);e.default=D,D.propTypes={allowReplyToComment:p.default.bool,comments:s.default.PropTypes.arrayOf(p.default.shape({author_uid:p.default.oneOfType([p.default.number,p.default.string]),"current_user-vote":p.default.oneOfType([p.default.number,p.default.string]),date:p.default.string.isRequired,guest_author_name:p.default.string,id:p.default.oneOfType([p.default.number,p.default.string]).isRequired,rating:p.default.oneOfType([p.default.number,p.default.string]),stillLoading:p.default.bool,text:p.default.string.isRequired})),customLabel:p.default.func,deleteComment:p.default.func.isRequired,lang:p.default.shape({"no-comments-yet":p.default.string,"comment-author-validation-error":p.default.string,"comment-text-validation-error":p.default.string,"comment-author-placeholder":p.default.string,"comment-placeholder":p.default.string,"add-comment":p.default.string,delete:p.default.string,error:p.default.string,"just-now":p.default.string,"years-ago":p.default.string,"months-ago":p.default.string,"days-ago":p.default.string,"hours-ago":p.default.string,"mins-ago":p.default.string}),loggedInUser:p.default.oneOfType([p.default.shape({id:p.default.oneOfType([p.default.number,p.default.string]).isRequired,username:p.default.string.isRequired,allowedToDeleteComment:p.default.func}),p.default.oneOf([!1])]),createNewComment:p.default.func,showNewCommentForm:p.default.bool,toggleDislike:p.default.func.isRequired,toggleLike:p.default.func.isRequired};var h={"no-comments-yet":"No comments yet...","comment-author-validation-error":"Your name must be min 3, max 20 characters","comment-text-validation-error":"Your comment cannot be empty, and cannot exceed 2000 characters","comment-author-placeholder":"Your Name","comment-placeholder":"write a comment...","add-comment":"Add Comment",delete:"Delete",error:"Error","just-now":"just now...","years-ago":"years ago","months-ago":"months ago","days-ago":"days ago","hours-ago":"hours ago","mins-ago":"minutes ago"}},function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function n(A,e){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?A:e}function o(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(A,e):A.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function A(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),a=t(0),c=function(A){return A&&A.__esModule?A:{default:A}}(a),l=function(A){function e(A){r(this,e);var t=n(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A));return t.state={commentorName:"",text:""},t.onNewCommentAdd=t.onNewCommentAdd.bind(t),t.onCommentorNameInputChange=t.onCommentorNameInputChange.bind(t),t.onCommentInputChange=t.onCommentInputChange.bind(t),t}return o(e,A),i(e,[{key:"onCommentorNameInputChange",value:function(A){this.setState({commentorName:A.target.value,commentorNameError:!e.isCommentorNameValid(A.target.value)})}},{key:"onCommentInputChange",value:function(A){this.setState({text:A.target.value,textError:!e.isCommentValid(A.target.value)})}},{key:"onNewCommentAdd",value:function(){var A=this,t={};t.showErrors=!1;var r="";this.props.loggedInUser||e.isCommentorNameValid(this.state.commentorName)||(t.commentorNameError=!0,t.showErrors=!0,r+="\n"+this.props.lang["comment-author-validation-error"]),e.isCommentValid(this.state.text)||(t.textError=!0,t.showErrors=!0,r+="\n"+this.props.lang["comment-text-validation-error"]),r?(r=this.props.lang.error+"! \n------ "+r,alert(r)):(t.addingNewComment=!0,this.props.createNewComment&&this.props.createNewComment(this.state.commentorName,this.state.text,function(){A.setState({commentorName:"",text:"",addingNewComment:!1})})),this.setState(t)}},{key:"render",value:function(){return c.default.createElement("div",{className:"add-comment horizontal-align-left"},c.default.createElement("input",{disabled:this.state.addingNewComment||this.props.loggedInUser,value:this.props.loggedInUser?this.props.loggedInUser.username:this.state.commentorName,className:this.state.showErrors&&(this.state.commentorNameError?"invalid":"valid")||"",type:"text",placeholder:this.props.lang["comment-author-placeholder"],onChange:this.onCommentorNameInputChange}),c.default.createElement("textarea",{disabled:this.state.addingNewComment,value:this.state.text,className:this.state.showErrors&&(this.state.textError?"invalid":"valid")||"",placeholder:this.props.lang["comment-placeholder"],onChange:this.onCommentInputChange}),c.default.createElement("button",{disabled:this.state.addingNewComment,onClick:this.onNewCommentAdd},this.props.lang["add-comment"]))}}],[{key:"isCommentorNameValid",value:function(A){return A&&A.length>=3&&A.length<=20}},{key:"isCommentValid",value:function(A){return A&&A.length>=1&&A.length<=2e3}}]),e}(c.default.Component);e.default=l},function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function n(A,e){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?A:e}function o(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(A,e):A.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function A(A,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),a=t(0),c=function(A){return A&&A.__esModule?A:{default:A}}(a),l=function(A){function e(A){return r(this,e),n(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A))}return o(e,A),i(e,[{key:"render",value:function(){var A=this,e=this.props.comment,r=parseInt(e["current_user-vote"]),n=e.date?function(A){var e=A.split(/[- :]/);return new Date(Date.UTC(e[0],e[1]-1,e[2],e[3],e[4],e[5]))}(e.date):null,o=n?function(e){var t=Math.floor((new Date-e)/1e3),r=Math.floor(t/31536e3);return r>1?r+" "+A.props.lang["years-ago"]:(r=Math.floor(t/2592e3))>1?r+" "+A.props.lang["months-ago"]:(r=Math.floor(t/86400))>1?r+" "+A.props.lang["days-ago"]:(r=Math.floor(t/3600))>1?r+" "+A.props.lang["hours-ago"]:(r=Math.floor(t/60),r>1?r+" "+A.props.lang["mins-ago"]:Math.floor(t)+" "+A.props.lang["seconds-ago"])}(new Date(n)):null;return c.default.createElement("div",{className:"comment"+(e.stillLoading||e.deleting?" is-loading":"")},this.props.customLabel?c.default.createElement("span",{className:"custom-label"},this.props.customLabel(e)):null,c.default.createElement("span",{className:"username"},e.author&&e.author?e.author.username:e.guest_author_name),c.default.createElement("span",null," - "),c.default.createElement("span",{className:"date"},e.date?o:this.props.lang["just-now"]),c.default.createElement("div",{className:"comment-contents"},e.text),c.default.createElement("div",{className:"comment-actions vertical-align-children-middle"},this.props.allowReplyToComment?c.default.createElement("span",null,"Cevap Yaz"):null,c.default.createElement("span",{className:e.rating>0&&"positive"||e.rating<0&&"negative"||"neutral"},e.rating<0?"":"+",e.rating),this.props.loggedInUser&&(e.author_uid&&e.author_uid.toString()===this.props.loggedInUser.id.toString()||this.props.loggedInUser.allowedToDeleteComment&&this.props.loggedInUser.allowedToDeleteComment(e))?c.default.createElement("span",{className:"delete",onClick:function(){return A.props.deleteComment(e)}},this.props.lang.delete):null,c.default.createElement("span",{onClick:function(){return A.props.toggleLike(e)},className:1===r?"like liked":"like"},1===r?c.default.createElement("img",{src:t(7)}):c.default.createElement("img",{src:t(8)})),c.default.createElement("span",{onClick:function(){return A.props.toggleDislike(e)},className:-1===r?"dislike disliked":"dislike"},-1===r?c.default.createElement("img",{src:t(9)}):c.default.createElement("img",{src:t(10)}))))}}]),e}(c.default.Component);e.default=l},function(A,e){A.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+IEmuOgAAAARnQU1BAACxjwv8YQUAAAABc1JHQgCuzhzpAAABfVBMVEUAAAArzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzicrzif5VvIJAAAAfnRSTlMAJuv8/f76qKxYJTymqvkDovs/3KABpegLFgjsb1GnxLJxKPhDGRzBIdmej0Cuxs1aMBcRNgRoIwKF6ucsw/Diqz2HviJjHTjzEEpXK7kTMzKV9vcOUoO7vC6YbA0pjosVteZny4K4OpTfcH15H9GBZcCZXdAa4ddkiDmboZPg4nkjAAAB/klEQVR42u3Z6U8TURjF4bfttIOlFMq+r2UTURAVWV1QUFZlR8CFRUDckB3l/O3GhCiNCdA7N3NC8v6+TpPzZJImM3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BY/b/uy6BwBUQtxKMGiIZPzwMu4iBMV12QySpRA9tChWg4XcDaPOa4RzdmCLGPwBF0j34Ui5x3DgeJ9PZu+ArWDODAfeVcaudEzu5Vl9+FSmYfGLrxsDSk6i54QjubqmGdoqysSyl1fAAAB8UlEQVR42u3ZVW9CURCF0YEiLVaFuru7u7u7u7v7/PY+NE0LTVo4nLKTZr7nC3uFXBK4h0iSJEmSJEmSJMmPkrJmjiKtv9ZYtl7+7bUpPhddBbwes3diZn+zuyw+L7f6XBER4Hxm1TgHVHyKVkDLGQdcu0bA5TQrlKMNYElX2WdHribARQ+r5dQEcCvuc2qSFsAsKzekBeBRB9zpAMSp77NLByAvCEC4BkAdgwHzYICNwYAdMKCDwYBSMKCNwYBFMGCbwYA0MGCFwYBOMODUDAa8MBbwagYDrIwF5JrAgEjGAgxGMCCfsYBhIxhww1hAQSoYMMdYwKodDHhkLGDCAQbsMhgQjwawAAQgADTAhAaEoQGTaMAUGmDRdhM4FX8PuHQB3J/vmRPune0nQIKu23BU9XwueV8PIIKUBXo+gwz1M8qNKA3/zruDOiY1LHkSg/w6nP/lMa4fjw8essGAZ8ICihewgPsEggIcy4QF9BMWUEtYQN4gFnBQQVBAfTVhAU2EBVwTFrAZiwVEdxEUUNRHUID5kLCAXsIC0jKxgMpmggIGDAQFmGoIC1gjLMBJWMBWNhaQWEBQgDEuxPsU5Q1oDfU+FXrt54d8n7K+7pfEhB4Q2/C5n55BgMZGPvbtNoJ0exz9/vzgiSRJkiTpP/QGmV9SmiJali0AAAAASUVORK5CYII="},function(A,e){A.exports=PropTypes}]); |
{ | ||
"name": "axe-comments", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Comments Module for Axe PHP Framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -66,3 +66,3 @@ import React from 'react'; | ||
{this.props.customLabel ? | ||
this.props.customLabel(comment) | ||
<span className="custom-label">{this.props.customLabel(comment)}</span> | ||
: | ||
@@ -90,6 +90,14 @@ null | ||
{this.props.loggedInUser && comment.author_uid && comment.author_uid.toString() === this.props.loggedInUser.id.toString() ? | ||
<span className="delete" onClick={() => this.props.deleteComment(comment)}>{this.props.lang['delete']}</span> | ||
: | ||
null | ||
{ | ||
this.props.loggedInUser | ||
&& | ||
( | ||
(comment.author_uid && comment.author_uid.toString() === this.props.loggedInUser.id.toString()) | ||
|| | ||
(this.props.loggedInUser.allowedToDeleteComment && this.props.loggedInUser.allowedToDeleteComment(comment)) | ||
) | ||
? | ||
<span className="delete" onClick={() => this.props.deleteComment(comment)}>{this.props.lang['delete']}</span> | ||
: | ||
null | ||
} | ||
@@ -96,0 +104,0 @@ |
@@ -107,3 +107,4 @@ import React from 'react'; | ||
]).isRequired , | ||
'username':PropTypes.string.isRequired | ||
'username':PropTypes.string.isRequired , | ||
'allowedToDeleteComment':PropTypes.func | ||
}) , | ||
@@ -110,0 +111,0 @@ PropTypes.oneOf([false]) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
120255
2175