@plusscommunities/pluss-core-web 1.4.3 → 1.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-web",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -10,7 +10,7 @@ import {
10
10
  INVITE_CODE_REMOVED,
11
11
  } from './types';
12
12
  import { userActions } from '../apis';
13
- import { readStorageWithCookie } from '../../../../helper';
13
+ import { readStorageWithCookie } from '../helper';
14
14
 
15
15
  export const usersUpdate = (site) => {
16
16
  return (dispatch) => {
@@ -35,16 +35,20 @@ class HubSidebar extends PureComponent {
35
35
  });
36
36
  }
37
37
 
38
- renderNewButton(item, index) {
38
+ renderButton(item, index) {
39
39
  return (
40
- <div key={`newbutton_${index}`} className="hubSidebar_newButtonContainer">
41
- <Button buttonType={item.buttonType || 'primary'} isActive leftIcon="plus" narrow onClick={item.onClick}>
40
+ <div key={`button_${index}`} className="hubSidebar_newButtonContainer">
41
+ <Button buttonType={item.buttonType || 'primary'} isActive leftIcon={item.icon} narrow onClick={item.onClick}>
42
42
  {item.text}
43
43
  </Button>
44
44
  </div>
45
45
  );
46
46
  }
47
47
 
48
+ renderNewButton(item, index) {
49
+ return this.renderButton({ ...item, icon: 'plus' }, index);
50
+ }
51
+
48
52
  renderNavItem(item, index) {
49
53
  return (
50
54
  <SideNavItem
@@ -68,6 +72,8 @@ class HubSidebar extends PureComponent {
68
72
  </Text>
69
73
  {section.items.map((item, itemIndex) => {
70
74
  switch (item.type) {
75
+ case 'button':
76
+ return this.renderButton(item, itemIndex);
71
77
  case 'newButton':
72
78
  return this.renderNewButton(item, itemIndex);
73
79
  case 'navItem':
@@ -525,6 +525,7 @@ class ImageInputComponent extends Component {
525
525
  }}
526
526
  >
527
527
  <Dropzone
528
+ disabled={this.props.disabled}
528
529
  accept={`image/jpeg, image/png${this.props.allowVideo ? ', video/*' : ''}`}
529
530
  onDrop={(files) => this.onDrop(files, true)}
530
531
  className="imageInput_buttonContainer-simple"
@@ -572,6 +573,7 @@ class ImageInputComponent extends Component {
572
573
  return (
573
574
  <div key={index} className={this.getClassNames(input, inputsLength)} style={{ ...this.props.style }}>
574
575
  <Dropzone
576
+ disabled={this.props.disabled}
575
577
  className={`imageInput_upload ${this.getErrorState()}`}
576
578
  accept={`image/jpeg, image/png${this.props.allowVideo ? ', video/*' : ''}`}
577
579
  onDrop={this.onDrop}
@@ -797,6 +799,7 @@ class ImageInputComponent extends Component {
797
799
  <div>
798
800
  {this.canAddImageToLibrary() && (
799
801
  <Dropzone
802
+ disabled={this.props.disabled}
800
803
  className={`imageInput_upload folder ${this.getErrorState()}`}
801
804
  accept={`image/jpeg, image/png${this.props.allowVideo ? ', video/*' : ''}`}
802
805
  onDrop={(files) => this.onDrop(files, true)}
@@ -894,6 +897,7 @@ class ImageInputComponent extends Component {
894
897
  return (
895
898
  <div className="imageInputRight">
896
899
  <Dropzone
900
+ disabled={this.props.disabled}
897
901
  accept={`image/jpeg, image/png${this.props.allowVideo ? ', video/*' : ''}`}
898
902
  onDrop={(files) => this.onDrop(files, true)}
899
903
  className="imageInputRight_button"