@itwin/imodel-components-react 4.10.0-dev.1 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +1 -1
  3. package/lib/cjs/imodel-components-react/UiIModelComponents.js +6 -6
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  5. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +2 -1
  6. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +12 -8
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  9. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +2 -0
  10. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +5 -2
  12. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  13. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +2 -0
  14. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  15. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +1 -1
  16. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  17. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +2 -0
  18. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  19. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +5 -5
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  21. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +2 -0
  22. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  23. package/lib/cjs/imodel-components-react/color/HueSlider.js +12 -9
  24. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  25. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +2 -0
  26. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +12 -11
  28. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  29. package/lib/cjs/imodel-components-react/color/Swatch.d.ts +2 -0
  30. package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
  31. package/lib/cjs/imodel-components-react/color/Swatch.js +2 -0
  32. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  33. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +3 -2
  34. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  35. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  36. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  37. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  38. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +5 -4
  39. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  40. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +5 -5
  41. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +3 -3
  43. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  44. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +10 -5
  45. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  46. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  47. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +3 -3
  48. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  49. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +1 -1
  50. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  51. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +5 -4
  52. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  53. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  54. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +7 -8
  55. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  56. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  57. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +10 -10
  58. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  59. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  60. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +15 -14
  61. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  62. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  63. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +13 -9
  64. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  65. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  66. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +22 -29
  67. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  68. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  69. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +18 -17
  70. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  71. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  72. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +7 -6
  73. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  74. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  75. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +14 -13
  76. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  77. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  78. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +7 -6
  79. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  80. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  81. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +9 -8
  82. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  83. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +23 -22
  85. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  86. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +7 -6
  88. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  89. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +15 -14
  91. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  92. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +6 -6
  94. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  95. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +2 -2
  96. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  97. package/lib/cjs/imodel-components-react/timeline/PlayButton.d.ts +12 -0
  98. package/lib/cjs/imodel-components-react/timeline/PlayButton.d.ts.map +1 -0
  99. package/lib/cjs/imodel-components-react/timeline/PlayButton.js +50 -0
  100. package/lib/cjs/imodel-components-react/timeline/PlayButton.js.map +1 -0
  101. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +0 -1
  102. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  103. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +1 -1
  104. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  105. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +2 -20
  106. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  107. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +111 -202
  108. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  109. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +25 -333
  110. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +33 -67
  111. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  112. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +226 -330
  113. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  114. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +27 -140
  115. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +2 -2
  116. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  117. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  118. package/lib/cjs/imodel-components-react/useTranslation.d.ts +10 -0
  119. package/lib/cjs/imodel-components-react/useTranslation.d.ts.map +1 -0
  120. package/lib/cjs/imodel-components-react/useTranslation.js +20 -0
  121. package/lib/cjs/imodel-components-react/useTranslation.js.map +1 -0
  122. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  123. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +13 -8
  124. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  125. package/lib/cjs/imodel-components-react.d.ts +0 -1
  126. package/lib/cjs/imodel-components-react.d.ts.map +1 -1
  127. package/lib/cjs/imodel-components-react.js +0 -1
  128. package/lib/cjs/imodel-components-react.js.map +1 -1
  129. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +1 -1
  130. package/lib/esm/imodel-components-react/UiIModelComponents.js +6 -6
  131. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  132. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +2 -1
  133. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  134. package/lib/esm/imodel-components-react/color/AlphaSlider.js +12 -8
  135. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  136. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +2 -0
  137. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  138. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +5 -2
  139. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  140. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +2 -0
  141. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  142. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +1 -1
  143. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  144. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +2 -0
  145. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  146. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +5 -5
  147. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  148. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +2 -0
  149. package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  150. package/lib/esm/imodel-components-react/color/HueSlider.js +12 -9
  151. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  152. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +2 -0
  153. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  154. package/lib/esm/imodel-components-react/color/SaturationPicker.js +12 -11
  155. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  156. package/lib/esm/imodel-components-react/color/Swatch.d.ts +2 -0
  157. package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
  158. package/lib/esm/imodel-components-react/color/Swatch.js +2 -0
  159. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  160. package/lib/esm/imodel-components-react/editors/ColorEditor.js +3 -2
  161. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  162. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  163. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  164. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  165. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +5 -4
  166. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  167. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +5 -5
  168. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  169. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +3 -3
  170. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  171. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +10 -5
  172. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  173. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  174. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +3 -3
  175. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  176. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +1 -1
  177. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  178. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +5 -4
  179. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  180. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  181. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +7 -8
  182. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  183. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  184. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +10 -10
  185. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  186. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  187. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +15 -14
  188. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  189. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  190. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +13 -9
  191. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  192. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  193. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +22 -29
  194. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  195. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  196. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +18 -17
  197. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  198. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  199. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +7 -6
  200. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  201. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  202. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +14 -13
  203. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  204. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  205. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +7 -6
  206. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  207. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  208. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +9 -8
  209. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  210. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  211. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +23 -22
  212. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  213. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  214. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +7 -6
  215. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  216. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  217. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +15 -14
  218. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  219. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  220. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +6 -6
  221. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  222. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +2 -2
  223. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  224. package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts +12 -0
  225. package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts.map +1 -0
  226. package/lib/esm/imodel-components-react/timeline/PlayButton.js +23 -0
  227. package/lib/esm/imodel-components-react/timeline/PlayButton.js.map +1 -0
  228. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +0 -1
  229. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  230. package/lib/esm/imodel-components-react/timeline/Scrubber.js +1 -1
  231. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  232. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +2 -20
  233. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  234. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +112 -203
  235. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  236. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +25 -333
  237. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +33 -67
  238. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  239. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +228 -329
  240. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  241. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +27 -140
  242. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +2 -2
  243. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  244. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  245. package/lib/esm/imodel-components-react/useTranslation.d.ts +10 -0
  246. package/lib/esm/imodel-components-react/useTranslation.d.ts.map +1 -0
  247. package/lib/esm/imodel-components-react/useTranslation.js +16 -0
  248. package/lib/esm/imodel-components-react/useTranslation.js.map +1 -0
  249. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  250. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +13 -8
  251. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  252. package/lib/esm/imodel-components-react.d.ts +0 -1
  253. package/lib/esm/imodel-components-react.d.ts.map +1 -1
  254. package/lib/esm/imodel-components-react.js +0 -1
  255. package/lib/esm/imodel-components-react.js.map +1 -1
  256. package/lib/public/locales/en/UiIModelComponents.json +14 -3
  257. package/package.json +20 -20
  258. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +0 -34
  259. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +0 -1
  260. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +0 -100
  261. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +0 -1
  262. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +0 -28
  263. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +0 -34
  264. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +0 -1
  265. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +0 -69
  266. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +0 -1
  267. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +0 -28
