@itwin/imodel-components-react 3.0.0-dev.77 → 3.0.0-dev.81

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 (549) hide show
  1. package/lib/{imodel-components-react → cjs/imodel-components-react}/UiIModelComponents.d.ts +0 -0
  2. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -0
  3. package/lib/{imodel-components-react → cjs/imodel-components-react}/UiIModelComponents.js +0 -0
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -0
  5. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/AlphaSlider.d.ts +0 -0
  6. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -0
  7. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/AlphaSlider.js +0 -0
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -0
  9. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/AlphaSlider.scss +0 -0
  10. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerButton.d.ts +0 -0
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -0
  12. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerButton.js +1 -1
  13. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -0
  14. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerButton.scss +1 -1
  15. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerDialog.d.ts +0 -0
  16. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -0
  17. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerDialog.js +0 -0
  18. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -0
  19. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerPanel.d.ts +0 -0
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts.map +1 -0
  21. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerPanel.js +0 -0
  22. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +1 -0
  23. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerPanel.scss +1 -1
  24. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerPopup.d.ts +0 -0
  25. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -0
  26. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerPopup.js +1 -1
  27. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -0
  28. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/ColorPickerPopup.scss +1 -1
  29. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/HueSlider.d.ts +0 -0
  30. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -0
  31. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/HueSlider.js +0 -0
  32. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -0
  33. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/HueSlider.scss +0 -0
  34. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/SaturationPicker.d.ts +0 -0
  35. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -0
  36. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/SaturationPicker.js +1 -1
  37. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -0
  38. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/SaturationPicker.scss +0 -0
  39. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/Swatch.d.ts +0 -0
  40. package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -0
  41. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/Swatch.js +8 -16
  42. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -0
  43. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/Swatch.scss +1 -1
  44. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/getCSSColorFromDef.d.ts +0 -0
  45. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -0
  46. package/lib/{imodel-components-react → cjs/imodel-components-react}/color/getCSSColorFromDef.js +0 -0
  47. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -0
  48. package/lib/{imodel-components-react → cjs/imodel-components-react}/editors/ColorEditor.d.ts +0 -0
  49. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +1 -0
  50. package/lib/{imodel-components-react → cjs/imodel-components-react}/editors/ColorEditor.js +0 -0
  51. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -0
  52. package/lib/{imodel-components-react → cjs/imodel-components-react}/editors/ColorEditor.scss +1 -1
  53. package/lib/{imodel-components-react → cjs/imodel-components-react}/editors/WeightEditor.d.ts +0 -0
  54. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +1 -0
  55. package/lib/{imodel-components-react → cjs/imodel-components-react}/editors/WeightEditor.js +0 -0
  56. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -0
  57. package/lib/{imodel-components-react → cjs/imodel-components-react}/editors/WeightEditor.scss +1 -1
  58. package/lib/{imodel-components-react → cjs/imodel-components-react}/inputs/QuantityInput.d.ts +0 -0
  59. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -0
  60. package/lib/{imodel-components-react → cjs/imodel-components-react}/inputs/QuantityInput.js +0 -0
  61. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -0
  62. package/lib/{imodel-components-react → cjs/imodel-components-react}/inputs/QuantityNumberInput.d.ts +0 -0
  63. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -0
  64. package/lib/{imodel-components-react → cjs/imodel-components-react}/inputs/QuantityNumberInput.js +2 -13
  65. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -0
  66. package/lib/{imodel-components-react → cjs/imodel-components-react}/inputs/QuantityNumberInput.scss +1 -1
  67. package/lib/{imodel-components-react → cjs/imodel-components-react}/lineweight/Swatch.d.ts +0 -0
  68. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +1 -0
  69. package/lib/{imodel-components-react → cjs/imodel-components-react}/lineweight/Swatch.js +12 -16
  70. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -0
  71. package/lib/{imodel-components-react → cjs/imodel-components-react}/lineweight/Swatch.scss +1 -1
  72. package/lib/{imodel-components-react → cjs/imodel-components-react}/lineweight/WeightPickerButton.d.ts +0 -0
  73. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -0
  74. package/lib/{imodel-components-react → cjs/imodel-components-react}/lineweight/WeightPickerButton.js +1 -1
  75. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -0
  76. package/lib/{imodel-components-react → cjs/imodel-components-react}/lineweight/WeightPickerButton.scss +2 -2
  77. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/Cube.d.ts +0 -0
  78. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +1 -0
  79. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/Cube.js +9 -17
  80. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -0
  81. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/Cube.scss +0 -0
  82. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/CubeNavigationAid.d.ts +0 -0
  83. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -0
  84. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/CubeNavigationAid.js +6 -17
  85. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -0
  86. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/CubeNavigationAid.scss +1 -1
  87. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/DrawingNavigationAid.d.ts +0 -0
  88. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -0
  89. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/DrawingNavigationAid.js +4 -1
  90. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -0
  91. package/lib/{imodel-components-react → cjs/imodel-components-react}/navigationaids/DrawingNavigationAid.scss +2 -2
  92. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatPanel.d.ts +0 -0
  93. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -0
  94. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatPanel.js +0 -0
  95. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -0
  96. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatPanel.scss +2 -2
  97. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatPrecision.d.ts +0 -0
  98. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -0
  99. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatPrecision.js +1 -1
  100. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -0
  101. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatSample.d.ts +0 -0
  102. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -0
  103. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatSample.js +0 -0
  104. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -0
  105. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatType.d.ts +0 -0
  106. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -0
  107. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatType.js +3 -14
  108. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -0
  109. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatUnitLabel.d.ts +0 -0
  110. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -0
  111. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatUnitLabel.js +4 -15
  112. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -0
  113. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatUnits.d.ts +0 -0
  114. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -0
  115. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/FormatUnits.js +11 -11
  116. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -0
  117. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/MiscFormatOptions.d.ts +0 -0
  118. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -0
  119. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/MiscFormatOptions.js +6 -6
  120. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -0
  121. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/QuantityFormatPanel.d.ts +0 -0
  122. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -0
  123. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/QuantityFormatPanel.js +2 -13
  124. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -0
  125. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/DecimalPrecision.d.ts +0 -0
  126. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -0
  127. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/DecimalPrecision.js +2 -13
  128. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -0
  129. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/DecimalSeparator.d.ts +0 -0
  130. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -0
  131. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/DecimalSeparator.js +2 -13
  132. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -0
  133. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/FractionPrecision.d.ts +0 -0
  134. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -0
  135. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/FractionPrecision.js +2 -13
  136. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -0
  137. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/ScientificType.d.ts +0 -0
  138. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -0
  139. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/ScientificType.js +2 -13
  140. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -0
  141. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/SignOption.d.ts +0 -0
  142. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -0
  143. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/SignOption.js +2 -13
  144. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -0
  145. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/StationSeparatorSelector.d.ts +0 -0
  146. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -0
  147. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/StationSeparatorSelector.js +2 -13
  148. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -0
  149. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/StationSizeSelector.d.ts +0 -0
  150. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -0
  151. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/StationSizeSelector.js +2 -13
  152. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -0
  153. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/ThousandsSelector.d.ts +0 -0
  154. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -0
  155. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/ThousandsSelector.js +2 -13
  156. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -0
  157. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/ThousandsSeparator.d.ts +0 -0
  158. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -0
  159. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/ThousandsSeparator.js +2 -2
  160. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -0
  161. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/UnitDescr.d.ts +0 -0
  162. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -0
  163. package/lib/{imodel-components-react → cjs/imodel-components-react}/quantityformat/misc/UnitDescr.js +0 -0
  164. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -0
  165. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/BaseSolarDataProvider.d.ts +0 -0
  166. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -0
  167. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/BaseSolarDataProvider.js +0 -0
  168. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -0
  169. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/BaseTimelineDataProvider.d.ts +0 -0
  170. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -0
  171. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/BaseTimelineDataProvider.js +1 -1
  172. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -0
  173. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/ContextMenu.d.ts +0 -0
  174. package/lib/cjs/imodel-components-react/timeline/ContextMenu.d.ts.map +1 -0
  175. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/ContextMenu.js +0 -0
  176. package/lib/cjs/imodel-components-react/timeline/ContextMenu.js.map +1 -0
  177. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/ContextMenu.scss +2 -2
  178. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/InlineEdit.d.ts +0 -0
  179. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -0
  180. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/InlineEdit.js +0 -0
  181. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -0
  182. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/InlineEdit.scss +1 -1
  183. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/PlayerButton.d.ts +0 -0
  184. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -0
  185. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/PlayerButton.js +0 -0
  186. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -0
  187. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/PlayerButton.scss +1 -1
  188. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/Scrubber.d.ts +0 -0
  189. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -0
  190. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/Scrubber.js +0 -0
  191. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -0
  192. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/Scrubber.scss +2 -2
  193. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/SolarTimeline.d.ts +0 -0
  194. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -0
  195. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/SolarTimeline.js +0 -0
  196. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -0
  197. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/SolarTimeline.scss +1 -1
  198. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/SpeedTimeline.d.ts +0 -0
  199. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -0
  200. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/SpeedTimeline.js +0 -0
  201. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -0
  202. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/SpeedTimeline.scss +1 -1
  203. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/Timeline.scss +1 -1
  204. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/TimelineComponent.d.ts +0 -0
  205. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -0
  206. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/TimelineComponent.js +0 -0
  207. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -0
  208. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/TimelineComponent.scss +1 -1
  209. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/interfaces.d.ts +0 -0
  210. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -0
  211. package/lib/{imodel-components-react → cjs/imodel-components-react}/timeline/interfaces.js +0 -0
  212. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -0
  213. package/lib/{imodel-components-react → cjs/imodel-components-react}/viewport/ViewportComponent.d.ts +0 -0
  214. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -0
  215. package/lib/{imodel-components-react → cjs/imodel-components-react}/viewport/ViewportComponent.js +4 -1
  216. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -0
  217. package/lib/{imodel-components-react → cjs/imodel-components-react}/viewport/ViewportComponentEvents.d.ts +0 -0
  218. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -0
  219. package/lib/{imodel-components-react → cjs/imodel-components-react}/viewport/ViewportComponentEvents.js +0 -0
  220. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -0
  221. package/lib/{imodel-components-react.d.ts → cjs/imodel-components-react.d.ts} +0 -0
  222. package/lib/cjs/imodel-components-react.d.ts.map +1 -0
  223. package/lib/{imodel-components-react.js → cjs/imodel-components-react.js} +0 -0
  224. package/lib/cjs/imodel-components-react.js.map +1 -0
  225. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +34 -0
  226. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -0
  227. package/lib/esm/imodel-components-react/UiIModelComponents.js +75 -0
  228. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -0
  229. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +37 -0
  230. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -0
  231. package/lib/esm/imodel-components-react/color/AlphaSlider.js +161 -0
  232. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -0
  233. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -0
  234. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +38 -0
  235. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -0
  236. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +83 -0
  237. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -0
  238. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +92 -0
  239. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -0
  240. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -0
  241. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +39 -0
  242. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -0
  243. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +22 -0
  244. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts.map +1 -0
  245. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +123 -0
  246. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -0
  247. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +94 -0
  248. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -0
  249. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -0
  250. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +94 -0
  251. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -0
  252. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +53 -0
  253. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +23 -0
  254. package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -0
  255. package/lib/esm/imodel-components-react/color/HueSlider.js +174 -0
  256. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -0
  257. package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -0
  258. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +21 -0
  259. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -0
  260. package/lib/esm/imodel-components-react/color/SaturationPicker.js +188 -0
  261. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -0
  262. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -0
  263. package/lib/esm/imodel-components-react/color/Swatch.d.ts +23 -0
  264. package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -0
  265. package/lib/esm/imodel-components-react/color/Swatch.js +35 -0
  266. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -0
  267. package/lib/esm/imodel-components-react/color/Swatch.scss +24 -0
  268. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +7 -0
  269. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -0
  270. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +20 -0
  271. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -0
  272. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +45 -0
  273. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +1 -0
  274. package/lib/esm/imodel-components-react/editors/ColorEditor.js +125 -0
  275. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -0
  276. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +19 -0
  277. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +48 -0
  278. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +1 -0
  279. package/lib/esm/imodel-components-react/editors/WeightEditor.js +134 -0
  280. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -0
  281. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +17 -0
  282. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +26 -0
  283. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -0
  284. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +71 -0
  285. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -0
  286. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +45 -0
  287. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -0
  288. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +240 -0
  289. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -0
  290. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +89 -0
  291. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +34 -0
  292. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +1 -0
  293. package/lib/esm/imodel-components-react/lineweight/Swatch.js +60 -0
  294. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -0
  295. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +49 -0
  296. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +61 -0
  297. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -0
  298. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +134 -0
  299. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -0
  300. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +53 -0
  301. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +46 -0
  302. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +1 -0
  303. package/lib/esm/imodel-components-react/navigationaids/Cube.js +101 -0
  304. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -0
  305. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -0
  306. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +174 -0
  307. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -0
  308. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +573 -0
  309. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -0
  310. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +181 -0
  311. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +146 -0
  312. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -0
  313. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +621 -0
  314. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -0
  315. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +134 -0
  316. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +27 -0
  317. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -0
  318. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +77 -0
  319. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -0
  320. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +65 -0
  321. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +18 -0
  322. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -0
  323. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +31 -0
  324. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -0
  325. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +19 -0
  326. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -0
  327. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +61 -0
  328. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -0
  329. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +18 -0
  330. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -0
  331. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +64 -0
  332. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -0
  333. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +18 -0
  334. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -0
  335. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +84 -0
  336. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -0
  337. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +20 -0
  338. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -0
  339. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +111 -0
  340. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -0
  341. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +22 -0
  342. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -0
  343. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +159 -0
  344. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -0
  345. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +23 -0
  346. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -0
  347. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +132 -0
  348. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -0
  349. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +18 -0
  350. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -0
  351. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +37 -0
  352. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -0
  353. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +18 -0
  354. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -0
  355. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +25 -0
  356. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -0
  357. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +17 -0
  358. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -0
  359. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +32 -0
  360. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -0
  361. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +19 -0
  362. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -0
  363. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +26 -0
  364. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -0
  365. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +18 -0
  366. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -0
  367. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +28 -0
  368. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -0
  369. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +18 -0
  370. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -0
  371. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +36 -0
  372. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -0
  373. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +18 -0
  374. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -0
  375. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +25 -0
  376. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -0
  377. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +18 -0
  378. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -0
  379. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +34 -0
  380. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -0
  381. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +18 -0
  382. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -0
  383. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +70 -0
  384. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -0
  385. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +24 -0
  386. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -0
  387. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +97 -0
  388. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -0
  389. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +53 -0
  390. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -0
  391. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +140 -0
  392. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -0
  393. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +32 -0
  394. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -0
  395. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +66 -0
  396. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -0
  397. package/lib/esm/imodel-components-react/timeline/ContextMenu.d.ts +55 -0
  398. package/lib/esm/imodel-components-react/timeline/ContextMenu.d.ts.map +1 -0
  399. package/lib/esm/imodel-components-react/timeline/ContextMenu.js +55 -0
  400. package/lib/esm/imodel-components-react/timeline/ContextMenu.js.map +1 -0
  401. package/lib/esm/imodel-components-react/timeline/ContextMenu.scss +81 -0
  402. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +28 -0
  403. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -0
  404. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +56 -0
  405. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -0
  406. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +27 -0
  407. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +34 -0
  408. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -0
  409. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +65 -0
  410. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -0
  411. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +26 -0
  412. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +55 -0
  413. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -0
  414. package/lib/esm/imodel-components-react/timeline/Scrubber.js +165 -0
  415. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -0
  416. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +107 -0
  417. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +78 -0
  418. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -0
  419. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +399 -0
  420. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -0
  421. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +358 -0
  422. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +16 -0
  423. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -0
  424. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +29 -0
  425. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -0
  426. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +40 -0
  427. package/lib/esm/imodel-components-react/timeline/Timeline.scss +165 -0
  428. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +135 -0
  429. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -0
  430. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +341 -0
  431. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -0
  432. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +164 -0
  433. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +175 -0
  434. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -0
  435. package/lib/esm/imodel-components-react/timeline/interfaces.js +43 -0
  436. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -0
  437. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +67 -0
  438. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -0
  439. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +227 -0
  440. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -0
  441. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +107 -0
  442. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -0
  443. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +95 -0
  444. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -0
  445. package/lib/esm/imodel-components-react.d.ts +84 -0
  446. package/lib/esm/imodel-components-react.d.ts.map +1 -0
  447. package/lib/esm/imodel-components-react.js +89 -0
  448. package/lib/esm/imodel-components-react.js.map +1 -0
  449. package/package.json +32 -27
  450. package/lib/imodel-components-react/UiIModelComponents.d.ts.map +0 -1
  451. package/lib/imodel-components-react/UiIModelComponents.js.map +0 -1
  452. package/lib/imodel-components-react/color/AlphaSlider.d.ts.map +0 -1
  453. package/lib/imodel-components-react/color/AlphaSlider.js.map +0 -1
  454. package/lib/imodel-components-react/color/ColorPickerButton.d.ts.map +0 -1
  455. package/lib/imodel-components-react/color/ColorPickerButton.js.map +0 -1
  456. package/lib/imodel-components-react/color/ColorPickerDialog.d.ts.map +0 -1
  457. package/lib/imodel-components-react/color/ColorPickerDialog.js.map +0 -1
  458. package/lib/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
  459. package/lib/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
  460. package/lib/imodel-components-react/color/ColorPickerPopup.d.ts.map +0 -1
  461. package/lib/imodel-components-react/color/ColorPickerPopup.js.map +0 -1
  462. package/lib/imodel-components-react/color/HueSlider.d.ts.map +0 -1
  463. package/lib/imodel-components-react/color/HueSlider.js.map +0 -1
  464. package/lib/imodel-components-react/color/SaturationPicker.d.ts.map +0 -1
  465. package/lib/imodel-components-react/color/SaturationPicker.js.map +0 -1
  466. package/lib/imodel-components-react/color/Swatch.d.ts.map +0 -1
  467. package/lib/imodel-components-react/color/Swatch.js.map +0 -1
  468. package/lib/imodel-components-react/color/getCSSColorFromDef.d.ts.map +0 -1
  469. package/lib/imodel-components-react/color/getCSSColorFromDef.js.map +0 -1
  470. package/lib/imodel-components-react/editors/ColorEditor.d.ts.map +0 -1
  471. package/lib/imodel-components-react/editors/ColorEditor.js.map +0 -1
  472. package/lib/imodel-components-react/editors/WeightEditor.d.ts.map +0 -1
  473. package/lib/imodel-components-react/editors/WeightEditor.js.map +0 -1
  474. package/lib/imodel-components-react/inputs/QuantityInput.d.ts.map +0 -1
  475. package/lib/imodel-components-react/inputs/QuantityInput.js.map +0 -1
  476. package/lib/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +0 -1
  477. package/lib/imodel-components-react/inputs/QuantityNumberInput.js.map +0 -1
  478. package/lib/imodel-components-react/lineweight/Swatch.d.ts.map +0 -1
  479. package/lib/imodel-components-react/lineweight/Swatch.js.map +0 -1
  480. package/lib/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +0 -1
  481. package/lib/imodel-components-react/lineweight/WeightPickerButton.js.map +0 -1
  482. package/lib/imodel-components-react/navigationaids/Cube.d.ts.map +0 -1
  483. package/lib/imodel-components-react/navigationaids/Cube.js.map +0 -1
  484. package/lib/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +0 -1
  485. package/lib/imodel-components-react/navigationaids/CubeNavigationAid.js.map +0 -1
  486. package/lib/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +0 -1
  487. package/lib/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +0 -1
  488. package/lib/imodel-components-react/quantityformat/FormatPanel.d.ts.map +0 -1
  489. package/lib/imodel-components-react/quantityformat/FormatPanel.js.map +0 -1
  490. package/lib/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +0 -1
  491. package/lib/imodel-components-react/quantityformat/FormatPrecision.js.map +0 -1
  492. package/lib/imodel-components-react/quantityformat/FormatSample.d.ts.map +0 -1
  493. package/lib/imodel-components-react/quantityformat/FormatSample.js.map +0 -1
  494. package/lib/imodel-components-react/quantityformat/FormatType.d.ts.map +0 -1
  495. package/lib/imodel-components-react/quantityformat/FormatType.js.map +0 -1
  496. package/lib/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +0 -1
  497. package/lib/imodel-components-react/quantityformat/FormatUnitLabel.js.map +0 -1
  498. package/lib/imodel-components-react/quantityformat/FormatUnits.d.ts.map +0 -1
  499. package/lib/imodel-components-react/quantityformat/FormatUnits.js.map +0 -1
  500. package/lib/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +0 -1
  501. package/lib/imodel-components-react/quantityformat/MiscFormatOptions.js.map +0 -1
  502. package/lib/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +0 -1
  503. package/lib/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +0 -1
  504. package/lib/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +0 -1
  505. package/lib/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +0 -1
  506. package/lib/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +0 -1
  507. package/lib/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +0 -1
  508. package/lib/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +0 -1
  509. package/lib/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +0 -1
  510. package/lib/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +0 -1
  511. package/lib/imodel-components-react/quantityformat/misc/ScientificType.js.map +0 -1
  512. package/lib/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +0 -1
  513. package/lib/imodel-components-react/quantityformat/misc/SignOption.js.map +0 -1
  514. package/lib/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +0 -1
  515. package/lib/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +0 -1
  516. package/lib/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +0 -1
  517. package/lib/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +0 -1
  518. package/lib/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +0 -1
  519. package/lib/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +0 -1
  520. package/lib/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +0 -1
  521. package/lib/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +0 -1
  522. package/lib/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +0 -1
  523. package/lib/imodel-components-react/quantityformat/misc/UnitDescr.js.map +0 -1
  524. package/lib/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +0 -1
  525. package/lib/imodel-components-react/timeline/BaseSolarDataProvider.js.map +0 -1
  526. package/lib/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +0 -1
  527. package/lib/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +0 -1
  528. package/lib/imodel-components-react/timeline/ContextMenu.d.ts.map +0 -1
  529. package/lib/imodel-components-react/timeline/ContextMenu.js.map +0 -1
  530. package/lib/imodel-components-react/timeline/InlineEdit.d.ts.map +0 -1
  531. package/lib/imodel-components-react/timeline/InlineEdit.js.map +0 -1
  532. package/lib/imodel-components-react/timeline/PlayerButton.d.ts.map +0 -1
  533. package/lib/imodel-components-react/timeline/PlayerButton.js.map +0 -1
  534. package/lib/imodel-components-react/timeline/Scrubber.d.ts.map +0 -1
  535. package/lib/imodel-components-react/timeline/Scrubber.js.map +0 -1
  536. package/lib/imodel-components-react/timeline/SolarTimeline.d.ts.map +0 -1
  537. package/lib/imodel-components-react/timeline/SolarTimeline.js.map +0 -1
  538. package/lib/imodel-components-react/timeline/SpeedTimeline.d.ts.map +0 -1
  539. package/lib/imodel-components-react/timeline/SpeedTimeline.js.map +0 -1
  540. package/lib/imodel-components-react/timeline/TimelineComponent.d.ts.map +0 -1
  541. package/lib/imodel-components-react/timeline/TimelineComponent.js.map +0 -1
  542. package/lib/imodel-components-react/timeline/interfaces.d.ts.map +0 -1
  543. package/lib/imodel-components-react/timeline/interfaces.js.map +0 -1
  544. package/lib/imodel-components-react/viewport/ViewportComponent.d.ts.map +0 -1
  545. package/lib/imodel-components-react/viewport/ViewportComponent.js.map +0 -1
  546. package/lib/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +0 -1
  547. package/lib/imodel-components-react/viewport/ViewportComponentEvents.js.map +0 -1
  548. package/lib/imodel-components-react.d.ts.map +0 -1
  549. package/lib/imodel-components-react.js.map +0 -1
