@steroidsjs/core 2.2.26 → 2.2.29

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/hooks/useFile.js CHANGED
@@ -173,13 +173,13 @@ function useFile(props) {
173
173
  //todo refactoring
174
174
  react_1.useEffect(function () {
175
175
  if (prevInputValue && !isEqual_1["default"](prevInputValue !== props.input.value)) {
176
- var toRemove_1 = difference_1["default"]([].concat(props.input.value || []), [].concat(prevInputValue || []));
176
+ var toRemove_1 = difference_1["default"]([].concat(prevInputValue || []), [].concat(props.input.value || []));
177
177
  if (toRemove_1.length > 0) {
178
178
  uploader.queue.remove(uploader.queue.getFiles().filter(function (file) { return (toRemove_1.indexOf(get_1["default"](file.getResultHttpMessage(), 'id')) !== -1); }));
179
179
  }
180
180
  }
181
181
  // eslint-disable-next-line react-hooks/exhaustive-deps
182
- }, [prevInputValue]);
182
+ }, [prevInputValue, props.input.value]);
183
183
  /**
184
184
  * Show browse dialog in user browser
185
185
  * @param {object} event
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/core",
3
- "version": "2.2.26",
3
+ "version": "2.2.29",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {
@@ -1,9 +1,10 @@
1
+ import { DayPickerProps } from 'react-day-picker';
1
2
  export interface ICalendarProps {
2
3
  /**
3
4
  * Значение задает выбранные в календаре дату или диапазон дат.
4
5
  * Необходимо передать валидную дату в виде строки (массива строк)
5
6
  */
6
- value: string | string[];
7
+ value?: string | string[];
7
8
  /**
8
9
  * Формат даты отправляемый на сервер
9
10
  * @example YYYY-MM-DD
@@ -17,7 +18,7 @@ export interface ICalendarProps {
17
18
  * Свойства для компонента DayPickerInput
18
19
  * @example {dayPickerProps: {showWeekNumbers: true}}
19
20
  */
20
- pickerProps?: any;
21
+ pickerProps?: DayPickerProps | any;
21
22
  /**
22
23
  * Переопределение view React компонента для кастомизации отображения
23
24
  * @example MyCustomView
@@ -38,7 +38,7 @@ function Calendar(props) {
38
38
  var onMonthSelect = react_1.useCallback(function (newMonth) {
39
39
  setMonth(newMonth);
40
40
  }, []);
41
- return components.ui.renderView(props.view || 'content.CalendarView', __assign(__assign({}, props.viewProps), { month: month,
41
+ return components.ui.renderView(props.view || 'content.CalendarView', __assign(__assign(__assign({}, props.viewProps), props.pickerProps), { month: month,
42
42
  toYear: toYear,
43
43
  fromYear: fromYear,
44
44
  onDaySelect: onDaySelect,
@@ -123,6 +123,7 @@ function Button(props) {
123
123
  isFailed: isFailed,
124
124
  isLoading: isLoading,
125
125
  disabled: disabled,
126
+ submitting: submitting,
126
127
  tag: tag, formId: (context === null || context === void 0 ? void 0 : context.formId) || null, url: url || (tag === 'a' ? '#' : null), onClick: !disabled ? onClick : undefined, children: props.label || props.children }));
127
128
  if (layout) {
128
129
  return (React.createElement(FieldLayout_1["default"], { layout: layout }, button));