@itwin/imodel-components-react 4.0.0-dev.12 → 4.0.0-dev.13

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