@@ -0,0 +1,48 @@
1
+ /** @packageDocumentation
2
+ * @module PropertyEditors
3
+ */
4
+ import "./WeightEditor.scss";
5
+ import * as React from "react";
6
+ import { PropertyValue } from "@itwin/appui-abstract";
7
+ import { PropertyEditorBase, PropertyEditorProps, TypeEditor } from "@itwin/components-react";
8
+ /** @internal */
9
+ interface WeightEditorState {
10
+ weightValue: number;
11
+ readonly: boolean;
12
+ isDisabled?: boolean;
13
+ }
14
+ /** WeightEditor React component that is a property editor for picking a weight using a [[WeightPickerButton]] component
15
+ * @public
16
+ */
17
+ export declare class WeightEditor extends React.PureComponent<PropertyEditorProps, WeightEditorState> implements TypeEditor {
18
+ private _control;
19
+ private _isMounted;
20
+ private _availableWeights;
21
+ private _divElement;
22
+ /** @internal */
23
+ readonly state: Readonly<WeightEditorState>;
24
+ constructor(props: PropertyEditorProps);
25
+ getPropertyValue(): Promise<PropertyValue | undefined>;
26
+ get htmlElement(): HTMLElement | null;
27
+ get hasFocus(): boolean;
28
+ private setFocus;
29
+ private _onLineWeightPick;
30
+ /** @internal */
31
+ componentDidMount(): void;
32
+ /** @internal */
33
+ componentWillUnmount(): void;
34
+ /** @internal */
35
+ componentDidUpdate(prevProps: PropertyEditorProps): void;
36
+ private setStateFromProps;
37
+ /** @internal */
38
+ render(): JSX.Element;
39
+ }
40
+ /** Weight Property Editor registered for the "number" type name and "weight-picker" editor name.
41
+ * It uses the [[WeightEditor]] React component.
42
+ * @public
43
+ */
44
+ export declare class WeightPropertyEditor extends PropertyEditorBase {
45
+ get reactNode(): React.ReactNode;
46
+ }
47
+ export {};
48
+ //# sourceMappingURL=WeightEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeightEditor.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/editors/WeightEditor.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkB,aAAa,EAA+D,MAAM,uBAAuB,CAAC;AACnI,OAAO,EAAE,kBAAkB,EAAyB,mBAAmB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrH,gBAAgB;AAChB,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE,iBAAiB,CAAE,YAAW,UAAU;IACjH,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,iBAAiB,CAAgB;IACzC,OAAO,CAAC,WAAW,CAAqC;IAExD,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAGzD;gBAEU,KAAK,EAAE,mBAAmB;IAgBzB,gBAAgB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAgBnE,IAAW,WAAW,IAAI,WAAW,GAAG,IAAI,CAE3C;IAED,IAAW,QAAQ,IAAI,OAAO,CAM7B;IAED,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,iBAAiB,CAevB;IAEF,gBAAgB;IACA,iBAAiB;IAKjC,gBAAgB;IACA,oBAAoB;IAIpC,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,mBAAmB;YAMnD,iBAAiB;IAwB/B,gBAAgB;IACA,MAAM;CAavB;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,kBAAkB;IAE1D,IAAW,SAAS,IAAI,KAAK,CAAC,SAAS,CAEtC;CACF"}
@@ -0,0 +1,134 @@
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 PropertyEditors
7
+ */
8
+ import "./WeightEditor.scss";
9
+ import classnames from "classnames";
10
+ import * as React from "react";
11
+ import { PropertyValueFormat, StandardEditorNames, StandardTypeNames } from "@itwin/appui-abstract";
12
+ import { PropertyEditorBase, PropertyEditorManager } from "@itwin/components-react";
13
+ import { WeightPickerButton } from "../lineweight/WeightPickerButton";
14
+ /** WeightEditor React component that is a property editor for picking a weight using a [[WeightPickerButton]] component
15
+ * @public
16
+ */
17
+ export class WeightEditor extends React.PureComponent {
18
+ constructor(props) {
19
+ super(props);
20
+ this._control = null;
21
+ this._isMounted = false;
22
+ this._availableWeights = [];
23
+ this._divElement = React.createRef();
24
+ /** @internal */
25
+ this.state = {
26
+ weightValue: 0,
27
+ readonly: false,
28
+ };
29
+ this._onLineWeightPick = (weight) => {
30
+ const propertyRecord = this.props.propertyRecord;
31
+ this.setState({
32
+ weightValue: weight,
33
+ }, async () => {
34
+ // istanbul ignore else
35
+ if (propertyRecord && this.props.onCommit) {
36
+ const propertyValue = await this.getPropertyValue();
37
+ // istanbul ignore else
38
+ if (propertyValue !== undefined) {
39
+ this.props.onCommit({ propertyRecord, newValue: propertyValue });
40
+ }
41
+ }
42
+ });
43
+ };
44
+ // TODO: add support for following if we need to specify set of weights to display
45
+ // const record = this.props.propertyRecord;
46
+ // if (record && record.property && record.property.editor && record.property.editor.params) {
47
+ // const weightParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.ColorData) as WeightEditorParams;
48
+ // // istanbul ignore else
49
+ // if (weightParams) {
50
+ // weightParams.weightValues.forEach((weight: number) => {
51
+ // this._availableWeights.push(weight);
52
+ // });
53
+ // }
54
+ // }
55
+ }
56
+ async getPropertyValue() {
57
+ const record = this.props.propertyRecord;
58
+ let propertyValue;
59
+ // istanbul ignore else
60
+ if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {
61
+ propertyValue = {
62
+ valueFormat: PropertyValueFormat.Primitive,
63
+ value: this.state.weightValue,
64
+ displayValue: "",
65
+ };
66
+ }
67
+ return propertyValue;
68
+ }
69
+ get htmlElement() {
70
+ return this._divElement.current;
71
+ }
72
+ get hasFocus() {
73
+ let containsFocus = false;
74
+ // istanbul ignore else
75
+ if (this._divElement.current)
76
+ containsFocus = this._divElement.current.contains(document.activeElement);
77
+ return containsFocus;
78
+ }
79
+ setFocus() {
80
+ // istanbul ignore else
81
+ if (this._control && !this.state.isDisabled) {
82
+ this._control.setFocus();
83
+ }
84
+ }
85
+ /** @internal */
86
+ componentDidMount() {
87
+ this._isMounted = true;
88
+ this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises
89
+ }
90
+ /** @internal */
91
+ componentWillUnmount() {
92
+ this._isMounted = false;
93
+ }
94
+ /** @internal */
95
+ componentDidUpdate(prevProps) {
96
+ if (this.props.propertyRecord !== prevProps.propertyRecord) {
97
+ this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises
98
+ }
99
+ }
100
+ async setStateFromProps() {
101
+ const record = this.props.propertyRecord;
102
+ let initialValue = 0;
103
+ // istanbul ignore else
104
+ if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {
105
+ initialValue = record.value.value;
106
+ }
107
+ const readonly = record && undefined !== record.isReadonly ? record.isReadonly : false;
108
+ const isDisabled = record ? record.isDisabled : undefined;
109
+ // istanbul ignore else
110
+ if (this._isMounted)
111
+ this.setState({ weightValue: initialValue, readonly, isDisabled }, () => {
112
+ if (this.props.setFocus) {
113
+ this.setFocus();
114
+ }
115
+ });
116
+ }
117
+ /** @internal */
118
+ render() {
119
+ return (React.createElement("div", { className: classnames("components-weight-editor", this.props.className), style: this.props.style, ref: this._divElement },
120
+ React.createElement(WeightPickerButton, { ref: (control) => this._control = control, activeWeight: this.state.weightValue, weights: this._availableWeights.length > 0 ? /* istanbul ignore next */ this._availableWeights : undefined, disabled: this.state.isDisabled ? true : false, readonly: this.state.readonly, onLineWeightPick: this._onLineWeightPick, "data-testid": "components-weight-editor" })));
121
+ }
122
+ }
123
+ /** Weight Property Editor registered for the "number" type name and "weight-picker" editor name.
124
+ * It uses the [[WeightEditor]] React component.
125
+ * @public
126
+ */
127
+ export class WeightPropertyEditor extends PropertyEditorBase {
128
+ // istanbul ignore next
129
+ get reactNode() {
130
+ return React.createElement(WeightEditor, null);
131
+ }
132
+ }
133
+ PropertyEditorManager.registerEditor(StandardTypeNames.Number, WeightPropertyEditor, StandardEditorNames.WeightPicker);
134
+ //# sourceMappingURL=WeightEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeightEditor.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/editors/WeightEditor.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiC,mBAAmB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACnI,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAmC,MAAM,yBAAyB,CAAC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B,CAAC,CAAC,CAAC,SAAS,EAC1G,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAC9C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,iBAC5B,0BAA0B,GAAG,CACvC,CACP,CAAC;IACJ,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,oBAAqB,SAAQ,kBAAkB;IAC1D,uBAAuB;IACvB,IAAW,SAAS;QAClB,OAAO,oBAAC,YAAY,OAAG,CAAC;IAC1B,CAAC;CACF;AAED,qBAAqB,CAAC,cAAc,CAAC,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC","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 PropertyEditors\n */\n\nimport \"./WeightEditor.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { PropertyRecord, PropertyValue, PropertyValueFormat, StandardEditorNames, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { PropertyEditorBase, PropertyEditorManager, PropertyEditorProps, TypeEditor } from \"@itwin/components-react\";\nimport { WeightPickerButton } from \"../lineweight/WeightPickerButton\";\n\n// cspell:ignore lineweight\n\n/** @internal */\ninterface WeightEditorState {\n weightValue: number;\n readonly: boolean;\n isDisabled?: boolean;\n}\n\n/** WeightEditor React component that is a property editor for picking a weight using a [[WeightPickerButton]] component\n * @public\n */\nexport class WeightEditor extends React.PureComponent<PropertyEditorProps, WeightEditorState> implements TypeEditor {\n private _control: any | null = null;\n private _isMounted = false;\n private _availableWeights: number[] = [];\n private _divElement = React.createRef<HTMLDivElement>();\n\n /** @internal */\n public override readonly state: Readonly<WeightEditorState> = {\n weightValue: 0,\n readonly: false,\n };\n\n constructor(props: PropertyEditorProps) {\n super(props);\n\n // TODO: add support for following if we need to specify set of weights to display\n // const record = this.props.propertyRecord;\n // if (record && record.property && record.property.editor && record.property.editor.params) {\n // const weightParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.ColorData) as WeightEditorParams;\n // // istanbul ignore else\n // if (weightParams) {\n // weightParams.weightValues.forEach((weight: number) => {\n // this._availableWeights.push(weight);\n // });\n // }\n // }\n }\n\n public async getPropertyValue(): Promise<PropertyValue | undefined> {\n const record = this.props.propertyRecord;\n let propertyValue: PropertyValue | undefined;\n\n // istanbul ignore else\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\n propertyValue = {\n valueFormat: PropertyValueFormat.Primitive,\n value: this.state.weightValue,\n displayValue: \"\",\n };\n }\n\n return propertyValue;\n }\n\n public get htmlElement(): HTMLElement | null {\n return this._divElement.current;\n }\n\n public get hasFocus(): boolean {\n let containsFocus = false;\n // istanbul ignore else\n if (this._divElement.current)\n containsFocus = this._divElement.current.contains(document.activeElement);\n return containsFocus;\n }\n\n private setFocus(): void {\n // istanbul ignore else\n if (this._control && !this.state.isDisabled) {\n this._control.setFocus();\n }\n }\n\n private _onLineWeightPick = (weight: number) => {\n const propertyRecord = this.props.propertyRecord as PropertyRecord;\n\n this.setState({\n weightValue: weight,\n }, async () => {\n // istanbul ignore else\n if (propertyRecord && this.props.onCommit) {\n const propertyValue = await this.getPropertyValue();\n // istanbul ignore else\n if (propertyValue !== undefined) {\n this.props.onCommit({ propertyRecord, newValue: propertyValue });\n }\n }\n });\n };\n\n /** @internal */\n public override componentDidMount() {\n this._isMounted = true;\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: PropertyEditorProps) {\n if (this.props.propertyRecord !== prevProps.propertyRecord) {\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n }\n\n private async setStateFromProps() {\n const record = this.props.propertyRecord;\n let initialValue = 0;\n\n // istanbul ignore else\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\n initialValue = record.value.value as number;\n }\n\n const readonly = record && undefined !== record.isReadonly ? record.isReadonly : false;\n const isDisabled = record ? record.isDisabled : undefined;\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState(\n { weightValue: initialValue, readonly, isDisabled },\n () => {\n if (this.props.setFocus) {\n this.setFocus();\n }\n },\n );\n }\n\n /** @internal */\n public override render() {\n return (\n <div className={classnames(\"components-weight-editor\", this.props.className)} style={this.props.style} ref={this._divElement}>\n <WeightPickerButton ref={(control) => this._control = control}\n activeWeight={this.state.weightValue}\n weights={this._availableWeights.length > 0 ? /* istanbul ignore next */ this._availableWeights : undefined}\n disabled={this.state.isDisabled ? true : false}\n readonly={this.state.readonly}\n onLineWeightPick={this._onLineWeightPick}\n data-testid=\"components-weight-editor\" />\n </div>\n );\n }\n}\n\n/** Weight Property Editor registered for the \"number\" type name and \"weight-picker\" editor name.\n * It uses the [[WeightEditor]] React component.\n * @public\n */\nexport class WeightPropertyEditor extends PropertyEditorBase {\n // istanbul ignore next\n public get reactNode(): React.ReactNode {\n return <WeightEditor />;\n }\n}\n\nPropertyEditorManager.registerEditor(StandardTypeNames.Number, WeightPropertyEditor, StandardEditorNames.WeightPicker);\n"]}
@@ -0,0 +1,17 @@
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
+ @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
+ @import "~@itwin/itwinui-css/scss/style/typography";
7
+
8
+ $components-weight-editor-item-height: 100%;
9
+
10
+ .components-weight-editor {
11
+ font-family: $iui-font-family;
12
+ font-size: $iui-font-size;
13
+ color: $buic-foreground-body;
14
+ border: none;
15
+ box-sizing: border-box;
16
+ height: $components-weight-editor-item-height;
17
+ }
@@ -0,0 +1,26 @@
1
+ /** @packageDocumentation
2
+ * @module Inputs
3
+ */
4
+ import * as React from "react";
5
+ import { QuantityTypeArg } from "@itwin/core-frontend";
6
+ import { CommonProps } from "@itwin/core-react";
7
+ /** Props for [[QuantityInput]] control
8
+ * @beta
9
+ */
10
+ export interface QuantityProps extends CommonProps {
11
+ /** Initial magnitude in 'persistence' units. See `getPersistenceUnitByQuantityType` in [QuantityFormatter]($core-frontend) */
12
+ initialValue: number;
13
+ /** Type of quantity being input. */
14
+ quantityType: QuantityTypeArg;
15
+ /** Function to call in the quantity value is changed. The value returned will be in 'persistence' units. */
16
+ onQuantityChange: (newQuantityValue: number) => void;
17
+ /** Set to `true` if value is for display only */
18
+ readonly?: boolean;
19
+ /** Provides ability to return reference to HTMLInputElement */
20
+ ref?: React.Ref<HTMLInputElement>;
21
+ }
22
+ /** Input control that allows users to input a quantity and show the formatted string that represents the value.
23
+ * @beta
24
+ */
25
+ export declare function QuantityInput({ initialValue, quantityType, readonly, className, style, onQuantityChange, ref }: QuantityProps): JSX.Element;
26
+ //# sourceMappingURL=QuantityInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityInput.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/inputs/QuantityInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAyC,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG9F,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,8HAA8H;IAC9H,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,YAAY,EAAE,eAAe,CAAC;IAC9B,4GAA4G;IAC5G,gBAAgB,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,EAAE,aAAa,eA6D7H"}
@@ -0,0 +1,71 @@
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 Inputs
7
+ */
8
+ import classnames from "classnames";
9
+ import * as React from "react";
10
+ import { IModelApp } from "@itwin/core-frontend";
11
+ import { Parser } from "@itwin/core-quantity";
12
+ import { UiIModelComponents } from "../UiIModelComponents";
13
+ import { ParsedInput } from "@itwin/components-react";
14
+ /** Input control that allows users to input a quantity and show the formatted string that represents the value.
15
+ * @beta
16
+ */
17
+ export function QuantityInput({ initialValue, quantityType, readonly, className, style, onQuantityChange, ref }) {
18
+ const [formatterSpec, setFormatterSpec] = React.useState(() => IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType));
19
+ const [parserSpec, setParserSpec] = React.useState(() => IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));
20
+ const formatValue = React.useCallback((value) => {
21
+ // istanbul ignore else
22
+ if (formatterSpec) {
23
+ return formatterSpec.applyFormatting(value);
24
+ }
25
+ // istanbul ignore next
26
+ return value.toFixed(2);
27
+ }, [formatterSpec]);
28
+ const parseString = React.useCallback((userInput) => {
29
+ // istanbul ignore else
30
+ if (parserSpec) {
31
+ const parseResult = IModelApp.quantityFormatter.parseToQuantityValue(userInput, parserSpec);
32
+ // istanbul ignore else
33
+ if (Parser.isParsedQuantity(parseResult)) {
34
+ return { value: parseResult.value };
35
+ }
36
+ else {
37
+ const statusId = Parser.isParseError(parseResult) ? parseResult.error.toString() : "Unknown";
38
+ return { parseError: `${UiIModelComponents.translate("QuantityInput.NoParserDefined")}${statusId}` };
39
+ }
40
+ }
41
+ // istanbul ignore next
42
+ return { parseError: UiIModelComponents.translate("QuantityInput.NoParserDefined") };
43
+ }, [parserSpec]);
44
+ const classNames = classnames(className, "components-quantity-input");
45
+ React.useEffect(() => {
46
+ const handleUnitSystemChanged = (() => {
47
+ setFormatterSpec(IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType));
48
+ setParserSpec(IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));
49
+ });
50
+ IModelApp.quantityFormatter.onActiveFormattingUnitSystemChanged.addListener(handleUnitSystemChanged);
51
+ return () => {
52
+ IModelApp.quantityFormatter.onActiveFormattingUnitSystemChanged.removeListener(handleUnitSystemChanged);
53
+ };
54
+ }, [quantityType]);
55
+ React.useEffect(() => {
56
+ const handleUnitSystemChanged = ((args) => {
57
+ const quantityKey = IModelApp.quantityFormatter.getQuantityTypeKey(quantityType);
58
+ // istanbul ignore else
59
+ if (args.quantityType === quantityKey) {
60
+ setFormatterSpec(IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType));
61
+ setParserSpec(IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));
62
+ }
63
+ });
64
+ IModelApp.quantityFormatter.onQuantityFormatsChanged.addListener(handleUnitSystemChanged);
65
+ return () => {
66
+ IModelApp.quantityFormatter.onQuantityFormatsChanged.removeListener(handleUnitSystemChanged);
67
+ };
68
+ }, [quantityType]);
69
+ return React.createElement(ParsedInput, { "data-testid": "components-quantity-input", ref: ref, style: style, className: classNames, onChange: onQuantityChange, initialValue: initialValue, readonly: readonly, formatValue: formatValue, parseString: parseString });
70
+ }
71
+ //# sourceMappingURL=QuantityInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Qu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J,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAgC,EAAQ,EAAE;YAC1E,MAAM,WAAW,GAAG,SAAS,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;YACjF,uBAAuB;YACvB,IAAI,IAAI,CAAC,YAAY,KAAK,WAAW,EAAE;gBACrC,gBAAgB,CAAC,SAAS,CAAC,iBAAiB,CAAC,+BAA+B,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC5F,aAAa,CAAC,SAAS,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC,CAAC;aACvF;QACH,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;QAC1F,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC;QAC/F,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,oBAAC,WAAW,mBAAa,2BAA2B,EAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EACvG,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAI,CAAC;AACvI,CAAC","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 Inputs\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { IModelApp, QuantityFormatsChangedArgs, QuantityTypeArg } from \"@itwin/core-frontend\";\nimport { Parser } from \"@itwin/core-quantity\";\nimport { ParseResults } from \"@itwin/appui-abstract\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport { ParsedInput } from \"@itwin/components-react\";\n\n/** Props for [[QuantityInput]] control\n * @beta\n */\nexport interface QuantityProps extends CommonProps {\n /** Initial magnitude in 'persistence' units. See `getPersistenceUnitByQuantityType` in [QuantityFormatter]($core-frontend) */\n initialValue: number;\n /** Type of quantity being input. */\n quantityType: QuantityTypeArg;\n /** Function to call in the quantity value is changed. The value returned will be in 'persistence' units. */\n onQuantityChange: (newQuantityValue: number) => void;\n /** Set to `true` if value is for display only */\n readonly?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n ref?: React.Ref<HTMLInputElement>;\n}\n\n/** Input control that allows users to input a quantity and show the formatted string that represents the value.\n * @beta\n */\nexport function QuantityInput({ initialValue, quantityType, readonly, className, style, onQuantityChange, ref }: QuantityProps) {\n const [formatterSpec, setFormatterSpec] = React.useState(() => IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType));\n const [parserSpec, setParserSpec] = React.useState(() => IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));\n\n const formatValue = React.useCallback((value: number) => {\n // istanbul ignore else\n if (formatterSpec) {\n return formatterSpec.applyFormatting(value);\n }\n // istanbul ignore next\n return value.toFixed(2);\n }, [formatterSpec]);\n\n const parseString = React.useCallback((userInput: string): ParseResults => {\n // istanbul ignore else\n if (parserSpec) {\n const parseResult = IModelApp.quantityFormatter.parseToQuantityValue(userInput, parserSpec);\n // istanbul ignore else\n if (Parser.isParsedQuantity(parseResult)) {\n return { value: parseResult.value };\n } else {\n const statusId = Parser.isParseError(parseResult) ? parseResult.error.toString() : \"Unknown\";\n return { parseError: `${UiIModelComponents.translate(\"QuantityInput.NoParserDefined\")}${statusId}` };\n }\n }\n // istanbul ignore next\n return { parseError: UiIModelComponents.translate(\"QuantityInput.NoParserDefined\") };\n }, [parserSpec]);\n\n const classNames = classnames(className, \"components-quantity-input\");\n\n React.useEffect(() => {\n const handleUnitSystemChanged = ((): void => {\n setFormatterSpec(IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType));\n setParserSpec(IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));\n });\n\n IModelApp.quantityFormatter.onActiveFormattingUnitSystemChanged.addListener(handleUnitSystemChanged);\n return () => {\n IModelApp.quantityFormatter.onActiveFormattingUnitSystemChanged.removeListener(handleUnitSystemChanged);\n };\n }, [quantityType]);\n\n React.useEffect(() => {\n const handleUnitSystemChanged = ((args: QuantityFormatsChangedArgs): void => {\n const quantityKey = IModelApp.quantityFormatter.getQuantityTypeKey(quantityType);\n // istanbul ignore else\n if (args.quantityType === quantityKey) {\n setFormatterSpec(IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType));\n setParserSpec(IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));\n }\n });\n\n IModelApp.quantityFormatter.onQuantityFormatsChanged.addListener(handleUnitSystemChanged);\n return () => {\n IModelApp.quantityFormatter.onQuantityFormatsChanged.removeListener(handleUnitSystemChanged);\n };\n }, [quantityType]);\n\n return <ParsedInput data-testid=\"components-quantity-input\" ref={ref} style={style} className={classNames}\n onChange={onQuantityChange} initialValue={initialValue} readonly={readonly} formatValue={formatValue} parseString={parseString} />;\n}\n"]}
@@ -0,0 +1,45 @@
1
+ /** @packageDocumentation
2
+ * @module Inputs
3
+ */
4
+ import "./QuantityNumberInput.scss";
5
+ import * as React from "react";
6
+ import { QuantityTypeArg } from "@itwin/core-frontend";
7
+ import { InputProps } from "@itwin/itwinui-react";
8
+ /** Step function prototype for [[QuantityNumberInput]] component
9
+ * @beta
10
+ */
11
+ export declare type StepFunctionProp = number | ((direction: string) => number | undefined);
12
+ /** Properties for the [[QuantityNumberInput]] component
13
+ * @beta
14
+ */
15
+ export interface QuantityNumberInputProps extends Omit<InputProps, "value" | "min" | "max" | "step" | "onFocus" | "onChange"> {
16
+ /** Initial magnitude in 'persistence' units. See `getPersistenceUnitByQuantityType` in [QuantityFormatter]($core-frontend).
17
+ * Set to `undefined` to show placeholder text */
18
+ persistenceValue?: number;
19
+ /** CSS class name for the QuantityNumberInput component container div */
20
+ containerClassName?: string;
21
+ /** number or function Number.MIN_SAFE_INTEGER */
22
+ min?: number;
23
+ /** number or function defaults to Number.MAX_SAFE_INTEGER */
24
+ max?: number;
25
+ /** increment step value used while incrementing or decrementing (up/down buttons or arrow keys) defaults to 1. */
26
+ step?: StepFunctionProp;
27
+ /** Set to true to "snap" to the closest step value while incrementing or decrementing (up/down buttons or arrow keys). */
28
+ snap?: boolean;
29
+ /** Function to call when the quantity value is changed. The value returned will be in 'persistence' units. */
30
+ onChange?: (value: number) => void;
31
+ /** if true up/down buttons are shown larger and side by side */
32
+ showTouchButtons?: boolean;
33
+ /** Provides ability to return reference to HTMLInputElement */
34
+ ref?: React.Ref<HTMLInputElement>;
35
+ /** Type of quantity being input. */
36
+ quantityType: QuantityTypeArg;
37
+ }
38
+ /** The QuantityNumberInput component accepts input for quantity values. The quantity value is shown as a single numeric value and the quantity's
39
+ * "display" unit is shown next to the input control. The "display" unit is determined by the active unit system as defined by the [QuantityFormatter]($frontend).
40
+ * The control also display buttons to increment and decrement the "displayed" value. The value reported by via the onChange function is in "persistence"
41
+ * units that can be stored in the iModel.
42
+ * @beta
43
+ */
44
+ export declare const QuantityNumberInput: (props: QuantityNumberInputProps) => JSX.Element | null;
45
+ //# sourceMappingURL=QuantityNumberInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityNumberInput.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/inputs/QuantityNumberInput.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,4BAA4B,CAAC;AAEpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAyC,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE9F,OAAO,EAAS,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,oBAAY,gBAAgB,GAAG,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IAC3H;qDACiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kHAAkH;IAClH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,0HAA0H;IAC1H,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,oCAAoC;IACpC,YAAY,EAAE,eAAe,CAAC;CAC/B;AA0QD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,GAAG,CAAC,OAAO,GAAG,IAAoC,CAAC"}
@@ -0,0 +1,240 @@
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 Inputs
7
+ */
8
+ import "./QuantityNumberInput.scss";
9
+ import classnames from "classnames";
10
+ import * as React from "react";
11
+ import { WebFontIcon } from "@itwin/core-react";
12
+ import { SpecialKey } from "@itwin/appui-abstract";
13
+ import { IModelApp } from "@itwin/core-frontend";
14
+ import { DecimalPrecision, FormatterSpec, FormatTraits, FormatType, Parser } from "@itwin/core-quantity";
15
+ import { Input } from "@itwin/itwinui-react";
16
+ /** adjust formatter spec to show only primary unit without a label. */
17
+ function adjustFormatterSpec(formatterSpec) {
18
+ if (undefined === formatterSpec)
19
+ return formatterSpec;
20
+ const singleUnitConversion = [];
21
+ singleUnitConversion.push(formatterSpec.unitConversions[0]);
22
+ const newFormat = formatterSpec.format.clone({
23
+ showOnlyPrimaryUnit: true,
24
+ traits: formatterSpec.format.formatTraits & ~FormatTraits.ShowUnitLabel,
25
+ type: FormatType.Decimal,
26
+ precision: FormatType.Decimal !== formatterSpec.format.type ? DecimalPrecision.Four : formatterSpec.format.precision,
27
+ });
28
+ return new FormatterSpec("single-value", newFormat, singleUnitConversion, formatterSpec.persistenceUnit);
29
+ }
30
+ function convertValueFromDisplayToPersistence(value, unitConversions, unit) {
31
+ // istanbul ignore next
32
+ if (!unitConversions || 0 === unitConversions.length)
33
+ return value;
34
+ const unitConversion = unitConversions.find((spec) => spec.name === unit.name);
35
+ // istanbul ignore next
36
+ if (!unitConversion)
37
+ return value;
38
+ const convertedValue = (value * unitConversion.conversion.factor) + unitConversion.conversion.offset;
39
+ return convertedValue;
40
+ }
41
+ function getUnitLabel(parserSpec) {
42
+ if (undefined === parserSpec)
43
+ return "";
44
+ const format = parserSpec.format;
45
+ // istanbul ignore else
46
+ if (!format.units || !format.units[0])
47
+ return parserSpec.outUnit.label;
48
+ const [unit, label] = format.units[0];
49
+ // istanbul ignore next
50
+ return label !== null && label !== void 0 ? label : unit.label;
51
+ }
52
+ const ForwardRefQuantityNumberInput = React.forwardRef(function ForwardRefQuantityNumberInput(props, ref) {
53
+ const { containerClassName, persistenceValue, min, max, onChange, onBlur, onKeyDown, step, snap, showTouchButtons, quantityType, ...otherProps } = props;
54
+ const rawValueRef = React.useRef(persistenceValue);
55
+ const [formatterSpec, setFormatterSpec] = React.useState(() => adjustFormatterSpec(IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType)));
56
+ const [parserSpec, setParserSpec] = React.useState(() => IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));
57
+ const formatValue = React.useCallback((value) => {
58
+ if (undefined === value)
59
+ return "";
60
+ // istanbul ignore else
61
+ if (formatterSpec) {
62
+ return formatterSpec.applyFormatting(value);
63
+ }
64
+ // istanbul ignore next
65
+ return value.toFixed(2);
66
+ }, [formatterSpec]);
67
+ const lastFormattedValueRef = React.useRef(formatValue(persistenceValue));
68
+ const [formattedValue, setFormattedValue] = React.useState(() => lastFormattedValueRef.current);
69
+ React.useEffect(() => {
70
+ const handleUnitSystemChanged = (() => {
71
+ setFormatterSpec(adjustFormatterSpec(IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType)));
72
+ setParserSpec(IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));
73
+ });
74
+ IModelApp.quantityFormatter.onActiveFormattingUnitSystemChanged.addListener(handleUnitSystemChanged);
75
+ return () => {
76
+ IModelApp.quantityFormatter.onActiveFormattingUnitSystemChanged.removeListener(handleUnitSystemChanged);
77
+ };
78
+ }, [quantityType]);
79
+ React.useEffect(() => {
80
+ const handleUnitSystemChanged = ((args) => {
81
+ const quantityKey = IModelApp.quantityFormatter.getQuantityTypeKey(quantityType);
82
+ // istanbul ignore else
83
+ if (args.quantityType === quantityKey) {
84
+ setFormatterSpec(adjustFormatterSpec(IModelApp.quantityFormatter.findFormatterSpecByQuantityType(quantityType)));
85
+ setParserSpec(IModelApp.quantityFormatter.findParserSpecByQuantityType(quantityType));
86
+ }
87
+ });
88
+ IModelApp.quantityFormatter.onQuantityFormatsChanged.addListener(handleUnitSystemChanged);
89
+ return () => {
90
+ IModelApp.quantityFormatter.onQuantityFormatsChanged.removeListener(handleUnitSystemChanged);
91
+ };
92
+ }, [quantityType]);
93
+ const unitLabel = getUnitLabel(parserSpec);
94
+ // See if new initialValue props have changed since component mounted
95
+ React.useEffect(() => {
96
+ rawValueRef.current = persistenceValue;
97
+ const currentFormattedValue = formatValue(rawValueRef.current);
98
+ setFormattedValue(currentFormattedValue);
99
+ }, [formatValue, persistenceValue]);
100
+ // this is the unprocessed input from user, it is not processed until blur or enter key press
101
+ const handleDisplayValueChange = React.useCallback((event) => {
102
+ setFormattedValue(event.currentTarget.value);
103
+ }, []);
104
+ const updateValue = React.useCallback((newValue) => {
105
+ let persistedValue = newValue;
106
+ // istanbul ignore else
107
+ if (parserSpec) {
108
+ // convert value from display unit to persistence unit
109
+ const [unit] = parserSpec.format.units ? parserSpec.format.units[0] : /* istanbul ignore next */ [parserSpec.outUnit];
110
+ persistedValue = convertValueFromDisplayToPersistence(newValue, parserSpec.unitConversions, unit);
111
+ rawValueRef.current = persistedValue;
112
+ }
113
+ const newFormattedVal = formatValue(persistedValue);
114
+ onChange && onChange(persistedValue);
115
+ setFormattedValue(newFormattedVal);
116
+ }, [formatValue, onChange, parserSpec]);
117
+ /**
118
+ * Used internally to parse the argument x to it's numeric representation.
119
+ * If the argument cannot be converted to finite number returns 0; If a
120
+ * "precision" prop is specified uses it round the number with that
121
+ * precision (no fixed precision here because the return value is float, not
122
+ * string).
123
+ */
124
+ const parseInternal = React.useCallback((x) => {
125
+ if (!x)
126
+ return 0;
127
+ let n = parseFloat(x);
128
+ // istanbul ignore next
129
+ if (isNaN(n) || !isFinite(n)) {
130
+ n = 0;
131
+ }
132
+ const localPrecision = 6; // TODO get a reasonable value from format
133
+ const q = Math.pow(10, localPrecision);
134
+ const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;
135
+ const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;
136
+ n = Math.min(Math.max(n, localMin), localMax);
137
+ n = Math.round(n * q) / q;
138
+ return n;
139
+ }, [min, max]);
140
+ const updateValueFromString = React.useCallback((strValue) => {
141
+ // istanbul ignore else
142
+ if (parserSpec) {
143
+ const parseResult = IModelApp.quantityFormatter.parseToQuantityValue(strValue, parserSpec);
144
+ // at this point we should have a string value in persistence units without a label
145
+ if (Parser.isParsedQuantity(parseResult)) {
146
+ const persistedValue = parseResult.value; // in persistence units
147
+ // set strValue and let it go through parseInternal which will ensure min/max limits are observed
148
+ strValue = formatValue(persistedValue);
149
+ }
150
+ else {
151
+ // istanbul ignore else
152
+ if (rawValueRef.current) { // restore last known good value
153
+ const lastKnownFormattedVal = formatValue(rawValueRef.current);
154
+ setFormattedValue(lastKnownFormattedVal);
155
+ return;
156
+ }
157
+ }
158
+ }
159
+ const newValue = parseInternal(strValue);
160
+ // istanbul ignore else
161
+ if (undefined !== newValue)
162
+ updateValue(newValue);
163
+ }, [formatValue, parseInternal, parserSpec, updateValue]);
164
+ const handleBlur = React.useCallback((event) => {
165
+ const newVal = parseInternal(event.target.value);
166
+ onBlur && onBlur(event);
167
+ updateValue(newVal);
168
+ }, [parseInternal, updateValue, onBlur]);
169
+ const getIncrementValue = React.useCallback((increment) => {
170
+ if (typeof step === "function") {
171
+ const stepVal = step(increment ? "up" : "down");
172
+ return stepVal ? stepVal : 1;
173
+ }
174
+ return !step ? 1 : step;
175
+ }, [step]);
176
+ /**
177
+ * The internal method that actually sets the new value on the input
178
+ */
179
+ const applyStep = React.useCallback((increment) => {
180
+ const incrementValue = getIncrementValue(increment);
181
+ let num = parseInternal(formattedValue) + (increment ? incrementValue : -incrementValue);
182
+ if (snap) {
183
+ num = Math.round(num / incrementValue) * incrementValue;
184
+ }
185
+ const localMin = undefined === min ? Number.MIN_SAFE_INTEGER : min;
186
+ const localMax = undefined === max ? Number.MAX_SAFE_INTEGER : max;
187
+ num = Math.min(Math.max(num, localMin), localMax);
188
+ updateValue(num);
189
+ }, [formattedValue, getIncrementValue, max, min, parseInternal, snap, updateValue]);
190
+ const handleKeyDown = React.useCallback((event) => {
191
+ // istanbul ignore else
192
+ if (event.key === SpecialKey.Enter) {
193
+ updateValueFromString(event.currentTarget.value);
194
+ event.preventDefault();
195
+ }
196
+ else if (event.key === SpecialKey.Escape) {
197
+ setFormattedValue(formatValue(rawValueRef.current));
198
+ event.preventDefault();
199
+ }
200
+ else if (event.key === SpecialKey.ArrowDown) {
201
+ applyStep(false);
202
+ event.preventDefault();
203
+ }
204
+ else if (event.key === SpecialKey.ArrowUp) {
205
+ applyStep(true);
206
+ event.preventDefault();
207
+ }
208
+ onKeyDown && onKeyDown(event);
209
+ }, [onKeyDown, updateValueFromString, formatValue, applyStep]);
210
+ const handleDownClick = React.useCallback((event) => {
211
+ applyStep(false);
212
+ event.preventDefault();
213
+ }, [applyStep]);
214
+ const handleUpClick = React.useCallback((event) => {
215
+ applyStep(true);
216
+ event.preventDefault();
217
+ }, [applyStep]);
218
+ // istanbul ignore next
219
+ const handleFocus = React.useCallback((event) => {
220
+ event.currentTarget.select();
221
+ }, []);
222
+ const containerClasses = classnames("component-quantity-number-input-container", containerClassName, showTouchButtons && "component-number-buttons-for-touch");
223
+ return (React.createElement("div", { className: containerClasses },
224
+ React.createElement("div", { className: "component-quantity-number-input-value-and-buttons-container" },
225
+ React.createElement(Input, { ref: ref, value: formattedValue, onChange: handleDisplayValueChange, onKeyDown: handleKeyDown, onBlur: handleBlur, onFocus: handleFocus, ...otherProps }),
226
+ React.createElement("div", { className: classnames("component-quantity-number-input-buttons-container", showTouchButtons && "component-number-buttons-for-touch") },
227
+ React.createElement("div", { className: "component-quantity-number-input-button component-quantity-number-input-button-up", tabIndex: -1, onClick: handleUpClick },
228
+ React.createElement(WebFontIcon, { iconName: "icon-caret-up" })),
229
+ React.createElement("div", { className: "component-quantity-number-input-button component-quantity-number-input-button-down", tabIndex: -1, onClick: handleDownClick },
230
+ React.createElement(WebFontIcon, { iconName: "icon-caret-down" })))),
231
+ React.createElement("span", { className: "component-quantity-number-input-suffix" }, unitLabel)));
232
+ });
233
+ /** The QuantityNumberInput component accepts input for quantity values. The quantity value is shown as a single numeric value and the quantity's
234
+ * "display" unit is shown next to the input control. The "display" unit is determined by the active unit system as defined by the [QuantityFormatter]($frontend).
235
+ * The control also display buttons to increment and decrement the "displayed" value. The value reported by via the onChange function is in "persistence"
236
+ * units that can be stored in the iModel.
237
+ * @beta
238
+ */
239
+ export const QuantityNumberInput = ForwardRefQuantityNumberInput;
240
+ //# sourceMappingURL=QuantityNumberInput.js.map