@synerise/ds-items-roll 1.0.15 → 1.0.17
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 +643 -2158
- package/README.md +1 -2
- package/dist/Extras/Extras.d.ts +1 -1
- package/dist/Extras/Extras.js +2 -2
- package/dist/ItemsRoll.d.ts +1 -1
- package/dist/ItemsRoll.js +1 -1
- package/dist/ItemsRoll.styles.js +1 -1
- package/dist/ItemsRoll.types.d.ts +3 -3
- package/dist/ItemsRollComponents/Footer.d.ts +1 -1
- package/dist/ItemsRollComponents/Footer.js +15 -11
- package/dist/ItemsRollComponents/Footer.types.d.ts +1 -1
- package/dist/ItemsRollComponents/Header.d.ts +1 -1
- package/dist/ItemsRollComponents/Header.js +2 -2
- package/dist/ItemsRollComponents/ItemRemoveIcon.d.ts +2 -2
- package/dist/ItemsRollComponents/ItemRemoveIcon.js +1 -1
- package/dist/ItemsRollComponents/List.d.ts +2 -2
- package/dist/ItemsRollComponents/List.js +2 -5
- package/dist/ItemsRollComponents/ListItem.d.ts +1 -1
- package/dist/ItemsRollComponents/VirtualizedListItem.d.ts +3 -3
- package/dist/ItemsRollComponents/VirtualizedListItem.js +1 -2
- package/dist/index.d.ts +1 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ import ItemsRoll from '@synerise/ds-items-roll';
|
|
|
34
34
|
## API
|
|
35
35
|
|
|
36
36
|
| Property | Description | Type | Default |
|
|
37
|
-
|
|
37
|
+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------- |
|
|
38
38
|
| actions | ItemRollElement array with configuration for action dropdown menu | ItemRollElement[] | - |
|
|
39
39
|
| changeSelectionIcon | The custom changeSelection icon | `(props: React.SVGProps<SVGSVGElement>) => JSX.Element` | EditM |
|
|
40
40
|
| changeSelectionDropdownProps | Object with ds-dropdown props | DropdownProps | |
|
|
@@ -62,7 +62,6 @@ import ItemsRoll from '@synerise/ds-items-roll';
|
|
|
62
62
|
| virtualizedRowHeight | Height of virtualizedlist row | number | 32px |
|
|
63
63
|
| virtualizedRowWidth | Width of virtualized list | number | - |
|
|
64
64
|
|
|
65
|
-
|
|
66
65
|
#### ItemRollElement
|
|
67
66
|
|
|
68
67
|
| Property | Description | Type | Default |
|
package/dist/Extras/Extras.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MenuItemProps } from '@synerise/ds-menu';
|
|
2
|
+
import { type MenuItemProps } from '@synerise/ds-menu';
|
|
3
3
|
import type { ItemRollElement } from '../ItemsRoll.types';
|
|
4
4
|
export type ExtrasProps = {
|
|
5
5
|
actions: ItemRollElement<MenuItemProps>[];
|
package/dist/Extras/Extras.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import Dropdown from '@synerise/ds-dropdown';
|
|
4
|
-
import Menu from '@synerise/ds-menu';
|
|
5
3
|
import Button from '@synerise/ds-button';
|
|
4
|
+
import Dropdown from '@synerise/ds-dropdown';
|
|
6
5
|
import Icon, { OptionHorizontalM } from '@synerise/ds-icon';
|
|
6
|
+
import Menu from '@synerise/ds-menu';
|
|
7
7
|
var ItemMenu = styled(Menu).withConfig({
|
|
8
8
|
displayName: "Extras__ItemMenu",
|
|
9
9
|
componentId: "sc-1cdoprb-0"
|
package/dist/ItemsRoll.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ItemsRollProps } from './ItemsRoll.types';
|
|
2
|
+
import { type ItemsRollProps } from './ItemsRoll.types';
|
|
3
3
|
export declare const ItemsRoll: ({ actions, changeSelectionIcon, changeSelectionDropdownProps, className, customSidebarActions, groups, hideSearch, isDisabled, items, maxToShowItems, onClearAll, onChangeSelection, onItemClick, onItemRemove, onSearchClear, onSearch, renderCount, searchValue, searchPlaceholder, showMoreStep, style, texts, useFooter, useVirtualizedList, virtualizedRowWidth, virtualizedRowHeight, }: ItemsRollProps) => React.JSX.Element;
|
|
4
4
|
export default ItemsRoll;
|
package/dist/ItemsRoll.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { Footer, Header, List } from './ItemsRollComponents';
|
|
5
4
|
import * as S from './ItemsRoll.styles';
|
|
5
|
+
import { Footer, Header, List } from './ItemsRollComponents';
|
|
6
6
|
export var ItemsRoll = function ItemsRoll(_ref) {
|
|
7
7
|
var actions = _ref.actions,
|
|
8
8
|
changeSelectionIcon = _ref.changeSelectionIcon,
|
package/dist/ItemsRoll.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import Button from '@synerise/ds-button';
|
|
3
|
-
import Icon from '@synerise/ds-icon';
|
|
4
3
|
import DividerBase from '@synerise/ds-divider';
|
|
4
|
+
import Icon from '@synerise/ds-icon';
|
|
5
5
|
export var Wrapper = styled.div.withConfig({
|
|
6
6
|
displayName: "ItemsRollstyles__Wrapper",
|
|
7
7
|
componentId: "sc-579u47-0"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CSSProperties, ReactNode, SVGProps } from 'react';
|
|
2
2
|
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { MenuItemProps } from '@synerise/ds-menu';
|
|
4
|
-
import type { ListItemProps } from '@synerise/ds-list-item';
|
|
5
3
|
import type { DropdownProps } from '@synerise/ds-dropdown/dist/Dropdown';
|
|
4
|
+
import type { ListItemProps } from '@synerise/ds-list-item';
|
|
5
|
+
import type { MenuItemProps } from '@synerise/ds-menu';
|
|
6
6
|
export type ItemRollElement<BaseType extends ListItemProps | MenuItemProps = ListItemProps> = BaseType & {
|
|
7
7
|
id: string;
|
|
8
8
|
group?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FooterProps } from './Footer.types';
|
|
2
|
+
import { type FooterProps } from './Footer.types';
|
|
3
3
|
declare const Footer: ({ allTexts, itemsCount, maxToShowItems, onClearAll, showAdditionalItems, showDefaultItemsAmount, showMoreStep, visibleItemsCount, searchMode, }: FooterProps) => React.JSX.Element | null;
|
|
4
4
|
export default Footer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import Popconfirm from '@synerise/ds-popconfirm';
|
|
3
2
|
import Icon, { ArrowDownCircleM, ArrowUpCircleM, CloseS, WarningFillM } from '@synerise/ds-icon';
|
|
3
|
+
import Popconfirm from '@synerise/ds-popconfirm';
|
|
4
4
|
import * as S from '../ItemsRoll.styles';
|
|
5
5
|
var ShowLessButton = function ShowLessButton(_ref) {
|
|
6
6
|
var showDefaultItemsAmount = _ref.showDefaultItemsAmount,
|
|
@@ -51,16 +51,20 @@ var Footer = function Footer(_ref3) {
|
|
|
51
51
|
return !searchMode || searchMode && itemsCount > maxToShowItems;
|
|
52
52
|
}, [searchMode, maxToShowItems, itemsCount]);
|
|
53
53
|
var buttonsConfiguration = useMemo(function () {
|
|
54
|
-
if (visibleItemsCount === itemsCount)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
if (visibleItemsCount === itemsCount) {
|
|
55
|
+
return /*#__PURE__*/React.createElement(ShowLessButton, {
|
|
56
|
+
showLessLabel: allTexts.showLessLabel,
|
|
57
|
+
showDefaultItemsAmount: showDefaultItemsAmount
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (visibleItemsCount === maxToShowItems) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(ShowMoreButton, {
|
|
62
|
+
getShowMoreNumber: getShowMoreNumber,
|
|
63
|
+
moreLabel: allTexts.moreLabel,
|
|
64
|
+
showLabel: allTexts.showLabel,
|
|
65
|
+
showAdditionalItems: showAdditionalItems
|
|
66
|
+
});
|
|
67
|
+
}
|
|
64
68
|
return /*#__PURE__*/React.createElement(S.ShowButtonsWrapper, null, /*#__PURE__*/React.createElement(ShowMoreButton, {
|
|
65
69
|
getShowMoreNumber: getShowMoreNumber,
|
|
66
70
|
moreLabel: allTexts.moreLabel,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ItemsRollProps, Texts } from '../ItemsRoll.types';
|
|
3
3
|
export type FooterProps = Pick<ItemsRollProps, 'onClearAll' | 'maxToShowItems' | 'showMoreStep'> & {
|
|
4
4
|
allTexts: {
|
|
5
5
|
[k in Texts]: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { HeaderProps } from './Header.types';
|
|
2
|
+
import { type HeaderProps } from './Header.types';
|
|
3
3
|
declare const Header: ({ actions, allTexts, changeSelectionIcon: ChangeSelectionIcon, changeSelectionDropdownProps, customSidebarActions, hideSearch, itemsCount, onChangeSelection, onSearch, searchValue, onSearchClear, searchPlaceholder, }: HeaderProps) => React.JSX.Element;
|
|
4
4
|
export default Header;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { SearchInput } from '@synerise/ds-search/dist/Elements';
|
|
3
|
-
import Icon, { EditM } from '@synerise/ds-icon';
|
|
4
2
|
import Dropdown from '@synerise/ds-dropdown';
|
|
3
|
+
import Icon, { EditM } from '@synerise/ds-icon';
|
|
4
|
+
import { SearchInput } from '@synerise/ds-search/dist/Elements';
|
|
5
5
|
import { NOOP } from '@synerise/ds-utils';
|
|
6
6
|
import Extras from '../Extras';
|
|
7
7
|
import * as S from '../ItemsRoll.styles';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemoveIconProps } from './ItemRemoveIcon.types';
|
|
3
|
-
export declare const RemoveIcon: ({ id, handleRemove, tooltipLabel, group }: RemoveIconProps) => React.JSX.Element;
|
|
2
|
+
import { type RemoveIconProps } from './ItemRemoveIcon.types';
|
|
3
|
+
export declare const RemoveIcon: ({ id, handleRemove, tooltipLabel, group, }: RemoveIconProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { theme } from '@synerise/ds-core';
|
|
2
3
|
import Icon, { CloseS } from '@synerise/ds-icon';
|
|
3
4
|
import Tooltip from '@synerise/ds-tooltip';
|
|
4
|
-
import { theme } from '@synerise/ds-core';
|
|
5
5
|
import { RemoveIconWrapper } from './ItemRemoveIcon.styles';
|
|
6
6
|
export var RemoveIcon = function RemoveIcon(_ref) {
|
|
7
7
|
var id = _ref.id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ItemRollElement } from '../ItemsRoll.types';
|
|
3
|
-
import { ListProps } from './List.types';
|
|
2
|
+
import { type ItemRollElement } from '../ItemsRoll.types';
|
|
3
|
+
import { type ListProps } from './List.types';
|
|
4
4
|
export declare const itemsInGroup: (group: string, items: ItemRollElement[]) => ItemRollElement[];
|
|
5
5
|
declare const List: ({ groups, items, onItemClick, onItemRemove, noResultsLabel, removeTooltipLabel, searchValue, useVirtualizedList, visibleItems, virtualizedRowHeight, virtualizedRowWidth, }: ListProps) => React.JSX.Element;
|
|
6
6
|
export default List;
|
|
@@ -2,9 +2,9 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { FixedSizeList } from 'react-window';
|
|
3
3
|
import Icon, { SearchNoResultsM } from '@synerise/ds-icon';
|
|
4
4
|
import { GroupItem } from '@synerise/ds-list-item';
|
|
5
|
+
import * as S from '../ItemsRoll.styles';
|
|
5
6
|
import ItemElement from './ListItem';
|
|
6
7
|
import ItemRenderer from './VirtualizedListItem';
|
|
7
|
-
import * as S from '../ItemsRoll.styles';
|
|
8
8
|
export var itemsInGroup = function itemsInGroup(group, items) {
|
|
9
9
|
return items.filter(function (item) {
|
|
10
10
|
return item.group === group;
|
|
@@ -26,10 +26,7 @@ var List = function List(_ref) {
|
|
|
26
26
|
var groupedList = useMemo(function () {
|
|
27
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, groups == null ? void 0 : groups.map(function (group) {
|
|
28
28
|
var groupItems = itemsInGroup(group, visibleItems);
|
|
29
|
-
return groupItems.length > 0 ?
|
|
30
|
-
/*#__PURE__*/
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
React.createElement(GroupItem, {
|
|
29
|
+
return groupItems.length > 0 ? /*#__PURE__*/React.createElement(GroupItem, {
|
|
33
30
|
key: group,
|
|
34
31
|
title: group
|
|
35
32
|
}, groupItems.map(function (item) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ItemElementProps } from './ListItem.types';
|
|
3
|
-
declare const ItemElement: ({ item, group, highlight, onItemClick, onItemRemove, removeTooltipLabel }: ItemElementProps) => React.JSX.Element;
|
|
3
|
+
declare const ItemElement: ({ item, group, highlight, onItemClick, onItemRemove, removeTooltipLabel, }: ItemElementProps) => React.JSX.Element;
|
|
4
4
|
export default ItemElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ListChildComponentProps } from 'react-window';
|
|
3
|
-
import { ItemRendererProps } from './VirtualizedListItem.types';
|
|
4
|
-
declare const ItemRenderer: ({ highlight, onItemClick, onItemRemove, tooltipLabel, group }: ItemRendererProps) => ({ index, style, data }: ListChildComponentProps) => React.JSX.Element;
|
|
2
|
+
import { type ListChildComponentProps } from 'react-window';
|
|
3
|
+
import { type ItemRendererProps } from './VirtualizedListItem.types';
|
|
4
|
+
declare const ItemRenderer: ({ highlight, onItemClick, onItemRemove, tooltipLabel, group, }: ItemRendererProps) => ({ index, style, data }: ListChildComponentProps) => React.JSX.Element;
|
|
5
5
|
export default ItemRenderer;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _excluded = ["suffixel"];
|
|
2
2
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
3
3
|
import React, { useCallback } from 'react';
|
|
4
|
-
import * as S from './ListItem.styles';
|
|
5
4
|
import { RemoveIcon } from './ItemRemoveIcon';
|
|
5
|
+
import * as S from './ListItem.styles';
|
|
6
6
|
var ItemRenderer = function ItemRenderer(_ref) {
|
|
7
7
|
var highlight = _ref.highlight,
|
|
8
8
|
onItemClick = _ref.onItemClick,
|
|
@@ -13,7 +13,6 @@ var ItemRenderer = function ItemRenderer(_ref) {
|
|
|
13
13
|
var index = _ref2.index,
|
|
14
14
|
style = _ref2.style,
|
|
15
15
|
data = _ref2.data;
|
|
16
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
17
16
|
var _ref3 = data[index],
|
|
18
17
|
suffixel = _ref3.suffixel,
|
|
19
18
|
item = _objectWithoutPropertiesLoose(_ref3, _excluded);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './ItemsRoll';
|
|
2
|
-
export type { ItemRollElement, ItemsRollGroup, ItemsRollProps } from './ItemsRoll.types';
|
|
2
|
+
export type { ItemRollElement, ItemsRollGroup, ItemsRollProps, } from './ItemsRoll.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-items-roll",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "ItemsRoll UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.4.
|
|
38
|
-
"@synerise/ds-divider": "^1.0.
|
|
39
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
40
|
-
"@synerise/ds-icon": "^1.5.
|
|
41
|
-
"@synerise/ds-list-item": "^1.0.
|
|
42
|
-
"@synerise/ds-menu": "^1.0.
|
|
43
|
-
"@synerise/ds-popconfirm": "^1.0.
|
|
44
|
-
"@synerise/ds-search": "^1.2.
|
|
45
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
46
|
-
"@synerise/ds-utils": "^1.3.
|
|
37
|
+
"@synerise/ds-button": "^1.4.2",
|
|
38
|
+
"@synerise/ds-divider": "^1.0.13",
|
|
39
|
+
"@synerise/ds-dropdown": "^1.0.15",
|
|
40
|
+
"@synerise/ds-icon": "^1.5.4",
|
|
41
|
+
"@synerise/ds-list-item": "^1.0.13",
|
|
42
|
+
"@synerise/ds-menu": "^1.0.14",
|
|
43
|
+
"@synerise/ds-popconfirm": "^1.0.14",
|
|
44
|
+
"@synerise/ds-search": "^1.2.2",
|
|
45
|
+
"@synerise/ds-tooltip": "^1.1.12",
|
|
46
|
+
"@synerise/ds-utils": "^1.3.1",
|
|
47
47
|
"react-window": "^1.8.5"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": ">=16.9.0 <= 18.3.1",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "4512641033ba3581a3df208143c547fcfed45895"
|
|
55
55
|
}
|