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

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