@itwin/core-react 4.1.0-dev.1 → 4.2.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (758) hide show
  1. package/CHANGELOG.md +1609 -1602
  2. package/ContributeGuidelines.md +99 -99
  3. package/LICENSE.md +9 -9
  4. package/README.md +11 -11
  5. package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
  6. package/lib/cjs/core-react/UiCore.js +9 -5
  7. package/lib/cjs/core-react/UiCore.js.map +1 -1
  8. package/lib/cjs/core-react/_helpers.scss +9 -8
  9. package/lib/cjs/core-react/_scrollbar.scss +8 -4
  10. package/lib/cjs/core-react/_z-index.scss +15 -33
  11. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  12. package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  13. package/lib/cjs/core-react/autosuggest/AutoSuggest.js +14 -15
  14. package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
  15. package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
  16. package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
  17. package/lib/cjs/core-react/badge/Badge.js +3 -3
  18. package/lib/cjs/core-react/badge/Badge.js.map +1 -1
  19. package/lib/cjs/core-react/badge/BadgeUtilities.d.ts.map +1 -1
  20. package/lib/cjs/core-react/badge/BadgeUtilities.js +3 -3
  21. package/lib/cjs/core-react/badge/BadgeUtilities.js.map +1 -1
  22. package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
  23. package/lib/cjs/core-react/badge/BetaBadge.js +3 -3
  24. package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
  25. package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
  26. package/lib/cjs/core-react/badge/NewBadge.js +4 -4
  27. package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
  28. package/lib/cjs/core-react/base/Centered.js +3 -3
  29. package/lib/cjs/core-react/base/Centered.js.map +1 -1
  30. package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
  31. package/lib/cjs/core-react/base/Div.js +3 -3
  32. package/lib/cjs/core-react/base/Div.js.map +1 -1
  33. package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  34. package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -4
  35. package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
  36. package/lib/cjs/core-react/base/FillCentered.js +3 -3
  37. package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
  38. package/lib/cjs/core-react/base/FlexWrapContainer.js +3 -3
  39. package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
  40. package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
  41. package/lib/cjs/core-react/base/Gap.js +4 -4
  42. package/lib/cjs/core-react/base/Gap.js.map +1 -1
  43. package/lib/cjs/core-react/base/PointerEvents.js +3 -3
  44. package/lib/cjs/core-react/base/PointerEvents.js.map +1 -1
  45. package/lib/cjs/core-react/base/ScrollView.js +3 -3
  46. package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
  47. package/lib/cjs/core-react/base/classes.scss +24 -10
  48. package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
  49. package/lib/cjs/core-react/button/UnderlinedButton.js +3 -3
  50. package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
  51. package/lib/cjs/core-react/button/UnderlinedButton.scss +4 -5
  52. package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  53. package/lib/cjs/core-react/checklistbox/CheckListBox.js +4 -4
  54. package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
  55. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +4 -4
  56. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +7 -7
  57. package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  58. package/lib/cjs/core-react/contextmenu/ContextMenu.js +42 -23
  59. package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
  60. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  61. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js +3 -3
  62. package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  63. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  64. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  65. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +3 -3
  66. package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  67. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  68. package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  69. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +16 -12
  70. package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  71. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  72. package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  73. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +37 -15
  74. package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  75. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  76. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +11 -7
  77. package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  78. package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  79. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +3 -3
  80. package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  81. package/lib/cjs/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
  82. package/lib/cjs/core-react/contextmenu/TildeFinder.js +15 -7
  83. package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
  84. package/lib/cjs/core-react/dialog/Dialog.d.ts +6 -5
  85. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  86. package/lib/cjs/core-react/dialog/Dialog.js +94 -86
  87. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  88. package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  89. package/lib/cjs/core-react/dialog/GlobalDialog.js +10 -6
  90. package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
  91. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts +68 -0
  92. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts.map +1 -0
  93. package/lib/cjs/core-react/dialog/SimpleDialog.js +51 -0
  94. package/lib/cjs/core-react/dialog/SimpleDialog.js.map +1 -0
  95. package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  96. package/lib/cjs/core-react/elementseparator/ElementSeparator.js +14 -8
  97. package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
  98. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +19 -10
  99. package/lib/cjs/core-react/enums/Alignment.js +3 -3
  100. package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
  101. package/lib/cjs/core-react/enums/CheckBoxState.js +3 -3
  102. package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
  103. package/lib/cjs/core-react/enums/Orientation.js +3 -3
  104. package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
  105. package/lib/cjs/core-react/enums/SortDirection.js +3 -3
  106. package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
  107. package/lib/cjs/core-react/enums/TimeFormat.js +3 -3
  108. package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
  109. package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
  110. package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
  111. package/lib/cjs/core-react/expandable/ExpandableList.js +8 -5
  112. package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
  113. package/lib/cjs/core-react/expandable/ExpandableList.scss +4 -4
  114. package/lib/cjs/core-react/expandable/classes.scss +6 -4
  115. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  116. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js +38 -15
  117. package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  118. package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  119. package/lib/cjs/core-react/focustrap/FocusTrap.js +33 -16
  120. package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
  121. package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
  122. package/lib/cjs/core-react/hocs/withIsPressed.js +4 -7
  123. package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
  124. package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  125. package/lib/cjs/core-react/hocs/withOnOutsideClick.js +16 -11
  126. package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
  127. package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
  128. package/lib/cjs/core-react/hocs/withTimeout.js +6 -8
  129. package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
  130. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +5 -1
  131. package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  132. package/lib/cjs/core-react/icons/ConditionalIconItem.js +26 -9
  133. package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
  134. package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
  135. package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
  136. package/lib/cjs/core-react/icons/IconComponent.js +20 -10
  137. package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
  138. package/lib/cjs/core-react/icons/IconComponent.scss +5 -6
  139. package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
  140. package/lib/cjs/core-react/icons/SvgPath.js +4 -4
  141. package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
  142. package/lib/cjs/core-react/icons/WebFontIcon.js +3 -3
  143. package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
  144. package/lib/cjs/core-react/icons/classes.scss +15 -7
  145. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  146. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +6 -4
  147. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  148. package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
  149. package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
  150. package/lib/cjs/core-react/inputs/Input.js +6 -7
  151. package/lib/cjs/core-react/inputs/Input.js.map +1 -1
  152. package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
  153. package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
  154. package/lib/cjs/core-react/inputs/InputLabel.js +10 -13
  155. package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
  156. package/lib/cjs/core-react/inputs/InputStatus.js +3 -3
  157. package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
  158. package/lib/cjs/core-react/inputs/LabeledComponentProps.js +3 -3
  159. package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
  160. package/lib/cjs/core-react/inputs/classes.scss +9 -5
  161. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  162. package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  163. package/lib/cjs/core-react/inputs/iconinput/IconInput.js +3 -4
  164. package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
  165. package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +11 -12
  166. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +2 -2
  167. package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  168. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +25 -16
  169. package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  170. package/lib/cjs/core-react/layout-variables.scss +5 -7
  171. package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
  172. package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
  173. package/lib/cjs/core-react/listbox/Listbox.js +19 -12
  174. package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
  175. package/lib/cjs/core-react/loading/LoadingBar.d.ts.map +1 -1
  176. package/lib/cjs/core-react/loading/LoadingBar.js +4 -4
  177. package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
  178. package/lib/cjs/core-react/loading/LoadingBar.scss +6 -6
  179. package/lib/cjs/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  180. package/lib/cjs/core-react/loading/LoadingPrompt.js +9 -9
  181. package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
  182. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +3 -3
  183. package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  184. package/lib/cjs/core-react/loading/LoadingSpinner.js +5 -5
  185. package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
  186. package/lib/cjs/core-react/loading/LoadingStatus.d.ts.map +1 -1
  187. package/lib/cjs/core-react/loading/LoadingStatus.js +3 -3
  188. package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
  189. package/lib/cjs/core-react/loading/LoadingStatus.scss +4 -4
  190. package/lib/cjs/core-react/messagebox/MessageBox.d.ts +3 -3
  191. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  192. package/lib/cjs/core-react/messagebox/MessageBox.js +5 -5
  193. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  194. package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
  195. package/lib/cjs/core-react/notification/MessageRenderer.js +18 -12
  196. package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
  197. package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
  198. package/lib/cjs/core-react/notification/MessageType.js +3 -3
  199. package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
  200. package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
  201. package/lib/cjs/core-react/popup/Popup.js +46 -23
  202. package/lib/cjs/core-react/popup/Popup.js.map +1 -1
  203. package/lib/cjs/core-react/radialmenu/Annulus.d.ts.map +1 -1
  204. package/lib/cjs/core-react/radialmenu/Annulus.js +4 -4
  205. package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
  206. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
  207. package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  208. package/lib/cjs/core-react/radialmenu/RadialMenu.js +26 -11
  209. package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
  210. package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
  211. package/lib/cjs/core-react/searchbox/SearchBox.js +17 -7
  212. package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
  213. package/lib/cjs/core-react/settings/SettingsContainer.d.ts +1 -1
  214. package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
  215. package/lib/cjs/core-react/settings/SettingsContainer.js +54 -19
  216. package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
  217. package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
  218. package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
  219. package/lib/cjs/core-react/settings/SettingsManager.js +7 -8
  220. package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
  221. package/lib/cjs/core-react/style/breakpoints.scss +30 -12
  222. package/lib/cjs/core-react/style/colors.scss +52 -52
  223. package/lib/cjs/core-react/style/mixins.scss +7 -11
  224. package/lib/cjs/core-react/style/themecolors.scss +116 -106
  225. package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
  226. package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
  227. package/lib/cjs/core-react/tabs/Tabs.js +13 -11
  228. package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
  229. package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  230. package/lib/cjs/core-react/tabs/VerticalTabs.js +3 -3
  231. package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
  232. package/lib/cjs/core-react/tabs/classes.scss +6 -4
  233. package/lib/cjs/core-react/text/BlockText.js +4 -4
  234. package/lib/cjs/core-react/text/BlockText.js.map +1 -1
  235. package/lib/cjs/core-react/text/BodyText.js +4 -4
  236. package/lib/cjs/core-react/text/BodyText.js.map +1 -1
  237. package/lib/cjs/core-react/text/DisabledText.js +4 -4
  238. package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
  239. package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
  240. package/lib/cjs/core-react/text/FilteredText.js +5 -5
  241. package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
  242. package/lib/cjs/core-react/text/MutedText.js +4 -4
  243. package/lib/cjs/core-react/text/MutedText.js.map +1 -1
  244. package/lib/cjs/core-react/text/StyledText.js +3 -3
  245. package/lib/cjs/core-react/text/StyledText.js.map +1 -1
  246. package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
  247. package/lib/cjs/core-react/text/TextProps.js +3 -3
  248. package/lib/cjs/core-react/text/TextProps.js.map +1 -1
  249. package/lib/cjs/core-react/text/classes.scss +15 -7
  250. package/lib/cjs/core-react/text/disabled.scss +4 -5
  251. package/lib/cjs/core-react/text/muted.scss +4 -5
  252. package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
  253. package/lib/cjs/core-react/tree/Branch.js +3 -3
  254. package/lib/cjs/core-react/tree/Branch.js.map +1 -1
  255. package/lib/cjs/core-react/tree/Branch.scss +4 -4
  256. package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  257. package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -3
  258. package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
  259. package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
  260. package/lib/cjs/core-react/tree/Node.js +11 -8
  261. package/lib/cjs/core-react/tree/Node.js.map +1 -1
  262. package/lib/cjs/core-react/tree/Node.scss +9 -9
  263. package/lib/cjs/core-react/tree/Placeholder.js +5 -5
  264. package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
  265. package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
  266. package/lib/cjs/core-react/tree/Tree.js +20 -11
  267. package/lib/cjs/core-react/tree/Tree.js.map +1 -1
  268. package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  269. package/lib/cjs/core-react/uistate/LocalStateStorage.js +7 -4
  270. package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
  271. package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  272. package/lib/cjs/core-react/uistate/UiStateEntry.js +3 -3
  273. package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
  274. package/lib/cjs/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  275. package/lib/cjs/core-react/uistate/UiStateStorage.js +3 -3
  276. package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
  277. package/lib/cjs/core-react/utils/IconHelper.d.ts +3 -1
  278. package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
  279. package/lib/cjs/core-react/utils/IconHelper.js +35 -6
  280. package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
  281. package/lib/cjs/core-react/utils/IconWebComponent.d.ts.map +1 -1
  282. package/lib/cjs/core-react/utils/IconWebComponent.js +71 -41
  283. package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
  284. package/lib/cjs/core-react/utils/Point.d.ts.map +1 -1
  285. package/lib/cjs/core-react/utils/Point.js +3 -3
  286. package/lib/cjs/core-react/utils/Point.js.map +1 -1
  287. package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
  288. package/lib/cjs/core-react/utils/Props.js +3 -3
  289. package/lib/cjs/core-react/utils/Props.js.map +1 -1
  290. package/lib/cjs/core-react/utils/Rectangle.d.ts.map +1 -1
  291. package/lib/cjs/core-react/utils/Rectangle.js +15 -7
  292. package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
  293. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  294. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +4 -2
  295. package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  296. package/lib/cjs/core-react/utils/Size.d.ts.map +1 -1
  297. package/lib/cjs/core-react/utils/Size.js +4 -5
  298. package/lib/cjs/core-react/utils/Size.js.map +1 -1
  299. package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
  300. package/lib/cjs/core-react/utils/Timer.js +3 -3
  301. package/lib/cjs/core-react/utils/Timer.js.map +1 -1
  302. package/lib/cjs/core-react/utils/UiGeometry.d.ts.map +1 -1
  303. package/lib/cjs/core-react/utils/UiGeometry.js +9 -5
  304. package/lib/cjs/core-react/utils/UiGeometry.js.map +1 -1
  305. package/lib/cjs/core-react/utils/flattenChildren.js +3 -3
  306. package/lib/cjs/core-react/utils/flattenChildren.js.map +1 -1
  307. package/lib/cjs/core-react/utils/getBestBWContrastColor.js +5 -5
  308. package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
  309. package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
  310. package/lib/cjs/core-react/utils/getCssVariable.js +3 -3
  311. package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
  312. package/lib/cjs/core-react/utils/getDisplayName.d.ts.map +1 -1
  313. package/lib/cjs/core-react/utils/getDisplayName.js +3 -3
  314. package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
  315. package/lib/cjs/core-react/utils/getUserColor.d.ts.map +1 -1
  316. package/lib/cjs/core-react/utils/getUserColor.js +5 -4
  317. package/lib/cjs/core-react/utils/getUserColor.js.map +1 -1
  318. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  319. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
  320. package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  321. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  322. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +21 -9
  323. package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  324. package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  325. package/lib/cjs/core-react/utils/hooks/useDisposable.js +3 -3
  326. package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
  327. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  328. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
  329. package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  330. package/lib/cjs/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
  331. package/lib/cjs/core-react/utils/hooks/useEventListener.js +3 -3
  332. package/lib/cjs/core-react/utils/hooks/useEventListener.js.map +1 -1
  333. package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  334. package/lib/cjs/core-react/utils/hooks/useInterval.js +6 -4
  335. package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
  336. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
  337. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js +7 -4
  338. package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  339. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  340. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +15 -6
  341. package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  342. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +3 -3
  343. package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  344. package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts +1 -1
  345. package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
  346. package/lib/cjs/core-react/utils/hooks/useRefEffect.js +3 -3
  347. package/lib/cjs/core-react/utils/hooks/useRefEffect.js.map +1 -1
  348. package/lib/cjs/core-react/utils/hooks/useRefState.js +3 -3
  349. package/lib/cjs/core-react/utils/hooks/useRefState.js.map +1 -1
  350. package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  351. package/lib/cjs/core-react/utils/hooks/useRefs.js +8 -6
  352. package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
  353. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
  354. package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  355. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +37 -20
  356. package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  357. package/lib/cjs/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
  358. package/lib/cjs/core-react/utils/hooks/useTargeted.js +7 -4
  359. package/lib/cjs/core-react/utils/hooks/useTargeted.js.map +1 -1
  360. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js +3 -3
  361. package/lib/cjs/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  362. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
  363. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
  364. package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  365. package/lib/cjs/core-react/utils/isPromiseLike.d.ts.map +1 -1
  366. package/lib/cjs/core-react/utils/isPromiseLike.js +6 -4
  367. package/lib/cjs/core-react/utils/isPromiseLike.js.map +1 -1
  368. package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
  369. package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
  370. package/lib/cjs/core-react/utils/reuseOrCreatePromise.js +33 -0
  371. package/lib/cjs/core-react/utils/reuseOrCreatePromise.js.map +1 -0
  372. package/lib/cjs/core-react/utils/shallowDiffers.d.ts.map +1 -1
  373. package/lib/cjs/core-react/utils/shallowDiffers.js +3 -3
  374. package/lib/cjs/core-react/utils/shallowDiffers.js.map +1 -1
  375. package/lib/cjs/core-react/utils/typeUtils.js +3 -3
  376. package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
  377. package/lib/cjs/core-react.d.ts +3 -3
  378. package/lib/cjs/core-react.d.ts.map +1 -1
  379. package/lib/cjs/core-react.js +3 -3
  380. package/lib/cjs/core-react.js.map +1 -1
  381. package/lib/esm/core-react/UiCore.d.ts.map +1 -1
  382. package/lib/esm/core-react/UiCore.js +9 -5
  383. package/lib/esm/core-react/UiCore.js.map +1 -1
  384. package/lib/esm/core-react/_helpers.scss +9 -8
  385. package/lib/esm/core-react/_scrollbar.scss +8 -4
  386. package/lib/esm/core-react/_z-index.scss +15 -33
  387. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
  388. package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  389. package/lib/esm/core-react/autosuggest/AutoSuggest.js +14 -15
  390. package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
  391. package/lib/esm/core-react/badge/Badge.d.ts +1 -1
  392. package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
  393. package/lib/esm/core-react/badge/Badge.js +3 -3
  394. package/lib/esm/core-react/badge/Badge.js.map +1 -1
  395. package/lib/esm/core-react/badge/BadgeUtilities.d.ts.map +1 -1
  396. package/lib/esm/core-react/badge/BadgeUtilities.js +3 -3
  397. package/lib/esm/core-react/badge/BadgeUtilities.js.map +1 -1
  398. package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
  399. package/lib/esm/core-react/badge/BetaBadge.js +3 -3
  400. package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
  401. package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
  402. package/lib/esm/core-react/badge/NewBadge.js +4 -4
  403. package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
  404. package/lib/esm/core-react/base/Centered.js +3 -3
  405. package/lib/esm/core-react/base/Centered.js.map +1 -1
  406. package/lib/esm/core-react/base/Div.d.ts.map +1 -1
  407. package/lib/esm/core-react/base/Div.js +3 -3
  408. package/lib/esm/core-react/base/Div.js.map +1 -1
  409. package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
  410. package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -4
  411. package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
  412. package/lib/esm/core-react/base/FillCentered.js +3 -3
  413. package/lib/esm/core-react/base/FillCentered.js.map +1 -1
  414. package/lib/esm/core-react/base/FlexWrapContainer.js +3 -3
  415. package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
  416. package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
  417. package/lib/esm/core-react/base/Gap.js +4 -4
  418. package/lib/esm/core-react/base/Gap.js.map +1 -1
  419. package/lib/esm/core-react/base/PointerEvents.js +3 -3
  420. package/lib/esm/core-react/base/PointerEvents.js.map +1 -1
  421. package/lib/esm/core-react/base/ScrollView.js +3 -3
  422. package/lib/esm/core-react/base/ScrollView.js.map +1 -1
  423. package/lib/esm/core-react/base/classes.scss +24 -10
  424. package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
  425. package/lib/esm/core-react/button/UnderlinedButton.js +3 -3
  426. package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
  427. package/lib/esm/core-react/button/UnderlinedButton.scss +4 -5
  428. package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
  429. package/lib/esm/core-react/checklistbox/CheckListBox.js +4 -4
  430. package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
  431. package/lib/esm/core-react/checklistbox/CheckListBox.scss +4 -4
  432. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +7 -7
  433. package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  434. package/lib/esm/core-react/contextmenu/ContextMenu.js +42 -23
  435. package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
  436. package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
  437. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js +3 -3
  438. package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
  439. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
  440. package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
  441. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +3 -3
  442. package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  443. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
  444. package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  445. package/lib/esm/core-react/contextmenu/ContextMenuItem.js +16 -12
  446. package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  447. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
  448. package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  449. package/lib/esm/core-react/contextmenu/ContextSubMenu.js +37 -15
  450. package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  451. package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
  452. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +11 -7
  453. package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  454. package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
  455. package/lib/esm/core-react/contextmenu/PopupContextMenu.js +3 -3
  456. package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  457. package/lib/esm/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
  458. package/lib/esm/core-react/contextmenu/TildeFinder.js +15 -7
  459. package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
  460. package/lib/esm/core-react/dialog/Dialog.d.ts +6 -5
  461. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  462. package/lib/esm/core-react/dialog/Dialog.js +94 -86
  463. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  464. package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
  465. package/lib/esm/core-react/dialog/GlobalDialog.js +10 -6
  466. package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
  467. package/lib/esm/core-react/dialog/SimpleDialog.d.ts +68 -0
  468. package/lib/esm/core-react/dialog/SimpleDialog.d.ts.map +1 -0
  469. package/lib/esm/core-react/dialog/SimpleDialog.js +47 -0
  470. package/lib/esm/core-react/dialog/SimpleDialog.js.map +1 -0
  471. package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
  472. package/lib/esm/core-react/elementseparator/ElementSeparator.js +14 -8
  473. package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
  474. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +19 -10
  475. package/lib/esm/core-react/enums/Alignment.js +3 -3
  476. package/lib/esm/core-react/enums/Alignment.js.map +1 -1
  477. package/lib/esm/core-react/enums/CheckBoxState.js +3 -3
  478. package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
  479. package/lib/esm/core-react/enums/Orientation.js +3 -3
  480. package/lib/esm/core-react/enums/Orientation.js.map +1 -1
  481. package/lib/esm/core-react/enums/SortDirection.js +3 -3
  482. package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
  483. package/lib/esm/core-react/enums/TimeFormat.js +3 -3
  484. package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
  485. package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
  486. package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
  487. package/lib/esm/core-react/expandable/ExpandableList.js +8 -5
  488. package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
  489. package/lib/esm/core-react/expandable/ExpandableList.scss +4 -4
  490. package/lib/esm/core-react/expandable/classes.scss +6 -4
  491. package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
  492. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js +38 -15
  493. package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  494. package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
  495. package/lib/esm/core-react/focustrap/FocusTrap.js +33 -16
  496. package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
  497. package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
  498. package/lib/esm/core-react/hocs/withIsPressed.js +4 -7
  499. package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
  500. package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  501. package/lib/esm/core-react/hocs/withOnOutsideClick.js +16 -11
  502. package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
  503. package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
  504. package/lib/esm/core-react/hocs/withTimeout.js +6 -8
  505. package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
  506. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +5 -1
  507. package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
  508. package/lib/esm/core-react/icons/ConditionalIconItem.js +26 -9
  509. package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
  510. package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
  511. package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
  512. package/lib/esm/core-react/icons/IconComponent.js +21 -11
  513. package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
  514. package/lib/esm/core-react/icons/IconComponent.scss +5 -6
  515. package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
  516. package/lib/esm/core-react/icons/SvgPath.js +4 -4
  517. package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
  518. package/lib/esm/core-react/icons/WebFontIcon.js +3 -3
  519. package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
  520. package/lib/esm/core-react/icons/classes.scss +15 -7
  521. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
  522. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +6 -4
  523. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  524. package/lib/esm/core-react/inputs/Input.d.ts +1 -1
  525. package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
  526. package/lib/esm/core-react/inputs/Input.js +6 -7
  527. package/lib/esm/core-react/inputs/Input.js.map +1 -1
  528. package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
  529. package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
  530. package/lib/esm/core-react/inputs/InputLabel.js +11 -14
  531. package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
  532. package/lib/esm/core-react/inputs/InputStatus.js +3 -3
  533. package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
  534. package/lib/esm/core-react/inputs/LabeledComponentProps.js +3 -3
  535. package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
  536. package/lib/esm/core-react/inputs/classes.scss +9 -5
  537. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
  538. package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
  539. package/lib/esm/core-react/inputs/iconinput/IconInput.js +3 -4
  540. package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
  541. package/lib/esm/core-react/inputs/iconinput/IconInput.scss +11 -12
  542. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +2 -2
  543. package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
  544. package/lib/esm/core-react/inputs/numberinput/NumberInput.js +26 -17
  545. package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  546. package/lib/esm/core-react/layout-variables.scss +5 -7
  547. package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
  548. package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
  549. package/lib/esm/core-react/listbox/Listbox.js +19 -12
  550. package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
  551. package/lib/esm/core-react/loading/LoadingBar.d.ts.map +1 -1
  552. package/lib/esm/core-react/loading/LoadingBar.js +4 -4
  553. package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
  554. package/lib/esm/core-react/loading/LoadingBar.scss +6 -6
  555. package/lib/esm/core-react/loading/LoadingPrompt.d.ts.map +1 -1
  556. package/lib/esm/core-react/loading/LoadingPrompt.js +9 -9
  557. package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
  558. package/lib/esm/core-react/loading/LoadingSpinner.d.ts +3 -3
  559. package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
  560. package/lib/esm/core-react/loading/LoadingSpinner.js +5 -5
  561. package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
  562. package/lib/esm/core-react/loading/LoadingStatus.d.ts.map +1 -1
  563. package/lib/esm/core-react/loading/LoadingStatus.js +3 -3
  564. package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
  565. package/lib/esm/core-react/loading/LoadingStatus.scss +4 -4
  566. package/lib/esm/core-react/messagebox/MessageBox.d.ts +3 -3
  567. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  568. package/lib/esm/core-react/messagebox/MessageBox.js +6 -6
  569. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  570. package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
  571. package/lib/esm/core-react/notification/MessageRenderer.js +18 -12
  572. package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
  573. package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
  574. package/lib/esm/core-react/notification/MessageType.js +3 -3
  575. package/lib/esm/core-react/notification/MessageType.js.map +1 -1
  576. package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
  577. package/lib/esm/core-react/popup/Popup.js +46 -23
  578. package/lib/esm/core-react/popup/Popup.js.map +1 -1
  579. package/lib/esm/core-react/radialmenu/Annulus.d.ts.map +1 -1
  580. package/lib/esm/core-react/radialmenu/Annulus.js +4 -4
  581. package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
  582. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
  583. package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  584. package/lib/esm/core-react/radialmenu/RadialMenu.js +26 -11
  585. package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
  586. package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
  587. package/lib/esm/core-react/searchbox/SearchBox.js +17 -7
  588. package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
  589. package/lib/esm/core-react/settings/SettingsContainer.d.ts +1 -1
  590. package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
  591. package/lib/esm/core-react/settings/SettingsContainer.js +54 -19
  592. package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
  593. package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
  594. package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
  595. package/lib/esm/core-react/settings/SettingsManager.js +7 -8
  596. package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
  597. package/lib/esm/core-react/style/breakpoints.scss +30 -12
  598. package/lib/esm/core-react/style/colors.scss +52 -52
  599. package/lib/esm/core-react/style/mixins.scss +7 -11
  600. package/lib/esm/core-react/style/themecolors.scss +116 -106
  601. package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
  602. package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
  603. package/lib/esm/core-react/tabs/Tabs.js +13 -11
  604. package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
  605. package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
  606. package/lib/esm/core-react/tabs/VerticalTabs.js +3 -3
  607. package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
  608. package/lib/esm/core-react/tabs/classes.scss +6 -4
  609. package/lib/esm/core-react/text/BlockText.js +4 -4
  610. package/lib/esm/core-react/text/BlockText.js.map +1 -1
  611. package/lib/esm/core-react/text/BodyText.js +4 -4
  612. package/lib/esm/core-react/text/BodyText.js.map +1 -1
  613. package/lib/esm/core-react/text/DisabledText.js +4 -4
  614. package/lib/esm/core-react/text/DisabledText.js.map +1 -1
  615. package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
  616. package/lib/esm/core-react/text/FilteredText.js +5 -5
  617. package/lib/esm/core-react/text/FilteredText.js.map +1 -1
  618. package/lib/esm/core-react/text/MutedText.js +4 -4
  619. package/lib/esm/core-react/text/MutedText.js.map +1 -1
  620. package/lib/esm/core-react/text/StyledText.js +3 -3
  621. package/lib/esm/core-react/text/StyledText.js.map +1 -1
  622. package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
  623. package/lib/esm/core-react/text/TextProps.js +3 -3
  624. package/lib/esm/core-react/text/TextProps.js.map +1 -1
  625. package/lib/esm/core-react/text/classes.scss +15 -7
  626. package/lib/esm/core-react/text/disabled.scss +4 -5
  627. package/lib/esm/core-react/text/muted.scss +4 -5
  628. package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
  629. package/lib/esm/core-react/tree/Branch.js +3 -3
  630. package/lib/esm/core-react/tree/Branch.js.map +1 -1
  631. package/lib/esm/core-react/tree/Branch.scss +4 -4
  632. package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
  633. package/lib/esm/core-react/tree/ExpansionToggle.js +3 -3
  634. package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
  635. package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
  636. package/lib/esm/core-react/tree/Node.js +11 -8
  637. package/lib/esm/core-react/tree/Node.js.map +1 -1
  638. package/lib/esm/core-react/tree/Node.scss +9 -9
  639. package/lib/esm/core-react/tree/Placeholder.js +5 -5
  640. package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
  641. package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
  642. package/lib/esm/core-react/tree/Tree.js +20 -11
  643. package/lib/esm/core-react/tree/Tree.js.map +1 -1
  644. package/lib/esm/core-react/uistate/LocalStateStorage.d.ts.map +1 -1
  645. package/lib/esm/core-react/uistate/LocalStateStorage.js +7 -4
  646. package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
  647. package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  648. package/lib/esm/core-react/uistate/UiStateEntry.js +3 -3
  649. package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
  650. package/lib/esm/core-react/uistate/UiStateStorage.d.ts.map +1 -1
  651. package/lib/esm/core-react/uistate/UiStateStorage.js +3 -3
  652. package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
  653. package/lib/esm/core-react/utils/IconHelper.d.ts +3 -1
  654. package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
  655. package/lib/esm/core-react/utils/IconHelper.js +35 -6
  656. package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
  657. package/lib/esm/core-react/utils/IconWebComponent.d.ts.map +1 -1
  658. package/lib/esm/core-react/utils/IconWebComponent.js +71 -41
  659. package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
  660. package/lib/esm/core-react/utils/Point.d.ts.map +1 -1
  661. package/lib/esm/core-react/utils/Point.js +3 -3
  662. package/lib/esm/core-react/utils/Point.js.map +1 -1
  663. package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
  664. package/lib/esm/core-react/utils/Props.js +3 -3
  665. package/lib/esm/core-react/utils/Props.js.map +1 -1
  666. package/lib/esm/core-react/utils/Rectangle.d.ts.map +1 -1
  667. package/lib/esm/core-react/utils/Rectangle.js +15 -7
  668. package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
  669. package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
  670. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +4 -2
  671. package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  672. package/lib/esm/core-react/utils/Size.d.ts.map +1 -1
  673. package/lib/esm/core-react/utils/Size.js +4 -5
  674. package/lib/esm/core-react/utils/Size.js.map +1 -1
  675. package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
  676. package/lib/esm/core-react/utils/Timer.js +3 -3
  677. package/lib/esm/core-react/utils/Timer.js.map +1 -1
  678. package/lib/esm/core-react/utils/UiGeometry.d.ts.map +1 -1
  679. package/lib/esm/core-react/utils/UiGeometry.js +9 -5
  680. package/lib/esm/core-react/utils/UiGeometry.js.map +1 -1
  681. package/lib/esm/core-react/utils/flattenChildren.js +3 -3
  682. package/lib/esm/core-react/utils/flattenChildren.js.map +1 -1
  683. package/lib/esm/core-react/utils/getBestBWContrastColor.js +5 -5
  684. package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
  685. package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
  686. package/lib/esm/core-react/utils/getCssVariable.js +3 -3
  687. package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
  688. package/lib/esm/core-react/utils/getDisplayName.d.ts.map +1 -1
  689. package/lib/esm/core-react/utils/getDisplayName.js +3 -3
  690. package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
  691. package/lib/esm/core-react/utils/getUserColor.d.ts.map +1 -1
  692. package/lib/esm/core-react/utils/getUserColor.js +5 -4
  693. package/lib/esm/core-react/utils/getUserColor.js.map +1 -1
  694. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
  695. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
  696. package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
  697. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
  698. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +21 -9
  699. package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  700. package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
  701. package/lib/esm/core-react/utils/hooks/useDisposable.js +3 -3
  702. package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
  703. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
  704. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
  705. package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
  706. package/lib/esm/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
  707. package/lib/esm/core-react/utils/hooks/useEventListener.js +3 -3
  708. package/lib/esm/core-react/utils/hooks/useEventListener.js.map +1 -1
  709. package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
  710. package/lib/esm/core-react/utils/hooks/useInterval.js +6 -4
  711. package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
  712. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
  713. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js +7 -4
  714. package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
  715. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
  716. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +15 -6
  717. package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  718. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +3 -3
  719. package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
  720. package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts +1 -1
  721. package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
  722. package/lib/esm/core-react/utils/hooks/useRefEffect.js +3 -3
  723. package/lib/esm/core-react/utils/hooks/useRefEffect.js.map +1 -1
  724. package/lib/esm/core-react/utils/hooks/useRefState.js +3 -3
  725. package/lib/esm/core-react/utils/hooks/useRefState.js.map +1 -1
  726. package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
  727. package/lib/esm/core-react/utils/hooks/useRefs.js +8 -6
  728. package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
  729. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
  730. package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
  731. package/lib/esm/core-react/utils/hooks/useResizeObserver.js +37 -20
  732. package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  733. package/lib/esm/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
  734. package/lib/esm/core-react/utils/hooks/useTargeted.js +7 -4
  735. package/lib/esm/core-react/utils/hooks/useTargeted.js.map +1 -1
  736. package/lib/esm/core-react/utils/hooks/useThrottledFn.js +3 -3
  737. package/lib/esm/core-react/utils/hooks/useThrottledFn.js.map +1 -1
  738. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
  739. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
  740. package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
  741. package/lib/esm/core-react/utils/isPromiseLike.d.ts.map +1 -1
  742. package/lib/esm/core-react/utils/isPromiseLike.js +6 -4
  743. package/lib/esm/core-react/utils/isPromiseLike.js.map +1 -1
  744. package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
  745. package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
  746. package/lib/esm/core-react/utils/reuseOrCreatePromise.js +29 -0
  747. package/lib/esm/core-react/utils/reuseOrCreatePromise.js.map +1 -0
  748. package/lib/esm/core-react/utils/shallowDiffers.d.ts.map +1 -1
  749. package/lib/esm/core-react/utils/shallowDiffers.js +3 -3
  750. package/lib/esm/core-react/utils/shallowDiffers.js.map +1 -1
  751. package/lib/esm/core-react/utils/typeUtils.js +3 -3
  752. package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
  753. package/lib/esm/core-react.d.ts +3 -3
  754. package/lib/esm/core-react.d.ts.map +1 -1
  755. package/lib/esm/core-react.js +6 -6
  756. package/lib/esm/core-react.js.map +1 -1
  757. package/lib/public/locales/en/UiCore.json +1 -1
  758. package/package.json +8 -17
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  // istanbul ignore file
7
7
  // IconWebComponent requires in-browser testing
