@redhat-cloud-services/frontend-components-utilities 4.0.0-beta.0 → 4.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.
Files changed (242) hide show
  1. package/RBAC/RBAC.js +1 -2
  2. package/RBAC/RBAC.js.map +1 -1
  3. package/esm/RBAC/RBAC.js +1 -2
  4. package/esm/RBAC/RBAC.js.map +1 -1
  5. package/package.json +3 -3
  6. package/Deffered/Deffered.d.ts +0 -6
  7. package/Deffered/Deffered.js +0 -14
  8. package/Deffered/Deffered.js.map +0 -1
  9. package/Deffered/index.d.ts +0 -2
  10. package/Deffered/index.js +0 -20
  11. package/Deffered/index.js.map +0 -1
  12. package/Deffered/package.json +0 -1
  13. package/__fixtures__/columns.d.ts +0 -62
  14. package/__fixtures__/columns.js +0 -46
  15. package/__fixtures__/columns.js.map +0 -1
  16. package/__fixtures__/filters.d.ts +0 -44
  17. package/__fixtures__/filters.js +0 -97
  18. package/__fixtures__/filters.js.map +0 -1
  19. package/__fixtures__/items.d.ts +0 -8
  20. package/__fixtures__/items.js +0 -27
  21. package/__fixtures__/items.js.map +0 -1
  22. package/esm/Deffered/Deffered.js +0 -11
  23. package/esm/Deffered/Deffered.js.map +0 -1
  24. package/esm/Deffered/index.js +0 -3
  25. package/esm/Deffered/index.js.map +0 -1
  26. package/esm/__fixtures__/columns.js +0 -44
  27. package/esm/__fixtures__/columns.js.map +0 -1
  28. package/esm/__fixtures__/filters.js +0 -94
  29. package/esm/__fixtures__/filters.js.map +0 -1
  30. package/esm/__fixtures__/items.js +0 -24
  31. package/esm/__fixtures__/items.js.map +0 -1
  32. package/esm/inventoryDependencies/index.js +0 -4
  33. package/esm/inventoryDependencies/index.js.map +0 -1
  34. package/esm/inventoryDependencies/inventoryDependencies.js +0 -68
  35. package/esm/inventoryDependencies/inventoryDependencies.js.map +0 -1
  36. package/esm/useBulkSelect/helpers.js +0 -57
  37. package/esm/useBulkSelect/helpers.js.map +0 -1
  38. package/esm/useBulkSelect/index.js +0 -3
  39. package/esm/useBulkSelect/index.js.map +0 -1
  40. package/esm/useBulkSelect/useBulkSelect.js +0 -134
  41. package/esm/useBulkSelect/useBulkSelect.js.map +0 -1
  42. package/esm/useBulkSelect/useBulkSelectWithItems.js +0 -57
  43. package/esm/useBulkSelect/useBulkSelectWithItems.js.map +0 -1
  44. package/esm/useColumnManager/helper.js +0 -18
  45. package/esm/useColumnManager/helper.js.map +0 -1
  46. package/esm/useColumnManager/index.js +0 -2
  47. package/esm/useColumnManager/index.js.map +0 -1
  48. package/esm/useColumnManager/useColumnManager.js +0 -31
  49. package/esm/useColumnManager/useColumnManager.js.map +0 -1
  50. package/esm/useDedicatedAction/index.js +0 -2
  51. package/esm/useDedicatedAction/index.js.map +0 -1
  52. package/esm/useDedicatedAction/useDedicatedAction.js +0 -27
  53. package/esm/useDedicatedAction/useDedicatedAction.js.map +0 -1
  54. package/esm/useExpandable/helpers.js +0 -10
  55. package/esm/useExpandable/helpers.js.map +0 -1
  56. package/esm/useExpandable/index.js +0 -3
  57. package/esm/useExpandable/index.js.map +0 -1
  58. package/esm/useExpandable/useExpandable.js +0 -19
  59. package/esm/useExpandable/useExpandable.js.map +0 -1
  60. package/esm/useExpandable/useExpandableWithItems.js +0 -28
  61. package/esm/useExpandable/useExpandableWithItems.js.map +0 -1
  62. package/esm/useExport/helpers.js +0 -62
  63. package/esm/useExport/helpers.js.map +0 -1
  64. package/esm/useExport/index.js +0 -3
  65. package/esm/useExport/index.js.map +0 -1
  66. package/esm/useExport/useExport.js +0 -80
  67. package/esm/useExport/useExport.js.map +0 -1
  68. package/esm/useExport/useExportWithItems.js +0 -16
  69. package/esm/useExport/useExportWithItems.js.map +0 -1
  70. package/esm/useFilterConfig/filterChipHelpers.js +0 -17
  71. package/esm/useFilterConfig/filterChipHelpers.js.map +0 -1
  72. package/esm/useFilterConfig/filterConfigHelpers.js +0 -27
  73. package/esm/useFilterConfig/filterConfigHelpers.js.map +0 -1
  74. package/esm/useFilterConfig/filterTypeHelpers.js +0 -90
  75. package/esm/useFilterConfig/filterTypeHelpers.js.map +0 -1
  76. package/esm/useFilterConfig/helpers.js +0 -55
  77. package/esm/useFilterConfig/helpers.js.map +0 -1
  78. package/esm/useFilterConfig/index.js +0 -4
  79. package/esm/useFilterConfig/index.js.map +0 -1
  80. package/esm/useFilterConfig/useFilterConfig.js +0 -71
  81. package/esm/useFilterConfig/useFilterConfig.js.map +0 -1
  82. package/esm/useFilterConfig/useFilterConfigWithItems.js +0 -45
  83. package/esm/useFilterConfig/useFilterConfigWithItems.js.map +0 -1
  84. package/esm/usePaginate/index.js +0 -3
  85. package/esm/usePaginate/index.js.map +0 -1
  86. package/esm/usePaginate/usePaginate.js +0 -43
  87. package/esm/usePaginate/usePaginate.js.map +0 -1
  88. package/esm/usePaginate/usePaginateWithItems.js +0 -26
  89. package/esm/usePaginate/usePaginateWithItems.js.map +0 -1
  90. package/esm/useSelectionManager/index.js +0 -2
  91. package/esm/useSelectionManager/index.js.map +0 -1
  92. package/esm/useSelectionManager/reducer.js +0 -61
  93. package/esm/useSelectionManager/reducer.js.map +0 -1
  94. package/esm/useSelectionManager/useSelectionManager.js +0 -30
  95. package/esm/useSelectionManager/useSelectionManager.js.map +0 -1
  96. package/esm/useTableSort/helpers.js +0 -56
  97. package/esm/useTableSort/helpers.js.map +0 -1
  98. package/esm/useTableSort/index.js +0 -4
  99. package/esm/useTableSort/index.js.map +0 -1
  100. package/esm/useTableSort/useTableSort.js +0 -25
  101. package/esm/useTableSort/useTableSort.js.map +0 -1
  102. package/esm/useTableSort/useTableSortWithItems.js +0 -29
  103. package/esm/useTableSort/useTableSortWithItems.js.map +0 -1
  104. package/esm/useTableTools/helpers.js +0 -47
  105. package/esm/useTableTools/helpers.js.map +0 -1
  106. package/esm/useTableTools/index.js +0 -3
  107. package/esm/useTableTools/index.js.map +0 -1
  108. package/esm/useTableTools/rowsBuilder.js +0 -72
  109. package/esm/useTableTools/rowsBuilder.js.map +0 -1
  110. package/esm/useTableTools/useTableTools.js +0 -71
  111. package/esm/useTableTools/useTableTools.js.map +0 -1
  112. package/inventoryDependencies/index.d.ts +0 -2
  113. package/inventoryDependencies/index.js +0 -32
  114. package/inventoryDependencies/index.js.map +0 -1
  115. package/inventoryDependencies/inventoryDependencies.d.ts +0 -146
  116. package/inventoryDependencies/inventoryDependencies.js +0 -71
  117. package/inventoryDependencies/inventoryDependencies.js.map +0 -1
  118. package/inventoryDependencies/package.json +0 -1
  119. package/useBulkSelect/helpers.d.ts +0 -6
  120. package/useBulkSelect/helpers.js +0 -66
  121. package/useBulkSelect/helpers.js.map +0 -1
  122. package/useBulkSelect/index.d.ts +0 -2
  123. package/useBulkSelect/index.js +0 -11
  124. package/useBulkSelect/index.js.map +0 -1
  125. package/useBulkSelect/package.json +0 -1
  126. package/useBulkSelect/useBulkSelect.d.ts +0 -5
  127. package/useBulkSelect/useBulkSelect.js +0 -136
  128. package/useBulkSelect/useBulkSelect.js.map +0 -1
  129. package/useBulkSelect/useBulkSelectWithItems.d.ts +0 -9
  130. package/useBulkSelect/useBulkSelectWithItems.js +0 -62
  131. package/useBulkSelect/useBulkSelectWithItems.js.map +0 -1
  132. package/useColumnManager/helper.d.ts +0 -2
  133. package/useColumnManager/helper.js +0 -26
  134. package/useColumnManager/helper.js.map +0 -1
  135. package/useColumnManager/index.d.ts +0 -1
  136. package/useColumnManager/index.js +0 -9
  137. package/useColumnManager/index.js.map +0 -1
  138. package/useColumnManager/package.json +0 -1
  139. package/useColumnManager/useColumnManager.d.ts +0 -13
  140. package/useColumnManager/useColumnManager.js +0 -55
  141. package/useColumnManager/useColumnManager.js.map +0 -1
  142. package/useDedicatedAction/index.d.ts +0 -1
  143. package/useDedicatedAction/index.js +0 -9
  144. package/useDedicatedAction/index.js.map +0 -1
  145. package/useDedicatedAction/package.json +0 -1
  146. package/useDedicatedAction/useDedicatedAction.d.ts +0 -8
  147. package/useDedicatedAction/useDedicatedAction.js +0 -32
  148. package/useDedicatedAction/useDedicatedAction.js.map +0 -1
  149. package/useExpandable/helpers.d.ts +0 -7
  150. package/useExpandable/helpers.js +0 -17
  151. package/useExpandable/helpers.js.map +0 -1
  152. package/useExpandable/index.d.ts +0 -2
  153. package/useExpandable/index.js +0 -11
  154. package/useExpandable/index.js.map +0 -1
  155. package/useExpandable/package.json +0 -1
  156. package/useExpandable/useExpandable.d.ts +0 -12
  157. package/useExpandable/useExpandable.js +0 -24
  158. package/useExpandable/useExpandable.js.map +0 -1
  159. package/useExpandable/useExpandableWithItems.d.ts +0 -2
  160. package/useExpandable/useExpandableWithItems.js +0 -33
  161. package/useExpandable/useExpandableWithItems.js.map +0 -1
  162. package/useExport/helpers.d.ts +0 -12
  163. package/useExport/helpers.js +0 -74
  164. package/useExport/helpers.js.map +0 -1
  165. package/useExport/index.d.ts +0 -2
  166. package/useExport/index.js +0 -11
  167. package/useExport/index.js.map +0 -1
  168. package/useExport/package.json +0 -1
  169. package/useExport/useExport.d.ts +0 -9
  170. package/useExport/useExport.js +0 -82
  171. package/useExport/useExport.js.map +0 -1
  172. package/useExport/useExportWithItems.d.ts +0 -2
  173. package/useExport/useExportWithItems.js +0 -23
  174. package/useExport/useExportWithItems.js.map +0 -1
  175. package/useFilterConfig/filterChipHelpers.d.ts +0 -5
  176. package/useFilterConfig/filterChipHelpers.js +0 -25
  177. package/useFilterConfig/filterChipHelpers.js.map +0 -1
  178. package/useFilterConfig/filterConfigHelpers.d.ts +0 -5
  179. package/useFilterConfig/filterConfigHelpers.js +0 -36
  180. package/useFilterConfig/filterConfigHelpers.js.map +0 -1
  181. package/useFilterConfig/filterTypeHelpers.d.ts +0 -49
  182. package/useFilterConfig/filterTypeHelpers.js +0 -92
  183. package/useFilterConfig/filterTypeHelpers.js.map +0 -1
  184. package/useFilterConfig/helpers.d.ts +0 -11
  185. package/useFilterConfig/helpers.js +0 -70
  186. package/useFilterConfig/helpers.js.map +0 -1
  187. package/useFilterConfig/index.d.ts +0 -3
  188. package/useFilterConfig/index.js +0 -22
  189. package/useFilterConfig/index.js.map +0 -1
  190. package/useFilterConfig/package.json +0 -1
  191. package/useFilterConfig/useFilterConfig.d.ts +0 -19
  192. package/useFilterConfig/useFilterConfig.js +0 -76
  193. package/useFilterConfig/useFilterConfig.js.map +0 -1
  194. package/useFilterConfig/useFilterConfigWithItems.d.ts +0 -21
  195. package/useFilterConfig/useFilterConfigWithItems.js +0 -50
  196. package/useFilterConfig/useFilterConfigWithItems.js.map +0 -1
  197. package/usePaginate/index.d.ts +0 -2
  198. package/usePaginate/index.js +0 -11
  199. package/usePaginate/index.js.map +0 -1
  200. package/usePaginate/package.json +0 -1
  201. package/usePaginate/usePaginate.d.ts +0 -20
  202. package/usePaginate/usePaginate.js +0 -45
  203. package/usePaginate/usePaginate.js.map +0 -1
  204. package/usePaginate/usePaginateWithItems.d.ts +0 -2
  205. package/usePaginate/usePaginateWithItems.js +0 -31
  206. package/usePaginate/usePaginateWithItems.js.map +0 -1
  207. package/useSelectionManager/index.d.ts +0 -1
  208. package/useSelectionManager/index.js +0 -9
  209. package/useSelectionManager/index.js.map +0 -1
  210. package/useSelectionManager/package.json +0 -1
  211. package/useSelectionManager/reducer.d.ts +0 -3
  212. package/useSelectionManager/reducer.js +0 -68
  213. package/useSelectionManager/reducer.js.map +0 -1
  214. package/useSelectionManager/useSelectionManager.d.ts +0 -10
  215. package/useSelectionManager/useSelectionManager.js +0 -51
  216. package/useSelectionManager/useSelectionManager.js.map +0 -1
  217. package/useTableSort/helpers.d.ts +0 -4
  218. package/useTableSort/helpers.js +0 -63
  219. package/useTableSort/helpers.js.map +0 -1
  220. package/useTableSort/index.d.ts +0 -3
  221. package/useTableSort/index.js +0 -22
  222. package/useTableSort/index.js.map +0 -1
  223. package/useTableSort/package.json +0 -1
  224. package/useTableSort/useTableSort.d.ts +0 -9
  225. package/useTableSort/useTableSort.js +0 -27
  226. package/useTableSort/useTableSort.js.map +0 -1
  227. package/useTableSort/useTableSortWithItems.d.ts +0 -10
  228. package/useTableSort/useTableSortWithItems.js +0 -34
  229. package/useTableSort/useTableSortWithItems.js.map +0 -1
  230. package/useTableTools/helpers.d.ts +0 -12
  231. package/useTableTools/helpers.js +0 -54
  232. package/useTableTools/helpers.js.map +0 -1
  233. package/useTableTools/index.d.ts +0 -2
  234. package/useTableTools/index.js +0 -20
  235. package/useTableTools/index.js.map +0 -1
  236. package/useTableTools/package.json +0 -1
  237. package/useTableTools/rowsBuilder.d.ts +0 -9
  238. package/useTableTools/rowsBuilder.js +0 -77
  239. package/useTableTools/rowsBuilder.js.map +0 -1
  240. package/useTableTools/useTableTools.d.ts +0 -6
  241. package/useTableTools/useTableTools.js +0 -76
  242. package/useTableTools/useTableTools.js.map +0 -1
