@itwin/imodel-components-react 3.6.0-dev.34 → 3.6.0-dev.36

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/LICENSE.md +1 -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 +174 -174
  67. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +634 -634
  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 +358 -358
  158. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  159. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +163 -163
  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 +174 -174
  237. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +606 -606
  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 +332 -332
  328. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  329. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +163 -163
  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,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,"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AAQ,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,IAAI,IAAI,EAAE,CAAC;QAC9B,gBAAW,GAAG,IAAI,IAAI,EAAE,CAAC;QAkIjC,wBAAwB;QACjB,kBAAa,GAAG,CAAC,KAAW,EAAE,EAAE;YACrC,qCAA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AAC,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