@synerise/ds-item-picker 1.17.0 → 1.17.2

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/ItemPicker.d.ts +5 -5
  3. package/dist/ItemPicker.js +13 -17
  4. package/dist/ItemPicker.styles.d.ts +1 -1
  5. package/dist/ItemPicker.styles.js +6 -3
  6. package/dist/components/ItemPickerDropdown/ItemPickerDropdown.d.ts +2 -2
  7. package/dist/components/ItemPickerDropdown/ItemPickerDropdown.js +58 -99
  8. package/dist/components/ItemPickerDropdown/ItemPickerDropdown.style.d.ts +7 -7
  9. package/dist/components/ItemPickerDropdown/ItemPickerDropdown.style.js +22 -19
  10. package/dist/components/ItemPickerDropdown/ItemPickerDropdown.types.d.ts +4 -4
  11. package/dist/components/ItemPickerDropdown/ItemPickerDropdown.types.js +1 -1
  12. package/dist/components/ItemPickerLegacy/ItemPickerLegacy.d.ts +2 -2
  13. package/dist/components/ItemPickerLegacy/ItemPickerLegacy.js +89 -152
  14. package/dist/components/ItemPickerLegacy/ItemPickerLegacy.types.d.ts +8 -8
  15. package/dist/components/ItemPickerLegacy/ItemPickerLegacy.types.js +1 -1
  16. package/dist/components/ItemPickerList/ItemPickerList.d.ts +4 -4
  17. package/dist/components/ItemPickerList/ItemPickerList.js +199 -267
  18. package/dist/components/ItemPickerList/ItemPickerList.styles.d.ts +18 -18
  19. package/dist/components/ItemPickerList/ItemPickerList.styles.js +55 -64
  20. package/dist/components/ItemPickerList/ItemPickerList.types.d.ts +3 -3
  21. package/dist/components/ItemPickerList/ItemPickerList.types.js +1 -1
  22. package/dist/components/ItemPickerList/components/EmptyListMessage.d.ts +3 -3
  23. package/dist/components/ItemPickerList/components/EmptyListMessage.js +27 -40
  24. package/dist/components/ItemPickerList/components/ErrorItem.d.ts +1 -1
  25. package/dist/components/ItemPickerList/components/ErrorItem.js +10 -9
  26. package/dist/components/ItemPickerList/components/ErrorMessage.d.ts +2 -2
  27. package/dist/components/ItemPickerList/components/ErrorMessage.js +12 -15
  28. package/dist/components/ItemPickerList/components/InfiniteLoaderItem.d.ts +2 -2
  29. package/dist/components/ItemPickerList/components/InfiniteLoaderItem.js +19 -17
  30. package/dist/components/ItemPickerList/components/ItemPickerListFooter.d.ts +3 -3
  31. package/dist/components/ItemPickerList/components/ItemPickerListFooter.js +21 -20
  32. package/dist/components/ItemPickerList/components/ItemPickerListRow.d.ts +4 -4
  33. package/dist/components/ItemPickerList/components/ItemPickerListRow.js +42 -43
  34. package/dist/components/ItemPickerList/components/ItemPickerListSkeleton.d.ts +1 -1
  35. package/dist/components/ItemPickerList/components/ItemPickerListSkeleton.js +16 -23
  36. package/dist/components/ItemPickerList/components/ListSearchInput.d.ts +4 -4
  37. package/dist/components/ItemPickerList/components/ListSearchInput.js +36 -51
  38. package/dist/components/ItemPickerList/components/LoadingItem.d.ts +1 -1
  39. package/dist/components/ItemPickerList/components/LoadingItem.js +10 -9
  40. package/dist/components/ItemPickerList/components/NoMoreItem.d.ts +1 -1
  41. package/dist/components/ItemPickerList/components/NoMoreItem.js +10 -9
  42. package/dist/components/ItemPickerList/components/index.js +14 -6
  43. package/dist/components/ItemPickerList/constants.d.ts +2 -2
  44. package/dist/components/ItemPickerList/constants.js +47 -26
  45. package/dist/components/ItemPickerList/hooks/index.js +8 -3
  46. package/dist/components/ItemPickerList/hooks/useFlattenFolders.d.ts +2 -2
  47. package/dist/components/ItemPickerList/hooks/useFlattenFolders.js +40 -61
  48. package/dist/components/ItemPickerList/hooks/useItemsInSections.d.ts +7 -7
  49. package/dist/components/ItemPickerList/hooks/useItemsInSections.js +342 -443
  50. package/dist/components/ItemPickerList/hooks/useItemsInSections.utils.d.ts +5 -5
  51. package/dist/components/ItemPickerList/hooks/useItemsInSections.utils.js +77 -74
  52. package/dist/components/ItemPickerList/hooks/useListHeight.d.ts +2 -2
  53. package/dist/components/ItemPickerList/hooks/useListHeight.js +37 -41
  54. package/dist/components/ItemPickerList/types/renderMode.js +8 -5
  55. package/dist/components/ItemPickerList/utils/actionItemsUtils.d.ts +4 -4
  56. package/dist/components/ItemPickerList/utils/actionItemsUtils.js +92 -92
  57. package/dist/components/ItemPickerList/utils/createTitleFromTitlePath.d.ts +2 -2
  58. package/dist/components/ItemPickerList/utils/createTitleFromTitlePath.js +7 -4
  59. package/dist/components/ItemPickerList/utils/findSectionById.d.ts +1 -1
  60. package/dist/components/ItemPickerList/utils/findSectionById.js +10 -12
  61. package/dist/components/ItemPickerList/utils/getContextAwareActions.d.ts +1 -1
  62. package/dist/components/ItemPickerList/utils/getContextAwareActions.js +19 -15
  63. package/dist/components/ItemPickerList/utils/getSearchByActionItems.d.ts +2 -2
  64. package/dist/components/ItemPickerList/utils/getSearchByActionItems.js +28 -29
  65. package/dist/components/ItemPickerList/utils/index.js +16 -4
  66. package/dist/components/ItemPickerList/utils/isNavKey.d.ts +1 -1
  67. package/dist/components/ItemPickerList/utils/isNavKey.js +6 -3
  68. package/dist/components/ItemPickerList/utils/resolveSectionId.d.ts +2 -2
  69. package/dist/components/ItemPickerList/utils/resolveSectionId.js +15 -9
  70. package/dist/components/ItemPickerList/utils/typeguards.utils.d.ts +5 -5
  71. package/dist/components/ItemPickerList/utils/typeguards.utils.js +23 -14
  72. package/dist/components/ItemPickerNew/ItemPickerNew.d.ts +4 -4
  73. package/dist/components/ItemPickerNew/ItemPickerNew.js +55 -100
  74. package/dist/components/ItemPickerNew/ItemPickerNew.types.d.ts +13 -13
  75. package/dist/components/ItemPickerNew/ItemPickerNew.types.js +1 -1
  76. package/dist/components/ItemPickerNew/types/actions.types.d.ts +2 -2
  77. package/dist/components/ItemPickerNew/types/actions.types.js +10 -6
  78. package/dist/components/ItemPickerNew/types/baseItemSectionType.types.d.ts +3 -3
  79. package/dist/components/ItemPickerNew/types/baseItemSectionType.types.js +1 -1
  80. package/dist/components/ItemPickerNew/types/itemPickerListTexts.types.d.ts +1 -1
  81. package/dist/components/ItemPickerNew/types/itemPickerListTexts.types.js +1 -1
  82. package/dist/components/ItemPickerTrigger/Trigger.d.ts +5 -5
  83. package/dist/components/ItemPickerTrigger/Trigger.js +71 -111
  84. package/dist/components/ItemPickerTrigger/Trigger.styles.d.ts +12 -12
  85. package/dist/components/ItemPickerTrigger/Trigger.styles.js +70 -93
  86. package/dist/components/ItemPickerTrigger/Trigger.types.d.ts +3 -3
  87. package/dist/components/ItemPickerTrigger/Trigger.types.js +1 -1
  88. package/dist/hooks/useDefaultTexts.d.ts +1 -1
  89. package/dist/hooks/useDefaultTexts.js +116 -121
  90. package/dist/index.js +14 -6
  91. package/dist/modules.d.js +1 -1
  92. package/dist/modules.d.ts +0 -0
  93. package/package.json +25 -25
