@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
@@ -5,84 +5,35 @@
5
5
  /** @packageDocumentation
6
6
  * @module Timeline
7
7
  */
8
- // component is in alpha state - it may change after usability testing - test coverage not complete
9
- /* istanbul ignore file */
10
8
  import "./SolarTimeline.scss";
11
9
  import classnames from "classnames";
12
10
  import * as React from "react";
13
- import { Slider, Text, Tooltip } from "@itwin/itwinui-react";
14
11
  import { ColorByName, ColorDef } from "@itwin/core-common";
15
- import { RelativePosition, TimeDisplay } from "@itwin/appui-abstract";
16
- import { Icon, Popup } from "@itwin/core-react";
17
- import { adjustDateToTimezone, DatePicker, TimeField, UiComponents, } from "@itwin/components-react";
18
- import { HueSlider } from "../color/HueSlider";
19
- import { SaturationPicker } from "../color/SaturationPicker";
20
- import { ColorSwatch } from "../color/Swatch";
21
- import { PlayButton } from "./PlayerButton";
22
- import { SpeedTimeline } from "./SpeedTimeline";
23
- import { CustomThumb, getPercentageOfRectangle, RailMarkers, useFocusedThumb, } from "./Scrubber";
12
+ import { adjustDateToTimezone, UiComponents } from "@itwin/components-react";
13
+ import { Button, ColorBuilder, ColorInputPanel, ColorPalette, ColorPicker, DatePicker, Flex, Icon, IconButton, Label, Popover, Select, Slider, Text, Tooltip, VisuallyHidden, } from "@itwin/itwinui-react";
14
+ import { SvgCalendar, SvgLoop, SvgMoon, SvgSettings, SvgSun, } from "@itwin/itwinui-icons-react";
24
15
  import { UiIModelComponents } from "../UiIModelComponents";
25
- import { SvgCalendar, SvgLoop, SvgSettings } from "@itwin/itwinui-icons-react";
26
- // cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs
27
- const millisecPerMinute = 1000 * 60;
28
- const millisecPerHour = millisecPerMinute * 60;
29
- // const millisecPerDay = millisecPerHour * 24;
30
- const defaultPlaybackDuration = 40 * 1000; // 40 seconds
31
- const addZero = (i) => {
32
- return i < 10 ? `0${i}` : i;
33
- };
16
+ import { PlayButton } from "./PlayButton";
17
+ import { useTranslation } from "../useTranslation";
18
+ const msPerMinute = 1000 * 60;
19
+ const msPerHour = msPerMinute * 60;
20
+ const defaultPlaybackDuration = 40 * 1000;
21
+ const offset = 6;
34
22
  function Timeline(props) {
35
- const [sliderContainer, setSliderContainer] = React.useState(null);
36
- const [pointerPercent, setPointerPercent] = React.useState(0);
37
- const tooltipProps = React.useCallback(() => {
38
- return { visible: false };
39
- }, []);
40
- const [showRailTooltip, setShowRailTooltip] = React.useState(false);
41
- const handlePointerEnter = React.useCallback(() => {
42
- setShowRailTooltip(true);
43
- }, []);
44
- const handlePointerLeave = React.useCallback(() => {
45
- setShowRailTooltip(false);
46
- }, []);
47
- const handlePointerMove = React.useCallback((event) => {
48
- sliderContainer &&
49
- setPointerPercent(getPercentageOfRectangle(sliderContainer.getBoundingClientRect(), event.clientX));
50
- }, [sliderContainer]);
51
- const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, isPlaying, } = props;
52
- const thumbHasFocus = useFocusedThumb(sliderContainer ?? undefined);
53
- const tickLabel = React.useMemo(() => {
54
- const showTip = isPlaying || showRailTooltip || thumbHasFocus;
55
- const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;
56
- const percent = isPlaying || thumbHasFocus
57
- ? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration
58
- : pointerPercent;
59
- const tooltipText = formatTime(isPlaying || thumbHasFocus
60
- ? dayStartMs + currentTimeOffsetMs
61
- : dayStartMs + (sunRiseOffsetMs + pointerPercent * totalDuration));
62
- return (React.createElement(RailMarkers, { showToolTip: showTip, percent: percent, tooltipText: tooltipText }));
63
- }, [
64
- isPlaying,
65
- showRailTooltip,
66
- thumbHasFocus,
67
- sunSetOffsetMs,
68
- sunRiseOffsetMs,
69
- currentTimeOffsetMs,
70
- pointerPercent,
71
- formatTime,
72
- dayStartMs,
73
- ]);
23
+ const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, } = props;
24
+ const tooltipContent = formatTime(dayStartMs + currentTimeOffsetMs);
74
25
  const className = classnames("solar-timeline", props.className, formatTick && "showticks");
