@itwin/imodel-components-react 3.7.0-dev.8 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +28 -28
  3. package/lib/cjs/imodel-components-react/UiIModelComponents.js +79 -79
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  5. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  6. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +186 -186
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
  9. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  10. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +107 -107
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  12. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +91 -91
  13. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  14. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +74 -74
  15. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  16. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
  17. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +145 -145
  18. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  19. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +93 -93
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  21. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +137 -137
  22. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  23. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +64 -64
  24. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
  25. package/lib/cjs/imodel-components-react/color/HueSlider.js +199 -199
  26. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
  28. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  29. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +213 -213
  30. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  31. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
  32. package/lib/cjs/imodel-components-react/color/Swatch.d.ts +22 -22
  33. package/lib/cjs/imodel-components-react/color/Swatch.js +60 -60
  34. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  35. package/lib/cjs/imodel-components-react/color/Swatch.scss +23 -23
  36. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  37. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +23 -23
  38. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  39. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  40. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +151 -151
  41. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
  43. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  44. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +160 -160
  45. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  46. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
  47. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  48. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +96 -96
  49. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  50. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  51. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +265 -265
  52. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  53. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
  54. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  55. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +85 -85
  56. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  57. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
  58. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  59. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +159 -159
  60. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  61. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +52 -52
  62. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  63. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +127 -127
  64. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  65. package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
  66. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +175 -175
  67. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +647 -647
  68. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  69. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +180 -180
  70. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  71. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +647 -647
  72. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  73. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +133 -133
  74. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  75. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +99 -99
  76. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  77. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +64 -64
  78. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  79. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +53 -53
  80. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  81. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  82. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +83 -83
  83. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  85. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +86 -86
  86. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  88. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +109 -109
  89. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  91. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +133 -133
  92. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  94. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +184 -184
  95. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  96. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  97. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +154 -154
  98. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  99. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  100. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +59 -59
  101. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  102. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  103. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +47 -47
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +54 -54
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +48 -48
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +50 -50
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +58 -58
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  117. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  118. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +47 -47
  119. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  120. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  121. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +56 -56
  122. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  123. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  124. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +95 -95
  125. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  126. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  127. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +119 -119
  128. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  129. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  130. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +143 -143
  131. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  132. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  133. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
  134. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  135. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  136. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +81 -81
  137. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  138. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
  139. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  140. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +91 -91
  141. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  142. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +25 -25
  143. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  144. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +191 -191
  145. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  146. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +106 -106
  147. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  148. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +424 -424
  149. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  150. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +357 -357
  151. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  152. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +54 -54
  153. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  154. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  155. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
  156. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +133 -133
  157. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +387 -387
  158. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  159. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +185 -185
  160. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +174 -174
  161. package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
  162. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  163. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  164. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +274 -274
  165. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  166. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  167. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
  168. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  169. package/lib/cjs/imodel-components-react.d.ts +82 -82
  170. package/lib/cjs/imodel-components-react.js +101 -101
  171. package/lib/cjs/imodel-components-react.js.map +1 -1
  172. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
  173. package/lib/esm/imodel-components-react/UiIModelComponents.js +75 -75
  174. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  175. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  176. package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
  177. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  178. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
  179. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  180. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +82 -82
  181. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  182. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +91 -91
  183. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  184. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
  185. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  186. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
  187. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +122 -122
  188. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  189. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +93 -93
  190. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  191. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +112 -112
  192. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  193. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +64 -64
  194. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
  195. package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
  196. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  197. package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
  198. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  199. package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
  200. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  201. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
  202. package/lib/esm/imodel-components-react/color/Swatch.d.ts +22 -22
  203. package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
  204. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  205. package/lib/esm/imodel-components-react/color/Swatch.scss +23 -23
  206. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  207. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
  208. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  209. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  210. package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
  211. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  212. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
  213. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  214. package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
  215. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  216. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
  217. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  218. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
  219. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  220. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  221. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +240 -240
  222. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  223. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
  224. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  225. package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
  226. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  227. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
  228. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  229. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +133 -133
  230. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  231. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +52 -52
  232. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  233. package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
  234. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  235. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  236. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +175 -175
  237. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +619 -619
  238. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  239. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +180 -180
  240. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  241. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +620 -620
  242. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  243. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +133 -133
  244. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  245. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
  246. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  247. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +64 -64
  248. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  249. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +30 -30
  250. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  251. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  252. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +60 -60
  253. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  254. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  255. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +63 -63
  256. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  257. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  258. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +83 -83
  259. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  260. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  261. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +110 -110
  262. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  263. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  264. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +158 -158
  265. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  266. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  267. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +131 -131
  268. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  269. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  270. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
  271. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  272. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  273. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
  274. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  275. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  276. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
  277. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  278. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  279. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
  280. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  281. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  282. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
  283. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  284. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  285. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
  286. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  287. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  288. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
  289. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  290. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  291. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
  292. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  293. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  294. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +69 -69
  295. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  296. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  297. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
  298. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  299. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  300. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +139 -139
  301. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  302. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  303. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
  304. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  305. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  306. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
  307. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  308. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
  309. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  310. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +64 -64
  311. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  312. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +25 -25
  313. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  314. package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
  315. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  316. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +106 -106
  317. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  318. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +398 -398
  319. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  320. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +357 -357
  321. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  322. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
  323. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  324. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  325. package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
  326. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +133 -133
  327. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +361 -361
  328. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  329. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +185 -185
  330. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +174 -174
  331. package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
  332. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  333. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  334. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +251 -251
  335. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  336. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  337. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +95 -95
  338. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  339. package/lib/esm/imodel-components-react.d.ts +82 -82
  340. package/lib/esm/imodel-components-react.js +87 -87
  341. package/lib/esm/imodel-components-react.js.map +1 -1
  342. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  343. package/package.json +19 -19
