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