75
- const sunRiseFormat = formatTime(dayStartMs + sunRiseOffsetMs);
76
- const sunSetFormat = formatTime(dayStartMs + sunSetOffsetMs);
26
+ const sunRiseStr = formatTime(dayStartMs + sunRiseOffsetMs);
27
+ const sunSetStr = formatTime(dayStartMs + sunSetOffsetMs);
77
28
  return (React.createElement("div", { className: className },
78
- React.createElement(Tooltip, { content: sunRiseFormat },
79
- React.createElement("span", { className: "sunrise" }, "\u2600")),
80
- React.createElement(Slider, { ref: setSliderContainer, className: "solar-slider", step: millisecPerMinute, min: sunRiseOffsetMs, max: sunSetOffsetMs, minLabel: "", maxLabel: "", onUpdate: onUpdate, onChange: onChange, values: [currentTimeOffsetMs], tooltipProps: tooltipProps, thumbProps: () => ({
81
- className: "components-timeline-thumb",
82
- children: React.createElement(CustomThumb, null),
83
- }), tickLabels: tickLabel, onPointerEnter: handlePointerEnter, onPointerMove: handlePointerMove, onPointerLeave: handlePointerLeave }),
84
- React.createElement(Tooltip, { content: sunSetFormat },
85
- React.createElement("span", { className: "sunset" }, "\u263D"))));
29
+ React.createElement(VisuallyHidden, null, "Solar timeline"),
30
+ React.createElement(Slider, { thumbProps: () => ({ "aria-labelledby": "timeline" }), step: msPerMinute, min: sunRiseOffsetMs, max: sunSetOffsetMs, minLabel: React.createElement(Tooltip, { content: sunRiseStr },
31
+ React.createElement(Icon, null,
32
+ React.createElement(SvgSun, null))), maxLabel: React.createElement(Tooltip, { content: sunSetStr },
33
+ React.createElement(Icon, null,
34
+ React.createElement(SvgMoon, null))), onUpdate: onUpdate, onChange: onChange, values: [currentTimeOffsetMs], tooltipProps: () => ({
35
+ content: tooltipContent,
36
+ }) })));
86
37
  }
