ui-kit-ck-consultant 0.5.198 → 0.5.201

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.
@@ -832,7 +832,8 @@ var Header = /*#__PURE__*/function (_React$Component) {
832
832
  return /*#__PURE__*/React.createElement("div", {
833
833
  className: classNames$1(style$a.header, this.props.className)
834
834
  }, /*#__PURE__*/React.createElement("div", {
835
- className: style$a.header_absolute
835
+ className: style$a.header_absolute,
836
+ style: this.props.styleBackground
836
837
  }), /*#__PURE__*/React.createElement("div", {
837
838
  className: style$a.header_left
838
839
  }, this.props.logo ? /*#__PURE__*/React.createElement("img", {
@@ -9868,7 +9869,13 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
9868
9869
  if (_this.state.activeDate === currentDate) {
9869
9870
  return 1;
9870
9871
  } else {
9871
- if (_this.props.disabledDates && _this.props.disabledDates.includes(currentDate) || !_this.props.isWeek && [6, 7].includes(parseInt(moment(currentDate).isoWeekday())) || !_this.props.isHoliday && _this.holidays.includes(currentDate) || _this.props.minDate && moment(_this.props.minDate).isAfter(moment(currentDate)) || _this.props.maxDate && moment(_this.props.maxDate).isBefore(moment(currentDate)) || _this.props.disabledDays && _this.props.disabledDays.filter(function (element, idx) {
9872
+ if (_this.props.enabledDates && _this.props.enabledDates.length) {
9873
+ if (_this.props.enabledDates.includes(currentDate)) {
9874
+ return 0;
9875
+ } else {
9876
+ return 2;
9877
+ }
9878
+ } else if (_this.props.disabledDates && _this.props.disabledDates.includes(currentDate) || !_this.props.isWeek && [6, 7].includes(parseInt(moment(currentDate).isoWeekday())) || !_this.props.isHoliday && _this.holidays.includes(currentDate) || _this.props.minDate && moment(_this.props.minDate).isAfter(moment(currentDate)) || _this.props.maxDate && moment(_this.props.maxDate).isBefore(moment(currentDate)) || _this.props.disabledDays && _this.props.disabledDays.filter(function (element, idx) {
9872
9879
  return element === 1 && idx === col;
9873
9880
  }).length) {
9874
9881
  return 2;
@@ -9949,12 +9956,18 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
9949
9956
  };
9950
9957
 
9951
9958
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
9959
+ var _this2 = this;
9960
+
9952
9961
  if (prevProps.show !== this.props.show && this.props.show && this.props.valueDate) {
9953
9962
  this.setState({
9954
9963
  year: parseInt(moment(this.props.valueDate).format('YYYY')),
9955
9964
  month: parseInt(moment(this.props.valueDate).format('M')),
9956
9965
  activeDate: this.props.valueDate
9957
- }, this.getArrayDays);
9966
+ }, function () {
9967
+ _this2.getArrayDays();
9968
+
9969
+ _this2.getArrayTime();
9970
+ });
9958
9971
  }
9959
9972
 
9960
9973
  if (prevProps.show !== this.props.show) {
@@ -9971,7 +9984,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
9971
9984
  };
9972
9985
 
9973
9986
  _proto.render = function render() {
9974
- var _this2 = this;
9987
+ var _this3 = this;
9975
9988
 
9976
9989
  if (!this.props.show) {
9977
9990
  return null;
@@ -10020,14 +10033,14 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
10020
10033
  return /*#__PURE__*/React.createElement("tr", {
10021
10034
  key: idxRow
10022
10035
  }, row.map(function (col, idxCol) {
10023
- return /*#__PURE__*/React.createElement(Fragment$1, null, _this2.props.isWeek || idxCol < 5 ? /*#__PURE__*/React.createElement("td", {
10036
+ return /*#__PURE__*/React.createElement(Fragment$1, null, _this3.props.isWeek || idxCol < 5 ? /*#__PURE__*/React.createElement("td", {
10024
10037
  key: idxCol
10025
10038
  }, col ? /*#__PURE__*/React.createElement("span", {
10026
- className: _this2.checkActiveClassName(idxRow, idxCol),
10039
+ className: _this3.checkActiveClassName(idxRow, idxCol),
10027
10040
  onClick: function onClick() {
10028
- return _this2.handleActiveClick(idxRow, idxCol);
10041
+ return _this3.handleActiveClick(idxRow, idxCol);
10029
10042
  }
10030
- }, moment(_this2.state.year + "-" + _this2.state.month + "-" + col, 'YYYY-M-D').format('DD')) : null) : null);
10043
+ }, moment(_this3.state.year + "-" + _this3.state.month + "-" + col, 'YYYY-M-D').format('DD')) : null) : null);
10031
10044
  }));
10032
10045
  })))))), this.props.isTime && this.state.activeDate ? /*#__PURE__*/React.createElement(Col, {
10033
10046
  xs: 12,
@@ -10037,9 +10050,9 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
10037
10050
  }, this.state.times.map(function (time, idx) {
10038
10051
  return /*#__PURE__*/React.createElement("div", {
10039
10052
  key: idx,
10040
- className: classNames$1(style$x.calendar_time_button, time === _this2.state.activeTime ? style$x.active : '', _this2.props.disabledTime.includes(time) ? style$x.disabled : ''),
10053
+ className: classNames$1(style$x.calendar_time_button, time === _this3.state.activeTime ? style$x.active : '', _this3.props.disabledTime.includes(time) ? style$x.disabled : ''),
10041
10054
  onClick: function onClick() {
10042
- return _this2.handleTimeClick(time);
10055
+ return _this3.handleTimeClick(time);
10043
10056
  }
10044
10057
  }, /*#__PURE__*/React.createElement("span", null, time));
10045
10058
  }))) : null), /*#__PURE__*/React.createElement("div", {
@@ -10047,14 +10060,14 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
10047
10060
  }, /*#__PURE__*/React.createElement("div", {
10048
10061
  className: classNames$1(style$x.calendar_button, style$x.button_red),
10049
10062
  onClick: function onClick() {
10050
- return _this2.props.onClose();
10063
+ return _this3.props.onClose();
10051
10064
  }
10052
10065
  }, /*#__PURE__*/React.createElement("span", null, "Retour"), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
10053
10066
  icon: faTimes
10054
10067
  })), /*#__PURE__*/React.createElement("div", {
10055
10068
  className: style$x.calendar_button,
10056
10069
  onClick: function onClick() {
10057
- return _this2.props.onValid(_this2.state.activeDate, _this2.state.activeTime);
10070
+ return _this3.props.onValid(_this3.state.activeDate, _this3.state.activeTime);
10058
10071
  }
10059
10072
  }, /*#__PURE__*/React.createElement("span", null, "Valider"), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
10060
10073
  icon: faCheck