@steroidsjs/core 3.0.65 → 3.0.67

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/actions/list.d.ts CHANGED
@@ -109,6 +109,7 @@ export declare const LIST_DESTROY = "@list/destroy";
109
109
  export declare const LIST_TOGGLE_ITEM = "@list/toggle_item";
110
110
  export declare const LIST_TOGGLE_ALL = "@list/toggle_all";
111
111
  export declare const LIST_SET_LAYOUT = "@list/set_layout";
112
+ export declare const LIST_CHANGE_ACTION = "@list/change_action";
112
113
  export declare const httpFetchHandler: (list: IList, query: any, { http }: {
113
114
  http: any;
114
115
  }) => any;
@@ -135,6 +136,11 @@ export declare const listSetLayout: (listId: any, layoutName: any) => {
135
136
  listId: any;
136
137
  layoutName: any;
137
138
  };
139
+ export declare const listChangeAction: (listId: any, action: any) => {
140
+ type: string;
141
+ listId: any;
142
+ action: any;
143
+ };
138
144
  /**
139
145
  * Update query values and send request
140
146
  * @param listId
package/actions/list.js CHANGED
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  exports.__esModule = true;
17
- exports.toggleAll = exports.toggleItem = exports.deleteItem = exports.update = exports.add = exports.listDestroy = exports.listRefresh = exports.listLazyFetch = exports.listFetch = exports.listSetLayout = exports.listSetItems = exports.listInit = exports.localFetchHandler = exports.httpFetchHandler = exports.LIST_SET_LAYOUT = exports.LIST_TOGGLE_ALL = exports.LIST_TOGGLE_ITEM = exports.LIST_DESTROY = exports.LIST_ITEM_DELETE = exports.LIST_ITEM_UPDATE = exports.LIST_ITEM_ADD = exports.LIST_AFTER_FETCH = exports.LIST_BEFORE_FETCH = exports.LIST_SET_ITEMS = exports.LIST_INIT = void 0;
17
+ exports.toggleAll = exports.toggleItem = exports.deleteItem = exports.update = exports.add = exports.listDestroy = exports.listRefresh = exports.listLazyFetch = exports.listFetch = exports.listChangeAction = exports.listSetLayout = exports.listSetItems = exports.listInit = exports.localFetchHandler = exports.httpFetchHandler = exports.LIST_CHANGE_ACTION = exports.LIST_SET_LAYOUT = exports.LIST_TOGGLE_ALL = exports.LIST_TOGGLE_ITEM = exports.LIST_DESTROY = exports.LIST_ITEM_DELETE = exports.LIST_ITEM_UPDATE = exports.LIST_ITEM_ADD = exports.LIST_AFTER_FETCH = exports.LIST_BEFORE_FETCH = exports.LIST_SET_ITEMS = exports.LIST_INIT = void 0;
18
18
  var get_1 = __importDefault(require("lodash-es/get"));
19
19
  var isArray_1 = __importDefault(require("lodash-es/isArray"));
20
20
  var isEmpty_1 = __importDefault(require("lodash-es/isEmpty"));
@@ -37,6 +37,7 @@ exports.LIST_DESTROY = '@list/destroy';
37
37
  exports.LIST_TOGGLE_ITEM = '@list/toggle_item';
38
38
  exports.LIST_TOGGLE_ALL = '@list/toggle_all';
39
39
  exports.LIST_SET_LAYOUT = '@list/set_layout';
40
+ exports.LIST_CHANGE_ACTION = '@list/change_action';
40
41
  //const STORAGE_LAYOUT_KEY_PREFIX = 'listLayout_';
41
42
  var lazyTimers = {};
42
43
  var createList = function (listId, props) { return ({
@@ -142,6 +143,12 @@ var listSetLayout = function (listId, layoutName) { return ({
142
143
  layoutName: layoutName
143
144
  }); };
144
145
  exports.listSetLayout = listSetLayout;
146
+ var listChangeAction = function (listId, action) { return ({
147
+ type: exports.LIST_CHANGE_ACTION,
148
+ listId: listId,
149
+ action: action
150
+ }); };
151
+ exports.listChangeAction = listChangeAction;
145
152
  /*export const initSSR = (listId, props) => (dispatch, getState, {http, clientStorage}) => {
146
153
  const state = getState()
147
154
  const stateList = _get(state, ['list', 'lists', listId]);
@@ -4309,103 +4309,6 @@
4309
4309
  ],
4310
4310
  "methods": []
4311
4311
  },
4312
- "IDebounceConfig": {
4313
- "name": "IDebounceConfig",
4314
- "moduleName": "hooks/useSaveCursorPosition",
4315
- "title": "",
4316
- "description": "",
4317
- "tags": {},
4318
- "defaultProps": null,
4319
- "extends": [],
4320
- "properties": [
4321
- {
4322
- "name": "delayMs",
4323
- "decorators": [],
4324
- "description": "Задержка в мс",
4325
- "required": true,
4326
- "type": "number",
4327
- "example": null
4328
- }
4329
- ],
4330
- "methods": []
4331
- },
4332
- "ISaveCursorPositionConfig": {
4333
- "name": "ISaveCursorPositionConfig",
4334
- "moduleName": "hooks/useSaveCursorPosition",
4335
- "title": "",
4336
- "description": "",
4337
- "tags": {},
4338
- "defaultProps": null,
4339
- "extends": [],
4340
- "properties": [
4341
- {
4342
- "name": "debounce",
4343
- "decorators": [],
4344
- "description": "",
4345
- "required": false,
4346
- "type": "ISaveCursorPositionDebounceConfig",
4347
- "example": null
4348
- },
4349
- {
4350
- "name": "inputParams",
4351
- "decorators": [],
4352
- "description": "",
4353
- "required": true,
4354
- "type": "IInputParams",
4355
- "example": null
4356
- }
4357
- ],
4358
- "methods": [
4359
- {
4360
- "name": "onChangeCallback",
4361
- "decorators": [],
4362
- "description": "",
4363
- "required": false,
4364
- "type": "void",
4365
- "example": null,
4366
- "parameters": [
4367
- {
4368
- "name": "value",
4369
- "decorators": [],
4370
- "description": "",
4371
- "required": true,
4372
- "type": "any",
4373
- "example": null
4374
- }
4375
- ]
4376
- }
4377
- ]
4378
- },
4379
- "ISaveCursorPositionDebounceConfig": {
4380
- "name": "ISaveCursorPositionDebounceConfig",
4381
- "moduleName": "hooks/useSaveCursorPosition",
4382
- "title": "",
4383
- "description": "",
4384
- "tags": {},
4385
- "defaultProps": null,
4386
- "extends": [
4387
- "Partial<IDebounceConfig>"
4388
- ],
4389
- "properties": [
4390
- {
4391
- "name": "delayMs",
4392
- "decorators": [],
4393
- "description": "Задержка в мс",
4394
- "required": false,
4395
- "type": "number",
4396
- "example": null
4397
- },
4398
- {
4399
- "name": "enabled",
4400
- "decorators": [],
4401
- "description": "",
4402
- "required": true,
4403
- "type": "boolean",
4404
- "example": null
4405
- }
4406
- ],
4407
- "methods": []
4408
- },
4409
4312
  "IPreparedTreeItem": {
4410
4313
  "name": "IPreparedTreeItem",
4411
4314
  "moduleName": "hooks/useTree",
@@ -25230,15 +25133,6 @@
25230
25133
  "example": null,
25231
25134
  "defaultValue": null
25232
25135
  },
25233
- {
25234
- "name": "debounce",
25235
- "decorators": [],
25236
- "description": "Задержка применения введённого значения",
25237
- "required": false,
25238
- "type": "boolean | IDebounceConfig",
25239
- "example": null,
25240
- "defaultValue": null
25241
- },
25242
25136
  {
25243
25137
  "name": "disabled",
25244
25138
  "decorators": [],
@@ -25546,14 +25440,6 @@
25546
25440
  "type": "any",
25547
25441
  "example": null
25548
25442
  },
25549
- {
25550
- "name": "debounce",
25551
- "decorators": [],
25552
- "description": "Задержка применения введённого значения",
25553
- "required": false,
25554
- "type": "boolean | IDebounceConfig",
25555
- "example": null
25556
- },
25557
25443
  {
25558
25444
  "name": "defaultValue",
25559
25445
  "decorators": [],
@@ -25903,15 +25789,6 @@
25903
25789
  "example": null,
25904
25790
  "defaultValue": null
25905
25791
  },
25906
- {
25907
- "name": "debounce",
25908
- "decorators": [],
25909
- "description": "Задержка применения введённого значения",
25910
- "required": false,
25911
- "type": "boolean | IDebounceConfig",
25912
- "example": null,
25913
- "defaultValue": null
25914
- },
25915
25792
  {
25916
25793
  "name": "disabled",
25917
25794
  "decorators": [],
@@ -26486,15 +26363,6 @@
26486
26363
  "example": null,
26487
26364
  "defaultValue": null
26488
26365
  },
26489
- {
26490
- "name": "debounce",
26491
- "decorators": [],
26492
- "description": "Задержка применения введённого значения",
26493
- "required": false,
26494
- "type": "boolean | IDebounceConfig",
26495
- "example": null,
26496
- "defaultValue": null
26497
- },
26498
26366
  {
26499
26367
  "name": "decimal",
26500
26368
  "decorators": [],
@@ -26786,14 +26654,6 @@
26786
26654
  "type": "any",
26787
26655
  "example": null
26788
26656
  },
26789
- {
26790
- "name": "debounce",
26791
- "decorators": [],
26792
- "description": "Задержка применения введённого значения",
26793
- "required": false,
26794
- "type": "boolean | IDebounceConfig",
26795
- "example": null
26796
- },
26797
26657
  {
26798
26658
  "name": "decimal",
26799
26659
  "decorators": [],
package/en.json CHANGED
@@ -987,7 +987,6 @@
987
987
  "Логическое значение, указывающее, можно ли загрузить еще элементы для списка при скролле.": "",
988
988
  " Ref autocomplete поиска": "",
989
989
  "Подключение бесконечного скролла": "",
990
- "Задержка в мс": "",
991
990
  "Флаг определяет необходимо ли передавать query параметры в URL": "",
992
991
  "Дополнительный свойства для view части компонента": "",
993
992
  "Используется для управления раскрытием всех элементов в дереве": "",
@@ -1031,7 +1030,6 @@
1031
1030
  "Очищать сообщение об ошибке при редактировании поля. По-умолчанию включено": "",
1032
1031
  "Конструктор редактора 'ckeditor5-react' из библиотеки @steroidsjs/ckeditor5/packages/ckeditor5-build-classic\nПримечание: для использования встроенного отображения 'HtmlField', данный компонент должен быть передан": "",
1033
1032
  "Компонент редактора 'ckeditor5-react' из библиотеки @ckeditor\nПримечание: для использования встроенного отображения 'HtmlField', данный компонент должен быть передан": "",
1034
- "Задержка применения введённого значения": "",
1035
1033
  "Допустимое количество символов после разделителя": "",
1036
1034
  "Может ли число быть отрицательным": "",
1037
1035
  "Подключить бесконечный скролл": "",
package/hooks/useList.js CHANGED
@@ -275,6 +275,16 @@ function useList(config) {
275
275
  (0, list_2.listSetItems)(config.listId, config.items),
276
276
  ]);
277
277
  }, [dispatch, config.items, config.listId]);
278
+ // Check change action
279
+ var prevAction = (0, react_use_1.usePrevious)(config.action);
280
+ (0, react_use_1.useUpdateEffect)(function () {
281
+ if (prevAction && !(0, isEqual_1["default"])(config.action, prevAction)) {
282
+ dispatch([
283
+ (0, list_2.listChangeAction)(config.listId, config.action),
284
+ (0, list_2.listLazyFetch)(config.listId),
285
+ ]);
286
+ }
287
+ }, [dispatch, config.listId, config.action, prevAction]);
278
288
  // Destroy
279
289
  (0, react_use_1.useUnmount)(function () {
280
290
  var autoDestroy = typeof config.autoDestroy === 'boolean'
@@ -1,20 +1,6 @@
1
- import React from 'react';
1
+ import React, { ChangeEvent } from 'react';
2
2
  import { IInputParams } from '../ui/form/Field/fieldWrapper';
3
- export interface IDebounceConfig {
4
- /**
5
- * Задержка в мс
6
- */
7
- delayMs: number;
8
- }
9
- export interface ISaveCursorPositionDebounceConfig extends Partial<IDebounceConfig> {
10
- enabled: boolean;
11
- }
12
- export interface ISaveCursorPositionConfig {
13
- inputParams: IInputParams;
14
- onChangeCallback?: (value: any) => void;
15
- debounce?: ISaveCursorPositionDebounceConfig;
16
- }
17
- export default function useSaveCursorPosition(config: ISaveCursorPositionConfig): {
3
+ export default function useSaveCursorPosition(inputParams: IInputParams, onChangeCallback?: (value: any) => void): {
18
4
  inputRef: React.MutableRefObject<any>;
19
- onChange: any;
5
+ onChange: (event: ChangeEvent<HTMLInputElement>, value?: any) => void;
20
6
  };
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
@@ -31,36 +8,36 @@ exports.__esModule = true;
31
8
  /* eslint-disable consistent-return */
32
9
  /* eslint-disable no-return-assign */
33
10
  /* eslint-disable no-unused-expressions */
34
- var react_1 = __importStar(require("react"));
35
- var debounce_1 = __importDefault(require("lodash-es/debounce"));
36
- var DEFAULT_DEBOUNCE_DELAY_MS = 300;
37
- function useSaveCursorPosition(config) {
38
- var _a;
39
- var _b = react_1["default"].useState(null), cursor = _b[0], setCursor = _b[1];
11
+ var react_1 = __importDefault(require("react"));
12
+ var isNull_1 = __importDefault(require("lodash-es/isNull"));
13
+ function useSaveCursorPosition(inputParams, onChangeCallback) {
14
+ var _a = react_1["default"].useState(null), cursor = _a[0], setCursor = _a[1];
40
15
  var inputRef = react_1["default"].useRef(null);
41
16
  react_1["default"].useEffect(function () {
42
- var inputElement = inputRef.current;
43
- if (inputElement) {
44
- inputElement.setSelectionRange(cursor, cursor);
17
+ var el = inputRef.current;
18
+ if (!el || (0, isNull_1["default"])(cursor)) {
19
+ return;
20
+ }
21
+ var pos = Math.max(0, Math.min(cursor, el.value.length));
22
+ try {
23
+ el.setSelectionRange(pos, pos);
45
24
  }
46
- }, [cursor, config.inputParams.value]);
25
+ catch (e) {
26
+ console.error(e);
27
+ }
28
+ }, [cursor, inputParams.value]);
47
29
  var onChange = react_1["default"].useCallback(function (event, value) {
48
30
  var _a, _b, _c;
49
31
  if (value === void 0) { value = null; }
50
- if (config.onChangeCallback) {
51
- config.onChangeCallback(value || ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value));
32
+ if (onChangeCallback) {
33
+ onChangeCallback(value || ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value));
52
34
  }
53
35
  setCursor((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.selectionStart);
54
- config.inputParams.onChange(value || ((_c = event.target) === null || _c === void 0 ? void 0 : _c.value));
55
- }, [config.inputParams, config.onChangeCallback]);
56
- var onChangeWithDelay = (0, react_1.useMemo)(function () {
57
- var _a, _b, _c;
58
- return ((_a = config.debounce) === null || _a === void 0 ? void 0 : _a.enabled)
59
- && (0, debounce_1["default"])(onChange, (_c = (_b = config.debounce) === null || _b === void 0 ? void 0 : _b.delayMs) !== null && _c !== void 0 ? _c : DEFAULT_DEBOUNCE_DELAY_MS);
60
- }, [config.debounce, onChange]);
36
+ inputParams.onChange(value || ((_c = event.target) === null || _c === void 0 ? void 0 : _c.value));
37
+ }, [inputParams, onChangeCallback]);
61
38
  return {
62
39
  inputRef: inputRef,
63
- onChange: ((_a = config.debounce) === null || _a === void 0 ? void 0 : _a.enabled) ? onChangeWithDelay : onChange
40
+ onChange: onChange
64
41
  };
