ui-kit-ck-consultant 0.5.200 → 0.5.203
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 +18 -14
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +18 -14
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -9956,15 +9956,17 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
9956
9956
|
};
|
9957
9957
|
|
9958
9958
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
9959
|
+
var _this2 = this;
|
9960
|
+
|
9959
9961
|
if (prevProps.show !== this.props.show && this.props.show && this.props.valueDate) {
|
9960
9962
|
this.setState({
|
9961
9963
|
year: parseInt(moment(this.props.valueDate).format('YYYY')),
|
9962
9964
|
month: parseInt(moment(this.props.valueDate).format('M')),
|
9963
9965
|
activeDate: this.props.valueDate
|
9964
|
-
},
|
9965
|
-
|
9966
|
-
|
9967
|
-
if (prevProps.show !== this.props.show) {
|
9966
|
+
}, function () {
|
9967
|
+
_this2.getArrayDays();
|
9968
|
+
});
|
9969
|
+
} else if (prevProps.show !== this.props.show) {
|
9968
9970
|
this.getArrayDays();
|
9969
9971
|
}
|
9970
9972
|
|
@@ -9974,11 +9976,13 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
9974
9976
|
}, this.getArrayTime);
|
9975
9977
|
} else if (prevProps.show !== this.props.show) {
|
9976
9978
|
this.getArrayTime();
|
9979
|
+
} else if (this.props.timesRange && JSON.stringify(this.props.timesRange) !== JSON.stringify(prevProps.timesRange)) {
|
9980
|
+
this.getArrayTime();
|
9977
9981
|
}
|
9978
9982
|
};
|
9979
9983
|
|
9980
9984
|
_proto.render = function render() {
|
9981
|
-
var
|
9985
|
+
var _this3 = this;
|
9982
9986
|
|
9983
9987
|
if (!this.props.show) {
|
9984
9988
|
return null;
|
@@ -10027,14 +10031,14 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
10027
10031
|
return /*#__PURE__*/React.createElement("tr", {
|
10028
10032
|
key: idxRow
|
10029
10033
|
}, row.map(function (col, idxCol) {
|
10030
|
-
return
|
10031
|
-
key: idxCol
|
10034
|
+
return _this3.props.isWeek || idxCol < 5 ? /*#__PURE__*/React.createElement("td", {
|
10035
|
+
key: idxRow + "-" + idxCol
|
10032
10036
|
}, col ? /*#__PURE__*/React.createElement("span", {
|
10033
|
-
className:
|
10037
|
+
className: _this3.checkActiveClassName(idxRow, idxCol),
|
10034
10038
|
onClick: function onClick() {
|
10035
|
-
return
|
10039
|
+
return _this3.handleActiveClick(idxRow, idxCol);
|
10036
10040
|
}
|
10037
|
-
}, moment(
|
10041
|
+
}, moment(_this3.state.year + "-" + _this3.state.month + "-" + col, 'YYYY-M-D').format('DD')) : null) : null;
|
10038
10042
|
}));
|
10039
10043
|
})))))), this.props.isTime && this.state.activeDate ? /*#__PURE__*/React.createElement(Col, {
|
10040
10044
|
xs: 12,
|
@@ -10044,9 +10048,9 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
10044
10048
|
}, this.state.times.map(function (time, idx) {
|
10045
10049
|
return /*#__PURE__*/React.createElement("div", {
|
10046
10050
|
key: idx,
|
10047
|
-
className: classNames$1(style$x.calendar_time_button, time ===
|
10051
|
+
className: classNames$1(style$x.calendar_time_button, time === _this3.state.activeTime ? style$x.active : '', _this3.props.disabledTime.includes(time) ? style$x.disabled : ''),
|
10048
10052
|
onClick: function onClick() {
|
10049
|
-
return
|
10053
|
+
return _this3.handleTimeClick(time);
|
10050
10054
|
}
|
10051
10055
|
}, /*#__PURE__*/React.createElement("span", null, time));
|
10052
10056
|
}))) : null), /*#__PURE__*/React.createElement("div", {
|
@@ -10054,14 +10058,14 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
10054
10058
|
}, /*#__PURE__*/React.createElement("div", {
|
10055
10059
|
className: classNames$1(style$x.calendar_button, style$x.button_red),
|
10056
10060
|
onClick: function onClick() {
|
10057
|
-
return
|
10061
|
+
return _this3.props.onClose();
|
10058
10062
|
}
|
10059
10063
|
}, /*#__PURE__*/React.createElement("span", null, "Retour"), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
10060
10064
|
icon: faTimes
|
10061
10065
|
})), /*#__PURE__*/React.createElement("div", {
|
10062
10066
|
className: style$x.calendar_button,
|
10063
10067
|
onClick: function onClick() {
|
10064
|
-
return
|
10068
|
+
return _this3.props.onValid(_this3.state.activeDate, _this3.state.activeTime);
|
10065
10069
|
}
|
10066
10070
|
}, /*#__PURE__*/React.createElement("span", null, "Valider"), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
10067
10071
|
icon: faCheck
|