@@ -34,84 +34,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34
34
  };
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.SolarTimeline = void 0;
37
- // component is in alpha state - it may change after usability testing - test coverage not complete
38
- /* istanbul ignore file */
39
37
  require("./SolarTimeline.scss");
40
38
  const classnames_1 = __importDefault(require("classnames"));
41
39
  const React = __importStar(require("react"));
42
- const itwinui_react_1 = require("@itwin/itwinui-react");
43
40
  const core_common_1 = require("@itwin/core-common");
44
- const appui_abstract_1 = require("@itwin/appui-abstract");
45
- const core_react_1 = require("@itwin/core-react");
46
41
  const components_react_1 = require("@itwin/components-react");
47
- const HueSlider_1 = require("../color/HueSlider");
48
- const SaturationPicker_1 = require("../color/SaturationPicker");
49
- const Swatch_1 = require("../color/Swatch");
50
- const PlayerButton_1 = require("./PlayerButton");
51
- const SpeedTimeline_1 = require("./SpeedTimeline");
52
- const Scrubber_1 = require("./Scrubber");
53
- const UiIModelComponents_1 = require("../UiIModelComponents");
42
+ const itwinui_react_1 = require("@itwin/itwinui-react");
54
43
  const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
55
- // cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs
56
- const millisecPerMinute = 1000 * 60;
57
- const millisecPerHour = millisecPerMinute * 60;
58
- // const millisecPerDay = millisecPerHour * 24;
59
- const defaultPlaybackDuration = 40 * 1000; // 40 seconds
60
- const addZero = (i) => {
61
- return i < 10 ? `0${i}` : i;
62
- };
44
+ const UiIModelComponents_1 = require("../UiIModelComponents");
45
+ const PlayButton_1 = require("./PlayButton");
46
+ const useTranslation_1 = require("../useTranslation");
47
+ const msPerMinute = 1000 * 60;
48
+ const msPerHour = msPerMinute * 60;
49
+ const defaultPlaybackDuration = 40 * 1000;
50
+ const offset = 6;
63
51
  function Timeline(props) {
64
- const [sliderContainer, setSliderContainer] = React.useState(null);
65
- const [pointerPercent, setPointerPercent] = React.useState(0);
66
- const tooltipProps = React.useCallback(() => {
67
- return { visible: false };
68
- }, []);
69
- const [showRailTooltip, setShowRailTooltip] = React.useState(false);
70
- const handlePointerEnter = React.useCallback(() => {
71
- setShowRailTooltip(true);
72
- }, []);
73
- const handlePointerLeave = React.useCallback(() => {
74
- setShowRailTooltip(false);
75
- }, []);
76
- const handlePointerMove = React.useCallback((event) => {
77
- sliderContainer &&
78
- setPointerPercent((0, Scrubber_1.getPercentageOfRectangle)(sliderContainer.getBoundingClientRect(), event.clientX));
79
- }, [sliderContainer]);
80
- const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, isPlaying, } = props;
81
- const thumbHasFocus = (0, Scrubber_1.useFocusedThumb)(sliderContainer ?? undefined);
82
- const tickLabel = React.useMemo(() => {
83
- const showTip = isPlaying || showRailTooltip || thumbHasFocus;
84
- const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;
85
- const percent = isPlaying || thumbHasFocus
86
- ? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration
87
- : pointerPercent;
88
- const tooltipText = formatTime(isPlaying || thumbHasFocus
89
- ? dayStartMs + currentTimeOffsetMs
90
- : dayStartMs + (sunRiseOffsetMs + pointerPercent * totalDuration));
91
- return (React.createElement(Scrubber_1.RailMarkers, { showToolTip: showTip, percent: percent, tooltipText: tooltipText }));
92
- }, [
93
- isPlaying,
94
- showRailTooltip,
95
- thumbHasFocus,
96
- sunSetOffsetMs,
97
- sunRiseOffsetMs,
98
- currentTimeOffsetMs,
99
- pointerPercent,
100
- formatTime,
101
- dayStartMs,
102
- ]);
52
+ const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, } = props;
53
+ const tooltipContent = formatTime(dayStartMs + currentTimeOffsetMs);
103
54
  const className = (0, classnames_1.default)("solar-timeline", props.className, formatTick && "showticks");