@@ -1,53 +1,53 @@
1
- /** @packageDocumentation
2
- * @module Timeline
3
- */
4
- import { Cartographic, ColorDef } from "@itwin/core-common";
5
- import { IModelConnection, ScreenViewport } from "@itwin/core-frontend";
6
- import { SolarDataProvider } from "./interfaces";
7
- /** Base class that provides solar data for animation control
8
- * @alpha
9
- */
10
- export declare class BaseSolarDataProvider implements SolarDataProvider {
11
- protected _projectTimeZoneOffset: number;
12
- protected _viewport: ScreenViewport | undefined;
13
- protected _cartographicCenter: Cartographic;
14
- protected _shadowColor: ColorDef;
15
- longitude: number;
16
- latitude: number;
17
- viewId: string;
18
- supportsTimelineAnimation: boolean;
19
- animationFraction: number;
20
- private _projectDayStartMS;
21
- private _projectSunriseMs;
22
- private _projectSunsetMs;
23
- private _zoneOffsetMs;
24
- private _projectSunrise;
25
- private _projectSunset;
26
- private _projectDateTime;
27
- private _projectDay;
28
- protected initializeData(projectTimeZoneOffset: number, initialTime?: Date): void;
29
- constructor(viewport?: ScreenViewport, longitude?: number, latitude?: number);
30
- get timeZoneOffset(): number;
31
- get shadowColor(): ColorDef;
32
- set shadowColor(color: ColorDef);
33
- get shouldShowTimeline(): boolean;
34
- /** Get time at project location */
35
- get timeOfDay(): Date;
36
- /** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time
37
- * which will be adjusted to the same time at project location. */
38
- setDateAndTime(date: Date, isProjectDate?: boolean): void;
39
- /** Project Day Start */
40
- get day(): Date;
41
- /** Project Day Start in milliseconds */
42
- get dayStartMs(): number;
43
- getCartographicCenter(iModel: IModelConnection): Cartographic;
44
- set viewport(viewport: ScreenViewport | undefined);
45
- get viewport(): ScreenViewport | undefined;
46
- protected getZone(location: Cartographic): number;
47
- get sunrise(): Date;
48
- get sunriseMs(): number;
49
- get sunset(): Date;
50
- get sunsetMs(): number;
51
- onTimeChanged: (_time: Date) => void;
52
- }
1
+ /** @packageDocumentation
2
+ * @module Timeline
3
+ */
4
+ import { Cartographic, ColorDef } from "@itwin/core-common";
5
+ import { IModelConnection, ScreenViewport } from "@itwin/core-frontend";
6
+ import { SolarDataProvider } from "./interfaces";
7
+ /** Base class that provides solar data for animation control
8
+ * @alpha
9
+ */
10
+ export declare class BaseSolarDataProvider implements SolarDataProvider {
11
+ protected _projectTimeZoneOffset: number;
12
+ protected _viewport: ScreenViewport | undefined;
13
+ protected _cartographicCenter: Cartographic;
14
+ protected _shadowColor: ColorDef;
15
+ longitude: number;
16
+ latitude: number;
17
+ viewId: string;
18
+ supportsTimelineAnimation: boolean;
19
+ animationFraction: number;
20
+ private _projectDayStartMS;
21
+ private _projectSunriseMs;
22
+ private _projectSunsetMs;
23
+ private _zoneOffsetMs;
24
+ private _projectSunrise;
25
+ private _projectSunset;
26
+ private _projectDateTime;
27
+ private _projectDay;
28
+ protected initializeData(projectTimeZoneOffset: number, initialTime?: Date): void;
29
+ constructor(viewport?: ScreenViewport, longitude?: number, latitude?: number);
30
+ get timeZoneOffset(): number;
31
+ get shadowColor(): ColorDef;
32
+ set shadowColor(color: ColorDef);
33
+ get shouldShowTimeline(): boolean;
34
+ /** Get time at project location */
35
+ get timeOfDay(): Date;
36
+ /** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time
37
+ * which will be adjusted to the same time at project location. */
38
+ setDateAndTime(date: Date, isProjectDate?: boolean): void;
39
+ /** Project Day Start */
40
+ get day(): Date;
41
+ /** Project Day Start in milliseconds */
42
+ get dayStartMs(): number;
43
+ getCartographicCenter(iModel: IModelConnection): Cartographic;
44
+ set viewport(viewport: ScreenViewport | undefined);
45
+ get viewport(): ScreenViewport | undefined;
46
+ protected getZone(location: Cartographic): number;
47
+ get sunrise(): Date;
48
+ get sunriseMs(): number;
49
+ get sunset(): Date;
50
+ get sunsetMs(): number;
51
+ onTimeChanged: (_time: Date) => void;
52
+ }
53
53
  //# sourceMappingURL=BaseSolarDataProvider.d.ts.map