87
38
  /** Solar Timeline
88
39
  * @alpha
@@ -90,35 +41,10 @@ function Timeline(props) {
90
41
  export class SolarTimeline extends React.PureComponent {
91
42
  constructor(props) {
92
43
  super(props);
93
- this._datePicker = null;
94
- this._settings = null;
95
44
  this._requestFrame = 0;
96
45
  this._unmounted = false;
97
46
  this._timeLastCycle = 0;
98
47
  this._totalPlayTime = 0;
99
- this._settingsPopupTitle = UiIModelComponents.translate("solarsettings.shadowcolor");
100
- this._playLabel = UiIModelComponents.translate("solartimeline.play");
101
- this._settingLabel = UiIModelComponents.translate("solartimeline.settings");
102
- this._loopLabel = UiIModelComponents.translate("timeline.repeat");
103
- this._speedLabel = UiIModelComponents.translate("solartimeline.speed");
104
- this._dateTimeLabel = UiIModelComponents.translate("solartimeline.dateTime");
105
- this._months = [
106
- UiComponents.translate("month.short.january"),
107
- UiComponents.translate("month.short.february"),
108
- UiComponents.translate("month.short.march"),
109
- UiComponents.translate("month.short.april"),
110
- UiComponents.translate("month.short.may"),
111
- UiComponents.translate("month.short.june"),
112
- UiComponents.translate("month.short.july"),
113
- UiComponents.translate("month.short.august"),
114
- UiComponents.translate("month.short.september"),
115
- UiComponents.translate("month.short.october"),
116
- UiComponents.translate("month.short.november"),
117
- UiComponents.translate("month.short.december"),
118
- ];
119
- this._timeLabel = UiComponents.translate("datepicker.time");
120
- this._amLabel = UiComponents.translate("time.am");
121
- this._pmLabel = UiComponents.translate("time.pm");
122
48
  this._presetColors = [
123
49
  ColorDef.create(ColorByName.grey),
124
50
  ColorDef.create(ColorByName.lightGrey),
@@ -129,9 +55,9 @@ export class SolarTimeline extends React.PureComponent {
129
55
  ColorDef.create(ColorByName.tan),
130
56
  ColorDef.create(ColorByName.darkBrown),
131
57
  ];
58
+ this._speeds = [1, 2, 3, 4, 5, 6];
132
59
  // recursively update the animation until we hit the end or the pause button is clicked
133
60
  this._updateAnimation = (_timestamp) => {
134
- // istanbul ignore else
135
61
  if (!this.state.isPlaying || this._unmounted) {
136
62
  window.cancelAnimationFrame(this._requestFrame);
137
63
  return;
@@ -167,7 +93,6 @@ export class SolarTimeline extends React.PureComponent {
167
93
  };
168
94
  // user clicked pause button
169
95
  this._onPause = () => {
170
- // istanbul ignore if
171
96
  if (!this.state.isPlaying)
172
97
  return;
173
98
  const currentTime = new Date().getTime();
@@ -176,13 +101,11 @@ export class SolarTimeline extends React.PureComponent {
176
101
  window.cancelAnimationFrame(this._requestFrame);
177
102
  // stop playing
178
103
  this.setState({ isPlaying: false });
179
- // istanbul ignore else
180
104
  if (this.props.onPlayPause)
181
105
  this.props.onPlayPause(false);
182
106
  };
183
107
  // user clicked play button
184
108
  this._onPlay = () => {
185
- // istanbul ignore if
186
109
  if (this.state.isPlaying)
187
110
  return;
188
111
  if (this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs ||
@@ -194,52 +117,34 @@ export class SolarTimeline extends React.PureComponent {
194
117
  this._play(this.state.currentTimeOffsetMs);
195
118
  }
196
119
  };
197
- /** note the day passed in is in the time of the current user not in project time because the date picker works in
198
- * local time */
199
- this._onDayClick = (day) => {
200
- const selectedDate = new Date(day.getTime() + this.state.currentTimeOffsetMs);
201
- this.props.dataProvider.setDateAndTime(selectedDate);
120
+ this._onDateChange = (newDate) => {
121
+ var _a, _b;
122
+ this.props.dataProvider.setDateAndTime(newDate);
202
123
  const dayStartMs = this.props.dataProvider.dayStartMs;
203
124
  const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
204
125
  const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;
205
126
  const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;
206
- const sunOffsetMs = this.ensureRange(this.state.currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);
207
- this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);
208
127
  /** call dataProvider to update display style */
209
- if (this.props.dataProvider.onTimeChanged)
210
- this.props.dataProvider.onTimeChanged(this.props.dataProvider.timeOfDay);
128
+ // this.props.dataProvider.onTimeChanged?.(this.props.dataProvider.timeOfDay);
129
+ // Update time
130
+ const newHours = newDate.getHours();
131
+ const newMinutes = newDate.getMinutes();
132
+ const newSunTime = newHours * msPerHour + newMinutes * msPerMinute;
133
+ const dateWithNewTime = new Date(dayStartMs + newSunTime);
134
+ // this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
135
+ const currentTimeOffsetMs = this.ensureRange(newSunTime, sunRiseOffsetMs, sunSetOffsetMs);
136
+ this.setPlaybackTimeBySunTime(currentTimeOffsetMs, sunRiseOffsetMs, sunDeltaMs);
137
+ this._timeLastCycle = new Date().getTime();
138
+ (_b = (_a = this.props.dataProvider).onTimeChanged) === null || _b === void 0 ? void 0 : _b.call(_a, dateWithNewTime);
211
139
  this.setState({
212
140
  dayStartMs,
213
141
  sunRiseOffsetMs,
214
142
  sunSetOffsetMs,
215
- currentTimeOffsetMs: sunOffsetMs,
143
+ currentTimeOffsetMs,
216
144
  sunDeltaMs,
217
145
  isDateOpened: false,
218
- }, () => {
219
- this._timeLastCycle = new Date().getTime();
220
146
  });
221
147
  };
