@itwin/components-react 3.6.0-dev.54 → 3.6.0-dev.59

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 (235) hide show
  1. package/lib/cjs/components-react/breadcrumb/Breadcrumb.d.ts +5 -5
  2. package/lib/cjs/components-react/breadcrumb/Breadcrumb.js +3 -3
  3. package/lib/cjs/components-react/breadcrumb/Breadcrumb.js.map +1 -1
  4. package/lib/cjs/components-react/breadcrumb/BreadcrumbDetails.d.ts +2 -2
  5. package/lib/cjs/components-react/breadcrumb/BreadcrumbDetails.js +1 -1
  6. package/lib/cjs/components-react/breadcrumb/BreadcrumbDetails.js.map +1 -1
  7. package/lib/cjs/components-react/breadcrumb/BreadcrumbPath.d.ts +3 -3
  8. package/lib/cjs/components-react/breadcrumb/BreadcrumbPath.js +2 -2
  9. package/lib/cjs/components-react/breadcrumb/BreadcrumbPath.js.map +1 -1
  10. package/lib/cjs/components-react/breadcrumb/BreadcrumbTreeUtils.d.ts +1 -1
  11. package/lib/cjs/components-react/breadcrumb/BreadcrumbTreeUtils.js +1 -1
  12. package/lib/cjs/components-react/breadcrumb/BreadcrumbTreeUtils.js.map +1 -1
  13. package/lib/cjs/components-react/common/showhide/ShowHideDialog.d.ts +2 -2
  14. package/lib/cjs/components-react/common/showhide/ShowHideDialog.js +1 -1
  15. package/lib/cjs/components-react/common/showhide/ShowHideDialog.js.map +1 -1
  16. package/lib/cjs/components-react/common/showhide/ShowHideItem.d.ts +2 -2
  17. package/lib/cjs/components-react/common/showhide/ShowHideItem.js.map +1 -1
  18. package/lib/cjs/components-react/common/showhide/ShowHideMenu.d.ts +2 -2
  19. package/lib/cjs/components-react/common/showhide/ShowHideMenu.js +1 -1
  20. package/lib/cjs/components-react/common/showhide/ShowHideMenu.js.map +1 -1
  21. package/lib/cjs/components-react/editors/ThemedEnumEditor.d.ts +3 -3
  22. package/lib/cjs/components-react/editors/ThemedEnumEditor.js +2 -2
  23. package/lib/cjs/components-react/editors/ThemedEnumEditor.js.map +1 -1
  24. package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts +22 -25
  25. package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
  26. package/lib/cjs/components-react/filter-builder/FilterBuilder.js +19 -81
  27. package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
  28. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
  29. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
  30. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js +83 -0
  31. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
  32. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
  33. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
  34. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js +16 -10
  35. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
  36. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.scss +4 -0
  37. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
  38. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
  39. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js +22 -14
  40. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
  41. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
  42. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
  43. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +11 -5
  44. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  45. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
  46. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  47. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +11 -5
  48. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  49. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
  50. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
  51. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +11 -5
  52. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  53. package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts +50 -7
  54. package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
  55. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js +60 -8
  56. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  57. package/lib/cjs/components-react/filter-builder/Operators.d.ts +23 -5
  58. package/lib/cjs/components-react/filter-builder/Operators.d.ts.map +1 -1
  59. package/lib/cjs/components-react/filter-builder/Operators.js +25 -7
  60. package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
  61. package/lib/cjs/components-react/filter-builder/Types.d.ts +24 -4
  62. package/lib/cjs/components-react/filter-builder/Types.d.ts.map +1 -1
  63. package/lib/cjs/components-react/filter-builder/Types.js +11 -1
  64. package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
  65. package/lib/cjs/components-react/iconpicker/IconPickerButton.d.ts +2 -2
  66. package/lib/cjs/components-react/iconpicker/IconPickerButton.js +2 -2
  67. package/lib/cjs/components-react/iconpicker/IconPickerButton.js.map +1 -1
  68. package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts +1 -1
  69. package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
  70. package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +2 -2
  71. package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
  72. package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
  73. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +2 -2
  74. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  75. package/lib/cjs/components-react/table/SimpleTableDataProvider.d.ts +1 -1
  76. package/lib/cjs/components-react/table/SimpleTableDataProvider.js +1 -1
  77. package/lib/cjs/components-react/table/SimpleTableDataProvider.js.map +1 -1
  78. package/lib/cjs/components-react/table/TableDataProvider.d.ts +8 -8
  79. package/lib/cjs/components-react/table/TableDataProvider.js +2 -2
  80. package/lib/cjs/components-react/table/TableDataProvider.js.map +1 -1
  81. package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -16
  82. package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js +6 -6
  83. package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
  84. package/lib/cjs/components-react/table/component/ColumnDragLayer.d.ts +1 -1
  85. package/lib/cjs/components-react/table/component/ColumnDragLayer.js +1 -1
  86. package/lib/cjs/components-react/table/component/ColumnDragLayer.js.map +1 -1
  87. package/lib/cjs/components-react/table/component/Table.d.ts +9 -9
  88. package/lib/cjs/components-react/table/component/Table.d.ts.map +1 -1
  89. package/lib/cjs/components-react/table/component/Table.js +2 -2
  90. package/lib/cjs/components-react/table/component/Table.js.map +1 -1
  91. package/lib/cjs/components-react/table/component/TableCell.d.ts +6 -6
  92. package/lib/cjs/components-react/table/component/TableCell.js +3 -3
  93. package/lib/cjs/components-react/table/component/TableCell.js.map +1 -1
  94. package/lib/cjs/components-react/table/component/TableColumn.d.ts +1 -1
  95. package/lib/cjs/components-react/table/component/TableColumn.js.map +1 -1
  96. package/lib/cjs/components-react/table/component/dragdrop/BeDragDropContext.d.ts +1 -1
  97. package/lib/cjs/components-react/table/component/dragdrop/BeDragDropContext.js +1 -1
  98. package/lib/cjs/components-react/table/component/dragdrop/BeDragDropContext.js.map +1 -1
  99. package/lib/cjs/components-react/table/component/dragdrop/DragDropDef.d.ts +8 -8
  100. package/lib/cjs/components-react/table/component/dragdrop/DragDropDef.js +2 -2
  101. package/lib/cjs/components-react/table/component/dragdrop/DragDropDef.js.map +1 -1
  102. package/lib/cjs/components-react/table/component/dragdrop/withDragSource.d.ts +2 -2
  103. package/lib/cjs/components-react/table/component/dragdrop/withDragSource.js +1 -1
  104. package/lib/cjs/components-react/table/component/dragdrop/withDragSource.js.map +1 -1
  105. package/lib/cjs/components-react/table/component/dragdrop/withDropTarget.d.ts +2 -2
  106. package/lib/cjs/components-react/table/component/dragdrop/withDropTarget.js +1 -1
  107. package/lib/cjs/components-react/table/component/dragdrop/withDropTarget.js.map +1 -1
  108. package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts +1 -1
  109. package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
  110. package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
  111. package/lib/cjs/components-react/tree/TreeDataProvider.d.ts +2 -2
  112. package/lib/cjs/components-react/tree/TreeDataProvider.d.ts.map +1 -1
  113. package/lib/cjs/components-react/tree/TreeDataProvider.js.map +1 -1
  114. package/lib/cjs/components-react.d.ts +4 -6
  115. package/lib/cjs/components-react.d.ts.map +1 -1
  116. package/lib/cjs/components-react.js +4 -6
  117. package/lib/cjs/components-react.js.map +1 -1
  118. package/lib/esm/components-react/breadcrumb/Breadcrumb.d.ts +5 -5
  119. package/lib/esm/components-react/breadcrumb/Breadcrumb.js +3 -3
  120. package/lib/esm/components-react/breadcrumb/Breadcrumb.js.map +1 -1
  121. package/lib/esm/components-react/breadcrumb/BreadcrumbDetails.d.ts +2 -2
  122. package/lib/esm/components-react/breadcrumb/BreadcrumbDetails.js +1 -1
  123. package/lib/esm/components-react/breadcrumb/BreadcrumbDetails.js.map +1 -1
  124. package/lib/esm/components-react/breadcrumb/BreadcrumbPath.d.ts +3 -3
  125. package/lib/esm/components-react/breadcrumb/BreadcrumbPath.js +2 -2
  126. package/lib/esm/components-react/breadcrumb/BreadcrumbPath.js.map +1 -1
  127. package/lib/esm/components-react/breadcrumb/BreadcrumbTreeUtils.d.ts +1 -1
  128. package/lib/esm/components-react/breadcrumb/BreadcrumbTreeUtils.js +1 -1
  129. package/lib/esm/components-react/breadcrumb/BreadcrumbTreeUtils.js.map +1 -1
  130. package/lib/esm/components-react/common/showhide/ShowHideDialog.d.ts +2 -2
  131. package/lib/esm/components-react/common/showhide/ShowHideDialog.js +1 -1
  132. package/lib/esm/components-react/common/showhide/ShowHideDialog.js.map +1 -1
  133. package/lib/esm/components-react/common/showhide/ShowHideItem.d.ts +2 -2
  134. package/lib/esm/components-react/common/showhide/ShowHideItem.js.map +1 -1
  135. package/lib/esm/components-react/common/showhide/ShowHideMenu.d.ts +2 -2
  136. package/lib/esm/components-react/common/showhide/ShowHideMenu.js +1 -1
  137. package/lib/esm/components-react/common/showhide/ShowHideMenu.js.map +1 -1
  138. package/lib/esm/components-react/editors/ThemedEnumEditor.d.ts +3 -3
  139. package/lib/esm/components-react/editors/ThemedEnumEditor.js +2 -2
  140. package/lib/esm/components-react/editors/ThemedEnumEditor.js.map +1 -1
  141. package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts +22 -25
  142. package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
  143. package/lib/esm/components-react/filter-builder/FilterBuilder.js +12 -73
  144. package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
  145. package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
  146. package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
  147. package/lib/esm/components-react/filter-builder/FilterBuilderContext.js +60 -0
  148. package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
  149. package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
  150. package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
  151. package/lib/esm/components-react/filter-builder/FilterBuilderRule.js +11 -5
  152. package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
  153. package/lib/esm/components-react/filter-builder/FilterBuilderRule.scss +4 -0
  154. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
  155. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
  156. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js +15 -7
  157. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
  158. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
  159. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
  160. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +7 -1
  161. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  162. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
  163. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  164. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +7 -1
  165. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  166. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
  167. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
  168. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +7 -1
  169. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  170. package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts +50 -7
  171. package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
  172. package/lib/esm/components-react/filter-builder/FilterBuilderState.js +54 -3
  173. package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  174. package/lib/esm/components-react/filter-builder/Operators.d.ts +23 -5
  175. package/lib/esm/components-react/filter-builder/Operators.d.ts.map +1 -1
  176. package/lib/esm/components-react/filter-builder/Operators.js +23 -5
  177. package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
  178. package/lib/esm/components-react/filter-builder/Types.d.ts +24 -4
  179. package/lib/esm/components-react/filter-builder/Types.d.ts.map +1 -1
  180. package/lib/esm/components-react/filter-builder/Types.js +11 -1
  181. package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
  182. package/lib/esm/components-react/iconpicker/IconPickerButton.d.ts +2 -2
  183. package/lib/esm/components-react/iconpicker/IconPickerButton.js +2 -2
  184. package/lib/esm/components-react/iconpicker/IconPickerButton.js.map +1 -1
  185. package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts +1 -1
  186. package/lib/esm/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
  187. package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +2 -2
  188. package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
  189. package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
  190. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +2 -2
  191. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  192. package/lib/esm/components-react/table/SimpleTableDataProvider.d.ts +1 -1
  193. package/lib/esm/components-react/table/SimpleTableDataProvider.js +1 -1
  194. package/lib/esm/components-react/table/SimpleTableDataProvider.js.map +1 -1
  195. package/lib/esm/components-react/table/TableDataProvider.d.ts +8 -8
  196. package/lib/esm/components-react/table/TableDataProvider.js +2 -2
  197. package/lib/esm/components-react/table/TableDataProvider.js.map +1 -1
  198. package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -16
  199. package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js +6 -6
  200. package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
  201. package/lib/esm/components-react/table/component/ColumnDragLayer.d.ts +1 -1
  202. package/lib/esm/components-react/table/component/ColumnDragLayer.js +1 -1
  203. package/lib/esm/components-react/table/component/ColumnDragLayer.js.map +1 -1
  204. package/lib/esm/components-react/table/component/Table.d.ts +9 -9
  205. package/lib/esm/components-react/table/component/Table.d.ts.map +1 -1
  206. package/lib/esm/components-react/table/component/Table.js +2 -2
  207. package/lib/esm/components-react/table/component/Table.js.map +1 -1
  208. package/lib/esm/components-react/table/component/TableCell.d.ts +6 -6
  209. package/lib/esm/components-react/table/component/TableCell.js +3 -3
  210. package/lib/esm/components-react/table/component/TableCell.js.map +1 -1
  211. package/lib/esm/components-react/table/component/TableColumn.d.ts +1 -1
  212. package/lib/esm/components-react/table/component/TableColumn.js.map +1 -1
  213. package/lib/esm/components-react/table/component/dragdrop/BeDragDropContext.d.ts +1 -1
  214. package/lib/esm/components-react/table/component/dragdrop/BeDragDropContext.js +1 -1
  215. package/lib/esm/components-react/table/component/dragdrop/BeDragDropContext.js.map +1 -1
  216. package/lib/esm/components-react/table/component/dragdrop/DragDropDef.d.ts +8 -8
  217. package/lib/esm/components-react/table/component/dragdrop/DragDropDef.js +2 -2
  218. package/lib/esm/components-react/table/component/dragdrop/DragDropDef.js.map +1 -1
  219. package/lib/esm/components-react/table/component/dragdrop/withDragSource.d.ts +2 -2
  220. package/lib/esm/components-react/table/component/dragdrop/withDragSource.js +1 -1
  221. package/lib/esm/components-react/table/component/dragdrop/withDragSource.js.map +1 -1
  222. package/lib/esm/components-react/table/component/dragdrop/withDropTarget.d.ts +2 -2
  223. package/lib/esm/components-react/table/component/dragdrop/withDropTarget.js +1 -1
  224. package/lib/esm/components-react/table/component/dragdrop/withDropTarget.js.map +1 -1
  225. package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts +1 -1
  226. package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
  227. package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
  228. package/lib/esm/components-react/tree/TreeDataProvider.d.ts +2 -2
  229. package/lib/esm/components-react/tree/TreeDataProvider.d.ts.map +1 -1
  230. package/lib/esm/components-react/tree/TreeDataProvider.js.map +1 -1
  231. package/lib/esm/components-react.d.ts +4 -6
  232. package/lib/esm/components-react.d.ts.map +1 -1
  233. package/lib/esm/components-react.js +4 -6
  234. package/lib/esm/components-react.js.map +1 -1
  235. package/package.json +11 -11