104
- const sunRiseFormat = formatTime(dayStartMs + sunRiseOffsetMs);
105
- const sunSetFormat = formatTime(dayStartMs + sunSetOffsetMs);
55
+ const sunRiseStr = formatTime(dayStartMs + sunRiseOffsetMs);
56
+ const sunSetStr = formatTime(dayStartMs + sunSetOffsetMs);
106
57
  return (React.createElement("div", { className: className },
107
- React.createElement(itwinui_react_1.Tooltip, { content: sunRiseFormat },
108
- React.createElement("span", { className: "sunrise" }, "\u2600")),
109
- React.createElement(itwinui_react_1.Slider, { ref: setSliderContainer, className: "solar-slider", step: millisecPerMinute, min: sunRiseOffsetMs, max: sunSetOffsetMs, minLabel: "", maxLabel: "", onUpdate: onUpdate, onChange: onChange, values: [currentTimeOffsetMs], tooltipProps: tooltipProps, thumbProps: () => ({
110
- className: "components-timeline-thumb",
111
- children: React.createElement(Scrubber_1.CustomThumb, null),
112
- }), tickLabels: tickLabel, onPointerEnter: handlePointerEnter, onPointerMove: handlePointerMove, onPointerLeave: handlePointerLeave }),
113
- React.createElement(itwinui_react_1.Tooltip, { content: sunSetFormat },
114
- React.createElement("span", { className: "sunset" }, "\u263D"))));
58
+ React.createElement(itwinui_react_1.VisuallyHidden, null, "Solar timeline"),
59
+ React.createElement(itwinui_react_1.Slider, { thumbProps: () => ({ "aria-labelledby": "timeline" }), step: msPerMinute, min: sunRiseOffsetMs, max: sunSetOffsetMs, minLabel: React.createElement(itwinui_react_1.Tooltip, { content: sunRiseStr },
60
+ React.createElement(itwinui_react_1.Icon, null,
61
+ React.createElement(itwinui_icons_react_1.SvgSun, null))), maxLabel: React.createElement(itwinui_react_1.Tooltip, { content: sunSetStr },
62
+ React.createElement(itwinui_react_1.Icon, null,
63
+ React.createElement(itwinui_icons_react_1.SvgMoon, null))), onUpdate: onUpdate, onChange: onChange, values: [currentTimeOffsetMs], tooltipProps: () => ({
64
+ content: tooltipContent,
65
+ }) })));
115
66
  }
