@steroidsjs/core 3.0.36 → 3.0.38
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/docs-autogen-result.json
CHANGED
|
@@ -13866,6 +13866,24 @@
|
|
|
13866
13866
|
"example": null
|
|
13867
13867
|
}
|
|
13868
13868
|
]
|
|
13869
|
+
},
|
|
13870
|
+
{
|
|
13871
|
+
"name": "onClear",
|
|
13872
|
+
"decorators": [],
|
|
13873
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
13874
|
+
"required": false,
|
|
13875
|
+
"type": "void",
|
|
13876
|
+
"example": null,
|
|
13877
|
+
"parameters": [
|
|
13878
|
+
{
|
|
13879
|
+
"name": "value",
|
|
13880
|
+
"decorators": [],
|
|
13881
|
+
"description": "",
|
|
13882
|
+
"required": true,
|
|
13883
|
+
"type": "string",
|
|
13884
|
+
"example": null
|
|
13885
|
+
}
|
|
13886
|
+
]
|
|
13869
13887
|
}
|
|
13870
13888
|
]
|
|
13871
13889
|
},
|
|
@@ -19041,6 +19059,15 @@
|
|
|
19041
19059
|
"type": "React.ReactNode | {}",
|
|
19042
19060
|
"example": "MyCustomView",
|
|
19043
19061
|
"defaultValue": null
|
|
19062
|
+
},
|
|
19063
|
+
{
|
|
19064
|
+
"name": "viewProps",
|
|
19065
|
+
"decorators": [],
|
|
19066
|
+
"description": "Свойства для компонента отображения",
|
|
19067
|
+
"required": false,
|
|
19068
|
+
"type": "{}",
|
|
19069
|
+
"example": "{\n customHandler: () => {...}\n}",
|
|
19070
|
+
"defaultValue": null
|
|
19044
19071
|
}
|
|
19045
19072
|
],
|
|
19046
19073
|
"methods": [
|
|
@@ -19503,6 +19530,14 @@
|
|
|
19503
19530
|
"required": false,
|
|
19504
19531
|
"type": "React.ReactNode | {}",
|
|
19505
19532
|
"example": "MyCustomView"
|
|
19533
|
+
},
|
|
19534
|
+
{
|
|
19535
|
+
"name": "viewProps",
|
|
19536
|
+
"decorators": [],
|
|
19537
|
+
"description": "Свойства для компонента отображения",
|
|
19538
|
+
"required": false,
|
|
19539
|
+
"type": "{}",
|
|
19540
|
+
"example": "{\n customHandler: () => {...}\n}"
|
|
19506
19541
|
}
|
|
19507
19542
|
],
|
|
19508
19543
|
"methods": [
|
|
@@ -19836,6 +19871,24 @@
|
|
|
19836
19871
|
"example": null
|
|
19837
19872
|
}
|
|
19838
19873
|
]
|
|
19874
|
+
},
|
|
19875
|
+
{
|
|
19876
|
+
"name": "onClear",
|
|
19877
|
+
"decorators": [],
|
|
19878
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
19879
|
+
"required": false,
|
|
19880
|
+
"type": "void",
|
|
19881
|
+
"example": null,
|
|
19882
|
+
"parameters": [
|
|
19883
|
+
{
|
|
19884
|
+
"name": "value",
|
|
19885
|
+
"decorators": [],
|
|
19886
|
+
"description": "",
|
|
19887
|
+
"required": true,
|
|
19888
|
+
"type": "string",
|
|
19889
|
+
"example": null
|
|
19890
|
+
}
|
|
19891
|
+
]
|
|
19839
19892
|
}
|
|
19840
19893
|
]
|
|
19841
19894
|
},
|
|
@@ -24582,6 +24635,24 @@
|
|
|
24582
24635
|
"example": null
|
|
24583
24636
|
}
|
|
24584
24637
|
]
|
|
24638
|
+
},
|
|
24639
|
+
{
|
|
24640
|
+
"name": "onClear",
|
|
24641
|
+
"decorators": [],
|
|
24642
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
24643
|
+
"required": false,
|
|
24644
|
+
"type": "void",
|
|
24645
|
+
"example": null,
|
|
24646
|
+
"parameters": [
|
|
24647
|
+
{
|
|
24648
|
+
"name": "value",
|
|
24649
|
+
"decorators": [],
|
|
24650
|
+
"description": "",
|
|
24651
|
+
"required": true,
|
|
24652
|
+
"type": "string",
|
|
24653
|
+
"example": null
|
|
24654
|
+
}
|
|
24655
|
+
]
|
|
24585
24656
|
}
|
|
24586
24657
|
]
|
|
24587
24658
|
},
|
|
@@ -24867,6 +24938,24 @@
|
|
|
24867
24938
|
"example": null
|
|
24868
24939
|
}
|
|
24869
24940
|
]
|
|
24941
|
+
},
|
|
24942
|
+
{
|
|
24943
|
+
"name": "onClear",
|
|
24944
|
+
"decorators": [],
|
|
24945
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
24946
|
+
"required": false,
|
|
24947
|
+
"type": "void",
|
|
24948
|
+
"example": null,
|
|
24949
|
+
"parameters": [
|
|
24950
|
+
{
|
|
24951
|
+
"name": "value",
|
|
24952
|
+
"decorators": [],
|
|
24953
|
+
"description": "",
|
|
24954
|
+
"required": true,
|
|
24955
|
+
"type": "string",
|
|
24956
|
+
"example": null
|
|
24957
|
+
}
|
|
24958
|
+
]
|
|
24870
24959
|
}
|
|
24871
24960
|
]
|
|
24872
24961
|
},
|
|
@@ -25179,7 +25268,7 @@
|
|
|
25179
25268
|
{
|
|
25180
25269
|
"name": "onClear",
|
|
25181
25270
|
"decorators": [],
|
|
25182
|
-
"description": "",
|
|
25271
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
25183
25272
|
"required": false,
|
|
25184
25273
|
"type": "void",
|
|
25185
25274
|
"example": null,
|
|
@@ -25776,6 +25865,24 @@
|
|
|
25776
25865
|
"example": null
|
|
25777
25866
|
}
|
|
25778
25867
|
]
|
|
25868
|
+
},
|
|
25869
|
+
{
|
|
25870
|
+
"name": "onClear",
|
|
25871
|
+
"decorators": [],
|
|
25872
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
25873
|
+
"required": false,
|
|
25874
|
+
"type": "void",
|
|
25875
|
+
"example": null,
|
|
25876
|
+
"parameters": [
|
|
25877
|
+
{
|
|
25878
|
+
"name": "value",
|
|
25879
|
+
"decorators": [],
|
|
25880
|
+
"description": "",
|
|
25881
|
+
"required": true,
|
|
25882
|
+
"type": "string",
|
|
25883
|
+
"example": null
|
|
25884
|
+
}
|
|
25885
|
+
]
|
|
25779
25886
|
}
|
|
25780
25887
|
]
|
|
25781
25888
|
},
|
|
@@ -26074,6 +26181,24 @@
|
|
|
26074
26181
|
"example": null
|
|
26075
26182
|
}
|
|
26076
26183
|
]
|
|
26184
|
+
},
|
|
26185
|
+
{
|
|
26186
|
+
"name": "onClear",
|
|
26187
|
+
"decorators": [],
|
|
26188
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
26189
|
+
"required": false,
|
|
26190
|
+
"type": "void",
|
|
26191
|
+
"example": null,
|
|
26192
|
+
"parameters": [
|
|
26193
|
+
{
|
|
26194
|
+
"name": "value",
|
|
26195
|
+
"decorators": [],
|
|
26196
|
+
"description": "",
|
|
26197
|
+
"required": true,
|
|
26198
|
+
"type": "string",
|
|
26199
|
+
"example": null
|
|
26200
|
+
}
|
|
26201
|
+
]
|
|
26077
26202
|
}
|
|
26078
26203
|
]
|
|
26079
26204
|
},
|
|
@@ -26314,6 +26439,24 @@
|
|
|
26314
26439
|
"example": null
|
|
26315
26440
|
}
|
|
26316
26441
|
]
|
|
26442
|
+
},
|
|
26443
|
+
{
|
|
26444
|
+
"name": "onClear",
|
|
26445
|
+
"decorators": [],
|
|
26446
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
26447
|
+
"required": false,
|
|
26448
|
+
"type": "void",
|
|
26449
|
+
"example": null,
|
|
26450
|
+
"parameters": [
|
|
26451
|
+
{
|
|
26452
|
+
"name": "value",
|
|
26453
|
+
"decorators": [],
|
|
26454
|
+
"description": "",
|
|
26455
|
+
"required": true,
|
|
26456
|
+
"type": "string",
|
|
26457
|
+
"example": null
|
|
26458
|
+
}
|
|
26459
|
+
]
|
|
26317
26460
|
}
|
|
26318
26461
|
]
|
|
26319
26462
|
},
|
|
@@ -26568,7 +26711,7 @@
|
|
|
26568
26711
|
{
|
|
26569
26712
|
"name": "onClear",
|
|
26570
26713
|
"decorators": [],
|
|
26571
|
-
"description": "",
|
|
26714
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
26572
26715
|
"required": false,
|
|
26573
26716
|
"type": "void",
|
|
26574
26717
|
"example": null,
|
|
@@ -29920,6 +30063,24 @@
|
|
|
29920
30063
|
"example": null
|
|
29921
30064
|
}
|
|
29922
30065
|
]
|
|
30066
|
+
},
|
|
30067
|
+
{
|
|
30068
|
+
"name": "onClear",
|
|
30069
|
+
"decorators": [],
|
|
30070
|
+
"description": "Callback-функция, которая вызывается при очистке input",
|
|
30071
|
+
"required": false,
|
|
30072
|
+
"type": "void",
|
|
30073
|
+
"example": null,
|
|
30074
|
+
"parameters": [
|
|
30075
|
+
{
|
|
30076
|
+
"name": "value",
|
|
30077
|
+
"decorators": [],
|
|
30078
|
+
"description": "",
|
|
30079
|
+
"required": true,
|
|
30080
|
+
"type": "string",
|
|
30081
|
+
"example": null
|
|
30082
|
+
}
|
|
30083
|
+
]
|
|
29923
30084
|
}
|
|
29924
30085
|
]
|
|
29925
30086
|
},
|
package/package.json
CHANGED
|
@@ -130,6 +130,16 @@ export interface IDropDownFieldProps extends IFieldWrapperInputProps, Omit<IData
|
|
|
130
130
|
* Кастомная вьюшка для элемента
|
|
131
131
|
*/
|
|
132
132
|
itemView?: CustomView;
|
|
133
|
+
/**
|
|
134
|
+
* Свойства для компонента отображения
|
|
135
|
+
* @example
|
|
136
|
+
* {
|
|
137
|
+
* customHandler: () => {...}
|
|
138
|
+
* }
|
|
139
|
+
*/
|
|
140
|
+
viewProps?: {
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
};
|
|
133
143
|
/**
|
|
134
144
|
* Callback-функция, которая вызывается при выборе элемента DropDown
|
|
135
145
|
*/
|
|
@@ -232,6 +232,7 @@ function DropDownField(props) {
|
|
|
232
232
|
isSearchAutoFocus: props.isSearchAutoFocus,
|
|
233
233
|
itemToSelectAll: normalizedItemToSelectAll,
|
|
234
234
|
className: props.className,
|
|
235
|
+
viewProps: props.viewProps,
|
|
235
236
|
style: props.style,
|
|
236
237
|
size: props.size,
|
|
237
238
|
color: props.color,
|
|
@@ -241,10 +242,9 @@ function DropDownField(props) {
|
|
|
241
242
|
showEllipses: props.showEllipses,
|
|
242
243
|
errors: props.errors,
|
|
243
244
|
disabled: props.disabled
|
|
244
|
-
}); }, [isAutoComplete, items, hoveredId, selectedIds, searchInputProps, isOpened, isLoading, onOpen, selectedItems,
|
|
245
|
-
|
|
246
|
-
props.
|
|
247
|
-
props.errors, props.disabled, normalizedItemToSelectAll]);
|
|
245
|
+
}); }, [isAutoComplete, items, hoveredId, selectedIds, searchInputProps, isOpened, isLoading, onOpen, selectedItems, onReset, onClose,
|
|
246
|
+
renderItem, onItemRemove, hasGroup, props.multiple, props.isSearchAutoFocus, props.className, props.viewProps, props.style, props.size,
|
|
247
|
+
props.color, props.outline, props.placeholder, props.showReset, props.showEllipses, props.errors, props.disabled, normalizedItemToSelectAll]);
|
|
248
248
|
return components.ui.renderView(props.view || 'form.DropDownFieldView', viewProps);
|
|
249
249
|
}
|
|
250
250
|
DropDownField.defaultProps = {
|
|
@@ -23,6 +23,10 @@ export interface IBaseFieldProps extends IFieldWrapperInputProps, IUiComponent {
|
|
|
23
23
|
* @example true
|
|
24
24
|
*/
|
|
25
25
|
showClear?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Callback-функция, которая вызывается при очистке input
|
|
28
|
+
*/
|
|
29
|
+
onClear?: (value: string) => void;
|
|
26
30
|
/**
|
|
27
31
|
* Свойства для компонента отображения
|
|
28
32
|
* @example
|
|
@@ -90,14 +90,19 @@ function InputField(props) {
|
|
|
90
90
|
var maskedInputRef = (0, react_2.useMaskito)({
|
|
91
91
|
options: props.maskOptions
|
|
92
92
|
});
|
|
93
|
-
var _a = (0, hooks_1.useSaveCursorPosition)(props.input), inputRef = _a.inputRef, onChange = _a.onChange;
|
|
93
|
+
var _a = (0, hooks_1.useSaveCursorPosition)(props.input, props.onChange), inputRef = _a.inputRef, onChange = _a.onChange;
|
|
94
94
|
React.useEffect(function () {
|
|
95
95
|
if (inputRef.current) {
|
|
96
96
|
maskedInputRef(inputRef.current);
|
|
97
97
|
}
|
|
98
98
|
}, [inputRef, maskedInputRef]);
|
|
99
99
|
(0, useInputFieldWarningByType_1.useInputFieldWarningByType)(props.type);
|
|
100
|
-
var onClear = React.useCallback(function () {
|
|
100
|
+
var onClear = React.useCallback(function () {
|
|
101
|
+
if (props.onClear) {
|
|
102
|
+
props.onClear('');
|
|
103
|
+
}
|
|
104
|
+
props.input.onChange('');
|
|
105
|
+
}, [props.input, props.onClear]);
|
|
101
106
|
var inputProps = (0, react_1.useMemo)(function () {
|
|
102
107
|
var _a;
|
|
103
108
|
return (__assign({ type: props.type, name: props.input.name, value: (_a = props.input.value) !== null && _a !== void 0 ? _a : '', onInput: onChange, placeholder: props.placeholder }, props.inputProps));
|