@itwin/core-react 4.14.0 → 4.15.0

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 (514) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/lib/cjs/core-react/UiCore.d.ts +1 -1
  3. package/lib/cjs/core-react/UiCore.js +1 -1
  4. package/lib/cjs/core-react/UiCore.js.map +1 -1
  5. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  6. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  7. package/lib/cjs/core-react/base/Centered.d.ts +1 -1
  8. package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
  9. package/lib/cjs/core-react/base/Centered.js +2 -1
  10. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  11. package/lib/cjs/core-react/base/Div.d.ts +2 -2
  12. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  13. package/lib/cjs/core-react/base/Div.js +1 -1
  14. package/lib/cjs/core-react/base/Div.js.map +1 -1
  15. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -1
  16. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  17. package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -2
  18. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  19. package/lib/cjs/core-react/base/FillCentered.d.ts +1 -1
  20. package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
  21. package/lib/cjs/core-react/base/FillCentered.js +2 -1
  22. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  23. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -1
  24. package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  25. package/lib/cjs/core-react/base/FlexWrapContainer.js +2 -1
  26. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  27. package/lib/cjs/core-react/base/Gap.d.ts +2 -2
  28. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  29. package/lib/cjs/core-react/base/Gap.js +1 -1
  30. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  31. package/lib/cjs/core-react/base/ScrollView.d.ts +1 -1
  32. package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
  33. package/lib/cjs/core-react/base/ScrollView.js +2 -1
  34. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  35. package/lib/cjs/core-react/button/UnderlinedButton.d.ts +2 -2
  36. package/lib/cjs/core-react/button/UnderlinedButton.js +1 -1
  37. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  38. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -4
  39. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  40. package/lib/cjs/core-react/checklistbox/CheckListBox.js +3 -3
  41. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  42. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  43. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  44. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  45. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +1 -0
  46. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  47. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  48. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  49. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  50. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  51. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  52. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +3 -1
  53. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  54. package/lib/cjs/core-react/dialog/Dialog.d.ts +4 -5
  55. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  56. package/lib/cjs/core-react/dialog/Dialog.js +3 -3
  57. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  58. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +3 -3
  59. package/lib/cjs/core-react/dialog/GlobalDialog.js +1 -1
  60. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  61. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +3 -3
  62. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  63. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +1 -1
  64. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  65. package/lib/cjs/core-react/enums/Alignment.d.ts +2 -0
  66. package/lib/cjs/core-react/enums/Alignment.d.ts.map +1 -1
  67. package/lib/cjs/core-react/enums/Alignment.js +2 -0
  68. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  69. package/lib/cjs/core-react/enums/CheckBoxState.d.ts +1 -0
  70. package/lib/cjs/core-react/enums/CheckBoxState.d.ts.map +1 -1
  71. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  72. package/lib/cjs/core-react/enums/SortDirection.d.ts +1 -0
  73. package/lib/cjs/core-react/enums/SortDirection.d.ts.map +1 -1
  74. package/lib/cjs/core-react/enums/SortDirection.js +1 -0
  75. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  76. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -2
  77. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  78. package/lib/cjs/core-react/expandable/ExpandableList.js +1 -1
  79. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  80. package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -0
  81. package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
  82. package/lib/cjs/core-react/hocs/withIsPressed.js +1 -0
  83. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  84. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -0
  85. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  86. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +1 -0
  87. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  88. package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -0
  89. package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
  90. package/lib/cjs/core-react/hocs/withTimeout.js +4 -1
  91. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  92. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  93. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  94. package/lib/cjs/core-react/icons/SvgPath.d.ts +2 -0
  95. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  96. package/lib/cjs/core-react/icons/SvgPath.js +2 -0
  97. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  98. package/lib/cjs/core-react/icons/WebFontIcon.d.ts +2 -0
  99. package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
  100. package/lib/cjs/core-react/icons/WebFontIcon.js +2 -0
  101. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  102. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
  103. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  104. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  105. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  106. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  107. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  108. package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -2
  109. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  110. package/lib/cjs/core-react/inputs/InputLabel.js +1 -1
  111. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  112. package/lib/cjs/core-react/inputs/InputStatus.d.ts +1 -1
  113. package/lib/cjs/core-react/inputs/InputStatus.js +1 -1
  114. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  115. package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  116. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  117. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +2 -2
  118. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +1 -1
  119. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  120. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
  121. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +1 -1
  122. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  123. package/lib/cjs/core-react/listbox/Listbox.d.ts +7 -7
  124. package/lib/cjs/core-react/listbox/Listbox.js +3 -3
  125. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  126. package/lib/cjs/core-react/loading/LoadingBar.d.ts +2 -2
  127. package/lib/cjs/core-react/loading/LoadingBar.js +1 -1
  128. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  129. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +2 -2
  130. package/lib/cjs/core-react/loading/LoadingPrompt.js +1 -1
  131. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  132. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +3 -3
  133. package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -1
  134. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  135. package/lib/cjs/core-react/loading/LoadingStatus.d.ts +2 -2
  136. package/lib/cjs/core-react/loading/LoadingStatus.js +1 -1
  137. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  138. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +5 -1
  139. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  140. package/lib/cjs/core-react/messagebox/MessageBox.js +8 -1
  141. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  142. package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -0
  143. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  144. package/lib/cjs/core-react/notification/MessageRenderer.js +2 -0
  145. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  146. package/lib/cjs/core-react/notification/MessageType.d.ts +2 -0
  147. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  148. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  149. package/lib/cjs/core-react/popup/Popup.d.ts +6 -1
  150. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  151. package/lib/cjs/core-react/popup/Popup.js +9 -2
  152. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  153. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -4
  154. package/lib/cjs/core-react/radialmenu/RadialMenu.js +2 -2
  155. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  156. package/lib/cjs/core-react/searchbox/SearchBox.d.ts +2 -2
  157. package/lib/cjs/core-react/searchbox/SearchBox.js +1 -1
  158. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  159. package/lib/cjs/core-react/settings/SettingsManager.d.ts +8 -8
  160. package/lib/cjs/core-react/settings/SettingsManager.js +4 -4
  161. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  162. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  163. package/lib/cjs/core-react/tabs/Tabs.js +1 -1
  164. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  165. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -1
  166. package/lib/cjs/core-react/tabs/VerticalTabs.js +1 -1
  167. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  168. package/lib/cjs/core-react/text/BlockText.d.ts +1 -1
  169. package/lib/cjs/core-react/text/BlockText.js +1 -1
  170. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  171. package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
  172. package/lib/cjs/core-react/text/BodyText.js +1 -1
  173. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  174. package/lib/cjs/core-react/text/DisabledText.d.ts +1 -1
  175. package/lib/cjs/core-react/text/DisabledText.js +1 -1
  176. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  177. package/lib/cjs/core-react/text/FilteredText.d.ts +2 -0
  178. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  179. package/lib/cjs/core-react/text/FilteredText.js +2 -0
  180. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  181. package/lib/cjs/core-react/text/MutedText.d.ts +1 -1
  182. package/lib/cjs/core-react/text/MutedText.js +1 -1
  183. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  184. package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
  185. package/lib/cjs/core-react/text/StyledText.js +1 -1
  186. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  187. package/lib/cjs/core-react/text/TextProps.d.ts +1 -1
  188. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  189. package/lib/cjs/core-react/tree/Branch.d.ts +2 -0
  190. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  191. package/lib/cjs/core-react/tree/Branch.js +2 -0
  192. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  193. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +2 -0
  194. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  195. package/lib/cjs/core-react/tree/ExpansionToggle.js +2 -0
  196. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  197. package/lib/cjs/core-react/tree/Node.d.ts +3 -3
  198. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  199. package/lib/cjs/core-react/tree/Node.js +6 -1
  200. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  201. package/lib/cjs/core-react/tree/Placeholder.d.ts +2 -0
  202. package/lib/cjs/core-react/tree/Placeholder.d.ts.map +1 -1
  203. package/lib/cjs/core-react/tree/Placeholder.js +2 -0
  204. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  205. package/lib/cjs/core-react/tree/Tree.d.ts +2 -0
  206. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  207. package/lib/cjs/core-react/tree/Tree.js +2 -0
  208. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  209. package/lib/cjs/core-react/utils/IconHelper.d.ts +1 -0
  210. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  211. package/lib/cjs/core-react/utils/IconHelper.js +2 -0
  212. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  213. package/lib/cjs/core-react/utils/Props.d.ts +5 -1
  214. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  215. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  216. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
  217. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  218. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +3 -0
  219. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  220. package/lib/cjs/core-react/utils/Timer.d.ts +2 -0
  221. package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
  222. package/lib/cjs/core-react/utils/Timer.js +2 -0
  223. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  224. package/lib/cjs/core-react/utils/getCssVariable.d.ts +2 -0
  225. package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
  226. package/lib/cjs/core-react/utils/getCssVariable.js +3 -0
  227. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  228. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  229. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  230. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  231. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +1 -0
  232. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  233. package/lib/cjs/core-react/utils/hooks/useDisposable.js +1 -0
  234. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  235. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
  236. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  237. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
  238. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  239. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts +1 -0
  240. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  241. package/lib/cjs/core-react/utils/hooks/useInterval.js +1 -0
  242. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  243. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
  244. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  245. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +1 -0
  246. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  247. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
  248. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  249. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +2 -0
  250. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  251. package/lib/cjs/core-react/utils/typeUtils.d.ts +1 -0
  252. package/lib/cjs/core-react/utils/typeUtils.d.ts.map +1 -1
  253. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  254. package/lib/cjs/core-react.d.ts +0 -1
  255. package/lib/cjs/core-react.d.ts.map +1 -1
  256. package/lib/cjs/core-react.js +2 -1
  257. package/lib/cjs/core-react.js.map +1 -1
  258. package/lib/esm/core-react/UiCore.d.ts +1 -1
  259. package/lib/esm/core-react/UiCore.js +1 -1
  260. package/lib/esm/core-react/UiCore.js.map +1 -1
  261. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  262. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  263. package/lib/esm/core-react/base/Centered.d.ts +1 -1
  264. package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
  265. package/lib/esm/core-react/base/Centered.js +2 -1
  266. package/lib/esm/core-react/base/Centered.js.map +1 -1
  267. package/lib/esm/core-react/base/Div.d.ts +2 -2
  268. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  269. package/lib/esm/core-react/base/Div.js +1 -1
  270. package/lib/esm/core-react/base/Div.js.map +1 -1
  271. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -1
  272. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  273. package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -2
  274. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  275. package/lib/esm/core-react/base/FillCentered.d.ts +1 -1
  276. package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
  277. package/lib/esm/core-react/base/FillCentered.js +2 -1
  278. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  279. package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -1
  280. package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
  281. package/lib/esm/core-react/base/FlexWrapContainer.js +2 -1
  282. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  283. package/lib/esm/core-react/base/Gap.d.ts +2 -2
  284. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  285. package/lib/esm/core-react/base/Gap.js +1 -1
  286. package/lib/esm/core-react/base/Gap.js.map +1 -1
  287. package/lib/esm/core-react/base/ScrollView.d.ts +1 -1
  288. package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
  289. package/lib/esm/core-react/base/ScrollView.js +2 -1
  290. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  291. package/lib/esm/core-react/button/UnderlinedButton.d.ts +2 -2
  292. package/lib/esm/core-react/button/UnderlinedButton.js +1 -1
  293. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  294. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -4
  295. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  296. package/lib/esm/core-react/checklistbox/CheckListBox.js +3 -3
  297. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  298. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  299. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  300. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  301. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +1 -0
  302. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  303. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  304. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  305. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  306. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  307. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  308. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +3 -1
  309. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  310. package/lib/esm/core-react/dialog/Dialog.d.ts +4 -5
  311. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  312. package/lib/esm/core-react/dialog/Dialog.js +3 -3
  313. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  314. package/lib/esm/core-react/dialog/GlobalDialog.d.ts +3 -3
  315. package/lib/esm/core-react/dialog/GlobalDialog.js +1 -1
  316. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  317. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +3 -3
  318. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  319. package/lib/esm/core-react/elementseparator/ElementSeparator.js +1 -1
  320. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  321. package/lib/esm/core-react/enums/Alignment.d.ts +2 -0
  322. package/lib/esm/core-react/enums/Alignment.d.ts.map +1 -1
  323. package/lib/esm/core-react/enums/Alignment.js +2 -0
  324. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  325. package/lib/esm/core-react/enums/CheckBoxState.d.ts +1 -0
  326. package/lib/esm/core-react/enums/CheckBoxState.d.ts.map +1 -1
  327. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  328. package/lib/esm/core-react/enums/SortDirection.d.ts +1 -0
  329. package/lib/esm/core-react/enums/SortDirection.d.ts.map +1 -1
  330. package/lib/esm/core-react/enums/SortDirection.js +1 -0
  331. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  332. package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -2
  333. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  334. package/lib/esm/core-react/expandable/ExpandableList.js +1 -1
  335. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  336. package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -0
  337. package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
  338. package/lib/esm/core-react/hocs/withIsPressed.js +1 -0
  339. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  340. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -0
  341. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  342. package/lib/esm/core-react/hocs/withOnOutsideClick.js +1 -0
  343. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  344. package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -0
  345. package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
  346. package/lib/esm/core-react/hocs/withTimeout.js +4 -1
  347. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  348. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  349. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  350. package/lib/esm/core-react/icons/SvgPath.d.ts +2 -0
  351. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  352. package/lib/esm/core-react/icons/SvgPath.js +2 -0
  353. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  354. package/lib/esm/core-react/icons/WebFontIcon.d.ts +2 -0
  355. package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
  356. package/lib/esm/core-react/icons/WebFontIcon.js +2 -0
  357. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  358. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
  359. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  360. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
  361. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  362. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  363. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  364. package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -2
  365. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  366. package/lib/esm/core-react/inputs/InputLabel.js +1 -1
  367. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  368. package/lib/esm/core-react/inputs/InputStatus.d.ts +1 -1
  369. package/lib/esm/core-react/inputs/InputStatus.js +1 -1
  370. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  371. package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -2
  372. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  373. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +2 -2
  374. package/lib/esm/core-react/inputs/iconinput/IconInput.js +1 -1
  375. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  376. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
  377. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +1 -1
  378. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  379. package/lib/esm/core-react/listbox/Listbox.d.ts +7 -7
  380. package/lib/esm/core-react/listbox/Listbox.js +3 -3
  381. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  382. package/lib/esm/core-react/loading/LoadingBar.d.ts +2 -2
  383. package/lib/esm/core-react/loading/LoadingBar.js +1 -1
  384. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  385. package/lib/esm/core-react/loading/LoadingPrompt.d.ts +2 -2
  386. package/lib/esm/core-react/loading/LoadingPrompt.js +1 -1
  387. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  388. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +3 -3
  389. package/lib/esm/core-react/loading/LoadingSpinner.js +1 -1
  390. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  391. package/lib/esm/core-react/loading/LoadingStatus.d.ts +2 -2
  392. package/lib/esm/core-react/loading/LoadingStatus.js +1 -1
  393. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  394. package/lib/esm/core-react/messagebox/MessageBox.d.ts +5 -1
  395. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  396. package/lib/esm/core-react/messagebox/MessageBox.js +8 -1
  397. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  398. package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -0
  399. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  400. package/lib/esm/core-react/notification/MessageRenderer.js +2 -0
  401. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  402. package/lib/esm/core-react/notification/MessageType.d.ts +2 -0
  403. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  404. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  405. package/lib/esm/core-react/popup/Popup.d.ts +6 -1
  406. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  407. package/lib/esm/core-react/popup/Popup.js +9 -2
  408. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  409. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -4
  410. package/lib/esm/core-react/radialmenu/RadialMenu.js +2 -2
  411. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  412. package/lib/esm/core-react/searchbox/SearchBox.d.ts +2 -2
  413. package/lib/esm/core-react/searchbox/SearchBox.js +1 -1
  414. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  415. package/lib/esm/core-react/settings/SettingsManager.d.ts +8 -8
  416. package/lib/esm/core-react/settings/SettingsManager.js +4 -4
  417. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  418. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  419. package/lib/esm/core-react/tabs/Tabs.js +1 -1
  420. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  421. package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -1
  422. package/lib/esm/core-react/tabs/VerticalTabs.js +1 -1
  423. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  424. package/lib/esm/core-react/text/BlockText.d.ts +1 -1
  425. package/lib/esm/core-react/text/BlockText.js +1 -1
  426. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  427. package/lib/esm/core-react/text/BodyText.d.ts +1 -1
  428. package/lib/esm/core-react/text/BodyText.js +1 -1
  429. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  430. package/lib/esm/core-react/text/DisabledText.d.ts +1 -1
  431. package/lib/esm/core-react/text/DisabledText.js +1 -1
  432. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  433. package/lib/esm/core-react/text/FilteredText.d.ts +2 -0
  434. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  435. package/lib/esm/core-react/text/FilteredText.js +2 -0
  436. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  437. package/lib/esm/core-react/text/MutedText.d.ts +1 -1
  438. package/lib/esm/core-react/text/MutedText.js +1 -1
  439. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  440. package/lib/esm/core-react/text/StyledText.d.ts +2 -2
  441. package/lib/esm/core-react/text/StyledText.js +1 -1
  442. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  443. package/lib/esm/core-react/text/TextProps.d.ts +1 -1
  444. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  445. package/lib/esm/core-react/tree/Branch.d.ts +2 -0
  446. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  447. package/lib/esm/core-react/tree/Branch.js +2 -0
  448. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  449. package/lib/esm/core-react/tree/ExpansionToggle.d.ts +2 -0
  450. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  451. package/lib/esm/core-react/tree/ExpansionToggle.js +2 -0
  452. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  453. package/lib/esm/core-react/tree/Node.d.ts +3 -3
  454. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  455. package/lib/esm/core-react/tree/Node.js +6 -1
  456. package/lib/esm/core-react/tree/Node.js.map +1 -1
  457. package/lib/esm/core-react/tree/Placeholder.d.ts +2 -0
  458. package/lib/esm/core-react/tree/Placeholder.d.ts.map +1 -1
  459. package/lib/esm/core-react/tree/Placeholder.js +2 -0
  460. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  461. package/lib/esm/core-react/tree/Tree.d.ts +2 -0
  462. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  463. package/lib/esm/core-react/tree/Tree.js +2 -0
  464. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  465. package/lib/esm/core-react/utils/IconHelper.d.ts +1 -0
  466. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  467. package/lib/esm/core-react/utils/IconHelper.js +2 -0
  468. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  469. package/lib/esm/core-react/utils/Props.d.ts +5 -1
  470. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  471. package/lib/esm/core-react/utils/Props.js.map +1 -1
  472. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
  473. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  474. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +3 -0
  475. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  476. package/lib/esm/core-react/utils/Timer.d.ts +2 -0
  477. package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
  478. package/lib/esm/core-react/utils/Timer.js +2 -0
  479. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  480. package/lib/esm/core-react/utils/getCssVariable.d.ts +2 -0
  481. package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
  482. package/lib/esm/core-react/utils/getCssVariable.js +3 -0
  483. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  484. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  485. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +1 -0
  486. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  487. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +1 -0
  488. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  489. package/lib/esm/core-react/utils/hooks/useDisposable.js +1 -0
  490. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  491. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
  492. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  493. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
  494. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  495. package/lib/esm/core-react/utils/hooks/useInterval.d.ts +1 -0
  496. package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  497. package/lib/esm/core-react/utils/hooks/useInterval.js +1 -0
  498. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  499. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
  500. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  501. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +1 -0
  502. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  503. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
  504. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  505. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +2 -0
  506. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  507. package/lib/esm/core-react/utils/typeUtils.d.ts +1 -0
  508. package/lib/esm/core-react/utils/typeUtils.d.ts.map +1 -1
  509. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  510. package/lib/esm/core-react.d.ts +0 -1
  511. package/lib/esm/core-react.d.ts.map +1 -1
  512. package/lib/esm/core-react.js +2 -1
  513. package/lib/esm/core-react.js.map +1 -1
  514. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"StyledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE1E,OAAO,CACL,iCACM,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[StyledText]] component\n * @public\n * @deprecated in 4.12.x. Props of deprecated component {@link StyledText}.\n */\nexport interface StyledTextProps extends TextProps {\n /** Main CSS class name */\n mainClassName: string;\n}\n\n/** The base component for other text components that pass a main CSS class name.\n * @public\n * @deprecated in 4.0 Use \\<Text /\\> component from iTwinUI-react library.\n */\nexport function StyledText(props: StyledTextProps) {\n const { mainClassName, className, style, children, ...spanProps } = props;\n\n return (\n <span\n {...spanProps}\n className={classnames(mainClassName, className)}\n style={style}\n >\n {children}\n </span>\n );\n}\n"]}