116
67
  /** Solar Timeline
117
68
  * @alpha
@@ -119,35 +70,10 @@ function Timeline(props) {
119
70
  class SolarTimeline extends React.PureComponent {
120
71
  constructor(props) {
121
72
  super(props);
122
- this._datePicker = null;
123
- this._settings = null;
124
73
  this._requestFrame = 0;
125
74
  this._unmounted = false;
126
75
  this._timeLastCycle = 0;
127
76
  this._totalPlayTime = 0;
128
- this._settingsPopupTitle = UiIModelComponents_1.UiIModelComponents.translate("solarsettings.shadowcolor");
129
- this._playLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.play");
130
- this._settingLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.settings");
131
- this._loopLabel = UiIModelComponents_1.UiIModelComponents.translate("timeline.repeat");
132
- this._speedLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.speed");
133
- this._dateTimeLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.dateTime");
134
- this._months = [
135
- components_react_1.UiComponents.translate("month.short.january"),
136
- components_react_1.UiComponents.translate("month.short.february"),
137
- components_react_1.UiComponents.translate("month.short.march"),
138
- components_react_1.UiComponents.translate("month.short.april"),
139
- components_react_1.UiComponents.translate("month.short.may"),
140
- components_react_1.UiComponents.translate("month.short.june"),
141
- components_react_1.UiComponents.translate("month.short.july"),
142
- components_react_1.UiComponents.translate("month.short.august"),
143
- components_react_1.UiComponents.translate("month.short.september"),
144
- components_react_1.UiComponents.translate("month.short.october"),
145
- components_react_1.UiComponents.translate("month.short.november"),
146
- components_react_1.UiComponents.translate("month.short.december"),
147
- ];
148
- this._timeLabel = components_react_1.UiComponents.translate("datepicker.time");
149
- this._amLabel = components_react_1.UiComponents.translate("time.am");
150
- this._pmLabel = components_react_1.UiComponents.translate("time.pm");
151
77
  this._presetColors = [
152
78
  core_common_1.ColorDef.create(core_common_1.ColorByName.grey),
153
79
  core_common_1.ColorDef.create(core_common_1.ColorByName.lightGrey),
@@ -158,9 +84,9 @@ class SolarTimeline extends React.PureComponent {
158
84
  core_common_1.ColorDef.create(core_common_1.ColorByName.tan),
159
85
  core_common_1.ColorDef.create(core_common_1.ColorByName.darkBrown),
160
86
  ];
87
+ this._speeds = [1, 2, 3, 4, 5, 6];
161
88
  // recursively update the animation until we hit the end or the pause button is clicked
162
89
  this._updateAnimation = (_timestamp) => {
163
- // istanbul ignore else
164
90
  if (!this.state.isPlaying || this._unmounted) {
165
91
  window.cancelAnimationFrame(this._requestFrame);
166
92
  return;
@@ -196,7 +122,6 @@ class SolarTimeline extends React.PureComponent {
196
122
  };
197
123
  // user clicked pause button
198
124
  this._onPause = () => {
199
- // istanbul ignore if
200
125
  if (!this.state.isPlaying)
201
126
  return;
202
127
  const currentTime = new Date().getTime();
@@ -205,13 +130,11 @@ class SolarTimeline extends React.PureComponent {
205
130
  window.cancelAnimationFrame(this._requestFrame);
206
131
  // stop playing
207
132
  this.setState({ isPlaying: false });
208
- // istanbul ignore else
209
133
  if (this.props.onPlayPause)
210
134
  this.props.onPlayPause(false);
211
135
  };
212
136
  // user clicked play button
213
137
  this._onPlay = () => {
214
- // istanbul ignore if
215
138
  if (this.state.isPlaying)
216
139
  return;
217
140
  if (this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs ||
@@ -223,52 +146,34 @@ class SolarTimeline extends React.PureComponent {
223
146
  this._play(this.state.currentTimeOffsetMs);
224
147
  }
225
148
  };
226
- /** note the day passed in is in the time of the current user not in project time because the date picker works in
227
- * local time */
228
- this._onDayClick = (day) => {
229
- const selectedDate = new Date(day.getTime() + this.state.currentTimeOffsetMs);
230
- this.props.dataProvider.setDateAndTime(selectedDate);
149
+ this._onDateChange = (newDate) => {
150
+ var _a, _b;
151
+ this.props.dataProvider.setDateAndTime(newDate);
231
152
  const dayStartMs = this.props.dataProvider.dayStartMs;
232
153
  const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
233
154
  const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;
234
155
  const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;
235
- const sunOffsetMs = this.ensureRange(this.state.currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);
236
- this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);
237
156
  /** call dataProvider to update display style */
238
- if (this.props.dataProvider.onTimeChanged)
239
- this.props.dataProvider.onTimeChanged(this.props.dataProvider.timeOfDay);
157
+ // this.props.dataProvider.onTimeChanged?.(this.props.dataProvider.timeOfDay);
158
+ // Update time
159
+ const newHours = newDate.getHours();
160
+ const newMinutes = newDate.getMinutes();
161
+ const newSunTime = newHours * msPerHour + newMinutes * msPerMinute;
162
+ const dateWithNewTime = new Date(dayStartMs + newSunTime);
163
+ // this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
164
+ const currentTimeOffsetMs = this.ensureRange(newSunTime, sunRiseOffsetMs, sunSetOffsetMs);
165
+ this.setPlaybackTimeBySunTime(currentTimeOffsetMs, sunRiseOffsetMs, sunDeltaMs);
166
+ this._timeLastCycle = new Date().getTime();
167
+ (_b = (_a = this.props.dataProvider).onTimeChanged) === null || _b === void 0 ? void 0 : _b.call(_a, dateWithNewTime);
240
168
  this.setState({
241
169
  dayStartMs,
242
170
  sunRiseOffsetMs,
243
171
  sunSetOffsetMs,
244
- currentTimeOffsetMs: sunOffsetMs,
172
+ currentTimeOffsetMs,
245
173
  sunDeltaMs,
246
174
  isDateOpened: false,
247
- }, () => {
248
- this._timeLastCycle = new Date().getTime();
249
175
  });
250
176
  };