@@ -1,140 +1,140 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Timeline
7
- */
8
- import { Point3d } from "@itwin/core-geometry";
9
- import { calculateSunriseOrSunset, Cartographic, ColorByName, ColorDef } from "@itwin/core-common";
10
- const millisecPerMinute = 1000 * 60;
11
- const millisecPerHour = millisecPerMinute * 60;
12
- // the interface and class are in alpha state - it may change after usability testing - test coverage not complete
13
- /* istanbul ignore file */
14
- /** Base class that provides solar data for animation control
15
- * @alpha
16
- */
17
- export class BaseSolarDataProvider {
18
- constructor(viewport, longitude, latitude) {
19
- this._shadowColor = ColorDef.create(ColorByName.gray);
20
- this.longitude = -75.17035; // long/lat of Philadelphia
21
- this.latitude = 39.954927;
22
- this.viewId = ""; // View Id used to determine sunrise and sunset
23
- this.supportsTimelineAnimation = false; // set to true when provider determines animation data is available.
24
- this.animationFraction = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.
25
- this._projectDayStartMS = 0;
26
- this._projectSunriseMs = 0;
27
- this._projectSunsetMs = 0;
28
- this._zoneOffsetMs = 0;
29
- this._projectSunrise = new Date();
30
- this._projectSunset = new Date();
31
- this._projectDateTime = new Date();
32
- this._projectDay = new Date();
33
- // instanbul ignore next
34
- this.onTimeChanged = (_time) => {
35
- // to be implemented by derived class
36
- };
37
- this._viewport = viewport;
38
- if (longitude)
39
- this.longitude = longitude;
40
- if (latitude)
41
- this.latitude = latitude;
42
- if (viewport)
43
- this.viewId = viewport.view.id;
44
- // project location
45
- this._cartographicCenter = Cartographic.fromDegrees({ longitude: this.longitude, latitude: this.latitude, height: 0.0 });
46
- this._projectTimeZoneOffset = this.getZone(this._cartographicCenter);
47
- this.initializeData(this._projectTimeZoneOffset);
48
- }
49
- // projectTimeZoneOffset = zone offset in hours
50
- initializeData(projectTimeZoneOffset, initialTime) {
51
- if (!initialTime)
52
- initialTime = new Date(Date.now()); // users local time
53
- this._zoneOffsetMs = projectTimeZoneOffset * millisecPerHour;
54
- const year = initialTime.getFullYear();
55
- const month = initialTime.getMonth();
56
- const date = initialTime.getDate();
57
- const hours = initialTime.getHours();
58
- const minutes = initialTime.getMinutes();
59
- const initialUtcMs = Date.UTC(year, month, date, hours, minutes, 0, 0);
60
- const initialProjectMs = initialUtcMs - this._zoneOffsetMs;
61
- this._projectDateTime = new Date(initialProjectMs);
62
- const utcDayMs = Date.UTC(year, month, date, 0, 0, 0, 0);
63
- const utcDay = new Date(utcDayMs);
64
- this._projectDayStartMS = utcDayMs - this._zoneOffsetMs;
65
- this._projectDay = new Date(this._projectDayStartMS);
66
- this._projectSunrise = calculateSunriseOrSunset(utcDay, this._cartographicCenter, true);
67
- this._projectSunset = calculateSunriseOrSunset(utcDay, this._cartographicCenter, false);
68
- this._projectSunriseMs = this._projectSunrise.getTime();
69
- this._projectSunsetMs = this._projectSunset.getTime();
70
- }
71
- get timeZoneOffset() {
72
- return this._projectTimeZoneOffset;
73
- }
74
- get shadowColor() {
75
- return this._shadowColor;
76
- }
77
- set shadowColor(color) {
78
- this._shadowColor = color;
79
- }
80
- get shouldShowTimeline() {
81
- return false;
82
- }
83
- /** Get time at project location */
84
- get timeOfDay() {
85
- return this._projectDateTime;
86
- }
87
- /** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time
88
- * which will be adjusted to the same time at project location. */
89
- setDateAndTime(date, isProjectDate) {
90
- let userDay = date;
91
- // convert date from user date to project location
92
- if (isProjectDate) {
93
- const userOffset = date.getTimezoneOffset() * millisecPerMinute;
94
- userDay = new Date(date.getTime() - userOffset - this._zoneOffsetMs);
95
- }
96
- this.initializeData(this._projectTimeZoneOffset, userDay);
97
- }
98
- /** Project Day Start */
99
- get day() {
100
- return this._projectDay;
101
- }
102
- /** Project Day Start in milliseconds */
103
- get dayStartMs() {
104
- return this._projectDayStartMS;
105
- }
106
- getCartographicCenter(iModel) {
107
- if (iModel.isGeoLocated) {
108
- const projectExtents = iModel.projectExtents;
109
- const projectCenter = Point3d.createAdd2Scaled(projectExtents.low, .5, projectExtents.high, .5);
110
- return iModel.spatialToCartographicFromEcef(projectCenter);
111
- }
112
- return Cartographic.fromDegrees({ longitude: this.longitude, latitude: this.latitude, height: 0.0 });
113
- }
114
- set viewport(viewport) {
115
- this._viewport = viewport;
116
- if (viewport)
117
- this.viewId = viewport.view.id;
118
- else
119
- this.viewId = "";
120
- }
121
- get viewport() {
122
- return this._viewport;
123
- }
124
- getZone(location) {
125
- return Math.floor(.5 + location.longitudeDegrees / 15.0);
126
- }
127
- get sunrise() {
128
- return this._projectSunrise;
129
- }
130
- get sunriseMs() {
131
- return this._projectSunriseMs;
132
- }
133
- get sunset() {
134
- return this._projectSunset;
135
- }
136
- get sunsetMs() {
137
- return this._projectSunsetMs;
138
- }
139
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Timeline
7
+ */
8
+ import { Point3d } from "@itwin/core-geometry";
9
+ import { calculateSunriseOrSunset, Cartographic, ColorByName, ColorDef } from "@itwin/core-common";
10
+ const millisecPerMinute = 1000 * 60;
11
+ const millisecPerHour = millisecPerMinute * 60;
12
+ // the interface and class are in alpha state - it may change after usability testing - test coverage not complete
13
+ /* istanbul ignore file */
14
+ /** Base class that provides solar data for animation control
15
+ * @alpha
16
+ */
17
+ export class BaseSolarDataProvider {
18
+ constructor(viewport, longitude, latitude) {
19
+ this._shadowColor = ColorDef.create(ColorByName.gray);
20
+ this.longitude = -75.17035; // long/lat of Philadelphia
21
+ this.latitude = 39.954927;
22
+ this.viewId = ""; // View Id used to determine sunrise and sunset
23
+ this.supportsTimelineAnimation = false; // set to true when provider determines animation data is available.
24
+ this.animationFraction = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.
25
+ this._projectDayStartMS = 0;
26
+ this._projectSunriseMs = 0;
27
+ this._projectSunsetMs = 0;
28
+ this._zoneOffsetMs = 0;
29
+ this._projectSunrise = new Date();
30
+ this._projectSunset = new Date();
31
+ this._projectDateTime = new Date();
32
+ this._projectDay = new Date();
33
+ // instanbul ignore next
34
+ this.onTimeChanged = (_time) => {
35
+ // to be implemented by derived class
36
+ };
37
+ this._viewport = viewport;
38
+ if (longitude)
39
+ this.longitude = longitude;
40
+ if (latitude)
41
+ this.latitude = latitude;
42
+ if (viewport)
43
+ this.viewId = viewport.view.id;
44
+ // project location
45
+ this._cartographicCenter = Cartographic.fromDegrees({ longitude: this.longitude, latitude: this.latitude, height: 0.0 });
46
+ this._projectTimeZoneOffset = this.getZone(this._cartographicCenter);
47
+ this.initializeData(this._projectTimeZoneOffset);
48
+ }
49
+ // projectTimeZoneOffset = zone offset in hours
50
+ initializeData(projectTimeZoneOffset, initialTime) {
51
+ if (!initialTime)
52
+ initialTime = new Date(Date.now()); // users local time
53
+ this._zoneOffsetMs = projectTimeZoneOffset * millisecPerHour;
54
+ const year = initialTime.getFullYear();
55
+ const month = initialTime.getMonth();
56
+ const date = initialTime.getDate();
57
+ const hours = initialTime.getHours();
58
+ const minutes = initialTime.getMinutes();
59
+ const initialUtcMs = Date.UTC(year, month, date, hours, minutes, 0, 0);
60
+ const initialProjectMs = initialUtcMs - this._zoneOffsetMs;
61
+ this._projectDateTime = new Date(initialProjectMs);
62
+ const utcDayMs = Date.UTC(year, month, date, 0, 0, 0, 0);
63
+ const utcDay = new Date(utcDayMs);
64
+ this._projectDayStartMS = utcDayMs - this._zoneOffsetMs;
65
+ this._projectDay = new Date(this._projectDayStartMS);
66
+ this._projectSunrise = calculateSunriseOrSunset(utcDay, this._cartographicCenter, true);
67
+ this._projectSunset = calculateSunriseOrSunset(utcDay, this._cartographicCenter, false);
68
+ this._projectSunriseMs = this._projectSunrise.getTime();
69
+ this._projectSunsetMs = this._projectSunset.getTime();
70
+ }
71
+ get timeZoneOffset() {
72
+ return this._projectTimeZoneOffset;
73
+ }
74
+ get shadowColor() {
75
+ return this._shadowColor;
76
+ }
77
+ set shadowColor(color) {
78
+ this._shadowColor = color;
79
+ }
80
+ get shouldShowTimeline() {
81
+ return false;
82
+ }
83
+ /** Get time at project location */
84
+ get timeOfDay() {
85
+ return this._projectDateTime;
86
+ }
87
+ /** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time
88
+ * which will be adjusted to the same time at project location. */
89
+ setDateAndTime(date, isProjectDate) {
90
+ let userDay = date;
91
+ // convert date from user date to project location
92
+ if (isProjectDate) {
93
+ const userOffset = date.getTimezoneOffset() * millisecPerMinute;
94
+ userDay = new Date(date.getTime() - userOffset - this._zoneOffsetMs);
95
+ }
96
+ this.initializeData(this._projectTimeZoneOffset, userDay);
97
+ }
98
+ /** Project Day Start */
99
+ get day() {
100
+ return this._projectDay;
101
+ }
102
+ /** Project Day Start in milliseconds */
103
+ get dayStartMs() {
104
+ return this._projectDayStartMS;
105
+ }
106
+ getCartographicCenter(iModel) {
107
+ if (iModel.isGeoLocated) {
108
+ const projectExtents = iModel.projectExtents;
109
+ const projectCenter = Point3d.createAdd2Scaled(projectExtents.low, .5, projectExtents.high, .5);
110
+ return iModel.spatialToCartographicFromEcef(projectCenter);
111
+ }
112
+ return Cartographic.fromDegrees({ longitude: this.longitude, latitude: this.latitude, height: 0.0 });
113
+ }
114
+ set viewport(viewport) {
115
+ this._viewport = viewport;
116
+ if (viewport)
117
+ this.viewId = viewport.view.id;
118
+ else
119
+ this.viewId = "";
120
+ }
121
+ get viewport() {
122
+ return this._viewport;
123
+ }
124
+ getZone(location) {
125
+ return Math.floor(.5 + location.longitudeDegrees / 15.0);
126
+ }
127
+ get sunrise() {
128
+ return this._projectSunrise;
129
+ }
130
+ get sunriseMs() {
131
+ return this._projectSunriseMs;
132
+ }
133
+ get sunset() {
134
+ return this._projectSunset;
135
+ }
136
+ get sunsetMs() {
137
+ return this._projectSunsetMs;
138
+ }
139
+ }
140
140
  //# sourceMappingURL=BaseSolarDataProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSolarDataProvider.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/BaseSolarDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAInG,MAAM,iBAAiB,GAAG,IAAI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AAW,MAAM;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CAMF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Timeline\n */\n\nimport { Point3d } from \"@itwin/core-geometry\";\nimport { calculateSunriseOrSunset, Cartographic, ColorByName, ColorDef } from \"@itwin/core-common\";\nimport { IModelConnection, ScreenViewport } from \"@itwin/core-frontend\";\nimport { SolarDataProvider } from \"./interfaces\";\n\nconst millisecPerMinute = 1000 * 60;\nconst millisecPerHour = millisecPerMinute * 60;\n\n// the interface and class are in alpha state - it may change after usability testing - test coverage not complete\n/* istanbul ignore file */\n\n/** Base class that provides solar data for animation control\n * @alpha\n */\nexport class BaseSolarDataProvider implements SolarDataProvider {\n protected _projectTimeZoneOffset: number; // used to convert between project time and local time\n protected _viewport: ScreenViewport | undefined;\n protected _cartographicCenter: Cartographic;\n protected _shadowColor = ColorDef.create(ColorByName.gray);\n\n public longitude: number = -75.17035; // long/lat of Philadelphia\n public latitude: number = 39.954927;\n public viewId = \"\"; // View Id used to determine sunrise and sunset\n public supportsTimelineAnimation = false; // set to true when provider determines animation data is available.\n public animationFraction: number = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.\n\n private _projectDayStartMS = 0;\n private _projectSunriseMs = 0;\n private _projectSunsetMs = 0;\n private _zoneOffsetMs = 0;\n private _projectSunrise = new Date();\n private _projectSunset = new Date();\n private _projectDateTime = new Date();\n private _projectDay = new Date();\n\n // projectTimeZoneOffset = zone offset in hours\n protected initializeData(projectTimeZoneOffset: number, initialTime?: Date) {\n if (!initialTime)\n initialTime = new Date(Date.now()); // users local time\n\n this._zoneOffsetMs = projectTimeZoneOffset * millisecPerHour;\n const year=initialTime.getFullYear();\n const month=initialTime.getMonth();\n const date=initialTime.getDate();\n const hours=initialTime.getHours();\n const minutes=initialTime.getMinutes();\n const initialUtcMs = Date.UTC(year, month, date, hours, minutes, 0, 0);\n const initialProjectMs = initialUtcMs - this._zoneOffsetMs;\n this._projectDateTime = new Date (initialProjectMs);\n\n const utcDayMs = Date.UTC(year, month, date, 0, 0, 0, 0);\n const utcDay = new Date(utcDayMs);\n this._projectDayStartMS = utcDayMs - this._zoneOffsetMs;\n this._projectDay = new Date (this._projectDayStartMS);\n this._projectSunrise = calculateSunriseOrSunset(utcDay, this._cartographicCenter, true);\n this._projectSunset = calculateSunriseOrSunset(utcDay, this._cartographicCenter, false);\n this._projectSunriseMs = this._projectSunrise.getTime();\n this._projectSunsetMs = this._projectSunset.getTime();\n }\n\n constructor(viewport?: ScreenViewport, longitude?: number, latitude?: number) {\n this._viewport = viewport;\n if (longitude)\n this.longitude = longitude;\n if (latitude)\n this.latitude = latitude;\n\n if (viewport)\n this.viewId = viewport.view.id;\n\n // project location\n this._cartographicCenter = Cartographic.fromDegrees({longitude: this.longitude, latitude: this.latitude, height: 0.0});\n this._projectTimeZoneOffset = this.getZone(this._cartographicCenter);\n\n this.initializeData(this._projectTimeZoneOffset);\n }\n\n public get timeZoneOffset(): number {\n return this._projectTimeZoneOffset;\n }\n\n public get shadowColor(): ColorDef {\n return this._shadowColor;\n }\n\n public set shadowColor(color: ColorDef) {\n this._shadowColor = color;\n }\n\n public get shouldShowTimeline() {\n return false;\n }\n\n /** Get time at project location */\n public get timeOfDay(): Date {\n return this._projectDateTime;\n }\n\n /** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time\n * which will be adjusted to the same time at project location. */\n public setDateAndTime(date: Date, isProjectDate?: boolean) {\n let userDay = date;\n\n // convert date from user date to project location\n if (isProjectDate) {\n const userOffset = date.getTimezoneOffset() * millisecPerMinute;\n userDay = new Date(date.getTime() - userOffset - this._zoneOffsetMs);\n }\n\n this.initializeData(this._projectTimeZoneOffset, userDay);\n }\n\n /** Project Day Start */\n public get day(): Date {\n return this._projectDay;\n }\n\n /** Project Day Start in milliseconds */\n public get dayStartMs(): number {\n return this._projectDayStartMS;\n }\n\n public getCartographicCenter(iModel: IModelConnection): Cartographic {\n if (iModel.isGeoLocated) {\n const projectExtents = iModel.projectExtents;\n const projectCenter = Point3d.createAdd2Scaled(projectExtents.low, .5, projectExtents.high, .5);\n return iModel.spatialToCartographicFromEcef(projectCenter);\n }\n return Cartographic.fromDegrees({longitude: this.longitude, latitude: this.latitude, height: 0.0});\n }\n\n public set viewport(viewport: ScreenViewport | undefined) {\n this._viewport = viewport;\n if (viewport)\n this.viewId = viewport.view.id;\n else\n this.viewId = \"\";\n }\n\n public get viewport(): ScreenViewport | undefined {\n return this._viewport;\n }\n\n protected getZone(location: Cartographic) {\n return Math.floor(.5 + location.longitudeDegrees / 15.0);\n }\n\n public get sunrise(): Date {\n return this._projectSunrise;\n }\n\n public get sunriseMs(): number {\n return this._projectSunriseMs;\n }\n\n public get sunset(): Date {\n return this._projectSunset;\n }\n\n public get sunsetMs(): number {\n return this._projectSunsetMs;\n }\n\n // instanbul ignore next\n public onTimeChanged = (_time: Date) => {\n // to be implemented by derived class\n };\n}\n"]}
1
+ {"version":3,"file":"BaseSolarDataProvider.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/BaseSolarDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAInG,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AACpC,MAAM,eAAe,GAAG,iBAAiB,GAAG,EAAE,CAAC;AAE/C,kHAAkH;AAClH,0BAA0B;AAE1B;;GAEG;AACH,MAAM,OAAO,qBAAqB;IA8ChC,YAAY,QAAyB,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------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Timeline\r\n */\r\n\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { calculateSunriseOrSunset, Cartographic, ColorByName, ColorDef } from \"@itwin/core-common\";\r\nimport { IModelConnection, ScreenViewport } from \"@itwin/core-frontend\";\r\nimport { SolarDataProvider } from \"./interfaces\";\r\n\r\nconst millisecPerMinute = 1000 * 60;\r\nconst millisecPerHour = millisecPerMinute * 60;\r\n\r\n// the interface and class are in alpha state - it may change after usability testing - test coverage not complete\r\n/* istanbul ignore file */\r\n\r\n/** Base class that provides solar data for animation control\r\n * @alpha\r\n */\r\nexport class BaseSolarDataProvider implements SolarDataProvider {\r\n protected _projectTimeZoneOffset: number; // used to convert between project time and local time\r\n protected _viewport: ScreenViewport | undefined;\r\n protected _cartographicCenter: Cartographic;\r\n protected _shadowColor = ColorDef.create(ColorByName.gray);\r\n\r\n public longitude: number = -75.17035; // long/lat of Philadelphia\r\n public latitude: number = 39.954927;\r\n public viewId = \"\"; // View Id used to determine sunrise and sunset\r\n public supportsTimelineAnimation = false; // set to true when provider determines animation data is available.\r\n public animationFraction: number = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.\r\n\r\n private _projectDayStartMS = 0;\r\n private _projectSunriseMs = 0;\r\n private _projectSunsetMs = 0;\r\n private _zoneOffsetMs = 0;\r\n private _projectSunrise = new Date();\r\n private _projectSunset = new Date();\r\n private _projectDateTime = new Date();\r\n private _projectDay = new Date();\r\n\r\n // projectTimeZoneOffset = zone offset in hours\r\n protected initializeData(projectTimeZoneOffset: number, initialTime?: Date) {\r\n if (!initialTime)\r\n initialTime = new Date(Date.now()); // users local time\r\n\r\n this._zoneOffsetMs = projectTimeZoneOffset * millisecPerHour;\r\n const year=initialTime.getFullYear();\r\n const month=initialTime.getMonth();\r\n const date=initialTime.getDate();\r\n const hours=initialTime.getHours();\r\n const minutes=initialTime.getMinutes();\r\n const initialUtcMs = Date.UTC(year, month, date, hours, minutes, 0, 0);\r\n const initialProjectMs = initialUtcMs - this._zoneOffsetMs;\r\n this._projectDateTime = new Date (initialProjectMs);\r\n\r\n const utcDayMs = Date.UTC(year, month, date, 0, 0, 0, 0);\r\n const utcDay = new Date(utcDayMs);\r\n this._projectDayStartMS = utcDayMs - this._zoneOffsetMs;\r\n this._projectDay = new Date (this._projectDayStartMS);\r\n this._projectSunrise = calculateSunriseOrSunset(utcDay, this._cartographicCenter, true);\r\n this._projectSunset = calculateSunriseOrSunset(utcDay, this._cartographicCenter, false);\r\n this._projectSunriseMs = this._projectSunrise.getTime();\r\n this._projectSunsetMs = this._projectSunset.getTime();\r\n }\r\n\r\n constructor(viewport?: ScreenViewport, longitude?: number, latitude?: number) {\r\n this._viewport = viewport;\r\n if (longitude)\r\n this.longitude = longitude;\r\n if (latitude)\r\n this.latitude = latitude;\r\n\r\n if (viewport)\r\n this.viewId = viewport.view.id;\r\n\r\n // project location\r\n this._cartographicCenter = Cartographic.fromDegrees({longitude: this.longitude, latitude: this.latitude, height: 0.0});\r\n this._projectTimeZoneOffset = this.getZone(this._cartographicCenter);\r\n\r\n this.initializeData(this._projectTimeZoneOffset);\r\n }\r\n\r\n public get timeZoneOffset(): number {\r\n return this._projectTimeZoneOffset;\r\n }\r\n\r\n public get shadowColor(): ColorDef {\r\n return this._shadowColor;\r\n }\r\n\r\n public set shadowColor(color: ColorDef) {\r\n this._shadowColor = color;\r\n }\r\n\r\n public get shouldShowTimeline() {\r\n return false;\r\n }\r\n\r\n /** Get time at project location */\r\n public get timeOfDay(): Date {\r\n return this._projectDateTime;\r\n }\r\n\r\n /** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time\r\n * which will be adjusted to the same time at project location. */\r\n public setDateAndTime(date: Date, isProjectDate?: boolean) {\r\n let userDay = date;\r\n\r\n // convert date from user date to project location\r\n if (isProjectDate) {\r\n const userOffset = date.getTimezoneOffset() * millisecPerMinute;\r\n userDay = new Date(date.getTime() - userOffset - this._zoneOffsetMs);\r\n }\r\n\r\n this.initializeData(this._projectTimeZoneOffset, userDay);\r\n }\r\n\r\n /** Project Day Start */\r\n public get day(): Date {\r\n return this._projectDay;\r\n }\r\n\r\n /** Project Day Start in milliseconds */\r\n public get dayStartMs(): number {\r\n return this._projectDayStartMS;\r\n }\r\n\r\n public getCartographicCenter(iModel: IModelConnection): Cartographic {\r\n if (iModel.isGeoLocated) {\r\n const projectExtents = iModel.projectExtents;\r\n const projectCenter = Point3d.createAdd2Scaled(projectExtents.low, .5, projectExtents.high, .5);\r\n return iModel.spatialToCartographicFromEcef(projectCenter);\r\n }\r\n return Cartographic.fromDegrees({longitude: this.longitude, latitude: this.latitude, height: 0.0});\r\n }\r\n\r\n public set viewport(viewport: ScreenViewport | undefined) {\r\n this._viewport = viewport;\r\n if (viewport)\r\n this.viewId = viewport.view.id;\r\n else\r\n this.viewId = \"\";\r\n }\r\n\r\n public get viewport(): ScreenViewport | undefined {\r\n return this._viewport;\r\n }\r\n\r\n protected getZone(location: Cartographic) {\r\n return Math.floor(.5 + location.longitudeDegrees / 15.0);\r\n }\r\n\r\n public get sunrise(): Date {\r\n return this._projectSunrise;\r\n }\r\n\r\n public get sunriseMs(): number {\r\n return this._projectSunriseMs;\r\n }\r\n\r\n public get sunset(): Date {\r\n return this._projectSunset;\r\n }\r\n\r\n public get sunsetMs(): number {\r\n return this._projectSunsetMs;\r\n }\r\n\r\n // instanbul ignore next\r\n public onTimeChanged = (_time: Date) => {\r\n // to be implemented by derived class\r\n };\r\n}\r\n"]}
@@ -1,32 +1,32 @@
1
- /** @packageDocumentation
2
- * @module Timeline
3
- */
4
- import { ScreenViewport } from "@itwin/core-frontend";
5
- import { PlaybackSettings, TimelineDataProvider } from "./interfaces";
6
- /** Base Timeline Data Provider
7
- * @alpha
8
- */
9
- export declare class BaseTimelineDataProvider implements TimelineDataProvider {
10
- readonly id = "TestTimelineDataProvider";
11
- start: Date | undefined;
12
- end: Date | undefined;
13
- viewId: string;
14
- supportsTimelineAnimation: boolean;
15
- animationFraction: number;
16
- protected _viewport: ScreenViewport | undefined;
17
- constructor(viewport?: ScreenViewport);
18
- protected _settings: PlaybackSettings;
19
- loadTimelineData(): Promise<boolean>;
20
- /** Called to get the initial scrubber location */
21
- get initialDuration(): number;
22
- /** Called to get playback duration */
23
- get duration(): number;
24
- set viewport(viewport: ScreenViewport | undefined);
25
- get viewport(): ScreenViewport | undefined;
26
- get loop(): boolean;
27
- getSettings(): PlaybackSettings;
28
- updateSettings(settings: PlaybackSettings): void;
29
- onPlaybackSettingChanged: (_settings: PlaybackSettings) => void;
30
- onAnimationFractionChanged: (_animationFraction: number) => void;
31
- }
1
+ /** @packageDocumentation
2
+ * @module Timeline
3
+ */
4
+ import { ScreenViewport } from "@itwin/core-frontend";
5
+ import { PlaybackSettings, TimelineDataProvider } from "./interfaces";
6
+ /** Base Timeline Data Provider
7
+ * @alpha
8
+ */
9
+ export declare class BaseTimelineDataProvider implements TimelineDataProvider {
10
+ readonly id = "TestTimelineDataProvider";
11
+ start: Date | undefined;
12
+ end: Date | undefined;
13
+ viewId: string;
14
+ supportsTimelineAnimation: boolean;
15
+ animationFraction: number;
16
+ protected _viewport: ScreenViewport | undefined;
17
+ constructor(viewport?: ScreenViewport);
18
+ protected _settings: PlaybackSettings;
19
+ loadTimelineData(): Promise<boolean>;
20
+ /** Called to get the initial scrubber location */
21
+ get initialDuration(): number;
22
+ /** Called to get playback duration */
23
+ get duration(): number;
24
+ set viewport(viewport: ScreenViewport | undefined);
25
+ get viewport(): ScreenViewport | undefined;
26
+ get loop(): boolean;
27
+ getSettings(): PlaybackSettings;
28
+ updateSettings(settings: PlaybackSettings): void;
29
+ onPlaybackSettingChanged: (_settings: PlaybackSettings) => void;
30
+ onAnimationFractionChanged: (_animationFraction: number) => void;
31
+ }
32
32
  //# sourceMappingURL=BaseTimelineDataProvider.d.ts.map
