ui-kit-ck-consultant 0.5.185 → 0.5.188

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.js CHANGED
@@ -901,7 +901,11 @@ var Card = /*#__PURE__*/function (_React$Component) {
901
901
  _proto.render = function render() {
902
902
  return /*#__PURE__*/React__default.createElement("div", {
903
903
  className: classNames$1(style$b.card, this.props.className)
904
- }, this.props.imgLeft ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
904
+ }, this.props.imgLeft ? /*#__PURE__*/React__default.createElement("div", {
905
+ style: {
906
+ overflow: 'hidden'
907
+ }
908
+ }, /*#__PURE__*/React__default.createElement("img", {
905
909
  style: {
906
910
  height: '100%'
907
911
  },
@@ -938,7 +942,11 @@ var Card = /*#__PURE__*/function (_React$Component) {
938
942
  onClick: this.props.onClick
939
943
  }, this.props.action))) : '', /*#__PURE__*/React__default.createElement("div", {
940
944
  className: classNames$1(style$b.card_body, this.props.classNameChildren)
941
- }, this.props.children)), this.props.imgRight ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
945
+ }, this.props.children)), this.props.imgRight ? /*#__PURE__*/React__default.createElement("div", {
946
+ style: {
947
+ overflow: 'hidden'
948
+ }
949
+ }, /*#__PURE__*/React__default.createElement("img", {
942
950
  style: {
943
951
  height: '100%'
944
952
  },
@@ -3050,29 +3058,36 @@ var DropzoneMultiple = /*#__PURE__*/function (_React$Component) {
3050
3058
  var name = file.name.split('.');
3051
3059
 
3052
3060
  if (_this.checkExtension(name[name.length - 1])) {
3053
- var reader = new window.FileReader();
3061
+ if (!_this.props.maxFileSize || _this.props.maxFileSize * 1000000 > file.size) {
3062
+ var reader = new window.FileReader();
3063
+
3064
+ reader.onload = function () {
3065
+ var base64 = reader.result;
3066
+ var tmpFiles = _this.state.files;
3067
+ tmpFiles.push({
3068
+ base64: base64,
3069
+ mime: file.type,
3070
+ name: file.name,
3071
+ extension: name[name.length - 1],
3072
+ size: file.size
3073
+ });
3054
3074
 
3055
- reader.onload = function () {
3056
- var base64 = reader.result;
3057
- var tmpFiles = _this.state.files;
3058
- tmpFiles.push({
3059
- base64: base64,
3060
- mime: file.type,
3061
- name: file.name,
3062
- extension: name[name.length - 1],
3063
- size: file.size
3064
- });
3075
+ _this.setState({
3076
+ files: tmpFiles
3077
+ }, function () {
3078
+ _this.currentFile += 1;
3065
3079
 
3066
- _this.setState({
3067
- files: tmpFiles
3068
- }, function () {
3069
- _this.currentFile += 1;
3080
+ _this.nextFile(files);
3081
+ });
3082
+ };
3070
3083
 
3071
- _this.nextFile(files);
3072
- });
3073
- };
3084
+ reader.readAsDataURL(file);
3085
+ } else {
3086
+ alert('Fichier trop volumineux');
3087
+ _this.currentFile += 1;
3074
3088
 
3075
- reader.readAsDataURL(file);
3089
+ _this.nextFile(files);
3090
+ }
3076
3091
  } else {
3077
3092
  _this.currentFile += 1;
3078
3093
 
@@ -3682,7 +3697,7 @@ var Cookie = /*#__PURE__*/function (_React$Component) {
3682
3697
  var _proto = Cookie.prototype;
3683
3698
 
3684
3699
  _proto.componentDidMount = function componentDidMount() {
3685
- if (this.props.force || this.cookies.get(this.props.name + "-cookies") !== '1') {
3700
+ if (this.props.force || this.cookies.get(this.props.name + "-cookies") !== '1' && this.cookies.get(this.props.name + "-cookies") !== '2') {
3686
3701
  this.setState({
3687
3702
  show: true
3688
3703
  });
@@ -3695,7 +3710,7 @@ var Cookie = /*#__PURE__*/function (_React$Component) {
3695
3710
 
3696
3711
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
3697
3712
  if (prevProps.force !== this.props.force || prevProps.name !== this.props.name) {
3698
- if (this.cookies.get(this.props.name + "-cookies") !== '1') {
3713
+ if (this.cookies.get(this.props.name + "-cookies") !== '1' && this.cookies.get(this.props.name + "-cookies") !== '2') {
3699
3714
  this.setState({
3700
3715
  show: true
3701
3716
  });