251
- this._onTimeChanged = (time) => {
252
- // compute the current date (with time)
253
- const dayStartMs = this.props.dataProvider.dayStartMs;
254
- const sunTime = time.hours * millisecPerHour + time.minutes * millisecPerMinute;
255
- const dateWithNewTime = new Date(dayStartMs + sunTime);
256
- this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
257
- // notify the provider to update style
258
- if (this.props.dataProvider.onTimeChanged)
259
- this.props.dataProvider.onTimeChanged(dateWithNewTime);
260
- const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);
261
- this.setPlaybackTimeBySunTime(currentTimeOffsetMs, this.state.sunRiseOffsetMs, this.state.sunDeltaMs);
262
- this._timeLastCycle = new Date().getTime();
263
- // update the timeline
264
- this.setState({ currentTimeOffsetMs });
265
- };
266
- this._onCloseDayPicker = () => {
267
- this.setState({ isDateOpened: false });
268
- };
269
- this._onOpenDayPicker = () => {
270
- this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));
271
- };
272
177
  this._onCloseSettingsPopup = () => {
273
178
  this.setState({ isSettingsOpened: false });
274
179
  };
@@ -292,25 +197,23 @@ class SolarTimeline extends React.PureComponent {
292
197
  this._onToggleLoop = () => {
293
198
  this.setState((prevState) => ({ loop: !prevState.loop }));
294
199
  };
295
- this._formatTime = (millisec) => {
296
- const date = new Date(millisec);
200
+ this._formatTime = (ms) => {
201
+ const date = new Date(ms);
202
+ const amLabel = components_react_1.UiComponents.translate("time.am");
203
+ const pmLabel = components_react_1.UiComponents.translate("time.pm");
297
204
  // convert project date to browser locale date
298
205
  const localTime = (0, components_react_1.adjustDateToTimezone)(date, this.props.dataProvider.timeZoneOffset * 60);
299
206
  let hours = localTime.getHours();
300
- const minutes = addZero(date.getMinutes());
301
- const abbrev = hours < 12 ? this._amLabel : hours === 24 ? this._amLabel : this._pmLabel;
207
+ const minutes = date.getMinutes();
208
+ const abbrev = hours < 12 ? amLabel : hours === 24 ? amLabel : pmLabel;
302
209
  hours = hours > 12 ? hours - 12 : hours;
303
- return `${hours}:${minutes} ${abbrev}`;
304
- };
305
- this._onPresetColorPick = (shadowColor) => {
306
- this.setState({ shadowColor }, () => (this.props.dataProvider.shadowColor = shadowColor));
307
- };
308
- this._handleHueOrSaturationChange = (hueOrSaturation) => {
309
- if (hueOrSaturation.s === 0)
310
- // for a ColorDef to be created from hsv s can't be 0
311
- hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);
312
- const shadowColor = hueOrSaturation.toColorDef();
313
- this.setState({ shadowColor }, () => (this.props.dataProvider.shadowColor = shadowColor));
210
+ const hoursStr = hours.toLocaleString(undefined, {
211
+ minimumIntegerDigits: 2,
212
+ });
213
+ const minutesStr = minutes.toLocaleString(undefined, {
214
+ minimumIntegerDigits: 2,
215
+ });
216
+ return `${hoursStr}:${minutesStr} ${abbrev}`;
314
217
  };
315
218
  const dayStartMs = this.props.dataProvider.dayStartMs;
316
219
  const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
@@ -350,7 +253,6 @@ class SolarTimeline extends React.PureComponent {
350
253
  // start playing
351
254
  this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {
352
255
  this._requestFrame = window.requestAnimationFrame(this._updateAnimation);
353
- // istanbul ignore else
354
256
  if (this.props.onPlayPause)
355
257
  this.props.onPlayPause(true);
356
258
  });
@@ -386,65 +288,72 @@ class SolarTimeline extends React.PureComponent {
386
288
  }
387
289
  render() {
388
290
  const { dataProvider } = this.props;
389
- const { speed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
291
+ const { speed: currentSpeed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
292
+ const months = [
293
+ components_react_1.UiComponents.translate("month.short.january"),
294
+ components_react_1.UiComponents.translate("month.short.february"),
295
+ components_react_1.UiComponents.translate("month.short.march"),
296
+ components_react_1.UiComponents.translate("month.short.april"),
297
+ components_react_1.UiComponents.translate("month.short.may"),
298
+ components_react_1.UiComponents.translate("month.short.june"),
299
+ components_react_1.UiComponents.translate("month.short.july"),
300
+ components_react_1.UiComponents.translate("month.short.august"),
301
+ components_react_1.UiComponents.translate("month.short.september"),
302
+ components_react_1.UiComponents.translate("month.short.october"),
303
+ components_react_1.UiComponents.translate("month.short.november"),
304
+ components_react_1.UiComponents.translate("month.short.december"),
305
+ ];
390
306
  const localTime = this.getLocalTime(this.state.dayStartMs + this.state.currentTimeOffsetMs);
391
307
  const formattedTime = this._formatTime(dataProvider.dayStartMs + currentTimeOffsetMs);
392
- const formattedDate = `${this._months[localTime.getMonth()]}, ${localTime.getDate()}`;
393
- const colorSwatchStyle = {
394
- width: `100%`,
395
- height: `100%`,
396
- };
308
+ const formattedDate = `${months[localTime.getMonth()]}, ${localTime.getDate()}`;
397
309
  return (React.createElement("div", { className: "solar-timeline-wrapper" },
398
- React.createElement("div", { className: "header" },
399
- React.createElement(PlayerButton_1.PlayButton, { tooltip: this._playLabel, className: "play-button", isPlaying: this.state.isPlaying, onPlay: this._onPlay, onPause: this._onPause }),
400
- React.createElement("button", { "data-testid": "solar-date-time-button", title: this._dateTimeLabel, className: "current-date", ref: (element) => (this._datePicker = element), onClick: this._onOpenDayPicker },
401
- React.createElement("span", null, formattedDate),
402
- React.createElement("span", null, "/"),
403
- React.createElement("span", null, formattedTime),
404
- React.createElement("span", { className: "icon" },
405
- React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgCalendar, null) }))),
406
- React.createElement(core_react_1.Popup, { style: { border: "none" }, offset: 11, target: this._datePicker, isOpen: this.state.isDateOpened, onClose: this._onCloseDayPicker, position: appui_abstract_1.RelativePosition.Top },
407
- React.createElement("div", { className: "components-date-picker-calendar-popup-panel", "data-testid": "components-date-picker-calendar-popup-panel" },
408
- React.createElement(components_react_1.DatePicker, { selected: localTime, onDateChange: this._onDayClick, showFocusOutline: false }),
409
- React.createElement("div", { className: "time-container" },
410
- React.createElement(itwinui_react_1.Text, { variant: "body", className: "time-label" }, this._timeLabel),
411
- React.createElement(components_react_1.TimeField, { time: {
412
- hours: localTime.getHours(),
413
- minutes: localTime.getMinutes(),
414
- seconds: 0,
415
- }, timeDisplay: appui_abstract_1.TimeDisplay.H12MC, onTimeChange: this._onTimeChanged })))),
416
- React.createElement(Timeline, { dayStartMs: dataProvider.dayStartMs, sunSetOffsetMs: sunSetOffsetMs, sunRiseOffsetMs: sunRiseOffsetMs, currentTimeOffsetMs: currentTimeOffsetMs, onChange: this._onChange, onUpdate: this._onUpdate, formatTime: this._formatTime, isPlaying: this.state.isPlaying }),
417
- React.createElement("div", { className: "speed-container" },
418
- React.createElement("span", { title: this._speedLabel },
419
- speed,
420
- "x"),
421
- React.createElement(SpeedTimeline_1.SpeedTimeline, { className: "speed", onChange: this._onSpeedChange, speed: this.state.speed })),
422
- React.createElement("span", { title: this._loopLabel, className: (0, classnames_1.default)("icon", !loop && "no-loop-playback", loop && "loop-playback"), onClick: this._onToggleLoop, role: "button", tabIndex: -1 },
423
- React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgLoop, null) })),
424
- React.createElement("button", { "data-testid": "shadow-settings-button", title: this._settingLabel, className: "shadow-settings-button", ref: (element) => (this._settings = element), onClick: this._onOpenSettingsPopup },
425
- React.createElement("span", { className: "icon" },
426
- React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgSettings, null) }))),
427
- React.createElement(core_react_1.Popup, { className: "shadow-settings-popup", target: this._settings, offset: 11, isOpen: this.state.isSettingsOpened, onClose: this._onCloseSettingsPopup, position: appui_abstract_1.RelativePosition.Top },
428
- React.createElement("div", { className: "shadow-settings-popup-container" },
429
- React.createElement("div", { className: "shadow-settings-header" }, this._settingsPopupTitle),
430
- React.createElement("div", { className: "shadow-settings-color" },
431
- React.createElement("div", { className: "shadow-settings-color-top" },
432
- React.createElement(SaturationPicker_1.SaturationPicker, { hsv: this.state.shadowColor.toHSV(), onSaturationChange: this._handleHueOrSaturationChange })),
433
- React.createElement("div", { className: "shadow-settings-color-bottom" },
434
- React.createElement("div", { className: "shadow-settings-color-bottom-left" },
435
- React.createElement(HueSlider_1.HueSlider, { hsv: this.state.shadowColor.toHSV(), onHueChange: this._handleHueOrSaturationChange, isHorizontal: true })),
436
- React.createElement("div", { className: "shadow-settings-color-bottom-right" },
437
- React.createElement(Swatch_1.ColorSwatch, { style: colorSwatchStyle, colorDef: this.state.shadowColor, round: false })))),
438
- React.createElement("div", { className: "shadow-settings-color-presets" },
439
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[0], round: false, onColorPick: this._onPresetColorPick }),
440
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[1], round: false, onColorPick: this._onPresetColorPick }),
441
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[2], round: false, onColorPick: this._onPresetColorPick }),
442
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[3], round: false, onColorPick: this._onPresetColorPick }),
443
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[4], round: false, onColorPick: this._onPresetColorPick }),
444
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[5], round: false, onColorPick: this._onPresetColorPick }),
445
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[6], round: false, onColorPick: this._onPresetColorPick }),
446
- React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[7], round: false, onColorPick: this._onPresetColorPick })))))));
310
+ React.createElement(itwinui_react_1.Flex, { flexWrap: "wrap", gap: "none", className: "solar-timeline-start" },
311
+ React.createElement(PlayButton_1.PlayButton, { isPlaying: this.state.isPlaying, onPlay: this._onPlay, onPause: this._onPause }),
312
+ React.createElement(itwinui_react_1.Popover, { content: React.createElement(itwinui_react_1.DatePicker, { date: localTime, onChange: this._onDateChange, showTime: true, use12Hours: true }), visible: this.state.isDateOpened, onVisibleChange: (isDateOpened) => {
313
+ this.setState({ isDateOpened });
314
+ }, placement: "top", middleware: {
315
+ offset,
316
+ } },
317
+ React.createElement(CalendarButton, { onClick: () => {
318
+ const isDateOpened = !this.state.isDateOpened;
319
+ this.setState({ isDateOpened });
320
+ } },
321
+ formattedDate,
322
+ " @ ",
323
+ formattedTime))),
324
+ React.createElement(Timeline, { dayStartMs: dataProvider.dayStartMs, sunSetOffsetMs: sunSetOffsetMs, sunRiseOffsetMs: sunRiseOffsetMs, currentTimeOffsetMs: currentTimeOffsetMs, onChange: this._onChange, onUpdate: this._onUpdate, formatTime: this._formatTime, isPlaying: this.state.isPlaying }),
325
+ React.createElement(itwinui_react_1.Flex, { justifyContent: "flex-end", flexWrap: "wrap", gap: "none", className: "solar-timeline-end" },
326
+ React.createElement(itwinui_react_1.VisuallyHidden, null,
327
+ React.createElement(itwinui_react_1.Label, { htmlFor: "speed" }, "Timeline speed")),
328
+ React.createElement(itwinui_react_1.Tooltip, { content: UiIModelComponents_1.UiIModelComponents.translate("solartimeline.speed") },
329
+ React.createElement(itwinui_react_1.Select, { native: true, styleType: "borderless", triggerProps: {
330
+ name: "speed",
331
+ }, onChange: (newValue) => this._onSpeedChange(Number(newValue)), value: currentSpeed.toString(), options: this._speeds.map((speed) => ({
332
+ value: speed.toString(),
333
+ label: `${speed}x`,
334
+ })) })),
335
+ React.createElement(itwinui_react_1.IconButton, { styleType: "borderless", label: UiIModelComponents_1.UiIModelComponents.translate("timeline.repeat"), onClick: this._onToggleLoop, isActive: loop },
336
+ React.createElement(itwinui_icons_react_1.SvgLoop, null)),
337
+ React.createElement(itwinui_react_1.Popover, { content: React.createElement(itwinui_react_1.ColorPicker, { selectedColor: this.state.shadowColor.colors, onChangeComplete: (color) => {
338
+ const colorDef = core_common_1.ColorDef.create(color.toTbgr());
339
+ this.setState({ shadowColor: colorDef }, () => (this.props.dataProvider.shadowColor = colorDef));
340
+ } },
341
+ React.createElement(itwinui_react_1.Text, { variant: "title", as: "h2", style: { textAlign: "center" } }, UiIModelComponents_1.UiIModelComponents.translate("solarsettings.shadowcolor")),
342
+ React.createElement(itwinui_react_1.ColorBuilder, null),
343
+ React.createElement(itwinui_react_1.ColorInputPanel, { defaultColorFormat: "hsl" }),
344
+ React.createElement(itwinui_react_1.ColorPalette, { colors: this._presetColors.map((color) => color.colors) })), placement: "top", middleware: {
345
+ offset,
346
+ } },
347
+ React.createElement(itwinui_react_1.IconButton, { styleType: "borderless", "data-testid": "shadow-settings-button", label: UiIModelComponents_1.UiIModelComponents.translate("solartimeline.settings"), onClick: this._onOpenSettingsPopup },
348
+ React.createElement(itwinui_icons_react_1.SvgSettings, null))))));
447
349
  }
448
350
  }
449
351
  exports.SolarTimeline = SolarTimeline;
352
+ const CalendarButton = React.forwardRef(function CalendarButton({ children, onClick }, ref) {
353
+ const { translate } = (0, useTranslation_1.useTranslation)();
354
+ const tooltip = translate("solartimeline.dateTime");
355
+ return (React.createElement(itwinui_react_1.Tooltip, { content: tooltip },
356
+ React.createElement(itwinui_react_1.Button, { styleType: "borderless", startIcon: React.createElement(itwinui_icons_react_1.SvgCalendar, null), "data-testid": "solar-date-time-button", title: tooltip, onClick: onClick, ref: ref },
357
+ React.createElement("span", { className: "solar-timeline-date-time" }, children))));
358
+ });
450
359
  //# sourceMappingURL=SolarTimeline.js.map