@@ -1,146 +0,0 @@
1
- export namespace reactIcons {
2
- export { CubesIcon };
3
- export { ExclamationTriangleIcon };
4
- }
5
- export namespace reactCore {
6
- export { Badge };
7
- export { Bullseye };
8
- export { Button };
9
- export { Checkbox };
10
- export { ClipboardCopy };
11
- export { Dropdown };
12
- export { DropdownItem };
13
- export { DropdownPosition };
14
- export { DropdownToggle };
15
- export { EmptyState };
16
- export { EmptyStateBody };
17
- export { EmptyStateIcon };
18
- export { EmptyStateVariant };
19
- export { Flex };
20
- export { FlexItem };
21
- export { Grid };
22
- export { GridItem };
23
- export { KebabToggle };
24
- export { Level };
25
- export { LevelItem };
26
- export { Modal };
27
- export { Pagination };
28
- export { PaginationVariant };
29
- export { Split };
30
- export { SplitItem };
31
- export { Stack };
32
- export { StackItem };
33
- export { Spinner };
34
- export { Tab };
35
- export { Tabs };
36
- export { Title };
37
- export { Tooltip };
38
- export { Toolbar };
39
- export { ToolbarItem };
40
- export { ToolbarContent };
41
- export { ToolbarGroup };
42
- export { TextInput };
43
- export { ChipGroup };
44
- export { Chip };
45
- export { DropdownToggleCheckbox };
46
- export { Select };
47
- export { SelectOption };
48
- export { SelectVariant };
49
- export { SelectGroup };
50
- export { Radio };
51
- export { Drawer };
52
- export { DrawerPanelContent };
53
- export { DrawerContent };
54
- export { DrawerContentBody };
55
- export { DrawerPanelBody };
56
- export { DrawerActions };
57
- export { DrawerHead };
58
- export { DrawerCloseButton };
59
- export { Switch };
60
- export { Form };
61
- export { Label };
62
- export { FormGroup };
63
- export { FormSelect };
64
- export { FormSelectOption };
65
- }
66
- import { CubesIcon } from "@patternfly/react-icons/dist/esm/icons";
67
- import { ExclamationTriangleIcon } from "@patternfly/react-icons/dist/esm/icons";
68
- import { Badge } from "@patternfly/react-core/dist/esm/components/Badge/Badge";
69
- import { Bullseye } from "@patternfly/react-core/dist/esm/layouts/Bullseye/Bullseye";
70
- import { Button } from "@patternfly/react-core/dist/esm/components/Button/Button";
71
- import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox/Checkbox";
72
- import { ClipboardCopy } from "@patternfly/react-core/dist/esm/components/ClipboardCopy/ClipboardCopy";
73
- import {
74
- Dropdown
75
- } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown/Dropdown';
76
- import {
77
- DropdownItem
78
- } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown/Dropdown';
79
- import {
80
- DropdownPosition
81
- } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown/Dropdown';
82
- import {
83
- DropdownToggle
84
- } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown/Dropdown';
85
- import { EmptyState } from "@patternfly/react-core/dist/esm/components/EmptyState/EmptyState";
86
- import { EmptyStateBody } from "@patternfly/react-core/dist/esm/components/EmptyState/EmptyStateBody";
87
- import { EmptyStateIcon } from "@patternfly/react-core/dist/esm/components/EmptyState/EmptyStateIcon";
88
- import { EmptyStateVariant } from "@patternfly/react-core/dist/esm/components/EmptyState/EmptyState";
89
- import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex/Flex";
90
- import { FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex/FlexItem";
91
- import { Grid } from "@patternfly/react-core/dist/esm/layouts/Grid/Grid";
92
- import { GridItem } from "@patternfly/react-core/dist/esm/layouts/Grid/GridItem";
93
- import {
94
- KebabToggle
95
- } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown/Dropdown';
96
- import { Level } from "@patternfly/react-core/dist/esm/layouts/Level/Level";
97
- import { LevelItem } from "@patternfly/react-core/dist/esm/layouts/Level/LevelItem";
98
- import { Modal } from "@patternfly/react-core/dist/esm/components/Modal/Modal";
99
- import { Pagination } from "@patternfly/react-core/dist/esm/components/Pagination/Pagination";
100
- import { PaginationVariant } from "@patternfly/react-core/dist/esm/components/Pagination/Pagination";
101
- import { Split } from "@patternfly/react-core/dist/esm/layouts/Split/Split";
102
- import { SplitItem } from "@patternfly/react-core/dist/esm/layouts/Split/SplitItem";
103
- import { Stack } from "@patternfly/react-core/dist/esm/layouts/Stack/Stack";
104
- import { StackItem } from "@patternfly/react-core/dist/esm/layouts/Stack/StackItem";
105
- import { Spinner } from "@patternfly/react-core/dist/esm/components/Spinner/Spinner";
106
- import { Tab } from "@patternfly/react-core/dist/esm/components/Tabs/Tab";
107
- import { Tabs } from "@patternfly/react-core/dist/esm/components/Tabs/Tabs";
108
- import { Title } from "@patternfly/react-core/dist/esm/components/Title/Title";
109
- import { Tooltip } from "@patternfly/react-core/dist/esm/components/Tooltip/Tooltip";
110
- import { Toolbar } from "@patternfly/react-core/dist/esm/components/Toolbar/Toolbar";
111
- import { ToolbarItem } from "@patternfly/react-core/dist/esm/components/Toolbar/ToolbarItem";
112
- import { ToolbarContent } from "@patternfly/react-core/dist/esm/components/Toolbar/ToolbarContent";
113
- import { ToolbarGroup } from "@patternfly/react-core/dist/esm/components/Toolbar/ToolbarGroup";
114
- import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput/TextInput";
115
- import { ChipGroup } from "@patternfly/react-core/dist/esm/components/ChipGroup/ChipGroup";
116
- import { Chip } from "@patternfly/react-core/dist/esm/components/Chip/Chip";
117
- import {
118
- DropdownToggleCheckbox
119
- } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown/Dropdown';
120
- import {
121
- Select
122
- } from '@patternfly/react-core/dist/esm/deprecated/components/Select/Select';
123
- import {
124
- SelectOption
125
- } from '@patternfly/react-core/dist/esm/deprecated/components/Select/Select';
126
- import {
127
- SelectVariant
128
- } from '@patternfly/react-core/dist/esm/deprecated/components/Select/Select';
129
- import {
130
- SelectGroup
131
- } from '@patternfly/react-core/dist/esm/deprecated/components/Select/Select';
132
- import { Radio } from "@patternfly/react-core/dist/esm/components/Radio/Radio";
133
- import { Drawer } from "@patternfly/react-core/dist/esm/components/Drawer/Drawer";
134
- import { DrawerPanelContent } from "@patternfly/react-core/dist/esm/components/Drawer/DrawerPanelContent";
135
- import { DrawerContent } from "@patternfly/react-core/dist/esm/components/Drawer/DrawerContent";
136
- import { DrawerContentBody } from "@patternfly/react-core/dist/esm/components/Drawer/DrawerContentBody";
137
- import { DrawerPanelBody } from "@patternfly/react-core/dist/esm/components/Drawer/DrawerPanelBody";
138
- import { DrawerActions } from "@patternfly/react-core/dist/esm/components/Drawer/DrawerActions";
139
- import { DrawerHead } from "@patternfly/react-core/dist/esm/components/Drawer/DrawerHead";
140
- import { DrawerCloseButton } from "@patternfly/react-core/dist/esm/components/Drawer/DrawerCloseButton";
141
- import { Switch } from "@patternfly/react-core/dist/esm/components/Switch/Switch";
142
- import { Form } from "@patternfly/react-core/dist/esm/components/Form/Form";
143
- import { Label } from "@patternfly/react-core/dist/esm/components/Label/Label";
144
- import { FormGroup } from "@patternfly/react-core/dist/esm/components/Form/FormGroup";
145
- import { FormSelect } from "@patternfly/react-core/dist/esm/components/FormSelect/FormSelect";
146
- import { FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect/FormSelectOption";
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reactCore = exports.reactIcons = void 0;
4
- var react_core_1 = require("@patternfly/react-core");
5
- var react_icons_1 = require("@patternfly/react-icons");
6
- exports.reactIcons = {
7
- CubesIcon: react_icons_1.CubesIcon,
8
- ExclamationTriangleIcon: react_icons_1.ExclamationTriangleIcon,
9
- };
10
- exports.reactCore = {
11
- Badge: react_core_1.Badge,
12
- Bullseye: react_core_1.Bullseye,
13
- Button: react_core_1.Button,
14
- Checkbox: react_core_1.Checkbox,
15
- ClipboardCopy: react_core_1.ClipboardCopy,
16
- Dropdown: react_core_1.Dropdown,
17
- DropdownItem: react_core_1.DropdownItem,
18
- DropdownPosition: react_core_1.DropdownPosition,
19
- DropdownToggle: react_core_1.DropdownToggle,
20
- EmptyState: react_core_1.EmptyState,
21
- EmptyStateBody: react_core_1.EmptyStateBody,
22
- EmptyStateIcon: react_core_1.EmptyStateIcon,
23
- EmptyStateVariant: react_core_1.EmptyStateVariant,
24
- Flex: react_core_1.Flex,
25
- FlexItem: react_core_1.FlexItem,
26
- Grid: react_core_1.Grid,
27
- GridItem: react_core_1.GridItem,
28
- KebabToggle: react_core_1.KebabToggle,
29
- Level: react_core_1.Level,
30
- LevelItem: react_core_1.LevelItem,
31
- Modal: react_core_1.Modal,
32
- Pagination: react_core_1.Pagination,
33
- PaginationVariant: react_core_1.PaginationVariant,
34
- Split: react_core_1.Split,
35
- SplitItem: react_core_1.SplitItem,
36
- Stack: react_core_1.Stack,
37
- StackItem: react_core_1.StackItem,
38
- Spinner: react_core_1.Spinner,
39
- Tab: react_core_1.Tab,
40
- Tabs: react_core_1.Tabs,
41
- Title: react_core_1.Title,
42
- Tooltip: react_core_1.Tooltip,
43
- Toolbar: react_core_1.Toolbar,
44
- ToolbarItem: react_core_1.ToolbarItem,
45
- ToolbarContent: react_core_1.ToolbarContent,
46
- ToolbarGroup: react_core_1.ToolbarGroup,
47
- TextInput: react_core_1.TextInput,
48
- ChipGroup: react_core_1.ChipGroup,
49
- Chip: react_core_1.Chip,
50
- DropdownToggleCheckbox: react_core_1.DropdownToggleCheckbox,
51
- Select: react_core_1.Select,
52
- SelectOption: react_core_1.SelectOption,
53
- SelectVariant: react_core_1.SelectVariant,
54
- SelectGroup: react_core_1.SelectGroup,
55
- Radio: react_core_1.Radio,
56
- Drawer: react_core_1.Drawer,
57
- DrawerPanelContent: react_core_1.DrawerPanelContent,
58
- DrawerContent: react_core_1.DrawerContent,
59
- DrawerContentBody: react_core_1.DrawerContentBody,
60
- DrawerPanelBody: react_core_1.DrawerPanelBody,
61
- DrawerActions: react_core_1.DrawerActions,
62
- DrawerHead: react_core_1.DrawerHead,
63
- DrawerCloseButton: react_core_1.DrawerCloseButton,
64
- Switch: react_core_1.Switch,
65
- Form: react_core_1.Form,
66
- Label: react_core_1.Label,
67
- FormGroup: react_core_1.FormGroup,
68
- FormSelect: react_core_1.FormSelect,
69
- FormSelectOption: react_core_1.FormSelectOption,
70
- };
71
- //# sourceMappingURL=inventoryDependencies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inventoryDependencies.js","sourceRoot":"","sources":["../src/inventoryDependencies/inventoryDependencies.js"],"names":[],"mappings":";;;AAGA,qDA4DgC;AAEhC,uDAA6E;AAEhE,QAAA,UAAU,GAAG;IACxB,SAAS,yBAAA;IACT,uBAAuB,uCAAA;CACxB,CAAC;AAEW,QAAA,SAAS,GAAG;IACvB,KAAK,oBAAA;IACL,QAAQ,uBAAA;IACR,MAAM,qBAAA;IACN,QAAQ,uBAAA;IACR,aAAa,4BAAA;IACb,QAAQ,uBAAA;IACR,YAAY,2BAAA;IACZ,gBAAgB,+BAAA;IAChB,cAAc,6BAAA;IACd,UAAU,yBAAA;IACV,cAAc,6BAAA;IACd,cAAc,6BAAA;IACd,iBAAiB,gCAAA;IACjB,IAAI,mBAAA;IACJ,QAAQ,uBAAA;IACR,IAAI,mBAAA;IACJ,QAAQ,uBAAA;IACR,WAAW,0BAAA;IACX,KAAK,oBAAA;IACL,SAAS,wBAAA;IACT,KAAK,oBAAA;IACL,UAAU,yBAAA;IACV,iBAAiB,gCAAA;IACjB,KAAK,oBAAA;IACL,SAAS,wBAAA;IACT,KAAK,oBAAA;IACL,SAAS,wBAAA;IACT,OAAO,sBAAA;IACP,GAAG,kBAAA;IACH,IAAI,mBAAA;IACJ,KAAK,oBAAA;IACL,OAAO,sBAAA;IACP,OAAO,sBAAA;IACP,WAAW,0BAAA;IACX,cAAc,6BAAA;IACd,YAAY,2BAAA;IACZ,SAAS,wBAAA;IACT,SAAS,wBAAA;IACT,IAAI,mBAAA;IACJ,sBAAsB,qCAAA;IACtB,MAAM,qBAAA;IACN,YAAY,2BAAA;IACZ,aAAa,4BAAA;IACb,WAAW,0BAAA;IACX,KAAK,oBAAA;IACL,MAAM,qBAAA;IACN,kBAAkB,iCAAA;IAClB,aAAa,4BAAA;IACb,iBAAiB,gCAAA;IACjB,eAAe,8BAAA;IACf,aAAa,4BAAA;IACb,UAAU,yBAAA;IACV,iBAAiB,gCAAA;IACjB,MAAM,qBAAA;IACN,IAAI,mBAAA;IACJ,KAAK,oBAAA;IACL,SAAS,wBAAA;IACT,UAAU,yBAAA;IACV,gBAAgB,+BAAA;CACjB,CAAC"}
@@ -1 +0,0 @@
1
- {"main":"index.js","module":"../esm/inventoryDependencies/index.js","typings":"index.d.ts"}
@@ -1,6 +0,0 @@
1
- export function compileTitle(itemsTotal: any, titleOption: any): any;
2
- export function checkboxState(selectedItemsTotal: any, itemsTotal: any): boolean | null;
3
- export function selectOrUnselect(selected: any): "Unselect" | "Select";
4
- export function checkCurrentPageSelected(items: any, selectedItems: any): boolean;
5
- export function itemIds(items: any): any;
6
- export function selectItemTransformer(item: any, selectedIds?: any[]): any;
@@ -1,66 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.selectItemTransformer = exports.itemIds = exports.checkCurrentPageSelected = exports.selectOrUnselect = exports.checkboxState = exports.compileTitle = void 0;
15
- var compileTitle = function (itemsTotal, titleOption) {
16
- if (typeof titleOption === 'string') {
17
- return titleOption;
18
- }
19
- else if (typeof titleOption === 'function') {
20
- return titleOption(itemsTotal);
21
- }
22
- else {
23
- return "".concat(itemsTotal, " selected");
24
- }
25
- };
26
- exports.compileTitle = compileTitle;
27
- var checkboxState = function (selectedItemsTotal, itemsTotal) {
28
- if (selectedItemsTotal === 0) {
29
- return false;
30
- }
31
- else if (selectedItemsTotal === itemsTotal) {
32
- return true;
33
- }
34
- else {
35
- return null;
36
- }
37
- };
38
- exports.checkboxState = checkboxState;
39
- var selectOrUnselect = function (selected) { return (selected ? 'Unselect' : 'Select'); };
40
- exports.selectOrUnselect = selectOrUnselect;
41
- var allItemsIncluded = function (items, selection) {
42
- if (selection === void 0) { selection = []; }
43
- return items.filter(function (item) { return selection.includes(item); }).length === items.length;
44
- };
45
- var checkCurrentPageSelected = function (items, selectedItems) {
46
- if (selectedItems.length === 0) {
47
- return false;
48
- }
49
- else {
50
- return allItemsIncluded(items, selectedItems);
51
- }
52
- };
53
- exports.checkCurrentPageSelected = checkCurrentPageSelected;
54
- var itemIds = function (items) { return items.map(function (_a) {
55
- var itemId = _a.itemId;
56
- return itemId;
57
- }); };
58
- exports.itemIds = itemIds;
59
- var selectItemTransformer = function (item, selectedIds) {
60
- if (selectedIds === void 0) { selectedIds = []; }
61
- return (__assign(__assign({}, item), { rowProps: {
62
- selected: selectedIds.includes(item.itemId),
63
- } }));
64
- };
65
- exports.selectItemTransformer = selectItemTransformer;
66
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/useBulkSelect/helpers.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAO,IAAM,YAAY,GAAG,UAAC,UAAU,EAAE,WAAW;IAClD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,OAAO,WAAW,CAAC;KACpB;SAAM,IAAI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CAAC,EAAjC,CAAiC,CAAC;AAAvD,QAAA,OAAO,WAAgD;AAE7D,IAAM,qBAAqB,GAAG,UAAC,IAAI,EAAE,WAAgB;IAAhB,4BAAA,EAAA,gBAAgB;IAAK,OAAA,uBAC5D,IAAI,KACP,QAAQ,EAAE;YACR,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;SAC5C,IACD;AAL+D,CAK/D,CAAC;AALU,QAAA,qBAAqB,yBAK/B"}
@@ -1,2 +0,0 @@
1
- export { default } from "./useBulkSelect";
2
- export { default as useBulkSelectWithItems } from "./useBulkSelectWithItems";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useBulkSelectWithItems = exports.default = void 0;
7
- var useBulkSelect_1 = require("./useBulkSelect");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(useBulkSelect_1).default; } });
9
- var useBulkSelectWithItems_1 = require("./useBulkSelectWithItems");
10
- Object.defineProperty(exports, "useBulkSelectWithItems", { enumerable: true, get: function () { return __importDefault(useBulkSelectWithItems_1).default; } });
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/useBulkSelect/index.js"],"names":[],"mappings":";;;;;;AAAA,iDAA0C;AAAjC,yHAAA,OAAO,OAAA;AAChB,mEAA6E;AAApE,iJAAA,OAAO,OAA0B"}
@@ -1 +0,0 @@
1
- {"main":"index.js","module":"../esm/useBulkSelect/index.js","typings":"index.d.ts"}
@@ -1,5 +0,0 @@
1
- export default useBulkSelect;
2
- declare function useBulkSelect({ total, onSelect, preselected, itemIdsInTable, itemIdsOnPage, identifier }: number): {
3
- selectedIds: array;
4
- selectNone: Function;
5
- };
@@ -1,136 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var react_1 = require("react");
40
- var helpers_1 = require("../helpers/");
41
- var helpers_2 = require("./helpers");
42
- var useBulkSelect = function (_a) {
43
- var total = _a.total, onSelect = _a.onSelect, preselected = _a.preselected, itemIdsInTable = _a.itemIdsInTable, itemIdsOnPage = _a.itemIdsOnPage, _b = _a.identifier, identifier = _b === void 0 ? 'id' : _b;
44
- var enableBulkSelect = !!onSelect;
45
- var _c = (0, react_1.useState)(preselected || []), selectedIds = _c[0], setSelectedItemIds = _c[1];
46
- var selectedIdsTotal = (selectedIds || []).length;
47
- var paginatedTotal = itemIdsOnPage().length;
48
- var allSelected = selectedIdsTotal === total;
49
- var noneSelected = selectedIdsTotal === 0;
50
- var currentPageSelected = (0, helpers_2.checkCurrentPageSelected)(itemIdsOnPage(), selectedIds || []);
51
- var isDisabled = total === 0;
52
- var checked = (0, helpers_2.checkboxState)(selectedIdsTotal, total);
53
- var title = (0, helpers_2.compileTitle)(selectedIdsTotal);
54
- var onSelectCallback = function (func) { return __awaiter(void 0, void 0, void 0, function () {
55
- var newSelectedItemsIds;
56
- return __generator(this, function (_a) {
57
- switch (_a.label) {
58
- case 0: return [4, func()];
59
- case 1:
60
- newSelectedItemsIds = _a.sent();
61
- setSelectedItemIds(newSelectedItemsIds);
62
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(newSelectedItemsIds);
63
- return [2];
64
- }
65
- });
66
- }); };
67
- var selectItems = function (itemIds) { return (0, helpers_1.mergeArraysUniqly)(selectedIds, itemIds); };
68
- var unselectItems = function (itemIds) { return selectedIds.filter(function (itemId) { return !itemIds.includes(itemId); }); };
69
- var unselectAll = function () { return []; };
70
- var selectNone = function () { return onSelectCallback(unselectAll); };
71
- var selectOne = function (_, selected, key, row) {
72
- return onSelectCallback(function () { return (selected ? selectItems([row === null || row === void 0 ? void 0 : row[identifier]]) : unselectItems([row === null || row === void 0 ? void 0 : row[identifier]])); });
73
- };
74
- var selectPage = function () {
75
- return onSelectCallback(function () {
76
- var currentPageIds = itemIdsOnPage();
77
- var currentPageSelected = (0, helpers_1.mergeArraysUniqly)(selectedIds, currentPageIds).length === selectedIds.length;
78
- return currentPageSelected ? unselectItems(currentPageIds) : selectItems(currentPageIds);
79
- });
80
- };
81
- var selectAll = function () { return onSelectCallback(function () { return __awaiter(void 0, void 0, void 0, function () { var _a, _b; return __generator(this, function (_c) {
82
- switch (_c.label) {
83
- case 0:
84
- if (!allSelected) return [3, 1];
85
- _a = unselectAll();
86
- return [3, 3];
87
- case 1:
88
- _b = selectItems;
89
- return [4, itemIdsInTable()];
90
- case 2:
91
- _a = _b.apply(void 0, [_c.sent()]);
92
- _c.label = 3;
93
- case 3: return [2, (_a)];
94
- }
95
- }); }); }); };
96
- (0, react_1.useEffect)(function () {
97
- setSelectedItemIds(preselected);
98
- }, [preselected]);
99
- return enableBulkSelect
100
- ? {
101
- selectedIds: selectedIds,
102
- selectNone: selectNone,
103
- tableProps: {
104
- onSelect: total > 0 ? selectOne : undefined,
105
- canSelectAll: false,
106
- },
107
- toolbarProps: {
108
- bulkSelect: {
109
- toggleProps: { children: [title] },
110
- isDisabled: isDisabled,
111
- items: [
112
- {
113
- title: 'Select none',
114
- onClick: selectNone,
115
- props: {
116
- isDisabled: noneSelected,
117
- },
118
- },
119
- {
120
- title: "".concat((0, helpers_2.selectOrUnselect)(currentPageSelected), " page (").concat(paginatedTotal, " items)"),
121
- onClick: selectPage,
122
- },
123
- {
124
- title: "".concat((0, helpers_2.selectOrUnselect)(allSelected), " all (").concat(total, " items)"),
125
- onClick: selectAll,
126
- },
127
- ],
128
- checked: checked,
129
- onSelect: !isDisabled ? selectPage : undefined,
130
- },
131
- },
132
- }
133
- : {};
134
- };
135
- exports.default = useBulkSelect;
136
- //# sourceMappingURL=useBulkSelect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useB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export default useBulkSelectWithItems;
2
- declare function useBulkSelectWithItems({ onSelect, items: propItems, filter, paginator, preselected, setPage }: {
3
- onSelect: any;
4
- items: any;
5
- filter: any;
6
- paginator: any;
7
- preselected: any;
8
- setPage: any;
9
- }): {};
@@ -1,62 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- var react_1 = require("react");
29
- var helpers_1 = require("../useTableTools/helpers");
30
- var helpers_2 = require("./helpers");
31
- var useBulkSelect_1 = __importDefault(require("./useBulkSelect"));
32
- var useBulkSelectWithItems = function (_a) {
33
- var _b, _c;
34
- var onSelect = _a.onSelect, propItems = _a.items, filter = _a.filter, paginator = _a.paginator, preselected = _a.preselected, setPage = _a.setPage;
35
- var enableBulkSelect = !!onSelect;
36
- var items = propItems.map(function (item) { return (0, helpers_2.selectItemTransformer)(item, preselected); });
37
- var total = items.length;
38
- var filteredItems = (_b = filter === null || filter === void 0 ? void 0 : filter(items)) !== null && _b !== void 0 ? _b : items;
39
- var filteredTotal = filteredItems.length;
40
- var filtered = filteredTotal !== total;
41
- var paginatedItems = (_c = paginator === null || paginator === void 0 ? void 0 : paginator(filteredItems)) !== null && _c !== void 0 ? _c : filteredItems;
42
- var paginatedTotal = paginatedItems.length;
43
- var allCount = filteredTotal !== null && filteredTotal !== void 0 ? filteredTotal : total;
44
- var setPageMemo = (0, react_1.useMemo)(function () { return setPage; }, []);
45
- (0, react_1.useEffect)(function () {
46
- if (paginatedTotal === 0) {
47
- setPageMemo(-1);
48
- }
49
- }, [paginatedTotal, setPageMemo]);
50
- var _d = (0, useBulkSelect_1.default)({
51
- total: allCount,
52
- onSelect: onSelect,
53
- preselected: preselected,
54
- itemIdsInTable: function () { return (filtered ? (0, helpers_2.itemIds)(filteredItems) : (0, helpers_2.itemIds)(items)); },
55
- itemIdsOnPage: function () { return (0, helpers_2.itemIds)(paginatedItems); },
56
- identifier: 'itemId',
57
- }), selectNone = _d.selectNone, selectedIds = _d.selectedIds, bulkSelect = __rest(_d, ["selectNone", "selectedIds"]);
58
- return enableBulkSelect
59
- ? __assign({ transformer: function (item) { return (0, helpers_2.selectItemTransformer)(item, selectedIds); }, selectedItems: (0, helpers_1.filterSelected)(items, selectedIds), selected: selectedIds, clearSelection: selectNone }, bulkSelect) : {};
60
- };
61
- exports.default = useBulkSelectWithItems;
62
- //# sourceMappingURL=useBulkSelectWithItems.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBulkSelectWithItems.js","sourceRoot":"","sources":["../src/useBulkSelect/useBulkSelectWithItems.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA2C;AAC3C,oDAA0D;AAC1D,qCAA2D;AAC3D,kEAA4C;AAE5C,IAAM,sBAAsB,GAAG,UAAC,EAAuE;;QAArE,QAAQ,cAAA,EAAS,SAAS,WAAA,EAAE,MAAM,YAAA,EAAE,SAAS,eAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA;IACnG,IAAM,gBAAgB,GAAG,CAAC,CAAC,QAAQ,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U,EAAE,QAAQ;KACrB,CAAC,EAPM,UAAU,gBAAA,EAAE,WAAW,iBAAA,EAAK,UAAU,cAAxC,6BAA0C,CAO9C,CAAC;IAEH,OAAO,gBAAgB;QACrB,CAAC,YACG,WAAW,EAAE,UAAC,IAAI,IAAK,OAAA,IAAA,+BAAqB,EAAC,IAAI,EAAE,WAAW,CAAC,EAAxC,CAAwC,EAC/D,aAAa,EAAE,IAAA,wBAAc,EAAC,KAAK,EAAE,WAAW,CAAC,EACjD,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,UAAU,IACvB,UAAU,EAEjB,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC;AAEF,kBAAe,sBAAsB,CAAC"}
@@ -1,2 +0,0 @@
1
- export function filterColumnsBySelected(columns: any, selected: any, selectProp: any): any;
2
- export function filterManageableColumns(columns: any, prop: any): any;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.filterManageableColumns = exports.filterColumnsBySelected = void 0;
18
- var get_1 = __importDefault(require("lodash/get"));
19
- var filterColumnsBySelected = function (columns, selected, selectProp) { return columns.filter(function (column) { return selected.includes((0, get_1.default)(column, selectProp)); }); };
20
- exports.filterColumnsBySelected = filterColumnsBySelected;
21
- var managableColumns = function (columns) {
22
- return columns.map(function (column) { return ((column === null || column === void 0 ? void 0 : column.managable) === undefined ? __assign(__assign({}, column), { managable: true }) : column); }).filter(function (column) { return column.managable === true; });
23
- };
24
- var filterManageableColumns = function (columns, prop) { return managableColumns(columns.filter(function (column) { return column[prop] !== undefined; })); };
25
- exports.filterManageableColumns = filterManageableColumns;
26
- //# sourceMappingURL=helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/useColumnManager/helper.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAA6B;AAEtB,IAAM,uBAAuB,GAAG,UAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,UAAC,MAAM,IAAK,OAAA,QAAQ,CAAC,QAAQ,CAAC,IAAA,aAAG,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EAA1C,CAA0C,CAAC,EAAtE,CAAsE,CAAC;AAApI,QAAA,uBAAuB,2BAA6G;AAEjJ,IAAM,gBAAgB,GAAG,UAAC,OAAO;IAC/B,OAAA,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,MAAK,SAAS,CAAC,CAAC,uBAAM,MAAM,KAAE,SAAS,EAAE,IAAI,IAAG,CAAC,CAAC,MAAM,CAAC,EAA3E,CAA2E,CAAC,CAAC,MAAM,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,SAAS,KAAK,IAAI,EAAzB,CAAyB,CAAC;AAAlJ,CAAkJ,CAAC;AAE9I,IAAM,uBAAuB,GAAG,UAAC,OAAO,EAAE,IAAI,IAAK,OAAA,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS,EAA1B,CAA0B,CAAC,CAAC,EAAxE,CAAwE,CAAC;AAAtH,QAAA,uBAAuB,2BAA+F"}
@@ -1 +0,0 @@
1
- export { default } from "./useColumnManager";
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var useColumnManager_1 = require("./useColumnManager");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(useColumnManager_1).default; } });
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/useColumnManager/index.js"],"names":[],"mappings":";;;;;;AAAA,uDAA6C;AAApC,4HAAA,OAAO,OAAA"}
@@ -1 +0,0 @@
1
- {"main":"index.js","module":"../esm/useColumnManager/index.js","typings":"index.d.ts"}
@@ -1,13 +0,0 @@
1
- export default useColumnManager;
2
- declare function useColumnManager(columns?: any[], options?: Object | undefined): {
3
- columns: any;
4
- columnManagerAction: {
5
- label: any;
6
- onClick: () => void;
7
- };
8
- ColumnManager: () => JSX.Element;
9
- } | {
10
- columns: any[];
11
- columnManagerAction?: undefined;
12
- ColumnManager?: undefined;
13
- };