8
8
  /** @packageDocumentation
@@ -14,6 +14,70 @@ const appui_abstract_1 = require("@itwin/appui-abstract");
14
14
  const core_bentley_1 = require("@itwin/core-bentley");
15
15
  const UiCore_1 = require("../UiCore");
16
16
  const dompurify_1 = require("dompurify"), DOMPurifyNS = dompurify_1;
17
+ const reuseOrCreatePromise_1 = require("./reuseOrCreatePromise");
18
+ /**
19
+ * "getSvg" list
20
+ * (if multiple icon require the same thing,
21
+ * only do the fetch once, and have all icon use the same result)
22
+ */
23
+ const cache = new Map();
24
+ /**
25
+ * Parse 'data:' uri to retrieve the Svg component within it.
26
+ * @param src data:image/svg+xml;base64
27
+ * @param element Element for logging purpose.
28
+ * @returns HTMLElement (svg)
29
+ */
30
+ function parseSvgFromDataUri(src, element) {
31
+ const dataUriParts = src.split(",");
32
+ if (dataUriParts.length !== 2 ||
33
+ "data:image/svg+xml;base64" !== dataUriParts[0]) {
34
+ core_bentley_1.Logger.logError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
35
+ }
36
+ // the esm build of dompurify has a default import but the cjs build does not
37
+ // if there is a default export, use it (likely esm), otherwise use the namespace
38
+ // istanbul ignore next
39
+ const sanitizer = dompurify_1.default !== null && dompurify_1.default !== void 0 ? dompurify_1.default : DOMPurifyNS;
40
+ // eslint-disable-next-line deprecation/deprecation
41
+ const sanitizedSvg = sanitizer.sanitize(atob(dataUriParts[1]));
42
+ const parsedSvg = new window.DOMParser().parseFromString(sanitizedSvg, "text/xml");
43
+ const errorNode = parsedSvg.querySelector("parsererror");
44
+ if (errorNode || "svg" !== parsedSvg.documentElement.nodeName.toLowerCase()) {
45
+ throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
46
+ }
47
+ return parsedSvg.documentElement;
48
+ }
49
+ /**
50
+ * Fetch the src from the network and return the SVG element.
51
+ * @param src URL representing a .svg file
52
+ * @param element Element for logging purpose
53
+ * @returns HTMLElement (svg)
54
+ */
55
+ async function fetchSvg(src, element) {
56
+ const response = await fetch(src).catch((_error) => {
57
+ core_bentley_1.Logger.logError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
58
+ });
59
+ if (!response || !response.ok) {
60
+ throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
61
+ }
62
+ const str = await response.text();
63
+ if (str === undefined) {
64
+ throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(element), "Unable to load icon.");
65
+ }
66
+ const data = new window.DOMParser().parseFromString(str, "text/xml");
67
+ return data.documentElement;
68
+ }
69
+ /**
70
+ * Get the svg (fetch and parse for url, or decode and parse for data: url)
71
+ * @param src URL of the content to download/parse
72
+ * @param element Element for logging purpose.
73
+ * @returns HTMLElement (svg)
74
+ */
75
+ async function getSvg(src, element) {
76
+ if (src.startsWith("data:")) {
77
+ return parseSvgFromDataUri(src, element);
78
+ }
79
+ return fetchSvg(src, element);
80
+ }
17
81
  /**
18
82
  * IconWebComponent loads icon from an svg path
19
83
  */
