@patternfly/react-table 5.0.0-alpha.45 → 5.0.0-alpha.47

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 (288) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/components/index.d.ts +2 -2
  3. package/components/index.d.ts.map +1 -1
  4. package/components/index.js +2 -2
  5. package/components/index.js.map +1 -1
  6. package/deprecated/index.d.ts +1 -1
  7. package/deprecated/index.d.ts.map +1 -1
  8. package/deprecated/index.js +1 -1
  9. package/deprecated/index.js.map +1 -1
  10. package/package.json +4 -4
  11. package/scripts/createSubpaths.js +32 -0
  12. package/components/Table/ActionsColumn.d.ts +0 -26
  13. package/components/Table/ActionsColumn.d.ts.map +0 -1
  14. package/components/Table/ActionsColumn.js +0 -57
  15. package/components/Table/ActionsColumn.js.map +0 -1
  16. package/components/Table/Body.d.ts +0 -30
  17. package/components/Table/Body.d.ts.map +0 -1
  18. package/components/Table/Body.js +0 -115
  19. package/components/Table/Body.js.map +0 -1
  20. package/components/Table/BodyCell.d.ts +0 -26
  21. package/components/Table/BodyCell.d.ts.map +0 -1
  22. package/components/Table/BodyCell.js +0 -40
  23. package/components/Table/BodyCell.js.map +0 -1
  24. package/components/Table/BodyWrapper.d.ts +0 -12
  25. package/components/Table/BodyWrapper.d.ts.map +0 -1
  26. package/components/Table/BodyWrapper.js +0 -17
  27. package/components/Table/BodyWrapper.js.map +0 -1
  28. package/components/Table/CollapseColumn.d.ts +0 -11
  29. package/components/Table/CollapseColumn.d.ts.map +0 -1
  30. package/components/Table/CollapseColumn.js +0 -16
  31. package/components/Table/CollapseColumn.js.map +0 -1
  32. package/components/Table/DraggableCell.d.ts +0 -9
  33. package/components/Table/DraggableCell.d.ts.map +0 -1
  34. package/components/Table/DraggableCell.js +0 -11
  35. package/components/Table/DraggableCell.js.map +0 -1
  36. package/components/Table/DraggableRowWrapper.d.ts +0 -4
  37. package/components/Table/DraggableRowWrapper.d.ts.map +0 -1
  38. package/components/Table/DraggableRowWrapper.js +0 -15
  39. package/components/Table/DraggableRowWrapper.js.map +0 -1
  40. package/components/Table/EditColumn.d.ts +0 -14
  41. package/components/Table/EditColumn.d.ts.map +0 -1
  42. package/components/Table/EditColumn.js +0 -28
  43. package/components/Table/EditColumn.js.map +0 -1
  44. package/components/Table/EditableSelectInputCell.d.ts +0 -27
  45. package/components/Table/EditableSelectInputCell.d.ts.map +0 -1
  46. package/components/Table/EditableSelectInputCell.js +0 -21
  47. package/components/Table/EditableSelectInputCell.js.map +0 -1
  48. package/components/Table/EditableTextCell.d.ts +0 -20
  49. package/components/Table/EditableTextCell.d.ts.map +0 -1
  50. package/components/Table/EditableTextCell.js +0 -14
  51. package/components/Table/EditableTextCell.js.map +0 -1
  52. package/components/Table/ExpandableRowContent.d.ts +0 -7
  53. package/components/Table/ExpandableRowContent.d.ts.map +0 -1
  54. package/components/Table/ExpandableRowContent.js +0 -10
  55. package/components/Table/ExpandableRowContent.js.map +0 -1
  56. package/components/Table/FavoritesCell.d.ts +0 -10
  57. package/components/Table/FavoritesCell.d.ts.map +0 -1
  58. package/components/Table/FavoritesCell.js +0 -17
  59. package/components/Table/FavoritesCell.js.map +0 -1
  60. package/components/Table/Header.d.ts +0 -7
  61. package/components/Table/Header.d.ts.map +0 -1
  62. package/components/Table/Header.js +0 -14
  63. package/components/Table/Header.js.map +0 -1
  64. package/components/Table/HeaderCell.d.ts +0 -15
  65. package/components/Table/HeaderCell.d.ts.map +0 -1
  66. package/components/Table/HeaderCell.js +0 -13
  67. package/components/Table/HeaderCell.js.map +0 -1
  68. package/components/Table/HeaderCellInfoWrapper.d.ts +0 -34
  69. package/components/Table/HeaderCellInfoWrapper.d.ts.map +0 -1
  70. package/components/Table/HeaderCellInfoWrapper.js +0 -15
  71. package/components/Table/HeaderCellInfoWrapper.js.map +0 -1
  72. package/components/Table/RowWrapper.d.ts +0 -38
  73. package/components/Table/RowWrapper.d.ts.map +0 -1
  74. package/components/Table/RowWrapper.js +0 -67
  75. package/components/Table/RowWrapper.js.map +0 -1
  76. package/components/Table/SelectColumn.d.ts +0 -14
  77. package/components/Table/SelectColumn.d.ts.map +0 -1
  78. package/components/Table/SelectColumn.js +0 -18
  79. package/components/Table/SelectColumn.js.map +0 -1
  80. package/components/Table/SortColumn.d.ts +0 -14
  81. package/components/Table/SortColumn.d.ts.map +0 -1
  82. package/components/Table/SortColumn.js +0 -30
  83. package/components/Table/SortColumn.js.map +0 -1
  84. package/components/Table/Table.d.ts +0 -119
  85. package/components/Table/Table.d.ts.map +0 -1
  86. package/components/Table/Table.js +0 -125
  87. package/components/Table/Table.js.map +0 -1
  88. package/components/Table/TableContext.d.ts +0 -9
  89. package/components/Table/TableContext.d.ts.map +0 -1
  90. package/components/Table/TableContext.js +0 -7
  91. package/components/Table/TableContext.js.map +0 -1
  92. package/components/Table/TableText.d.ts +0 -31
  93. package/components/Table/TableText.d.ts.map +0 -1
  94. package/components/Table/TableText.js +0 -37
  95. package/components/Table/TableText.js.map +0 -1
  96. package/components/Table/TableTypes.d.ts +0 -201
  97. package/components/Table/TableTypes.d.ts.map +0 -1
  98. package/components/Table/TableTypes.js +0 -14
  99. package/components/Table/TableTypes.js.map +0 -1
  100. package/components/Table/TreeRowWrapper.d.ts +0 -4
  101. package/components/Table/TreeRowWrapper.d.ts.map +0 -1
  102. package/components/Table/TreeRowWrapper.js +0 -15
  103. package/components/Table/TreeRowWrapper.js.map +0 -1
  104. package/components/Table/base/body-row.d.ts +0 -19
  105. package/components/Table/base/body-row.d.ts.map +0 -1
  106. package/components/Table/base/body-row.js +0 -59
  107. package/components/Table/base/body-row.js.map +0 -1
  108. package/components/Table/base/body.d.ts +0 -13
  109. package/components/Table/base/body.d.ts.map +0 -1
  110. package/components/Table/base/body.js +0 -61
  111. package/components/Table/base/body.js.map +0 -1
  112. package/components/Table/base/columns-are-equal.d.ts +0 -7
  113. package/components/Table/base/columns-are-equal.d.ts.map +0 -1
  114. package/components/Table/base/columns-are-equal.js +0 -20
  115. package/components/Table/base/columns-are-equal.js.map +0 -1
  116. package/components/Table/base/evaluate-formatters.d.ts +0 -12
  117. package/components/Table/base/evaluate-formatters.d.ts.map +0 -1
  118. package/components/Table/base/evaluate-formatters.js +0 -10
  119. package/components/Table/base/evaluate-formatters.js.map +0 -1
  120. package/components/Table/base/evaluate-transforms.d.ts +0 -8
  121. package/components/Table/base/evaluate-transforms.d.ts.map +0 -1
  122. package/components/Table/base/evaluate-transforms.js +0 -24
  123. package/components/Table/base/evaluate-transforms.js.map +0 -1
  124. package/components/Table/base/header-row.d.ts +0 -16
  125. package/components/Table/base/header-row.d.ts.map +0 -1
  126. package/components/Table/base/header-row.js +0 -68
  127. package/components/Table/base/header-row.js.map +0 -1
  128. package/components/Table/base/header.d.ts +0 -18
  129. package/components/Table/base/header.d.ts.map +0 -1
  130. package/components/Table/base/header.js +0 -27
  131. package/components/Table/base/header.js.map +0 -1
  132. package/components/Table/base/index.d.ts +0 -11
  133. package/components/Table/base/index.d.ts.map +0 -1
  134. package/components/Table/base/index.js +0 -11
  135. package/components/Table/base/index.js.map +0 -1
  136. package/components/Table/base/merge-props.d.ts +0 -5
  137. package/components/Table/base/merge-props.d.ts.map +0 -1
  138. package/components/Table/base/merge-props.js +0 -40
  139. package/components/Table/base/merge-props.js.map +0 -1
  140. package/components/Table/base/provider.d.ts +0 -43
  141. package/components/Table/base/provider.d.ts.map +0 -1
  142. package/components/Table/base/provider.js +0 -38
  143. package/components/Table/base/provider.js.map +0 -1
  144. package/components/Table/base/resolve-row-key.d.ts +0 -16
  145. package/components/Table/base/resolve-row-key.d.ts.map +0 -1
  146. package/components/Table/base/resolve-row-key.js +0 -26
  147. package/components/Table/base/resolve-row-key.js.map +0 -1
  148. package/components/Table/base/types.d.ts +0 -243
  149. package/components/Table/base/types.d.ts.map +0 -1
  150. package/components/Table/base/types.js +0 -29
  151. package/components/Table/base/types.js.map +0 -1
  152. package/components/Table/index.d.ts +0 -23
  153. package/components/Table/index.d.ts.map +0 -1
  154. package/components/Table/index.js +0 -23
  155. package/components/Table/index.js.map +0 -1
  156. package/components/Table/utils/decorators/cellActions.d.ts +0 -3
  157. package/components/Table/utils/decorators/cellActions.d.ts.map +0 -1
  158. package/components/Table/utils/decorators/cellActions.js +0 -22
  159. package/components/Table/utils/decorators/cellActions.js.map +0 -1
  160. package/components/Table/utils/decorators/cellWidth.d.ts +0 -3
  161. package/components/Table/utils/decorators/cellWidth.d.ts.map +0 -1
  162. package/components/Table/utils/decorators/cellWidth.js +0 -7
  163. package/components/Table/utils/decorators/cellWidth.js.map +0 -1
  164. package/components/Table/utils/decorators/classNames.d.ts +0 -17
  165. package/components/Table/utils/decorators/classNames.d.ts.map +0 -1
  166. package/components/Table/utils/decorators/classNames.js +0 -26
  167. package/components/Table/utils/decorators/classNames.js.map +0 -1
  168. package/components/Table/utils/decorators/collapsible.d.ts +0 -5
  169. package/components/Table/utils/decorators/collapsible.d.ts.map +0 -1
  170. package/components/Table/utils/decorators/collapsible.js +0 -48
  171. package/components/Table/utils/decorators/collapsible.js.map +0 -1
  172. package/components/Table/utils/decorators/compoundExpand.d.ts +0 -3
  173. package/components/Table/utils/decorators/compoundExpand.d.ts.map +0 -1
  174. package/components/Table/utils/decorators/compoundExpand.js +0 -30
  175. package/components/Table/utils/decorators/compoundExpand.js.map +0 -1
  176. package/components/Table/utils/decorators/draggable.d.ts +0 -3
  177. package/components/Table/utils/decorators/draggable.d.ts.map +0 -1
  178. package/components/Table/utils/decorators/draggable.js +0 -10
  179. package/components/Table/utils/decorators/draggable.js.map +0 -1
  180. package/components/Table/utils/decorators/editable.d.ts +0 -3
  181. package/components/Table/utils/decorators/editable.d.ts.map +0 -1
  182. package/components/Table/utils/decorators/editable.js +0 -75
  183. package/components/Table/utils/decorators/editable.js.map +0 -1
  184. package/components/Table/utils/decorators/favoritable.d.ts +0 -3
  185. package/components/Table/utils/decorators/favoritable.d.ts.map +0 -1
  186. package/components/Table/utils/decorators/favoritable.js +0 -34
  187. package/components/Table/utils/decorators/favoritable.js.map +0 -1
  188. package/components/Table/utils/decorators/headerCol.d.ts +0 -3
  189. package/components/Table/utils/decorators/headerCol.d.ts.map +0 -1
  190. package/components/Table/utils/decorators/headerCol.js +0 -12
  191. package/components/Table/utils/decorators/headerCol.js.map +0 -1
  192. package/components/Table/utils/decorators/index.d.ts +0 -15
  193. package/components/Table/utils/decorators/index.d.ts.map +0 -1
  194. package/components/Table/utils/decorators/index.js +0 -15
  195. package/components/Table/utils/decorators/index.js.map +0 -1
  196. package/components/Table/utils/decorators/info.d.ts +0 -4
  197. package/components/Table/utils/decorators/info.d.ts.map +0 -1
  198. package/components/Table/utils/decorators/info.js +0 -11
  199. package/components/Table/utils/decorators/info.js.map +0 -1
  200. package/components/Table/utils/decorators/selectable.d.ts +0 -3
  201. package/components/Table/utils/decorators/selectable.d.ts.map +0 -1
  202. package/components/Table/utils/decorators/selectable.js +0 -56
  203. package/components/Table/utils/decorators/selectable.js.map +0 -1
  204. package/components/Table/utils/decorators/sortable.d.ts +0 -4
  205. package/components/Table/utils/decorators/sortable.d.ts.map +0 -1
  206. package/components/Table/utils/decorators/sortable.js +0 -45
  207. package/components/Table/utils/decorators/sortable.js.map +0 -1
  208. package/components/Table/utils/decorators/textCenter.d.ts +0 -3
  209. package/components/Table/utils/decorators/textCenter.d.ts.map +0 -1
  210. package/components/Table/utils/decorators/textCenter.js +0 -2
  211. package/components/Table/utils/decorators/textCenter.js.map +0 -1
  212. package/components/Table/utils/decorators/treeRow.d.ts +0 -8
  213. package/components/Table/utils/decorators/treeRow.d.ts.map +0 -1
  214. package/components/Table/utils/decorators/treeRow.js +0 -35
  215. package/components/Table/utils/decorators/treeRow.js.map +0 -1
  216. package/components/Table/utils/decorators/wrappable.d.ts +0 -7
  217. package/components/Table/utils/decorators/wrappable.d.ts.map +0 -1
  218. package/components/Table/utils/decorators/wrappable.js +0 -17
  219. package/components/Table/utils/decorators/wrappable.js.map +0 -1
  220. package/components/Table/utils/formatters.d.ts +0 -4
  221. package/components/Table/utils/formatters.d.ts.map +0 -1
  222. package/components/Table/utils/formatters.js +0 -3
  223. package/components/Table/utils/formatters.js.map +0 -1
  224. package/components/Table/utils/headerUtils.d.ts +0 -54
  225. package/components/Table/utils/headerUtils.d.ts.map +0 -1
  226. package/components/Table/utils/headerUtils.js +0 -221
  227. package/components/Table/utils/headerUtils.js.map +0 -1
  228. package/components/Table/utils/index.d.ts +0 -6
  229. package/components/Table/utils/index.d.ts.map +0 -1
  230. package/components/Table/utils/index.js +0 -6
  231. package/components/Table/utils/index.js.map +0 -1
  232. package/components/Table/utils/transformers.d.ts +0 -7
  233. package/components/Table/utils/transformers.d.ts.map +0 -1
  234. package/components/Table/utils/transformers.js +0 -12
  235. package/components/Table/utils/transformers.js.map +0 -1
  236. package/components/Table/utils/utils.d.ts +0 -12
  237. package/components/Table/utils/utils.d.ts.map +0 -1
  238. package/components/Table/utils/utils.js +0 -114
  239. package/components/Table/utils/utils.js.map +0 -1
  240. package/components/TableComposable/Caption.d.ts +0 -9
  241. package/components/TableComposable/Caption.d.ts.map +0 -1
  242. package/components/TableComposable/Caption.js +0 -8
  243. package/components/TableComposable/Caption.js.map +0 -1
  244. package/components/TableComposable/InnerScrollContainer.d.ts +0 -9
  245. package/components/TableComposable/InnerScrollContainer.d.ts.map +0 -1
  246. package/components/TableComposable/InnerScrollContainer.js +0 -10
  247. package/components/TableComposable/InnerScrollContainer.js.map +0 -1
  248. package/components/TableComposable/OuterScrollContainer.d.ts +0 -9
  249. package/components/TableComposable/OuterScrollContainer.d.ts.map +0 -1
  250. package/components/TableComposable/OuterScrollContainer.js +0 -10
  251. package/components/TableComposable/OuterScrollContainer.js.map +0 -1
  252. package/components/TableComposable/TableComposable.d.ts +0 -68
  253. package/components/TableComposable/TableComposable.d.ts.map +0 -1
  254. package/components/TableComposable/TableComposable.js +0 -73
  255. package/components/TableComposable/TableComposable.js.map +0 -1
  256. package/components/TableComposable/Tbody.d.ts +0 -17
  257. package/components/TableComposable/Tbody.d.ts.map +0 -1
  258. package/components/TableComposable/Tbody.js +0 -11
  259. package/components/TableComposable/Tbody.js.map +0 -1
  260. package/components/TableComposable/Td.d.ts +0 -47
  261. package/components/TableComposable/Td.d.ts.map +0 -1
  262. package/components/TableComposable/Td.js +0 -146
  263. package/components/TableComposable/Td.js.map +0 -1
  264. package/components/TableComposable/Th.d.ts +0 -41
  265. package/components/TableComposable/Th.d.ts.map +0 -1
  266. package/components/TableComposable/Th.js +0 -104
  267. package/components/TableComposable/Th.js.map +0 -1
  268. package/components/TableComposable/Thead.d.ts +0 -15
  269. package/components/TableComposable/Thead.d.ts.map +0 -1
  270. package/components/TableComposable/Thead.js +0 -11
  271. package/components/TableComposable/Thead.js.map +0 -1
  272. package/components/TableComposable/Tr.d.ts +0 -38
  273. package/components/TableComposable/Tr.d.ts.map +0 -1
  274. package/components/TableComposable/Tr.js +0 -39
  275. package/components/TableComposable/Tr.js.map +0 -1
  276. package/components/TableComposable/index.d.ts +0 -10
  277. package/components/TableComposable/index.d.ts.map +0 -1
  278. package/components/TableComposable/index.js +0 -10
  279. package/components/TableComposable/index.js.map +0 -1
  280. package/deprecated/components/Table/index.d.ts +0 -2
  281. package/deprecated/components/Table/index.d.ts.map +0 -1
  282. package/deprecated/components/Table/index.js +0 -2
  283. package/deprecated/components/Table/index.js.map +0 -1
  284. package/deprecated/components/index.d.ts +0 -2
  285. package/deprecated/components/index.d.ts.map +0 -1
  286. package/deprecated/components/index.js +0 -2
  287. package/deprecated/components/index.js.map +0 -1
  288. package/scripts/copySubpaths.js +0 -12
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-alpha.47](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@5.0.0-alpha.46...@patternfly/react-table@5.0.0-alpha.47) (2023-03-24)
7
+
8
+ **Note:** Version bump only for package @patternfly/react-table
9
+
10
+ # [5.0.0-alpha.46](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@5.0.0-alpha.45...@patternfly/react-table@5.0.0-alpha.46) (2023-03-24)
11
+
12
+ **Note:** Version bump only for package @patternfly/react-table
13
+
6
14
  # [5.0.0-alpha.45](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@5.0.0-alpha.44...@patternfly/react-table@5.0.0-alpha.45) (2023-03-23)
