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