@@ -27,46 +91,12 @@ class IconWebComponent extends HTMLElement {
27
91
  if (this.childNodes.length)
28
92
  return;
29
93
  const src = this.getAttribute("src") || "";
30
- if (src.startsWith("data:")) {
31
- const dataUriParts = src.split(",");
32
- if (dataUriParts.length !== 2 || "data:image/svg+xml;base64" !== dataUriParts[0]) {
33
- core_bentley_1.Logger.logError(UiCore_1.UiCore.loggerCategory(this), "Unable to load icon.");
34
- }
35
- // the esm build of dompurify has a default import but the cjs build does not
36
- // if there is a default export, use it (likely esm), otherwise use the namespace
37
- // istanbul ignore next
38
- const sanitizer = dompurify_1.default !== null && dompurify_1.default !== void 0 ? dompurify_1.default : DOMPurifyNS;
39
- // eslint-disable-next-line deprecation/deprecation
40
- const sanitizedSvg = sanitizer.sanitize(atob(dataUriParts[1]));
41
- const parsedSvg = new window.DOMParser().parseFromString(sanitizedSvg, "text/xml");
42
- const errorNode = parsedSvg.querySelector("parsererror");
43
- if (errorNode || "svg" !== parsedSvg.documentElement.nodeName.toLowerCase()) {
44
- throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(this), "Unable to load icon.");
45
- }
46
- !this.childNodes.length && this.append(parsedSvg.documentElement);
94
+ if (!src)
47
95
  return;
96
+ const svg = await (0, reuseOrCreatePromise_1.reuseOrCreatePromise)(src, async () => getSvg(src, this), cache);
97
+ if (svg && !this.childNodes.length) {
98
+ this.append(svg.cloneNode(true));
48
99
  }
49
- await fetch(src)
50
- .catch((_error) => {
51
- core_bentley_1.Logger.logError(UiCore_1.UiCore.loggerCategory(this), "Unable to load icon.");
52
- })
53
- .then(async (response) => {
54
- if (response && response.ok) {
55
- return response.text();
56
- }
57
- else {
58
- throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(this), "Unable to load icon.");
59
- }
60
- })
61
- .then((str) => {
62
- if (str !== undefined) {
63
- return (new window.DOMParser()).parseFromString(str, "text/xml");
64
- }
65
- else {
66
- throw new appui_abstract_1.UiError(UiCore_1.UiCore.loggerCategory(this), "Unable to load icon.");
67
- }
68
- })
69
- .then((data) => !this.childNodes.length && this.append(data.documentElement));
70
100
  }