7
15
 
8
16
  ### Features
@@ -1,3 +1,3 @@
1
- export * from './Table';
2
- export * from './TableComposable';
1
+ export * from '../dist/esm/components/Table';
2
+ export * from '../dist/esm/components/TableComposable';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from './Table';
2
- export * from './TableComposable';
1
+ export * from '../dist/esm/components/Table';
2
+ export * from '../dist/esm/components/TableComposable';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './components';
1
+ export * from '../dist/esm/deprecated/components';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deprecated/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/deprecated/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './components';
1
+ export * from '../dist/esm/deprecated/components';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/deprecated/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/deprecated/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-table",
3
- "version": "5.0.0-alpha.45",
3
+ "version": "5.0.0-alpha.47",
4
4
  "description": "This library provides a set of React table components for use with the PatternFly 4",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -36,10 +36,10 @@
36
36
  "scripts": {
37
37
  "build:umd": "rollup -c --environment IS_PRODUCTION",
38
38
  "clean": "rimraf dist",
39
- "subpaths": "node scripts/copySubpaths.js"
39
+ "subpaths": "node scripts/createSubpaths.js"
40
40
  },
41
41
  "dependencies": {
42
- "@patternfly/react-core": "^5.0.0-alpha.45",
42
+ "@patternfly/react-core": "^5.0.0-alpha.47",
43
43
  "@patternfly/react-icons": "^5.0.0-alpha.6",
44
44
  "@patternfly/react-styles": "^5.0.0-alpha.5",
45
45
  "@patternfly/react-tokens": "^5.0.0-alpha.5",
@@ -54,5 +54,5 @@
54
54
  "react": "^17 || ^18",
55
55
  "react-dom": "^17 || ^18"
56
56
  },
