@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,159 @@
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 QuantityFormat
7
+ */
8
+ import classnames from "classnames";
9
+ import * as React from "react";
10
+ import { SpecialKey } from "@itwin/appui-abstract";
11
+ import { Checkbox } from "@itwin/itwinui-react";
12
+ import { Format, FormatTraits, FormatType, ScientificType } from "@itwin/core-quantity";
13
+ import { SignOptionSelector } from "./misc/SignOption";
14
+ import { ThousandsSeparator } from "./misc/ThousandsSeparator";
15
+ import { DecimalSeparatorSelector } from "./misc/DecimalSeparator";
16
+ import { ScientificTypeSelector } from "./misc/ScientificType";
17
+ import { StationSeparatorSelector } from "./misc/StationSeparatorSelector";
18
+ import { StationSizeSelector } from "./misc/StationSizeSelector";
19
+ import { UiIModelComponents } from "../UiIModelComponents";
20
+ /** Component use to set miscellaneous properties is a Formatted Quantity.
21
+ * @alpha
22
+ */
23
+ export function MiscFormatOptions(props) {
24
+ var _a, _b;
25
+ const { formatProps, onChange, showOptions, onShowHideOptions, enableMinimumProperties } = props;
26
+ const handleSetFormatProps = React.useCallback((newFormatProps) => {
27
+ onChange && onChange(newFormatProps);
28
+ }, [onChange]);
29
+ const isFormatTraitSet = React.useCallback((trait) => {
30
+ return Format.isFormatTraitSetInProps(formatProps, trait);
31
+ }, [formatProps]);
32
+ const handleShowSignChange = React.useCallback((option) => {
33
+ const newShowSignOption = Format.showSignOptionToString(option);
34
+ const newFormatProps = { ...formatProps, showSignOption: newShowSignOption };
35
+ handleSetFormatProps(newFormatProps);
36
+ }, [formatProps, handleSetFormatProps]);
37
+ const setFormatTrait = React.useCallback((trait, setActive) => {
38
+ const traitStr = Format.getTraitString(trait);
39
+ let formatTraits = [traitStr];
40
+ if (setActive) { // setting trait
41
+ // istanbul ignore else
42
+ if (formatProps.formatTraits) {
43
+ const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\|/);
44
+ // istanbul ignore else
45
+ if (!traits.find((traitEntry) => traitStr === traitEntry)) {
46
+ formatTraits = [...traits, traitStr];
47
+ }
48
+ }
49
+ }
50
+ else { // clearing trait
51
+ // istanbul ignore next
52
+ if (!formatProps.formatTraits)
53
+ return;
54
+ const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\|/);
55
+ formatTraits = traits.filter((traitEntry) => traitEntry !== traitStr);
56
+ }
57
+ const newFormatProps = { ...formatProps, formatTraits };
58
+ handleSetFormatProps(newFormatProps);
59
+ }, [formatProps, handleSetFormatProps]);
60
+ const handleShowTrailingZeroesChange = React.useCallback((e) => {
61
+ setFormatTrait(FormatTraits.TrailZeroes, e.target.checked);
62
+ }, [setFormatTrait]);
63
+ const handleKeepDecimalPointChange = React.useCallback((e) => {
64
+ setFormatTrait(FormatTraits.KeepDecimalPoint, e.target.checked);
65
+ }, [setFormatTrait]);
66
+ const handleKeepSingleZeroChange = React.useCallback((e) => {
67
+ setFormatTrait(FormatTraits.KeepSingleZero, e.target.checked);
68
+ }, [setFormatTrait]);
69
+ const handleZeroEmptyChange = React.useCallback((e) => {
70
+ setFormatTrait(FormatTraits.ZeroEmpty, e.target.checked);
71
+ }, [setFormatTrait]);
72
+ const handleUseFractionDashChange = React.useCallback((e) => {
73
+ setFormatTrait(FormatTraits.FractionDash, e.target.checked);
74
+ }, [setFormatTrait]);
75
+ const handleDecimalSeparatorChange = React.useCallback((decimalSeparator) => {
76
+ let thousandSeparator = formatProps.thousandSeparator;
77
+ // make sure 1000 and decimal separator do not match
78
+ // istanbul ignore else
79
+ if (isFormatTraitSet(FormatTraits.Use1000Separator)) {
80
+ switch (decimalSeparator) {
81
+ case ".":
82
+ thousandSeparator = ",";
83
+ break;
84
+ case ",":
85
+ thousandSeparator = ".";
86
+ break;
87
+ }
88
+ }
89
+ const newFormatProps = { ...formatProps, thousandSeparator, decimalSeparator };
90
+ handleSetFormatProps(newFormatProps);
91
+ }, [formatProps, isFormatTraitSet, handleSetFormatProps]);
92
+ const handleScientificTypeChange = React.useCallback((type) => {
93
+ const newFormatProps = { ...formatProps, scientificType: Format.scientificTypeToString(type) };
94
+ handleSetFormatProps(newFormatProps);
95
+ }, [formatProps, handleSetFormatProps]);
96
+ const handleFormatChange = React.useCallback((newFormatProps) => {
97
+ handleSetFormatProps(newFormatProps);
98
+ }, [handleSetFormatProps]);
99
+ const formatType = React.useMemo(() => Format.parseFormatType(formatProps.type, "format"), [formatProps.type]);
100
+ const showSignOption = React.useMemo(() => { var _a; return Format.parseShowSignOption((_a = formatProps.showSignOption) !== null && _a !== void 0 ? _a : "onlyNegative", "format"); }, [formatProps.showSignOption]);
101
+ const handleToggleButtonClick = React.useCallback(() => {
102
+ onShowHideOptions(!showOptions);
103
+ }, [onShowHideOptions, showOptions]);
104
+ const handleKeyUpOnLink = React.useCallback((e) => {
105
+ // istanbul ignore else
106
+ if (e.key === SpecialKey.Enter || e.key === SpecialKey.Space) {
107
+ onShowHideOptions(!showOptions);
108
+ e.preventDefault();
109
+ }
110
+ }, [onShowHideOptions, showOptions]);
111
+ const handleStationSeparatorChange = React.useCallback((value) => {
112
+ const newFormatProps = { ...formatProps, stationSeparator: value };
113
+ handleSetFormatProps(newFormatProps);
114
+ }, [formatProps, handleSetFormatProps]);
115
+ const handleStationOffsetChange = React.useCallback((value) => {
116
+ const newFormatProps = { ...formatProps, stationOffsetSize: value };
117
+ handleSetFormatProps(newFormatProps);
118
+ }, [formatProps, handleSetFormatProps]);
119
+ const signOptionLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.signOptionLabel"));
120
+ const stationOffsetLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.stationOffsetLabel"));
121
+ const stationSeparatorLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.stationSeparatorLabel"));
122
+ const decimalSeparatorLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.decimalSeparatorLabel"));
123
+ const showTrailZerosLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.showTrailZerosLabel"));
124
+ const keepSingleZeroLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.keepSingleZeroLabel"));
125
+ const zeroEmptyLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.zeroEmptyLabel"));
126
+ const moreLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.moreLabel"));
127
+ const lessLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.lessLabel"));
128
+ const keepDecimalPointLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.keepDecimalPointLabel"));
129
+ const fractionDashLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.fractionDashLabel"));
130
+ const scientificTypeLabel = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.scientificTypeLabel"));
131
+ return (React.createElement(React.Fragment, null,
132
+ enableMinimumProperties && !showOptions && React.createElement("a", { onClick: handleToggleButtonClick, onKeyUp: handleKeyUpOnLink, className: "components-quantityFormat-more-less", role: "link", "data-testid": "quantityFormat-more", tabIndex: 0 }, moreLabel.current),
133
+ (!enableMinimumProperties || showOptions) &&
134
+ React.createElement(React.Fragment, null,
135
+ React.createElement("span", { className: "uicore-label" }, signOptionLabel.current),
136
+ React.createElement(SignOptionSelector, { "data-testid": "sign-option-selector", signOption: showSignOption, onChange: handleShowSignChange }),
137
+ React.createElement("span", { className: classnames("uicore-label", formatType !== FormatType.Station && "uicore-disabled") }, stationOffsetLabel.current),
138
+ React.createElement(StationSizeSelector, { "data-testid": "station-size-selector", value: ((_a = formatProps.stationOffsetSize) !== null && _a !== void 0 ? _a : 2), disabled: formatType !== FormatType.Station, onChange: handleStationOffsetChange }),
139
+ React.createElement("span", { className: classnames("uicore-label", formatType !== FormatType.Station && "uicore-disabled") }, stationSeparatorLabel.current),
140
+ React.createElement(StationSeparatorSelector, { "data-testid": "station-separator-selector", separator: (undefined !== formatProps.stationSeparator ? formatProps.stationSeparator : "+"), disabled: formatType !== FormatType.Station, onChange: handleStationSeparatorChange }),
141
+ React.createElement(ThousandsSeparator, { formatProps: formatProps, onChange: handleFormatChange }),
142
+ React.createElement("span", { className: classnames("uicore-label", formatType === FormatType.Fractional && "uicore-disabled") }, decimalSeparatorLabel.current),
143
+ React.createElement(DecimalSeparatorSelector, { "data-testid": "decimal-separator-selector", separator: (_b = formatProps.decimalSeparator) !== null && _b !== void 0 ? _b : ".", onChange: handleDecimalSeparatorChange, disabled: formatType === FormatType.Fractional }),
144
+ React.createElement("span", { className: "uicore-label" }, showTrailZerosLabel.current),
145
+ React.createElement(Checkbox, { "data-testid": "show-trail-zeros", checked: isFormatTraitSet(FormatTraits.TrailZeroes), onChange: handleShowTrailingZeroesChange }),
146
+ React.createElement("span", { className: classnames("uicore-label", formatType === FormatType.Fractional && "uicore-disabled") }, keepDecimalPointLabel.current),
147
+ React.createElement(Checkbox, { "data-testid": "keep-decimal-point", checked: isFormatTraitSet(FormatTraits.KeepDecimalPoint), onChange: handleKeepDecimalPointChange }),
148
+ React.createElement("span", { className: "uicore-label" }, keepSingleZeroLabel.current),
149
+ React.createElement(Checkbox, { "data-testid": "keep-single-zero", checked: isFormatTraitSet(FormatTraits.KeepSingleZero), onChange: handleKeepSingleZeroChange }),
150
+ React.createElement("span", { className: "uicore-label" }, zeroEmptyLabel.current),
151
+ React.createElement(Checkbox, { "data-testid": "zero-empty", checked: isFormatTraitSet(FormatTraits.ZeroEmpty), onChange: handleZeroEmptyChange }),
152
+ React.createElement("span", { className: classnames("uicore-label", formatType !== FormatType.Fractional && "uicore-disabled") }, fractionDashLabel.current),
153
+ React.createElement(Checkbox, { "data-testid": "fraction-dash", checked: isFormatTraitSet(FormatTraits.FractionDash), onChange: handleUseFractionDashChange, disabled: formatType !== FormatType.Fractional }),
154
+ React.createElement("span", { className: classnames("uicore-label", formatType !== FormatType.Scientific && "uicore-disabled") }, scientificTypeLabel.current),
155
+ React.createElement(ScientificTypeSelector, { "data-testid": "scientific-type-selector", type: (formatProps.scientificType && formatProps.scientificType.length > 0) ? Format.parseScientificType(formatProps.scientificType, "custom") : ScientificType.Normalized, disabled: formatType !== FormatType.Scientific, onChange: handleScientificTypeChange }),
156
+ props.children,
157
+ enableMinimumProperties && showOptions && React.createElement("a", { onClick: handleToggleButtonClick, onKeyUp: handleKeyUpOnLink, className: "components-quantityFormat-more-less", role: "link", "data-testid": "quantityFormat-less", tabIndex: 0 }, lessLabel.current))));
158
+ }
159
+ //# sourceMappingURL=MiscFormatOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MiscFormatOptions.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/MiscFormatOptions.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD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AAiB,CAAC,IAAG,iBAAiB,CAAC,OAAO,CAAQ;gBAC1I,oBAAC,QAAQ,mBAAa,eAAe,EAAC,OAAO,EAAE,gBAAgB,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,2BAA2B,EAAE,QAAQ,EAAE,UAAU,KAAK,UAAU,CAAC,UAAU,GAAI;gBAErL,8BAAM,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,UAAU,KAAK,UAAU,CAAC,UAAU,IAAI,iBAAiB,CAAC,IAAG,mBAAmB,CAAC,OAAO,CAAQ;gBAC5I,oBAAC,sBAAsB,mBAAa,0BAA0B,EAAC,IAAI,EAAE,CAAC,WAAW,CAAC,cAAc,IAAI,WAAW,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,UAAU,EACvO,QAAQ,EAAE,UAAU,KAAK,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,0BAA0B,GAAI;gBAEzF,KAAK,CAAC,QAAQ;gBAGb,uBAAuB,IAAI,WAAW,IAAI,2BAAG,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,iBAAiB,EACvG,SAAS,EAAE,qCAAqC,EAAE,IAAI,EAAC,MAAM,iBAAa,qBAAqB,EAAC,QAAQ,EAAE,CAAC,IAAG,SAAS,CAAC,OAAO,CAAK,CACvI,CAEJ,CACJ,CAAC;AACJ,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 QuantityFormat\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { SpecialKey } from \"@itwin/appui-abstract\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport { Format, FormatProps, FormatTraits, FormatType, ScientificType, ShowSignOption } from \"@itwin/core-quantity\";\nimport { SignOptionSelector } from \"./misc/SignOption\";\nimport { ThousandsSeparator } from \"./misc/ThousandsSeparator\";\nimport { DecimalSeparatorSelector } from \"./misc/DecimalSeparator\";\nimport { ScientificTypeSelector } from \"./misc/ScientificType\";\nimport { StationSeparatorSelector } from \"./misc/StationSeparatorSelector\";\nimport { StationSizeSelector } from \"./misc/StationSizeSelector\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\n\n/** Properties of [[MiscFormatOptions]] component.\n * @alpha\n */\nexport interface MiscFormatOptionsProps extends CommonProps {\n formatProps: FormatProps;\n onChange?: (format: FormatProps) => void;\n enableMinimumProperties?: boolean;\n showOptions: boolean;\n onShowHideOptions: (show: boolean) => void;\n children?: React.ReactNode;\n}\n\n/** Component use to set miscellaneous properties is a Formatted Quantity.\n * @alpha\n */\nexport function MiscFormatOptions(props: MiscFormatOptionsProps) {\n const { formatProps, onChange, showOptions, onShowHideOptions, enableMinimumProperties } = props;\n\n const handleSetFormatProps = React.useCallback((newFormatProps: FormatProps) => {\n onChange && onChange(newFormatProps);\n }, [onChange]);\n\n const isFormatTraitSet = React.useCallback((trait: FormatTraits) => {\n return Format.isFormatTraitSetInProps(formatProps, trait);\n }, [formatProps]);\n\n const handleShowSignChange = React.useCallback((option: ShowSignOption) => {\n const newShowSignOption = Format.showSignOptionToString(option);\n const newFormatProps = { ...formatProps, showSignOption: newShowSignOption };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, handleSetFormatProps]);\n\n const setFormatTrait = React.useCallback((trait: FormatTraits, setActive: boolean) => {\n const traitStr = Format.getTraitString(trait);\n let formatTraits: string[] = [traitStr];\n if (setActive) {// setting trait\n // istanbul ignore else\n if (formatProps.formatTraits) {\n const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\\|/);\n // istanbul ignore else\n if (!traits.find((traitEntry) => traitStr === traitEntry)) {\n formatTraits = [...traits, traitStr];\n }\n }\n } else {// clearing trait\n // istanbul ignore next\n if (!formatProps.formatTraits)\n return;\n const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\\|/);\n formatTraits = traits.filter((traitEntry) => traitEntry !== traitStr);\n }\n const newFormatProps = { ...formatProps, formatTraits };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, handleSetFormatProps]);\n\n const handleShowTrailingZeroesChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.TrailZeroes, e.target.checked);\n }, [setFormatTrait]);\n\n const handleKeepDecimalPointChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.KeepDecimalPoint, e.target.checked);\n }, [setFormatTrait]);\n\n const handleKeepSingleZeroChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.KeepSingleZero, e.target.checked);\n }, [setFormatTrait]);\n\n const handleZeroEmptyChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.ZeroEmpty, e.target.checked);\n }, [setFormatTrait]);\n\n const handleUseFractionDashChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.FractionDash, e.target.checked);\n }, [setFormatTrait]);\n\n const handleDecimalSeparatorChange = React.useCallback((decimalSeparator: string) => {\n let thousandSeparator = formatProps.thousandSeparator;\n // make sure 1000 and decimal separator do not match\n // istanbul ignore else\n if (isFormatTraitSet(FormatTraits.Use1000Separator)) {\n switch (decimalSeparator) {\n case \".\":\n thousandSeparator = \",\";\n break;\n case \",\":\n thousandSeparator = \".\";\n break;\n }\n }\n const newFormatProps = { ...formatProps, thousandSeparator, decimalSeparator };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, isFormatTraitSet, handleSetFormatProps]);\n\n const handleScientificTypeChange = React.useCallback((type: ScientificType) => {\n const newFormatProps = { ...formatProps, scientificType: Format.scientificTypeToString(type) };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, handleSetFormatProps]);\n\n const handleFormatChange = React.useCallback((newFormatProps: FormatProps) => {\n handleSetFormatProps(newFormatProps);\n }, [handleSetFormatProps]);\n\n const formatType = React.useMemo(() => Format.parseFormatType(formatProps.type, \"format\"), [formatProps.type]);\n const showSignOption = React.useMemo(() => Format.parseShowSignOption(formatProps.showSignOption ?? \"onlyNegative\", \"format\"), [formatProps.showSignOption]);\n\n const handleToggleButtonClick = React.useCallback(() => {\n onShowHideOptions(!showOptions);\n }, [onShowHideOptions, showOptions]);\n\n const handleKeyUpOnLink = React.useCallback((e: React.KeyboardEvent<HTMLAnchorElement>) => {\n // istanbul ignore else\n if (e.key === SpecialKey.Enter || e.key === SpecialKey.Space) {\n onShowHideOptions(!showOptions);\n e.preventDefault();\n }\n }, [onShowHideOptions, showOptions]);\n\n const handleStationSeparatorChange = React.useCallback((value: string) => {\n const newFormatProps = { ...formatProps, stationSeparator: value };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, handleSetFormatProps]);\n\n const handleStationOffsetChange = React.useCallback((value: number) => {\n const newFormatProps = { ...formatProps, stationOffsetSize: value };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, handleSetFormatProps]);\n\n const signOptionLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.signOptionLabel\"));\n const stationOffsetLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.stationOffsetLabel\"));\n const stationSeparatorLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.stationSeparatorLabel\"));\n const decimalSeparatorLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.decimalSeparatorLabel\"));\n const showTrailZerosLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.showTrailZerosLabel\"));\n const keepSingleZeroLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.keepSingleZeroLabel\"));\n const zeroEmptyLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.zeroEmptyLabel\"));\n const moreLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.moreLabel\"));\n const lessLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.lessLabel\"));\n const keepDecimalPointLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.keepDecimalPointLabel\"));\n const fractionDashLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.fractionDashLabel\"));\n const scientificTypeLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.scientificTypeLabel\"));\n\n return (\n <>\n { // eslint-disable-next-line jsx-a11y/anchor-is-valid\n enableMinimumProperties && !showOptions && <a onClick={handleToggleButtonClick} onKeyUp={handleKeyUpOnLink}\n className={\"components-quantityFormat-more-less\"} role=\"link\" data-testid=\"quantityFormat-more\" tabIndex={0} >{moreLabel.current}</a>}\n {\n (!enableMinimumProperties || showOptions) &&\n <>\n <span className={\"uicore-label\"}>{signOptionLabel.current}</span>\n <SignOptionSelector data-testid=\"sign-option-selector\" signOption={showSignOption} onChange={handleShowSignChange} />\n\n <span className={classnames(\"uicore-label\", formatType !== FormatType.Station && \"uicore-disabled\")}>{stationOffsetLabel.current}</span>\n <StationSizeSelector data-testid=\"station-size-selector\" value={(formatProps.stationOffsetSize ?? 2)}\n disabled={formatType !== FormatType.Station} onChange={handleStationOffsetChange} />\n\n <span className={classnames(\"uicore-label\", formatType !== FormatType.Station && \"uicore-disabled\")}>{stationSeparatorLabel.current}</span>\n <StationSeparatorSelector data-testid=\"station-separator-selector\" separator={(undefined !== formatProps.stationSeparator ? formatProps.stationSeparator : \"+\")}\n disabled={formatType !== FormatType.Station} onChange={handleStationSeparatorChange} />\n\n <ThousandsSeparator formatProps={formatProps} onChange={handleFormatChange} />\n\n <span className={classnames(\"uicore-label\", formatType === FormatType.Fractional && \"uicore-disabled\")}>{decimalSeparatorLabel.current}</span>\n <DecimalSeparatorSelector data-testid=\"decimal-separator-selector\" separator={formatProps.decimalSeparator ?? \".\"} onChange={handleDecimalSeparatorChange} disabled={formatType === FormatType.Fractional} />\n\n <span className={\"uicore-label\"}>{showTrailZerosLabel.current}</span>\n <Checkbox data-testid=\"show-trail-zeros\" checked={isFormatTraitSet(FormatTraits.TrailZeroes)} onChange={handleShowTrailingZeroesChange} />\n\n <span className={classnames(\"uicore-label\", formatType === FormatType.Fractional && \"uicore-disabled\")}>{keepDecimalPointLabel.current}</span>\n <Checkbox data-testid=\"keep-decimal-point\" checked={isFormatTraitSet(FormatTraits.KeepDecimalPoint)} onChange={handleKeepDecimalPointChange} />\n\n <span className={\"uicore-label\"}>{keepSingleZeroLabel.current}</span>\n <Checkbox data-testid=\"keep-single-zero\" checked={isFormatTraitSet(FormatTraits.KeepSingleZero)} onChange={handleKeepSingleZeroChange} />\n\n <span className={\"uicore-label\"}>{zeroEmptyLabel.current}</span>\n <Checkbox data-testid=\"zero-empty\" checked={isFormatTraitSet(FormatTraits.ZeroEmpty)} onChange={handleZeroEmptyChange} />\n\n <span className={classnames(\"uicore-label\", formatType !== FormatType.Fractional && \"uicore-disabled\")}>{fractionDashLabel.current}</span>\n <Checkbox data-testid=\"fraction-dash\" checked={isFormatTraitSet(FormatTraits.FractionDash)} onChange={handleUseFractionDashChange} disabled={formatType !== FormatType.Fractional} />\n\n <span className={classnames(\"uicore-label\", formatType !== FormatType.Scientific && \"uicore-disabled\")}>{scientificTypeLabel.current}</span>\n <ScientificTypeSelector data-testid=\"scientific-type-selector\" type={(formatProps.scientificType && formatProps.scientificType.length > 0) ? Format.parseScientificType(formatProps.scientificType, \"custom\") : ScientificType.Normalized}\n disabled={formatType !== FormatType.Scientific} onChange={handleScientificTypeChange} />\n\n {props.children}\n\n { // eslint-disable-next-line jsx-a11y/anchor-is-valid\n enableMinimumProperties && showOptions && <a onClick={handleToggleButtonClick} onKeyUp={handleKeyUpOnLink}\n className={\"components-quantityFormat-more-less\"} role=\"link\" data-testid=\"quantityFormat-less\" tabIndex={0}>{lessLabel.current}</a>}\n </>\n }\n </>\n );\n}\n"]}
@@ -0,0 +1,23 @@
1
+ /** @packageDocumentation
2
+ * @module QuantityFormat
3
+ */
4
+ /// <reference types="react" />
5
+ import { QuantityTypeArg } from "@itwin/core-frontend";
6
+ import { FormatProps } from "@itwin/core-quantity";
7
+ import { CommonProps } from "@itwin/core-react";
8
+ /** Properties of [[QuantityFormatPanel]] component.
9
+ * @alpha
10
+ */
11
+ export interface QuantityFormatPanelProps extends CommonProps {
12
+ quantityType: QuantityTypeArg;
13
+ onFormatChange?: (format: FormatProps) => void;
14
+ /** props below are to be passed on to FormatPanel */
15
+ showSample?: boolean;
16
+ initialMagnitude?: number;
17
+ enableMinimumProperties?: boolean;
18
+ }
19
+ /** Component to set properties that control Quantity Formatting.
20
+ * @alpha
21
+ */
22
+ export declare function QuantityFormatPanel(props: QuantityFormatPanelProps): JSX.Element;
23
+ //# sourceMappingURL=QuantityFormatPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityFormatPanel.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/QuantityFormatPanel.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAE8D,eAAe,EACnF,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAA4B,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAU,MAAM,mBAAmB,CAAC;AA+DxD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,YAAY,EAAE,eAAe,CAAC;IAC9B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eA2GlE"}
@@ -0,0 +1,132 @@
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 QuantityFormat
7
+ */
8
+ import * as React from "react";
9
+ import { getQuantityTypeKey, IModelApp, isCheckboxFormatPropEditorSpec, isCustomQuantityTypeDefinition, isTextInputFormatPropEditorSpec, isTextSelectFormatPropEditorSpec, } from "@itwin/core-frontend";
10
+ import { Select } from "@itwin/core-react";
11
+ import { Checkbox, Input } from "@itwin/itwinui-react";
12
+ import { FormatPanel } from "./FormatPanel";
13
+ import { DeepCompare } from "@itwin/core-geometry";
14
+ function createTextInputFormatPropEditor(key, label, inProps, getString, setString, fireFormatChange) {
15
+ const value = getString(inProps);
16
+ return (React.createElement(React.Fragment, { key: `${key}` },
17
+ React.createElement("span", { key: `${key}-label`, className: "uicore-label" }, label),
18
+ React.createElement(Input, { "data-testid": `${key}-editor`, key: `${key}-editor`, value: value, onChange: (e) => {
19
+ const newProps = setString(inProps, e.currentTarget.value);
20
+ fireFormatChange(newProps);
21
+ } })));
22
+ }
23
+ function createSelectFormatPropEditor(key, label, options, inProps, getString, setString, fireFormatChange) {
24
+ const value = getString(inProps);
25
+ return (React.createElement(React.Fragment, { key: `${key}` },
26
+ React.createElement("span", { key: `${key}-label`, className: "uicore-label" }, label),
27
+ React.createElement(Select, { "data-testid": `${key}-editor`, key: `${key}-editor`, value: value, options: options, onChange: (e) => {
28
+ const newProps = setString(inProps, e.currentTarget.value);
29
+ fireFormatChange(newProps);
30
+ } })));
31
+ }
32
+ function createCheckboxFormatPropEditor(key, label, inProps, getBool, setBool, fireFormatChange) {
33
+ const isChecked = getBool(inProps);
34
+ return (React.createElement(React.Fragment, { key: `${key}` },
35
+ React.createElement("span", { key: `${key}-label`, className: "uicore-label" }, label),
36
+ React.createElement(Checkbox, { "data-testid": `${key}-editor`, key: `${key}-editor`, checked: isChecked, onChange: (e) => {
37
+ const newProps = setBool(inProps, e.target.checked);
38
+ fireFormatChange(newProps);
39
+ } })));
40
+ }
41
+ function formatAreEqual(obj1, obj2) {
42
+ const compare = new DeepCompare();
43
+ return compare.compare(obj1, obj2);
44
+ }
45
+ /** Component to set properties that control Quantity Formatting.
46
+ * @alpha
47
+ */
48
+ export function QuantityFormatPanel(props) {
49
+ const { quantityType, onFormatChange, ...otherProps } = props;
50
+ const [formatProps, setFormatProps] = React.useState();
51
+ const initialFormatProps = React.useRef();
52
+ const [persistenceUnit, setPersistenceUnit] = React.useState(() => {
53
+ const quantityTypeKey = getQuantityTypeKey(quantityType);
54
+ const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);
55
+ // istanbul ignore else
56
+ if (quantityTypeDefinition)
57
+ return quantityTypeDefinition.persistenceUnit;
58
+ else
59
+ throw Error(`Unable to locate a quantity type with type ${quantityType}`);
60
+ });
61
+ React.useEffect(() => {
62
+ const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);
63
+ // istanbul ignore else
64
+ if (!initialFormatProps.current)
65
+ initialFormatProps.current = newFormatProps;
66
+ setFormatProps(newFormatProps);
67
+ }, [quantityType]); // no dependencies defined as we want this to run on every render
68
+ // handle case where quantityType does not change but the formatProps for that quantity type has (ie after a Set or Clear)
69
+ // eslint-disable-next-line react-hooks/exhaustive-deps
70
+ React.useEffect(() => {
71
+ const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);
72
+ // istanbul ignore else
73
+ if (initialFormatProps.current && newFormatProps) {
74
+ if (!formatAreEqual(newFormatProps, initialFormatProps.current)) {
75
+ initialFormatProps.current = newFormatProps;
76
+ setFormatProps(newFormatProps);
77
+ }
78
+ }
79
+ }); // no dependencies defined as we want this to run on every render
80
+ React.useEffect(() => {
81
+ const quantityTypeKey = getQuantityTypeKey(quantityType);
82
+ const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);
83
+ // istanbul ignore else
84
+ if (quantityTypeDefinition)
85
+ setPersistenceUnit(quantityTypeDefinition.persistenceUnit);
86
+ }, [quantityType]);
87
+ const handleOnFormatChanged = React.useCallback(async (newProps) => {
88
+ setFormatProps(newProps);
89
+ onFormatChange && onFormatChange(newProps);
90
+ }, [onFormatChange]);
91
+ const createCustomPropEditors = React.useCallback((specs, inProps, fireFormatChange) => {
92
+ return specs.map((spec, index) => {
93
+ if (isCheckboxFormatPropEditorSpec(spec))
94
+ return createCheckboxFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getBool, spec.setBool, fireFormatChange);
95
+ if (isTextSelectFormatPropEditorSpec(spec))
96
+ return createSelectFormatPropEditor(`${spec.editorType}-${index}`, spec.label, spec.selectOptions, inProps, spec.getString, spec.setString, fireFormatChange);
97
+ /* istanbul ignore else */
98
+ if (isTextInputFormatPropEditorSpec(spec))
99
+ return createTextInputFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getString, spec.setString, fireFormatChange);
100
+ /* istanbul ignore next */
101
+ return React.createElement("div", { key: index });
102
+ });
103
+ }, []);
104
+ const providePrimaryChildren = React.useCallback((inProps, fireFormatChange) => {
105
+ const quantityTypeKey = getQuantityTypeKey(quantityType);
106
+ const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);
107
+ if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&
108
+ quantityTypeDefinition.isCompatibleFormatProps(inProps)) {
109
+ // istanbul ignore else
110
+ if (quantityTypeDefinition.primaryPropEditorSpecs)
111
+ return createCustomPropEditors(quantityTypeDefinition.primaryPropEditorSpecs, inProps, fireFormatChange);
112
+ }
113
+ return null;
114
+ }, [createCustomPropEditors, quantityType]);
115
+ const provideSecondaryChildren = React.useCallback((inProps, fireFormatChange) => {
116
+ const quantityTypeKey = getQuantityTypeKey(quantityType);
117
+ const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);
118
+ if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&
119
+ quantityTypeDefinition.isCompatibleFormatProps(inProps)) {
120
+ // istanbul ignore else
121
+ if (quantityTypeDefinition.secondaryPropEditorSpecs)
122
+ return createCustomPropEditors(quantityTypeDefinition.secondaryPropEditorSpecs, inProps, fireFormatChange);
123
+ }
124
+ return null;
125
+ }, [createCustomPropEditors, quantityType]);
126
+ const provideFormatSpec = React.useCallback(async (inProps, _persistenceUnit, _unitsProvider) => {
127
+ return IModelApp.quantityFormatter.generateFormatterSpecByType(quantityType, inProps);
128
+ }, [quantityType]);
129
+ return (React.createElement("div", { className: "components-quantityFormat-quantityPanel" }, persistenceUnit && formatProps &&
130
+ React.createElement(FormatPanel, { onFormatChange: handleOnFormatChanged, ...otherProps, initialFormat: formatProps, unitsProvider: IModelApp.quantityFormatter.unitsProvider, persistenceUnit: persistenceUnit, providePrimaryChildren: providePrimaryChildren, provideSecondaryChildren: provideSecondaryChildren, provideFormatSpec: provideFormatSpec })));
131
+ }
132
+ //# sourceMappingURL=QuantityFormatPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityFormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/QuantityFormatPanel.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACuB,kBAAkB,EAAE,SAAS,EAAE,8BAA8B,EAAE,8BAA8B,EACzH,+BAA+B,EAAE,gCAAgC,GAClE,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAe,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,KAA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ClF,sBAAsB,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE;YACzD,uBAAuB;YACvB,IAAI,sBAAsB,CAAC,wBAAwB;gBACjD,OAAO,uBAAuB,CAAC,sBAAsB,CAAC,wBAAwB,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;SAC9G;QACD,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,CAAC,uBAAuB,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9C,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CACzC,KAAK,EAAE,OAAoB,EAAE,gBAA2B,EAAE,cAA6B,EAAE,EAAE;QACzF,OAAO,SAAS,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAErB,OAAO,CACL,6BAAK,SAAS,EAAC,yCAAyC,IACrD,eAAe,IAAI,WAAW;QAC7B,oBAAC,WAAW,IAAC,cAAc,EAAE,qBAAqB,KAAM,UAAU,EAChE,aAAa,EAAE,WAAW,EAC1B,aAAa,EAAE,SAAS,CAAC,iBAAiB,CAAC,aAAa,EACxD,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,EAC9C,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,GACpC,CACA,CACP,CAAC;AACJ,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 QuantityFormat\n */\n\nimport * as React from \"react\";\nimport {\n CustomFormatPropEditorSpec, getQuantityTypeKey, IModelApp, isCheckboxFormatPropEditorSpec, isCustomQuantityTypeDefinition,\n isTextInputFormatPropEditorSpec, isTextSelectFormatPropEditorSpec, QuantityTypeArg,\n} from \"@itwin/core-frontend\";\nimport { FormatProps, UnitProps, UnitsProvider } from \"@itwin/core-quantity\";\nimport { CommonProps, Select } from \"@itwin/core-react\";\nimport { Checkbox, Input } from \"@itwin/itwinui-react\";\nimport { FormatPanel } from \"./FormatPanel\";\nimport { DeepCompare } from \"@itwin/core-geometry\";\n\nfunction createTextInputFormatPropEditor(key: string, label: string, inProps: FormatProps,\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\n const value = getString(inProps);\n return (\n <React.Fragment key={`${key}`}>\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\n <Input data-testid={`${key}-editor`} key={`${key}-editor`}\n value={value}\n onChange={(e) => {\n const newProps = setString(inProps, e.currentTarget.value);\n fireFormatChange(newProps);\n }}\n />\n </React.Fragment>\n );\n}\n\nfunction createSelectFormatPropEditor(key: string, label: string, options: { label: string, value: string }[], inProps: FormatProps,\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\n const value = getString(inProps);\n return (\n <React.Fragment key={`${key}`}>\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\n {/* NEEDSWORK - unable to migrate this Select to iTwinUI because no menu items were found */}\n {/* eslint-disable-next-line deprecation/deprecation */}\n <Select data-testid={`${key}-editor`} key={`${key}-editor`}\n value={value}\n options={options}\n onChange={(e) => {\n const newProps = setString(inProps, e.currentTarget.value);\n fireFormatChange(newProps);\n }}\n />\n </React.Fragment>\n );\n}\n\nfunction createCheckboxFormatPropEditor(key: string, label: string, inProps: FormatProps,\n getBool: (props: FormatProps) => boolean, setBool: (props: FormatProps, isChecked: boolean) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\n const isChecked = getBool(inProps);\n return (\n <React.Fragment key={`${key}`}>\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\n <Checkbox data-testid={`${key}-editor`} key={`${key}-editor`}\n checked={isChecked}\n onChange={(e) => {\n const newProps = setBool(inProps, e.target.checked);\n fireFormatChange(newProps);\n }} />\n </React.Fragment>\n );\n}\n\nfunction formatAreEqual(obj1: FormatProps, obj2: FormatProps) {\n const compare = new DeepCompare();\n return compare.compare(obj1, obj2);\n}\n\n/** Properties of [[QuantityFormatPanel]] component.\n * @alpha\n */\nexport interface QuantityFormatPanelProps extends CommonProps {\n quantityType: QuantityTypeArg;\n onFormatChange?: (format: FormatProps) => void;\n /** props below are to be passed on to FormatPanel */\n showSample?: boolean;\n initialMagnitude?: number;\n enableMinimumProperties?: boolean;\n}\n\n/** Component to set properties that control Quantity Formatting.\n * @alpha\n */\nexport function QuantityFormatPanel(props: QuantityFormatPanelProps) {\n const { quantityType, onFormatChange, ...otherProps } = props;\n const [formatProps, setFormatProps] = React.useState<FormatProps>();\n const initialFormatProps = React.useRef<FormatProps>();\n\n const [persistenceUnit, setPersistenceUnit] = React.useState(() => {\n const quantityTypeKey = getQuantityTypeKey(quantityType);\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\n // istanbul ignore else\n if (quantityTypeDefinition)\n return quantityTypeDefinition.persistenceUnit;\n else\n throw Error(`Unable to locate a quantity type with type ${quantityType}`);\n });\n\n React.useEffect(() => {\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\n // istanbul ignore else\n if (!initialFormatProps.current)\n initialFormatProps.current = newFormatProps;\n setFormatProps(newFormatProps);\n }, [quantityType]); // no dependencies defined as we want this to run on every render\n\n // handle case where quantityType does not change but the formatProps for that quantity type has (ie after a Set or Clear)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n React.useEffect(() => {\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\n // istanbul ignore else\n if (initialFormatProps.current && newFormatProps) {\n if (!formatAreEqual(newFormatProps, initialFormatProps.current)) {\n initialFormatProps.current = newFormatProps;\n setFormatProps(newFormatProps);\n }\n }\n }); // no dependencies defined as we want this to run on every render\n\n React.useEffect(() => {\n const quantityTypeKey = getQuantityTypeKey(quantityType);\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\n // istanbul ignore else\n if (quantityTypeDefinition)\n setPersistenceUnit(quantityTypeDefinition.persistenceUnit);\n }, [quantityType]);\n\n const handleOnFormatChanged = React.useCallback(async (newProps: FormatProps) => {\n setFormatProps(newProps);\n onFormatChange && onFormatChange(newProps);\n }, [onFormatChange]);\n\n const createCustomPropEditors = React.useCallback((specs: CustomFormatPropEditorSpec[], inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\n return specs.map((spec, index) => {\n if (isCheckboxFormatPropEditorSpec(spec))\n return createCheckboxFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getBool, spec.setBool, fireFormatChange);\n if (isTextSelectFormatPropEditorSpec(spec))\n return createSelectFormatPropEditor(`${spec.editorType}-${index}`, spec.label, spec.selectOptions, inProps, spec.getString, spec.setString, fireFormatChange);\n /* istanbul ignore else */\n if (isTextInputFormatPropEditorSpec(spec))\n return createTextInputFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getString, spec.setString, fireFormatChange);\n /* istanbul ignore next */\n return <div key={index} />;\n });\n }, []);\n\n const providePrimaryChildren = React.useCallback(\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\n const quantityTypeKey = getQuantityTypeKey(quantityType);\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\n // istanbul ignore else\n if (quantityTypeDefinition.primaryPropEditorSpecs)\n return createCustomPropEditors(quantityTypeDefinition.primaryPropEditorSpecs, inProps, fireFormatChange);\n }\n return null;\n }, [createCustomPropEditors, quantityType]);\n\n const provideSecondaryChildren = React.useCallback(\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\n const quantityTypeKey = getQuantityTypeKey(quantityType);\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\n // istanbul ignore else\n if (quantityTypeDefinition.secondaryPropEditorSpecs)\n return createCustomPropEditors(quantityTypeDefinition.secondaryPropEditorSpecs, inProps, fireFormatChange);\n }\n return null;\n }, [createCustomPropEditors, quantityType]);\n\n const provideFormatSpec = React.useCallback(\n async (inProps: FormatProps, _persistenceUnit: UnitProps, _unitsProvider: UnitsProvider) => {\n return IModelApp.quantityFormatter.generateFormatterSpecByType(quantityType, inProps);\n }, [quantityType]);\n\n return (\n <div className=\"components-quantityFormat-quantityPanel\">\n {persistenceUnit && formatProps &&\n <FormatPanel onFormatChange={handleOnFormatChanged} {...otherProps}\n initialFormat={formatProps}\n unitsProvider={IModelApp.quantityFormatter.unitsProvider}\n persistenceUnit={persistenceUnit}\n providePrimaryChildren={providePrimaryChildren}\n provideSecondaryChildren={provideSecondaryChildren}\n provideFormatSpec={provideFormatSpec}\n />}\n </div>\n );\n}\n"]}
@@ -0,0 +1,18 @@
1
+ /** @packageDocumentation
2
+ * @module QuantityFormat
3
+ */
4
+ /// <reference types="react" />
5
+ import { CommonProps } from "@itwin/core-react";
6
+ /** Properties of [[DecimalPrecisionSelector]] component.
7
+ * @internal
8
+ */
9
+ export interface DecimalPrecisionSelectorProps extends CommonProps {
10
+ precision: number;
11
+ onChange: (value: number) => void;
12
+ }
13
+ /** Component use to set Decimal Precision
14
+ * the unit label.
15
+ * @internal
16
+ */
17
+ export declare function DecimalPrecisionSelector(props: DecimalPrecisionSelectorProps): JSX.Element;
18
+ //# sourceMappingURL=DecimalPrecision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecimalPrecision.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalPrecision.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAyB5E"}
@@ -0,0 +1,37 @@
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 QuantityFormat
7
+ */
8
+ import * as React from "react";
9
+ import { UiIModelComponents } from "../../UiIModelComponents";
10
+ import { Select } from "@itwin/itwinui-react";
11
+ /** Component use to set Decimal Precision
12
+ * the unit label.
13
+ * @internal
14
+ */
15
+ export function DecimalPrecisionSelector(props) {
16
+ const { precision, onChange, ...otherProps } = props;
17
+ const options = React.useRef([
18
+ { value: 0, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.zero") },
19
+ { value: 1, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.one") },
20
+ { value: 2, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.two") },
21
+ { value: 3, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.three") },
22
+ { value: 4, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.four") },
23
+ { value: 5, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.five") },
24
+ { value: 6, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.six") },
25
+ { value: 7, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.seven") },
26
+ { value: 8, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.eight") },
27
+ { value: 9, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.nine") },
28
+ { value: 10, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.ten") },
29
+ { value: 11, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.eleven") },
30
+ { value: 12, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.twelve") },
31
+ ]);
32
+ const handleOnChange = React.useCallback((newValue) => {
33
+ onChange && onChange(newValue);
34
+ }, [onChange]);
35
+ return (React.createElement(Select, { options: options.current, value: precision, onChange: handleOnChange, ...otherProps }));
36
+ }
37
+ //# sourceMappingURL=DecimalPrecision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecimalPrecision.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalPrecision.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAU5D;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAC1F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,sCAAsC,CAAC,EAAE;QACzF,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,sCAAsC,CAAC,EAAE;QACzF,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC3F,EAAE,KAAK,EAAE,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(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 QuantityFormat\n */\n\nimport * as React from \"react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport { Select, SelectOption } from \"@itwin/itwinui-react\";\n\n/** Properties of [[DecimalPrecisionSelector]] component.\n * @internal\n */\nexport interface DecimalPrecisionSelectorProps extends CommonProps {\n precision: number;\n onChange: (value: number) => void;\n}\n\n/** Component use to set Decimal Precision\n * the unit label.\n * @internal\n */\nexport function DecimalPrecisionSelector(props: DecimalPrecisionSelectorProps) {\n const { precision, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<number>[]>([\n { value: 0, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.zero\") },\n { value: 1, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.one\") },\n { value: 2, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.two\") },\n { value: 3, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.three\") },\n { value: 4, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.four\") },\n { value: 5, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.five\") },\n { value: 6, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.six\") },\n { value: 7, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.seven\") },\n { value: 8, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.eight\") },\n { value: 9, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.nine\") },\n { value: 10, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.ten\") },\n { value: 11, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.eleven\") },\n { value: 12, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.twelve\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: number) => {\n onChange && onChange(newValue);\n }, [onChange]);\n\n return (\n <Select options={options.current} value={precision} onChange={handleOnChange} {...otherProps} />\n );\n}\n"]}
@@ -0,0 +1,18 @@
1
+ /** @packageDocumentation
2
+ * @module QuantityFormat
3
+ */
4
+ /// <reference types="react" />
5
+ import { CommonProps } from "@itwin/core-react";
6
+ /** Properties of [[DecimalSeparatorSelector]] component.
7
+ * @internal
8
+ */
9
+ export interface DecimalSeparatorSelectorProps extends CommonProps {
10
+ separator: string;
11
+ disabled?: boolean;
12
+ onChange: (value: string) => void;
13
+ }
14
+ /** Component use to set Decimal Separator
15
+ * @internal
16
+ */
17
+ export declare function DecimalSeparatorSelector(props: DecimalSeparatorSelectorProps): JSX.Element;
18
+ //# sourceMappingURL=DecimalSeparator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecimalSeparator.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalSeparator.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAc5E"}
@@ -0,0 +1,25 @@
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 QuantityFormat
7
+ */
8
+ import * as React from "react";
9
+ import { UiIModelComponents } from "../../UiIModelComponents";
10
+ import { Select } from "@itwin/itwinui-react";
11
+ /** Component use to set Decimal Separator
12
+ * @internal
13
+ */
14
+ export function DecimalSeparatorSelector(props) {
15
+ const { separator, onChange, ...otherProps } = props;
16
+ const options = React.useRef([
17
+ { value: ".", label: UiIModelComponents.translate("QuantityFormat.decimal_separator.point") },
18
+ { value: ",", label: UiIModelComponents.translate("QuantityFormat.decimal_separator.comma") },
19
+ ]);
20
+ const handleOnChange = React.useCallback((newValue) => {
21
+ onChange && onChange(newValue);
22
+ }, [onChange]);
23
+ return (React.createElement(Select, { options: options.current, value: separator, onChange: handleOnChange, ...otherProps }));
24
+ }
25
+ //# sourceMappingURL=DecimalSeparator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecimalSeparator.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalSeparator.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAW5D;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;KAC9F,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;QAC5D,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,KAAM,UAAU,GAAI,CACjG,CAAC;AACJ,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 QuantityFormat\n */\n\nimport * as React from \"react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport { Select, SelectOption } from \"@itwin/itwinui-react\";\n\n/** Properties of [[DecimalSeparatorSelector]] component.\n * @internal\n */\nexport interface DecimalSeparatorSelectorProps extends CommonProps {\n separator: string;\n disabled?: boolean;\n onChange: (value: string) => void;\n}\n\n/** Component use to set Decimal Separator\n * @internal\n */\nexport function DecimalSeparatorSelector(props: DecimalSeparatorSelectorProps) {\n const { separator, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<string>[]>([\n { value: \".\", label: UiIModelComponents.translate(\"QuantityFormat.decimal_separator.point\") },\n { value: \",\", label: UiIModelComponents.translate(\"QuantityFormat.decimal_separator.comma\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: string) => {\n onChange && onChange(newValue);\n }, [onChange]);\n\n return (\n <Select options={options.current} value={separator} onChange={handleOnChange} {...otherProps} />\n );\n}\n"]}
@@ -0,0 +1,17 @@
1
+ /** @packageDocumentation
2
+ * @module QuantityFormat
3
+ */
4
+ /// <reference types="react" />
5
+ import { CommonProps } from "@itwin/core-react";
6
+ /** Properties of [[FractionPrecisionSelector]] component.
7
+ * @internal
8
+ */
9
+ export interface FractionPrecisionSelectorProps extends CommonProps {
10
+ precision: number;
11
+ onChange: (value: number) => void;
12
+ }
13
+ /** Component use to set Fraction precision
14
+ * @internal
15
+ */
16
+ export declare function FractionPrecisionSelector(props: FractionPrecisionSelectorProps): JSX.Element;
17
+ //# sourceMappingURL=FractionPrecision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FractionPrecision.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/FractionPrecision.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,WAAW;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,eAqB9E"}
@@ -0,0 +1,32 @@
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 QuantityFormat
7
+ */
8
+ import * as React from "react";
9
+ import { UiIModelComponents } from "../../UiIModelComponents";
10
+ import { Select } from "@itwin/itwinui-react";
11
+ /** Component use to set Fraction precision
12
+ * @internal
13
+ */
14
+ export function FractionPrecisionSelector(props) {
15
+ const { precision, onChange, ...otherProps } = props;
16
+ const options = React.useRef([
17
+ { value: 1, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.whole") },
18
+ { value: 2, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.half") },
19
+ { value: 4, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.quarter") },
20
+ { value: 8, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.eighth") },
21
+ { value: 16, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.sixteenth") },
22
+ { value: 32, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over32") },
23
+ { value: 64, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over64") },
24
+ { value: 128, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over128") },
25
+ { value: 256, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over256") },
26
+ ]);
27
+ const handleOnChange = React.useCallback((newValue) => {
28
+ onChange && onChange(newValue);
29
+ }, [onChange]);
30
+ return (React.createElement(Select, { options: options.current, value: precision, onChange: handleOnChange, ...otherProps }));
31
+ }
32
+ //# sourceMappingURL=FractionPrecision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FractionPrecision.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/FractionPrecision.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAU5D;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAqC;IAC7E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;QAC5F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC3F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,6CAA6C,CAAC,EAAE;QACjG,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QAChG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;KACjG,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;QAC5D,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,KAAM,UAAU,GAAI,CACjG,CAAC;AACJ,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 QuantityFormat\n */\n\nimport * as React from \"react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport { Select, SelectOption } from \"@itwin/itwinui-react\";\n\n/** Properties of [[FractionPrecisionSelector]] component.\n * @internal\n */\nexport interface FractionPrecisionSelectorProps extends CommonProps {\n precision: number;\n onChange: (value: number) => void;\n}\n\n/** Component use to set Fraction precision\n * @internal\n */\nexport function FractionPrecisionSelector(props: FractionPrecisionSelectorProps) {\n const { precision, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<number>[]>([\n { value: 1, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.whole\") },\n { value: 2, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.half\") },\n { value: 4, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.quarter\") },\n { value: 8, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.eighth\") },\n { value: 16, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.sixteenth\") },\n { value: 32, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over32\") },\n { value: 64, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over64\") },\n { value: 128, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over128\") },\n { value: 256, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over256\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: number) => {\n onChange && onChange(newValue);\n }, [onChange]);\n\n return (\n <Select options={options.current} value={precision} onChange={handleOnChange} {...otherProps} />\n );\n}\n"]}