65
42
  }
66
43
  exports["default"] = useSaveCursorPosition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/core",
3
- "version": "3.0.65",
3
+ "version": "3.0.67",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {
package/reducers/list.js CHANGED
@@ -133,6 +133,10 @@ var reducerMap = (_a = {},
133
133
  var _a;
134
134
  return (__assign(__assign({}, state), { lists: __assign(__assign({}, state.lists), (_a = {}, _a[action.listId] = __assign(__assign({}, state.lists[action.listId]), { layoutName: action.layoutName }), _a)) }));
135
135
  },
136
+ _a[list_1.LIST_CHANGE_ACTION] = function (state, action) {
137
+ var _a;
138
+ return (__assign(__assign({}, state), { lists: __assign(__assign({}, state.lists), (_a = {}, _a[action.listId] = __assign(__assign({}, state.lists[action.listId]), { action: action.action }), _a)) }));
139
+ },
136
140
  _a);
137
141
  exports["default"] = (function (state, action) {
138
142
  if (state === void 0) { state = initialState; }
@@ -44,9 +44,7 @@ var useInputTypeEmail_1 = __importDefault(require("./hooks/useInputTypeEmail"));
44
44
  var enums_1 = require("../../../enums");
45
45
  function EmailField(props) {
46
46
  var components = (0, hooks_1.useComponents)();
47
- var _a = (0, hooks_1.useSaveCursorPosition)({
48
- inputParams: props.input
49
- }), currentInputRef = _a.inputRef, onChange = _a.onChange;
47
+ var _a = (0, hooks_1.useSaveCursorPosition)(props.input), currentInputRef = _a.inputRef, onChange = _a.onChange;
50
48
  var onInputChange = (0, useInputTypeEmail_1["default"])(currentInputRef, onChange, props.input.value).onInputChange;
51
49
  var onClear = react_1["default"].useCallback(function () { return props.input.onChange(''); }, [props.input]);
52
50
  var inputProps = react_1["default"].useMemo(function () {
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  import { InputHTMLAttributes, ReactNode } from 'react';
3
3
  import { MaskitoOptions } from '@maskito/core';
4
4
  import { IFieldWrapperInputProps, IFieldWrapperOutputProps } from '../Field/fieldWrapper';
5
- import { IDebounceConfig } from '../../../hooks/useSaveCursorPosition';
6
5
  export declare const MASK_PRESETS: {
7
6
  date: Required<MaskitoOptions>;
8
7
  phone: {
@@ -88,10 +87,6 @@ export interface IInputFieldProps extends IBaseFieldProps {
88
87
  * Пользовательская иконка svg или название иконки
89
88
  */
90
89
  leadIcon?: React.ReactElement | string;
91
- /**
92
- * Задержка применения введённого значения
93
- */
94
- debounce?: boolean | IDebounceConfig;
95
90
  }
96
91
  export interface IInputFieldViewProps extends IInputFieldProps, IFieldWrapperOutputProps {
97
92
  inputProps: {
@@ -87,16 +87,11 @@ exports.MASK_PRESETS = {
87
87
  }
88
88
  };
89
89
  function InputField(props) {
90
- var _a;
91
90
  var components = (0, hooks_1.useComponents)();
92
91
  var maskedInputRef = (0, react_2.useMaskito)({
93
92
  options: props.maskOptions
94
93
  });
95
- var _b = (0, hooks_1.useSaveCursorPosition)({
96
- inputParams: props.input,
97
- onChangeCallback: props.onChange,
98
- debounce: __assign({ enabled: !!props.debounce }, (typeof props.debounce === 'boolean' ? { enabled: props.debounce } : ((_a = props.debounce) !== null && _a !== void 0 ? _a : {})))
99
- }), inputRef = _b.inputRef, onChange = _b.onChange;
94
+ var _a = (0, hooks_1.useSaveCursorPosition)(props.input), inputRef = _a.inputRef, onChange = _a.onChange;
100
95
  React.useEffect(function () {
101
96
  if (inputRef.current) {
102
97
  maskedInputRef(inputRef.current);
@@ -1,7 +1,6 @@
1
1
  import React, { ChangeEvent } from 'react';
2
2
  import { IBaseFieldProps } from '../InputField/InputField';
3
3
  import { IFieldWrapperInputProps, IFieldWrapperOutputProps } from '../Field/fieldWrapper';
4
- import { IDebounceConfig } from '../../../hooks/useSaveCursorPosition';
5
4
  /**
6
5
  * NumberField
7
6
  *
@@ -31,10 +30,6 @@ export interface INumberFieldProps extends IFieldWrapperInputProps, IBaseFieldPr
31
30
  * Может ли число быть отрицательным
32
31
  */
33
32
  isCanBeNegative?: boolean;
34
- /**
35
- * Задержка применения введённого значения
36
- */
37
- debounce?: boolean | IDebounceConfig;
38
33
  }
39
34
  export interface INumberFieldViewProps extends INumberFieldProps, IFieldWrapperOutputProps {
40
35
  inputProps: {
@@ -45,13 +45,8 @@ var useInputTypeNumber_1 = __importDefault(require("./hooks/useInputTypeNumber")
45
45
  var enums_1 = require("../../../enums");
46
46
  var DEFAULT_STEP = 1;
47
47
  function NumberField(props) {
48
- var _a;
49
48
  var components = (0, hooks_1.useComponents)();
50
- var _b = (0, hooks_1.useSaveCursorPosition)({
51
- inputParams: props.input,
52
- onChangeCallback: props.onChange,
53
- debounce: __assign({ enabled: !!props.debounce }, (typeof props.debounce === 'boolean' ? { enabled: props.debounce } : ((_a = props.debounce) !== null && _a !== void 0 ? _a : {})))
54
- }), currentInputRef = _b.inputRef, onChange = _b.onChange;
49
+ var _a = (0, hooks_1.useSaveCursorPosition)(props.input), currentInputRef = _a.inputRef, onChange = _a.onChange;
55
50
  var step = react_1["default"].useMemo(function () { var _a; return (_a = props.step) !== null && _a !== void 0 ? _a : DEFAULT_STEP; }, [props.step]);
56
51
  var onInputChange = (0, useInputTypeNumber_1["default"])(currentInputRef, {
57
52
  max: props.max,
@@ -56,9 +56,7 @@ exports.checkPassword = checkPassword;
56
56
  function PasswordField(props) {
57
57
  var _a = (0, react_1.useState)(InputType.PASSWORD), type = _a[0], setType = _a[1];
58
58
  var components = (0, hooks_1.useComponents)();
59
- var _b = (0, hooks_1.useSaveCursorPosition)({
60
- inputParams: props.input
61
- }), inputRef = _b.inputRef, onChange = _b.onChange;
59
+ var _b = (0, hooks_1.useSaveCursorPosition)(props.input), inputRef = _b.inputRef, onChange = _b.onChange;
62
60
  var onClear = (0, react_1.useCallback)(function () { return props.input.onChange(''); }, [props.input]);
63
61
  var onShowButtonClick = (0, react_1.useCallback)(function () {
64
62
  type === InputType.PASSWORD ? setType(InputType.TEXT) : setType(InputType.PASSWORD);
@@ -21,9 +21,7 @@ var enums_1 = require("../../../enums");
21
21
  function TextField(props) {
22
22
  // const dispatch = useDispatch();
23
23
  var components = (0, hooks_1.useComponents)();
24
- var _a = (0, hooks_1.useSaveCursorPosition)({
25
- inputParams: props.input
26
- }), inputRef = _a.inputRef, onChange = _a.onChange;
24
+ var _a = (0, hooks_1.useSaveCursorPosition)(props.input), inputRef = _a.inputRef, onChange = _a.onChange;
27
25
  var onKeyUp = (0, react_1.useCallback)(function (e) {
28
26
  if (props.submitOnEnter
29
27
  && props.formId