71
101
  }
72
102
  exports.IconWebComponent = IconWebComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"IconWebComponent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,uBAAuB;AACvB,+CAA+C;AAC/C;;GAEG;;;AAEH,0DAAgD;AAChD,sDAA6C;AAC7C,sCAAmC;AACnC,oEAAoD;AAEpD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;IACvC,KAAK,CAAC,iBAAiB;QAC7B,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,OAAO;QACnB,qDAAqD;QACrD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM;YACxB,OAAO;QAET,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAE3C,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YAC3B,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAEpC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,IAAI,2BAA2B,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE;gBAChF,qBAAM,CAAC,QAAQ,CAAC,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;aACtE;YAED,6EAA6E;YAC7E,iFAAiF;YACjF,uBAAuB;YACvB,MAAM,SAAS,GAAG,mBAAS,aAAT,mBAAS,cAAT,mBAA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C,GAAG,EAAE,UAAU,CAAC,CAAC;aAClE;iBAAM;gBACL,MAAM,IAAI,wBAAO,CAAE,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,CAAC;aACzE;QACH,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAClF,CAAC;CACF;AAzDD,4CAyDC","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// istanbul ignore file\n// IconWebComponent requires in-browser testing\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiCore } from \"../UiCore\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\n\n/**\n * IconWebComponent loads icon from an svg path\n */\nexport class IconWebComponent extends HTMLElement {\n private async connectedCallback() {\n await this.loadSvg();\n this.dispatchEvent(new CustomEvent(\"load\"));\n }\n\n private async loadSvg() {\n // if svg was already appended don't request it again\n if (this.childNodes.length)\n return;\n\n const src = this.getAttribute(\"src\") || \"\";\n\n if (src.startsWith(\"data:\")) {\n const dataUriParts = src.split(\",\");\n\n if (dataUriParts.length !== 2 || \"data:image/svg+xml;base64\" !== dataUriParts[0]) {\n Logger.logError(UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n // istanbul ignore next\n const sanitizer = DOMPurify ?? DOMPurifyNS;\n // eslint-disable-next-line deprecation/deprecation\n const sanitizedSvg = sanitizer.sanitize(atob(dataUriParts[1]));\n\n const parsedSvg = new window.DOMParser().parseFromString(sanitizedSvg, \"text/xml\");\n const errorNode = parsedSvg.querySelector(\"parsererror\");\n if (errorNode || \"svg\" !== parsedSvg.documentElement.nodeName.toLowerCase()) {\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n\n !this.childNodes.length && this.append(parsedSvg.documentElement);\n return;\n }\n\n await fetch(src)\n .catch((_error) => {\n Logger.logError(UiCore.loggerCategory(this), \"Unable to load icon.\");\n })\n .then(async (response) => {\n if (response && response.ok) {\n return response.text();\n } else {\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n })\n .then((str) => {\n if (str !== undefined) {\n return (new window.DOMParser()).parseFromString(str, \"text/xml\");\n } else {\n throw new UiError (UiCore.loggerCategory(this), \"Unable to load icon.\");\n }\n })\n .then((data) => !this.childNodes.length && this.append(data.documentElement));\n }\n}\n"]}
