@plusscommunities/pluss-core-web 1.4.33 → 1.4.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -4151,6 +4151,26 @@ var Comment = /*#__PURE__*/function (_Component) {
4151
4151
  }
4152
4152
 
4153
4153
  _createClass__default['default'](Comment, [{
4154
+ key: "renderImage",
4155
+ value: function renderImage(image) {
4156
+ if (___default['default'].isEmpty(image)) {
4157
+ return null;
4158
+ }
4159
+
4160
+ return /*#__PURE__*/React__default['default'].createElement("div", {
4161
+ className: "imageGrid"
4162
+ }, /*#__PURE__*/React__default['default'].createElement("a", {
4163
+ href: image,
4164
+ target: "_blank",
4165
+ rel: "noopener noreferrer"
4166
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
4167
+ className: "imageGrid_image",
4168
+ style: {
4169
+ backgroundImage: "url('".concat(get1400(image), "')")
4170
+ }
4171
+ })));
4172
+ }
4173
+ }, {
4154
4174
  key: "renderComment",
4155
4175
  value: function renderComment() {
4156
4176
  var comment = this.props.comment;
@@ -4159,7 +4179,7 @@ var Comment = /*#__PURE__*/function (_Component) {
4159
4179
  className: "comment"
4160
4180
  }, /*#__PURE__*/React__default['default'].createElement("p", {
4161
4181
  className: "comment_text"
4162
- }, toParagraphed(comment.Comment)), /*#__PURE__*/React__default['default'].createElement("div", {
4182
+ }, toParagraphed(comment.Comment)), this.renderImage(comment.Image), /*#__PURE__*/React__default['default'].createElement("div", {
4163
4183
  className: "comment_bottom"
4164
4184
  }, /*#__PURE__*/React__default['default'].createElement(ProfilePic, {
4165
4185
  className: "comment_profilePic",
package/dist/index.esm.js CHANGED
@@ -4121,6 +4121,26 @@ var Comment = /*#__PURE__*/function (_Component) {
4121
4121
  }
4122
4122
 
4123
4123
  _createClass(Comment, [{
4124
+ key: "renderImage",
4125
+ value: function renderImage(image) {
4126
+ if (_.isEmpty(image)) {
4127
+ return null;
4128
+ }
4129
+
4130
+ return /*#__PURE__*/React.createElement("div", {
4131
+ className: "imageGrid"
4132
+ }, /*#__PURE__*/React.createElement("a", {
4133
+ href: image,
4134
+ target: "_blank",
4135
+ rel: "noopener noreferrer"
4136
+ }, /*#__PURE__*/React.createElement("div", {
4137
+ className: "imageGrid_image",
4138
+ style: {
4139
+ backgroundImage: "url('".concat(get1400(image), "')")
4140
+ }
4141
+ })));
4142
+ }
4143
+ }, {
4124
4144
  key: "renderComment",
4125
4145
  value: function renderComment() {
4126
4146
  var comment = this.props.comment;
@@ -4129,7 +4149,7 @@ var Comment = /*#__PURE__*/function (_Component) {
4129
4149
  className: "comment"
4130
4150
  }, /*#__PURE__*/React.createElement("p", {
4131
4151
  className: "comment_text"
4132
- }, toParagraphed(comment.Comment)), /*#__PURE__*/React.createElement("div", {
4152
+ }, toParagraphed(comment.Comment)), this.renderImage(comment.Image), /*#__PURE__*/React.createElement("div", {
4133
4153
  className: "comment_bottom"
4134
4154
  }, /*#__PURE__*/React.createElement(ProfilePic, {
4135
4155
  className: "comment_profilePic",
package/dist/index.umd.js CHANGED
@@ -4119,6 +4119,26 @@
4119
4119
  }
4120
4120
 
4121
4121
  _createClass__default['default'](Comment, [{
4122
+ key: "renderImage",
4123
+ value: function renderImage(image) {
4124
+ if (___default['default'].isEmpty(image)) {
4125
+ return null;
4126
+ }
4127
+
4128
+ return /*#__PURE__*/React__default['default'].createElement("div", {
4129
+ className: "imageGrid"
4130
+ }, /*#__PURE__*/React__default['default'].createElement("a", {
4131
+ href: image,
4132
+ target: "_blank",
4133
+ rel: "noopener noreferrer"
4134
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
4135
+ className: "imageGrid_image",
4136
+ style: {
4137
+ backgroundImage: "url('".concat(get1400(image), "')")
4138
+ }
4139
+ })));
4140
+ }
4141
+ }, {
4122
4142
  key: "renderComment",
4123
4143
  value: function renderComment() {
4124
4144
  var comment = this.props.comment;
@@ -4127,7 +4147,7 @@
4127
4147
  className: "comment"
4128
4148
  }, /*#__PURE__*/React__default['default'].createElement("p", {
4129
4149
  className: "comment_text"
4130
- }, toParagraphed(comment.Comment)), /*#__PURE__*/React__default['default'].createElement("div", {
4150
+ }, toParagraphed(comment.Comment)), this.renderImage(comment.Image), /*#__PURE__*/React__default['default'].createElement("div", {
4131
4151
  className: "comment_bottom"
4132
4152
  }, /*#__PURE__*/React__default['default'].createElement(ProfilePic, {
4133
4153
  className: "comment_profilePic",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-web",
3
- "version": "1.4.33",
3
+ "version": "1.4.34",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -1,14 +1,29 @@
1
1
  import React, { Component } from 'react';
2
2
  import moment from 'moment';
3
- import { toParagraphed } from '../helper';
3
+ import { get1400, toParagraphed } from '../helper';
4
4
  import { ProfilePic } from './ProfilePic';
5
+ import _ from 'lodash';
5
6
 
6
7
  class Comment extends Component {
8
+ renderImage(image) {
9
+ if (_.isEmpty(image)) {
10
+ return null;
11
+ }
12
+ return (
13
+ <div className="imageGrid">
14
+ <a href={image} target="_blank" rel="noopener noreferrer">
15
+ <div className="imageGrid_image" style={{ backgroundImage: `url('${get1400(image)}')` }}></div>
16
+ </a>
17
+ </div>
18
+ );
19
+ }
20
+
7
21
  renderComment() {
8
22
  const { comment } = this.props;
9
23
  return (
10
24
  <div key={comment.Id} className="comment">
11
25
  <p className="comment_text">{toParagraphed(comment.Comment)}</p>
26
+ {this.renderImage(comment.Image)}
12
27
  <div className="comment_bottom">
13
28
  <ProfilePic className="comment_profilePic" size={25} image={comment.User.profilePic} />
14
29
  <p className="comment_name">{comment.User.displayName}</p>