@cloud-ru/uikit-product-mobile-fields 2.0.16-preview-b1a595e8.0 → 2.1.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 2.1.0 (2026-04-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **IAM-6423:** support triggers for custom field option ([b4fb5ee](https://github.com/cloud-ru-tech/uikit-product/commit/b4fb5eea235d6f73cbb6d88640d250d30d5612ea))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 2.0.15 (2026-04-03)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -51,7 +51,6 @@ exports.MobileFieldSelectMultiple = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
51
51
|
});
|
|
52
52
|
const [{ selectedItems, items = [] }, setItems] = (0, react_1.useState)(() => (0, utils_2.updateMultipleItems)({ options, value, currentItems: [], selectedItems: undefined }));
|
|
53
53
|
const { flattenItems } = (0, react_1.useMemo)(() => (0, list_1.kindFlattenItems)({ items }), [items]);
|
|
54
|
-
const searchable = (searchableProp && Object.values(flattenItems).length > 5) || autocomplete || Boolean(addOptionByEnter);
|
|
55
54
|
const { inputValue, setInputValue, prevInputValue, updateInputValue } = (0, hooks_2.useSearchInput)(Object.assign(Object.assign({}, search), { defaultValue: '', selectedOptionFormatter }));
|
|
56
55
|
const { resolvedAddCustomOptionTriggers, tryCommitCustomOptionFromInput } = (0, fields_1.useFieldSelectMultipleCustomOption)({
|
|
57
56
|
addCustomOptionTriggers,
|
|
@@ -61,6 +60,9 @@ exports.MobileFieldSelectMultiple = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
61
60
|
setValue,
|
|
62
61
|
updateInputValue,
|
|
63
62
|
});
|
|
63
|
+
const searchable = (searchableProp && Object.values(flattenItems).length > 5) ||
|
|
64
|
+
autocomplete ||
|
|
65
|
+
resolvedAddCustomOptionTriggers.length > 0;
|
|
64
66
|
const prefixSettings = (0, hooks_1.usePrefix)({ prefix, disabled });
|
|
65
67
|
const postfixSettings = (0, hooks_1.usePostfix)({ postfix, disabled });
|
|
66
68
|
(0, utils_1.useLayoutEffect)(() => {
|
|
@@ -45,7 +45,6 @@ export const MobileFieldSelectMultiple = forwardRef((_a, ref) => {
|
|
|
45
45
|
});
|
|
46
46
|
const [{ selectedItems, items = [] }, setItems] = useState(() => updateMultipleItems({ options, value, currentItems: [], selectedItems: undefined }));
|
|
47
47
|
const { flattenItems } = useMemo(() => kindFlattenItems({ items }), [items]);
|
|
48
|
-
const searchable = (searchableProp && Object.values(flattenItems).length > 5) || autocomplete || Boolean(addOptionByEnter);
|
|
49
48
|
const { inputValue, setInputValue, prevInputValue, updateInputValue } = useSearchInput(Object.assign(Object.assign({}, search), { defaultValue: '', selectedOptionFormatter }));
|
|
50
49
|
const { resolvedAddCustomOptionTriggers, tryCommitCustomOptionFromInput } = useFieldSelectMultipleCustomOption({
|
|
51
50
|
addCustomOptionTriggers,
|
|
@@ -55,6 +54,9 @@ export const MobileFieldSelectMultiple = forwardRef((_a, ref) => {
|
|
|
55
54
|
setValue,
|
|
56
55
|
updateInputValue,
|
|
57
56
|
});
|
|
57
|
+
const searchable = (searchableProp && Object.values(flattenItems).length > 5) ||
|
|
58
|
+
autocomplete ||
|
|
59
|
+
resolvedAddCustomOptionTriggers.length > 0;
|
|
58
60
|
const prefixSettings = usePrefix({ prefix, disabled });
|
|
59
61
|
const postfixSettings = usePostfix({ postfix, disabled });
|
|
60
62
|
useLayoutEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-mobile-fields",
|
|
3
3
|
"title": "Mobile Fields",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@cloud-ru/uikit-product-utils": "9.1.0",
|
|
43
43
|
"@snack-uikit/button": "0.19.15",
|
|
44
44
|
"@snack-uikit/calendar": "0.13.18",
|
|
45
|
-
"@snack-uikit/fields": "0.
|
|
45
|
+
"@snack-uikit/fields": "0.55.0",
|
|
46
46
|
"@snack-uikit/input-private": "4.8.8",
|
|
47
|
-
"@snack-uikit/list": "0.
|
|
47
|
+
"@snack-uikit/list": "0.33.0",
|
|
48
48
|
"@snack-uikit/scroll": "0.10.8",
|
|
49
49
|
"@snack-uikit/tag": "0.15.18",
|
|
50
50
|
"@snack-uikit/utils": "3.10.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@cloud-ru/uikit-product-locale": "*"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "75651b26bfe47355a80715745af87c4f0d50daee"
|
|
66
66
|
}
|
|
@@ -98,9 +98,6 @@ export const MobileFieldSelectMultiple: ForwardRefExoticComponent<
|
|
|
98
98
|
|
|
99
99
|
const { flattenItems } = useMemo(() => kindFlattenItems({ items }), [items]);
|
|
100
100
|
|
|
101
|
-
const searchable =
|
|
102
|
-
(searchableProp && Object.values(flattenItems).length > 5) || autocomplete || Boolean(addOptionByEnter);
|
|
103
|
-
|
|
104
101
|
const { inputValue, setInputValue, prevInputValue, updateInputValue } = useSearchInput({
|
|
105
102
|
...search,
|
|
106
103
|
defaultValue: '',
|
|
@@ -116,6 +113,11 @@ export const MobileFieldSelectMultiple: ForwardRefExoticComponent<
|
|
|
116
113
|
updateInputValue,
|
|
117
114
|
});
|
|
118
115
|
|
|
116
|
+
const searchable =
|
|
117
|
+
(searchableProp && Object.values(flattenItems).length > 5) ||
|
|
118
|
+
autocomplete ||
|
|
119
|
+
resolvedAddCustomOptionTriggers.length > 0;
|
|
120
|
+
|
|
119
121
|
const prefixSettings = usePrefix({ prefix, disabled });
|
|
120
122
|
const postfixSettings = usePostfix({ postfix, disabled });
|
|
121
123
|
|