@plusscommunities/pluss-core-web 1.4.30 → 1.4.31

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
@@ -1096,48 +1096,15 @@ var getPluralOptions = function getPluralOptions(count, singular, plural) {
1096
1096
  };
1097
1097
 
1098
1098
  var setChatUser = function setChatUser(auth) {
1099
- if (!window.tidioChatApi || !window.tidioChatApi.setVisitorData) {
1100
- setTimeout(function () {
1101
- setChatUser(auth);
1102
- }, 1000);
1103
- return;
1104
- }
1105
-
1106
- if (!auth.user) {
1107
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1108
- name: undefined,
1109
- email: undefined,
1110
- phone: undefined,
1111
- site: undefined,
1112
- company: CoreConfig.env.clientName,
1113
- distinct_id: undefined
1114
- });
1115
- }
1099
+ return;
1100
+ }; // deprecated
1116
1101
 
1117
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1118
- name: "".concat(auth.user.displayName, " - ").concat(CoreConfig.env.clientName, " ").concat(auth.site),
1119
- email: auth.user.email,
1120
- phone: auth.user.phoneNumber,
1121
- site: auth.site,
1122
- userType: auth.auth,
1123
- company: CoreConfig.env.clientName,
1124
- distinct_id: auth.user.Id
1125
- });
1126
- };
1127
1102
  var openChat = function openChat() {
1128
- window.tidioChatApi.display(true);
1129
- window.tidioChatApi.open();
1130
- };
1103
+ return;
1104
+ }; // deprecated
1105
+
1131
1106
  var hideChat = function hideChat() {
1132
- if (window.tidioChatApi && window.tidioChatApi.display) {
1133
- setTimeout(function () {
1134
- window.tidioChatApi.display(false);
1135
- }, 1000);
1136
- } else {
1137
- setTimeout(function () {
1138
- hideChat();
1139
- }, 1000);
1140
- }
1107
+ return;
1141
1108
  };
1142
1109
 
1143
1110
  // api
@@ -6847,11 +6814,12 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
6847
6814
  onDrop: function onDrop(files) {
6848
6815
  return _this6.onDrop(files, true);
6849
6816
  }