222
- this._onTimeChanged = (time) => {
223
- // compute the current date (with time)
224
- const dayStartMs = this.props.dataProvider.dayStartMs;
225
- const sunTime = time.hours * millisecPerHour + time.minutes * millisecPerMinute;
226
- const dateWithNewTime = new Date(dayStartMs + sunTime);
227
- this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
228
- // notify the provider to update style
229
- if (this.props.dataProvider.onTimeChanged)
230
- this.props.dataProvider.onTimeChanged(dateWithNewTime);
231
- const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);
232
- this.setPlaybackTimeBySunTime(currentTimeOffsetMs, this.state.sunRiseOffsetMs, this.state.sunDeltaMs);
233
- this._timeLastCycle = new Date().getTime();
234
- // update the timeline
235
- this.setState({ currentTimeOffsetMs });
236
- };
237
- this._onCloseDayPicker = () => {
238
- this.setState({ isDateOpened: false });
239
- };
240
- this._onOpenDayPicker = () => {
241
- this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));
242
- };
243
148
  this._onCloseSettingsPopup = () => {
244
149
  this.setState({ isSettingsOpened: false });
245
150
  };
@@ -263,25 +168,23 @@ export class SolarTimeline extends React.PureComponent {
263
168
  this._onToggleLoop = () => {
264
169
  this.setState((prevState) => ({ loop: !prevState.loop }));
265
170
  };
266
- this._formatTime = (millisec) => {
267
- const date = new Date(millisec);
171
+ this._formatTime = (ms) => {
172
+ const date = new Date(ms);
173
+ const amLabel = UiComponents.translate("time.am");
174
+ const pmLabel = UiComponents.translate("time.pm");
268
175
  // convert project date to browser locale date
269
176
  const localTime = adjustDateToTimezone(date, this.props.dataProvider.timeZoneOffset * 60);
270
177
  let hours = localTime.getHours();
271
- const minutes = addZero(date.getMinutes());
272
- const abbrev = hours < 12 ? this._amLabel : hours === 24 ? this._amLabel : this._pmLabel;
178
+ const minutes = date.getMinutes();
179
+ const abbrev = hours < 12 ? amLabel : hours === 24 ? amLabel : pmLabel;
273
180
  hours = hours > 12 ? hours - 12 : hours;
274
- return `${hours}:${minutes} ${abbrev}`;
275
- };
276
- this._onPresetColorPick = (shadowColor) => {
277
- this.setState({ shadowColor }, () => (this.props.dataProvider.shadowColor = shadowColor));
278
- };
279
- this._handleHueOrSaturationChange = (hueOrSaturation) => {
280
- if (hueOrSaturation.s === 0)
281
- // for a ColorDef to be created from hsv s can't be 0
282
- hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);
283
- const shadowColor = hueOrSaturation.toColorDef();
284
- this.setState({ shadowColor }, () => (this.props.dataProvider.shadowColor = shadowColor));
181
+ const hoursStr = hours.toLocaleString(undefined, {
182
+ minimumIntegerDigits: 2,
183
+ });
184
+ const minutesStr = minutes.toLocaleString(undefined, {
185
+ minimumIntegerDigits: 2,
186
+ });
187
+ return `${hoursStr}:${minutesStr} ${abbrev}`;
285
188
  };
286
189
  const dayStartMs = this.props.dataProvider.dayStartMs;
287
190
  const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
@@ -321,7 +224,6 @@ export class SolarTimeline extends React.PureComponent {
321
224
  // start playing
322
225
  this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {
323
226
  this._requestFrame = window.requestAnimationFrame(this._updateAnimation);
324
- // istanbul ignore else
325
227
  if (this.props.onPlayPause)
326
228
  this.props.onPlayPause(true);
327
229
  });
@@ -357,64 +259,71 @@ export class SolarTimeline extends React.PureComponent {
357
259
  }
358
260
  render() {
359
261
  const { dataProvider } = this.props;
360
- const { speed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
262
+ const { speed: currentSpeed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
263
+ const months = [
264
+ UiComponents.translate("month.short.january"),
265
+ UiComponents.translate("month.short.february"),
266
+ UiComponents.translate("month.short.march"),
267
+ UiComponents.translate("month.short.april"),
268
+ UiComponents.translate("month.short.may"),
269
+ UiComponents.translate("month.short.june"),
270
+ UiComponents.translate("month.short.july"),
271
+ UiComponents.translate("month.short.august"),
272
+ UiComponents.translate("month.short.september"),
273
+ UiComponents.translate("month.short.october"),
274
+ UiComponents.translate("month.short.november"),
275
+ UiComponents.translate("month.short.december"),
276
+ ];
361
277
  const localTime = this.getLocalTime(this.state.dayStartMs + this.state.currentTimeOffsetMs);
362
278
  const formattedTime = this._formatTime(dataProvider.dayStartMs + currentTimeOffsetMs);
363
- const formattedDate = `${this._months[localTime.getMonth()]}, ${localTime.getDate()}`;
364
- const colorSwatchStyle = {
365
- width: `100%`,
366
- height: `100%`,
367
- };
279
+ const formattedDate = `${months[localTime.getMonth()]}, ${localTime.getDate()}`;
368
280
  return (React.createElement("div", { className: "solar-timeline-wrapper" },
369
- React.createElement("div", { className: "header" },
370
- React.createElement(PlayButton, { tooltip: this._playLabel, className: "play-button", isPlaying: this.state.isPlaying, onPlay: this._onPlay, onPause: this._onPause }),
371
- React.createElement("button", { "data-testid": "solar-date-time-button", title: this._dateTimeLabel, className: "current-date", ref: (element) => (this._datePicker = element), onClick: this._onOpenDayPicker },
372
- React.createElement("span", null, formattedDate),
373
- React.createElement("span", null, "/"),
374
- React.createElement("span", null, formattedTime),
375
- React.createElement("span", { className: "icon" },
376
- React.createElement(Icon, { iconSpec: React.createElement(SvgCalendar, null) }))),
377
- React.createElement(Popup, { style: { border: "none" }, offset: 11, target: this._datePicker, isOpen: this.state.isDateOpened, onClose: this._onCloseDayPicker, position: RelativePosition.Top },
378
- React.createElement("div", { className: "components-date-picker-calendar-popup-panel", "data-testid": "components-date-picker-calendar-popup-panel" },
379
- React.createElement(DatePicker, { selected: localTime, onDateChange: this._onDayClick, showFocusOutline: false }),
380
- React.createElement("div", { className: "time-container" },
381
- React.createElement(Text, { variant: "body", className: "time-label" }, this._timeLabel),
382
- React.createElement(TimeField, { time: {
383
- hours: localTime.getHours(),
384
- minutes: localTime.getMinutes(),
385
- seconds: 0,
386
- }, timeDisplay: TimeDisplay.H12MC, onTimeChange: this._onTimeChanged })))),
387
- 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 }),
388
- React.createElement("div", { className: "speed-container" },
389
- React.createElement("span", { title: this._speedLabel },
390
- speed,
391
- "x"),
392
- React.createElement(SpeedTimeline, { className: "speed", onChange: this._onSpeedChange, speed: this.state.speed })),
393
- React.createElement("span", { title: this._loopLabel, className: classnames("icon", !loop && "no-loop-playback", loop && "loop-playback"), onClick: this._onToggleLoop, role: "button", tabIndex: -1 },
394
- React.createElement(Icon, { iconSpec: React.createElement(SvgLoop, null) })),
395
- React.createElement("button", { "data-testid": "shadow-settings-button", title: this._settingLabel, className: "shadow-settings-button", ref: (element) => (this._settings = element), onClick: this._onOpenSettingsPopup },
396
- React.createElement("span", { className: "icon" },
397
- React.createElement(Icon, { iconSpec: React.createElement(SvgSettings, null) }))),
398
- React.createElement(Popup, { className: "shadow-settings-popup", target: this._settings, offset: 11, isOpen: this.state.isSettingsOpened, onClose: this._onCloseSettingsPopup, position: RelativePosition.Top },
399
- React.createElement("div", { className: "shadow-settings-popup-container" },
400
- React.createElement("div", { className: "shadow-settings-header" }, this._settingsPopupTitle),
401
- React.createElement("div", { className: "shadow-settings-color" },
402
- React.createElement("div", { className: "shadow-settings-color-top" },
403
- React.createElement(SaturationPicker, { hsv: this.state.shadowColor.toHSV(), onSaturationChange: this._handleHueOrSaturationChange })),
404
- React.createElement("div", { className: "shadow-settings-color-bottom" },
405
- React.createElement("div", { className: "shadow-settings-color-bottom-left" },
406
- React.createElement(HueSlider, { hsv: this.state.shadowColor.toHSV(), onHueChange: this._handleHueOrSaturationChange, isHorizontal: true })),
407
- React.createElement("div", { className: "shadow-settings-color-bottom-right" },
408
- React.createElement(ColorSwatch, { style: colorSwatchStyle, colorDef: this.state.shadowColor, round: false })))),
409
- React.createElement("div", { className: "shadow-settings-color-presets" },
410
- React.createElement(ColorSwatch, { colorDef: this._presetColors[0], round: false, onColorPick: this._onPresetColorPick }),
411
- React.createElement(ColorSwatch, { colorDef: this._presetColors[1], round: false, onColorPick: this._onPresetColorPick }),
412
- React.createElement(ColorSwatch, { colorDef: this._presetColors[2], round: false, onColorPick: this._onPresetColorPick }),
413
- React.createElement(ColorSwatch, { colorDef: this._presetColors[3], round: false, onColorPick: this._onPresetColorPick }),
414
- React.createElement(ColorSwatch, { colorDef: this._presetColors[4], round: false, onColorPick: this._onPresetColorPick }),
415
- React.createElement(ColorSwatch, { colorDef: this._presetColors[5], round: false, onColorPick: this._onPresetColorPick }),
416
- React.createElement(ColorSwatch, { colorDef: this._presetColors[6], round: false, onColorPick: this._onPresetColorPick }),
417
- React.createElement(ColorSwatch, { colorDef: this._presetColors[7], round: false, onColorPick: this._onPresetColorPick })))))));
281
+ React.createElement(Flex, { flexWrap: "wrap", gap: "none", className: "solar-timeline-start" },
282
+ React.createElement(PlayButton, { isPlaying: this.state.isPlaying, onPlay: this._onPlay, onPause: this._onPause }),
283
+ React.createElement(Popover, { content: React.createElement(DatePicker, { date: localTime, onChange: this._onDateChange, showTime: true, use12Hours: true }), visible: this.state.isDateOpened, onVisibleChange: (isDateOpened) => {
284
+ this.setState({ isDateOpened });
285
+ }, placement: "top", middleware: {
286
+ offset,
287
+ } },
288
+ React.createElement(CalendarButton, { onClick: () => {
289
+ const isDateOpened = !this.state.isDateOpened;
290
+ this.setState({ isDateOpened });
291
+ } },
292
+ formattedDate,
293
+ " @ ",
294
+ formattedTime))),
295
+ 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 }),
296
+ React.createElement(Flex, { justifyContent: "flex-end", flexWrap: "wrap", gap: "none", className: "solar-timeline-end" },
297
+ React.createElement(VisuallyHidden, null,
298
+ React.createElement(Label, { htmlFor: "speed" }, "Timeline speed")),
299
+ React.createElement(Tooltip, { content: UiIModelComponents.translate("solartimeline.speed") },
300
+ React.createElement(Select, { native: true, styleType: "borderless", triggerProps: {
301
+ name: "speed",
302
+ }, onChange: (newValue) => this._onSpeedChange(Number(newValue)), value: currentSpeed.toString(), options: this._speeds.map((speed) => ({
303
+ value: speed.toString(),
304
+ label: `${speed}x`,
305
+ })) })),
306
+ React.createElement(IconButton, { styleType: "borderless", label: UiIModelComponents.translate("timeline.repeat"), onClick: this._onToggleLoop, isActive: loop },
307
+ React.createElement(SvgLoop, null)),
308
+ React.createElement(Popover, { content: React.createElement(ColorPicker, { selectedColor: this.state.shadowColor.colors, onChangeComplete: (color) => {
309
+ const colorDef = ColorDef.create(color.toTbgr());
310
+ this.setState({ shadowColor: colorDef }, () => (this.props.dataProvider.shadowColor = colorDef));
311
+ } },
312
+ React.createElement(Text, { variant: "title", as: "h2", style: { textAlign: "center" } }, UiIModelComponents.translate("solarsettings.shadowcolor")),
313
+ React.createElement(ColorBuilder, null),
314
+ React.createElement(ColorInputPanel, { defaultColorFormat: "hsl" }),
315
+ React.createElement(ColorPalette, { colors: this._presetColors.map((color) => color.colors) })), placement: "top", middleware: {
316
+ offset,
317
+ } },
318
+ React.createElement(IconButton, { styleType: "borderless", "data-testid": "shadow-settings-button", label: UiIModelComponents.translate("solartimeline.settings"), onClick: this._onOpenSettingsPopup },
319
+ React.createElement(SvgSettings, null))))));
418
320
  }
419
321
  }
322
+ const CalendarButton = React.forwardRef(function CalendarButton({ children, onClick }, ref) {
323
+ const { translate } = useTranslation();
324
+ const tooltip = translate("solartimeline.dateTime");
325
+ return (React.createElement(Tooltip, { content: tooltip },
326
+ React.createElement(Button, { styleType: "borderless", startIcon: React.createElement(SvgCalendar, null), "data-testid": "solar-date-time-button", title: tooltip, onClick: onClick, ref: ref },
327
+ React.createElement("span", { className: "solar-timeline-date-time" }, children))));
328
+ });
420
329
  //# sourceMappingURL=SolarTimeline.js.map