@@ -1,66 +1,66 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Timeline
7
- */
8
- /** Base Timeline Data Provider
9
- * @alpha
10
- */
11
- export class BaseTimelineDataProvider {
12
- constructor(viewport) {
13
- this.id = "TestTimelineDataProvider";
14
- this.viewId = "";
15
- this.supportsTimelineAnimation = false; // set to true when provider determines animation data is available.
16
- this.animationFraction = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.
17
- this._settings = {
18
- duration: 20 * 1000,
19
- loop: true,
20
- };
21
- // istanbul ignore next
22
- this.onPlaybackSettingChanged = (_settings) => {
23
- };
24
- // istanbul ignore next
25
- this.onAnimationFractionChanged = (_animationFraction) => {
26
- };
27
- this._viewport = viewport;
28
- // istanbul ignore if - WIP
29
- if (viewport)
30
- this.viewId = viewport.view.id;
31
- }
32
- // istanbul ignore next
33
- async loadTimelineData() {
34
- return false;
35
- }
36
- /** Called to get the initial scrubber location */
37
- get initialDuration() {
38
- return this.duration * this.animationFraction;
39
- }
40
- /** Called to get playback duration */
41
- get duration() {
42
- return (this.getSettings().duration) ? this.getSettings().duration : /* istanbul ignore next */ 20000;
43
- }
44
- // istanbul ignore next - WIP
45
- set viewport(viewport) {
46
- this._viewport = viewport;
47
- if (viewport)
48
- this.viewId = viewport.view.id;
49
- else
50
- this.viewId = "";
51
- }
52
- // istanbul ignore next - WIP
53
- get viewport() {
54
- return this._viewport;
55
- }
56
- get loop() {
57
- return (undefined === this.getSettings().loop) ? /* istanbul ignore next */ false : this.getSettings().loop;
58
- }
59
- getSettings() {
60
- return this._settings;
61
- }
62
- updateSettings(settings) {
63
- this._settings = { ...this._settings, ...settings };
64
- }
65
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Timeline
7
+ */
8
+ /** Base Timeline Data Provider
9
+ * @alpha
10
+ */
11
+ export class BaseTimelineDataProvider {
12
+ constructor(viewport) {
13
+ this.id = "TestTimelineDataProvider";
14
+ this.viewId = "";
15
+ this.supportsTimelineAnimation = false; // set to true when provider determines animation data is available.
16
+ this.animationFraction = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.
17
+ this._settings = {
18
+ duration: 20 * 1000,
19
+ loop: true,
20
+ };
21
+ // istanbul ignore next
22
+ this.onPlaybackSettingChanged = (_settings) => {
23
+ };
24
+ // istanbul ignore next
25
+ this.onAnimationFractionChanged = (_animationFraction) => {
26
+ };
27
+ this._viewport = viewport;
28
+ // istanbul ignore if - WIP
29
+ if (viewport)
30
+ this.viewId = viewport.view.id;
31
+ }
32
+ // istanbul ignore next
33
+ async loadTimelineData() {
34
+ return false;
35
+ }
36
+ /** Called to get the initial scrubber location */
37
+ get initialDuration() {
38
+ return this.duration * this.animationFraction;
39
+ }
40
+ /** Called to get playback duration */
41
+ get duration() {
42
+ return (this.getSettings().duration) ? this.getSettings().duration : /* istanbul ignore next */ 20000;
43
+ }
44
+ // istanbul ignore next - WIP
45
+ set viewport(viewport) {
46
+ this._viewport = viewport;
47
+ if (viewport)
48
+ this.viewId = viewport.view.id;
49
+ else
50
+ this.viewId = "";
51
+ }
52
+ // istanbul ignore next - WIP
53
+ get viewport() {
54
+ return this._viewport;
55
+ }
56
+ get loop() {
57
+ return (undefined === this.getSettings().loop) ? /* istanbul ignore next */ false : this.getSettings().loop;
58
+ }
59
+ getSettings() {
60
+ return this._settings;
61
+ }
62
+ updateSettings(settings) {
63
+ this._settings = { ...this._settings, ...settings };
64
+ }
65
+ }
66
66
  //# sourceMappingURL=BaseTimelineDataProvider.js.map