wini-web-components 1.0.7 → 1.0.9

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.
@@ -111,7 +111,7 @@ var Calendar = /** @class */ (function (_super) {
111
111
  if (!(0, exports.inRangeTime)(timeValue, exports.startDate, exports.endDate)) {
112
112
  additionProps = { 'in-range': 'false' };
113
113
  }
114
- else if (!(0, exports.inRangeTime)(timeValue, (_a = _this.props.min) !== null && _a !== void 0 ? _a : exports.startDate, (_b = _this.props.min) !== null && _b !== void 0 ? _b : exports.endDate)) {
114
+ else if (!(0, exports.inRangeTime)(timeValue, (_a = _this.props.min) !== null && _a !== void 0 ? _a : exports.startDate, (_b = _this.props.max) !== null && _b !== void 0 ? _b : exports.endDate)) {
115
115
  style = __assign(__assign({}, style), { color: 'var(--disabled-font-color)', pointerEvents: 'none' });
116
116
  }
117
117
  else if (_this.state.value.valueOf() === timeValue.valueOf()) {
@@ -183,7 +183,7 @@ var Calendar = /** @class */ (function (_super) {
183
183
  if (!(0, exports.inRangeTime)(timeValue, exports.startDate, exports.endDate)) {
184
184
  additionProps = { 'in-range': 'false' };
185
185
  }
186
- else if (!(0, exports.inRangeTime)(new Date(_this.state.selectYear, _this.state.selectMonth), (_a = _this.props.min) !== null && _a !== void 0 ? _a : exports.startDate, (_b = _this.props.min) !== null && _b !== void 0 ? _b : exports.endDate)) {
186
+ else if (!(0, exports.inRangeTime)(new Date(_this.state.selectYear, _this.state.selectMonth), (_a = _this.props.min) !== null && _a !== void 0 ? _a : exports.startDate, (_b = _this.props.max) !== null && _b !== void 0 ? _b : exports.endDate)) {
187
187
  if (_this.state.selectYear === ((_c = _this.state.selectDate) === null || _c === void 0 ? void 0 : _c.getFullYear()) && _this.state.selectDate.getMonth() === i) {
188
188
  style = {
189
189
  color: 'var(--disabled-font-color)',
@@ -218,7 +218,7 @@ var Calendar = /** @class */ (function (_super) {
218
218
  if (yearNumber === exports.today.getFullYear()) {
219
219
  style = { borderColor: 'var(--infor-color)' };
220
220
  }
221
- else if (yearNumber < (((_a = _this.props.min) !== null && _a !== void 0 ? _a : exports.startDate).getFullYear()) || yearNumber > (((_b = _this.props.min) !== null && _b !== void 0 ? _b : exports.endDate).getFullYear())) {
221
+ else if (yearNumber < (((_a = _this.props.min) !== null && _a !== void 0 ? _a : exports.startDate).getFullYear()) || yearNumber > (((_b = _this.props.max) !== null && _b !== void 0 ? _b : exports.endDate).getFullYear())) {
222
222
  additionProps = { 'in-range': 'false' };
223
223
  }
224
224
  if (yearNumber === _this.state.value.getFullYear()) {
@@ -310,7 +310,7 @@ var DatePicker = /** @class */ (function (_super) {
310
310
  if (ev.target.classList.contains('popup-overlay'))
311
311
  _this.setState(__assign(__assign({}, _this.state), { isOpen: false }));
312
312
  } },
313
- react_1.default.createElement(index_1.Calendar, { value: this.getNewValue(), type: (_f = this.props.pickerType) !== null && _f !== void 0 ? _f : index_1.CalendarType.DATE, className: 'date-picker-popup-container', style: (_g = this.state.style) !== null && _g !== void 0 ? _g : { top: this.state.offset.y + this.state.offset.height + 2 + 'px', left: this.state.offset.x + 'px', border: 'none', boxShadow: '-20px 20px 40px -4px rgba(145, 158, 171, 0.24), 0px 0px 2px 0px rgba(145, 158, 171, 0.24)' }, onSelect: function (dateValue) {
313
+ react_1.default.createElement(index_1.Calendar, { min: this.props.min, max: this.props.max, value: this.getNewValue(), type: (_f = this.props.pickerType) !== null && _f !== void 0 ? _f : index_1.CalendarType.DATE, className: 'date-picker-popup-container', style: (_g = this.state.style) !== null && _g !== void 0 ? _g : { top: this.state.offset.y + this.state.offset.height + 2 + 'px', left: this.state.offset.x + 'px', border: 'none', boxShadow: '-20px 20px 40px -4px rgba(145, 158, 171, 0.24), 0px 0px 2px 0px rgba(145, 158, 171, 0.24)' }, onSelect: function (dateValue) {
314
314
  var _a;
315
315
  switch (_this.props.pickerType) {
316
316
  case index_1.CalendarType.YEAR:
@@ -155,7 +155,9 @@ var Select1 = /** @class */ (function (_super) {
155
155
  });
156
156
  };
157
157
  Select1.prototype.onSelect = function (item) {
158
- this.setState(__assign(__assign({}, this.state), { isOpen: false, value: item.id }));
158
+ var _a;
159
+ this.setState(__assign(__assign({}, this.state), { isOpen: false, value: item.id, onSelect: undefined }));
160
+ (_a = this.inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
159
161
  if (this.props.onChange)
160
162
  this.props.onChange(item);
161
163
  };