@connectif/ui-components 5.6.0 → 5.7.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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.7.1] - 2026-03-13
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Fixed an issue where item data was not passed to `selectableItemComponent` in the `ItemSelector` component.
|
|
8
|
+
|
|
9
|
+
## [5.7.0] - 2026-03-12
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added `selectableItemComponent`, `itemsPerRow`, and `itemsTitle` props to the `ItemSelector` component.
|
|
14
|
+
|
|
3
15
|
## [5.6.0] - 2026-03-12
|
|
4
16
|
|
|
5
17
|
### Added
|
|
@@ -22,6 +22,6 @@ export type ItemSelectorProps<T extends ItemSelectorItem> = {
|
|
|
22
22
|
onChange: (value: T[]) => void;
|
|
23
23
|
onClose?: () => void;
|
|
24
24
|
onLoadMore?: (searchText: string) => void;
|
|
25
|
-
} & Pick<SelectPopoverProps<SelectableItem>, 'applyButtonText' | 'emptyListPlaceholder' | 'hasMore' | 'isLoading' | 'isLoadingSubtitle2' | 'maxSelectedItems' | 'onSearch' | 'requiredSelectedItemsToApply' | 'disableApplyWithoutChanges' | 'popoverWidth'>;
|
|
26
|
-
declare const ItemSelector: <T extends ItemSelectorItem>({ items, selectedItems, maxSelectedItems, variant, placeholder, disabled, helperText, isError, limitItemChips, itemChipWidth, isLoading, isLoadingSubtitle2, hasMore, applyButtonText, emptyListPlaceholder, requiredSelectedItemsToApply, disableApplyWithoutChanges, popoverWidth, renderChipLabel, renderItem, onChange, onLoadMore, onSearch, onClose }: ItemSelectorProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
} & Pick<SelectPopoverProps<SelectableItem>, 'applyButtonText' | 'emptyListPlaceholder' | 'hasMore' | 'isLoading' | 'isLoadingSubtitle2' | 'maxSelectedItems' | 'onSearch' | 'requiredSelectedItemsToApply' | 'disableApplyWithoutChanges' | 'popoverWidth' | 'itemsPerRow' | 'itemsTitle' | 'paddingContent' | 'selectableItemComponent'>;
|
|
26
|
+
declare const ItemSelector: <T extends ItemSelectorItem>({ items, selectedItems, maxSelectedItems, variant, placeholder, disabled, helperText, isError, limitItemChips, itemChipWidth, isLoading, isLoadingSubtitle2, hasMore, applyButtonText, emptyListPlaceholder, requiredSelectedItemsToApply, disableApplyWithoutChanges, popoverWidth, itemsPerRow, itemsTitle, paddingContent, selectableItemComponent, renderChipLabel, renderItem, onChange, onLoadMore, onSearch, onClose }: ItemSelectorProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export default ItemSelector;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PopoverProps } from '../popover/Popover';
|
|
3
3
|
import { SelectableItem } from '../../models/SelectableItem';
|
|
4
|
-
export type SelectPopoverProps<T extends SelectableItem> = Pick<PopoverProps, 'anchorEl'> & {
|
|
4
|
+
export type SelectPopoverProps<T extends SelectableItem = SelectableItem> = Pick<PopoverProps, 'anchorEl'> & {
|
|
5
5
|
/**
|
|
6
6
|
* Called every time the popover apply changes.
|
|
7
7
|
*/
|
package/dist/index.js
CHANGED
|
@@ -23419,6 +23419,10 @@ var ItemSelector = function ItemSelector2({
|
|
|
23419
23419
|
requiredSelectedItemsToApply,
|
|
23420
23420
|
disableApplyWithoutChanges,
|
|
23421
23421
|
popoverWidth,
|
|
23422
|
+
itemsPerRow,
|
|
23423
|
+
itemsTitle,
|
|
23424
|
+
paddingContent,
|
|
23425
|
+
selectableItemComponent,
|
|
23422
23426
|
renderChipLabel = (item) => item.id,
|
|
23423
23427
|
renderItem = (item) => ({
|
|
23424
23428
|
title: item.id,
|
|
@@ -23643,6 +23647,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
23643
23647
|
items: items.map((item) => {
|
|
23644
23648
|
const { title, subtitle1, subtitle2 } = renderItem(item);
|
|
23645
23649
|
return {
|
|
23650
|
+
...item,
|
|
23646
23651
|
id: item.id,
|
|
23647
23652
|
name: title,
|
|
23648
23653
|
selected: selectedItems.some((i) => item.id === i.id),
|
|
@@ -23677,7 +23682,11 @@ var ItemSelector = function ItemSelector2({
|
|
|
23677
23682
|
emptyListPlaceholder,
|
|
23678
23683
|
requiredSelectedItemsToApply,
|
|
23679
23684
|
disableApplyWithoutChanges,
|
|
23680
|
-
popoverWidth
|
|
23685
|
+
popoverWidth,
|
|
23686
|
+
itemsPerRow,
|
|
23687
|
+
itemsTitle,
|
|
23688
|
+
selectableItemComponent,
|
|
23689
|
+
paddingContent
|
|
23681
23690
|
}
|
|
23682
23691
|
)
|
|
23683
23692
|
] });
|