@@ -9,7 +9,7 @@ import { PropertyDialogState, PropertyValueRendererManager } from "../../propert
9
9
  import { CellItem } from "../TableDataProvider";
10
10
  /**
11
11
  * Properties of the [[TableCell]] React component
12
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
12
+ * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
13
13
  * @public
14
14
  */
15
15
  export interface TableCellProps extends CommonProps {
@@ -30,7 +30,7 @@ export interface TableCellProps extends CommonProps {
30
30
  }
31
31
  /**
32
32
  * A React component that renders a table cell
33
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
33
+ * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this class.
34
34
  * @public
35
35
  */
36
36
  export declare class TableCell extends React.PureComponent<TableCellProps> {
@@ -38,7 +38,7 @@ export declare class TableCell extends React.PureComponent<TableCellProps> {
38
38
  render(): JSX.Element;
39
39
  }
40
40
  /** Properties of the [[TableCellContent]] React component
41
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
41
+ * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
42
42
  * @public
43
43
  */
44
44
  export interface TableCellContentProps extends CommonProps {
@@ -61,7 +61,7 @@ interface TableCellContentState {
61
61
  content: React.ReactNode;
62
62
  }
63
63
  /** A React component that renders table cell content
64
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
64
+ * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this class.
65
65
  * @public
66
66
  */
67
67
  export declare class TableCellContent extends React.PureComponent<TableCellContentProps, TableCellContentState> {
@@ -81,7 +81,7 @@ export declare class TableCellContent extends React.PureComponent<TableCellConte
81
81
  render(): React.ReactNode;
82
82
  }
83
83
  /** Properties for the [[TableIconCellContent]] React component
84
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
84
+ * @deprecated in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
85
85
  * @public
86
86
  */
87
87
  export interface TableIconCellContentProps {
@@ -90,7 +90,7 @@ export interface TableIconCellContentProps {
90
90
  }
91
91
  /**
92
92
  * A React component that renders table cell content as a Bentley icon
93
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
93
+ * @deprecated in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
94
94
  * @public
95
95
  */
96
96
  export declare class TableIconCellContent extends React.PureComponent<TableIconCellContentProps> {
@@ -40,7 +40,7 @@ const ItemStyle_1 = require("../../properties/ItemStyle");
40
40
  const ValueRendererManager_1 = require("../../properties/ValueRendererManager");
41
41
  /**
42
42
  * A React component that renders a table cell
43
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
43
+ * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this class.
44
44
  * @public
45
45
  */
46
46
  class TableCell extends React.PureComponent {
@@ -55,7 +55,7 @@ class TableCell extends React.PureComponent {
55
55
  }
56
56
  exports.TableCell = TableCell;
57
57
  /** A React component that renders table cell content
58
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
58
+ * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this class.
59
59
  * @public
60
60
  */
61
61
  class TableCellContent extends React.PureComponent {
@@ -124,7 +124,7 @@ class TableCellContent extends React.PureComponent {
124
124
  exports.TableCellContent = TableCellContent;
125
125
  /**
126
126
  * A React component that renders table cell content as a Bentley icon
127
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
127
+ * @deprecated in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
128
128
  * @public
129
129
  */
130
130
  class TableIconCellContent extends React.PureComponent {
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableCell.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4BAA0B;AAC1B,4DAAoC;AACpC,6CAA+B;AAC/B,kDAA4D;AAC5D,mEAAsF;AACtF,0DAA+D;AAC/D,gFAE+C;AAyB/C;;;;GAIG;AACH,MAAa,SAAU,SAAQ,KAAK,CAAC,aAA6B;IAChE,gBAAgB;IACA,MAAM;QAEpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACpE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBAEvB,oBAAC,iCAAe,IACd,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,KACnB,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAC/B,CACE,CACP,CAAC;SACH;QAED,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACpE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,IAAI,EAAC,cAAc,IAElB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF;AAhCD,8BAgCC;A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K,CAAC,aAAwC;IACtF,gBAAgB;IACA,MAAM;QACpB,OAAO,oBAAC,iBAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAI,CAAC;IACjD,CAAC;CACF;AALD,oDAKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport \"./TableCell.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps, Icon, Omit } from \"@itwin/core-react\";\r\nimport { EditorContainer, EditorContainerProps } from \"../../editors/EditorContainer\";\r\nimport { ItemStyleProvider } from \"../../properties/ItemStyle\";\r\nimport {\r\n PropertyContainerType, PropertyDialogState, PropertyValueRendererContext, PropertyValueRendererManager,\r\n} from \"../../properties/ValueRendererManager\";\r\nimport { CellItem } from \"../TableDataProvider\";\r\n\r\n/**\r\n * Properties of the [[TableCell]] React component\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableCellProps extends CommonProps {\r\n /** Additional class name for the cell container */\r\n className?: string;\r\n /** Title of the cell container */\r\n title: string;\r\n /** Cell content */\r\n children?: React.ReactNode;\r\n /** Click event callback */\r\n onClick?: (e: React.MouseEvent) => void;\r\n /** MouseMove event callback */\r\n onMouseMove?: (e: React.MouseEvent) => void;\r\n /** MouseDown event callback */\r\n onMouseDown?: (e: React.MouseEvent) => void;\r\n /** Properties for [[EditorContainer]]. Activates cell editing and provides properties to the container */\r\n cellEditingProps?: Omit<EditorContainerProps, \"title\">;\r\n}\r\n\r\n/**\r\n * A React component that renders a table cell\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.\r\n * @public\r\n */\r\nexport class TableCell extends React.PureComponent<TableCellProps> {\r\n /** @internal */\r\n public override render() {\r\n\r\n if (this.props.cellEditingProps) {\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <EditorContainer\r\n title={this.props.title}\r\n {...this.props.cellEditingProps}\r\n />\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n title={this.props.title}\r\n onClick={this.props.onClick}\r\n onMouseMove={this.props.onMouseMove}\r\n onMouseDown={this.props.onMouseDown}\r\n role=\"presentation\"\r\n >\r\n {this.props.children}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Properties of the [[TableCellContent]] React component\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableCellContentProps extends CommonProps {\r\n /** Indicates, whether container cell is selected or not */\r\n isSelected: boolean;\r\n /** Props for the item that will be rendered */\r\n cellItem: CellItem;\r\n /** Height of the component */\r\n height?: number;\r\n /** Callback to DialogOpen event */\r\n onDialogOpen?: (state: PropertyDialogState) => void;\r\n /** Property value renderer manager */\r\n propertyValueRendererManager: PropertyValueRendererManager;\r\n}\r\n\r\n/** State of the [[TableCellContent]] React component\r\n * @internal @deprecated\r\n */\r\ninterface TableCellContentState {\r\n /** Rendered content */\r\n content: React.ReactNode;\r\n}\r\n\r\n/** A React component that renders table cell content\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.\r\n * @public\r\n */\r\nexport class TableCellContent extends React.PureComponent<TableCellContentProps, TableCellContentState> {\r\n /** @internal */\r\n public override readonly state: TableCellContentState = {\r\n content: <div className={this.props.className} style={this.getStyle(this.props.cellItem, this.props.isSelected, this.props.height)} />,\r\n };\r\n\r\n private _isMounted = false;\r\n\r\n private getStyle(cellItem: CellItem, isSelected: boolean, height?: number): React.CSSProperties {\r\n return {\r\n ...ItemStyleProvider.createStyle(cellItem.style ? cellItem.style : {}, isSelected),\r\n textAlign: cellItem.alignment,\r\n height,\r\n lineHeight: `${height}px`, // Centers text vertically\r\n ...this.props.style,\r\n };\r\n }\r\n\r\n private async renderContent(props: TableCellContentProps) {\r\n const style = this.getStyle(props.cellItem, props.isSelected, props.height);\r\n\r\n if (!props.cellItem.record)\r\n return <div className={this.props.className} style={style} />;\r\n\r\n const rendererContext: PropertyValueRendererContext = {\r\n containerType: PropertyContainerType.Table,\r\n onDialogOpen: this.props.onDialogOpen,\r\n style,\r\n // TODO: Enable, when table gets refactored. Explanation in ./../table/NonPrimitiveValueRenderer\r\n // onPopupShow: this._onPopupShow,\r\n // onPopupHide: this._onPopupHide,\r\n };\r\n\r\n return this.props.propertyValueRendererManager.render(props.cellItem.record, rendererContext);\r\n }\r\n\r\n private doPropsDiffer(props1: TableCellContentProps, props2: TableCellContentProps) {\r\n return props1.cellItem !== props2.cellItem\r\n || props1.isSelected !== props2.isSelected\r\n || props1.onDialogOpen !== props2.onDialogOpen\r\n || props1.propertyValueRendererManager !== props2.propertyValueRendererManager;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidMount() {\r\n this._isMounted = true;\r\n const content = await this.renderContent(this.props);\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidUpdate(prevProps: TableCellContentProps) {\r\n if (this.doPropsDiffer(prevProps, this.props)) {\r\n const content = await this.renderContent(this.props);\r\n\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n return this.state.content;\r\n }\r\n}\r\n\r\n/** Properties for the [[TableIconCellContent]] React component\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableIconCellContentProps {\r\n /** Icon name */\r\n iconName: string;\r\n}\r\n\r\n/**\r\n * A React component that renders table cell content as a Bentley icon\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport class TableIconCellContent extends React.PureComponent<TableIconCellContentProps> {\r\n /** @internal */\r\n public override render() {\r\n return <Icon iconSpec={this.props.iconName} />;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableCell.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4BAA0B;AAC1B,4DAAoC;AACpC,6CAA+B;AAC/B,kDAA4D;AAC5D,mEAAsF;AACtF,0DAA+D;AAC/D,gFAE+C;AAyB/C;;;;GAIG;AACH,MAAa,SAAU,SAAQ,KAAK,CAAC,aAA6B;IAChE,gBAAgB;IACA,MAAM;QAEpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACpE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBAEvB,oBAAC,iCAAe,IACd,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,KACnB,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAC/B,CACE,CACP,CAAC;SACH;QAED,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACpE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACn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CAAC,KAAK,CAAC,OAAO,CAAC;IAC5B,CAAC;CACF;AAxED,4CAwEC;AAWD;;;;GAIG;AACH,MAAa,oBAAqB,SAAQ,KAAK,CAAC,aAAwC;IACtF,gBAAgB;IACA,MAAM;QACpB,OAAO,oBAAC,iBAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAI,CAAC;IACjD,CAAC;CACF;AALD,oDAKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport \"./TableCell.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps, Icon, Omit } from \"@itwin/core-react\";\r\nimport { EditorContainer, EditorContainerProps } from \"../../editors/EditorContainer\";\r\nimport { ItemStyleProvider } from \"../../properties/ItemStyle\";\r\nimport {\r\n PropertyContainerType, PropertyDialogState, PropertyValueRendererContext, PropertyValueRendererManager,\r\n} from \"../../properties/ValueRendererManager\";\r\nimport { CellItem } from \"../TableDataProvider\";\r\n\r\n/**\r\n * Properties of the [[TableCell]] React component\r\n * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableCellProps extends CommonProps {\r\n /** Additional class name for the cell container */\r\n className?: string;\r\n /** Title of the cell container */\r\n title: string;\r\n /** Cell content */\r\n children?: React.ReactNode;\r\n /** Click event callback */\r\n onClick?: (e: React.MouseEvent) => void;\r\n /** MouseMove event callback */\r\n onMouseMove?: (e: React.MouseEvent) => void;\r\n /** MouseDown event callback */\r\n onMouseDown?: (e: React.MouseEvent) => void;\r\n /** Properties for [[EditorContainer]]. Activates cell editing and provides properties to the container */\r\n cellEditingProps?: Omit<EditorContainerProps, \"title\">;\r\n}\r\n\r\n/**\r\n * A React component that renders a table cell\r\n * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this class.\r\n * @public\r\n */\r\nexport class TableCell extends React.PureComponent<TableCellProps> {\r\n /** @internal */\r\n public override render() {\r\n\r\n if (this.props.cellEditingProps) {\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <EditorContainer\r\n title={this.props.title}\r\n {...this.props.cellEditingProps}\r\n />\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n title={this.props.title}\r\n onClick={this.props.onClick}\r\n onMouseMove={this.props.onMouseMove}\r\n onMouseDown={this.props.onMouseDown}\r\n role=\"presentation\"\r\n >\r\n {this.props.children}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Properties of the [[TableCellContent]] React component\r\n * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableCellContentProps extends CommonProps {\r\n /** Indicates, whether container cell is selected or not */\r\n isSelected: boolean;\r\n /** Props for the item that will be rendered */\r\n cellItem: CellItem;\r\n /** Height of the component */\r\n height?: number;\r\n /** Callback to DialogOpen event */\r\n onDialogOpen?: (state: PropertyDialogState) => void;\r\n /** Property value renderer manager */\r\n propertyValueRendererManager: PropertyValueRendererManager;\r\n}\r\n\r\n/** State of the [[TableCellContent]] React component\r\n * @internal @deprecated\r\n */\r\ninterface TableCellContentState {\r\n /** Rendered content */\r\n content: React.ReactNode;\r\n}\r\n\r\n/** A React component that renders table cell content\r\n * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this class.\r\n * @public\r\n */\r\nexport class TableCellContent extends React.PureComponent<TableCellContentProps, TableCellContentState> {\r\n /** @internal */\r\n public override readonly state: TableCellContentState = {\r\n content: <div className={this.props.className} style={this.getStyle(this.props.cellItem, this.props.isSelected, this.props.height)} />,\r\n };\r\n\r\n private _isMounted = false;\r\n\r\n private getStyle(cellItem: CellItem, isSelected: boolean, height?: number): React.CSSProperties {\r\n return {\r\n ...ItemStyleProvider.createStyle(cellItem.style ? cellItem.style : {}, isSelected),\r\n textAlign: cellItem.alignment,\r\n height,\r\n lineHeight: `${height}px`, // Centers text vertically\r\n ...this.props.style,\r\n };\r\n }\r\n\r\n private async renderContent(props: TableCellContentProps) {\r\n const style = this.getStyle(props.cellItem, props.isSelected, props.height);\r\n\r\n if (!props.cellItem.record)\r\n return <div className={this.props.className} style={style} />;\r\n\r\n const rendererContext: PropertyValueRendererContext = {\r\n containerType: PropertyContainerType.Table,\r\n onDialogOpen: this.props.onDialogOpen,\r\n style,\r\n // TODO: Enable, when table gets refactored. Explanation in ./../table/NonPrimitiveValueRenderer\r\n // onPopupShow: this._onPopupShow,\r\n // onPopupHide: this._onPopupHide,\r\n };\r\n\r\n return this.props.propertyValueRendererManager.render(props.cellItem.record, rendererContext);\r\n }\r\n\r\n private doPropsDiffer(props1: TableCellContentProps, props2: TableCellContentProps) {\r\n return props1.cellItem !== props2.cellItem\r\n || props1.isSelected !== props2.isSelected\r\n || props1.onDialogOpen !== props2.onDialogOpen\r\n || props1.propertyValueRendererManager !== props2.propertyValueRendererManager;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidMount() {\r\n this._isMounted = true;\r\n const content = await this.renderContent(this.props);\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidUpdate(prevProps: TableCellContentProps) {\r\n if (this.doPropsDiffer(prevProps, this.props)) {\r\n const content = await this.renderContent(this.props);\r\n\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n return this.state.content;\r\n }\r\n}\r\n\r\n/** Properties for the [[TableIconCellContent]] React component\r\n * @deprecated in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableIconCellContentProps {\r\n /** Icon name */\r\n iconName: string;\r\n}\r\n\r\n/**\r\n * A React component that renders table cell content as a Bentley icon\r\n * @deprecated in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport class TableIconCellContent extends React.PureComponent<TableIconCellContentProps> {\r\n /** @internal */\r\n public override render() {\r\n return <Icon iconSpec={this.props.iconName} />;\r\n }\r\n}\r\n"]}
@@ -6,7 +6,7 @@ import { DistinctValueCollection, FilterableColumn, FilterableTable } from "../c
6
6
  import { FilterableColumnBase } from "../columnfiltering/FilterableColumnBase";
7
7
  import { ColumnDescription, TableDataProvider } from "../TableDataProvider";
8
8
  /** ReactDataGrid.Column with additional properties
9
- * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
9
+ * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
10
10
  * @public
11
11
  */
12
12
  export interface ReactDataGridColumn extends ReactDataGrid.Column<any> {
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumn.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableColumn.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;AAGH,wEAAgH;AAChH,kFAA+E;AAgB/E;;GAEG;AACH,MAAa,WAAY,SAAQ,2CAAoB;IAEnD,YAAY,eAAgC,EAAE,iBAAoC,EAAkB,mBAAwC;QAC1I,KAAK,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;QADwD,wBAAmB,GAAnB,mBAAmB,CAAqB;IAE5I,CAAC;IAED,IAAW,GAAG,KAAa,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAMzD;;OAEG;IACI,KAAK,CAAC,iBAAiB,CAAC,iBAA0B;QACvD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB;YAC1D,OAAO,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;QAC1E,OAAO,IAAI,yCAAuB,EAAE,CAAC;IACvC,CAAC;CACF;AApBD,kCAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport ReactDataGrid from \"react-data-grid\";\r\nimport { DistinctValueCollection, FilterableColumn, FilterableTable } from \"../columnfiltering/ColumnFiltering\";\r\nimport { FilterableColumnBase } from \"../columnfiltering/FilterableColumnBase\";\r\nimport { ColumnDescription, TableDataProvider } from \"../TableDataProvider\";\r\n\r\n// cSpell:ignore columnfiltering\r\n\r\n/** ReactDataGrid.Column with additional properties\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface ReactDataGridColumn extends ReactDataGrid.Column<any> {\r\n /** Indicates whether the display value for the cell is treated as an icon spec. */\r\n icon?: boolean;\r\n /* Table column filtering info */\r\n filterableColumn?: FilterableColumn;\r\n}\r\n\r\n/** Table Column used by the [[Table]] component\r\n * @internal\r\n */\r\nexport class TableColumn extends FilterableColumnBase {\r\n\r\n constructor(filterableTable: FilterableTable, columnDescription: ColumnDescription, public readonly reactDataGridColumn: ReactDataGridColumn) {\r\n super(filterableTable, columnDescription);\r\n }\r\n\r\n public get key(): string { return this.filterMemberKey; }\r\n\r\n public dataProvider?: TableDataProvider;\r\n\r\n public distinctValueCollection?: DistinctValueCollection;\r\n\r\n /** Gets the distinct values for a column.\r\n * @return The distinct values.\r\n */\r\n public async getDistinctValues(maximumValueCount?: number): Promise<DistinctValueCollection> {\r\n if (this.dataProvider && this.dataProvider.getDistinctValues)\r\n return this.dataProvider.getDistinctValues(this.key, maximumValueCount);\r\n return new DistinctValueCollection();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"TableColumn.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableColumn.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;AAGH,wEAAgH;AAChH,kFAA+E;AAgB/E;;GAEG;AACH,MAAa,WAAY,SAAQ,2CAAoB;IAEnD,YAAY,eAAgC,EAAE,iBAAoC,EAAkB,mBAAwC;QAC1I,KAAK,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;QADwD,wBAAmB,GAAnB,mBAAmB,CAAqB;IAE5I,CAAC;IAED,IAAW,GAAG,KAAa,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAMzD;;OAEG;IACI,KAAK,CAAC,iBAAiB,CAAC,iBAA0B;QACvD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB;YAC1D,OAAO,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;QAC1E,OAAO,IAAI,yCAAuB,EAAE,CAAC;IACvC,CAAC;CACF;AApBD,kCAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport ReactDataGrid from \"react-data-grid\";\r\nimport { DistinctValueCollection, FilterableColumn, FilterableTable } from \"../columnfiltering/ColumnFiltering\";\r\nimport { FilterableColumnBase } from \"../columnfiltering/FilterableColumnBase\";\r\nimport { ColumnDescription, TableDataProvider } from \"../TableDataProvider\";\r\n\r\n// cSpell:ignore columnfiltering\r\n\r\n/** ReactDataGrid.Column with additional properties\r\n * @deprecated in 3.0. Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface ReactDataGridColumn extends ReactDataGrid.Column<any> {\r\n /** Indicates whether the display value for the cell is treated as an icon spec. */\r\n icon?: boolean;\r\n /* Table column filtering info */\r\n filterableColumn?: FilterableColumn;\r\n}\r\n\r\n/** Table Column used by the [[Table]] component\r\n * @internal\r\n */\r\nexport class TableColumn extends FilterableColumnBase {\r\n\r\n constructor(filterableTable: FilterableTable, columnDescription: ColumnDescription, public readonly reactDataGridColumn: ReactDataGridColumn) {\r\n super(filterableTable, columnDescription);\r\n }\r\n\r\n public get key(): string { return this.filterMemberKey; }\r\n\r\n public dataProvider?: TableDataProvider;\r\n\r\n public distinctValueCollection?: DistinctValueCollection;\r\n\r\n /** Gets the distinct values for a column.\r\n * @return The distinct values.\r\n */\r\n public async getDistinctValues(maximumValueCount?: number): Promise<DistinctValueCollection> {\r\n if (this.dataProvider && this.dataProvider.getDistinctValues)\r\n return this.dataProvider.getDistinctValues(this.key, maximumValueCount);\r\n return new DistinctValueCollection();\r\n }\r\n}\r\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  /**
6
6
  * Context component for DragDrop API. All DragSources and DropTargets used in the application must be contained in this component.
7
7
  * @beta
8
- * @deprecated
8
+ * @deprecated in 2.x.
9
9
  */
10
10
  export declare function BeDragDropContext(props: {
11
11
  children?: React.ReactNode;
@@ -33,7 +33,7 @@ const react_dnd_html5_backend_1 = require("react-dnd-html5-backend");
33
33
  /**
34
34
  * Context component for DragDrop API. All DragSources and DropTargets used in the application must be contained in this component.
35
35
  * @beta
36
- * @deprecated
36
+ * @deprecated in 2.x.
37
37
  */
38
38
  function BeDragDropContext(props) {
39
39
  return React.createElement(react_dnd_1.DndProvider, { backend: react_dnd_html5_backend_1.HTML5Backend }, props.children);
@@ -1 +1 @@
1
- {"version":3,"file":"BeDragDropContext.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/BeDragDropContext.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,yCAAwC;AACxC,qEAAuD;AAEvD;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,KAAqC;IACrE,OAAO,oBAAC,uBAAW,IAAC,OAAO,EAAE,sCAAY,IAAG,KAAK,CAAC,QAAQ,CAAe,CAAC;AAC5E,CAAC;AAFD,8CAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { DndProvider } from \"react-dnd\";\r\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\r\n\r\n/**\r\n * Context component for DragDrop API. All DragSources and DropTargets used in the application must be contained in this component.\r\n * @beta\r\n * @deprecated\r\n */\r\nexport function BeDragDropContext(props: { children?: React.ReactNode }) {\r\n return <DndProvider backend={HTML5Backend}>{props.children}</DndProvider>;\r\n}\r\n"]}
1
+ {"version":3,"file":"BeDragDropContext.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/BeDragDropContext.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,yCAAwC;AACxC,qEAAuD;AAEvD;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,KAAqC;IACrE,OAAO,oBAAC,uBAAW,IAAC,OAAO,EAAE,sCAAY,IAAG,KAAK,CAAC,QAAQ,CAAe,CAAC;AAC5E,CAAC;AAFD,8CAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { DndProvider } from \"react-dnd\";\r\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\r\n\r\n/**\r\n * Context component for DragDrop API. All DragSources and DropTargets used in the application must be contained in this component.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport function BeDragDropContext(props: { children?: React.ReactNode }) {\r\n return <DndProvider backend={HTML5Backend}>{props.children}</DndProvider>;\r\n}\r\n"]}
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import { CommonProps } from "@itwin/core-react";
6
6
  /** Enum for different DropEffects.
7
7
  * @beta
8
- * @deprecated
8
+ * @deprecated in 2.x.
9
9
  */
10
10
  export declare enum DropEffects {
11
11
  None = 0,
@@ -15,7 +15,7 @@ export declare enum DropEffects {
15
15
  }
16
16
  /** Enum for status of current drag/drop item
17
17
  * @beta
18
- * @deprecated
18
+ * @deprecated in 2.x.
19
19
  */
20
20
  export declare enum DropStatus {
21
21
  None = 0,
@@ -25,7 +25,7 @@ export declare enum DropStatus {
25
25
  }
26
26
  /** Properties and callbacks for the withDragSource Higher-Order Component.
27
27
  * @beta
28
- * @deprecated
28
+ * @deprecated in 2.x.
29
29
  */
30
30
  export interface DropTargetProps<DragDropObject = any> {
31
31
  /**
@@ -42,7 +42,7 @@ export interface DropTargetProps<DragDropObject = any> {
42
42
  }
43
43
  /** Properties and callbacks for the withDragSource Higher-Order Component.
44
44
  * @beta
45
- * @deprecated
45
+ * @deprecated in 2.x.
46
46
  */
47
47
  export interface DragSourceProps<DragDropObject = any> {
48
48
  /** Triggered when DragSource has begun a drag. */
@@ -66,7 +66,7 @@ export interface DragSourceProps<DragDropObject = any> {
66
66
  }
67
67
  /** Base DragDropArguments interface, used by both DragSourceArguments and DragTargetArguments.
68
68
  * @beta
69
- * @deprecated
69
+ * @deprecated in 2.x.
70
70
  */
71
71
  export interface DragDropArguments<DragDropObject = any> {
72
72
  /** Arbitrary data being transferred. Actual data structure determined by the return value of the onDragSourceBegin callback. */
@@ -124,14 +124,14 @@ export interface DragDropArguments<DragDropObject = any> {
124
124
  }
125
125
  /** Properties for DragLayer components
126
126
  * @beta
127
- * @deprecated
127
+ * @deprecated in 2.x.
128
128
  */
129
129
  export interface DragLayerProps<DragDropObject = any> extends CommonProps {
130
130
  args?: DragSourceArguments<DragDropObject>;
131
131
  }
132
132
  /** Interface for arguments supplied to DragSource callbacks, including onDragSourceBegin, and onDragSourceEnd, as well as to the DragLayers as a prop.
133
133
  * @beta
134
- * @deprecated
134
+ * @deprecated in 2.x.
135
135
  */
136
136
  export interface DragSourceArguments<DragDropObject = any> extends DragDropArguments<DragDropObject> {
137
137
  /** Parent object, using the data structure relevant to object being used.
@@ -143,7 +143,7 @@ export interface DragSourceArguments<DragDropObject = any> extends DragDropArgum
143
143
  }
144
144
  /** Interface for arguments supplied to DropTarget callbacks, including onDropTargetOver, onDropTargetDrop, and canDropTargetDrop.
145
145
  * @beta
146
- * @deprecated
146
+ * @deprecated in 2.x.
147
147
  */
148
148
  export interface DropTargetArguments<DragDropObject = any> extends DragSourceArguments<DragDropObject> {
149
149
  /** Object that is being dropped onto, using the data structure relevant to object being used.
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.DropStatus = exports.DropEffects = void 0;
11
11
  /** Enum for different DropEffects.
12
12
  * @beta
13
- * @deprecated
13
+ * @deprecated in 2.x.
14
14
  */
15
15
  var DropEffects;
16
16
  (function (DropEffects) {
@@ -21,7 +21,7 @@ var DropEffects;
21
21
  })(DropEffects = exports.DropEffects || (exports.DropEffects = {}));
22
22
  /** Enum for status of current drag/drop item
23
23
  * @beta
24
- * @deprecated
24
+ * @deprecated in 2.x.
25
25
  */
26
26
  var DropStatus;
27
27
  (function (DropStatus) {
@@ -1 +1 @@
1
- {"version":3,"file":"DragDropDef.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/DragDropDef.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,6CAAQ,CAAA;IACR,6CAAa,CAAA;IACb,6CAAa,CAAA;IACb,6CAAa,CAAA;AACf,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED;;;GAGG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAAQ,CAAA;IACR,uCAAE,CAAA;IACF,2CAAI,CAAA;IACJ,+CAAM,CAAA;AACR,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\n\r\n/** Enum for different DropEffects.\r\n * @beta\r\n * @deprecated\r\n */\r\nexport enum DropEffects {\r\n None = 0,\r\n Copy = 1 << 0,\r\n Move = 1 << 1,\r\n Link = 1 << 2,\r\n}\r\n\r\n/** Enum for status of current drag/drop item\r\n * @beta\r\n * @deprecated\r\n */\r\nexport enum DropStatus {\r\n None = 0,\r\n Ok,\r\n Drop,\r\n Cancel,\r\n}\r\n\r\n/** Properties and callbacks for the withDragSource Higher-Order Component.\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface DropTargetProps<DragDropObject = any> {\r\n /**\r\n * Triggered when item is dropped on wrapped component.\r\n * Return value is passed to the DragSource's onDragSourceEnd callback.\r\n */\r\n onDropTargetDrop?: (args: DropTargetArguments<DragDropObject>) => DropTargetArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /** Triggered when item is dragged over wrapped component. */\r\n onDropTargetOver?: (args: DropTargetArguments<DragDropObject>) => void; // eslint-disable-line deprecation/deprecation\r\n /** Determines whether item may be dropped on DropTarget. */\r\n canDropTargetDrop?: (args: DropTargetArguments<DragDropObject>) => boolean; // eslint-disable-line deprecation/deprecation\r\n /** List of allowed object types */\r\n objectTypes?: Array<string | symbol> | (() => Array<string | symbol>);\r\n}\r\n\r\n/** Properties and callbacks for the withDragSource Higher-Order Component.\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface DragSourceProps<DragDropObject = any> {\r\n /** Triggered when DragSource has begun a drag. */\r\n onDragSourceBegin?: (data: DragSourceArguments<DragDropObject>) => DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /**\r\n * Triggered when a DragSource drag has ended.\r\n * Callback is always called after an onDragSourceBegin callback, regardless of whether the drag was successful.\r\n */\r\n onDragSourceEnd?: (data: DragSourceArguments<DragDropObject>) => void; // eslint-disable-line deprecation/deprecation\r\n /**\r\n * Specifies the DragSource type.\r\n * data parameter is non-null when data is trickled down from dragged component.\r\n */\r\n objectType?: ((data?: DragDropObject) => string | symbol) | string | symbol;\r\n /**\r\n * Specifies a default DragLayer component to display as a drag preview.\r\n * This property is dependent on the DragDropLayerManager in appui-react. The DragLayer is ultimately rendered using the DragDropLayerRendererComponent, which must exist within the app that is used.\r\n * Component may be overridden if another DragLayer is registered for the given type using the DragDropLayerManager in appui-react.\r\n */\r\n defaultDragLayer?: React.ComponentType<DragLayerProps<DragDropObject>>; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Base DragDropArguments interface, used by both DragSourceArguments and DragTargetArguments.\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface DragDropArguments<DragDropObject = any> {\r\n /** Arbitrary data being transferred. Actual data structure determined by the return value of the onDragSourceBegin callback. */\r\n dataObject: DragDropObject;\r\n /** Drop Effect of current drag */\r\n dropEffect: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** Status of current drop */\r\n dropStatus: DropStatus; // eslint-disable-line deprecation/deprecation\r\n /** Current mouse position. */\r\n clientOffset: { x: number, y: number };\r\n /** Mouse position at beginning of drag. */\r\n initialClientOffset: { x: number, y: number };\r\n /**\r\n * Current mouse position, offset by the difference between initial mouse position and initial dragSource offset.\r\n * Useful for preserving apparent anchor point of mouse to dragSource while rendering a dragPreview.\r\n */\r\n sourceClientOffset?: { x: number, y: number };\r\n /** Position of top left corner of current dragSource, measured at beginning of drag. */\r\n initialSourceClientOffset?: { x: number, y: number };\r\n /** DOMRect object of dragSource.\r\n * Not available in canDropTargetDrop.\r\n */\r\n dragRect?: DOMRect;\r\n /** DOMRect object of current dropTarget, if available.\r\n * Not available in canDropTargetDrop.\r\n */\r\n dropRect?: DOMRect;\r\n /** determines whether item is dropped on same structure as the drag source, or a different structure.\r\n * Passed from OnDropTargetDrop for use in OnDragSourceEnd\r\n * Used primarily for cases where the dataProvider object needs to differentiate a moveItem method with a subsequent removeItem then addItem.\r\n */\r\n local?: boolean;\r\n /** specifies the row to be dropped onto.\r\n * Populated by consumers for trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. insertRow(rowIndex, rowItem) type methods.\r\n */\r\n row?: number;\r\n /** specifies the col to be dropped onto.\r\n * Populated by consumers for trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. dataProvider.insertCol(colIndex, colItem) type methods.\r\n */\r\n col?: number;\r\n}\r\n\r\n/** Properties for DragLayer components\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface DragLayerProps<DragDropObject = any> extends CommonProps {\r\n args?: DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Interface for arguments supplied to DragSource callbacks, including onDragSourceBegin, and onDragSourceEnd, as well as to the DragLayers as a prop.\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface DragSourceArguments<DragDropObject = any> extends DragDropArguments<DragDropObject> { // eslint-disable-line deprecation/deprecation\r\n /** Parent object, using the data structure relevant to object being used.\r\n * Object populated by consumer for use as trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. dataProvider.removeChild(parentObject, child) type methods.\r\n */\r\n parentObject?: DragDropObject;\r\n defaultDragLayer?: React.ComponentType<DragLayerProps<DragDropObject>>; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Interface for arguments supplied to DropTarget callbacks, including onDropTargetOver, onDropTargetDrop, and canDropTargetDrop.\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface DropTargetArguments<DragDropObject = any> extends DragSourceArguments<DragDropObject> { // eslint-disable-line deprecation/deprecation\r\n /** Object that is being dropped onto, using the data structure relevant to object being used.\r\n * Object populated by consumer for use as trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. dataProvider.addChild(dropLocation, child) type methods.\r\n */\r\n dropLocation?: DragDropObject; // Where to attach\r\n}\r\n"]}
1
+ {"version":3,"file":"DragDropDef.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/DragDropDef.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,6CAAQ,CAAA;IACR,6CAAa,CAAA;IACb,6CAAa,CAAA;IACb,6CAAa,CAAA;AACf,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED;;;GAGG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAAQ,CAAA;IACR,uCAAE,CAAA;IACF,2CAAI,CAAA;IACJ,+CAAM,CAAA;AACR,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\n\r\n/** Enum for different DropEffects.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport enum DropEffects {\r\n None = 0,\r\n Copy = 1 << 0,\r\n Move = 1 << 1,\r\n Link = 1 << 2,\r\n}\r\n\r\n/** Enum for status of current drag/drop item\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport enum DropStatus {\r\n None = 0,\r\n Ok,\r\n Drop,\r\n Cancel,\r\n}\r\n\r\n/** Properties and callbacks for the withDragSource Higher-Order Component.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface DropTargetProps<DragDropObject = any> {\r\n /**\r\n * Triggered when item is dropped on wrapped component.\r\n * Return value is passed to the DragSource's onDragSourceEnd callback.\r\n */\r\n onDropTargetDrop?: (args: DropTargetArguments<DragDropObject>) => DropTargetArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /** Triggered when item is dragged over wrapped component. */\r\n onDropTargetOver?: (args: DropTargetArguments<DragDropObject>) => void; // eslint-disable-line deprecation/deprecation\r\n /** Determines whether item may be dropped on DropTarget. */\r\n canDropTargetDrop?: (args: DropTargetArguments<DragDropObject>) => boolean; // eslint-disable-line deprecation/deprecation\r\n /** List of allowed object types */\r\n objectTypes?: Array<string | symbol> | (() => Array<string | symbol>);\r\n}\r\n\r\n/** Properties and callbacks for the withDragSource Higher-Order Component.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface DragSourceProps<DragDropObject = any> {\r\n /** Triggered when DragSource has begun a drag. */\r\n onDragSourceBegin?: (data: DragSourceArguments<DragDropObject>) => DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /**\r\n * Triggered when a DragSource drag has ended.\r\n * Callback is always called after an onDragSourceBegin callback, regardless of whether the drag was successful.\r\n */\r\n onDragSourceEnd?: (data: DragSourceArguments<DragDropObject>) => void; // eslint-disable-line deprecation/deprecation\r\n /**\r\n * Specifies the DragSource type.\r\n * data parameter is non-null when data is trickled down from dragged component.\r\n */\r\n objectType?: ((data?: DragDropObject) => string | symbol) | string | symbol;\r\n /**\r\n * Specifies a default DragLayer component to display as a drag preview.\r\n * This property is dependent on the DragDropLayerManager in appui-react. The DragLayer is ultimately rendered using the DragDropLayerRendererComponent, which must exist within the app that is used.\r\n * Component may be overridden if another DragLayer is registered for the given type using the DragDropLayerManager in appui-react.\r\n */\r\n defaultDragLayer?: React.ComponentType<DragLayerProps<DragDropObject>>; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Base DragDropArguments interface, used by both DragSourceArguments and DragTargetArguments.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface DragDropArguments<DragDropObject = any> {\r\n /** Arbitrary data being transferred. Actual data structure determined by the return value of the onDragSourceBegin callback. */\r\n dataObject: DragDropObject;\r\n /** Drop Effect of current drag */\r\n dropEffect: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** Status of current drop */\r\n dropStatus: DropStatus; // eslint-disable-line deprecation/deprecation\r\n /** Current mouse position. */\r\n clientOffset: { x: number, y: number };\r\n /** Mouse position at beginning of drag. */\r\n initialClientOffset: { x: number, y: number };\r\n /**\r\n * Current mouse position, offset by the difference between initial mouse position and initial dragSource offset.\r\n * Useful for preserving apparent anchor point of mouse to dragSource while rendering a dragPreview.\r\n */\r\n sourceClientOffset?: { x: number, y: number };\r\n /** Position of top left corner of current dragSource, measured at beginning of drag. */\r\n initialSourceClientOffset?: { x: number, y: number };\r\n /** DOMRect object of dragSource.\r\n * Not available in canDropTargetDrop.\r\n */\r\n dragRect?: DOMRect;\r\n /** DOMRect object of current dropTarget, if available.\r\n * Not available in canDropTargetDrop.\r\n */\r\n dropRect?: DOMRect;\r\n /** determines whether item is dropped on same structure as the drag source, or a different structure.\r\n * Passed from OnDropTargetDrop for use in OnDragSourceEnd\r\n * Used primarily for cases where the dataProvider object needs to differentiate a moveItem method with a subsequent removeItem then addItem.\r\n */\r\n local?: boolean;\r\n /** specifies the row to be dropped onto.\r\n * Populated by consumers for trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. insertRow(rowIndex, rowItem) type methods.\r\n */\r\n row?: number;\r\n /** specifies the col to be dropped onto.\r\n * Populated by consumers for trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. dataProvider.insertCol(colIndex, colItem) type methods.\r\n */\r\n col?: number;\r\n}\r\n\r\n/** Properties for DragLayer components\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface DragLayerProps<DragDropObject = any> extends CommonProps {\r\n args?: DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Interface for arguments supplied to DragSource callbacks, including onDragSourceBegin, and onDragSourceEnd, as well as to the DragLayers as a prop.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface DragSourceArguments<DragDropObject = any> extends DragDropArguments<DragDropObject> { // eslint-disable-line deprecation/deprecation\r\n /** Parent object, using the data structure relevant to object being used.\r\n * Object populated by consumer for use as trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. dataProvider.removeChild(parentObject, child) type methods.\r\n */\r\n parentObject?: DragDropObject;\r\n defaultDragLayer?: React.ComponentType<DragLayerProps<DragDropObject>>; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** Interface for arguments supplied to DropTarget callbacks, including onDropTargetOver, onDropTargetDrop, and canDropTargetDrop.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface DropTargetArguments<DragDropObject = any> extends DragSourceArguments<DragDropObject> { // eslint-disable-line deprecation/deprecation\r\n /** Object that is being dropped onto, using the data structure relevant to object being used.\r\n * Object populated by consumer for use as trickle down arguments.\r\n * Specifically used where further information is needed within a given dataProvider structure. Ie. dataProvider.addChild(dropLocation, child) type methods.\r\n */\r\n dropLocation?: DragDropObject; // Where to attach\r\n}\r\n"]}
@@ -6,7 +6,7 @@ import { ConnectDragPreview, ConnectDragSource, DndComponentClass } from "react-
6
6
  import { DragSourceProps, DropEffects } from "./DragDropDef";
7
7
  /** React properties for withDragSource Higher-Order Component
8
8
  * @beta
9
- * @deprecated
9
+ * @deprecated in 2.x.
10
10
  */
11
11
  export interface WithDragSourceProps<DragDropObject = any> {
12
12
  /** Properties and callbacks for DragSource. */
@@ -36,7 +36,7 @@ export interface WithDragSourceProps<DragDropObject = any> {
36
36
  * HOC (Higher-Order Component) that transforms wrapped component into a DragSource.
37
37
  * @param Component component to wrap.
38
38
  * @beta
39
- * @deprecated
39
+ * @deprecated in 2.x.
40
40
  */
41
41
  export declare const withDragSource: <ComponentProps extends {}, DragDropObject = any>(Component: React.ComponentType<ComponentProps>) => DndComponentClass<typeof React.Component, ComponentProps & WithDragSourceProps<DragDropObject>>;
42
42
  //# sourceMappingURL=withDragSource.d.ts.map
@@ -43,7 +43,7 @@ function getEmptyImage() {
43
43
  * HOC (Higher-Order Component) that transforms wrapped component into a DragSource.
44
44
  * @param Component component to wrap.
45
45
  * @beta
46
- * @deprecated
46
+ * @deprecated in 2.x.
47
47
  */
48
48
  // istanbul ignore next
49
49
  const withDragSource = (
@@ -1 +1 @@
1
- {"version":3,"file":"withDragSource.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/withDragSource.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,6CAA+B;AAC/B,yCAAiG;AACjG,+CAAmH;AAoCnH,IAAI,UAAwC,CAAC;AAE7C,SAAS,aAAa;IACpB,IAAI,CAAC,UAAU,EAAE;QACf,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;QACzB,UAAU,CAAC,GAAG;YACZ,4EAA4E,CAAC;KAChF;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;GAKG;AACH,uBAAuB;AAChB,MAAM,cAAc,GAAG;AAC5B,gEAAgE;AAChE,SAA8C,EACmD,EAAE;;IAEnG,OAAO,IAAA,sBAAU,EAAC,CAAC,KAAY,EAAE,EAAE;QACjC,IAA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AAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;oBACzI,oBAAC,SAAS,OAAK,KAAK,KAAO,CAAS,GAAI,CACpC,EACN,EAAE,UAAU,EAAE,CACf,CAAC;YACJ,CAAC;YACe,iBAAiB;gBAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE;oBACjC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,aAAa,EAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAC;iBACvF;gBACD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;gBACzD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;YACzD,CAAC;YACe,oBAAoB;gBAClC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;gBAC5D,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;YAC5D,CAAC;SAUF;QAxDe,eAAY,GAAQ;YAChC,iBAAiB,EAAE,yBAAW,CAAC,IAAI;YACnC,cAAc,EAAE,yBAAW,CAAC,IAAI;YAChC,aAAa,EAAE,yBAAW,CAAC,IAAI,EAAE,8CAA8C;SAC/E;YAoDK,CAAC;AACZ,CAAC,CAAC;AAnJW,QAAA,cAAc,kBAmJzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\nimport * as React from \"react\";\r\nimport { ConnectDragPreview, ConnectDragSource, DndComponentClass, DragSource } from \"react-dnd\";\r\nimport { DragSourceArguments, DragSourceProps, DropEffects, DropStatus, DropTargetArguments } from \"./DragDropDef\";\r\n\r\n/** React properties for withDragSource Higher-Order Component\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface WithDragSourceProps<DragDropObject = any> {\r\n /** Properties and callbacks for DragSource. */\r\n dragProps: DragSourceProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /** Style properties for dropTarget wrapper element */\r\n dragStyle?: React.CSSProperties;\r\n /** Which dropEffect dragSource should default to. */\r\n defaultDropEffect?: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** Which dropEffect dragSource should be used when ctrl button is pressed during start of drag. */\r\n ctrlDropEffect?: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** Which dropEffect dragSource should be used when alt button is pressed during start of drag. */\r\n altDropEffect?: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** @internal */\r\n connectDragSource?: ConnectDragSource;\r\n /** @internal */\r\n connectDragPreview?: ConnectDragPreview;\r\n /** @internal */\r\n isDragging?: boolean;\r\n /** @internal */\r\n canDrag?: boolean;\r\n /** @internal */\r\n item?: DragDropObject;\r\n /** @internal */\r\n type?: string | symbol | null;\r\n}\r\n\r\n/** @internal */\r\ninterface WithDragSourceState {\r\n ctrlKey: boolean;\r\n altKey: boolean;\r\n}\r\nlet emptyImage: HTMLImageElement | undefined;\r\n\r\nfunction getEmptyImage(): HTMLImageElement {\r\n if (!emptyImage) {\r\n emptyImage = new Image();\r\n emptyImage.src =\r\n \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\r\n }\r\n return emptyImage;\r\n}\r\n\r\n/**\r\n * HOC (Higher-Order Component) that transforms wrapped component into a DragSource.\r\n * @param Component component to wrap.\r\n * @beta\r\n * @deprecated\r\n */\r\n// istanbul ignore next\r\nexport const withDragSource = <ComponentProps extends {}, DragDropObject = any>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.ComponentType<ComponentProps>,\r\n): DndComponentClass<typeof React.Component, ComponentProps & WithDragSourceProps<DragDropObject>> => { // eslint-disable-line deprecation/deprecation\r\n type Props = ComponentProps & WithDragSourceProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n return DragSource((props: Props) => {\r\n if (props.dragProps.objectType) {\r\n if (typeof props.dragProps.objectType === \"function\")\r\n return props.dragProps.objectType();\r\n else\r\n return props.dragProps.objectType;\r\n }\r\n return \"\";\r\n }, {\r\n beginDrag(props, _monitor, component) {\r\n let dropEffect = props.defaultDropEffect || DropEffects.Move; // eslint-disable-line deprecation/deprecation\r\n if (component.state.ctrlKey) {\r\n dropEffect = props.ctrlDropEffect || DropEffects.Copy; // eslint-disable-line deprecation/deprecation\r\n } else if (component.state.altKey) {\r\n dropEffect = props.altDropEffect || DropEffects.Link; // eslint-disable-line deprecation/deprecation\r\n }\r\n let dragRect: DOMRect = new DOMRect();\r\n const componentElement = component.rootElement;\r\n if (componentElement) {\r\n dragRect = componentElement.getBoundingClientRect();\r\n }\r\n const obj: DragSourceArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n dataObject: {} as DragDropObject,\r\n dropEffect,\r\n dropStatus: DropStatus.None, // eslint-disable-line deprecation/deprecation\r\n dragRect,\r\n defaultDragLayer: props.dragProps.defaultDragLayer,\r\n clientOffset: { x: dragRect.left || 0, y: dragRect.top || 0 },\r\n initialClientOffset: { x: dragRect.left || 0, y: dragRect.top || 0 },\r\n };\r\n if (props.dragProps.onDragSourceBegin) return props.dragProps.onDragSourceBegin(obj);\r\n return obj;\r\n },\r\n endDrag(props, monitor, component) {\r\n let dragRect: DOMRect = new DOMRect();\r\n const componentElement = component && component.rootElement;\r\n if (componentElement) {\r\n dragRect = componentElement.getBoundingClientRect();\r\n }\r\n // eslint-disable-next-line deprecation/deprecation\r\n const obj: DropTargetArguments<DragDropObject> = monitor.getDropResult() as DropTargetArguments<DragDropObject> || // if onDropTargetDrop returns a value\r\n // eslint-disable-next-line deprecation/deprecation\r\n monitor.getItem() as DropTargetArguments<DragDropObject> || // otherwise, get current drag item.\r\n { // fallback\r\n dataObject: {},\r\n dropEffect: DropEffects.None, // eslint-disable-line deprecation/deprecation\r\n dropStatus: DropStatus.None, // eslint-disable-line deprecation/deprecation\r\n dragRect,\r\n clientOffset: { x: 0, y: 0 },\r\n initialClientOffset: { x: 0, y: 0 },\r\n sourceClientOffset: { x: 0, y: 0 },\r\n initialSourceClientOffset: { x: 0, y: 0 },\r\n };\r\n const {\r\n dataObject,\r\n dropEffect, dropStatus, dropRect,\r\n initialClientOffset, initialSourceClientOffset,\r\n local, row, col } = obj;\r\n\r\n const clientOffset = monitor.getClientOffset() || obj.clientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || obj.sourceClientOffset;\r\n const dragObj: DragSourceArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n dataObject,\r\n dropEffect, dropStatus, dropRect, dragRect,\r\n clientOffset, initialClientOffset, sourceClientOffset, initialSourceClientOffset,\r\n local, row, col,\r\n };\r\n if (props.dragProps.onDragSourceEnd)\r\n props.dragProps.onDragSourceEnd(dragObj);\r\n },\r\n }, (connect, monitor) => {\r\n return {\r\n connectDragSource: connect.dragSource(),\r\n connectDragPreview: connect.dragPreview(),\r\n isDragging: monitor.isDragging(),\r\n canDrag: monitor.canDrag(),\r\n item: monitor.getItem(),\r\n type: monitor.getItemType(),\r\n };\r\n })(class DragSourceWrapper extends React.Component<any, WithDragSourceState> {\r\n public rootElement: HTMLDivElement | null = null;\r\n public override readonly state: WithDragSourceState = {\r\n ctrlKey: false,\r\n altKey: false,\r\n };\r\n public static defaultProps: any = {\r\n defaultDropEffect: DropEffects.Move, // eslint-disable-line deprecation/deprecation\r\n ctrlDropEffect: DropEffects.Copy, // eslint-disable-line deprecation/deprecation\r\n altDropEffect: DropEffects.Link, // eslint-disable-line deprecation/deprecation\r\n };\r\n public override render() {\r\n const {\r\n dragProps, connectDragSource, connectDragPreview, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n isDragging, canDrag, item, type,\r\n defaultDropEffect, ctrlDropEffect, altDropEffect,\r\n dragStyle, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props as WithDragSourceProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n const p = {\r\n item,\r\n type,\r\n isDragging,\r\n canDrag,\r\n };\r\n const effectMap: { [key: number]: string } = {\r\n [DropEffects.Move]: \"move\", // eslint-disable-line deprecation/deprecation\r\n [DropEffects.Copy]: \"copy\", // eslint-disable-line deprecation/deprecation\r\n [DropEffects.Link]: \"link\", // eslint-disable-line deprecation/deprecation\r\n };\r\n\r\n const defaultEffect = effectMap[defaultDropEffect as number];\r\n const ctrlEffect = effectMap[ctrlDropEffect as number];\r\n const altEffect = effectMap[altDropEffect as number];\r\n\r\n const dropEffect = this.state.ctrlKey ? ctrlEffect || \"copy\" : this.state.altKey ? altEffect || \"link\" : defaultEffect || \"move\";\r\n return connectDragSource!(\r\n <div className=\"drag-source-wrapper\" data-testid=\"drag-source-wrapper\" ref={(el) => { this.rootElement = el; }} style={this.props.dragStyle}>\r\n <Component {...props} {...(p as any)} />\r\n </div>,\r\n { dropEffect },\r\n );\r\n }\r\n public override componentDidMount() {\r\n if (this.props.connectDragPreview) {\r\n this.props.connectDragPreview(getEmptyImage() as any, { captureDraggingState: true });\r\n }\r\n window.addEventListener(\"keydown\", this.handleKeyChange);\r\n window.addEventListener(\"keyup\", this.handleKeyChange);\r\n }\r\n public override componentWillUnmount() {\r\n window.removeEventListener(\"keydown\", this.handleKeyChange);\r\n window.removeEventListener(\"keyup\", this.handleKeyChange);\r\n }\r\n public handleKeyChange = (event: any) => {\r\n const { ctrlKey, altKey } = event;\r\n if (this.state.ctrlKey !== ctrlKey) {\r\n this.setState({ ctrlKey });\r\n }\r\n if (this.state.altKey !== altKey) {\r\n this.setState({ altKey });\r\n }\r\n };\r\n }) as any;\r\n};\r\n"]}
1
+ {"version":3,"file":"withDragSource.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/withDragSource.tsx"],"names":[],"mappings":";;;;;;;;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CAAC,IAAI;YAChC,aAAa,EAAE,yBAAW,CAAC,IAAI,EAAE,8CAA8C;SAC/E;YAoDK,CAAC;AACZ,CAAC,CAAC;AAnJW,QAAA,cAAc,kBAmJzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\nimport * as React from \"react\";\r\nimport { ConnectDragPreview, ConnectDragSource, DndComponentClass, DragSource } from \"react-dnd\";\r\nimport { DragSourceArguments, DragSourceProps, DropEffects, DropStatus, DropTargetArguments } from \"./DragDropDef\";\r\n\r\n/** React properties for withDragSource Higher-Order Component\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface WithDragSourceProps<DragDropObject = any> {\r\n /** Properties and callbacks for DragSource. */\r\n dragProps: DragSourceProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /** Style properties for dropTarget wrapper element */\r\n dragStyle?: React.CSSProperties;\r\n /** Which dropEffect dragSource should default to. */\r\n defaultDropEffect?: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** Which dropEffect dragSource should be used when ctrl button is pressed during start of drag. */\r\n ctrlDropEffect?: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** Which dropEffect dragSource should be used when alt button is pressed during start of drag. */\r\n altDropEffect?: DropEffects; // eslint-disable-line deprecation/deprecation\r\n /** @internal */\r\n connectDragSource?: ConnectDragSource;\r\n /** @internal */\r\n connectDragPreview?: ConnectDragPreview;\r\n /** @internal */\r\n isDragging?: boolean;\r\n /** @internal */\r\n canDrag?: boolean;\r\n /** @internal */\r\n item?: DragDropObject;\r\n /** @internal */\r\n type?: string | symbol | null;\r\n}\r\n\r\n/** @internal */\r\ninterface WithDragSourceState {\r\n ctrlKey: boolean;\r\n altKey: boolean;\r\n}\r\nlet emptyImage: HTMLImageElement | undefined;\r\n\r\nfunction getEmptyImage(): HTMLImageElement {\r\n if (!emptyImage) {\r\n emptyImage = new Image();\r\n emptyImage.src =\r\n \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\r\n }\r\n return emptyImage;\r\n}\r\n\r\n/**\r\n * HOC (Higher-Order Component) that transforms wrapped component into a DragSource.\r\n * @param Component component to wrap.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\n// istanbul ignore next\r\nexport const withDragSource = <ComponentProps extends {}, DragDropObject = any>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.ComponentType<ComponentProps>,\r\n): DndComponentClass<typeof React.Component, ComponentProps & WithDragSourceProps<DragDropObject>> => { // eslint-disable-line deprecation/deprecation\r\n type Props = ComponentProps & WithDragSourceProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n return DragSource((props: Props) => {\r\n if (props.dragProps.objectType) {\r\n if (typeof props.dragProps.objectType === \"function\")\r\n return props.dragProps.objectType();\r\n else\r\n return props.dragProps.objectType;\r\n }\r\n return \"\";\r\n }, {\r\n beginDrag(props, _monitor, component) {\r\n let dropEffect = props.defaultDropEffect || DropEffects.Move; // eslint-disable-line deprecation/deprecation\r\n if (component.state.ctrlKey) {\r\n dropEffect = props.ctrlDropEffect || DropEffects.Copy; // eslint-disable-line deprecation/deprecation\r\n } else if (component.state.altKey) {\r\n dropEffect = props.altDropEffect || DropEffects.Link; // eslint-disable-line deprecation/deprecation\r\n }\r\n let dragRect: DOMRect = new DOMRect();\r\n const componentElement = component.rootElement;\r\n if (componentElement) {\r\n dragRect = componentElement.getBoundingClientRect();\r\n }\r\n const obj: DragSourceArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n dataObject: {} as DragDropObject,\r\n dropEffect,\r\n dropStatus: DropStatus.None, // eslint-disable-line deprecation/deprecation\r\n dragRect,\r\n defaultDragLayer: props.dragProps.defaultDragLayer,\r\n clientOffset: { x: dragRect.left || 0, y: dragRect.top || 0 },\r\n initialClientOffset: { x: dragRect.left || 0, y: dragRect.top || 0 },\r\n };\r\n if (props.dragProps.onDragSourceBegin) return props.dragProps.onDragSourceBegin(obj);\r\n return obj;\r\n },\r\n endDrag(props, monitor, component) {\r\n let dragRect: DOMRect = new DOMRect();\r\n const componentElement = component && component.rootElement;\r\n if (componentElement) {\r\n dragRect = componentElement.getBoundingClientRect();\r\n }\r\n // eslint-disable-next-line deprecation/deprecation\r\n const obj: DropTargetArguments<DragDropObject> = monitor.getDropResult() as DropTargetArguments<DragDropObject> || // if onDropTargetDrop returns a value\r\n // eslint-disable-next-line deprecation/deprecation\r\n monitor.getItem() as DropTargetArguments<DragDropObject> || // otherwise, get current drag item.\r\n { // fallback\r\n dataObject: {},\r\n dropEffect: DropEffects.None, // eslint-disable-line deprecation/deprecation\r\n dropStatus: DropStatus.None, // eslint-disable-line deprecation/deprecation\r\n dragRect,\r\n clientOffset: { x: 0, y: 0 },\r\n initialClientOffset: { x: 0, y: 0 },\r\n sourceClientOffset: { x: 0, y: 0 },\r\n initialSourceClientOffset: { x: 0, y: 0 },\r\n };\r\n const {\r\n dataObject,\r\n dropEffect, dropStatus, dropRect,\r\n initialClientOffset, initialSourceClientOffset,\r\n local, row, col } = obj;\r\n\r\n const clientOffset = monitor.getClientOffset() || obj.clientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || obj.sourceClientOffset;\r\n const dragObj: DragSourceArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n dataObject,\r\n dropEffect, dropStatus, dropRect, dragRect,\r\n clientOffset, initialClientOffset, sourceClientOffset, initialSourceClientOffset,\r\n local, row, col,\r\n };\r\n if (props.dragProps.onDragSourceEnd)\r\n props.dragProps.onDragSourceEnd(dragObj);\r\n },\r\n }, (connect, monitor) => {\r\n return {\r\n connectDragSource: connect.dragSource(),\r\n connectDragPreview: connect.dragPreview(),\r\n isDragging: monitor.isDragging(),\r\n canDrag: monitor.canDrag(),\r\n item: monitor.getItem(),\r\n type: monitor.getItemType(),\r\n };\r\n })(class DragSourceWrapper extends React.Component<any, WithDragSourceState> {\r\n public rootElement: HTMLDivElement | null = null;\r\n public override readonly state: WithDragSourceState = {\r\n ctrlKey: false,\r\n altKey: false,\r\n };\r\n public static defaultProps: any = {\r\n defaultDropEffect: DropEffects.Move, // eslint-disable-line deprecation/deprecation\r\n ctrlDropEffect: DropEffects.Copy, // eslint-disable-line deprecation/deprecation\r\n altDropEffect: DropEffects.Link, // eslint-disable-line deprecation/deprecation\r\n };\r\n public override render() {\r\n const {\r\n dragProps, connectDragSource, connectDragPreview, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n isDragging, canDrag, item, type,\r\n defaultDropEffect, ctrlDropEffect, altDropEffect,\r\n dragStyle, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props as WithDragSourceProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n const p = {\r\n item,\r\n type,\r\n isDragging,\r\n canDrag,\r\n };\r\n const effectMap: { [key: number]: string } = {\r\n [DropEffects.Move]: \"move\", // eslint-disable-line deprecation/deprecation\r\n [DropEffects.Copy]: \"copy\", // eslint-disable-line deprecation/deprecation\r\n [DropEffects.Link]: \"link\", // eslint-disable-line deprecation/deprecation\r\n };\r\n\r\n const defaultEffect = effectMap[defaultDropEffect as number];\r\n const ctrlEffect = effectMap[ctrlDropEffect as number];\r\n const altEffect = effectMap[altDropEffect as number];\r\n\r\n const dropEffect = this.state.ctrlKey ? ctrlEffect || \"copy\" : this.state.altKey ? altEffect || \"link\" : defaultEffect || \"move\";\r\n return connectDragSource!(\r\n <div className=\"drag-source-wrapper\" data-testid=\"drag-source-wrapper\" ref={(el) => { this.rootElement = el; }} style={this.props.dragStyle}>\r\n <Component {...props} {...(p as any)} />\r\n </div>,\r\n { dropEffect },\r\n );\r\n }\r\n public override componentDidMount() {\r\n if (this.props.connectDragPreview) {\r\n this.props.connectDragPreview(getEmptyImage() as any, { captureDraggingState: true });\r\n }\r\n window.addEventListener(\"keydown\", this.handleKeyChange);\r\n window.addEventListener(\"keyup\", this.handleKeyChange);\r\n }\r\n public override componentWillUnmount() {\r\n window.removeEventListener(\"keydown\", this.handleKeyChange);\r\n window.removeEventListener(\"keyup\", this.handleKeyChange);\r\n }\r\n public handleKeyChange = (event: any) => {\r\n const { ctrlKey, altKey } = event;\r\n if (this.state.ctrlKey !== ctrlKey) {\r\n this.setState({ ctrlKey });\r\n }\r\n if (this.state.altKey !== altKey) {\r\n this.setState({ altKey });\r\n }\r\n };\r\n }) as any;\r\n};\r\n"]}
@@ -6,7 +6,7 @@ import { ConnectDropTarget, DndComponentClass } from "react-dnd";
6
6
  import { DropTargetProps } from "./DragDropDef";
7
7
  /** React properties for withDropTarget Higher-Order Component
8
8
  * @beta
9
- * @deprecated
9
+ * @deprecated in 2.x.
10
10
  */
11
11
  export interface WithDropTargetProps<DragDropObject = any> {
12
12
  /** Properties and callbacks for DropTarget */
@@ -30,7 +30,7 @@ export interface WithDropTargetProps<DragDropObject = any> {
30
30
  * HOC (Higher-Order Component) that transforms wrapped component into a DropTarget.
31
31
  * @param Component component to wrap.
32
32
  * @beta
33
- * @deprecated
33
+ * @deprecated in 2.x.
34
34
  */
35
35
  export declare const withDropTarget: <ComponentProps extends {}, DragDropObject = any>(Component: React.ComponentType<ComponentProps>) => DndComponentClass<typeof React.Component, ComponentProps & WithDropTargetProps<DragDropObject>>;
36
36
  //# sourceMappingURL=withDropTarget.d.ts.map
@@ -33,7 +33,7 @@ const react_dnd_1 = require("react-dnd");
33
33
  * HOC (Higher-Order Component) that transforms wrapped component into a DropTarget.
34
34
  * @param Component component to wrap.
35
35
  * @beta
36
- * @deprecated
36
+ * @deprecated in 2.x.
37
37
  */
38
38
  // istanbul ignore next
39
39
  const withDropTarget = (
@@ -1 +1 @@
1
- {"version":3,"file":"withDropTarget.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/withDropTarget.tsx"],"names":[],"mappings":";;;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AAE,OAAO,CAAC,OAAO,EAAE;YACvB,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,SAAS;SACzC,CAAC;IACJ,CAAC,CAAC,CAAC,MAAM,cAAe,SAAQ,KAAK,CAAC,SAAc;QAAjD;;YACM,gBAAW,GAA0B,IAAI,CAAC;QAqBnD,CAAC;QApBiB,MAAM;YACpB,MAAM,EACJ,SAAS,EAAE,OAAO,EAAE,wDAAwD;YAC5E,iBAAiB,EACjB,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAC3B,SAAS,EAAE,wDAAwD;YACnE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAA4C,CAAC,CAAC,8CAA8C;YAEhH,MAAM,CAAC,GAAG;gBACR,IAAI;gBACJ,IAAI;gBACJ,MAAM;gBACN,OAAO;aACR,CAAC;YACF,OAAO,iBAAkB,CACvB,6BAAK,SAAS,EAAC,qBAAqB,iBAAa,qBAAqB,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;gBACzI,oBAAC,SAAS,OAAK,KAAK,KAAO,CAAS,GAAI,CACpC,CACP,CAAC;QACJ,CAAC;KACF,CAAQ,CAAC;AACZ,CAAC,CAAC;AAxHW,QAAA,cAAc,kBAwHzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\nimport * as React from \"react\";\r\nimport { ConnectDropTarget, DndComponentClass, DropTarget } from \"react-dnd\";\r\nimport { DragSourceArguments, DropTargetArguments, DropTargetProps } from \"./DragDropDef\";\r\n\r\n/** React properties for withDropTarget Higher-Order Component\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface WithDropTargetProps<DragDropObject = any> {\r\n /** Properties and callbacks for DropTarget */\r\n dropProps: DropTargetProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /** Whether to propagate to parent DropTargets. */\r\n shallow?: boolean;\r\n /** Style properties for dropTarget wrapper element */\r\n dropStyle?: React.CSSProperties;\r\n\r\n /** @internal */\r\n connectDropTarget?: ConnectDropTarget;\r\n /** @internal */\r\n isOver?: boolean;\r\n /** @internal */\r\n canDrop?: boolean;\r\n /** @internal */\r\n item?: DragDropObject;\r\n /** @internal */\r\n type?: string | symbol;\r\n}\r\n\r\n/**\r\n * HOC (Higher-Order Component) that transforms wrapped component into a DropTarget.\r\n * @param Component component to wrap.\r\n * @beta\r\n * @deprecated\r\n */\r\n// istanbul ignore next\r\nexport const withDropTarget = <ComponentProps extends {}, DragDropObject = any>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.ComponentType<ComponentProps>,\r\n): DndComponentClass<typeof React.Component, ComponentProps & WithDropTargetProps<DragDropObject>> => { // eslint-disable-line deprecation/deprecation\r\n type Props = ComponentProps & WithDropTargetProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n return DropTarget((props: Props): Array<string | symbol> => {\r\n if (props.dropProps.objectTypes) {\r\n if (typeof props.dropProps.objectTypes === \"function\")\r\n return props.dropProps.objectTypes();\r\n else\r\n return props.dropProps.objectTypes;\r\n }\r\n return [];\r\n }, {\r\n drop(props, monitor, component) {\r\n const dragSourceArgs = monitor.getItem() as DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n if (monitor.isOver({ shallow: props.shallow || false })) {\r\n let dropRect: DOMRect = new DOMRect();\r\n const componentElement = component.rootElement;\r\n if (componentElement) {\r\n dropRect = componentElement.getBoundingClientRect();\r\n }\r\n\r\n const clientOffset = monitor.getClientOffset() || dragSourceArgs.clientOffset;\r\n const initialClientOffset = monitor.getInitialClientOffset() || dragSourceArgs.initialClientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || dragSourceArgs.sourceClientOffset;\r\n const initialSourceClientOffset = monitor.getInitialSourceClientOffset() || dragSourceArgs.initialSourceClientOffset;\r\n\r\n const dropTargetArgs: DropTargetArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n ...dragSourceArgs,\r\n row: undefined, // clear stale row/col values to be set while propagating back down\r\n col: undefined,\r\n dropRect,\r\n clientOffset,\r\n initialClientOffset,\r\n sourceClientOffset,\r\n initialSourceClientOffset,\r\n };\r\n if (props.dropProps.onDropTargetDrop)\r\n return props.dropProps.onDropTargetDrop(dropTargetArgs);\r\n }\r\n return;\r\n },\r\n hover(props, monitor, component) {\r\n if (monitor.isOver({ shallow: props.shallow || false }) && props.dropProps.onDropTargetOver) {\r\n const dragSourceArgs = monitor.getItem() as DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n let dropRect: DOMRect = new DOMRect();\r\n const componentElement = component.rootElement;\r\n if (componentElement) {\r\n dropRect = componentElement.getBoundingClientRect();\r\n }\r\n\r\n const clientOffset = monitor.getClientOffset() || dragSourceArgs.clientOffset;\r\n const initialClientOffset = monitor.getInitialClientOffset() || dragSourceArgs.initialClientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || dragSourceArgs.sourceClientOffset;\r\n const initialSourceClientOffset = monitor.getInitialSourceClientOffset() || dragSourceArgs.initialSourceClientOffset;\r\n\r\n const dropTargetArgs: DropTargetArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n ...dragSourceArgs,\r\n row: undefined, // clear stale row/col values to be set while propagating back down\r\n col: undefined,\r\n dropRect,\r\n clientOffset,\r\n initialClientOffset,\r\n sourceClientOffset,\r\n initialSourceClientOffset,\r\n };\r\n props.dropProps.onDropTargetOver(dropTargetArgs);\r\n }\r\n },\r\n canDrop(props, monitor) {\r\n if (monitor.isOver({ shallow: props.shallow || false }) && props.dropProps.canDropTargetDrop) {\r\n const dragSourceArgs = monitor.getItem() as DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n const clientOffset = monitor.getClientOffset() || dragSourceArgs.clientOffset;\r\n const initialClientOffset = monitor.getInitialClientOffset() || dragSourceArgs.initialClientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || dragSourceArgs.sourceClientOffset;\r\n const initialSourceClientOffset = monitor.getInitialSourceClientOffset() || dragSourceArgs.initialSourceClientOffset;\r\n\r\n const dropTargetArgs: DropTargetArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n ...dragSourceArgs,\r\n clientOffset,\r\n initialClientOffset,\r\n sourceClientOffset,\r\n initialSourceClientOffset,\r\n };\r\n return props.dropProps.canDropTargetDrop(dropTargetArgs);\r\n }\r\n return true;\r\n },\r\n }, (connect, monitor) => {\r\n return {\r\n connectDropTarget: connect.dropTarget(),\r\n isOver: monitor.isOver({ shallow: true }),\r\n canDrop: monitor.canDrop(),\r\n item: monitor.getItem(),\r\n type: monitor.getItemType() || undefined,\r\n };\r\n })(class WithDropTarget extends React.Component<any> {\r\n public rootElement: HTMLDivElement | null = null;\r\n public override render() {\r\n const {\r\n dropProps, shallow, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n connectDropTarget,\r\n isOver, canDrop, item, type,\r\n dropStyle, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props as WithDropTargetProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n\r\n const p = {\r\n item,\r\n type,\r\n isOver,\r\n canDrop,\r\n };\r\n return connectDropTarget!(\r\n <div className=\"drop-target-wrapper\" data-testid=\"drop-target-wrapper\" ref={(el) => { this.rootElement = el; }} style={this.props.dropStyle}>\r\n <Component {...props} {...(p as any)} />\r\n </div>,\r\n );\r\n }\r\n }) as any;\r\n};\r\n"]}
1
+ {"version":3,"file":"withDropTarget.js","sourceRoot":"","sources":["../../../../../../src/components-react/table/component/dragdrop/withDropTarget.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;+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B,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,SAAS;SACzC,CAAC;IACJ,CAAC,CAAC,CAAC,MAAM,cAAe,SAAQ,KAAK,CAAC,SAAc;QAAjD;;YACM,gBAAW,GAA0B,IAAI,CAAC;QAqBnD,CAAC;QApBiB,MAAM;YACpB,MAAM,EACJ,SAAS,EAAE,OAAO,EAAE,wDAAwD;YAC5E,iBAAiB,EACjB,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAC3B,SAAS,EAAE,wDAAwD;YACnE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAA4C,CAAC,CAAC,8CAA8C;YAEhH,MAAM,CAAC,GAAG;gBACR,IAAI;gBACJ,IAAI;gBACJ,MAAM;gBACN,OAAO;aACR,CAAC;YACF,OAAO,iBAAkB,CACvB,6BAAK,SAAS,EAAC,qBAAqB,iBAAa,qBAAqB,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;gBACzI,oBAAC,SAAS,OAAK,KAAK,KAAO,CAAS,GAAI,CACpC,CACP,CAAC;QACJ,CAAC;KACF,CAAQ,CAAC;AACZ,CAAC,CAAC;AAxHW,QAAA,cAAc,kBAwHzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DragDrop\r\n */\r\nimport * as React from \"react\";\r\nimport { ConnectDropTarget, DndComponentClass, DropTarget } from \"react-dnd\";\r\nimport { DragSourceArguments, DropTargetArguments, DropTargetProps } from \"./DragDropDef\";\r\n\r\n/** React properties for withDropTarget Higher-Order Component\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\nexport interface WithDropTargetProps<DragDropObject = any> {\r\n /** Properties and callbacks for DropTarget */\r\n dropProps: DropTargetProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n /** Whether to propagate to parent DropTargets. */\r\n shallow?: boolean;\r\n /** Style properties for dropTarget wrapper element */\r\n dropStyle?: React.CSSProperties;\r\n\r\n /** @internal */\r\n connectDropTarget?: ConnectDropTarget;\r\n /** @internal */\r\n isOver?: boolean;\r\n /** @internal */\r\n canDrop?: boolean;\r\n /** @internal */\r\n item?: DragDropObject;\r\n /** @internal */\r\n type?: string | symbol;\r\n}\r\n\r\n/**\r\n * HOC (Higher-Order Component) that transforms wrapped component into a DropTarget.\r\n * @param Component component to wrap.\r\n * @beta\r\n * @deprecated in 2.x.\r\n */\r\n// istanbul ignore next\r\nexport const withDropTarget = <ComponentProps extends {}, DragDropObject = any>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.ComponentType<ComponentProps>,\r\n): DndComponentClass<typeof React.Component, ComponentProps & WithDropTargetProps<DragDropObject>> => { // eslint-disable-line deprecation/deprecation\r\n type Props = ComponentProps & WithDropTargetProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n return DropTarget((props: Props): Array<string | symbol> => {\r\n if (props.dropProps.objectTypes) {\r\n if (typeof props.dropProps.objectTypes === \"function\")\r\n return props.dropProps.objectTypes();\r\n else\r\n return props.dropProps.objectTypes;\r\n }\r\n return [];\r\n }, {\r\n drop(props, monitor, component) {\r\n const dragSourceArgs = monitor.getItem() as DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n if (monitor.isOver({ shallow: props.shallow || false })) {\r\n let dropRect: DOMRect = new DOMRect();\r\n const componentElement = component.rootElement;\r\n if (componentElement) {\r\n dropRect = componentElement.getBoundingClientRect();\r\n }\r\n\r\n const clientOffset = monitor.getClientOffset() || dragSourceArgs.clientOffset;\r\n const initialClientOffset = monitor.getInitialClientOffset() || dragSourceArgs.initialClientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || dragSourceArgs.sourceClientOffset;\r\n const initialSourceClientOffset = monitor.getInitialSourceClientOffset() || dragSourceArgs.initialSourceClientOffset;\r\n\r\n const dropTargetArgs: DropTargetArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n ...dragSourceArgs,\r\n row: undefined, // clear stale row/col values to be set while propagating back down\r\n col: undefined,\r\n dropRect,\r\n clientOffset,\r\n initialClientOffset,\r\n sourceClientOffset,\r\n initialSourceClientOffset,\r\n };\r\n if (props.dropProps.onDropTargetDrop)\r\n return props.dropProps.onDropTargetDrop(dropTargetArgs);\r\n }\r\n return;\r\n },\r\n hover(props, monitor, component) {\r\n if (monitor.isOver({ shallow: props.shallow || false }) && props.dropProps.onDropTargetOver) {\r\n const dragSourceArgs = monitor.getItem() as DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n let dropRect: DOMRect = new DOMRect();\r\n const componentElement = component.rootElement;\r\n if (componentElement) {\r\n dropRect = componentElement.getBoundingClientRect();\r\n }\r\n\r\n const clientOffset = monitor.getClientOffset() || dragSourceArgs.clientOffset;\r\n const initialClientOffset = monitor.getInitialClientOffset() || dragSourceArgs.initialClientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || dragSourceArgs.sourceClientOffset;\r\n const initialSourceClientOffset = monitor.getInitialSourceClientOffset() || dragSourceArgs.initialSourceClientOffset;\r\n\r\n const dropTargetArgs: DropTargetArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n ...dragSourceArgs,\r\n row: undefined, // clear stale row/col values to be set while propagating back down\r\n col: undefined,\r\n dropRect,\r\n clientOffset,\r\n initialClientOffset,\r\n sourceClientOffset,\r\n initialSourceClientOffset,\r\n };\r\n props.dropProps.onDropTargetOver(dropTargetArgs);\r\n }\r\n },\r\n canDrop(props, monitor) {\r\n if (monitor.isOver({ shallow: props.shallow || false }) && props.dropProps.canDropTargetDrop) {\r\n const dragSourceArgs = monitor.getItem() as DragSourceArguments<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n const clientOffset = monitor.getClientOffset() || dragSourceArgs.clientOffset;\r\n const initialClientOffset = monitor.getInitialClientOffset() || dragSourceArgs.initialClientOffset;\r\n const sourceClientOffset = monitor.getSourceClientOffset() || dragSourceArgs.sourceClientOffset;\r\n const initialSourceClientOffset = monitor.getInitialSourceClientOffset() || dragSourceArgs.initialSourceClientOffset;\r\n\r\n const dropTargetArgs: DropTargetArguments<DragDropObject> = { // eslint-disable-line deprecation/deprecation\r\n ...dragSourceArgs,\r\n clientOffset,\r\n initialClientOffset,\r\n sourceClientOffset,\r\n initialSourceClientOffset,\r\n };\r\n return props.dropProps.canDropTargetDrop(dropTargetArgs);\r\n }\r\n return true;\r\n },\r\n }, (connect, monitor) => {\r\n return {\r\n connectDropTarget: connect.dropTarget(),\r\n isOver: monitor.isOver({ shallow: true }),\r\n canDrop: monitor.canDrop(),\r\n item: monitor.getItem(),\r\n type: monitor.getItemType() || undefined,\r\n };\r\n })(class WithDropTarget extends React.Component<any> {\r\n public rootElement: HTMLDivElement | null = null;\r\n public override render() {\r\n const {\r\n dropProps, shallow, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n connectDropTarget,\r\n isOver, canDrop, item, type,\r\n dropStyle, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props as WithDropTargetProps<DragDropObject>; // eslint-disable-line deprecation/deprecation\r\n\r\n const p = {\r\n item,\r\n type,\r\n isOver,\r\n canDrop,\r\n };\r\n return connectDropTarget!(\r\n <div className=\"drop-target-wrapper\" data-testid=\"drop-target-wrapper\" ref={(el) => { this.rootElement = el; }} style={this.props.dropStyle}>\r\n <Component {...props} {...(p as any)} />\r\n </div>,\r\n );\r\n }\r\n }) as any;\r\n};\r\n"]}
@@ -10,7 +10,7 @@ import { Direction, OrthogonalDirection } from "./utilities/Direction";
10
10
  * @public
11
11
  */
12
12
  export interface CustomToolbarItem extends CustomButtonDefinition {
13
- /** React node that must result in providing a PopupItem @deprecated use panelContentNode */
13
+ /** React node that must result in providing a PopupItem @deprecated in 3.x. use panelContentNode */
14
14
  buttonNode?: React.ReactNode;
15
15
  /** defines the content to display in popup panel */
16
16
  panelContentNode?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarWithOverflow.d.ts","sourceRoot":"","sources":["../../../../src/components-react/toolbar/ToolbarWithOverflow.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AAExB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,YAAY,EAAE,iBAAiB,EAAmD,sBAAsB,EACxG,WAAW,EAAE,kBAAkB,EAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAkB,WAAW,EAAc,eAAe,EAAW,MAAM,mBAAmB,CAAC;AAStG,OAAO,EAAE,SAAS,EAAoB,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AAGrH;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,4FAA4F;IAC5F,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;kEAC8D;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AAEH,eAAO,MAAM,2BAA2B,wBAAsC,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,8BAA8B,YAE7C;AAED;;GAEG;AACH,oBAAY,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAEzE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,iBAAiB,CAEhF;AAED,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,cAAe,SAAS,KAAG,mBAG1D,CAAC;AAEF;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,KAAK,IAAA;IACL,GAAG,IAAA;CACJ;AAED;;G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