1
+ {"version":3,"file":"IconWebComponent.js","sourceRoot":"","sources":["../../../../src/core-react/utils/IconWebComponent.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,uBAAuB;AACvB,+CAA+C;AAC/C;;GAEG;;;AAEH,0DAAgD;AAChD,sDAA6C;AAC7C,sCAAmC;AACnC,oEAAoD;AACpD,iEAA8D;AAE9D;;;;GAIG;AACH,MAAM,KAAK,GAAG,IAAI,GAAG,EAAwB,CAAC;AAE9C;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,GAAW,EAAE,OAAY;IACpD,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEpC,IACE,YAAY,CAAC,MAAM,KAAK,CAAC;QACzB,2BAA2B,KAAK,YAAY,CAAC,CAAC,CAAC,EAC/C;QACA,qBAAM,CAAC,QAAQ,CAAC,eAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC,CAAC;KACzE;IAED,6EAA6E;IAC7E,iFAAiF;IACjF,uBAAuB;IACvB,MAAM,SAAS,GAAG,mBAAS,aAAT,mBAAS,cAAT,mBAAS,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AS,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC,eAAe,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,KAAK,UAAU,MAAM,CAAC,GAAW,EAAE,OAAY;IAC7C,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KAC1C;IACD,OAAO,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;IACvC,KAAK,CAAC,iBAAiB;QAC7B,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,OAAO;QACnB,qDAAqD;QACrD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM;YAAE,OAAO;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,GAAG;YAAE,OAAO;QAEjB,MAAM,GAAG,GAAG,MAAM,IAAA,2CAAoB,EACpC,GAAG,EACH,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,EAC7B,KAAK,CACN,CAAC;QACF,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;SAClC;IACH,CAAC;CACF;AArBD,4CAqBC","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// istanbul ignore file\n// IconWebComponent requires in-browser testing\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiCore } from \"../UiCore\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport { reuseOrCreatePromise } from \"./reuseOrCreatePromise\";\n\n/**\n * \"getSvg\" list\n * (if multiple icon require the same thing,\n * only do the fetch once, and have all icon use the same result)\n */\nconst cache = new Map<string, Promise<any>>();\n\n/**\n * Parse 'data:' uri to retrieve the Svg component within it.\n * @param src data:image/svg+xml;base64\n * @param element Element for logging purpose.\n * @returns HTMLElement (svg)\n */\nfunction parseSvgFromDataUri(src: string, element: any) {\n const dataUriParts = src.split(\",\");\n\n if (\n dataUriParts.length !== 2 ||\n \"data:image/svg+xml;base64\" !== dataUriParts[0]\n ) {\n Logger.logError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n // istanbul ignore next\n const sanitizer = DOMPurify ?? DOMPurifyNS;\n // eslint-disable-next-line deprecation/deprecation\n const sanitizedSvg = sanitizer.sanitize(atob(dataUriParts[1]));\n\n const parsedSvg = new window.DOMParser().parseFromString(\n sanitizedSvg,\n \"text/xml\"\n );\n const errorNode = parsedSvg.querySelector(\"parsererror\");\n if (errorNode || \"svg\" !== parsedSvg.documentElement.nodeName.toLowerCase()) {\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n\n return parsedSvg.documentElement;\n}\n\n/**\n * Fetch the src from the network and return the SVG element.\n * @param src URL representing a .svg file\n * @param element Element for logging purpose\n * @returns HTMLElement (svg)\n */\nasync function fetchSvg(src: string, element: any) {\n const response = await fetch(src).catch((_error) => {\n Logger.logError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n });\n if (!response || !response.ok) {\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n const str = await response.text();\n if (str === undefined) {\n throw new UiError(UiCore.loggerCategory(element), \"Unable to load icon.\");\n }\n const data = new window.DOMParser().parseFromString(str, \"text/xml\");\n return data.documentElement;\n}\n\n/**\n * Get the svg (fetch and parse for url, or decode and parse for data: url)\n * @param src URL of the content to download/parse\n * @param element Element for logging purpose.\n * @returns HTMLElement (svg)\n */\nasync function getSvg(src: string, element: any) {\n if (src.startsWith(\"data:\")) {\n return parseSvgFromDataUri(src, element);\n }\n return fetchSvg(src, element);\n}\n\n/**\n * IconWebComponent loads icon from an svg path\n */\nexport class IconWebComponent extends HTMLElement {\n private async connectedCallback() {\n await this.loadSvg();\n this.dispatchEvent(new CustomEvent(\"load\"));\n }\n\n private async loadSvg() {\n // if svg was already appended don't request it again\n if (this.childNodes.length) return;\n const src = this.getAttribute(\"src\") || \"\";\n if (!src) return;\n\n const svg = await reuseOrCreatePromise(\n src,\n async () => getSvg(src, this),\n cache\n );\n if (svg && !this.childNodes.length) {\n this.append(svg.cloneNode(true));\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Point.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD;;GAEG;AACH,qBAAa,KAAM,YAAW,UAAU;aAOH,CAAC;aAAsB,CAAC;IAN3D,yCAAyC;WAC3B,MAAM,CAAC,UAAU,EAAE,UAAU;IAI3C,2BAA2B;gBACQ,CAAC,SAAI,EAAkB,CAAC,SAAI;IAG/D,oDAAoD;IAC7C,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM;IAK/C,oDAAoD;IAC7C,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM;IAIxD,kCAAkC;IAC3B,WAAW,CAAC,KAAK,EAAE,UAAU;IAIpC,oEAAoE;IAC7D,MAAM,CAAC,MAAM,EAAE,UAAU;IAIhC,8DAA8D;IACvD,OA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qD;IAC9C,OAAO,IAAI,UAAU;CAM7B"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Point.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Point.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;GAEG;AACH,MAAa,KAAK;IAChB,yCAAyC;IAClC,MAAM,CAAC,MAAM,CAAC,UAAsB;QACzC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,2BAA2B;IAC3B,YAAmC,IAAI,CAAC,EAAkB,IAAI,CAAC;QAA5B,MAAC,GAAD,CAAC,CAAI;QAAkB,MAAC,GAAD,CAAC,CAAI;IAC/D,CAAC;IAED,oDAAoD;IAC7C,aAAa,CAAC,KAAiB;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,oDAAoD;IAC7C,sBAAsB,CAAC,KAAiB;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,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C,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,qDAAqD;IAC9C,OAAO;QACZ,OAAO;YACL,CAAC,EAAE,IAAI,CAAC,CAAC;YACT,CAAC,EAAE,IAAI,CAAC,CAAC;SACV,CAAC;IACJ,CAAC;CACF;AApED,sBAoEC","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 { PointProps } from \"@itwin/appui-abstract\";\n\n/** Describes and provides methods to work with 2d points.\n * @internal\n */\nexport class Point implements PointProps {\n /** Creates point from [[PointProps]]. */\n public static create(pointProps: PointProps) {\n return new Point(pointProps.x, pointProps.y);\n }\n\n /** Creates a new point. */\n public constructor(public readonly x = 0, public readonly y = 0) {\n }\n\n /** Calculates Euclidean distance to other point. */\n public getDistanceTo(other: PointProps): number {\n const offset = this.getOffsetTo(other);\n return Math.sqrt(Math.pow(offset.x, 2) + Math.pow(offset.y, 2));\n }\n\n /** Calculates grid-like distance to other point. */\n public getManhattanDistanceTo(other: PointProps): number {\n return Math.abs(this.x - other.x) + Math.abs(this.y - other.y);\n }\n\n /** Gets offset to other point. */\n public getOffsetTo(other: PointProps) {\n return new Point(other.x - this.x, other.y - this.y);\n }\n\n /** @returns New [[Point]] that is offset along the X and Y axes. */\n public offset(offset: PointProps) {\n return new Point(this.x + offset.x, this.y + offset.y);\n }\n\n /** @returns New [[Point]] that is offset along the X axis. */\n public offsetX(offset: number) {\n return new Point(this.x + offset, this.y);\n }\n\n /** @returns New [[Point]] that is offset along the Y axis. */\n public offsetY(offset: number) {\n return new Point(this.x, this.y + offset);\n }\n\n /** @returns True if position of this and other points are equal. */\n public equals(other: PointProps) {\n return other.x === this.x && other.y === this.y;\n }\n\n /** @returns New [[Point]] with modified x value. */\n public setX(x: number) {\n return new Point(x, this.y);\n }\n\n /** @returns New [[Point]] with modified y value. */\n public setY(y: number) {\n return new Point(this.x, y);\n }\n\n /** @returns New [[Point]] with coordinates multiplied by specified factor. */\n public multiply(factor: number) {\n return new Point(this.x * factor, this.y * factor);\n }\n\n /** @returns [[PointProps]] object for this point. */\n public toProps(): PointProps {\n return {\n x: this.x,\n y: this.y,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"Point.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Point.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAIH;;GAEG;AACH,MAAa,KAAK;IAChB,yCAAyC;IAClC,MAAM,CAAC,MAAM,CAAC,UAAsB;QACzC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,2BAA2B;IAC3B,YAAmC,IAAI,CAAC,EAAkB,IAAI,CAAC;QAA5B,MAAC,GAAD,CAAC,CAAI;QAAkB,MAAC,GAAD,CAAC,CAAI;IAAG,CAAC;IAEnE,oDAAoD;IAC7C,aAAa,CAAC,KAAiB;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,oDAAoD;IAC7C,sBAAsB,CAAC,KAAiB;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,kCAAkC;IAC3B,WAAW,CAAC,KAAiB;QA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ACL,CAAC,EAAE,IAAI,CAAC,CAAC;YACT,CAAC,EAAE,IAAI,CAAC,CAAC;SACV,CAAC;IACJ,CAAC;CACF;AAnED,sBAmEC","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 { PointProps } from \"@itwin/appui-abstract\";\n\n/** Describes and provides methods to work with 2d points.\n * @internal\n */\nexport class Point implements PointProps {\n /** Creates point from [[PointProps]]. */\n public static create(pointProps: PointProps) {\n return new Point(pointProps.x, pointProps.y);\n }\n\n /** Creates a new point. */\n public constructor(public readonly x = 0, public readonly y = 0) {}\n\n /** Calculates Euclidean distance to other point. */\n public getDistanceTo(other: PointProps): number {\n const offset = this.getOffsetTo(other);\n return Math.sqrt(Math.pow(offset.x, 2) + Math.pow(offset.y, 2));\n }\n\n /** Calculates grid-like distance to other point. */\n public getManhattanDistanceTo(other: PointProps): number {\n return Math.abs(this.x - other.x) + Math.abs(this.y - other.y);\n }\n\n /** Gets offset to other point. */\n public getOffsetTo(other: PointProps) {\n return new Point(other.x - this.x, other.y - this.y);\n }\n\n /** @returns New [[Point]] that is offset along the X and Y axes. */\n public offset(offset: PointProps) {\n return new Point(this.x + offset.x, this.y + offset.y);\n }\n\n /** @returns New [[Point]] that is offset along the X axis. */\n public offsetX(offset: number) {\n return new Point(this.x + offset, this.y);\n }\n\n /** @returns New [[Point]] that is offset along the Y axis. */\n public offsetY(offset: number) {\n return new Point(this.x, this.y + offset);\n }\n\n /** @returns True if position of this and other points are equal. */\n public equals(other: PointProps) {\n return other.x === this.x && other.y === this.y;\n }\n\n /** @returns New [[Point]] with modified x value. */\n public setX(x: number) {\n return new Point(x, this.y);\n }\n\n /** @returns New [[Point]] with modified y value. */\n public setY(y: number) {\n return new Point(this.x, y);\n }\n\n /** @returns New [[Point]] with coordinates multiplied by specified factor. */\n public multiply(factor: number) {\n return new Point(this.x * factor, this.y * factor);\n }\n\n /** @returns [[PointProps]] object for this point. */\n public toProps(): PointProps {\n return {\n x: this.x,\n y: this.y,\n };\n }\n}\n"]}
@@ -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,cAAe,SAAQ,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,WAAW;CAAI;AAEhG;;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,CAAC,CAAC,EAAE,UAAU,CAAC,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;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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Props.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Props.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;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 extends React.AllHTMLAttributes<HTMLDivElement>, 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<T, \"children\">;\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\";\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 +1 @@
1
- {"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../../src/core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G,SAAS;IAMlD,mFAAmF;IAC5E,mBAAmB,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS;IAK5D,qFAAqF;IAC9E,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS;IAK9D,8DAA8D;IACvD,OAAO,IAAI,KAAK;IAIvB,wDAAwD;IACjD,MAAM,IAAI,KAAK;IAMtB,kEAAkE;IAC3D,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;IASjD;;;OAGG;IACI,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS;IAQvD;;;OAGG;IACI,wBAAwB,CAC7B,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,SAAS;IAOZ;;;OAGG;IACI,0BAA0B,CAC/B,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,SAAS;IAOZ;;;OAGG;IACI,0BAA0B,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM;IAoC5D,6DAA6D;IACtD,OAAO,IAAI,cAAc;CAQjC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */
@@ -149,7 +149,10 @@ class Rectangle {
149
149
  * @note Inclusive.
150
150
  */
151
151
  containsPoint(point) {
152
- return point.x >= this.left && point.x <= this.right && point.y >= this.top && point.y <= this.bottom;
152
+ return (point.x >= this.left &&
153
+ point.x <= this.right &&
154
+ point.y >= this.top &&
155
+ point.y <= this.bottom);
153
156
  }
154
157
  /**
155
158
  * Checks if a point given as x,y is within the rectangle.
@@ -163,7 +166,10 @@ class Rectangle {
163
166
  * @note Inclusive.
164
167
  */
165
168
  contains(other) {
166
- return other.left >= this.left && other.right <= this.right && other.top >= this.top && other.bottom <= this.bottom;
169
+ return (other.left >= this.left &&
170
+ other.right <= this.right &&
171
+ other.top >= this.top &&
172
+ other.bottom <= this.bottom);
167
173
  }
168
174
  /** @returns New [[Rectangle]] which is contained in other rectangle. */
169
175
  containIn(other) {
@@ -193,8 +199,10 @@ class Rectangle {
193
199
  }
194
200
  /** @returns true if this rectangle intersects other rectangle. */
195
201
  intersects(other) {
196
- return this.left < other.right && this.right > other.left &&
197
- this.top < other.bottom && this.bottom > other.top;
202
+ return (this.left < other.right &&
203
+ this.right > other.left &&
204
+ this.top < other.bottom &&
205
+ this.bottom > other.top);
198
206
  }
199
207
  /**
200
208
  * Merges outer edges of this and other rectangles.
@@ -1 +1 @@
1
- {"version":3,"file":"Rectangle.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Rectangle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,mCAAgC;AAEhC,iCAA8B;AAC9B,6CAA0C;AAY1C;;GAEG;AACH,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,yCAAO,CAAA;IACP,2CAAQ,CAAA;IACR,iDAAW,CAAA;IACX,+CAAU,CAAA;AACZ,CAAC,EALW,MAAM,GAAN,cAAM,KAAN,cAAM,QAKjB;AAED;;GAEG;AACH,MAAa,SAAS;IACpB,iDAAiD;IAC1C,MAAM,CAAC,MAAM,CAAC,KAAqB;QACxC,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC;IAED,4CAA4C;IACrC,MAAM,CAAC,cAAc,CAAC,IAAe;QAC1C,OAAO,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM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6DAA6D;IACtD,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC;IACJ,CAAC;CACF;AAjRD,8BAiRC","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 { PointProps } from \"@itwin/appui-abstract\";\nimport { Point } from \"./Point\";\nimport type { SizeProps } from \"./Size\";\nimport { Size } from \"./Size\";\nimport { UiGeometry } from \"./UiGeometry\";\n\n/** Describes 2d bounds.\n * @public\n */\nexport interface RectangleProps {\n readonly left: number;\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n}\n\n/** Available corners of [[Rectangle]].\n * @internal\n */\nexport enum Corner {\n TopLeft,\n TopRight,\n BottomRight,\n BottomLeft,\n}\n\n/** Describes and provides methods to work with 2d bounds.\n * @internal\n */\nexport class Rectangle implements RectangleProps {\n /** Creates rectangle from [[RectangleProps]]. */\n public static create(props: RectangleProps): Rectangle {\n return new Rectangle(props.left, props.top, props.right, props.bottom);\n }\n\n /** Creates rectangle from [[SizeProps]]. */\n public static createFromSize(size: SizeProps): Rectangle {\n return new Rectangle(0, 0, size.width, size.height);\n }\n\n /** Create a rectangle with 2 pairs of xy candidates. Theses are compared and shuffled as needed for the rectangle. */\n public static createXYXY(xA: number, yA: number, xB: number, yB: number): Rectangle {\n return new Rectangle(\n Math.min(xA, xB), Math.min(yA, yB),\n Math.max(xA, xB), Math.max(yA, yB));\n }\n\n /** Creates rectangle with specified bounds. */\n public constructor(public readonly left = 0, public readonly top = 0, public readonly right = 0, public readonly bottom = 0) {\n }\n\n /** @returns Size of this rectangle. */\n public getSize(): Size {\n const width = this.getWidth();\n const height = this.getHeight();\n return new Size(width, height);\n }\n\n /** @returns Width of this rectangle. */\n public getWidth(): number {\n return this.right - this.left;\n }\n\n /** @returns Height of this rectangle. */\n public getHeight(): number {\n return this.bottom - this.top;\n }\n\n /** @returns Position of specified corner. */\n public getCorner(corner: Corner): Point {\n switch (corner) {\n case Corner.TopLeft: {\n return this.topLeft();\n }\n case Corner.TopRight: {\n return new Point(this.right, this.top);\n }\n case Corner.BottomLeft: {\n return new Point(this.left, this.bottom);\n }\n case Corner.BottomRight: {\n return new Point(this.right, this.bottom);\n }\n }\n }\n\n /**\n * Inset the bounds of this rectangle.\n * @note Negative arguments will increase the size of rectangle.\n * @returns New [[Rectangle]] with modified bounds.\n */\n public inset(left: number, top: number, right: number, bottom: number): Rectangle {\n return new Rectangle(this.left + left, this.top + top, this.right - right, this.bottom - bottom);\n }\n\n /**\n * Offsets the rectangle along the X and Y axes.\n * @returns New [[Rectangle]] with modified position.\n */\n public offset(offset: PointProps): Rectangle {\n return new Rectangle(this.left + offset.x, this.top + offset.y, this.right + offset.x, this.bottom + offset.y);\n }\n\n /**\n * Offsets the rectangle along the X axis.\n * @returns New [[Rectangle]] with modified position along X axis.\n */\n public offsetX(offset: number): Rectangle {\n return new Rectangle(this.left + offset, this.top, this.right + offset, this.bottom);\n }\n\n /**\n * Offsets the rectangle along the Y axis.\n * @returns New [[Rectangle]] with modified position along Y axis.\n */\n public offsetY(offset: number): Rectangle {\n return new Rectangle(this.left, this.top + offset, this.right, this.bottom + offset);\n }\n\n /**\n * Moves the top left corner of rectangle to specified point.\n * @returns New [[Rectangle]] with modified position.\n */\n public setPosition(position: PointProps): Rectangle {\n return new Rectangle(position.x, position.y, position.x + this.getWidth(), position.y + this.getHeight());\n }\n\n /**\n * Sets the height of the rectangle.\n * @note Only [[Edge.Bottom]] is subject to change.\n * @returns New [[Rectangle]] with modified height.\n */\n public setHeight(height: number): Rectangle {\n return new Rectangle(this.left, this.top, this.right, this.top + height);\n }\n\n /**\n * Sets the width of the rectangle.\n * @note Only [[Edge.Right]] is subject to change.\n * @returns New [[Rectangle]] with modified width.\n */\n public setWidth(width: number): Rectangle {\n return new Rectangle(this.left, this.top, this.left + width, this.bottom);\n }\n\n /**\n * Sets the height and width of the rectangle.\n * @note Only [[Edge.Bottom]] and [[Edge.Right]] are subjects to change.\n * @returns New [[Rectangle]] with modified height.\n */\n public setSize(size: SizeProps): Rectangle {\n return new Rectangle(this.left, this.top, this.left + size.width, this.top + size.height);\n }\n\n /** Checks if bounds of two rectangles match. */\n public equals(other: RectangleProps): boolean {\n if (this.left === other.left &&\n this.top === other.top &&\n this.right === other.right &&\n this.bottom === other.bottom)\n return true;\n\n return false;\n }\n\n /**\n * Checks if point is within bounds of the rectangle.\n * @note Inclusive.\n */\n public containsPoint(point: PointProps): boolean {\n return point.x >= this.left && point.x <= this.right && point.y >= this.top && point.y <= this.bottom;\n }\n\n /**\n * Checks if a point given as x,y is within the rectangle.\n * @note Inclusive.\n */\n public containsXY(x: number, y: number): boolean {\n return this.containsPoint({x, y});\n }\n\n /**\n * @returns true if this rectangle contains other rectangle.\n * @note Inclusive.\n */\n public contains(other: RectangleProps): boolean {\n return other.left >= this.left && other.right <= this.right && other.top >= this.top && other.bottom <= this.bottom;\n }\n\n /** @returns New [[Rectangle]] which is contained in other rectangle. */\n public containIn(other: RectangleProps): Rectangle {\n let contained: Rectangle = this.containVerticallyIn(other);\n contained = contained.containHorizontallyIn(other);\n return contained;\n }\n\n /** @returns New [[Rectangle]] which is vertically contained in other rectangle. */\n public containVerticallyIn(other: RectangleProps): Rectangle {\n const contained = this.offsetY(Math.min(other.bottom - this.bottom, 0));\n return contained.offsetY(Math.max(other.top - contained.top, 0));\n }\n\n /** @returns New [[Rectangle]] which is horizontally contained in other rectangle. */\n public containHorizontallyIn(other: RectangleProps): Rectangle {\n const contained = this.offsetX(Math.min(other.right - this.right, 0));\n return contained.offsetX(Math.max(other.left - contained.left, 0));\n }\n\n /** @returns [[Corner.TopLeft]] position of this rectangle. */\n public topLeft(): Point {\n return new Point(this.left, this.top);\n }\n\n /** @returns Center point position of this rectangle. */\n public center(): Point {\n const x = this.left + (this.right - this.left) / 2;\n const y = this.top + (this.bottom - this.top) / 2;\n return new Point(x, y);\n }\n\n /** @returns true if this rectangle intersects other rectangle. */\n public intersects(other: RectangleProps): boolean {\n return this.left < other.right && this.right > other.left &&\n this.top < other.bottom && this.bottom > other.top;\n }\n\n /**\n * Merges outer edges of this and other rectangles.\n * @returns New [[Rectangle]] with merged bounds.\n */\n public outerMergeWith(other: RectangleProps): Rectangle {\n const left = Math.min(this.left, other.left);\n const top = Math.min(this.top, other.top);\n const right = Math.max(this.right, other.right);\n const bottom = Math.max(this.bottom, other.bottom);\n return new Rectangle(left, top, right, bottom);\n }\n\n /**\n * Vertically divides this rectangle into specified number of equal height segments.\n * @returns Vertical rectangle segment.\n */\n public getVerticalSegmentBounds(segmentId: number, numberOfSegments: number): Rectangle {\n const segmentHeight = this.getHeight() / numberOfSegments;\n\n const top = segmentId * segmentHeight;\n return this.inset(0, top, 0, 0).setHeight(segmentHeight);\n }\n\n /**\n * Horizontally divides this rectangle into specified number of equal width segments.\n * @returns Horizontal rectangle segment.\n */\n public getHorizontalSegmentBounds(segmentId: number, numberOfSegments: number): Rectangle {\n const segmentWidth = this.getWidth() / numberOfSegments;\n\n const left = segmentId * segmentWidth;\n return this.inset(left, 0, 0, 0).setWidth(segmentWidth);\n }\n\n /**\n * Calculates the shortest distance between this rectangle and a given point.\n * @returns The shortest distance to a point.\n */\n public getShortestDistanceToPoint(point: PointProps): number {\n let shortestDistance = 0;\n\n if (point.x < this.left) {\n if (point.y < this.top)\n shortestDistance = UiGeometry.hypotenuseXY(this.left - point.x, this.top - point.y);\n else if (point.y <= this.bottom)\n shortestDistance = this.left - point.x;\n else\n shortestDistance = UiGeometry.hypotenuseXY(this.left - point.x, this.bottom - point.y);\n } else if (point.x <= this.right) {\n if (point.y < this.top)\n shortestDistance = this.top - point.y;\n else if (point.y <= this.bottom)\n shortestDistance = 0;\n else\n shortestDistance = point.y - this.bottom;\n } else {\n if (point.y < this.top)\n shortestDistance = UiGeometry.hypotenuseXY(this.right - point.x, this.top - point.y);\n else if (point.y <= this.bottom)\n shortestDistance = point.x - this.right;\n else\n shortestDistance = UiGeometry.hypotenuseXY(this.right - point.x, this.bottom - point.y);\n }\n\n return shortestDistance;\n }\n\n /** @returns [[RectangleProps]] object for this rectangle. */\n public toProps(): RectangleProps {\n return {\n bottom: this.bottom,\n left: this.left,\n right: this.right,\n top: this.top,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"Rectangle.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Rectangle.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,mCAAgC;AAEhC,iCAA8B;AAC9B,6CAA0C;AAY1C;;GAEG;AACH,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,yCAAO,CAAA;IACP,2CAAQ,CAAA;IACR,iDAAW,CAAA;IACX,+CAAU,CAAA;AACZ,CAAC,EALW,MAAM,GAAN,cAAM,KAAN,cAAM,QAKjB;AAED;;GAEG;AACH,MAAa,SAAS;IACpB,iDAAiD;IAC1C,MAAM,CAAC,MAAM,CAAC,KAAqB;QACxC,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC;IAED,4CAA4C;IACrC,MAAM,CAAC,cAAc,CAAC,IAAe;QAC1C,OAAO,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IAED,sHAAsH;IAC/G,MAAM,CAAC,UAAU,CACtB,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU;QAEV,OAAO,IAAI,SAAS,CAClB,IAAI,CAAC,GAAG,CAAC,EAA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ACd,CAAC;IACJ,CAAC;CACF;AA7VD,8BA6VC","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 { PointProps } from \"@itwin/appui-abstract\";\nimport { Point } from \"./Point\";\nimport type { SizeProps } from \"./Size\";\nimport { Size } from \"./Size\";\nimport { UiGeometry } from \"./UiGeometry\";\n\n/** Describes 2d bounds.\n * @public\n */\nexport interface RectangleProps {\n readonly left: number;\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n}\n\n/** Available corners of [[Rectangle]].\n * @internal\n */\nexport enum Corner {\n TopLeft,\n TopRight,\n BottomRight,\n BottomLeft,\n}\n\n/** Describes and provides methods to work with 2d bounds.\n * @internal\n */\nexport class Rectangle implements RectangleProps {\n /** Creates rectangle from [[RectangleProps]]. */\n public static create(props: RectangleProps): Rectangle {\n return new Rectangle(props.left, props.top, props.right, props.bottom);\n }\n\n /** Creates rectangle from [[SizeProps]]. */\n public static createFromSize(size: SizeProps): Rectangle {\n return new Rectangle(0, 0, size.width, size.height);\n }\n\n /** Create a rectangle with 2 pairs of xy candidates. Theses are compared and shuffled as needed for the rectangle. */\n public static createXYXY(\n xA: number,\n yA: number,\n xB: number,\n yB: number\n ): Rectangle {\n return new Rectangle(\n Math.min(xA, xB),\n Math.min(yA, yB),\n Math.max(xA, xB),\n Math.max(yA, yB)\n );\n }\n\n /** Creates rectangle with specified bounds. */\n public constructor(\n public readonly left = 0,\n public readonly top = 0,\n public readonly right = 0,\n public readonly bottom = 0\n ) {}\n\n /** @returns Size of this rectangle. */\n public getSize(): Size {\n const width = this.getWidth();\n const height = this.getHeight();\n return new Size(width, height);\n }\n\n /** @returns Width of this rectangle. */\n public getWidth(): number {\n return this.right - this.left;\n }\n\n /** @returns Height of this rectangle. */\n public getHeight(): number {\n return this.bottom - this.top;\n }\n\n /** @returns Position of specified corner. */\n public getCorner(corner: Corner): Point {\n switch (corner) {\n case Corner.TopLeft: {\n return this.topLeft();\n }\n case Corner.TopRight: {\n return new Point(this.right, this.top);\n }\n case Corner.BottomLeft: {\n return new Point(this.left, this.bottom);\n }\n case Corner.BottomRight: {\n return new Point(this.right, this.bottom);\n }\n }\n }\n\n /**\n * Inset the bounds of this rectangle.\n * @note Negative arguments will increase the size of rectangle.\n * @returns New [[Rectangle]] with modified bounds.\n */\n public inset(\n left: number,\n top: number,\n right: number,\n bottom: number\n ): Rectangle {\n return new Rectangle(\n this.left + left,\n this.top + top,\n this.right - right,\n this.bottom - bottom\n );\n }\n\n /**\n * Offsets the rectangle along the X and Y axes.\n * @returns New [[Rectangle]] with modified position.\n */\n public offset(offset: PointProps): Rectangle {\n return new Rectangle(\n this.left + offset.x,\n this.top + offset.y,\n this.right + offset.x,\n this.bottom + offset.y\n );\n }\n\n /**\n * Offsets the rectangle along the X axis.\n * @returns New [[Rectangle]] with modified position along X axis.\n */\n public offsetX(offset: number): Rectangle {\n return new Rectangle(\n this.left + offset,\n this.top,\n this.right + offset,\n this.bottom\n );\n }\n\n /**\n * Offsets the rectangle along the Y axis.\n * @returns New [[Rectangle]] with modified position along Y axis.\n */\n public offsetY(offset: number): Rectangle {\n return new Rectangle(\n this.left,\n this.top + offset,\n this.right,\n this.bottom + offset\n );\n }\n\n /**\n * Moves the top left corner of rectangle to specified point.\n * @returns New [[Rectangle]] with modified position.\n */\n public setPosition(position: PointProps): Rectangle {\n return new Rectangle(\n position.x,\n position.y,\n position.x + this.getWidth(),\n position.y + this.getHeight()\n );\n }\n\n /**\n * Sets the height of the rectangle.\n * @note Only [[Edge.Bottom]] is subject to change.\n * @returns New [[Rectangle]] with modified height.\n */\n public setHeight(height: number): Rectangle {\n return new Rectangle(this.left, this.top, this.right, this.top + height);\n }\n\n /**\n * Sets the width of the rectangle.\n * @note Only [[Edge.Right]] is subject to change.\n * @returns New [[Rectangle]] with modified width.\n */\n public setWidth(width: number): Rectangle {\n return new Rectangle(this.left, this.top, this.left + width, this.bottom);\n }\n\n /**\n * Sets the height and width of the rectangle.\n * @note Only [[Edge.Bottom]] and [[Edge.Right]] are subjects to change.\n * @returns New [[Rectangle]] with modified height.\n */\n public setSize(size: SizeProps): Rectangle {\n return new Rectangle(\n this.left,\n this.top,\n this.left + size.width,\n this.top + size.height\n );\n }\n\n /** Checks if bounds of two rectangles match. */\n public equals(other: RectangleProps): boolean {\n if (\n this.left === other.left &&\n this.top === other.top &&\n this.right === other.right &&\n this.bottom === other.bottom\n )\n return true;\n\n return false;\n }\n\n /**\n * Checks if point is within bounds of the rectangle.\n * @note Inclusive.\n */\n public containsPoint(point: PointProps): boolean {\n return (\n point.x >= this.left &&\n point.x <= this.right &&\n point.y >= this.top &&\n point.y <= this.bottom\n );\n }\n\n /**\n * Checks if a point given as x,y is within the rectangle.\n * @note Inclusive.\n */\n public containsXY(x: number, y: number): boolean {\n return this.containsPoint({ x, y });\n }\n\n /**\n * @returns true if this rectangle contains other rectangle.\n * @note Inclusive.\n */\n public contains(other: RectangleProps): boolean {\n return (\n other.left >= this.left &&\n other.right <= this.right &&\n other.top >= this.top &&\n other.bottom <= this.bottom\n );\n }\n\n /** @returns New [[Rectangle]] which is contained in other rectangle. */\n public containIn(other: RectangleProps): Rectangle {\n let contained: Rectangle = this.containVerticallyIn(other);\n contained = contained.containHorizontallyIn(other);\n return contained;\n }\n\n /** @returns New [[Rectangle]] which is vertically contained in other rectangle. */\n public containVerticallyIn(other: RectangleProps): Rectangle {\n const contained = this.offsetY(Math.min(other.bottom - this.bottom, 0));\n return contained.offsetY(Math.max(other.top - contained.top, 0));\n }\n\n /** @returns New [[Rectangle]] which is horizontally contained in other rectangle. */\n public containHorizontallyIn(other: RectangleProps): Rectangle {\n const contained = this.offsetX(Math.min(other.right - this.right, 0));\n return contained.offsetX(Math.max(other.left - contained.left, 0));\n }\n\n /** @returns [[Corner.TopLeft]] position of this rectangle. */\n public topLeft(): Point {\n return new Point(this.left, this.top);\n }\n\n /** @returns Center point position of this rectangle. */\n public center(): Point {\n const x = this.left + (this.right - this.left) / 2;\n const y = this.top + (this.bottom - this.top) / 2;\n return new Point(x, y);\n }\n\n /** @returns true if this rectangle intersects other rectangle. */\n public intersects(other: RectangleProps): boolean {\n return (\n this.left < other.right &&\n this.right > other.left &&\n this.top < other.bottom &&\n this.bottom > other.top\n );\n }\n\n /**\n * Merges outer edges of this and other rectangles.\n * @returns New [[Rectangle]] with merged bounds.\n */\n public outerMergeWith(other: RectangleProps): Rectangle {\n const left = Math.min(this.left, other.left);\n const top = Math.min(this.top, other.top);\n const right = Math.max(this.right, other.right);\n const bottom = Math.max(this.bottom, other.bottom);\n return new Rectangle(left, top, right, bottom);\n }\n\n /**\n * Vertically divides this rectangle into specified number of equal height segments.\n * @returns Vertical rectangle segment.\n */\n public getVerticalSegmentBounds(\n segmentId: number,\n numberOfSegments: number\n ): Rectangle {\n const segmentHeight = this.getHeight() / numberOfSegments;\n\n const top = segmentId * segmentHeight;\n return this.inset(0, top, 0, 0).setHeight(segmentHeight);\n }\n\n /**\n * Horizontally divides this rectangle into specified number of equal width segments.\n * @returns Horizontal rectangle segment.\n */\n public getHorizontalSegmentBounds(\n segmentId: number,\n numberOfSegments: number\n ): Rectangle {\n const segmentWidth = this.getWidth() / numberOfSegments;\n\n const left = segmentId * segmentWidth;\n return this.inset(left, 0, 0, 0).setWidth(segmentWidth);\n }\n\n /**\n * Calculates the shortest distance between this rectangle and a given point.\n * @returns The shortest distance to a point.\n */\n public getShortestDistanceToPoint(point: PointProps): number {\n let shortestDistance = 0;\n\n if (point.x < this.left) {\n if (point.y < this.top)\n shortestDistance = UiGeometry.hypotenuseXY(\n this.left - point.x,\n this.top - point.y\n );\n else if (point.y <= this.bottom) shortestDistance = this.left - point.x;\n else\n shortestDistance = UiGeometry.hypotenuseXY(\n this.left - point.x,\n this.bottom - point.y\n );\n } else if (point.x <= this.right) {\n if (point.y < this.top) shortestDistance = this.top - point.y;\n else if (point.y <= this.bottom) shortestDistance = 0;\n else shortestDistance = point.y - this.bottom;\n } else {\n if (point.y < this.top)\n shortestDistance = UiGeometry.hypotenuseXY(\n this.right - point.x,\n this.top - point.y\n );\n else if (point.y <= this.bottom) shortestDistance = point.x - this.right;\n else\n shortestDistance = UiGeometry.hypotenuseXY(\n this.right - point.x,\n this.bottom - point.y\n );\n }\n\n return shortestDistance;\n }\n\n /** @returns [[RectangleProps]] object for this rectangle. */\n public toProps(): RectangleProps {\n return {\n bottom: this.bottom,\n left: this.left,\n right: this.right,\n top: this.top,\n };\n }\n}\n"]}
@@ -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;IACd,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAUlC,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;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,YAAW,WAAW;IAC1D,OAAO,CAAC,QAAQ,CAAuB;gBACpB,EAAE,EAAE,OAAO;IAIvB,OAAO;IAGd,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAWlC,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAGtC"}
@@ -18,7 +18,9 @@ class ScrollPositionMaintainer {
18
18
  this._storage = new Map();
19
19
  ScrollPositionMaintainer.saveScrollPositions([el], this._storage);
20
20
  }
21
- dispose() { ScrollPositionMaintainer.restoreScrollPositions(this._storage); }
21
+ dispose() {
22
+ ScrollPositionMaintainer.restoreScrollPositions(this._storage);
23
+ }
22
24
  static saveScrollPositions(elems, storage) {
23
25
  for (const el of elems) {
24
26
  // istanbul ignore else
@@ -30,7 +32,7 @@ class ScrollPositionMaintainer {
30
32
  }
31
33
  }
32
34
  static restoreScrollPositions(storage) {
33
- storage.forEach((scrollTop, el) => el.scrollTop = scrollTop);
35
+ storage.forEach((scrollTop, el) => (el.scrollTop = scrollTop));
34
36
  }
35
37
  }
36
38
  exports.ScrollPositionMaintainer = ScrollPositionMaintainer;
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollPositionMaintainer.js","sourceRoot":"","sources":["../../../../src/core-react/utils/ScrollPositionMaintainer.ts"],"names":[],"mappings":";;;AASA;;;;;;;;;;;GAWG;AACH,MAAa,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,KAAK,wBAAwB,CAAC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,CAAC,mBAAmB,CAAC,KAAiC,EAAE,OAA6B;QACjG,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE;YACtB,uBAAuB;YACvB,IAAI,EAAE,CAAC,SAAS;gBACd,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;YAChC,uBAAuB;YACvB,IAAI,EAAE,CAAC,QAAQ;gBACb,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SAClD;IACH,CAAC;IACO,MAAM,CAAC,sBAAsB,CAAC,OAA6B;QACjE,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAC/D,CAAC;CACF;AApBD,4DAoBC","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() { ScrollPositionMaintainer.restoreScrollPositions(this._storage); }\n private static saveScrollPositions(elems: Element[] | HTMLCollection, storage: Map<Element, number>) {\n for (const el of elems) {\n // istanbul ignore else\n if (el.scrollTop)\n storage.set(el, el.scrollTop);\n // istanbul ignore else\n if (el.children)\n 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;;;;;;;;;;;GAWG;AACH,MAAa,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;YACtB,uBAAuB;YACvB,IAAI,EAAE,CAAC,SAAS;gBAAE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;YAChD,uBAAuB;YACvB,IAAI,EAAE,CAAC,QAAQ;gBAAE,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACjE;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;AAvBD,4DAuBC","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 // istanbul ignore else\n if (el.scrollTop) storage.set(el, el.scrollTop);\n // istanbul ignore else\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 +1 @@
1
- {"version":3,"file":"Size.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Size.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,qBAAa,IAAK,YAAW,SAAS;aAOD,KAAK;aAAsB,MAAM;IANpE,yCAAyC;WAC3B,MAAM,CAAC,IAAI,EAAE,SAAS;IAIpC,gDAAgD;gBACb,KAAK,SAAI,EAAkB,MAAM,SAAI;IAGxE,mDAAmD;IAC5C,MAAM,CAAC,KAAK,EAAE,SAAS;CAM/B"}
1
+ {"version":3,"file":"Size.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Size.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,qBAAa,IAAK,YAAW,SAAS;aAOD,KAAK;aAAsB,MAAM;IANpE,yCAAyC;WAC3B,MAAM,CAAC,IAAI,EAAE,SAAS;IAIpC,gDAAgD;gBACb,KAAK,SAAI,EAAkB,MAAM,SAAI;IAExE,mDAAmD;IAC5C,MAAM,CAAC,KAAK,EAAE,SAAS;CAI/B"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */
@@ -23,8 +23,7 @@ class Size {
23
23
  }
24
24
  /** Checks if dimensions of two sizes are equal. */
25
25
  equals(other) {
26
- if (this.width === other.width &&
27
- this.height === other.height)
26
+ if (this.width === other.width && this.height === other.height)
28
27
  return true;
29
28
  return false;
30
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Size.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Size.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH;;GAEG;AACH,MAAa,IAAI;IACf,yCAAyC;IAClC,MAAM,CAAC,MAAM,CAAC,IAAe;QAClC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,gDAAgD;IAChD,YAAmC,QAAQ,CAAC,EAAkB,SAAS,CAAC;QAArC,UAAK,GAAL,KAAK,CAAI;QAAkB,WAAM,GAAN,MAAM,CAAI;IACxE,CAAC;IAED,mDAAmD;IAC5C,MAAM,CAAC,KAAgB;QAC5B,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK;YAC5B,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;YAC5B,OAAO,IAAI,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAjBD,oBAiBC","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/** Describes 2d dimensions.\n * @public\n */\nexport interface SizeProps {\n readonly width: number;\n readonly height: number;\n}\n\n/** Describes and provides methods to work with 2d dimensions.\n * @internal\n */\nexport class Size implements SizeProps {\n /** Creates a size from [[SizeProps]]. */\n public static create(size: SizeProps) {\n return new Size(size.width, size.height);\n }\n\n /** Creates a size with specified dimensions. */\n public constructor(public readonly width = 0, public readonly height = 0) {\n }\n\n /** Checks if dimensions of two sizes are equal. */\n public equals(other: SizeProps) {\n if (this.width === other.width &&\n this.height === other.height)\n return true;\n return false;\n }\n}\n"]}
1
+ {"version":3,"file":"Size.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Size.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAUH;;GAEG;AACH,MAAa,IAAI;IACf,yCAAyC;IAClC,MAAM,CAAC,MAAM,CAAC,IAAe;QAClC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,gDAAgD;IAChD,YAAmC,QAAQ,CAAC,EAAkB,SAAS,CAAC;QAArC,UAAK,GAAL,KAAK,CAAI;QAAkB,WAAM,GAAN,MAAM,CAAI;IAAG,CAAC;IAE5E,mDAAmD;IAC5C,MAAM,CAAC,KAAgB;QAC5B,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC5E,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAdD,oBAcC","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/** Describes 2d dimensions.\n * @public\n */\nexport interface SizeProps {\n readonly width: number;\n readonly height: number;\n}\n\n/** Describes and provides methods to work with 2d dimensions.\n * @internal\n */\nexport class Size implements SizeProps {\n /** Creates a size from [[SizeProps]]. */\n public static create(size: SizeProps) {\n return new Size(size.width, size.height);\n }\n\n /** Creates a size with specified dimensions. */\n public constructor(public readonly width = 0, public readonly height = 0) {}\n\n /** Checks if dimensions of two sizes are equal. */\n public equals(other: SizeProps) {\n if (this.width === other.width && this.height === other.height) return true;\n return false;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Timer.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;AAElD;;GAEG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,UAAU,CAA6B;IAE/C;;;OAGG;gBACgB,OAAO,EAAE,MAAM;IAIlC,6CAA6C;IAC7C,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED,0EAA0E;IAC1E,IAAW,KAAK,IAGK,MAAM,CAD1B;IACD,IAAW,KAAK,CAAC,EAAE,EAAE,MAAM,EAE1B;IAED,uDAAuD;IAChD,YAAY,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS;IAIzD,yBAAyB;IAClB,KAAK;IAQZ,wBAAwB;IACjB,IAAI;IAQX,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,YAAY;CAGrB"}
1
+ {"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/Timer.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;AAElD;;GAEG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,UAAU,CAA6B;IAE/C;;;OAGG;gBACgB,OAAO,EAAE,MAAM;IAIlC,6CAA6C;IAC7C,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED,0EAA0E;IAC1E,IAAW,KAAK,IAGK,MAAM,CAD1B;IACD,IAAW,KAAK,CAAC,EAAE,EAAE,MAAM,EAE1B;IAED,uDAAuD;IAChD,YAAY,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS;IAIzD,yBAAyB;IAClB,KAAK;IAOZ,wBAAwB;IACjB,IAAI;IAOX,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,YAAY;CAGrB"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Timer.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Timer.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;GAEG;AACH,MAAa,KAAK;IAMhB;;;OAGG;IACH,YAAmB,OAAe;QAR1B,eAAU,GAAG,KAAK,CAAC;QACnB,aAAQ,GAAG,CAAC,CAAC;QAQnB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;IACxB,CAAC;IAED,6CAA6C;IAC7C,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,0EAA0E;IAC1E,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,IAAW,KAAK,CAAC,EAAU;QACzB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED,uDAAuD;IAChD,YAAY,CAAC,SAAqC;QACvD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED,yBAAyB;IAClB,KAAK;QACV,IAAI,IAAI,CAAC,UAAU;YACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QAEtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,wBAAwB;IACjB,IAAI;QACT,IAAI,CAAC,IAAI,CAAC,UAAU;YAClB,OAAO;QAET,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEO,OAAO;QACb,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;IAEO,UAAU;QAChB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACvE,CAAC;IAEO,YAAY;QAClB,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;CACF;AA9DD,sBA8DC","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/** Signature for [[Timer]] execute callback.\n * @public\n */\nexport type ExecuteHandler = (this: void) => void;\n\n/** Notifies handler after a set interval.\n * @public\n */\nexport class Timer {\n private _delay: number;\n private _isRunning = false;\n private _timerId = 0;\n private _onExecute: ExecuteHandler | undefined;\n\n /**\n * Creates a new Timer.\n * @param msDelay Time interval in milliseconds after which handler will be notified.\n */\n public constructor(msDelay: number) {\n this._delay = msDelay;\n }\n\n /** Indicates whether the timer is running */\n public get isRunning(): boolean {\n return this._isRunning;\n }\n\n /** Time interval in milliseconds after which handler will be notified. */\n public get delay() {\n return this._delay;\n }\n public set delay(ms: number) {\n this._delay = ms;\n }\n\n /** Set handler that is called after a set interval. */\n public setOnExecute(onExecute: ExecuteHandler | undefined) {\n this._onExecute = onExecute;\n }\n\n /** Starts this Timer. */\n public start() {\n if (this._isRunning)\n this.clearTimeout();\n\n this._isRunning = true;\n this.setTimeout();\n }\n\n /** Stops this Timer. */\n public stop() {\n if (!this._isRunning)\n return;\n\n this._isRunning = false;\n this.clearTimeout();\n }\n\n private execute() {\n this._onExecute && this._onExecute();\n this._isRunning = false;\n }\n\n private setTimeout() {\n this._timerId = window.setTimeout(() => this.execute(), this._delay);\n }\n\n private clearTimeout() {\n window.clearTimeout(this._timerId);\n }\n}\n"]}
1
+ {"version":3,"file":"Timer.js","sourceRoot":"","sources":["../../../../src/core-react/utils/Timer.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAOH;;GAEG;AACH,MAAa,KAAK;IAMhB;;;OAGG;IACH,YAAmB,OAAe;QAR1B,eAAU,GAAG,KAAK,CAAC;QACnB,aAAQ,GAAG,CAAC,CAAC;QAQnB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;IACxB,CAAC;IAED,6CAA6C;IAC7C,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,0EAA0E;IAC1E,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,IAAW,KAAK,CAAC,EAAU;QACzB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED,uDAAuD;IAChD,YAAY,CAAC,SAAqC;QACvD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED,yBAAyB;IAClB,KAAK;QACV,IAAI,IAAI,CAAC,UAAU;YAAE,IAAI,CAAC,YAAY,EAAE,CAAC;QAEzC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,wBAAwB;IACjB,IAAI;QACT,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO;QAE7B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEO,OAAO;QACb,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;IAEO,UAAU;QAChB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACvE,CAAC;IAEO,YAAY;QAClB,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;CACF;AA5DD,sBA4DC","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/** Signature for [[Timer]] execute callback.\n * @public\n */\nexport type ExecuteHandler = (this: void) => void;\n\n/** Notifies handler after a set interval.\n * @public\n */\nexport class Timer {\n private _delay: number;\n private _isRunning = false;\n private _timerId = 0;\n private _onExecute: ExecuteHandler | undefined;\n\n /**\n * Creates a new Timer.\n * @param msDelay Time interval in milliseconds after which handler will be notified.\n */\n public constructor(msDelay: number) {\n this._delay = msDelay;\n }\n\n /** Indicates whether the timer is running */\n public get isRunning(): boolean {\n return this._isRunning;\n }\n\n /** Time interval in milliseconds after which handler will be notified. */\n public get delay() {\n return this._delay;\n }\n public set delay(ms: number) {\n this._delay = ms;\n }\n\n /** Set handler that is called after a set interval. */\n public setOnExecute(onExecute: ExecuteHandler | undefined) {\n this._onExecute = onExecute;\n }\n\n /** Starts this Timer. */\n public start() {\n if (this._isRunning) this.clearTimeout();\n\n this._isRunning = true;\n this.setTimeout();\n }\n\n /** Stops this Timer. */\n public stop() {\n if (!this._isRunning) return;\n\n this._isRunning = false;\n this.clearTimeout();\n }\n\n private execute() {\n this._onExecute && this._onExecute();\n this._isRunning = false;\n }\n\n private setTimeout() {\n this._timerId = window.setTimeout(() => this.execute(), this._delay);\n }\n\n private clearTimeout() {\n window.clearTimeout(this._timerId);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiGeometry.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/UiGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;GAGG;AACH,qBAAa,UAAU;IACrB;;;;;OAKG;WACW,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAEpE;;OAEG;WACW,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;CACzD"}
1
+ {"version":3,"file":"UiGeometry.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/UiGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;GAGG;AACH,qBAAa,UAAU;IACrB;;;;;OAKG;WACW,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIpE;;OAEG;WACW,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;CAGzD"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */
@@ -19,11 +19,15 @@ class UiGeometry {
19
19
  * @param min smallest allowed output
20
20
  * @param max largest allowed result.
21
21
  */
22
- static clamp(value, min, max) { return Math.max(min, Math.min(max, value)); }
22
+ static clamp(value, min, max) {
23
+ return Math.max(min, Math.min(max, value));
24
+ }
23
25
  /**
24
26
  * Return the hypotenuse `sqrt(x*x + y*y)`. This is much faster than `Math.hypot(x,y)`.
25
27
  */
26
- static hypotenuseXY(x, y) { return Math.sqrt(x * x + y * y); }
28
+ static hypotenuseXY(x, y) {
29
+ return Math.sqrt(x * x + y * y);
30
+ }
27
31
  }
28
32
  exports.UiGeometry = UiGeometry;
29
33
  //# sourceMappingURL=UiGeometry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiGeometry.js","sourceRoot":"","sources":["../../../../src/core-react/utils/UiGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,MAAa,UAAU;IACrB;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,IAAY,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAEpH;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,CAAS,EAAE,CAAS,IAAY,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9F;AAbD,gCAaC","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/**\n * Class containing static methods for typical numeric operations.\n * @internal\n */\nexport class UiGeometry {\n /**\n * Clamp value to (min,max) with no test for order of (min,max)\n * @param value value to clamp\n * @param min smallest allowed output\n * @param max largest allowed result.\n */\n public static clamp(value: number, min: number, max: number): number { return Math.max(min, Math.min(max, value)); }\n\n /**\n * Return the hypotenuse `sqrt(x*x + y*y)`. This is much faster than `Math.hypot(x,y)`.\n */\n public static hypotenuseXY(x: number, y: number): number { return Math.sqrt(x * x + y * y); }\n}\n"]}
1
+ {"version":3,"file":"UiGeometry.js","sourceRoot":"","sources":["../../../../src/core-react/utils/UiGeometry.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;GAGG;AACH,MAAa,UAAU;IACrB;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,CAAS,EAAE,CAAS;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;CACF;AAjBD,gCAiBC","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/**\n * Class containing static methods for typical numeric operations.\n * @internal\n */\nexport class UiGeometry {\n /**\n * Clamp value to (min,max) with no test for order of (min,max)\n * @param value value to clamp\n * @param min smallest allowed output\n * @param max largest allowed result.\n */\n public static clamp(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, value));\n }\n\n /**\n * Return the hypotenuse `sqrt(x*x + y*y)`. This is much faster than `Math.hypot(x,y)`.\n */\n public static hypotenuseXY(x: number, y: number): number {\n return Math.sqrt(x * x + y * y);\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Utilities
8
8
  */