57
- "gitHead": "b4d34f7a9978200a95142d099115f91bf4170497"
57
+ "gitHead": "41381939a0352b1b212b237604b2d6461f7b4c06"
58
58
  }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Re-export subpath modules into the package root directory for ease of access.
3
+ */
4
+ const { readdirSync, readFileSync, writeFileSync, mkdirSync } = require('fs');
5
+ const { resolve, join } = require('path');
6
+
7
+ const isIndex = (fileName) => fileName.match(/^index\./);
8
+
9
+ const updatePaths = (filePath, subPathName) => {
10
+ const contents = readFileSync(filePath, { encoding: 'utf8' });
11
+ if (filePath.includes('.map')) {
12
+ return contents.replaceAll('../../../', `../`);
13
+ } else {
14
+ return contents.replaceAll('./', `../dist/esm/${subPathName}/`);
15
+ }
16
+ };
17
+
18
+ ['deprecated', 'components'].forEach((subPathName) => {
19
+ const distPath = resolve(__dirname, `../dist/esm/${subPathName}`);
20
+ const distFileNames = readdirSync(distPath);
21
+ const distIndexFileNames = distFileNames.filter((fileName) => isIndex(fileName));
22
+
23
+ const destinationDir = resolve(__dirname, `../${subPathName}`);
24
+ mkdirSync(destinationDir, { recursive: true });
25
+
26
+ distIndexFileNames.forEach((fileName) => {
27
+ const filePath = join(__dirname, '../dist/esm', subPathName, fileName);
28
+ const newFileContent = updatePaths(filePath, subPathName);
29
+ const fileDestination = join(destinationDir, fileName);
30
+ writeFileSync(fileDestination, newFileContent);
31
+ });
32
+ });
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import { IAction, IExtraData, IRowData } from './TableTypes';
3
- export interface CustomActionsToggleProps {
4
- onToggle: (event: React.MouseEvent) => void;
5
- isOpen: boolean;
6
- isDisabled: boolean;
7
- toggleRef: React.Ref<any>;
8
- }
9
- export interface ActionsColumnProps extends Omit<React.HTMLProps<HTMLElement>, 'label'> {
10
- /** Actions to be rendered within or without the action dropdown */
11
- items: IAction[];
12
- /** Indicates whether the actions dropdown is disabled */
13
- isDisabled?: boolean;
14
- /** Data of the row the action dropdown is located */
15
- rowData?: IRowData;
16
- /** Extra data of a row */
17
- extraData?: IExtraData;
18
- /** Custom actions toggle for the actions dropdown */
19
- actionsToggle?: (props: CustomActionsToggleProps) => React.ReactNode;
20
- /** Additional properties for the actions dropdown popper */
21
- popperProps?: any;
22
- /** @hide Forwarded ref */
23
- innerRef?: React.Ref<any>;
24
- }
25
- export declare const ActionsColumn: React.ForwardRefExoticComponent<Pick<ActionsColumnProps, "span" | "wrap" | "content" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "items" | "isDisabled" | "rowData" | "extraData" | "actionsToggle" | "popperProps" | "innerRef"> & React.RefAttributes<HTMLElement>>;
26
- //# sourceMappingURL=ActionsColumn.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionsColumn.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/ActionsColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC3B;AACD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACrF,mEAAmE;IACnE,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qDAAqD;IACrD,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,qDAAqD;IACrD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,4DAA4D;IAC5D,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC3B;AAmHD,eAAO,MAAM,aAAa,o5LAExB,CAAC"}
@@ -1,57 +0,0 @@
1
- import { __rest } from "tslib";
2
- import * as React from 'react';
3
- import { Dropdown, DropdownItem, DropdownList } from '@patternfly/react-core/dist/esm/next/components';
4
- import { Button } from '@patternfly/react-core/dist/esm/components/Button';
5
- import { Divider } from '@patternfly/react-core/dist/esm/components/Divider';
6
- import { MenuToggle } from '@patternfly/react-core/dist/esm/components/MenuToggle';
7
- import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
8
- import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip';
9
- const ActionsColumnBase = (_a) => {
10
- var { items, isDisabled, rowData, extraData, actionsToggle, popperProps = {
11
- position: 'right',
12
- direction: 'down'
13
- } } = _a, props = __rest(_a, ["items", "isDisabled", "rowData", "extraData", "actionsToggle", "popperProps"]);
14
- const [isOpen, setIsOpen] = React.useState(false);
15
- const onToggle = () => {
16
- setIsOpen(!isOpen);
17
- };
18
- const onActionClick = (event, onClick) => {
19
- // Only prevent default if onClick is provided. This allows href support.
20
- if (onClick) {
21
- event.preventDefault();
22
- // tslint:disable-next-line:no-unused-expression
23
- onClick(event, extraData && extraData.rowIndex, rowData, extraData);
24
- }
25
- };
26
- return (React.createElement(React.Fragment, null,
27
- items
28
- .filter((item) => item.isOutsideDropdown)
29
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
30
- .map((_a, key) => {
31
- var { title, itemKey, onClick, isOutsideDropdown } = _a, props = __rest(_a, ["title", "itemKey", "onClick", "isOutsideDropdown"]);
32
- return typeof title === 'string' ? (React.createElement(Button, Object.assign({ onClick: (event) => onActionClick(event, onClick) }, props, { isDisabled: isDisabled, key: itemKey || `outside_dropdown_${key}`, "data-key": itemKey || `outside_dropdown_${key}` }), title)) : (React.cloneElement(title, Object.assign({ onClick, isDisabled }, props)));
33
- }),
34
- React.createElement(Dropdown, Object.assign({ isOpen: isOpen, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: (toggleRef) => actionsToggle ? (actionsToggle({ onToggle, isOpen, isDisabled, toggleRef })) : (React.createElement(MenuToggle, { "aria-label": "Kebab toggle", ref: toggleRef, onClick: onToggle, isExpanded: isOpen, isDisabled: isDisabled, variant: "plain" },
35
- React.createElement(EllipsisVIcon, null))) }, (rowData && rowData.actionProps), props, { popperProps: popperProps }),
36
- React.createElement(DropdownList, null, items
37
- .filter((item) => !item.isOutsideDropdown)
38
- .map((_a, key) => {
39
- var { title, itemKey, onClick, tooltip, tooltipProps, isSeparator } = _a, props = __rest(_a, ["title", "itemKey", "onClick", "tooltip", "tooltipProps", "isSeparator"]);
40
- if (isSeparator) {
41
- return React.createElement(Divider, { key: itemKey || key, "data-key": itemKey || key });
42
- }
43
- const item = (React.createElement(DropdownItem, Object.assign({ onClick: (event) => {
44
- onActionClick(event, onClick);
45
- onToggle();
46
- } }, props, { key: itemKey || key, "data-key": itemKey || key }), title));
47
- if (tooltip) {
48
- return (React.createElement(Tooltip, Object.assign({ key: itemKey || key, content: tooltip }, tooltipProps), item));
49
- }
50
- else {
51
- return item;
52
- }
53
- })))));
54
- };
55
- export const ActionsColumn = React.forwardRef((props, ref) => (React.createElement(ActionsColumnBase, Object.assign({}, props, { innerRef: ref }))));
56
- ActionsColumn.displayName = 'ActionsColumn';
57
- //# sourceMappingURL=ActionsColumn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionsColumn.js","sourceRoot":"","sources":["../../../../src/components/Table/ActionsColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,MAAM,EAAE,MAAM,mDAAmD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,oDAAoD,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAEnF,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,oDAAoD,CAAC;AAyB7E,MAAM,iBAAiB,GAAgD,CAAC,EAWnD,EAAE,EAAE;QAX+C,EACtE,KAAK,EACL,UAAU,EACV,OAAO,EAC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ACb,CAAC,IACG,KAAK,IACT,GAAG,EAAE,OAAO,IAAI,GAAG,cACT,OAAO,IAAI,GAAG,KAEvB,KAAK,CACO,CAChB,CAAC;gBAEF,IAAI,OAAO,EAAE;oBACX,OAAO,CACL,oBAAC,OAAO,kBAAC,GAAG,EAAE,OAAO,IAAI,GAAG,EAAE,OAAO,EAAE,OAAO,IAAM,YAAY,GAC7D,IAAI,CACG,CACX,CAAC;iBACH;qBAAM;oBACL,OAAO,IAAI,CAAC;iBACb;YACH,CAAC,CAAC,CACS,CACN,CACI,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAyB,EAAE,GAA2B,EAAE,EAAE,CAAC,CACxG,oBAAC,iBAAiB,oBAAK,KAAK,IAAE,QAAQ,EAAE,GAAG,IAAI,CAChD,CAAC,CAAC;AACH,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- import { RowKeyType } from './base/types';
3
- import { IRow, IExtraRowData } from './TableTypes';
4
- export interface IComputedData {
5
- isInput: boolean;
6
- isButton: boolean;
7
- }
8
- export declare type OnRowClick = (event: React.KeyboardEvent | React.MouseEvent, row: IRow, rowProps: IExtraRowData, computedData: IComputedData) => void;
9
- export interface TableBodyProps {
10
- /** Additional classes added to the TableBody */
11
- className?: string;
12
- /** @hide This prop should not be set manually */
13
- children?: React.ReactNode;
14
- /** @hide This prop should not be set manually */
15
- headerData?: IRow[];
16
- /** @hide This prop should not be set manually */
17
- rows?: IRow[];
18
- /** @hide This prop should not be set manually */
19
- rowKey?: RowKeyType;
20
- /** A click handler for the row */
21
- onRowClick?: OnRowClick;
22
- /** @hide This prop should not be set manually */
23
- onRow?: Function;
24
- /** Flag indicating the <tbody> contains oddly striped rows. */
25
- isOddStriped?: boolean;
26
- /** Flag indicating the <tbody> contains evenly striped rows. */
27
- isEvenStriped?: boolean;
28
- }
29
- export declare const TableBody: ({ className, children, rowKey, onRow, onRowClick, ...props }: TableBodyProps) => JSX.Element;
30
- //# sourceMappingURL=Body.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAW,UAAU,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,IAAI,EAAY,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,oBAAY,UAAU,GAAG,CACvB,KAAK,EAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,UAAU,EAC7C,GAAG,EAAE,IAAI,EACT,QAAQ,EAAE,aAAa,EACvB,YAAY,EAAE,aAAa,KACxB,IAAI,CAAC;AAEV,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kDAAkD;IAClD,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACpB,kDAAkD;IAClD,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;IACd,kDAAkD;IAClD,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,mCAAmC;IACnC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,kDAAkD;IAClD,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gEAAgE;IAChE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAgJD,eAAO,MAAM,SAAS,iEAenB,cAAc,gBAiBhB,CAAC"}
@@ -1,115 +0,0 @@
1
- import { __rest } from "tslib";
2
- import * as React from 'react';
3
- import { Body as BaseBody } from './base';
4
- import { TableContext } from './TableContext';
5
- import { isRowExpanded } from './utils';
6
- const flagVisibility = (rows) => {
7
- const visibleRows = rows.filter((oneRow) => !oneRow.parent || oneRow.isExpanded);
8
- if (visibleRows.length > 0) {
9
- visibleRows[0].isFirstVisible = true;
10
- visibleRows[visibleRows.length - 1].isLastVisible = true;
11
- }
12
- };
13
- class ContextBody extends React.Component {
14
- constructor() {
15
- super(...arguments);
16
- this.onRow = (row, rowProps) => {
17
- const { onRowClick, onRow } = this.props;
18
- const extendedRowProps = Object.assign(Object.assign({}, rowProps), (onRow ? onRow(row, rowProps) : {}));
19
- return {
20
- row,
21
- rowProps: extendedRowProps,
22
- onClick: (event) => {
23
- const tagName = event.target.tagName;
24
- const computedData = {
25
- isInput: tagName === 'INPUT',
26
- isButton: tagName === 'BUTTON'
27
- };
28
- onRowClick(event, row, rowProps, computedData);
29
- },
30
- onKeyDown: (event) => {
31
- const targetElement = event.target;
32
- const tagName = targetElement.tagName;
33
- const computedData = {
34
- isInput: tagName === 'INPUT',
35
- isButton: tagName === 'BUTTON'
36
- };
37
- if (event.key === 'Enter' || event.key === ' ') {
38
- onRowClick(event, row, rowProps, computedData);
39
- // prevent event default if space is typed while focusing on a hoverable row
40
- // so that the page does not scroll when trying to use spacebar to select a row
41
- if (event.key === ' ' && !!targetElement.closest('.pf-m-hoverable')) {
42
- event.preventDefault();
43
- }
44
- }
45
- }
46
- };
47
- };
48
- this.mapCells = (headerData, row, rowKey) => {
49
- // column indexes start after generated optional columns like collapsible or select column(s)
50
- const { firstUserColumnIndex } = headerData[0].extraParams;
51
- const isFullWidth = row && row.fullWidth;
52
- // typically you'd want to map each cell to its column header, but in the case of fullWidth
53
- // the first column could be the Select and/or Expandable column
54
- let additionalColsIndexShift = isFullWidth ? 0 : firstUserColumnIndex;
55
- return Object.assign({}, (row &&
56
- (row.cells || row).reduce((acc, cell, cellIndex) => {
57
- const isCellObject = cell === Object(cell);
58
- const isCellFunction = cell && typeof cell.title === 'function';
59
- let formatters = [];
60
- if (isCellObject && cell.formatters) {
61
- // give priority to formatters specified on the cell object
62
- // expandable example:
63
- // rows: [{ parent: 0, fullWidth: true, cells: [{ title: 'fullWidth, child - a', formatters: [expandable]}] }]
64
- formatters = cell.formatters;
65
- }
66
- else if (isFullWidth && cellIndex < firstUserColumnIndex) {
67
- // for backwards compatibility, map the cells that are not under user columns (like Select/Expandable)
68
- // to the first user column's header formatters
69
- formatters = headerData[firstUserColumnIndex].cell.formatters;
70
- }
71
- let mappedCellTitle = cell;
72
- if (isCellObject && isCellFunction) {
73
- mappedCellTitle = cell.title(cell.props.value, rowKey, cellIndex, cell.props);
74
- }
75
- else if (isCellObject) {
76
- mappedCellTitle = cell.title;
77
- }
78
- const mappedCell = {
79
- [headerData[cellIndex + additionalColsIndexShift].property]: {
80
- title: mappedCellTitle,
81
- formatters,
82
- props: Object.assign({ isVisible: true }, (isCellObject ? cell.props : null))
83
- }
84
- };
85
- // increment the shift index when a cell spans multiple columns
86
- if (isCellObject && cell.props && cell.props.colSpan) {
87
- additionalColsIndexShift += cell.props.colSpan - 1;
88
- }
89
- return Object.assign(Object.assign({}, acc), mappedCell);
90
- }, { secretTableRowKeyId: row.id !== undefined ? row.id : rowKey })));
91
- };
92
- }
93
- render() {
94
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
95
- const _a = this.props, { className, headerData, rows, rowKey, children, onRowClick } = _a, props = __rest(_a, ["className", "headerData", "rows", "rowKey", "children", "onRowClick"]);
96
- let mappedRows;
97
- if (headerData.length > 0) {
98
- mappedRows = rows.map((oneRow, oneRowKey) => (Object.assign(Object.assign(Object.assign({}, oneRow), this.mapCells(headerData, oneRow, oneRowKey)), { isExpanded: isRowExpanded(oneRow, rows), isHeightAuto: oneRow.heightAuto || false, isFirst: oneRowKey === 0, isLast: oneRowKey === rows.length - 1, isFirstVisible: false, isLastVisible: false })));
99
- flagVisibility(mappedRows);
100
- }
101
- return (React.createElement(React.Fragment, null, mappedRows && (React.createElement(BaseBody, Object.assign({}, props, { mappedRows: mappedRows, rows: mappedRows, onRow: this.onRow, rowKey: rowKey, className: className })))));
102
- }
103
- }
104
- export const TableBody = (_a) => {
105
- var { className = '', children = null, rowKey = 'secretTableRowKeyId',
106
- /* eslint-disable @typescript-eslint/no-unused-vars */
107
- onRow = (...args) => ({}), onRowClick = (event, row, rowProps, computedData) =>
108
- /* eslint-enable @typescript-eslint/no-unused-vars */
109
- undefined } = _a, props = __rest(_a, ["className", "children", "rowKey", "onRow", "onRowClick"]);
110
- return (React.createElement(TableContext.Consumer, null, (_a) => {
111
- var { headerData = [], rows = [] } = _a, rest = __rest(_a, ["headerData", "rows"]);
112
- return (React.createElement(ContextBody, Object.assign({ headerData: headerData, rows: rows, onRow: onRow, className: className, rowKey: rowKey, onRowClick: onRowClick }, props, rest), children));
113
- }));
114
- };
115
- //# sourceMappingURL=Body.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Body.js","sourceRoot":"","sources":["../../../../src/components/Table/Body.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAmCxC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE;IACtC,MAAM,WAAW,GAAI,IAAe,CAAC,MAAM,CAAC,CAAC,MAAY,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,UAAU,CAAW,CAAC;IAC7G,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;QAC1B,WAAW,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC;QACrC,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,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AAC,WAAW,kBACV,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAc,EACpB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,IAClB,KAAK,EACL,IAAI,GAEP,QAAQ,CACG,CACf,CAAA;KAAA,CACqB,CACzB,CAAA;CAAA,CAAC"}
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import { SelectProps } from '@patternfly/react-core';
3
- export interface BodyCellProps {
4
- 'data-label'?: string;
5
- className?: string;
6
- colSpan?: number;
7
- component?: React.ReactNode;
8
- errorText?: string;
9
- isVisible?: boolean;
10
- parentId?: number;
11
- textCenter?: boolean;
12
- isOpen?: boolean;
13
- ariaControls?: string;
14
- editableValue?: any;
15
- editableSelectProps?: SelectProps;
16
- options?: React.ReactElement[];
17
- isSelectOpen?: boolean;
18
- value?: any;
19
- isValid?: boolean;
20
- name?: string;
21
- tooltip?: string;
22
- onMouseEnter?: (event: any) => void;
23
- children: React.ReactNode;
24
- }
25
- export declare const BodyCell: React.FunctionComponent<BodyCellProps>;
26
- //# sourceMappingURL=BodyCell.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BodyCell.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/BodyCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAwB,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG3E,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAwE3D,CAAC"}
@@ -1,40 +0,0 @@
1
- import { __rest } from "tslib";
2
- import * as React from 'react';
3
- import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip/Tooltip';
4
- import { Bullseye, EmptyState } from '@patternfly/react-core';
5
- import { Td } from '../TableComposable/Td';
6
- export const BodyCell = (_a) => {
7
- var { 'data-label': dataLabel = '', className = '', colSpan, component = 'td', isVisible, parentId, textCenter = false, tooltip: tooltipProp = '', onMouseEnter: onMouseEnterProp = () => { }, children,
8
- /* eslint-disable @typescript-eslint/no-unused-vars */
9
- errorText, isValid, isOpen, ariaControls, editableValue, editableSelectProps, options, isSelectOpen, value, name } = _a,
10
- /* eslint-enable @typescript-eslint/no-unused-vars */
11
- props = __rest(_a, ['data-label', "className", "colSpan", "component", "isVisible", "parentId", "textCenter", "tooltip", "onMouseEnter", "children", "errorText", "isValid", "isOpen", "ariaControls", "editableValue", "editableSelectProps", "options", "isSelectOpen", "value", "name"]);
12
- const [tooltip, setTooltip] = React.useState('');
13
- const onMouseEnter = (event) => {
14
- if (event.target.offsetWidth < event.target.scrollWidth) {
15
- if (tooltipProp) {
16
- setTooltip(tooltipProp);
17
- }
18
- else if (typeof children === 'string') {
19
- setTooltip(children);
20
- }
21
- }
22
- else {
23
- setTooltip('');
24
- }
25
- onMouseEnterProp(event);
26
- };
27
- let isEmptyStateCell = false;
28
- if (children) {
29
- isEmptyStateCell =
30
- (children.type === Bullseye &&
31
- children.props.children &&
32
- children.props.children.type === EmptyState) ||
33
- children.type === EmptyState;
34
- }
35
- const cell = (React.createElement(Td, Object.assign({ className: className, component: component, dataLabel: dataLabel && parentId == null && !isEmptyStateCell ? dataLabel : null, onMouseEnter: onMouseEnter, textCenter: textCenter, colSpan: colSpan }, props), children));
36
- const bodyCell = tooltip !== '' ? (React.createElement(Tooltip, { content: tooltip, isVisible: true }, cell)) : (cell);
37
- return (parentId !== undefined && colSpan === undefined) || !isVisible ? null : bodyCell;
38
- };
39
- BodyCell.displayName = 'BodyCell';
40
- //# sourceMappingURL=BodyCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BodyCell.js","sourceRoot":"","sources":["../../../../src/components/Table/BodyCell.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,4DAA4D,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAe,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAwB3C,MAAM,CAAC,MAAM,QAAQ,GAA2C,CAAC,EAwBjD,EAAE,EAAE;QAxB6C,EAC/D,YAAY,EAAE,SAAS,GAAG,EAAE,EAC5B,SAAS,GAAG,EAAE,EACd,OAAO,EACP,SAAS,GAAG,IAAI,EAChB,SAAS,EACT,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,OAAO,EAAE,WAAW,GAAG,EAAE,EACzB,YAAY,EAAE,gBAAgB,GAAG,GAAG,EAAE,GAAE,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ACtB,OAAO,EAAE,OAAO,IACZ,KAAK,GAER,QAAQ,CACN,CACN,CAAC;IAEF,MAAM,QAAQ,GACZ,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CACf,oBAAC,OAAO,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,UACjC,IAAI,CACG,CACX,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;IAEJ,OAAO,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC3F,CAAC,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { IRow, IRowData, IExtraData, IHeaderRow } from './TableTypes';
3
- export interface BodyWrapperProps {
4
- children?: React.ReactNode;
5
- mappedRows?: IRow[];
6
- rows?: IRow[];
7
- onCollapse?: (event: React.MouseEvent, rowIndex: number, isOpen: boolean, rowData: IRowData, extraData: IExtraData) => undefined;
8
- tbodyRef?: React.Ref<any> | Function;
9
- headerRows?: IHeaderRow[];
10
- }
11
- export declare const BodyWrapper: React.FunctionComponent<BodyWrapperProps>;
12
- //# sourceMappingURL=BodyWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BodyWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/BodyWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAItE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,CACX,KAAK,EAAE,KAAK,CAAC,UAAU,EACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,UAAU,KAClB,SAAS,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;IACrC,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAsBjE,CAAC"}
@@ -1,17 +0,0 @@
1
- import { __rest } from "tslib";
2
- import * as React from 'react';
3
- import { mapOpenedRows } from './utils/headerUtils';
4
- import { Tbody } from '../TableComposable/Tbody';
5
- export const BodyWrapper = (_a) => {
6
- var { mappedRows, tbodyRef,
7
- /* eslint-disable @typescript-eslint/no-unused-vars */
8
- rows = [], onCollapse, headerRows } = _a,
9
- /* eslint-enable @typescript-eslint/no-unused-vars */
10
- props = __rest(_a, ["mappedRows", "tbodyRef", "rows", "onCollapse", "headerRows"]);
11
- if (mappedRows && mappedRows.some(row => row.hasOwnProperty('parent'))) {
12
- return (React.createElement(React.Fragment, null, mapOpenedRows(mappedRows, props.children).map((oneRow, key) => (React.createElement(Tbody, Object.assign({}, props, { isExpanded: oneRow.isOpen, key: `tbody-${key}`, ref: tbodyRef }), oneRow.rows)))));
13
- }
14
- return React.createElement(Tbody, Object.assign({}, props, { ref: tbodyRef }));
15
- };
16
- BodyWrapper.displayName = 'BodyWrapper';
17
- //# sourceMappingURL=BodyWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BodyWrapper.js","sourceRoot":"","sources":["../../../../src/components/Table/BodyWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAiBjD,MAAM,CAAC,MAAM,WAAW,GAA8C,CAAC,EASpD,EAAE,EAAE;QATgD,EACrE,UAAU,EACV,QAAQ;IACR,sDAAsD;IACtD,IAAI,GAAG,EAAY,EACnB,UAAU,EACV,UAAU,OAGO;IAFjB,qDAAqD;IAClD,KAAK,cAR6D,8DAStE,CADS;IAER,IAAI,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,EAAE;QACtE,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,QACZ,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CAC9D,oBAAC,KAAK,oBAAK,KAAK,IAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,EAAE,QAA0B,KAC9F,MAAM,CAAC,IAAI,CACN,CACT,CAAC,CACa,CAClB,CAAC;KACH;IACD,OAAO,oBAAC,KAAK,oBAAK,KAAK,IAAE,GAAG,EAAE,QAA0B,IAAI,CAAC;AAC/D,CAAC,CAAC;AACF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- export interface CollapseColumnProps {
3
- id?: string;
4
- className?: string;
5
- children?: React.ReactNode;
6
- onToggle?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
7
- isOpen?: boolean;
8
- 'aria-label'?: string;
9
- }
10
- export declare const CollapseColumn: React.FunctionComponent<CollapseColumnProps>;
11
- //# sourceMappingURL=CollapseColumn.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollapseColumn.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/CollapseColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAwBvE,CAAC"}
@@ -1,16 +0,0 @@
1
- import { __rest } from "tslib";
2
- import * as React from 'react';
3
- import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-icon';
4
- import { css } from '@patternfly/react-styles';
5
- import { Button } from '@patternfly/react-core/dist/esm/components/Button/Button';
6
- import styles from '@patternfly/react-styles/css/components/Table/table';
7
- export const CollapseColumn = (_a) => {
8
- var { className = '', children = null, isOpen, onToggle } = _a, props = __rest(_a, ["className", "children", "isOpen", "onToggle"]);
9
- return (React.createElement(React.Fragment, null,
10
- isOpen !== undefined && (React.createElement(Button, Object.assign({ className: css(className, isOpen && styles.modifiers.expanded) }, props, { variant: "plain", "aria-label": props['aria-label'] || 'Details', onClick: onToggle, "aria-expanded": isOpen }),
11
- React.createElement("div", { className: css(styles.tableToggleIcon) },
12
- React.createElement(AngleDownIcon, null)))),
13
- children));
14
- };
15
- CollapseColumn.displayName = 'CollapseColumn';
16
- //# sourceMappingURL=CollapseColumn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollapseColumn.js","sourceRoot":"","sources":["../../../../src/components/Table/CollapseColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,0DAA0D,CAAC;AAClF,OAAO,MAAM,MAAM,qDAAqD,CAAC;AAWzE,MAAM,CAAC,MAAM,cAAc,GAAiD,CAAC,EAMvD,EAAE,EAAE;QANmD,EAC3E,SAAS,GAAG,EAAY,EACxB,QAAQ,GAAG,IAAuB,EAClC,MAAM,EACN,QAAQ,OAEY,EADjB,KAAK,cALmE,+CAM5E,CADS;IACiB,OAAA,CACzB,oBAAC,KAAK,CAAC,QAAQ;QACZ,MAAM,KAAK,SAAS,IAAI,CACvB,oBAAC,MAAM,kBACL,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAC1D,KAAK,IACT,OAAO,EAAC,OAAO,gBACH,KAAK,CAAC,YAAY,CAAC,IAAI,SAAS,EAC5C,OAAO,EAAE,QAAQ,mBACF,MAAM;YAErB,6BAAK,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC;gBACzC,oBAAC,aAAa,OAAG,CACb,CACC,CACV;QACA,QAAQ,CACM,CAClB,CAAA;CAAA,CAAC;AACF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- export interface DraggableCellProps {
3
- id: string;
4
- className?: string;
5
- onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
6
- 'aria-label'?: string;
7
- }
8
- export declare const DraggableCell: React.FunctionComponent<DraggableCellProps>;
9
- //# sourceMappingURL=DraggableCell.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DraggableCell.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/DraggableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAkBrE,CAAC"}
@@ -1,11 +0,0 @@
1
- import { __rest } from "tslib";
2
- import * as React from 'react';
3
- import GripVerticalIcon from '@patternfly/react-icons/dist/esm/icons/grip-vertical-icon';
4
- import { Button } from '@patternfly/react-core/dist/esm/components/Button/Button';
5
- export const DraggableCell = (_a) => {
6
- var { className, onClick, 'aria-label': ariaLabel, id } = _a, props = __rest(_a, ["className", "onClick", 'aria-label', "id"]);
7
- return (React.createElement(Button, Object.assign({ id: id, variant: "plain", className: className, type: "button", "aria-label": ariaLabel || `Draggable row draggable button`, onClick: onClick }, props),
8
- React.createElement(GripVerticalIcon, { "aria-hidden": true })));
9
- };
10
- DraggableCell.displayName = 'DraggableCell';
11
- //# sourceMappingURL=DraggableCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DraggableCell.js","sourceRoot":"","sources":["../../../../src/components/Table/DraggableCell.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,gBAAgB,MAAM,2DAA2D,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,0DAA0D,CAAC;AASlF,MAAM,CAAC,MAAM,aAAa,GAAgD,CAAC,EAMtD,EAAE,EAAE;QANkD,EACzE,SAAS,EACT,OAAO,EACP,YAAY,EAAE,SAAS,EACvB,EAAE,OAEiB,EADhB,KAAK,cALiE,4CAM1E,CADS;IACgB,OAAA,CACxB,oBAAC,MAAM,kBACL,EAAE,EAAE,EAAE,EACN,OAAO,EAAC,OAAO,EACf,SAAS,EAAE,SAAS,EACpB,IAAI,EAAC,QAAQ,gBACD,SAAS,IAAI,gCAAgC,EACzD,OAAO,EAAE,OAAO,IACZ,KAAK;QAET,oBAAC,gBAAgB,0BAAe,CACzB,CACV,CAAA;CAAA,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { RowWrapperProps } from './RowWrapper';
3
- export declare const DraggableRowWrapper: React.FunctionComponent<RowWrapperProps>;
4
- //# sourceMappingURL=DraggableRowWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DraggableRowWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/DraggableRowWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CA8BxE,CAAC"}