@gravity-ui/blog-constructor 6.4.0 → 6.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js +1 -1
- package/build/cjs/components/Search/Search.js +3 -1
- package/build/cjs/i18n/index.d.ts +1 -1
- package/build/cjs/i18n/index.js +3 -3
- package/build/esm/components/FeedHeader/components/Controls/Controls.js +1 -1
- package/build/esm/components/Search/Search.js +3 -1
- package/build/esm/i18n/index.d.ts +1 -1
- package/build/esm/i18n/index.js +3 -3
- package/package.json +1 -1
@@ -107,7 +107,7 @@ const Controls = ({ handleLoadData, tags = [], services = [], queryParams, }) =>
|
|
107
107
|
defaultLabel: (0, i18n_1.i18n)(i18n_1.Keyset.AllServices),
|
108
108
|
}), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
|
109
109
|
hasLikes ? (react_1.default.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
|
110
|
-
react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
|
110
|
+
react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
|
111
111
|
react_1.default.createElement(uikit_1.Icon, { data: Save_1.Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
|
112
112
|
(0, i18n_1.i18n)(i18n_1.Keyset.ActionSavedOnly)))) : null)));
|
113
113
|
};
|
@@ -39,13 +39,15 @@ const Search = ({ className, initialValue, onSubmit, debounce = 300, placeholder
|
|
39
39
|
const iconData = value ? Close_1.Close : SearchIcon_1.SearchIcon;
|
40
40
|
const iconSize = value ? CLOSE_ICON_SIZE : SEARCH_ICON_SIZE;
|
41
41
|
const handleClick = () => {
|
42
|
+
var _a;
|
42
43
|
if (value) {
|
43
44
|
handleChange.cancel();
|
44
45
|
setValue('');
|
45
46
|
onSubmit('');
|
47
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
46
48
|
}
|
47
49
|
};
|
48
|
-
return (react_1.default.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": (0, i18n_1.i18n)(i18n_1.Keyset.
|
50
|
+
return (react_1.default.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": value ? (0, i18n_1.i18n)(i18n_1.Keyset.ClearAction) : undefined, "aria-hidden": !value },
|
49
51
|
react_1.default.createElement(uikit_1.Icon, { size: iconSize, data: iconData })));
|
50
52
|
}, [handleChange, onSubmit, value]);
|
51
53
|
return (react_1.default.createElement("div", { className: b({ size }, className) },
|
@@ -19,6 +19,6 @@ export declare enum Keyset {
|
|
19
19
|
PromptSignInOnLike = "prompt_sign_in_on_like",
|
20
20
|
SignIn = "Sign In",
|
21
21
|
Save = "save",
|
22
|
-
|
22
|
+
ClearAction = "clear_action"
|
23
23
|
}
|
24
24
|
export declare const i18n: (key: Keyset, params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
package/build/cjs/i18n/index.js
CHANGED
@@ -25,7 +25,7 @@ var Keyset;
|
|
25
25
|
Keyset["PromptSignInOnLike"] = "prompt_sign_in_on_like";
|
26
26
|
Keyset["SignIn"] = "Sign In";
|
27
27
|
Keyset["Save"] = "save";
|
28
|
-
Keyset["
|
28
|
+
Keyset["ClearAction"] = "clear_action";
|
29
29
|
})(Keyset = exports.Keyset || (exports.Keyset = {}));
|
30
30
|
const en = {
|
31
31
|
[Keyset.Title]: 'Blog',
|
@@ -52,7 +52,7 @@ const en = {
|
|
52
52
|
],
|
53
53
|
[Keyset.SignIn]: 'Sign In',
|
54
54
|
[Keyset.Save]: 'Save',
|
55
|
-
[Keyset.
|
55
|
+
[Keyset.ClearAction]: 'Clear',
|
56
56
|
};
|
57
57
|
const ru = {
|
58
58
|
[Keyset.Title]: 'Блог',
|
@@ -79,6 +79,6 @@ const ru = {
|
|
79
79
|
],
|
80
80
|
[Keyset.SignIn]: 'Войти',
|
81
81
|
[Keyset.Save]: 'Сохранить',
|
82
|
-
[Keyset.
|
82
|
+
[Keyset.ClearAction]: 'Очистить',
|
83
83
|
};
|
84
84
|
exports.i18n = (0, i18n_1.addComponentKeysets)({ en, ru }, NAMESPACE);
|
@@ -104,7 +104,7 @@ export const Controls = ({ handleLoadData, tags = [], services = [], queryParams
|
|
104
104
|
defaultLabel: i18n(Keyset.AllServices),
|
105
105
|
}), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption, renderFilter: renderFilter }))) : null,
|
106
106
|
hasLikes ? (React.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
|
107
|
-
React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
|
107
|
+
React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
|
108
108
|
React.createElement(Icon, { data: Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
|
109
109
|
i18n(Keyset.ActionSavedOnly)))) : null)));
|
110
110
|
};
|
@@ -36,13 +36,15 @@ export const Search = ({ className, initialValue, onSubmit, debounce = 300, plac
|
|
36
36
|
const iconData = value ? Close : SearchIcon;
|
37
37
|
const iconSize = value ? CLOSE_ICON_SIZE : SEARCH_ICON_SIZE;
|
38
38
|
const handleClick = () => {
|
39
|
+
var _a;
|
39
40
|
if (value) {
|
40
41
|
handleChange.cancel();
|
41
42
|
setValue('');
|
42
43
|
onSubmit('');
|
44
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
43
45
|
}
|
44
46
|
};
|
45
|
-
return (React.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": i18n(Keyset.
|
47
|
+
return (React.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": value ? i18n(Keyset.ClearAction) : undefined, "aria-hidden": !value },
|
46
48
|
React.createElement(Icon, { size: iconSize, data: iconData })));
|
47
49
|
}, [handleChange, onSubmit, value]);
|
48
50
|
return (React.createElement("div", { className: b({ size }, className) },
|
@@ -19,6 +19,6 @@ export declare enum Keyset {
|
|
19
19
|
PromptSignInOnLike = "prompt_sign_in_on_like",
|
20
20
|
SignIn = "Sign In",
|
21
21
|
Save = "save",
|
22
|
-
|
22
|
+
ClearAction = "clear_action"
|
23
23
|
}
|
24
24
|
export declare const i18n: (key: Keyset, params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
package/build/esm/i18n/index.js
CHANGED
@@ -22,7 +22,7 @@ export var Keyset;
|
|
22
22
|
Keyset["PromptSignInOnLike"] = "prompt_sign_in_on_like";
|
23
23
|
Keyset["SignIn"] = "Sign In";
|
24
24
|
Keyset["Save"] = "save";
|
25
|
-
Keyset["
|
25
|
+
Keyset["ClearAction"] = "clear_action";
|
26
26
|
})(Keyset || (Keyset = {}));
|
27
27
|
const en = {
|
28
28
|
[Keyset.Title]: 'Blog',
|
@@ -49,7 +49,7 @@ const en = {
|
|
49
49
|
],
|
50
50
|
[Keyset.SignIn]: 'Sign In',
|
51
51
|
[Keyset.Save]: 'Save',
|
52
|
-
[Keyset.
|
52
|
+
[Keyset.ClearAction]: 'Clear',
|
53
53
|
};
|
54
54
|
const ru = {
|
55
55
|
[Keyset.Title]: 'Блог',
|
@@ -76,6 +76,6 @@ const ru = {
|
|
76
76
|
],
|
77
77
|
[Keyset.SignIn]: 'Войти',
|
78
78
|
[Keyset.Save]: 'Сохранить',
|
79
|
-
[Keyset.
|
79
|
+
[Keyset.ClearAction]: 'Очистить',
|
80
80
|
};
|
81
81
|
export const i18n = addComponentKeysets({ en, ru }, NAMESPACE);
|