@@ -1,106 +1,97 @@
1
- import { VariableSizeList } from 'react-window';
2
- import styled, { css } from 'styled-components';
3
- import Dropdown from '@synerise/ds-dropdown';
4
- import { Label as DropdownBackActionLabel } from '@synerise/ds-dropdown/dist/components/BackAction/BackAction.styles';
5
- import DSEmptyStates from '@synerise/ds-empty-states';
6
- import DSLoader from '@synerise/ds-loader';
7
- import Scrollbar from '@synerise/ds-scrollbar';
8
- import { PlaceholderWrapper } from '@synerise/ds-search-bar/dist/SearchBar.styles';
9
- import DropdownSkeleton from '@synerise/ds-skeleton';
10
- import { LIST_INNER_PADDING } from './constants';
11
- export var ListWrapper = styled.div.withConfig({
1
+ import { VariableSizeList } from "react-window";
2
+ import styled, { css } from "styled-components";
3
+ import Dropdown from "@synerise/ds-dropdown";
4
+ import { Label } from "@synerise/ds-dropdown/dist/components/BackAction/BackAction.styles";
5
+ import DSEmptyStates from "@synerise/ds-empty-states";
6
+ import DSLoader from "@synerise/ds-loader";
7
+ import Scrollbar from "@synerise/ds-scrollbar";
8
+ import { PlaceholderWrapper } from "@synerise/ds-search-bar/dist/SearchBar.styles";
9
+ import DropdownSkeleton from "@synerise/ds-skeleton";
10
+ import { LIST_INNER_PADDING } from "./constants.js";
11
+ const ListWrapper = /* @__PURE__ */ styled.div.withConfig({
12
12
  displayName: "ItemPickerListstyles__ListWrapper",
13
13
  componentId: "sc-1r33ill-0"
14
- })(["position:relative;flex:1 0 calc(100% - ", "px);", " ", " ", "{min-width:0;}"], function (props) {
15
- return props.offsetSpace;
16
- }, function (props) {
17
- return props.wrapperHeight !== undefined && "height: " + (props.wrapperHeight + LIST_INNER_PADDING) + "px;";
18
- }, function (props) {
19
- return props.centered && css(["display:flex;flex-direction:column;"]);
20
- }, DropdownBackActionLabel);
21
- export var ListContainer = styled(Dropdown.Wrapper).withConfig({
14
+ })(["position:relative;flex:1 0 calc(100% - ", "px);", " ", " ", "{min-width:0;}"], (props) => props.offsetSpace, (props) => props.wrapperHeight !== void 0 && `height: ${props.wrapperHeight + LIST_INNER_PADDING}px;`, (props) => props.centered && css(["display:flex;flex-direction:column;"]), Label);
15
+ const ListContainer = /* @__PURE__ */ styled(Dropdown.Wrapper).withConfig({
22
16
  displayName: "ItemPickerListstyles__ListContainer",
23
17
  componentId: "sc-1r33ill-1"
24
- })(["width:100%;height:", ";display:flex;flex-direction:column;", " span{display:flex;gap:8px;align-items:center;}"], function (props) {
25
- return props.wrapperHeight;
26
- }, PlaceholderWrapper);
27
- export var SearchWrapper = styled.div.withConfig({
18
+ })(["width:100%;height:", ";display:flex;flex-direction:column;", " span{display:flex;gap:8px;align-items:center;}"], (props) => props.wrapperHeight, PlaceholderWrapper);
19
+ const SearchWrapper = /* @__PURE__ */ styled.div.withConfig({
28
20
  displayName: "ItemPickerListstyles__SearchWrapper",
29
21
  componentId: "sc-1r33ill-2"
30
22
  })(["flex:0 0 52px;"]);
31
- export var EmptyStates = styled(DSEmptyStates).withConfig({
23
+ const EmptyStates = /* @__PURE__ */ styled(DSEmptyStates).withConfig({
32
24
  displayName: "ItemPickerListstyles__EmptyStates",
33
25
  componentId: "sc-1r33ill-3"
34
26
  })(["width:260px;margin:auto;"]);
35
- export var IconWrapper = styled.div.withConfig({
27
+ const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
36
28
  displayName: "ItemPickerListstyles__IconWrapper",
37
29
  componentId: "sc-1r33ill-4"
38
- })(["margin-right:4px;svg{fill:", ";}"], function (props) {
39
- return props.theme.palette['grey-600'];
40
- });
41
- export var FooterWrapper = styled.div.withConfig({
30
+ })(["margin-right:4px;svg{fill:", ";}"], (props) => props.theme.palette["grey-600"]);
31
+ const FooterWrapper = /* @__PURE__ */ styled.div.withConfig({
42
32
  displayName: "ItemPickerListstyles__FooterWrapper",
43
33
  componentId: "sc-1r33ill-5"
44
- })(["background-color:", ";padding:0 8px;height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;color:", ";font-weight:500;border-top:solid 1px ", ";&:hover{color:", ";", "{svg{fill:", ";}}}"], function (props) {
45
- return props.theme.palette['grey-050'];
46
- }, function (props) {
47
- return props.theme.palette['grey-600'];
48
- }, function (props) {
49
- return props.theme.palette['grey-100'];
50
- }, function (props) {
51
- return props.theme.palette['blue-600'];
52
- }, IconWrapper, function (props) {
53
- return props.theme.palette['blue-600'];
54
- });
55
- export var FooterWrapperRight = styled.div.withConfig({
34
+ })(["background-color:", ";padding:0 8px;height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;color:", ";font-weight:500;border-top:solid 1px ", ";&:hover{color:", ";", "{svg{fill:", ";}}}"], (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-100"], (props) => props.theme.palette["blue-600"], IconWrapper, (props) => props.theme.palette["blue-600"]);
35
+ const FooterWrapperRight = /* @__PURE__ */ styled.div.withConfig({
56
36
  displayName: "ItemPickerListstyles__FooterWrapperRight",
57
37
  componentId: "sc-1r33ill-6"
58
38
  })([""]);
59
- export var FooterWrapperLeft = styled.div.withConfig({
39
+ const FooterWrapperLeft = /* @__PURE__ */ styled.div.withConfig({
60
40
  displayName: "ItemPickerListstyles__FooterWrapperLeft",
61
41
  componentId: "sc-1r33ill-7"
62
42
  })([""]);
63
- export var ScrollContent = styled.div.withConfig({
43
+ const ScrollContent = /* @__PURE__ */ styled.div.withConfig({
64
44
  displayName: "ItemPickerListstyles__ScrollContent",
65
45
  componentId: "sc-1r33ill-8"
66
46
  })(["padding-right:", "px;"], LIST_INNER_PADDING);
67
- export var StyledScrollbar = styled(Scrollbar).withConfig({
47
+ const StyledScrollbar = /* @__PURE__ */ styled(Scrollbar).withConfig({
68
48
  displayName: "ItemPickerListstyles__StyledScrollbar",
69
49
  componentId: "sc-1r33ill-9"
70
- })(["padding:", "px 0 0 ", "px;height:", ";&&{.ps__rail-y{left:unset !important;right:0;}}"], LIST_INNER_PADDING, LIST_INNER_PADDING, function (props) {
71
- return props.withSectionHeader ? 'calc(100% - 53px)' : '100%';
72
- });
73
- export var StyledList = styled(VariableSizeList).withConfig({
50
+ })(["padding:", "px 0 0 ", "px;height:", ";&&{.ps__rail-y{left:unset !important;right:0;}}"], LIST_INNER_PADDING, LIST_INNER_PADDING, (props) => props.withSectionHeader ? "calc(100% - 53px)" : "100%");
51
+ const StyledList = /* @__PURE__ */ styled(VariableSizeList).withConfig({
74
52
  displayName: "ItemPickerListstyles__StyledList",
75
53
  componentId: "sc-1r33ill-10"
76
- })(["overflow-x:unset;overflow-y:unset;height:auto !important;", " &:after{content:'';height:8px;display:block;}"], function (props) {
77
- return props.maxHeight !== undefined && "max-height: " + props.maxHeight + "px;";
78
- });
79
- export var Skeleton = styled(DropdownSkeleton).withConfig({
54
+ })(["overflow-x:unset;overflow-y:unset;height:auto !important;", " &:after{content:'';height:8px;display:block;}"], (props) => props.maxHeight !== void 0 && `max-height: ${props.maxHeight}px;`);
55
+ const Skeleton = /* @__PURE__ */ styled(DropdownSkeleton).withConfig({
80
56
  displayName: "ItemPickerListstyles__Skeleton",
81
57
  componentId: "sc-1r33ill-11"
82
58
  })(["padding:0;width:70%;"]);
83
- export var SkeletonWrapper = styled.div.withConfig({
59
+ const SkeletonWrapper = /* @__PURE__ */ styled.div.withConfig({
84
60
  displayName: "ItemPickerListstyles__SkeletonWrapper",
85
61
  componentId: "sc-1r33ill-12"
86
- })(["", " display:flex;flex-direction:column;gap:16px;padding:16px;", ":nth-child(odd){width:50%;}"], function (props) {
87
- return props.wrapperHeight !== undefined && "height: " + props.wrapperHeight + "px;";
88
- }, Skeleton);
89
- export var Title = styled.div.withConfig({
62
+ })(["", " display:flex;flex-direction:column;gap:16px;padding:16px;", ":nth-child(odd){width:50%;}"], (props) => props.wrapperHeight !== void 0 && `height: ${props.wrapperHeight}px;`, Skeleton);
63
+ const Title = /* @__PURE__ */ styled.div.withConfig({
90
64
  displayName: "ItemPickerListstyles__Title",
91
65
  componentId: "sc-1r33ill-13"
92
- })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:8px 12px;"], function (props) {
93
- return props.theme.palette['grey-500'];
94
- });
95
- export var SectionTitleWrapper = styled.div.withConfig({
66
+ })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:8px 12px;"], (props) => props.theme.palette["grey-500"]);
67
+ const SectionTitleWrapper = /* @__PURE__ */ styled.div.withConfig({
96
68
  displayName: "ItemPickerListstyles__SectionTitleWrapper",
97
69
  componentId: "sc-1r33ill-14"
98
70
  })([""]);
99
- export var InfiniteLoaderItemWrapper = styled.div.withConfig({
71
+ const InfiniteLoaderItemWrapper = /* @__PURE__ */ styled.div.withConfig({
100
72
  displayName: "ItemPickerListstyles__InfiniteLoaderItemWrapper",
101
73
  componentId: "sc-1r33ill-15"
102
74
  })([""]);
103
- export var Loader = styled(DSLoader).withConfig({
75
+ const Loader = /* @__PURE__ */ styled(DSLoader).withConfig({
104
76
  displayName: "ItemPickerListstyles__Loader",
105
77
  componentId: "sc-1r33ill-16"
106
- })(["justify-content:flex-start;"]);
78
+ })(["justify-content:flex-start;"]);
79
+ export {
80
+ EmptyStates,
81
+ FooterWrapper,
82
+ FooterWrapperLeft,
83
+ FooterWrapperRight,
84
+ IconWrapper,
85
+ InfiniteLoaderItemWrapper,
86
+ ListContainer,
87
+ ListWrapper,
88
+ Loader,
89
+ ScrollContent,
90
+ SearchWrapper,
91
+ SectionTitleWrapper,
92
+ Skeleton,
93
+ SkeletonWrapper,
94
+ StyledList,
95
+ StyledScrollbar,
96
+ Title
97
+ };
@@ -1,6 +1,6 @@
1
- import { type Ref } from 'react';
2
- import { type ListItemProps } from '@synerise/ds-list-item';
3
- import type { BaseItemType, BaseSectionType, BaseSectionTypeWithFolders } from '../ItemPickerNew/types/baseItemSectionType.types';
1
+ import { Ref } from 'react';
2
+ import { ListItemProps } from '@synerise/ds-list-item';
3
+ import { BaseItemType, BaseSectionType, BaseSectionTypeWithFolders } from '../ItemPickerNew/types/baseItemSectionType.types';
4
4
  export type ItemSelectHandler<ItemType extends BaseItemType, SectionType extends BaseSectionType | undefined> = SectionType extends BaseSectionType ? (item: ItemType, section?: BaseSectionTypeWithFolders<BaseSectionType>) => void : (item: ItemType) => void;
5
5
  export type TitleListItemProps = Omit<ListItemProps, 'type'> & {
6
6
  type: 'title';
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,6 +1,6 @@
1
- import React, { type ReactElement, type ReactNode } from 'react';
2
- import { type BaseSectionType } from '../../ItemPickerNew/types/baseItemSectionType.types';
3
- import { type ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
1
+ import { default as React, ReactElement, ReactNode } from 'react';
2
+ import { BaseSectionType } from '../../ItemPickerNew/types/baseItemSectionType.types';
3
+ import { ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
4
4
  type EmptyListMessageProps = {
5
5
  texts: Pick<ItemPickerListTexts, 'noResultsInSection' | 'noResults' | 'noItems' | 'noActions' | 'emptyStateLabel' | 'searchAllFoldersButtonLabel'>;
6
6
  hasCurrentSection?: boolean;
@@ -1,50 +1,37 @@
1
- import React from 'react';
2
- import Button from '@synerise/ds-button';
3
- import { NoData, SearchNoResultsL } from '@synerise/ds-icon';
4
- import * as S from '../ItemPickerList.styles';
5
- export var EmptyListMessage = function EmptyListMessage(_ref) {
6
- var texts = _ref.texts,
7
- listActions = _ref.listActions,
8
- isActionSection = _ref.isActionSection,
9
- hasCurrentSection = _ref.hasCurrentSection,
10
- buttonOnClick = _ref.buttonOnClick,
11
- currentSection = _ref.currentSection,
12
- searchQuery = _ref.searchQuery,
13
- emptyListIcon = _ref.emptyListIcon,
14
- noResultsIcon = _ref.noResultsIcon,
15
- emptyStateComponent = _ref.emptyStateComponent,
16
- noResultsComponent = _ref.noResultsComponent;
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import Button from "@synerise/ds-button";
3
+ import { SearchNoResultsL, NoData } from "@synerise/ds-icon";
4
+ import { EmptyStates } from "../ItemPickerList.styles.js";
5
+ const EmptyListMessage = ({
6
+ texts,
7
+ listActions,
8
+ isActionSection,
9
+ hasCurrentSection,
10
+ buttonOnClick,
11
+ currentSection,
12
+ searchQuery,
13
+ emptyListIcon,
14
+ noResultsIcon,
15
+ emptyStateComponent,
16
+ noResultsComponent
17
+ }) => {
17
18
  if (listActions) {
18
- return /*#__PURE__*/React.createElement(S.EmptyStates, {
19
- customIcon: /*#__PURE__*/React.createElement(SearchNoResultsL, null),
20
- label: texts.noActions
21
- });
19
+ return /* @__PURE__ */ jsx(EmptyStates, { customIcon: /* @__PURE__ */ jsx(SearchNoResultsL, {}), label: texts.noActions });
22
20
  }
23
21
  if (hasCurrentSection && !isActionSection) {
24
- var _currentSection$texts, _currentSection$texts2;
25
- return /*#__PURE__*/React.createElement(S.EmptyStates, {
26
- customIcon: /*#__PURE__*/React.createElement(SearchNoResultsL, null),
27
- label: (currentSection == null || (_currentSection$texts = currentSection.texts) == null ? void 0 : _currentSection$texts.noResultsInSection) || texts.noResultsInSection,
28
- button: /*#__PURE__*/React.createElement(Button, {
29
- type: "primary",
30
- onClick: buttonOnClick
31
- }, (currentSection == null || (_currentSection$texts2 = currentSection.texts) == null ? void 0 : _currentSection$texts2.searchAllFoldersButtonLabel) || texts.searchAllFoldersButtonLabel)
32
- });
22
+ return /* @__PURE__ */ jsx(EmptyStates, { customIcon: /* @__PURE__ */ jsx(SearchNoResultsL, {}), label: currentSection?.texts?.noResultsInSection || texts.noResultsInSection, button: /* @__PURE__ */ jsx(Button, { type: "primary", onClick: buttonOnClick, children: currentSection?.texts?.searchAllFoldersButtonLabel || texts.searchAllFoldersButtonLabel }) });
33
23
  }
34
24
  if (!searchQuery) {
35
25
  if (emptyStateComponent) {
36
- return /*#__PURE__*/React.createElement(React.Fragment, null, emptyStateComponent);
26
+ return /* @__PURE__ */ jsx(Fragment, { children: emptyStateComponent });
37
27
  }
38
- return /*#__PURE__*/React.createElement(S.EmptyStates, {
39
- customIcon: emptyListIcon || /*#__PURE__*/React.createElement(NoData, null),
40
- label: texts.emptyStateLabel
41
- });
28
+ return /* @__PURE__ */ jsx(EmptyStates, { customIcon: emptyListIcon || /* @__PURE__ */ jsx(NoData, {}), label: texts.emptyStateLabel });
42
29
  }
43
30
  if (noResultsComponent) {
44
- return /*#__PURE__*/React.createElement(React.Fragment, null, noResultsComponent);
31
+ return /* @__PURE__ */ jsx(Fragment, { children: noResultsComponent });
45
32
  }
46
- return /*#__PURE__*/React.createElement(S.EmptyStates, {
47
- customIcon: noResultsIcon || /*#__PURE__*/React.createElement(SearchNoResultsL, null),
48
- label: texts.noResults
49
- });
50
- };
33
+ return /* @__PURE__ */ jsx(EmptyStates, { customIcon: noResultsIcon || /* @__PURE__ */ jsx(SearchNoResultsL, {}), label: texts.noResults });
34
+ };
35
+ export {
36
+ EmptyListMessage
37
+ };
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  type ErrorItemProps = {
3
3
  label: ReactNode;
4
4
  };
@@ -1,9 +1,10 @@
1
- import React from 'react';
2
- import Alert from '@synerise/ds-alert';
3
- export var ErrorItem = function ErrorItem(_ref) {
4
- var label = _ref.label;
5
- return /*#__PURE__*/React.createElement(Alert.InlineAlert, {
6
- type: "alert",
7
- message: label
8
- });
9
- };
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Alert from "@synerise/ds-alert";
3
+ const ErrorItem = ({
4
+ label
5
+ }) => {
6
+ return /* @__PURE__ */ jsx(Alert.InlineAlert, { type: "alert", message: label });
7
+ };
8
+ export {
9
+ ErrorItem
10
+ };
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { type ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
1
+ import { default as React } from 'react';
2
+ import { ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
3
3
  type ErrorMessageProps = {
4
4
  texts: ItemPickerListTexts;
5
5
  };
@@ -1,15 +1,12 @@
1
- import React from 'react';
2
- import { theme } from '@synerise/ds-core';
3
- import { WarningL } from '@synerise/ds-icon';
4
- import * as S from '../ItemPickerList.styles';
5
- export var ErrorMessage = function ErrorMessage(_ref) {
6
- var texts = _ref.texts;
7
- return /*#__PURE__*/React.createElement(S.EmptyStates, {
8
- customIcon: /*#__PURE__*/React.createElement(WarningL, {
9
- fill: theme.palette['red-600']
10
- }),
11
- text: texts.errorMessageTitle,
12
- label: texts.errorMessageDetails,
13
- labelPosition: "bottom"
14
- });
15
- };
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { theme } from "@synerise/ds-core";
3
+ import { WarningL } from "@synerise/ds-icon";
4
+ import { EmptyStates } from "../ItemPickerList.styles.js";
5
+ const ErrorMessage = ({
6
+ texts
7
+ }) => {
8
+ return /* @__PURE__ */ jsx(EmptyStates, { customIcon: /* @__PURE__ */ jsx(WarningL, { fill: theme.palette["red-600"] }), text: texts.errorMessageTitle, label: texts.errorMessageDetails, labelPosition: "bottom" });
9
+ };
10
+ export {
11
+ ErrorMessage
12
+ };
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { type ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
1
+ import { default as React } from 'react';
2
+ import { ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
3
3
  export type InfiniteLoaderItemProps = {
4
4
  hasError: boolean;
5
5
  hasMore: boolean;
@@ -1,17 +1,19 @@
1
- import React from 'react';
2
- import { ErrorItem } from './ErrorItem';
3
- import { LoadingItem } from './LoadingItem';
4
- import { NoMoreItem } from './NoMoreItem';
5
- export var InfiniteLoaderItem = function InfiniteLoaderItem(_ref) {
6
- var hasMore = _ref.hasMore,
7
- isLoading = _ref.isLoading,
8
- hasError = _ref.hasError,
9
- texts = _ref.texts;
10
- return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading && /*#__PURE__*/React.createElement(LoadingItem, {
11
- label: texts.infiniteScrollLoadingMore
12
- }), !isLoading && !hasMore && /*#__PURE__*/React.createElement(NoMoreItem, {
13
- label: texts.infiniteScrollAllLoaded
14
- }), !isLoading && hasError && /*#__PURE__*/React.createElement(ErrorItem, {
15
- label: texts.infiniteScrollLoadingError
16
- }));
17
- };
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { ErrorItem } from "./ErrorItem.js";
3
+ import { LoadingItem } from "./LoadingItem.js";
4
+ import { NoMoreItem } from "./NoMoreItem.js";
5
+ const InfiniteLoaderItem = ({
6
+ hasMore,
7
+ isLoading,
8
+ hasError,
9
+ texts
10
+ }) => {
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ isLoading && /* @__PURE__ */ jsx(LoadingItem, { label: texts.infiniteScrollLoadingMore }),
13
+ !isLoading && !hasMore && /* @__PURE__ */ jsx(NoMoreItem, { label: texts.infiniteScrollAllLoaded }),
14
+ !isLoading && hasError && /* @__PURE__ */ jsx(ErrorItem, { label: texts.infiniteScrollLoadingError })
15
+ ] });
16
+ };
17
+ export {
18
+ InfiniteLoaderItem
19
+ };
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { type ButtonProps } from '@synerise/ds-button';
3
- import { type ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from '@synerise/ds-button';
3
+ import { ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
4
4
  type ItemPickerListFooterProps = {
5
5
  texts: ItemPickerListTexts;
6
6
  refreshButtonProps?: Partial<ButtonProps>;
@@ -1,20 +1,21 @@
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
- import React from 'react';
3
- import Button from '@synerise/ds-button';
4
- import { theme } from '@synerise/ds-core';
5
- import Icon, { RefreshM } from '@synerise/ds-icon';
6
- import * as S from '../ItemPickerList.styles';
7
- export var ItemPickerListFooter = function ItemPickerListFooter(_ref) {
8
- var texts = _ref.texts,
9
- refreshButtonProps = _ref.refreshButtonProps,
10
- onRefresh = _ref.onRefresh;
11
- return /*#__PURE__*/React.createElement(React.Fragment, null, onRefresh && /*#__PURE__*/React.createElement(S.FooterWrapper, null, /*#__PURE__*/React.createElement(S.FooterWrapperLeft, null), /*#__PURE__*/React.createElement(S.FooterWrapperRight, null, /*#__PURE__*/React.createElement(Button, _extends({
12
- type: "ghost",
13
- mode: "icon-label",
14
- onClick: onRefresh
15
- }, refreshButtonProps), /*#__PURE__*/React.createElement(Icon, {
16
- component: /*#__PURE__*/React.createElement(RefreshM, null),
17
- size: 24,
18
- color: theme.palette['grey-500']
19
- }), texts.refreshButtonLabel))));
20
- };
1
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
+ import Button from "@synerise/ds-button";
3
+ import { theme } from "@synerise/ds-core";
4
+ import Icon, { RefreshM } from "@synerise/ds-icon";
5
+ import { FooterWrapper, FooterWrapperLeft, FooterWrapperRight } from "../ItemPickerList.styles.js";
6
+ const ItemPickerListFooter = ({
7
+ texts,
8
+ refreshButtonProps,
9
+ onRefresh
10
+ }) => {
11
+ return /* @__PURE__ */ jsx(Fragment, { children: onRefresh && /* @__PURE__ */ jsxs(FooterWrapper, { children: [
12
+ /* @__PURE__ */ jsx(FooterWrapperLeft, {}),
13
+ /* @__PURE__ */ jsx(FooterWrapperRight, { children: /* @__PURE__ */ jsxs(Button, { type: "ghost", mode: "icon-label", onClick: onRefresh, ...refreshButtonProps, children: [
14
+ /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(RefreshM, {}), size: 24, color: theme.palette["grey-500"] }),
15
+ texts.refreshButtonLabel
16
+ ] }) })
17
+ ] }) });
18
+ };
19
+ export {
20
+ ItemPickerListFooter
21
+ };
@@ -1,7 +1,7 @@
1
- import React, { type CSSProperties, type PropsWithChildren } from 'react';
2
- import { type ListItemProps } from '@synerise/ds-list-item';
3
- import type { ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
4
- import { type TitleListItemProps } from '../ItemPickerList.types';
1
+ import { default as React, CSSProperties, PropsWithChildren } from 'react';
2
+ import { ListItemProps } from '@synerise/ds-list-item';
3
+ import { ItemPickerListTexts } from '../../ItemPickerNew/types/itemPickerListTexts.types';
4
+ import { TitleListItemProps } from '../ItemPickerList.types';
5
5
  export type ItemPickerListRowProps = {
6
6
  index: number;
7
7
  style: CSSProperties;
@@ -1,51 +1,50 @@
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
- import React, { useCallback } from 'react';
3
- import ListItem from '@synerise/ds-list-item';
4
- import * as S from '../ItemPickerList.styles';
5
- import { isTitle } from '../utils/typeguards.utils';
6
- import { InfiniteLoaderItem } from './InfiniteLoaderItem';
7
- var INFINITE_LOADER_ITEM_HEIGHT = 48;
8
- export var ItemPickerListRow = function ItemPickerListRow(_ref) {
9
- var index = _ref.index,
10
- style = _ref.style,
11
- _ref$data = _ref.data,
12
- dataSource = _ref$data.dataSource,
13
- classNames = _ref$data.classNames,
14
- getItemSize = _ref$data.getItemSize,
15
- infiniteScroll = _ref$data.infiniteScroll,
16
- texts = _ref$data.texts;
17
- var listItem = dataSource[index];
18
- var lastItemHeight = getItemSize(dataSource.length - 1);
19
- var infiniteLoaderItem = useCallback(function () {
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useCallback } from "react";
3
+ import DSListItem from "@synerise/ds-list-item";
4
+ import { InfiniteLoaderItemWrapper, Title } from "../ItemPickerList.styles.js";
5
+ import { isTitle } from "../utils/typeguards.utils.js";
6
+ import { InfiniteLoaderItem } from "./InfiniteLoaderItem.js";
7
+ const INFINITE_LOADER_ITEM_HEIGHT = 48;
8
+ const ItemPickerListRow = ({
9
+ index,
10
+ style,
11
+ data: {
12
+ dataSource,
13
+ classNames,
14
+ getItemSize,
15
+ infiniteScroll,
16
+ texts
17
+ }
18
+ }) => {
19
+ const listItem = dataSource[index];
20
+ const lastItemHeight = getItemSize(dataSource.length - 1);
21
+ const infiniteLoaderItem = useCallback(() => {
20
22
  if (infiniteScroll) {
21
- var isLoading = infiniteScroll.isLoading,
22
- hasMore = infiniteScroll.hasMore,
23
- hasError = infiniteScroll.hasError;
24
- var top = Number(style.top) + lastItemHeight + "px";
23
+ const {
24
+ isLoading,
25
+ hasMore,
26
+ hasError
27
+ } = infiniteScroll;
28
+ const top = `${Number(style.top) + lastItemHeight}px`;
25
29
  if (isLoading || hasError || !hasMore) {
26
- return /*#__PURE__*/React.createElement(S.InfiniteLoaderItemWrapper, {
27
- style: _extends({}, style, {
28
- top: top,
29
- height: INFINITE_LOADER_ITEM_HEIGHT + "px",
30
- padding: '6px 0'
31
- })
32
- }, /*#__PURE__*/React.createElement(InfiniteLoaderItem, {
33
- hasMore: hasMore,
34
- isLoading: isLoading,
35
- hasError: hasError,
36
- texts: texts
37
- }));
30
+ return /* @__PURE__ */ jsx(InfiniteLoaderItemWrapper, { style: {
31
+ ...style,
32
+ top,
33
+ height: `${INFINITE_LOADER_ITEM_HEIGHT}px`,
34
+ padding: "6px 0"
35
+ }, children: /* @__PURE__ */ jsx(InfiniteLoaderItem, { hasMore, isLoading, hasError, texts }) });
38
36
  }
39
37
  }
40
38
  return null;
41
39
  }, [infiniteScroll, lastItemHeight, style, texts]);
42
40
  if (isTitle(listItem)) {
43
- return /*#__PURE__*/React.createElement(S.Title, {
44
- style: style
45
- }, listItem.text);
41
+ return /* @__PURE__ */ jsx(Title, { style, children: listItem.text });
46
42
  }
47
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ListItem, _extends({}, listItem, {
48
- style: style,
49
- className: classNames
50
- })), index === dataSource.length - 1 && infiniteLoaderItem());
51
- };
43
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
44
+ /* @__PURE__ */ jsx(DSListItem, { ...listItem, style, className: classNames }),
45
+ index === dataSource.length - 1 && infiniteLoaderItem()
46
+ ] });
47
+ };
48
+ export {
49
+ ItemPickerListRow
50
+ };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare const ItemPickerListSkeleton: ({ wrapperHeight, }: {
3
3
  wrapperHeight?: number;
4
4
  }) => React.JSX.Element;
@@ -1,23 +1,16 @@
1
- import React from 'react';
2
- import * as S from '../ItemPickerList.styles';
3
- export var ItemPickerListSkeleton = function ItemPickerListSkeleton(_ref) {
4
- var wrapperHeight = _ref.wrapperHeight;
5
- return /*#__PURE__*/React.createElement(S.SkeletonWrapper, {
6
- wrapperHeight: wrapperHeight
7
- }, /*#__PURE__*/React.createElement(S.Skeleton, {
8
- numberOfSkeletons: 1,
9
- size: "M"
10
- }), /*#__PURE__*/React.createElement(S.Skeleton, {
11
- numberOfSkeletons: 1,
12
- size: "M"
13
- }), /*#__PURE__*/React.createElement(S.Skeleton, {
14
- numberOfSkeletons: 1,
15
- size: "M"
16
- }), /*#__PURE__*/React.createElement(S.Skeleton, {
17
- numberOfSkeletons: 1,
18
- size: "M"
19
- }), /*#__PURE__*/React.createElement(S.Skeleton, {
20
- numberOfSkeletons: 1,
21
- size: "M"
22
- }));
23
- };
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { SkeletonWrapper, Skeleton } from "../ItemPickerList.styles.js";
3
+ const ItemPickerListSkeleton = ({
4
+ wrapperHeight
5
+ }) => {
6
+ return /* @__PURE__ */ jsxs(SkeletonWrapper, { wrapperHeight, children: [
7
+ /* @__PURE__ */ jsx(Skeleton, { numberOfSkeletons: 1, size: "M" }),
8
+ /* @__PURE__ */ jsx(Skeleton, { numberOfSkeletons: 1, size: "M" }),
9
+ /* @__PURE__ */ jsx(Skeleton, { numberOfSkeletons: 1, size: "M" }),
10
+ /* @__PURE__ */ jsx(Skeleton, { numberOfSkeletons: 1, size: "M" }),
11
+ /* @__PURE__ */ jsx(Skeleton, { numberOfSkeletons: 1, size: "M" })
12
+ ] });
13
+ };
14
+ export {
15
+ ItemPickerListSkeleton
16
+ };
@@ -1,7 +1,7 @@
1
- import React, { type MutableRefObject } from 'react';
2
- import type { SearchBarProps } from '@synerise/ds-search-bar';
3
- import type { ItemPickerTexts } from '../../ItemPickerNew/ItemPickerNew.types';
4
- import type { SearchByParamConfig } from '../../ItemPickerNew/types/actions.types';
1
+ import { default as React, MutableRefObject } from 'react';
2
+ import { SearchBarProps } from '@synerise/ds-search-bar';
3
+ import { ItemPickerTexts } from '../../ItemPickerNew/ItemPickerNew.types';
4
+ import { SearchByParamConfig } from '../../ItemPickerNew/types/actions.types';
5
5
  type ListSearchInputProps = {
6
6
  searchByParamConfig?: SearchByParamConfig;
7
7
  clearSearchQuery: () => void;