6850
- }, function (_ref8) {
6851
- var getRootProps = _ref8.getRootProps;
6817
+ }, function (state) {
6818
+ var getRootProps = state.getRootProps,
6819
+ getInputProps = state.getInputProps;
6852
6820
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
6853
6821
  className: "imageInput_buttonContainer-simple"
6854
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement(Button, {
6822
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement(Button, {
6855
6823
  buttonType: "secondary",
6856
6824
  className: "imageInput_button imageInput_button-simple",
6857
6825
  disabled: true
@@ -6899,13 +6867,14 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
6899
6867
  disabled: this.props.disabled,
6900
6868
  accept: this.getAccept(),
6901
6869
  onDrop: this.onDrop
6902
- }, function (_ref9) {
6903
- var getRootProps = _ref9.getRootProps,
6904
- isDragActive = _ref9.isDragActive;
6870
+ }, function (state) {
6871
+ var getRootProps = state.getRootProps,
6872
+ getInputProps = state.getInputProps,
6873
+ isDragActive = state.isDragActive;
6905
6874
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
6906
6875
  style: _objectSpread$a({}, _this6.props.style),
6907
6876
  className: "imageInput_upload ".concat(_this6.getErrorState())
6908
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("div", {
6877
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement("div", {
6909
6878
  className: "".concat(isDragActive ? 'imageInput_dropZoneActive' : '', " ").concat(_this6.props.horizontalText ? ' imageInput_horizontalText' : '')
6910
6879
  }, !_this6.props.simpleStyle && /*#__PURE__*/React__default['default'].createElement("img", {
6911
6880
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7149,15 +7118,16 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
7149
7118
  onDrop: function onDrop(files) {
7150
7119
  return _this12.onDrop(files, true);
7151
7120
  }
7152
- }, function (_ref10) {
7153
- var getRootProps = _ref10.getRootProps,
7154
- isDragActive = _ref10.isDragActive;
7121
+ }, function (state) {
7122
+ var getRootProps = state.getRootProps,
7123
+ getInputProps = state.getInputProps,
7124
+ isDragActive = state.isDragActive;
7155
7125
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
7156
7126
  style: {
7157
7127
  padding: '15px'
7158
7128
  },
7159
7129
  className: "imageInput_upload folder ".concat(_this12.getErrorState())
7160
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("div", {
7130
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement("div", {
7161
7131
  className: isDragActive ? 'imageInput_dropZoneActive' : ''
7162
7132
  }, /*#__PURE__*/React__default['default'].createElement("img", {
7163
7133
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7251,11 +7221,12 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
7251
7221
  onDrop: function onDrop(files) {
7252
7222
  return _this15.onDrop(files, true);
7253
7223
  }
7254
- }, function (_ref11) {
7255
- var getRootProps = _ref11.getRootProps;
7224
+ }, function (state) {
7225
+ var getRootProps = state.getRootProps,
7226
+ getInputProps = state.getInputProps;
7256
7227
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({}, getRootProps(), {
7257
7228
  className: "imageInputRight_button"
7258
- }), /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
7229
+ }), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
7259
7230
  className: "imageInputRight_button_icon",
7260
7231
  name: "plus-circle"
7261
7232
  }), /*#__PURE__*/React__default['default'].createElement("p", {
package/dist/index.esm.js CHANGED
@@ -1066,48 +1066,15 @@ var getPluralOptions = function getPluralOptions(count, singular, plural) {
1066
1066
  };
1067
1067
 
1068
1068
  var setChatUser = function setChatUser(auth) {
1069
- if (!window.tidioChatApi || !window.tidioChatApi.setVisitorData) {
1070
- setTimeout(function () {
1071
- setChatUser(auth);
1072
- }, 1000);
1073
- return;
1074
- }
1075
-
1076
- if (!auth.user) {
1077
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1078
- name: undefined,
1079
- email: undefined,
1080
- phone: undefined,
1081
- site: undefined,
1082
- company: CoreConfig.env.clientName,
1083
- distinct_id: undefined
1084
- });
1085
- }
1069
+ return;
1070
+ }; // deprecated
1086
1071
 
1087
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1088
- name: "".concat(auth.user.displayName, " - ").concat(CoreConfig.env.clientName, " ").concat(auth.site),
1089
- email: auth.user.email,
1090
- phone: auth.user.phoneNumber,
1091
- site: auth.site,
1092
- userType: auth.auth,
1093
- company: CoreConfig.env.clientName,
1094
- distinct_id: auth.user.Id
1095
- });
1096
- };
1097
1072
  var openChat = function openChat() {
1098
- window.tidioChatApi.display(true);
1099
- window.tidioChatApi.open();
1100
- };
1073
+ return;
1074
+ }; // deprecated
1075
+
1101
1076
  var hideChat = function hideChat() {
1102
- if (window.tidioChatApi && window.tidioChatApi.display) {
1103
- setTimeout(function () {
1104
- window.tidioChatApi.display(false);
1105
- }, 1000);
1106
- } else {
1107
- setTimeout(function () {
1108
- hideChat();
1109
- }, 1000);
1110
- }
1077
+ return;
1111
1078
  };
1112
1079
 
1113
1080
  // api
@@ -6817,11 +6784,12 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
6817
6784
  onDrop: function onDrop(files) {
6818
6785
  return _this6.onDrop(files, true);
6819
6786
  }
6820
- }, function (_ref8) {
6821
- var getRootProps = _ref8.getRootProps;
6787
+ }, function (state) {
6788
+ var getRootProps = state.getRootProps,
6789
+ getInputProps = state.getInputProps;
6822
6790
  return /*#__PURE__*/React.createElement("div", _extends({
6823
6791
  className: "imageInput_buttonContainer-simple"
6824
- }, getRootProps()), /*#__PURE__*/React.createElement(Button, {
6792
+ }, getRootProps()), /*#__PURE__*/React.createElement("input", getInputProps()), /*#__PURE__*/React.createElement(Button, {
6825
6793
  buttonType: "secondary",
6826
6794
  className: "imageInput_button imageInput_button-simple",
6827
6795
  disabled: true
@@ -6869,13 +6837,14 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
6869
6837
  disabled: this.props.disabled,
6870
6838
  accept: this.getAccept(),
6871
6839
  onDrop: this.onDrop
6872
- }, function (_ref9) {
6873
- var getRootProps = _ref9.getRootProps,
6874
- isDragActive = _ref9.isDragActive;
6840
+ }, function (state) {
6841
+ var getRootProps = state.getRootProps,
6842
+ getInputProps = state.getInputProps,
6843
+ isDragActive = state.isDragActive;
6875
6844
  return /*#__PURE__*/React.createElement("div", _extends({
6876
6845
  style: _objectSpread$a({}, _this6.props.style),
6877
6846
  className: "imageInput_upload ".concat(_this6.getErrorState())
6878
- }, getRootProps()), /*#__PURE__*/React.createElement("div", {
6847
+ }, getRootProps()), /*#__PURE__*/React.createElement("input", getInputProps()), /*#__PURE__*/React.createElement("div", {
6879
6848
  className: "".concat(isDragActive ? 'imageInput_dropZoneActive' : '', " ").concat(_this6.props.horizontalText ? ' imageInput_horizontalText' : '')
6880
6849
  }, !_this6.props.simpleStyle && /*#__PURE__*/React.createElement("img", {
6881
6850
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7119,15 +7088,16 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
7119
7088
  onDrop: function onDrop(files) {
7120
7089
  return _this12.onDrop(files, true);
7121
7090
  }
7122
- }, function (_ref10) {
7123
- var getRootProps = _ref10.getRootProps,
7124
- isDragActive = _ref10.isDragActive;
7091
+ }, function (state) {
7092
+ var getRootProps = state.getRootProps,
7093
+ getInputProps = state.getInputProps,
7094
+ isDragActive = state.isDragActive;
7125
7095
  return /*#__PURE__*/React.createElement("div", _extends({
7126
7096
  style: {
7127
7097
  padding: '15px'
7128
7098
  },
7129
7099
  className: "imageInput_upload folder ".concat(_this12.getErrorState())
7130
- }, getRootProps()), /*#__PURE__*/React.createElement("div", {
7100
+ }, getRootProps()), /*#__PURE__*/React.createElement("input", getInputProps()), /*#__PURE__*/React.createElement("div", {
7131
7101
  className: isDragActive ? 'imageInput_dropZoneActive' : ''
7132
7102
  }, /*#__PURE__*/React.createElement("img", {
7133
7103
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7221,11 +7191,12 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
7221
7191
  onDrop: function onDrop(files) {
7222
7192
  return _this15.onDrop(files, true);
7223
7193
  }
7224
- }, function (_ref11) {
7225
- var getRootProps = _ref11.getRootProps;
7194
+ }, function (state) {
7195
+ var getRootProps = state.getRootProps,
7196
+ getInputProps = state.getInputProps;
7226
7197
  return /*#__PURE__*/React.createElement("div", _extends({}, getRootProps(), {
7227
7198
  className: "imageInputRight_button"
7228
- }), /*#__PURE__*/React.createElement(FontAwesome, {
7199
+ }), /*#__PURE__*/React.createElement("input", getInputProps()), /*#__PURE__*/React.createElement(FontAwesome, {
7229
7200
  className: "imageInputRight_button_icon",
7230
7201
  name: "plus-circle"
7231
7202
  }), /*#__PURE__*/React.createElement("p", {
package/dist/index.umd.js CHANGED
@@ -1064,48 +1064,15 @@
1064
1064
  };
1065
1065
 
1066
1066
  var setChatUser = function setChatUser(auth) {
1067
- if (!window.tidioChatApi || !window.tidioChatApi.setVisitorData) {
1068
- setTimeout(function () {
1069
- setChatUser(auth);
1070
- }, 1000);
1071
- return;
1072
- }
1073
-
1074
- if (!auth.user) {
1075
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1076
- name: undefined,
1077
- email: undefined,
1078
- phone: undefined,
1079
- site: undefined,
1080
- company: CoreConfig.env.clientName,
1081
- distinct_id: undefined
1082
- });
1083
- }
1067
+ return;
1068
+ }; // deprecated
1084
1069
 
1085
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1086
- name: "".concat(auth.user.displayName, " - ").concat(CoreConfig.env.clientName, " ").concat(auth.site),
1087
- email: auth.user.email,
1088
- phone: auth.user.phoneNumber,
1089
- site: auth.site,
1090
- userType: auth.auth,
1091
- company: CoreConfig.env.clientName,
1092
- distinct_id: auth.user.Id
1093
- });
1094
- };
1095
1070
  var openChat = function openChat() {
1096
- window.tidioChatApi.display(true);
1097
- window.tidioChatApi.open();
1098
- };
1071
+ return;
1072
+ }; // deprecated
1073
+
1099
1074
  var hideChat = function hideChat() {
1100
- if (window.tidioChatApi && window.tidioChatApi.display) {
1101
- setTimeout(function () {
1102
- window.tidioChatApi.display(false);
1103
- }, 1000);
1104
- } else {
1105
- setTimeout(function () {
1106
- hideChat();
1107
- }, 1000);
1108
- }
1075
+ return;
1109
1076
  };
1110
1077
 
1111
1078
  // api
@@ -6815,11 +6782,12 @@
6815
6782
  onDrop: function onDrop(files) {
6816
6783
  return _this6.onDrop(files, true);
6817
6784
  }
6818
- }, function (_ref8) {
6819
- var getRootProps = _ref8.getRootProps;
6785
+ }, function (state) {
6786
+ var getRootProps = state.getRootProps,
6787
+ getInputProps = state.getInputProps;
6820
6788
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
6821
6789
  className: "imageInput_buttonContainer-simple"
6822
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement(Button, {
6790
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement(Button, {
6823
6791
  buttonType: "secondary",
6824
6792
  className: "imageInput_button imageInput_button-simple",
6825
6793
  disabled: true
@@ -6867,13 +6835,14 @@
6867
6835
  disabled: this.props.disabled,
6868
6836
  accept: this.getAccept(),
6869
6837
  onDrop: this.onDrop
6870
- }, function (_ref9) {
6871
- var getRootProps = _ref9.getRootProps,
6872
- isDragActive = _ref9.isDragActive;
6838
+ }, function (state) {
6839
+ var getRootProps = state.getRootProps,
6840
+ getInputProps = state.getInputProps,
6841
+ isDragActive = state.isDragActive;
6873
6842
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
6874
6843
  style: _objectSpread$a({}, _this6.props.style),
6875
6844
  className: "imageInput_upload ".concat(_this6.getErrorState())
6876
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("div", {
6845
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement("div", {
6877
6846
  className: "".concat(isDragActive ? 'imageInput_dropZoneActive' : '', " ").concat(_this6.props.horizontalText ? ' imageInput_horizontalText' : '')
6878
6847
  }, !_this6.props.simpleStyle && /*#__PURE__*/React__default['default'].createElement("img", {
6879
6848
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7117,15 +7086,16 @@
7117
7086
  onDrop: function onDrop(files) {
7118
7087
  return _this12.onDrop(files, true);
7119
7088
  }
7120
- }, function (_ref10) {
7121
- var getRootProps = _ref10.getRootProps,
7122
- isDragActive = _ref10.isDragActive;
7089
+ }, function (state) {
7090
+ var getRootProps = state.getRootProps,
7091
+ getInputProps = state.getInputProps,
7092
+ isDragActive = state.isDragActive;
7123
7093
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
7124
7094
  style: {
7125
7095
  padding: '15px'
7126
7096
  },
7127
7097
  className: "imageInput_upload folder ".concat(_this12.getErrorState())
7128
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("div", {
7098
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement("div", {
7129
7099
  className: isDragActive ? 'imageInput_dropZoneActive' : ''
7130
7100
  }, /*#__PURE__*/React__default['default'].createElement("img", {
7131
7101
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7219,11 +7189,12 @@
7219
7189
  onDrop: function onDrop(files) {
7220
7190
  return _this15.onDrop(files, true);
7221
7191
  }
7222
- }, function (_ref11) {
7223
- var getRootProps = _ref11.getRootProps;
7192
+ }, function (state) {
7193
+ var getRootProps = state.getRootProps,
7194
+ getInputProps = state.getInputProps;
7224
7195
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({}, getRootProps(), {
7225
7196
  className: "imageInputRight_button"
7226
- }), /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
7197
+ }), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
7227
7198
  className: "imageInputRight_button_icon",
7228
7199
  name: "plus-circle"
7229
7200
  }), /*#__PURE__*/React__default['default'].createElement("p", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-web",
3
- "version": "1.4.30",
3
+ "version": "1.4.31",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -37,7 +37,7 @@
37
37
  "lodash": "^4.17.4",
38
38
  "moment": "^2.18.1",
39
39
  "react": "^16.14.0",
40
- "react-dropzone": "^14.2.2",
40
+ "react-dropzone": "^14.2.3",
41
41
  "react-fontawesome": "^1.6.1",
42
42
  "react-redux": "^5.0.6",
43
43
  "react-router-dom": "^4.2.2",
@@ -535,13 +535,18 @@ class ImageInputComponent extends Component {
535
535
  }}
536
536
  >
537
537
  <Dropzone disabled={this.props.disabled} accept={this.getAccept()} onDrop={(files) => this.onDrop(files, true)}>
538
- {({ getRootProps }) => (
539
- <div className="imageInput_buttonContainer-simple" {...getRootProps()}>
540
- <Button buttonType="secondary" className="imageInput_button imageInput_button-simple" disabled>
541
- Change image
542
- </Button>
543
- </div>
544
- )}
538
+ {(state) => {
539
+ const { getRootProps, getInputProps } = state;
540
+
541
+ return (
542
+ <div className="imageInput_buttonContainer-simple" {...getRootProps()}>
543
+ <input {...getInputProps()} />
544
+ <Button buttonType="secondary" className="imageInput_button imageInput_button-simple" disabled>
545
+ Change image
546
+ </Button>
547
+ </div>
548
+ );
549
+ }}
545
550
  </Dropzone>
546
551
  </div>
547
552
  </div>
@@ -582,9 +587,11 @@ class ImageInputComponent extends Component {
582
587
  return (
583
588
  <div key={index} className={this.getClassNames(input, inputsLength)} style={{ ...this.props.style }}>
584
589
  <Dropzone disabled={this.props.disabled} accept={this.getAccept()} onDrop={this.onDrop}>
585
- {({ getRootProps, isDragActive }) => {
590
+ {(state) => {
591
+ const { getRootProps, getInputProps, isDragActive } = state;
586
592
  return (
587
593
  <div style={{ ...this.props.style }} className={`imageInput_upload ${this.getErrorState()}`} {...getRootProps()}>
594
+ <input {...getInputProps()} />
588
595
  <div
589
596
  className={`${isDragActive ? 'imageInput_dropZoneActive' : ''} ${
590
597
  this.props.horizontalText ? ' imageInput_horizontalText' : ''
@@ -805,9 +812,11 @@ class ImageInputComponent extends Component {
805
812
  <div>
806
813
  {this.canAddImageToLibrary() && (
807
814
  <Dropzone disabled={this.props.disabled} accept={this.getAccept()} onDrop={(files) => this.onDrop(files, true)}>
808
- {({ getRootProps, isDragActive }) => {
815
+ {(state) => {
816
+ const { getRootProps, getInputProps, isDragActive } = state;
809
817
  return (
810
818
  <div style={{ padding: '15px' }} className={`imageInput_upload folder ${this.getErrorState()}`} {...getRootProps()}>
819
+ <input {...getInputProps()} />
811
820
  <div className={isDragActive ? 'imageInput_dropZoneActive' : ''}>
812
821
  <img
813
822
  src="https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg"
@@ -899,23 +908,17 @@ class ImageInputComponent extends Component {
899
908
  return (
900
909
  <div className="imageInputRight">
901
910
  <Dropzone disabled={this.props.disabled} accept={this.getAccept()} onDrop={(files) => this.onDrop(files, true)}>
902
- {({ getRootProps }) => (
903
- <div {...getRootProps()} className="imageInputRight_button">
904
- <FontAwesome className="imageInputRight_button_icon" name="plus-circle" />
905
- <p className="imageInputRight_button_text">Upload File</p>
906
- </div>
907
- )}
908
- </Dropzone>
909
- {/* <Dropzone onDrop={(files) => this.onDrop(files, true)}>{({ getRootProps, getInputProps }) => (
910
- <div {...getRootProps({ disabled: this.props.disabled, accept: this.getAccept(), className: 'imageInputRight_button' })}>
911
- <div className="imageInputRight_button">
911
+ {(state) => {
912
+ const { getRootProps, getInputProps } = state;
913
+ return (
914
+ <div {...getRootProps()} className="imageInputRight_button">
912
915
  <input {...getInputProps()} />
913
916
  <FontAwesome className="imageInputRight_button_icon" name="plus-circle" />
914
917
  <p className="imageInputRight_button_text">Upload File</p>
915
918
  </div>
916
- </div>
917
- )}
918
- </Dropzone> */}
919
+ );
920
+ }}
921
+ </Dropzone>
919
922
  <div
920
923
  className="imageInputRight_button"
921
924
  onClick={() => {
@@ -1,52 +1,16 @@
1
1
  import Config from '../config';
2
2
 
3
+ // deprecated
3
4
  export const setChatUser = (auth) => {
4
- if (!window.tidioChatApi || !window.tidioChatApi.setVisitorData) {
5
- setTimeout(() => {
6
- setChatUser(auth);
7
- }, 1000);
8
- return;
9
- }
10
- if (!auth.user) {
11
- return (
12
- window.tidioChatApi &&
13
- window.tidioChatApi.setVisitorData({
14
- name: undefined,
15
- email: undefined,
16
- phone: undefined,
17
- site: undefined,
18
- company: Config.env.clientName,
19
- distinct_id: undefined,
20
- })
21
- );
22
- }
23
- return (
24
- window.tidioChatApi &&
25
- window.tidioChatApi.setVisitorData({
26
- name: `${auth.user.displayName} - ${Config.env.clientName} ${auth.site}`,
27
- email: auth.user.email,
28
- phone: auth.user.phoneNumber,
29
- site: auth.site,
30
- userType: auth.auth,
31
- company: Config.env.clientName,
32
- distinct_id: auth.user.Id,
33
- })
34
- );
5
+ return;
35
6
  };
36
7
 
8
+ // deprecated
37
9
  export const openChat = () => {
38
- window.tidioChatApi.display(true);
39
- window.tidioChatApi.open();
10
+ return;
40
11
  };
41
12
 
13
+ // deprecated
42
14
  export const hideChat = () => {
43
- if (window.tidioChatApi && window.tidioChatApi.display) {
44
- setTimeout(() => {
45
- window.tidioChatApi.display(false);
46
- }, 1000);
47
- } else {
48
- setTimeout(() => {
49
- hideChat();
50
- }, 1000);
51
- }
15
+ return;
52
16
  };