1
+ {"version":3,"file":"StyledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE1E,OAAO,CACL,iCACM,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[StyledText]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link StyledText}.\n */\nexport interface StyledTextProps extends TextProps {\n /** Main CSS class name */\n mainClassName: string;\n}\n\n/** The base component for other text components that pass a main CSS class name.\n * @public\n * @deprecated in 4.0.0. Use \\<Text /\\> component from iTwinUI-react library.\n */\nexport function StyledText(props: StyledTextProps) {\n const { mainClassName, className, style, children, ...spanProps } = props;\n\n return (\n <span\n {...spanProps}\n className={classnames(mainClassName, className)}\n style={style}\n >\n {children}\n </span>\n );\n}\n"]}
@@ -5,7 +5,7 @@ import type * as React from "react";
5
5
  import type { CommonProps } from "../utils/Props";
6
6
  /** Properties for various text components
7
7
  * @public
8
- * @deprecated in 4.12.x. Props of deprecated text components.
8
+ * @deprecated in 4.12.0. Props of deprecated text components.
9
9
  */
10
10
  export interface TextProps extends React.AllHTMLAttributes<HTMLSpanElement>, CommonProps {
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextProps.js","sourceRoot":"","sources":["../../../../src/core-react/text/TextProps.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport type * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for various text components\n * @public\n * @deprecated in 4.12.x. Props of deprecated text components.\n */\nexport interface TextProps\n extends React.AllHTMLAttributes<HTMLSpanElement>,\n CommonProps {}\n"]}
1
+ {"version":3,"file":"TextProps.js","sourceRoot":"","sources":["../../../../src/core-react/text/TextProps.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Text\n */\n\nimport type * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for various text components\n * @public\n * @deprecated in 4.12.0. Props of deprecated text components.\n */\nexport interface TextProps\n extends React.AllHTMLAttributes<HTMLSpanElement>,\n CommonProps {} // eslint-disable-line deprecation/deprecation\n"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for [[TreeBranch]] React component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link TreeBranch} component.
9
10
  */
10
11
  export interface TreeBranchProps extends CommonProps {
11
12
  /** Child nodes of the tree branch */
@@ -13,6 +14,7 @@ export interface TreeBranchProps extends CommonProps {
13
14
  }
14
15
  /** Presentation React component for a Tree branch
15
16
  * @public
17
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
16
18
  */
17
19
  export declare class TreeBranch extends React.PureComponent<TreeBranchProps> {
18
20
  render(): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Branch.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM;CASvB"}
1
+ {"version":3,"file":"Branch.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AAEH,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AAEH,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC;IAClD,MAAM;CASvB"}
@@ -10,7 +10,9 @@ import classnames from "classnames";
10
10
  import * as React from "react";
11
11
  /** Presentation React component for a Tree branch
12
12
  * @public
13
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
13
14
  */
15
+ // eslint-disable-next-line deprecation/deprecation
14
16
  export class TreeBranch extends React.PureComponent {
15
17
  render() {
16
18
  const className = classnames("core-tree-branch", this.props.className);
@@ -1 +1 @@
1
- {"version":3,"file":"Branch.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEvE,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAC/C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Branch.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for [[TreeBranch]] React component\n * @public\n */\nexport interface TreeBranchProps extends CommonProps {\n /** Child nodes of the tree branch */\n children?: React.ReactNode;\n}\n\n/** Presentation React component for a Tree branch\n * @public\n */\nexport class TreeBranch extends React.PureComponent<TreeBranchProps> {\n public override render() {\n const className = classnames(\"core-tree-branch\", this.props.className);\n\n return (\n <div className={className} style={this.props.style}>\n {this.props.children}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"Branch.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Branch.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAClD,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEvE,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAC/C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Branch.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\n\n/** Properties for [[TreeBranch]] React component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link TreeBranch} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface TreeBranchProps extends CommonProps {\n /** Child nodes of the tree branch */\n children?: React.ReactNode;\n}\n\n/** Presentation React component for a Tree branch\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class TreeBranch extends React.PureComponent<TreeBranchProps> {\n public override render() {\n const className = classnames(\"core-tree-branch\", this.props.className);\n\n return (\n <div className={className} style={this.props.style}>\n {this.props.children}\n </div>\n );\n }\n}\n"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[ExpansionToggle]] component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link ExpansionToggle} component.
9
10
  */
10
11
  export interface ExpansionToggleProps extends CommonProps {
11
12
  isExpanded?: boolean;
@@ -14,6 +15,7 @@ export interface ExpansionToggleProps extends CommonProps {
14
15
  }
15
16
  /** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state
16
17
  * @public
18
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
17
19
  */
18
20
  export declare function ExpansionToggle(props: ExpansionToggleProps): React.JSX.Element;
19
21
  //# sourceMappingURL=ExpansionToggle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpansionToggle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACxD,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAwB1D"}
1
+ {"version":3,"file":"ExpansionToggle.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;;GAGG;AAEH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACxD,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAwB1D"}
@@ -13,7 +13,9 @@ import { SvgChevronRight } from "@itwin/itwinui-icons-react";
13
13
  import { useTranslation } from "../l10n/useTranslation";
14
14
  /** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state
15
15
  * @public
16
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
16
17
  */
18
+ // eslint-disable-next-line deprecation/deprecation
17
19
  export function ExpansionToggle(props) {
18
20
  const { translate } = useTranslation();
19
21
  const className = classnames("core-tree-expansionToggle", props.isExpanded && "is-expanded", props.className);
@@ -1 +1 @@
1
- {"version":3,"file":"ExpansionToggle.js","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAWxD;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,UAAU,CAC1B,2BAA2B,EAC3B,KAAK,CAAC,UAAU,IAAI,aAAa,EACjC,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAE5E,OAAO;IACL,iEAAiE;IACjE,6BACE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACvC,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,CAAC,KAAK,iBACL,KAAK,CAAC,aAAa,CAAC,EACjC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,gBACA,KAAK;QAEjB,oBAAC,IAAI,IAAC,SAAS,EAAC,aAAa,EAAC,QAAQ,EAAE,oBAAC,eAAe,OAAG,GAAI,CAC3D,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./ExpansionToggle.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { SvgChevronRight } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../l10n/useTranslation\";\n\n/** Properties for the [[ExpansionToggle]] component\n * @public\n */\nexport interface ExpansionToggleProps extends CommonProps {\n isExpanded?: boolean;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n [\"data-testid\"]?: string;\n}\n\n/** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state\n * @public\n */\nexport function ExpansionToggle(props: ExpansionToggleProps) {\n const { translate } = useTranslation();\n const className = classnames(\n \"core-tree-expansionToggle\",\n props.isExpanded && \"is-expanded\",\n props.className\n );\n const label = translate(props.isExpanded ? \"tree.collapse\" : \"tree.expand\");\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n onMouseDown={(e) => e.stopPropagation()}\n onClick={props.onClick}\n className={className}\n style={props.style}\n data-testid={props[\"data-testid\"]}\n role=\"button\"\n tabIndex={-1}\n aria-label={label}\n >\n <Icon className=\"toggle icon\" iconSpec={<SvgChevronRight />} />\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ExpansionToggle.js","sourceRoot":"","sources":["../../../../src/core-react/tree/ExpansionToggle.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,wBAAwB,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAaxD;;;GAGG;AACH,mDAAmD;AACnD,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,UAAU,CAC1B,2BAA2B,EAC3B,KAAK,CAAC,UAAU,IAAI,aAAa,EACjC,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAE5E,OAAO;IACL,iEAAiE;IACjE,6BACE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACvC,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,CAAC,KAAK,iBACL,KAAK,CAAC,aAAa,CAAC,EACjC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,gBACA,KAAK;QAEjB,oBAAC,IAAI,IAAC,SAAS,EAAC,aAAa,EAAC,QAAQ,EAAE,oBAAC,eAAe,OAAG,GAAI,CAC3D,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./ExpansionToggle.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { SvgChevronRight } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../l10n/useTranslation\";\n\n/** Properties for the [[ExpansionToggle]] component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link ExpansionToggle} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface ExpansionToggleProps extends CommonProps {\n isExpanded?: boolean;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n [\"data-testid\"]?: string;\n}\n\n/** ExpansionToggle React component used by the [[TreeNode]] component to show collapsed or expanded state\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function ExpansionToggle(props: ExpansionToggleProps) {\n const { translate } = useTranslation();\n const className = classnames(\n \"core-tree-expansionToggle\",\n props.isExpanded && \"is-expanded\",\n props.className\n );\n const label = translate(props.isExpanded ? \"tree.collapse\" : \"tree.expand\");\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n onMouseDown={(e) => e.stopPropagation()}\n onClick={props.onClick}\n className={className}\n style={props.style}\n data-testid={props[\"data-testid\"]}\n role=\"button\"\n tabIndex={-1}\n aria-label={label}\n >\n <Icon className=\"toggle icon\" iconSpec={<SvgChevronRight />} />\n </div>\n );\n}\n"]}
@@ -6,7 +6,6 @@ import * as React from "react";
6
6
  import { Checkbox } from "@itwin/itwinui-react";
7
7
  import { CheckBoxState } from "../enums/CheckBoxState";
8
8
  import type { CommonProps } from "../utils/Props";
9
- import type { Omit } from "../utils/typeUtils";
10
9
  type CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox>;
11
10
  /** Props for node Checkbox renderer
12
11
  * @public
@@ -25,6 +24,7 @@ export type NodeCheckboxRenderer = (props: NodeCheckboxRenderProps) => React.Rea
25
24
  export declare const LEVEL_OFFSET = 20;
26
25
  /** Properties for Tree Node CheckBox
27
26
  * @public
27
+ * @deprecated in 4.15.0. Used in deprecated {@link TreeNodeProps} props.
28
28
  */
29
29
  export interface NodeCheckboxProps {
30
30
  /** State of the checkbox */
@@ -38,13 +38,12 @@ export interface NodeCheckboxProps {
38
38
  }
39
39
  /** Properties for the [[TreeNode]] React component
40
40
  * @public
41
+ * @deprecated in 4.15.0. Props of deprecated {@link TreeNode} component.
41
42
  */
42
43
  export interface TreeNodeProps extends CommonProps {
43
44
  label: React.ReactNode;
44
45
  level: number;
45
46
  icon?: React.ReactElement | string | number;
46
- /** Properties for the checkbox.
47
- * @public */
48
47
  checkboxProps?: NodeCheckboxProps;
49
48
  isLeaf?: boolean;
50
49
  isLoading?: boolean;
@@ -68,6 +67,7 @@ export interface TreeNodeProps extends CommonProps {
68
67
  }
69
68
  /** Presentation React component for a Tree node
70
69
  * @public
70
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
71
71
  */
72
72
  export declare class TreeNode extends React.Component<TreeNodeProps> {
73
73
  constructor(props: TreeNodeProps);
@@ -1 +1 @@
1
- {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Node.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAkB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG/C,KAAK,aAAa,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,aAAa,EACb,UAAU,GAAG,SAAS,CACvB,GAAG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E,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC1C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,4EAA4E;IAC5E,eAAe,CAAC,EAAE;QAChB,6EAA6E;QAC7E,cAAc,CAAC,EAAE,oBAAoB,CAAC;KACvC,CAAC;IACF,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AAEH,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;gBAE9C,KAAK,EAAE,aAAa;IAIhB,MAAM;IA8FtB,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,iBAAiB,CASvB;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,uBAAuB,CAG7B;IAEF,OAAO,CAAC,QAAQ,CAGd;CACH"}
@@ -18,8 +18,11 @@ export const LEVEL_OFFSET = 20;
18
18
  const EXPANSION_TOGGLE_WIDTH = 24;
19
19
  /** Presentation React component for a Tree node
20
20
  * @public
21
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
21
22
  */
23
+ // eslint-disable-next-line deprecation/deprecation
22
24
  export class TreeNode extends React.Component {
25
+ // eslint-disable-next-line deprecation/deprecation
23
26
  constructor(props) {
24
27
  super(props);
25
28
  this._onCheckboxChange = (checked) => {
@@ -66,7 +69,9 @@ export class TreeNode extends React.Component {
66
69
  }
67
70
  }
68
71
  const icon = this.props.icon ? (React.createElement("div", { className: "core-tree-node-icon" }, this.props.icon)) : undefined;
69
- const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (React.createElement("div", null)) : (React.createElement(ExpansionToggle, { className: "expansion-toggle", "data-testid": this.createSubComponentTestId("expansion-toggle"), onClick: this._onClickExpansionToggle, isExpanded: this.props.isExpanded }));
72
+ const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (React.createElement("div", null)) : (
73
+ // eslint-disable-next-line deprecation/deprecation
74
+ React.createElement(ExpansionToggle, { className: "expansion-toggle", "data-testid": this.createSubComponentTestId("expansion-toggle"), onClick: this._onClickExpansionToggle, isExpanded: this.props.isExpanded }));
70
75
  return (
71
76
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
72
77
  React.createElement("div", { className: className, style: this.props.style, "data-testid": this.props["data-testid"], onClick: this._onClick, onContextMenu: this.props.onContextMenu, onMouseDown: this.props.onMouseDown, onMouseUp: this.props.onMouseUp, onMouseMove: this.props.onMouseMove, role: "treeitem", "aria-selected": this.props.isSelected ? "true" : "false", tabIndex: -1 },
@@ -1 +1 @@
1
- {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Node.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAsBpD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAgDlC;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAwB;IAC1D,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QAqGP,sBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE;Y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;IACJ,CAAC;IAEO,wBAAwB,CAAC,KAAa;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAAE,OAAO,SAAS,CAAC;QACjD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC;IACjD,CAAC;CA0BF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Node.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Checkbox, ProgressRadial } from \"@itwin/itwinui-react\";\nimport { CheckBoxState } from \"../enums/CheckBoxState\";\nimport type { CommonProps } from \"../utils/Props\";\nimport type { Omit } from \"../utils/typeUtils\";\nimport { ExpansionToggle } from \"./ExpansionToggle\";\n\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox>;\n\n/** Props for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderProps = Omit<\n CheckboxProps,\n \"onChange\" | \"onClick\"\n> & {\n onChange: (checked: boolean) => void;\n onClick: (e: React.MouseEvent) => void;\n};\n\n/** Type for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderer = (\n props: NodeCheckboxRenderProps\n) => React.ReactNode;\n\n/** Number of pixels the node gets offset per each hierarchy level\n * @internal\n */\nexport const LEVEL_OFFSET = 20;\n\nconst EXPANSION_TOGGLE_WIDTH = 24;\n\n/** Properties for Tree Node CheckBox\n * @public\n */\nexport interface NodeCheckboxProps {\n /** State of the checkbox */\n state?: CheckBoxState;\n /** Click event callback */\n onClick?: (newState: CheckBoxState) => void;\n /** Indicates whether checkbox is disabled */\n isDisabled?: boolean;\n /** Tooltip to be displayed when mouse is hovered over checkbox */\n tooltip?: string;\n}\n\n/** Properties for the [[TreeNode]] React component\n * @public\n */\nexport interface TreeNodeProps extends CommonProps {\n label: React.ReactNode;\n level: number;\n icon?: React.ReactElement | string | number;\n /** Properties for the checkbox.\n * @public */\n checkboxProps?: NodeCheckboxProps;\n isLeaf?: boolean;\n isLoading?: boolean;\n isExpanded?: boolean;\n isFocused?: boolean;\n isSelected?: boolean;\n isHoverDisabled?: boolean;\n onClick?: (e: React.MouseEvent) => void;\n onContextMenu?: (e: React.MouseEvent) => void;\n onMouseMove?: (e: React.MouseEvent) => void;\n onMouseDown?: (e: React.MouseEvent) => void;\n onMouseUp?: (e: React.MouseEvent) => void;\n onClickExpansionToggle?: () => void;\n children?: React.ReactNode;\n\n /** Contains render overrides for different pieces of the node component. */\n renderOverrides?: {\n /** Callback to render a checkbox. Only called when checkbox is displayed. */\n renderCheckbox?: NodeCheckboxRenderer;\n };\n [\"data-testid\"]?: string;\n}\n\n/** Presentation React component for a Tree node\n * @public\n */\nexport class TreeNode extends React.Component<TreeNodeProps> {\n constructor(props: TreeNodeProps) {\n super(props);\n }\n\n public override render() {\n const className = classnames(\n \"core-tree-node\",\n this.props.isFocused && \"is-focused\",\n this.props.isSelected && \"is-selected\",\n this.props.isHoverDisabled && \"is-hover-disabled\",\n this.props.className\n );\n let offset = this.props.level * LEVEL_OFFSET;\n if (!this.props.isLoading && this.props.isLeaf)\n offset += EXPANSION_TOGGLE_WIDTH; // Add expansion toggle/loader width if they're not rendered\n\n let checkbox: React.ReactNode;\n if (this.props.checkboxProps) {\n const props: NodeCheckboxRenderProps = {\n label: \"\",\n checked: this.props.checkboxProps.state === CheckBoxState.On,\n indeterminate: this.props.checkboxProps.state === CheckBoxState.Partial,\n disabled: this.props.checkboxProps.isDisabled,\n title: this.props.checkboxProps.tooltip,\n onClick: this._onCheckboxClick,\n onChange: this._onCheckboxChange,\n };\n if (\n this.props.renderOverrides &&\n this.props.renderOverrides.renderCheckbox\n ) {\n checkbox = this.props.renderOverrides.renderCheckbox(props);\n } else {\n checkbox = (\n <Checkbox\n {...props}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n this._onCheckboxChange(e.target.checked)\n }\n data-testid={this.createSubComponentTestId(\"checkbox\")}\n />\n );\n }\n }\n\n const icon = this.props.icon ? (\n <div className=\"core-tree-node-icon\">{this.props.icon}</div>\n ) : undefined;\n\n const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (\n <div />\n ) : (\n <ExpansionToggle\n className=\"expansion-toggle\"\n data-testid={this.createSubComponentTestId(\"expansion-toggle\")}\n onClick={this._onClickExpansionToggle}\n isExpanded={this.props.isExpanded}\n />\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n className={className}\n style={this.props.style}\n data-testid={this.props[\"data-testid\"]}\n onClick={this._onClick}\n onContextMenu={this.props.onContextMenu}\n onMouseDown={this.props.onMouseDown}\n onMouseUp={this.props.onMouseUp}\n onMouseMove={this.props.onMouseMove}\n role=\"treeitem\"\n aria-selected={this.props.isSelected ? \"true\" : \"false\"}\n tabIndex={-1}\n >\n <div\n className=\"contents\"\n style={{ marginLeft: offset }}\n data-testid={this.createSubComponentTestId(\"contents\")}\n >\n {this.props.isLoading && (\n <ProgressRadial\n size=\"x-small\"\n indeterminate\n className=\"core-progress-indicator\"\n />\n )}\n {toggle}\n {checkbox}\n {icon}\n {this.props.label}\n </div>\n {this.props.children}\n </div>\n );\n }\n\n private createSubComponentTestId(subId: string): string | undefined {\n if (!this.props[\"data-testid\"]) return undefined;\n return `${this.props[\"data-testid\"]}-${subId}`;\n }\n\n private _onCheckboxChange = (checked: boolean) => {\n if (\n this.props.checkboxProps &&\n this.props.checkboxProps.onClick &&\n !this.props.checkboxProps.isDisabled\n )\n this.props.checkboxProps.onClick(\n checked ? CheckBoxState.On : CheckBoxState.Off\n );\n };\n\n private _onCheckboxClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n };\n\n private _onClickExpansionToggle = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n if (this.props.onClickExpansionToggle) this.props.onClickExpansionToggle();\n };\n\n private _onClick = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n this.props.onClick?.(e);\n };\n}\n"]}
1
+ {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Node.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAsBpD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAkDlC;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAwB;IAC1D,mDAAmD;IACnD,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QAsGP,sBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE;YAC/C,IACE,IAAI,CAAC,KAAK,CAAC,aAAa;gBACxB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO;gBAChC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU;gBAEpC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAC9B,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAC/C,CAAC;QACN,CAAC,CAAC;QAEM,qBAAgB,GAAG,CAAC,CAAmB,EAAE,EAAE;YACjD,CAAC,CAAC,eAAe,EAAE,CAAC;QACtB,CAAC,CAAC;QAEM,4BAAuB,GAAG,CAAC,CAAmC,EAAE,EAAE;YACx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C,KAAK,CAAC,aAAa,CAAC,EACtC,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EACvC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,IAAI,EAAC,UAAU,mBACA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EACvD,QAAQ,EAAE,CAAC,CAAC;YAEZ,6BACE,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,iBAChB,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC;gBAErD,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CACvB,oBAAC,cAAc,IACb,IAAI,EAAC,SAAS,EACd,aAAa,QACb,SAAS,EAAC,yBAAyB,GACnC,CACH;gBACA,MAAM;gBACN,QAAQ;gBACR,IAAI;gBACJ,IAAI,CAAC,KAAK,CAAC,KAAK,CACb;YACL,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;IAEO,wBAAwB,CAAC,KAAa;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAAE,OAAO,SAAS,CAAC;QACjD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC;IACjD,CAAC;CA0BF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Node.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Checkbox, ProgressRadial } from \"@itwin/itwinui-react\";\nimport { CheckBoxState } from \"../enums/CheckBoxState\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { ExpansionToggle } from \"./ExpansionToggle\";\n\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox>;\n\n/** Props for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderProps = Omit<\n CheckboxProps,\n \"onChange\" | \"onClick\"\n> & {\n onChange: (checked: boolean) => void;\n onClick: (e: React.MouseEvent) => void;\n};\n\n/** Type for node Checkbox renderer\n * @public\n */\nexport type NodeCheckboxRenderer = (\n props: NodeCheckboxRenderProps\n) => React.ReactNode;\n\n/** Number of pixels the node gets offset per each hierarchy level\n * @internal\n */\nexport const LEVEL_OFFSET = 20;\n\nconst EXPANSION_TOGGLE_WIDTH = 24;\n\n/** Properties for Tree Node CheckBox\n * @public\n * @deprecated in 4.15.0. Used in deprecated {@link TreeNodeProps} props.\n */\nexport interface NodeCheckboxProps {\n /** State of the checkbox */\n state?: CheckBoxState;\n /** Click event callback */\n onClick?: (newState: CheckBoxState) => void;\n /** Indicates whether checkbox is disabled */\n isDisabled?: boolean;\n /** Tooltip to be displayed when mouse is hovered over checkbox */\n tooltip?: string;\n}\n\n/** Properties for the [[TreeNode]] React component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link TreeNode} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface TreeNodeProps extends CommonProps {\n label: React.ReactNode;\n level: number;\n icon?: React.ReactElement | string | number;\n // eslint-disable-next-line deprecation/deprecation\n checkboxProps?: NodeCheckboxProps;\n isLeaf?: boolean;\n isLoading?: boolean;\n isExpanded?: boolean;\n isFocused?: boolean;\n isSelected?: boolean;\n isHoverDisabled?: boolean;\n onClick?: (e: React.MouseEvent) => void;\n onContextMenu?: (e: React.MouseEvent) => void;\n onMouseMove?: (e: React.MouseEvent) => void;\n onMouseDown?: (e: React.MouseEvent) => void;\n onMouseUp?: (e: React.MouseEvent) => void;\n onClickExpansionToggle?: () => void;\n children?: React.ReactNode;\n\n /** Contains render overrides for different pieces of the node component. */\n renderOverrides?: {\n /** Callback to render a checkbox. Only called when checkbox is displayed. */\n renderCheckbox?: NodeCheckboxRenderer;\n };\n [\"data-testid\"]?: string;\n}\n\n/** Presentation React component for a Tree node\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class TreeNode extends React.Component<TreeNodeProps> {\n // eslint-disable-next-line deprecation/deprecation\n constructor(props: TreeNodeProps) {\n super(props);\n }\n\n public override render() {\n const className = classnames(\n \"core-tree-node\",\n this.props.isFocused && \"is-focused\",\n this.props.isSelected && \"is-selected\",\n this.props.isHoverDisabled && \"is-hover-disabled\",\n this.props.className\n );\n let offset = this.props.level * LEVEL_OFFSET;\n if (!this.props.isLoading && this.props.isLeaf)\n offset += EXPANSION_TOGGLE_WIDTH; // Add expansion toggle/loader width if they're not rendered\n\n let checkbox: React.ReactNode;\n if (this.props.checkboxProps) {\n const props: NodeCheckboxRenderProps = {\n label: \"\",\n checked: this.props.checkboxProps.state === CheckBoxState.On,\n indeterminate: this.props.checkboxProps.state === CheckBoxState.Partial,\n disabled: this.props.checkboxProps.isDisabled,\n title: this.props.checkboxProps.tooltip,\n onClick: this._onCheckboxClick,\n onChange: this._onCheckboxChange,\n };\n if (\n this.props.renderOverrides &&\n this.props.renderOverrides.renderCheckbox\n ) {\n checkbox = this.props.renderOverrides.renderCheckbox(props);\n } else {\n checkbox = (\n <Checkbox\n {...props}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n this._onCheckboxChange(e.target.checked)\n }\n data-testid={this.createSubComponentTestId(\"checkbox\")}\n />\n );\n }\n }\n\n const icon = this.props.icon ? (\n <div className=\"core-tree-node-icon\">{this.props.icon}</div>\n ) : undefined;\n\n const toggle = this.props.isLoading ? undefined : this.props.isLeaf ? (\n <div />\n ) : (\n // eslint-disable-next-line deprecation/deprecation\n <ExpansionToggle\n className=\"expansion-toggle\"\n data-testid={this.createSubComponentTestId(\"expansion-toggle\")}\n onClick={this._onClickExpansionToggle}\n isExpanded={this.props.isExpanded}\n />\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n className={className}\n style={this.props.style}\n data-testid={this.props[\"data-testid\"]}\n onClick={this._onClick}\n onContextMenu={this.props.onContextMenu}\n onMouseDown={this.props.onMouseDown}\n onMouseUp={this.props.onMouseUp}\n onMouseMove={this.props.onMouseMove}\n role=\"treeitem\"\n aria-selected={this.props.isSelected ? \"true\" : \"false\"}\n tabIndex={-1}\n >\n <div\n className=\"contents\"\n style={{ marginLeft: offset }}\n data-testid={this.createSubComponentTestId(\"contents\")}\n >\n {this.props.isLoading && (\n <ProgressRadial\n size=\"x-small\"\n indeterminate\n className=\"core-progress-indicator\"\n />\n )}\n {toggle}\n {checkbox}\n {icon}\n {this.props.label}\n </div>\n {this.props.children}\n </div>\n );\n }\n\n private createSubComponentTestId(subId: string): string | undefined {\n if (!this.props[\"data-testid\"]) return undefined;\n return `${this.props[\"data-testid\"]}-${subId}`;\n }\n\n private _onCheckboxChange = (checked: boolean) => {\n if (\n this.props.checkboxProps &&\n this.props.checkboxProps.onClick &&\n !this.props.checkboxProps.isDisabled\n )\n this.props.checkboxProps.onClick(\n checked ? CheckBoxState.On : CheckBoxState.Off\n );\n };\n\n private _onCheckboxClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n };\n\n private _onClickExpansionToggle = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n if (this.props.onClickExpansionToggle) this.props.onClickExpansionToggle();\n };\n\n private _onClick = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n this.props.onClick?.(e);\n };\n}\n"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[TreeNodePlaceholder]] React component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link TreeNodePlaceholder} component.
9
10
  */
10
11
  export interface TreeNodePlaceholderProps extends CommonProps {
11
12
  level: number;
@@ -16,6 +17,7 @@ export interface TreeNodePlaceholderProps extends CommonProps {
16
17
  /**
17
18
  * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded
18
19
  * @public
20
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
19
21
  */
20
22
  export declare class TreeNodePlaceholder extends React.PureComponent<TreeNodePlaceholderProps> {
21
23
  render(): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAAC;IACpE,MAAM;CAiBvB"}
1
+ {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;GAGG;AAEH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AAEH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAAC;IACpE,MAAM;CAiBvB"}
@@ -12,7 +12,9 @@ import { LEVEL_OFFSET } from "./Node";
12
12
  /**
13
13
  * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded
14
14
  * @public
15
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
15
16
  */
17
+ // eslint-disable-next-line deprecation/deprecation
16
18
  export class TreeNodePlaceholder extends React.PureComponent {
17
19
  render() {
18
20
  const className = classnames("core-tree-placeholder", this.props.className);
@@ -1 +1 @@
1
- {"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAYtC;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK,CAAC,aAAuC;IACpE,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,YAAY,CAAC;QAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QAC5D,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClE,OAAO,CACL,6BACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,iBACC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAEtC,6BAAK,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,EAAE,GAAI,CACxD,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Placeholder.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { LEVEL_OFFSET } from \"./Node\";\n\n/** Properties for the [[TreeNodePlaceholder]] React component\n * @public\n */\nexport interface TreeNodePlaceholderProps extends CommonProps {\n level: number;\n minWidth?: number;\n maxWidth?: number;\n [\"data-testid\"]?: string;\n}\n\n/**\n * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded\n * @public\n */\nexport class TreeNodePlaceholder extends React.PureComponent<TreeNodePlaceholderProps> {\n public override render() {\n const className = classnames(\"core-tree-placeholder\", this.props.className);\n const offset = this.props.level * LEVEL_OFFSET;\n const min = this.props.minWidth || 50;\n const max = this.props.maxWidth || 200;\n const width = Math.floor(min + Math.random() * (max - min));\n const style = { ...this.props.style, paddingLeft: `${offset}px` };\n return (\n <div\n className={className}\n style={style}\n data-testid={this.props[\"data-testid\"]}\n >\n <div className=\"contents\" style={{ width: `${width}px` }} />\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Placeholder.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AActC;;;;GAIG;AACH,mDAAmD;AACnD,MAAM,OAAO,mBAAoB,SAAQ,KAAK,CAAC,aAAuC;IACpE,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,YAAY,CAAC;QAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QAC5D,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClE,OAAO,CACL,6BACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,iBACC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAEtC,6BAAK,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,EAAE,GAAI,CACxD,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Placeholder.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { LEVEL_OFFSET } from \"./Node\";\n\n/** Properties for the [[TreeNodePlaceholder]] React component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link TreeNodePlaceholder} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface TreeNodePlaceholderProps extends CommonProps {\n level: number;\n minWidth?: number;\n maxWidth?: number;\n [\"data-testid\"]?: string;\n}\n\n/**\n * Presentation React component for a placeholder to be displayed instead of a node while it's being loaded\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class TreeNodePlaceholder extends React.PureComponent<TreeNodePlaceholderProps> {\n public override render() {\n const className = classnames(\"core-tree-placeholder\", this.props.className);\n const offset = this.props.level * LEVEL_OFFSET;\n const min = this.props.minWidth || 50;\n const max = this.props.maxWidth || 200;\n const width = Math.floor(min + Math.random() * (max - min));\n const style = { ...this.props.style, paddingLeft: `${offset}px` };\n return (\n <div\n className={className}\n style={style}\n data-testid={this.props[\"data-testid\"]}\n >\n <div className=\"contents\" style={{ width: `${width}px` }} />\n </div>\n );\n }\n}\n"]}
@@ -6,6 +6,7 @@ import * as React from "react";
6
6
  import type { CommonProps } from "../utils/Props";
7
7
  /** Properties for the [[Tree]] presentational React component
8
8
  * @public
9
+ * @deprecated in 4.15.0. Props of deprecated {@link Tree} component.
9
10
  */
10
11
  export interface TreeProps extends CommonProps {
11
12
  children?: React.ReactNode;
@@ -17,6 +18,7 @@ export interface TreeProps extends CommonProps {
17
18
  }
18
19
  /** Presentation React component for a Tree
19
20
  * @public
21
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
20
22
  */
21
23
  export declare class Tree extends React.PureComponent<TreeProps> {
22
24
  private _treeElement;
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,qBAAa,IAAK,SAAQ,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;IACtD,OAAO,CAAC,YAAY,CAAsD;IAE1E,OAAO,KAAK,oBAAoB,GAsB/B;IAEM,eAAe,CAAC,OAAO,EAAE,OAAO;IAwDhC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE;IASpD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAcrC,MAAM;CAoBvB"}
1
+ {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;GAGG;AAEH,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;CACtD;AAED;;;GAGG;AAEH,qBAAa,IAAK,SAAQ,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;IACtD,OAAO,CAAC,YAAY,CAAsD;IAE1E,OAAO,KAAK,oBAAoB,GAsB/B;IAEM,eAAe,CAAC,OAAO,EAAE,OAAO;IAwDhC,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE;IASpD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAcrC,MAAM;CAoBvB"}
@@ -11,7 +11,9 @@ import * as React from "react";
11
11
  import { Rectangle } from "../utils/Rectangle";
12
12
  /** Presentation React component for a Tree
13
13
  * @public
14
+ * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.
14
15
  */
16
+ // eslint-disable-next-line deprecation/deprecation
15
17
  export class Tree extends React.PureComponent {
16
18
  constructor() {
17
19
  super(...arguments);
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAA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,CAAC,KAAK,CAAC,KAAK,EACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,IAEX,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Tree.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Rectangle } from \"../utils/Rectangle\";\n\n/** Properties for the [[Tree]] presentational React component\n * @public\n */\nexport interface TreeProps extends CommonProps {\n children?: React.ReactNode;\n onMouseDown?: React.MouseEventHandler<HTMLDivElement>;\n onMouseMove?: React.MouseEventHandler<HTMLDivElement>;\n onMouseUp?: React.MouseEventHandler<HTMLDivElement>;\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\n onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;\n}\n\n/** Presentation React component for a Tree\n * @public\n */\nexport class Tree extends React.PureComponent<TreeProps> {\n private _treeElement: React.RefObject<HTMLDivElement> = React.createRef();\n\n private get _scrollableContainer(): Element | undefined {\n if (!this._treeElement.current) return undefined;\n\n const isScrollable = (element: Element) => {\n const style = window.getComputedStyle(element);\n return (\n style.overflow === \"auto\" ||\n style.overflow === \"scroll\" ||\n style.overflowY === \"auto\" ||\n style.overflowY === \"scroll\" ||\n style.overflowX === \"auto\" ||\n style.overflowX === \"scroll\"\n );\n };\n let scrollableContainer: Element | undefined = this._treeElement.current;\n while (scrollableContainer && !isScrollable(scrollableContainer))\n scrollableContainer =\n scrollableContainer.children.length > 0\n ? scrollableContainer.children[0]\n : undefined;\n\n return scrollableContainer;\n }\n\n public scrollToElement(element: Element) {\n const container = this._scrollableContainer;\n if (!container) return;\n\n if (!Element.prototype.scrollTo) {\n // workaround for Edge scrollTo issue https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15534521/\n element.scrollIntoView();\n return;\n }\n\n const elementBox = element.getBoundingClientRect();\n const elementRange = Rectangle.createXYXY(\n elementBox.left,\n elementBox.top,\n elementBox.right,\n elementBox.bottom\n );\n const containerBox = container.getBoundingClientRect();\n const containerRange = Rectangle.createXYXY(\n containerBox.left - container.scrollLeft,\n containerBox.top - container.scrollTop,\n containerBox.right - container.scrollLeft,\n containerBox.bottom - container.scrollTop\n );\n\n let left: number;\n if (\n container.scrollLeft > 0 &&\n elementRange.right <= containerRange.right\n ) {\n // always attempt to keep horizontal scroll at 0\n left = 0;\n } else if (\n containerRange.left <= elementRange.left &&\n containerRange.right >= elementRange.right\n ) {\n // already visible - no need to scroll to\n left = container.scrollLeft;\n } else {\n left = elementRange.left - containerRange.left;\n }\n\n let top: number;\n if (\n containerRange.top <= elementRange.top &&\n containerRange.bottom >= elementRange.bottom\n ) {\n // already visible - no need to scroll to\n top = container.scrollTop;\n } else {\n top = elementRange.top - containerRange.top;\n }\n\n container.scrollTo({ left, top });\n }\n\n public getElementsByClassName(className: string): Element[] {\n if (!this._treeElement.current) return [];\n\n const elems = new Array<Element>();\n const collection =\n this._treeElement.current.getElementsByClassName(className);\n for (let i = 0; i < collection.length; ++i) elems.push(collection.item(i)!);\n return elems;\n }\n public setFocusByClassName(selector: string): boolean {\n let status = false;\n if (this._treeElement.current) {\n const element = this._treeElement.current.querySelector(\n selector\n ) as HTMLElement;\n if (element && element.focus) {\n element.focus();\n status = true;\n }\n }\n return status;\n }\n\n public override render() {\n const className = classnames(\"core-tree\", this.props.className);\n\n return (\n <div\n ref={this._treeElement}\n className={className}\n style={this.props.style}\n onMouseDown={this.props.onMouseDown}\n onMouseMove={this.props.onMouseMove}\n onMouseUp={this.props.onMouseUp}\n onKeyDown={this.props.onKeyDown}\n onKeyUp={this.props.onKeyUp}\n role=\"tree\"\n tabIndex={-1}\n >\n {this.props.children}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"Tree.js","sourceRoot":"","sources":["../../../../src/core-react/tree/Tree.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,aAAa,CAAC;AACrB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgB/C;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,IAAK,SAAQ,KAAK,CAAC,aAAwB;IAAxD;;QACU,iBAAY,GAAoC,KAAK,CAAC,SAAS,EAAE,CAAC;IA6H5E,CAAC;IA3HC,IAAY,oBAAoB;QAC9B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QAEjD,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;YAC/C,OAAO,CACL,KAAK,CAAC,QAAQ,KAAK,MAAM;gBACzB,KAAK,CAAC,QAAQ,KAAK,QAAQ;gBAC3B,KAAK,CAAC,SAAS,KAAK,MAAM;gBAC1B,KAAK,CAAC,SAAS,KAAK,QAAQ;gBAC5B,KAAK,CAAC,SAAS,KAAK,MAAM;gBAC1B,KAAK,CAAC,SAAS,KAAK,QAAQ,CAC7B,CAAC;QACJ,CAAC,CAAC;QACF,IAAI,mBAAmB,GAAwB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;QACz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AC,aAAa,CACrD,QAAQ,CACM,CAAC;YACjB,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;gBAC7B,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,MAAM,GAAG,IAAI,CAAC;YAChB,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEe,MAAM;QACpB,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEhE,OAAO,CACL,6BACE,GAAG,EAAE,IAAI,CAAC,YAAY,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,IAEX,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./Tree.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Rectangle } from \"../utils/Rectangle\";\n\n/** Properties for the [[Tree]] presentational React component\n * @public\n * @deprecated in 4.15.0. Props of deprecated {@link Tree} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface TreeProps extends CommonProps {\n children?: React.ReactNode;\n onMouseDown?: React.MouseEventHandler<HTMLDivElement>;\n onMouseMove?: React.MouseEventHandler<HTMLDivElement>;\n onMouseUp?: React.MouseEventHandler<HTMLDivElement>;\n onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\n onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;\n}\n\n/** Presentation React component for a Tree\n * @public\n * @deprecated in 4.15.0. Use {@link https://itwinui.bentley.com/docs/tree iTwinUI Tree} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class Tree extends React.PureComponent<TreeProps> {\n private _treeElement: React.RefObject<HTMLDivElement> = React.createRef();\n\n private get _scrollableContainer(): Element | undefined {\n if (!this._treeElement.current) return undefined;\n\n const isScrollable = (element: Element) => {\n const style = window.getComputedStyle(element);\n return (\n style.overflow === \"auto\" ||\n style.overflow === \"scroll\" ||\n style.overflowY === \"auto\" ||\n style.overflowY === \"scroll\" ||\n style.overflowX === \"auto\" ||\n style.overflowX === \"scroll\"\n );\n };\n let scrollableContainer: Element | undefined = this._treeElement.current;\n while (scrollableContainer && !isScrollable(scrollableContainer))\n scrollableContainer =\n scrollableContainer.children.length > 0\n ? scrollableContainer.children[0]\n : undefined;\n\n return scrollableContainer;\n }\n\n public scrollToElement(element: Element) {\n const container = this._scrollableContainer;\n if (!container) return;\n\n if (!Element.prototype.scrollTo) {\n // workaround for Edge scrollTo issue https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15534521/\n element.scrollIntoView();\n return;\n }\n\n const elementBox = element.getBoundingClientRect();\n const elementRange = Rectangle.createXYXY(\n elementBox.left,\n elementBox.top,\n elementBox.right,\n elementBox.bottom\n );\n const containerBox = container.getBoundingClientRect();\n const containerRange = Rectangle.createXYXY(\n containerBox.left - container.scrollLeft,\n containerBox.top - container.scrollTop,\n containerBox.right - container.scrollLeft,\n containerBox.bottom - container.scrollTop\n );\n\n let left: number;\n if (\n container.scrollLeft > 0 &&\n elementRange.right <= containerRange.right\n ) {\n // always attempt to keep horizontal scroll at 0\n left = 0;\n } else if (\n containerRange.left <= elementRange.left &&\n containerRange.right >= elementRange.right\n ) {\n // already visible - no need to scroll to\n left = container.scrollLeft;\n } else {\n left = elementRange.left - containerRange.left;\n }\n\n let top: number;\n if (\n containerRange.top <= elementRange.top &&\n containerRange.bottom >= elementRange.bottom\n ) {\n // already visible - no need to scroll to\n top = container.scrollTop;\n } else {\n top = elementRange.top - containerRange.top;\n }\n\n container.scrollTo({ left, top });\n }\n\n public getElementsByClassName(className: string): Element[] {\n if (!this._treeElement.current) return [];\n\n const elems = new Array<Element>();\n const collection =\n this._treeElement.current.getElementsByClassName(className);\n for (let i = 0; i < collection.length; ++i) elems.push(collection.item(i)!);\n return elems;\n }\n public setFocusByClassName(selector: string): boolean {\n let status = false;\n if (this._treeElement.current) {\n const element = this._treeElement.current.querySelector(\n selector\n ) as HTMLElement;\n if (element && element.focus) {\n element.focus();\n status = true;\n }\n }\n return status;\n }\n\n public override render() {\n const className = classnames(\"core-tree\", this.props.className);\n\n return (\n <div\n ref={this._treeElement}\n className={className}\n style={this.props.style}\n onMouseDown={this.props.onMouseDown}\n onMouseMove={this.props.onMouseMove}\n onMouseUp={this.props.onMouseUp}\n onKeyDown={this.props.onKeyDown}\n onKeyUp={this.props.onKeyUp}\n role=\"tree\"\n tabIndex={-1}\n >\n {this.props.children}\n </div>\n );\n }\n}\n"]}
@@ -7,6 +7,7 @@ import type { IconSpec } from "../icons/IconComponent";
7
7
  import { ConditionalIconItem } from "../icons/ConditionalIconItem";
8
8
  /** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.
9
9
  * @public
10
+ * @deprecated in 4.15.0. Used internally.
10
11
  */
11
12
  export declare class IconHelper {
12
13
  static get reactIconKey(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"IconHelper.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EA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WAAW,CACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,MAAM,GAAG,sBAAsB;CA0BnC"}
@@ -5,12 +5,14 @@
5
5
  /** @packageDocumentation
6
6
  * @module Utilities
7
7
  */
8
+ /* eslint-disable deprecation/deprecation */
8
9
  import * as React from "react";
9
10
  import { ConditionalStringValue } from "@itwin/appui-abstract";
10
11
  import { Icon } from "../icons/IconComponent";
11
12
  import { ConditionalIconItem } from "../icons/ConditionalIconItem";
12
13
  /** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.
13
14
  * @public
15
+ * @deprecated in 4.15.0. Used internally.
14
16
  */
15
17
  export class IconHelper {
16
18
  static get reactIconKey() {
@@ -1 +1 @@
1
- {"version":3,"file":"IconHelper.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAO,UAAU;IACd,MAAM,KAAK,YAAY;QAC5B,OAAO,yBAAyB,CAAC;IACnC,CAAC;IACM,MAAM,KAAK,sBAAsB;QACtC,OAAO,gCAAgC,CAAC;IAC1C,CAAC;IACD;;;OAGG;IACI,MAAM,CAAC,gBAAgB,CAC5B,IAIuB,EACvB,YAA+B;QAE/B,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAEvB,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,IAAI,CAAC;YACjD,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,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,QAAQ,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;gBACnC,CAAC,CAAC,UAAU,CAAC,YAAY;gBACzB,CAAC,CAAC,QAAQ,CAAC;QACf,CAAC;QAED,IACE,YAAY;YACZ,OAAO,IAAI,KAAK,QAAQ;YACxB,IAAI,KAAK,UAAU,CAAC,YAAY,EAChC,CAAC;YACD,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,YAAY,sBAAsB;YACpE,OAAO,IAAI,CAAC;QAEd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { ConditionalIconItem } from \"../icons/ConditionalIconItem\";\n\n/** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.\n * @public\n */\nexport class IconHelper {\n public static get reactIconKey(): string {\n return \"#-react-iconspec-node-#\";\n }\n public static get conditionalIconItemKey(): string {\n return \"#-conditional-icon-item-node-#\";\n }\n /** Returns an <Icon> ReactNode from the many ways an icon can be specified.\n * @param icon abstract icon specification.\n * @param internalData a map that may hold a React.ReactNode stored in an abstract item definition.\n */\n public static getIconReactNode(\n icon:\n | string\n | ConditionalStringValue\n | React.ReactNode\n | ConditionalIconItem,\n internalData?: Map<string, any>\n ): React.ReactNode {\n if (!icon) return null;\n\n if (ConditionalIconItem.isConditionalIconItem(icon))\n return <Icon iconSpec={ConditionalIconItem.getValue(icon)} />;\n if (React.isValidElement(icon)) return <Icon iconSpec={icon} />;\n\n if (!(icon instanceof ConditionalStringValue) && typeof icon !== \"string\")\n return null;\n\n const iconString = ConditionalStringValue.getValue(icon);\n if (!iconString) return null;\n\n if (iconString === IconHelper.reactIconKey) {\n if (internalData)\n return (\n <Icon\n iconSpec={\n internalData.get(IconHelper.reactIconKey) as React.ReactNode\n }\n />\n );\n return null;\n } else if (iconString === IconHelper.conditionalIconItemKey) {\n if (internalData) {\n const iconItem = internalData.get(\n IconHelper.conditionalIconItemKey\n ) as ConditionalIconItem;\n return <Icon iconSpec={ConditionalIconItem.getValue(iconItem)} />;\n }\n return null;\n }\n return <Icon iconSpec={iconString} />;\n }\n\n /** Returns an icon definition that can be stored in an abstract item definition. If the iconSpec specifies a ReactNode\n * then the react data is stored in the internalData map and the key to the react data is returned.\n * @param iconSpec any supported variations of how an icon can be defined in an abstract item or IconProps.\n * @param internalData a map supplied by the caller to store away react element if React.ReactNode\n */\n public static getIconData(\n iconSpec: IconSpec,\n internalData?: Map<string, any>\n ): string | ConditionalStringValue {\n let icon;\n if (ConditionalIconItem.isConditionalIconItem(iconSpec)) {\n icon = IconHelper.conditionalIconItemKey;\n if (internalData)\n internalData.set(IconHelper.conditionalIconItemKey, iconSpec);\n return icon;\n } else {\n icon = React.isValidElement(iconSpec)\n ? IconHelper.reactIconKey\n : iconSpec;\n }\n\n if (\n internalData &&\n typeof icon === \"string\" &&\n icon === IconHelper.reactIconKey\n ) {\n internalData.set(IconHelper.reactIconKey, iconSpec);\n }\n\n if (typeof icon === \"string\" || icon instanceof ConditionalStringValue)\n return icon;\n\n return \"\";\n }\n}\n"]}
1
+ {"version":3,"file":"IconHelper.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconHelper.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC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E,CAAC;gBACjB,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAC/B,UAAU,CAAC,sBAAsB,CACX,CAAC;gBACzB,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAI,CAAC;YACpE,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,UAAU,GAAI,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CACvB,QAAkB,EAClB,YAA+B;QAE/B,IAAI,IAAI,CAAC;QACT,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxD,IAAI,GAAG,UAAU,CAAC,sBAAsB,CAAC;YACzC,IAAI,YAAY;gBACd,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;gBACnC,CAAC,CAAC,UAAU,CAAC,YAAY;gBACzB,CAAC,CAAC,QAAQ,CAAC;QACf,CAAC;QAED,IACE,YAAY;YACZ,OAAO,IAAI,KAAK,QAAQ;YACxB,IAAI,KAAK,UAAU,CAAC,YAAY,EAChC,CAAC;YACD,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,YAAY,sBAAsB;YACpE,OAAO,IAAI,CAAC;QAEd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/* eslint-disable deprecation/deprecation */\n\nimport * as React from \"react\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { ConditionalIconItem } from \"../icons/ConditionalIconItem\";\n\n/** Icon Helper Class used to store the data needed to generate an <Icon> for use in any control that shows an icon.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport class IconHelper {\n public static get reactIconKey(): string {\n return \"#-react-iconspec-node-#\";\n }\n public static get conditionalIconItemKey(): string {\n return \"#-conditional-icon-item-node-#\";\n }\n /** Returns an <Icon> ReactNode from the many ways an icon can be specified.\n * @param icon abstract icon specification.\n * @param internalData a map that may hold a React.ReactNode stored in an abstract item definition.\n */\n public static getIconReactNode(\n icon:\n | string\n | ConditionalStringValue\n | React.ReactNode\n | ConditionalIconItem,\n internalData?: Map<string, any>\n ): React.ReactNode {\n if (!icon) return null;\n\n if (ConditionalIconItem.isConditionalIconItem(icon))\n return <Icon iconSpec={ConditionalIconItem.getValue(icon)} />;\n if (React.isValidElement(icon)) return <Icon iconSpec={icon} />;\n\n if (!(icon instanceof ConditionalStringValue) && typeof icon !== \"string\")\n return null;\n\n const iconString = ConditionalStringValue.getValue(icon);\n if (!iconString) return null;\n\n if (iconString === IconHelper.reactIconKey) {\n if (internalData)\n return (\n <Icon\n iconSpec={\n internalData.get(IconHelper.reactIconKey) as React.ReactNode\n }\n />\n );\n return null;\n } else if (iconString === IconHelper.conditionalIconItemKey) {\n if (internalData) {\n const iconItem = internalData.get(\n IconHelper.conditionalIconItemKey\n ) as ConditionalIconItem;\n return <Icon iconSpec={ConditionalIconItem.getValue(iconItem)} />;\n }\n return null;\n }\n return <Icon iconSpec={iconString} />;\n }\n\n /** Returns an icon definition that can be stored in an abstract item definition. If the iconSpec specifies a ReactNode\n * then the react data is stored in the internalData map and the key to the react data is returned.\n * @param iconSpec any supported variations of how an icon can be defined in an abstract item or IconProps.\n * @param internalData a map supplied by the caller to store away react element if React.ReactNode\n */\n public static getIconData(\n iconSpec: IconSpec,\n internalData?: Map<string, any>\n ): string | ConditionalStringValue {\n let icon;\n if (ConditionalIconItem.isConditionalIconItem(iconSpec)) {\n icon = IconHelper.conditionalIconItemKey;\n if (internalData)\n internalData.set(IconHelper.conditionalIconItemKey, iconSpec);\n return icon;\n } else {\n icon = React.isValidElement(iconSpec)\n ? IconHelper.reactIconKey\n : iconSpec;\n }\n\n if (\n internalData &&\n typeof icon === \"string\" &&\n icon === IconHelper.reactIconKey\n ) {\n internalData.set(IconHelper.reactIconKey, iconSpec);\n }\n\n if (typeof icon === \"string\" || icon instanceof ConditionalStringValue)\n return icon;\n\n return \"\";\n }\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * @module Utilities
3
3
  */
4
4
  import type * as React from "react";
5
- import type { Omit } from "./typeUtils";
6
5
  /** Props used by components that expect class name to be passed in.
7
6
  * @public
7
+ * @deprecated in 4.15.0. Used internally.
8
8
  */
9
9
  export interface ClassNameProps {
10
10
  /** Custom CSS class name */
@@ -12,6 +12,7 @@ export interface ClassNameProps {
12
12
  }
13
13
  /** Common props used by components.
14
14
  * @public
15
+ * @deprecated in 4.15.0. Used internally.
15
16
  */
16
17
  export interface CommonProps extends ClassNameProps {
17
18
  /** Custom CSS style properties */
@@ -21,17 +22,20 @@ export interface CommonProps extends ClassNameProps {
21
22
  }
22
23
  /** Common properties using a div element.
23
24
  * @public
25
+ * @deprecated in 4.15.0. Used internally.
24
26
  */
25
27
  export interface CommonDivProps extends React.AllHTMLAttributes<HTMLDivElement>, CommonProps {
26
28
  }
27
29
  /** Props used by components that do not expect children to be passed in.
28
30
  * @public
31
+ * @deprecated in 4.15.0. Used internally.
29
32
  */
30
33
  export interface NoChildrenProps {
31
34
  children?: undefined;
32
35
  }
33
36
  /** Omit children property from T.
34
37
  * @public
38
+ * @deprecated in 4.15.0. Used internally.
35
39
  */
36
40
  export type OmitChildrenProp<T extends {
37
41
  children?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,kCAAkC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAC7C,WAAW;CAAG;AAElB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,IAAI,IAAI,CAC3E,CAAC,EACD,UAAU,CACX,CAAC"}
1
+ {"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AAEH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,kCAAkC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAC7C,WAAW;CAAG;AAElB;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,IAAI,IAAI,CAC3E,CAAC,EACD,UAAU,CACX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Props.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport type * as React from \"react\";\nimport type { Omit } from \"./typeUtils\";\n\n/** Props used by components that expect class name to be passed in.\n * @public\n */\nexport interface ClassNameProps {\n /** Custom CSS class name */\n className?: string;\n}\n\n/** Common props used by components.\n * @public\n */\nexport interface CommonProps extends ClassNameProps {\n /** Custom CSS style properties */\n style?: React.CSSProperties;\n /** Optional unique identifier for item. If defined it will be added to DOM Element attribute as data-item-id */\n itemId?: string;\n}\n\n/** Common properties using a div element.\n * @public\n */\nexport interface CommonDivProps\n extends React.AllHTMLAttributes<HTMLDivElement>,\n CommonProps {}\n\n/** Props used by components that do not expect children to be passed in.\n * @public\n */\nexport interface NoChildrenProps {\n children?: undefined;\n}\n\n/** Omit children property from T.\n * @public\n */\nexport type OmitChildrenProp<T extends { children?: React.ReactNode }> = Omit<\n T,\n \"children\"\n>;\n"]}
1
+ {"version":3,"file":"Props.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport type * as React from \"react\";\n\n/** Props used by components that expect class name to be passed in.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport interface ClassNameProps {\n /** Custom CSS class name */\n className?: string;\n}\n\n/** Common props used by components.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface CommonProps extends ClassNameProps {\n /** Custom CSS style properties */\n style?: React.CSSProperties;\n /** Optional unique identifier for item. If defined it will be added to DOM Element attribute as data-item-id */\n itemId?: string;\n}\n\n/** Common properties using a div element.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport interface CommonDivProps\n extends React.AllHTMLAttributes<HTMLDivElement>,\n CommonProps {} // eslint-disable-line deprecation/deprecation\n\n/** Props used by components that do not expect children to be passed in.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport interface NoChildrenProps {\n children?: undefined;\n}\n\n/** Omit children property from T.\n * @public\n * @deprecated in 4.15.0. Used internally.\n */\nexport type OmitChildrenProp<T extends { children?: React.ReactNode }> = Omit<\n T,\n \"children\"\n>;\n"]}
@@ -13,6 +13,7 @@ import type { IDisposable } from "@itwin/core-bentley";
13
13
  * maintainer.dispose();
14
14
  * ```
15
15
  * @public
16
+ * @deprecated in 4.15.0. Not use by AppUI.
16
17
  */
17
18
  export declare class ScrollPositionMaintainer implements IDisposable {
18
19
  private _storage;
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollPositionMaintainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,YAAW,WAAW;IAC1D,OAAO,CAAC,QAAQ,CAAuB;gBACpB,EAAE,EAAE,OAAO;IAIvB,OAAO;IAGd,OAAO,CAAC,MAAM,CAAC,mBAAmB;IASlC,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAGtC"}
1
+ {"version":3,"file":"ScrollPositionMaintainer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,qBAAa,wBAAyB,YAAW,WAAW;IAC1D,OAAO,CAAC,QAAQ,CAAuB;gBACpB,EAAE,EAAE,OAAO;IAKvB,OAAO;IAId,OAAO,CAAC,MAAM,CAAC,mBAAmB;IASlC,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAGtC"}
@@ -9,13 +9,16 @@
9
9
  * maintainer.dispose();
10
10
  * ```
11
11
  * @public
12
+ * @deprecated in 4.15.0. Not use by AppUI.
12
13
  */
13
14
  export class ScrollPositionMaintainer {
14
15
  constructor(el) {
15
16
  this._storage = new Map();
17
+ // eslint-disable-next-line deprecation/deprecation
16
18
  ScrollPositionMaintainer.saveScrollPositions([el], this._storage);
17
19
  }
18
20
  dispose() {
21
+ // eslint-disable-next-line deprecation/deprecation
19
22
  ScrollPositionMaintainer.restoreScrollPositions(this._storage);
20
23
  }
21
24
  static saveScrollPositions(elems, storage) {
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollPositionMaintainer.js","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,wBAAwB;IAEnC,YAAmB,EAAW;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,wBAAwB,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpE,CAAC;IACM,OAAO;QACZ,wBAAwB,CAAC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACO,MAAM,CAAC,mBAAmB,CAChC,KAAiC,EACjC,OAA6B;QAE7B,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,EAAE,CAAC,SAAS;gBAAE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;YAChD,IAAI,EAAE,CAAC,QAAQ;gBAAE,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACO,MAAM,CAAC,sBAAsB,CAAC,OAA6B;QACjE,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;IACjE,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\nimport type { IDisposable } from \"@itwin/core-bentley\";\n\n/**\n * A helper class to recursively save and restore scroll positions.\n * Usage:\n * ```ts\n * // scroll positions are saved when `ScrollPositionMaintainer` object is created\n * const maintainer = new ScrollPositionMaintainer(element);\n * // can do something with `element` here\n * // disposing the `maintainer` object restores scroll positions\n * maintainer.dispose();\n * ```\n * @public\n */\nexport class ScrollPositionMaintainer implements IDisposable {\n private _storage: Map<Element, number>;\n public constructor(el: Element) {\n this._storage = new Map();\n ScrollPositionMaintainer.saveScrollPositions([el], this._storage);\n }\n public dispose() {\n ScrollPositionMaintainer.restoreScrollPositions(this._storage);\n }\n private static saveScrollPositions(\n elems: Element[] | HTMLCollection,\n storage: Map<Element, number>\n ) {\n for (const el of elems) {\n if (el.scrollTop) storage.set(el, el.scrollTop);\n if (el.children) this.saveScrollPositions(el.children, storage);\n }\n }\n private static restoreScrollPositions(storage: Map<Element, number>) {\n storage.forEach((scrollTop, el) => (el.scrollTop = scrollTop));\n }\n}\n"]}
1
+ {"version":3,"file":"ScrollPositionMaintainer.js","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,wBAAwB;IAEnC,YAAmB,EAAW;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,mDAAmD;QACnD,wBAAwB,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpE,CAAC;IACM,OAAO;QACZ,mDAAmD;QACnD,wBAAwB,CAAC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACO,MAAM,CAAC,mBAAmB,CAChC,KAAiC,EACjC,OAA6B;QAE7B,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,EAAE,CAAC,SAAS;gBAAE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;YAChD,IAAI,EAAE,CAAC,QAAQ;gBAAE,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACO,MAAM,CAAC,sBAAsB,CAAC,OAA6B;QACjE,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;IACjE,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\nimport type { IDisposable } from \"@itwin/core-bentley\";\n\n/**\n * A helper class to recursively save and restore scroll positions.\n * Usage:\n * ```ts\n * // scroll positions are saved when `ScrollPositionMaintainer` object is created\n * const maintainer = new ScrollPositionMaintainer(element);\n * // can do something with `element` here\n * // disposing the `maintainer` object restores scroll positions\n * maintainer.dispose();\n * ```\n * @public\n * @deprecated in 4.15.0. Not use by AppUI.\n */\nexport class ScrollPositionMaintainer implements IDisposable {\n private _storage: Map<Element, number>;\n public constructor(el: Element) {\n this._storage = new Map();\n // eslint-disable-next-line deprecation/deprecation\n ScrollPositionMaintainer.saveScrollPositions([el], this._storage);\n }\n public dispose() {\n // eslint-disable-next-line deprecation/deprecation\n ScrollPositionMaintainer.restoreScrollPositions(this._storage);\n }\n private static saveScrollPositions(\n elems: Element[] | HTMLCollection,\n storage: Map<Element, number>\n ) {\n for (const el of elems) {\n if (el.scrollTop) storage.set(el, el.scrollTop);\n if (el.children) this.saveScrollPositions(el.children, storage);\n }\n }\n private static restoreScrollPositions(storage: Map<Element, number>) {\n storage.forEach((scrollTop, el) => (el.scrollTop = scrollTop));\n }\n}\n"]}
@@ -3,10 +3,12 @@
3
3
  */
4
4
  /** Signature for [[Timer]] execute callback.
5
5
  * @public
6
+ * @deprecated in 4.15.0. Used internally.
6
7
  */
7
8
  export type ExecuteHandler = (this: void) => void;
8
9
  /** Notifies handler after a set interval.
9
10
  * @public
11
+ * @deprecated in 4.15.0. Used internally.
10
12
  */
11
13
  export declare class Timer {
12
14
  private _delay;