@gravity-ui/blog-constructor 2.0.0-alpha.2 → 2.0.1
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 +19 -0
- package/build/cjs/components/FeedHeader/components/Controls/Controls.css +3 -0
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js +3 -2
- package/build/esm/components/FeedHeader/components/Controls/Controls.css +3 -0
- package/build/esm/components/FeedHeader/components/Controls/Controls.js +3 -2
- package/package.json +1 -7
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.0.1](https://github.com/gravity-ui/blog-constructor/compare/v2.0.0...v2.0.1) (2023-04-04)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([ccb0f19](https://github.com/gravity-ui/blog-constructor/commit/ccb0f19a904e54fd43ca66195da9e94925d0a26f))
|
9
|
+
* throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([0aa5aed](https://github.com/gravity-ui/blog-constructor/commit/0aa5aeda9a0afd99ae8590c6b666c033a12b7fba))
|
10
|
+
|
11
|
+
## [2.0.0](https://github.com/gravity-ui/blog-constructor/compare/v1.1.2...v2.0.0) (2023-04-03)
|
12
|
+
|
13
|
+
|
14
|
+
### ⚠ BREAKING CHANGES
|
15
|
+
|
16
|
+
* update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11))
|
17
|
+
|
18
|
+
### Features
|
19
|
+
|
20
|
+
* update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11)) ([5d6f3d5](https://github.com/gravity-ui/blog-constructor/commit/5d6f3d51daf111a240871dbad721bbdd250d6b46))
|
21
|
+
|
3
22
|
## [1.1.2](https://github.com/gravity-ui/blog-constructor/compare/v1.1.1...v1.1.2) (2023-03-28)
|
4
23
|
|
5
24
|
|
@@ -46,6 +46,9 @@ unpredictable css rules order in build */
|
|
46
46
|
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list::-webkit-scrollbar {
|
47
47
|
display: none;
|
48
48
|
}
|
49
|
+
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list .yc-list {
|
50
|
+
max-height: calc(500px - var(--yc-text-body-3-line-height) - 12px);
|
51
|
+
}
|
49
52
|
.bc-feed-controls__popup.bc-feed-controls__popup .yc-list__item {
|
50
53
|
margin: 4px;
|
51
54
|
border-radius: 8px;
|
@@ -41,6 +41,7 @@ const cn_1 = require("../../../../utils/cn");
|
|
41
41
|
const b = (0, cn_1.block)('feed-controls');
|
42
42
|
const ICON_SIZE = 16;
|
43
43
|
const DEFAULT_PAGE = 1;
|
44
|
+
const VIRTUALIZATION_THRESHOLD = 1000;
|
44
45
|
const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery, queryParams, }) => {
|
45
46
|
const { hasLikes } = (0, react_1.useContext)(LikesContext_1.LikesContext);
|
46
47
|
const { savedOnly: savedOnlyInitial, search: searchInitial, tags: tagInitial, services: servicesInitial, } = queryParams || {};
|
@@ -91,13 +92,13 @@ const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery,
|
|
91
92
|
initial: [tagInitial],
|
92
93
|
list: tagsItems,
|
93
94
|
defaultLabel: (0, i18n_1.i18)(i18n_1.Keyset.AllTags),
|
94
|
-
}), disablePortal: true, renderOption: customRenders_1.renderOption })),
|
95
|
+
}), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption })),
|
95
96
|
services.length > 0 ? (react_1.default.createElement("div", { className: b('filter-item') },
|
96
97
|
react_1.default.createElement(uikit_1.Select, { className: b('select'), size: "xl", multiple: true, filterable: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup'), onUpdate: handleServicesSelect, placeholder: (0, i18n_1.i18)(i18n_1.Keyset.AllServices), renderControl: (0, customRenders_1.renderSwitcher)({
|
97
98
|
initial: servicesItems,
|
98
99
|
list: services,
|
99
100
|
defaultLabel: (0, i18n_1.i18)(i18n_1.Keyset.AllServices),
|
100
|
-
}), renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
|
101
|
+
}), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
|
101
102
|
hasLikes ? (react_1.default.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
|
102
103
|
react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
|
103
104
|
react_1.default.createElement(uikit_1.Icon, { data: Save_1.Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
|
@@ -46,6 +46,9 @@ unpredictable css rules order in build */
|
|
46
46
|
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list::-webkit-scrollbar {
|
47
47
|
display: none;
|
48
48
|
}
|
49
|
+
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list .yc-list {
|
50
|
+
max-height: calc(500px - var(--yc-text-body-3-line-height) - 12px);
|
51
|
+
}
|
49
52
|
.bc-feed-controls__popup.bc-feed-controls__popup .yc-list__item {
|
50
53
|
margin: 4px;
|
51
54
|
border-radius: 8px;
|
@@ -13,6 +13,7 @@ import './Controls.css';
|
|
13
13
|
const b = block('feed-controls');
|
14
14
|
const ICON_SIZE = 16;
|
15
15
|
const DEFAULT_PAGE = 1;
|
16
|
+
const VIRTUALIZATION_THRESHOLD = 1000;
|
16
17
|
export const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery, queryParams, }) => {
|
17
18
|
const { hasLikes } = useContext(LikesContext);
|
18
19
|
const { savedOnly: savedOnlyInitial, search: searchInitial, tags: tagInitial, services: servicesInitial, } = queryParams || {};
|
@@ -63,13 +64,13 @@ export const Controls = ({ setIsFetching, tags = [], services = [], handleChange
|
|
63
64
|
initial: [tagInitial],
|
64
65
|
list: tagsItems,
|
65
66
|
defaultLabel: i18(Keyset.AllTags),
|
66
|
-
}), disablePortal: true, renderOption: renderOption })),
|
67
|
+
}), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption })),
|
67
68
|
services.length > 0 ? (React.createElement("div", { className: b('filter-item') },
|
68
69
|
React.createElement(Select, { className: b('select'), size: "xl", multiple: true, filterable: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup'), onUpdate: handleServicesSelect, placeholder: i18(Keyset.AllServices), renderControl: renderSwitcher({
|
69
70
|
initial: servicesItems,
|
70
71
|
list: services,
|
71
72
|
defaultLabel: i18(Keyset.AllServices),
|
72
|
-
}), renderOption: renderOption, renderFilter: renderFilter }))) : null,
|
73
|
+
}), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption, renderFilter: renderFilter }))) : null,
|
73
74
|
hasLikes ? (React.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
|
74
75
|
React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
|
75
76
|
React.createElement(Icon, { data: Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gravity-ui/blog-constructor",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.1",
|
4
4
|
"description": "Gravity UI Blog Constructor",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -48,8 +48,6 @@
|
|
48
48
|
"dependencies": {
|
49
49
|
"@gravity-ui/i18n": "^1.0.0",
|
50
50
|
"bem-cn-lite": "^4.0.0",
|
51
|
-
"fast-html-parser": "^1.0.1",
|
52
|
-
"isomorphic-dompurify": "^0.20.0",
|
53
51
|
"lodash": "^4.17.21",
|
54
52
|
"react-helmet": "^6.1.0",
|
55
53
|
"react-player": "^2.9.0",
|
@@ -89,7 +87,6 @@
|
|
89
87
|
"@testing-library/jest-dom": "^5.16.5",
|
90
88
|
"@testing-library/react": "^14.0.0",
|
91
89
|
"@testing-library/user-event": "^14.4.3",
|
92
|
-
"@types/fast-html-parser": "^1.0.2",
|
93
90
|
"@types/jest": "^29.2.5",
|
94
91
|
"@types/js-yaml": "^4.0.5",
|
95
92
|
"@types/lodash": "^4.14.176",
|
@@ -143,8 +140,5 @@
|
|
143
140
|
"*.{json,yaml,yml,md}": [
|
144
141
|
"prettier --write"
|
145
142
|
]
|
146
|
-
},
|
147
|
-
"publishConfig": {
|
148
|
-
"tag": "alpha"
|
149
143
|
}
|
150
144
|
}
|