@itwin/imodel-components-react 4.17.1 → 5.0.0-dev.2

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 (533) hide show
  1. package/CHANGELOG.md +1 -6
  2. package/README.md +15 -2
  3. package/lib/{cjs/imodel-components-react → imodel-components-react}/UiIModelComponents.d.ts +1 -1
  4. package/lib/imodel-components-react/UiIModelComponents.d.ts.map +1 -0
  5. package/lib/{esm/imodel-components-react → imodel-components-react}/UiIModelComponents.js +4 -7
  6. package/lib/imodel-components-react/UiIModelComponents.js.map +1 -0
  7. package/lib/imodel-components-react/color/AlphaSlider.d.ts.map +1 -0
  8. package/lib/{esm/imodel-components-react → imodel-components-react}/color/AlphaSlider.js +1 -1
  9. package/lib/imodel-components-react/color/AlphaSlider.js.map +1 -0
  10. package/lib/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -0
  11. package/lib/{esm/imodel-components-react → imodel-components-react}/color/ColorPickerButton.js +4 -3
  12. package/lib/imodel-components-react/color/ColorPickerButton.js.map +1 -0
  13. package/lib/{esm/imodel-components-react → imodel-components-react}/color/ColorPickerButton.scss +2 -4
  14. package/lib/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -0
  15. package/lib/imodel-components-react/color/ColorPickerDialog.js.map +1 -0
  16. package/lib/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -0
  17. package/lib/{esm/imodel-components-react → imodel-components-react}/color/ColorPickerPopup.js +4 -3
  18. package/lib/imodel-components-react/color/ColorPickerPopup.js.map +1 -0
  19. package/lib/imodel-components-react/color/HueSlider.d.ts.map +1 -0
  20. package/lib/{esm/imodel-components-react → imodel-components-react}/color/HueSlider.js +1 -1
  21. package/lib/{esm/imodel-components-react → imodel-components-react}/color/HueSlider.js.map +1 -1
  22. package/lib/imodel-components-react/color/SaturationPicker.d.ts.map +1 -0
  23. package/lib/{esm/imodel-components-react → imodel-components-react}/color/SaturationPicker.js +1 -1
  24. package/lib/imodel-components-react/color/SaturationPicker.js.map +1 -0
  25. package/lib/imodel-components-react/color/Swatch.d.ts.map +1 -0
  26. package/lib/{esm/imodel-components-react → imodel-components-react}/color/Swatch.js +1 -1
  27. package/lib/{esm/imodel-components-react → imodel-components-react}/color/Swatch.js.map +1 -1
  28. package/lib/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -0
  29. package/lib/imodel-components-react/color/getCSSColorFromDef.js.map +1 -0
  30. package/lib/imodel-components-react/editors/ColorEditor.d.ts.map +1 -0
  31. package/lib/{esm/imodel-components-react → imodel-components-react}/editors/ColorEditor.js +3 -4
  32. package/lib/imodel-components-react/editors/ColorEditor.js.map +1 -0
  33. package/lib/{cjs/imodel-components-react → imodel-components-react}/editors/ColorEditor.scss +0 -2
  34. package/lib/imodel-components-react/editors/WeightEditor.d.ts.map +1 -0
  35. package/lib/{esm/imodel-components-react → imodel-components-react}/editors/WeightEditor.js +3 -4
  36. package/lib/imodel-components-react/editors/WeightEditor.js.map +1 -0
  37. package/lib/{cjs/imodel-components-react → imodel-components-react}/editors/WeightEditor.scss +0 -2
  38. package/lib/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -0
  39. package/lib/{esm/imodel-components-react → imodel-components-react}/inputs/QuantityInput.js +1 -1
  40. package/lib/{esm/imodel-components-react → imodel-components-react}/inputs/QuantityInput.js.map +1 -1
  41. package/lib/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -0
  42. package/lib/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -0
  43. package/lib/{cjs/imodel-components-react → imodel-components-react}/inputs/QuantityNumberInput.scss +1 -1
  44. package/lib/imodel-components-react/lineweight/Swatch.d.ts.map +1 -0
  45. package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/Swatch.js +1 -1
  46. package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/Swatch.js.map +1 -1
  47. package/lib/{cjs/imodel-components-react → imodel-components-react}/lineweight/Swatch.scss +2 -4
  48. package/lib/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -0
  49. package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/WeightPickerButton.js +1 -1
  50. package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/WeightPickerButton.js.map +1 -1
  51. package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/WeightPickerButton.scss +5 -6
  52. package/lib/imodel-components-react/navigationaids/Cube.d.ts.map +1 -0
  53. package/lib/imodel-components-react/navigationaids/Cube.js.map +1 -0
  54. package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/CubeNavigationAid.d.ts +1 -1
  55. package/lib/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -0
  56. package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/CubeNavigationAid.js +3 -3
  57. package/lib/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -0
  58. package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/CubeNavigationAid.scss +0 -2
  59. package/lib/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -0
  60. package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/DrawingNavigationAid.js +2 -2
  61. package/lib/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -0
  62. package/lib/{cjs/imodel-components-react → imodel-components-react}/navigationaids/DrawingNavigationAid.scss +9 -10
  63. package/lib/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -0
  64. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatPanel.js +6 -6
  65. package/lib/imodel-components-react/quantityformat/FormatPanel.js.map +1 -0
  66. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatPanel.scss +0 -2
  67. package/lib/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -0
  68. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatPrecision.js +3 -3
  69. package/lib/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -0
  70. package/lib/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -0
  71. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatSample.js +1 -1
  72. package/lib/imodel-components-react/quantityformat/FormatSample.js.map +1 -0
  73. package/lib/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -0
  74. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatType.js +1 -1
  75. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatType.js.map +1 -1
  76. package/lib/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -0
  77. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatUnitLabel.js +1 -1
  78. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatUnitLabel.js.map +1 -1
  79. package/lib/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -0
  80. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatUnits.js +2 -2
  81. package/lib/imodel-components-react/quantityformat/FormatUnits.js.map +1 -0
  82. package/lib/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -0
  83. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/MiscFormatOptions.js +7 -7
  84. package/lib/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -0
  85. package/lib/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -0
  86. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/QuantityFormatPanel.js +1 -1
  87. package/lib/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -0
  88. package/lib/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -0
  89. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalPrecision.js +1 -1
  90. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalPrecision.js.map +1 -1
  91. package/lib/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -0
  92. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalSeparator.js +1 -1
  93. package/lib/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -0
  94. package/lib/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -0
  95. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/FractionPrecision.js +1 -1
  96. package/lib/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -0
  97. package/lib/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -0
  98. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/ScientificType.js +1 -1
  99. package/lib/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -0
  100. package/lib/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -0
  101. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/SignOption.js +1 -1
  102. package/lib/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -0
  103. package/lib/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -0
  104. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSeparatorSelector.js +1 -1
  105. package/lib/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -0
  106. package/lib/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -0
  107. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSizeSelector.js +1 -1
  108. package/lib/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -0
  109. package/lib/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -0
  110. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSelector.js +1 -1
  111. package/lib/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -0
  112. package/lib/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -0
  113. package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSeparator.js +2 -2
  114. package/lib/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -0
  115. package/lib/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -0
  116. package/lib/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -0
  117. package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/BaseSolarDataProvider.d.ts +1 -1
  118. package/lib/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -0
  119. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/BaseSolarDataProvider.js.map +1 -1
  120. package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/BaseTimelineDataProvider.d.ts +1 -1
  121. package/lib/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -0
  122. package/lib/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -0
  123. package/lib/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -0
  124. package/lib/imodel-components-react/timeline/InlineEdit.js.map +1 -0
  125. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/InlineEdit.scss +3 -5
  126. package/lib/imodel-components-react/timeline/PlayButton.d.ts.map +1 -0
  127. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/PlayButton.js +1 -1
  128. package/lib/imodel-components-react/timeline/PlayButton.js.map +1 -0
  129. package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/Scrubber.d.ts +2 -4
  130. package/lib/imodel-components-react/timeline/Scrubber.d.ts.map +1 -0
  131. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/Scrubber.js +19 -12
  132. package/lib/imodel-components-react/timeline/Scrubber.js.map +1 -0
  133. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/Scrubber.scss +1 -1
  134. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/SolarTimeline.d.ts +1 -1
  135. package/lib/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -0
  136. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/SolarTimeline.js +3 -3
  137. package/lib/imodel-components-react/timeline/SolarTimeline.js.map +1 -0
  138. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/SolarTimeline.scss +0 -2
  139. package/lib/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -0
  140. package/lib/imodel-components-react/timeline/SpeedTimeline.js.map +1 -0
  141. package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/SpeedTimeline.scss +2 -4
  142. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/Timeline.scss +7 -9
  143. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/TimelineComponent.d.ts +1 -1
  144. package/lib/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -0
  145. package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/TimelineComponent.js +5 -5
  146. package/lib/imodel-components-react/timeline/TimelineComponent.js.map +1 -0
  147. package/lib/imodel-components-react/timeline/interfaces.d.ts.map +1 -0
  148. package/lib/imodel-components-react/timeline/interfaces.js.map +1 -0
  149. package/lib/imodel-components-react/useTranslation.d.ts.map +1 -0
  150. package/lib/{esm/imodel-components-react → imodel-components-react}/useTranslation.js +2 -2
  151. package/lib/imodel-components-react/useTranslation.js.map +1 -0
  152. package/lib/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -0
  153. package/lib/{esm/imodel-components-react → imodel-components-react}/viewport/ViewportComponent.js +1 -1
  154. package/lib/imodel-components-react/viewport/ViewportComponent.js.map +1 -0
  155. package/lib/{cjs/imodel-components-react → imodel-components-react}/viewport/ViewportComponentEvents.d.ts +1 -1
  156. package/lib/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -0
  157. package/lib/{esm/imodel-components-react → imodel-components-react}/viewport/ViewportComponentEvents.js +1 -1
  158. package/lib/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -0
  159. package/lib/imodel-components-react.d.ts +77 -0
  160. package/lib/imodel-components-react.d.ts.map +1 -0
  161. package/lib/imodel-components-react.js +90 -0
  162. package/lib/imodel-components-react.js.map +1 -0
  163. package/lib/internal.d.ts +2 -0
  164. package/lib/internal.d.ts.map +1 -0
  165. package/lib/{esm/imodel-components-react/navigationaids/Cube.scss → internal.js} +2 -15
  166. package/lib/internal.js.map +1 -0
  167. package/package.json +46 -36
  168. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +0 -1
  169. package/lib/cjs/imodel-components-react/UiIModelComponents.js +0 -78
  170. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +0 -1
  171. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +0 -1
  172. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +0 -182
  173. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +0 -1
  174. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +0 -1
  175. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +0 -119
  176. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +0 -1
  177. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +0 -90
  178. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +0 -1
  179. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +0 -76
  180. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +0 -1
  181. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +0 -1
  182. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +0 -141
  183. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +0 -1
  184. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +0 -1
  185. package/lib/cjs/imodel-components-react/color/HueSlider.js +0 -201
  186. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +0 -1
  187. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +0 -1
  188. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +0 -197
  189. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +0 -1
  190. package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +0 -1
  191. package/lib/cjs/imodel-components-react/color/Swatch.js +0 -63
  192. package/lib/cjs/imodel-components-react/color/Swatch.js.map +0 -1
  193. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +0 -1
  194. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +0 -24
  195. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +0 -1
  196. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +0 -1
  197. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +0 -150
  198. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +0 -1
  199. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +0 -1
  200. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +0 -153
  201. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +0 -1
  202. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +0 -1
  203. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +0 -94
  204. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +0 -1
  205. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +0 -1
  206. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +0 -265
  207. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +0 -1
  208. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +0 -1
  209. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +0 -84
  210. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +0 -1
  211. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +0 -1
  212. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +0 -160
  213. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +0 -1
  214. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +0 -51
  215. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +0 -1
  216. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +0 -151
  217. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +0 -1
  218. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +0 -153
  219. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +0 -1
  220. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +0 -683
  221. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +0 -1
  222. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +0 -179
  223. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +0 -1
  224. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +0 -736
  225. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +0 -1
  226. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +0 -1
  227. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +0 -112
  228. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +0 -1
  229. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +0 -55
  230. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +0 -1
  231. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +0 -56
  232. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +0 -1
  233. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +0 -1
  234. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +0 -94
  235. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +0 -1
  236. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +0 -1
  237. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +0 -115
  238. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +0 -1
  239. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +0 -1
  240. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +0 -117
  241. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +0 -1
  242. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +0 -1
  243. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +0 -137
  244. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +0 -1
  245. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +0 -1
  246. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +0 -193
  247. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +0 -1
  248. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +0 -1
  249. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +0 -145
  250. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +0 -1
  251. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +0 -1
  252. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +0 -104
  253. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +0 -1
  254. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +0 -1
  255. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +0 -59
  256. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +0 -1
  257. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +0 -1
  258. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +0 -87
  259. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +0 -1
  260. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +0 -1
  261. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +0 -60
  262. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +0 -1
  263. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +0 -1
  264. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +0 -68
  265. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +0 -1
  266. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +0 -1
  267. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +0 -76
  268. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +0 -1
  269. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +0 -1
  270. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +0 -59
  271. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +0 -1
  272. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +0 -1
  273. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +0 -65
  274. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +0 -1
  275. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +0 -1
  276. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +0 -106
  277. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +0 -1
  278. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +0 -1
  279. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +0 -135
  280. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +0 -1
  281. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +0 -1
  282. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +0 -150
  283. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +0 -1
  284. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +0 -1
  285. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +0 -64
  286. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +0 -1
  287. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +0 -1
  288. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +0 -86
  289. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +0 -1
  290. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +0 -24
  291. package/lib/cjs/imodel-components-react/timeline/PlayButton.d.ts.map +0 -1
  292. package/lib/cjs/imodel-components-react/timeline/PlayButton.js +0 -50
  293. package/lib/cjs/imodel-components-react/timeline/PlayButton.js.map +0 -1
  294. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +0 -1
  295. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +0 -185
  296. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +0 -1
  297. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +0 -105
  298. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +0 -60
  299. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +0 -1
  300. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +0 -358
  301. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +0 -1
  302. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +0 -45
  303. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +0 -1
  304. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +0 -57
  305. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +0 -1
  306. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +0 -165
  307. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +0 -100
  308. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +0 -1
  309. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +0 -286
  310. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +0 -1
  311. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +0 -1
  312. package/lib/cjs/imodel-components-react/timeline/interfaces.js +0 -46
  313. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +0 -1
  314. package/lib/cjs/imodel-components-react/useTranslation.d.ts.map +0 -1
  315. package/lib/cjs/imodel-components-react/useTranslation.js +0 -52
  316. package/lib/cjs/imodel-components-react/useTranslation.js.map +0 -1
  317. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +0 -1
  318. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +0 -267
  319. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +0 -1
  320. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +0 -1
  321. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +0 -119
  322. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +0 -1
  323. package/lib/cjs/imodel-components-react.d.ts +0 -80
  324. package/lib/cjs/imodel-components-react.d.ts.map +0 -1
  325. package/lib/cjs/imodel-components-react.js +0 -103
  326. package/lib/cjs/imodel-components-react.js.map +0 -1
  327. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +0 -29
  328. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +0 -1
  329. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +0 -1
  330. package/lib/esm/imodel-components-react/UiIModelComponents.json +0 -150
  331. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +0 -36
  332. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +0 -1
  333. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +0 -1
  334. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +0 -71
  335. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +0 -40
  336. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +0 -1
  337. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +0 -1
  338. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +0 -26
  339. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +0 -1
  340. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +0 -1
  341. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +0 -47
  342. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +0 -1
  343. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +0 -1
  344. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +0 -62
  345. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +0 -25
  346. package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +0 -1
  347. package/lib/esm/imodel-components-react/color/HueSlider.scss +0 -78
  348. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +0 -23
  349. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +0 -1
  350. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +0 -1
  351. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +0 -36
  352. package/lib/esm/imodel-components-react/color/Swatch.d.ts +0 -25
  353. package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +0 -1
  354. package/lib/esm/imodel-components-react/color/Swatch.scss +0 -22
  355. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +0 -7
  356. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +0 -1
  357. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +0 -1
  358. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +0 -42
  359. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +0 -1
  360. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +0 -1
  361. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +0 -18
  362. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +0 -44
  363. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +0 -1
  364. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +0 -1
  365. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +0 -16
  366. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +0 -26
  367. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +0 -1
  368. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +0 -47
  369. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +0 -1
  370. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +0 -1
  371. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +0 -106
  372. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +0 -33
  373. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +0 -1
  374. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +0 -48
  375. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +0 -59
  376. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +0 -1
  377. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +0 -46
  378. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +0 -1
  379. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +0 -1
  380. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +0 -1
  381. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +0 -1
  382. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +0 -144
  383. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +0 -1
  384. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +0 -1
  385. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +0 -134
  386. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +0 -29
  387. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +0 -1
  388. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +0 -1
  389. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +0 -19
  390. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +0 -1
  391. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +0 -1
  392. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +0 -20
  393. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +0 -1
  394. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +0 -1
  395. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +0 -19
  396. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +0 -1
  397. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +0 -19
  398. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +0 -1
  399. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +0 -21
  400. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +0 -1
  401. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +0 -1
  402. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +0 -23
  403. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +0 -1
  404. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +0 -1
  405. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +0 -24
  406. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +0 -1
  407. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +0 -1
  408. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +0 -18
  409. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +0 -1
  410. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +0 -18
  411. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +0 -1
  412. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +0 -1
  413. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +0 -17
  414. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +0 -1
  415. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +0 -1
  416. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +0 -19
  417. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +0 -1
  418. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +0 -1
  419. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +0 -18
  420. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +0 -1
  421. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +0 -1
  422. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +0 -18
  423. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +0 -1
  424. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +0 -1
  425. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +0 -18
  426. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +0 -1
  427. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +0 -1
  428. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +0 -18
  429. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +0 -1
  430. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +0 -1
  431. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +0 -18
  432. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +0 -1
  433. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +0 -1
  434. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +0 -24
  435. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +0 -1
  436. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +0 -1
  437. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +0 -53
  438. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +0 -1
  439. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +0 -32
  440. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +0 -1
  441. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +0 -1
  442. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +0 -27
  443. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +0 -1
  444. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +0 -1
  445. package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts +0 -12
  446. package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts.map +0 -1
  447. package/lib/esm/imodel-components-react/timeline/PlayButton.js.map +0 -1
  448. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +0 -54
  449. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +0 -1
  450. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +0 -1
  451. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +0 -1
  452. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +0 -1
  453. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +0 -16
  454. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +0 -1
  455. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +0 -1
  456. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +0 -40
  457. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +0 -1
  458. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +0 -1
  459. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +0 -48
  460. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +0 -146
  461. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +0 -1
  462. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +0 -1
  463. package/lib/esm/imodel-components-react/useTranslation.d.ts +0 -7
  464. package/lib/esm/imodel-components-react/useTranslation.d.ts.map +0 -1
  465. package/lib/esm/imodel-components-react/useTranslation.js.map +0 -1
  466. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +0 -43
  467. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +0 -1
  468. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +0 -1
  469. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +0 -119
  470. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +0 -1
  471. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +0 -1
  472. package/lib/esm/imodel-components-react.d.ts +0 -80
  473. package/lib/esm/imodel-components-react.d.ts.map +0 -1
  474. package/lib/esm/imodel-components-react.js +0 -85
  475. package/lib/esm/imodel-components-react.js.map +0 -1
  476. /package/lib/{cjs/imodel-components-react → imodel-components-react}/UiIModelComponents.json +0 -0
  477. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/AlphaSlider.d.ts +0 -0
  478. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/AlphaSlider.scss +0 -0
  479. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/ColorPickerButton.d.ts +0 -0
  480. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/ColorPickerDialog.d.ts +0 -0
  481. /package/lib/{esm/imodel-components-react → imodel-components-react}/color/ColorPickerDialog.js +0 -0
  482. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/ColorPickerPopup.d.ts +0 -0
  483. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/ColorPickerPopup.scss +0 -0
  484. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/HueSlider.d.ts +0 -0
  485. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/HueSlider.scss +0 -0
  486. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/SaturationPicker.d.ts +0 -0
  487. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/SaturationPicker.scss +0 -0
  488. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/Swatch.d.ts +0 -0
  489. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/Swatch.scss +0 -0
  490. /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/getCSSColorFromDef.d.ts +0 -0
  491. /package/lib/{esm/imodel-components-react → imodel-components-react}/color/getCSSColorFromDef.js +0 -0
  492. /package/lib/{cjs/imodel-components-react → imodel-components-react}/editors/ColorEditor.d.ts +0 -0
  493. /package/lib/{cjs/imodel-components-react → imodel-components-react}/editors/WeightEditor.d.ts +0 -0
  494. /package/lib/{cjs/imodel-components-react → imodel-components-react}/inputs/QuantityInput.d.ts +0 -0
  495. /package/lib/{cjs/imodel-components-react → imodel-components-react}/inputs/QuantityNumberInput.d.ts +0 -0
  496. /package/lib/{esm/imodel-components-react → imodel-components-react}/inputs/QuantityNumberInput.js +0 -0
  497. /package/lib/{cjs/imodel-components-react → imodel-components-react}/lineweight/Swatch.d.ts +0 -0
  498. /package/lib/{cjs/imodel-components-react → imodel-components-react}/lineweight/WeightPickerButton.d.ts +0 -0
  499. /package/lib/{cjs/imodel-components-react → imodel-components-react}/navigationaids/Cube.d.ts +0 -0
  500. /package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/Cube.js +0 -0
  501. /package/lib/{cjs/imodel-components-react → imodel-components-react}/navigationaids/Cube.scss +0 -0
  502. /package/lib/{cjs/imodel-components-react → imodel-components-react}/navigationaids/DrawingNavigationAid.d.ts +0 -0
  503. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatPanel.d.ts +0 -0
  504. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatPrecision.d.ts +0 -0
  505. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatSample.d.ts +0 -0
  506. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatType.d.ts +0 -0
  507. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatUnitLabel.d.ts +0 -0
  508. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatUnits.d.ts +0 -0
  509. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/MiscFormatOptions.d.ts +0 -0
  510. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/QuantityFormatPanel.d.ts +0 -0
  511. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalPrecision.d.ts +0 -0
  512. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalSeparator.d.ts +0 -0
  513. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/FractionPrecision.d.ts +0 -0
  514. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/ScientificType.d.ts +0 -0
  515. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/SignOption.d.ts +0 -0
  516. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSeparatorSelector.d.ts +0 -0
  517. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSizeSelector.d.ts +0 -0
  518. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSelector.d.ts +0 -0
  519. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSeparator.d.ts +0 -0
  520. /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/UnitDescr.d.ts +0 -0
  521. /package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/UnitDescr.js +0 -0
  522. /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/BaseSolarDataProvider.js +0 -0
  523. /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/BaseTimelineDataProvider.js +0 -0
  524. /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/InlineEdit.d.ts +0 -0
  525. /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/InlineEdit.js +0 -0
  526. /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/PlayButton.d.ts +0 -0
  527. /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/SpeedTimeline.d.ts +0 -0
  528. /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/SpeedTimeline.js +0 -0
  529. /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/TimelineComponent.scss +0 -0
  530. /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/interfaces.d.ts +0 -0
  531. /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/interfaces.js +0 -0
  532. /package/lib/{cjs/imodel-components-react → imodel-components-react}/useTranslation.d.ts +0 -0
  533. /package/lib/{cjs/imodel-components-react → imodel-components-react}/viewport/ViewportComponent.d.ts +0 -0
@@ -1,115 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module QuantityFormat
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.FormatTypeOption = void 0;
34
- const React = __importStar(require("react"));
35
- const core_quantity_1 = require("@itwin/core-quantity");
36
- const itwinui_react_1 = require("@itwin/itwinui-react");
37
- const useTranslation_1 = require("../useTranslation");
38
- /** Component to select the format type.
39
- * @alpha
40
- */
41
- function FormatTypeSelector(props) {
42
- const { type, onChange, ...otherProps } = props;
43
- const { translate } = (0, useTranslation_1.useTranslation)();
44
- const formatOptions = React.useRef([
45
- {
46
- value: core_quantity_1.FormatType.Decimal,
47
- label: translate("QuantityFormat.decimal"),
48
- },
49
- {
50
- value: core_quantity_1.FormatType.Scientific,
51
- label: translate("QuantityFormat.scientific"),
52
- },
53
- {
54
- value: core_quantity_1.FormatType.Station,
55
- label: translate("QuantityFormat.station"),
56
- },
57
- {
58
- value: core_quantity_1.FormatType.Fractional,
59
- label: translate("QuantityFormat.fractional"),
60
- },
61
- ]);
62
- const handleOnChange = React.useCallback((newValue) => {
63
- onChange && onChange(newValue);
64
- }, [onChange]);
65
- return (React.createElement(itwinui_react_1.Select, { options: formatOptions.current, value: type, onChange: handleOnChange, size: "small", ...otherProps }));
66
- }
67
- /** Component to set the Quantity Format type.
68
- * @alpha
69
- */
70
- // eslint-disable-next-line deprecation/deprecation
71
- function FormatTypeOption(props) {
72
- const { formatProps, onChange } = props;
73
- const { translate } = (0, useTranslation_1.useTranslation)();
74
- const handleFormatTypeChange = React.useCallback((newType) => {
75
- const type = (0, core_quantity_1.formatTypeToString)(newType);
76
- let precision;
77
- let stationOffsetSize;
78
- let scientificType;
79
- switch (newType // type must be decimal, fractional, scientific, or station
80
- ) {
81
- case core_quantity_1.FormatType.Scientific:
82
- precision = core_quantity_1.DecimalPrecision.Six;
83
- scientificType = (0, core_quantity_1.scientificTypeToString)(core_quantity_1.ScientificType.Normalized);
84
- break;
85
- case core_quantity_1.FormatType.Decimal:
86
- precision = core_quantity_1.DecimalPrecision.Four;
87
- break;
88
- case core_quantity_1.FormatType.Station:
89
- precision = core_quantity_1.DecimalPrecision.Two;
90
- stationOffsetSize = formatProps.composite?.units[0].name
91
- .toLocaleLowerCase()
92
- .endsWith("m")
93
- ? 3
94
- : 2;
95
- break;
96
- case core_quantity_1.FormatType.Fractional:
97
- precision = core_quantity_1.FractionalPrecision.Eight;
98
- break;
99
- }
100
- const newFormatProps = {
101
- ...formatProps,
102
- type,
103
- precision,
104
- scientificType,
105
- stationOffsetSize,
106
- };
107
- onChange && onChange(newFormatProps);
108
- }, [formatProps, onChange]);
109
- const formatType = (0, core_quantity_1.parseFormatType)(formatProps.type, "format");
110
- return (React.createElement(React.Fragment, null,
111
- React.createElement("span", { className: "uicore-label.current" }, translate("QuantityFormat.labels.type")),
112
- React.createElement(FormatTypeSelector, { "data-testid": "format-type-selector", type: formatType, onChange: handleFormatTypeChange })));
113
- }
114
- exports.FormatTypeOption = FormatTypeOption;
115
- //# sourceMappingURL=FormatType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormatType.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatType.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAG/B,wDAQ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C,CACnC;QACP,oBAAC,kBAAkB,mBACL,sBAAsB,EAClC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,sBAAsB,GAChC,CACD,CACJ,CAAC;AACJ,CAAC;AAxDD,4CAwDC","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 type { CommonProps } from \"@itwin/core-react\";\nimport type { FormatProps } from \"@itwin/core-quantity\";\nimport {\n DecimalPrecision,\n FormatType,\n formatTypeToString,\n FractionalPrecision,\n parseFormatType,\n ScientificType,\n scientificTypeToString,\n} from \"@itwin/core-quantity\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Select } from \"@itwin/itwinui-react\";\nimport { useTranslation } from \"../useTranslation\";\n\n/** Properties of [[FormatTypeSelector]] component.\n * @alpha\n */\n// eslint-disable-next-line deprecation/deprecation\ninterface FormatTypeSelectorProps extends CommonProps {\n type: FormatType;\n onChange: (value: FormatType) => void;\n}\n\n/** Component to select the format type.\n * @alpha\n */\nfunction FormatTypeSelector(props: FormatTypeSelectorProps) {\n const { type, onChange, ...otherProps } = props;\n const { translate } = useTranslation();\n const formatOptions = React.useRef<SelectOption<FormatType>[]>([\n {\n value: FormatType.Decimal,\n label: translate(\"QuantityFormat.decimal\"),\n },\n {\n value: FormatType.Scientific,\n label: translate(\"QuantityFormat.scientific\"),\n },\n {\n value: FormatType.Station,\n label: translate(\"QuantityFormat.station\"),\n },\n {\n value: FormatType.Fractional,\n label: translate(\"QuantityFormat.fractional\"),\n },\n ]);\n\n const handleOnChange = React.useCallback(\n (newValue: FormatType) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n return (\n <Select\n options={formatOptions.current}\n value={type}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n\n/** Properties of [[FormatTypeOption]] component.\n * @alpha\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof FormatTypeOption>`\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface FormatTypeOptionProps extends CommonProps {\n formatProps: FormatProps;\n onChange?: (format: FormatProps) => void;\n}\n\n/** Component to set the Quantity Format type.\n * @alpha\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function FormatTypeOption(props: FormatTypeOptionProps) {\n const { formatProps, onChange } = props;\n const { translate } = useTranslation();\n const handleFormatTypeChange = React.useCallback(\n (newType: FormatType) => {\n const type = formatTypeToString(newType);\n let precision: number | undefined;\n let stationOffsetSize: number | undefined;\n let scientificType: string | undefined;\n switch (\n newType // type must be decimal, fractional, scientific, or station\n ) {\n case FormatType.Scientific:\n precision = DecimalPrecision.Six;\n scientificType = scientificTypeToString(ScientificType.Normalized);\n break;\n case FormatType.Decimal:\n precision = DecimalPrecision.Four;\n break;\n case FormatType.Station:\n precision = DecimalPrecision.Two;\n stationOffsetSize = formatProps.composite?.units[0].name\n .toLocaleLowerCase()\n .endsWith(\"m\")\n ? 3\n : 2;\n break;\n case FormatType.Fractional:\n precision = FractionalPrecision.Eight;\n break;\n }\n const newFormatProps = {\n ...formatProps,\n type,\n precision,\n scientificType,\n stationOffsetSize,\n };\n onChange && onChange(newFormatProps);\n },\n [formatProps, onChange]\n );\n\n const formatType = parseFormatType(formatProps.type, \"format\");\n return (\n <>\n <span className={\"uicore-label.current\"}>\n {translate(\"QuantityFormat.labels.type\")}\n </span>\n <FormatTypeSelector\n data-testid=\"format-type-selector\"\n type={formatType}\n onChange={handleFormatTypeChange}\n />\n </>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormatUnitLabel.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatUnitLabel.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAqDxD;;;GAGG;AAEH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAuF1D"}
@@ -1,117 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module QuantityFormat
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- var __importDefault = (this && this.__importDefault) || function (mod) {
33
- return (mod && mod.__esModule) ? mod : { "default": mod };
34
- };
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.FormatUnitLabel = void 0;
37
- const classnames_1 = __importDefault(require("classnames"));
38
- const React = __importStar(require("react"));
39
- const core_quantity_1 = require("@itwin/core-quantity");
40
- const itwinui_react_1 = require("@itwin/itwinui-react");
41
- const useTranslation_1 = require("../useTranslation");
42
- function UomSeparatorSelector(props) {
43
- const { separator, onChange, ...otherProps } = props;
44
- const { translate } = (0, useTranslation_1.useTranslation)();
45
- const handleOnChange = React.useCallback((newValue) => {
46
- onChange && onChange(newValue);
47
- }, [onChange]);
48
- const separatorOptions = React.useMemo(() => {
49
- const uomDefaultEntries = [
50
- { value: "", label: translate("QuantityFormat.none") },
51
- { value: " ", label: translate("QuantityFormat.space") },
52
- { value: "-", label: translate("QuantityFormat.dash") },
53
- ];
54
- const completeListOfEntries = [];
55
- if (undefined ===
56
- uomDefaultEntries.find((option) => option.value === separator)) {
57
- completeListOfEntries.push({ value: separator, label: separator });
58
- }
59
- completeListOfEntries.push(...uomDefaultEntries);
60
- return completeListOfEntries;
61
- }, [separator, translate]);
62
- return (React.createElement(itwinui_react_1.Select, { options: separatorOptions, value: separator, onChange: handleOnChange, size: "small", ...otherProps }));
63
- }
64
- /** Component to set the label separator definition in a Quantity Format and if it the label is to be displayed.
65
- * @alpha
66
- */
67
- // eslint-disable-next-line deprecation/deprecation
68
- function FormatUnitLabel(props) {
69
- const { formatProps, onUnitLabelChange } = props;
70
- const { translate } = (0, useTranslation_1.useTranslation)();
71
- const handleSetFormatProps = React.useCallback((newProps) => {
72
- onUnitLabelChange && onUnitLabelChange(newProps);
73
- }, [onUnitLabelChange]);
74
- const isFormatTraitSet = React.useCallback((trait) => {
75
- return core_quantity_1.Format.isFormatTraitSetInProps(formatProps, trait);
76
- }, [formatProps]);
77
- const setFormatTrait = React.useCallback((trait, setActive) => {
78
- const traitStr = (0, core_quantity_1.getTraitString)(trait);
79
- let formatTraits = [traitStr];
80
- if (setActive) {
81
- // setting trait
82
- if (formatProps.formatTraits) {
83
- const traits = Array.isArray(formatProps.formatTraits)
84
- ? formatProps.formatTraits
85
- : formatProps.formatTraits.split(/,|;|\|/);
86
- if (!traits.find((traitEntry) => traitStr === traitEntry)) {
87
- formatTraits = [...traits, traitStr];
88
- }
89
- }
90
- }
91
- else {
92
- // clearing trait
93
- if (!formatProps.formatTraits)
94
- return;
95
- const traits = Array.isArray(formatProps.formatTraits)
96
- ? formatProps.formatTraits
97
- : formatProps.formatTraits.split(/,|;|\|/);
98
- formatTraits = traits.filter((traitEntry) => traitEntry !== traitStr);
99
- }
100
- const newFormatProps = { ...formatProps, formatTraits };
101
- handleSetFormatProps(newFormatProps);
102
- }, [formatProps, handleSetFormatProps]);
103
- const handleUomSeparatorChange = React.useCallback((newSeparator) => {
104
- const newFormatProps = { ...formatProps, uomSeparator: newSeparator };
105
- handleSetFormatProps(newFormatProps);
106
- }, [formatProps, handleSetFormatProps]);
107
- const handleShowUnitLabelChange = React.useCallback((e) => {
108
- setFormatTrait(core_quantity_1.FormatTraits.ShowUnitLabel, e.target.checked);
109
- }, [setFormatTrait]);
110
- return (React.createElement(React.Fragment, null,
111
- React.createElement("span", { className: "uicore-label" }, translate("QuantityFormat.labels.appendUnitLabel")),
112
- React.createElement(itwinui_react_1.Checkbox, { "data-testid": "show-unit-label-checkbox", checked: isFormatTraitSet(core_quantity_1.FormatTraits.ShowUnitLabel), onChange: handleShowUnitLabelChange }),
113
- React.createElement("span", { className: (0, classnames_1.default)("uicore-label", !isFormatTraitSet(core_quantity_1.FormatTraits.ShowUnitLabel) && "uicore-disabled") }, translate("QuantityFormat.labels.labelSeparator")),
114
- React.createElement(UomSeparatorSelector, { "data-testid": "uom-separator-select", separator: formatProps.uomSeparator ?? "", onChange: handleUomSeparatorChange, disabled: !isFormatTraitSet(core_quantity_1.FormatTraits.ShowUnitLabel) })));
115
- }
116
- exports.FormatUnitLabel = FormatUnitLabel;
117
- //# sourceMappingURL=FormatUnitLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormatUnitLabel.js","sour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,CAAC,EACD,CAAC,cAAc,CAAC,CACjB,CAAC;IAEF,OAAO,CACL;QACE,8BAAM,SAAS,EAAE,cAAc,IAC5B,SAAS,CAAC,uCAAuC,CAAC,CAC9C;QACP,oBAAC,wBAAQ,mBACK,0BAA0B,EACtC,OAAO,EAAE,gBAAgB,CAAC,4BAAY,CAAC,aAAa,CAAC,EACrD,QAAQ,EAAE,yBAAyB,GACnC;QACF,8BACE,SAAS,EAAE,IAAA,oBAAU,EACnB,cAAc,EACd,CAAC,gBAAgB,CAAC,4BAAY,CAAC,aAAa,CAAC,IAAI,iBAAiB,CACnE,IAEA,SAAS,CAAC,sCAAsC,CAAC,CAC7C;QACP,oBAAC,oBAAoB,mBACP,sBAAsB,EAClC,SAAS,EAAE,WAAW,CAAC,YAAY,IAAI,EAAE,EACzC,QAAQ,EAAE,wBAAwB,EAClC,QAAQ,EAAE,CAAC,gBAAgB,CAAC,4BAAY,CAAC,aAAa,CAAC,GACvD,CACD,CACJ,CAAC;AACJ,CAAC;AAvFD,0CAuFC","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 type { CommonProps } from \"@itwin/core-react\";\nimport type { FormatProps } from \"@itwin/core-quantity\";\nimport { Format, FormatTraits, getTraitString } from \"@itwin/core-quantity\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Checkbox, Select } from \"@itwin/itwinui-react\";\nimport { useTranslation } from \"../useTranslation\";\n\n// eslint-disable-next-line deprecation/deprecation\ninterface UomSeparatorSelectorProps extends CommonProps {\n separator: string;\n disabled?: boolean;\n onChange: (value: string) => void;\n}\n\nfunction UomSeparatorSelector(props: UomSeparatorSelectorProps) {\n const { separator, onChange, ...otherProps } = props;\n const { translate } = useTranslation();\n\n const handleOnChange = React.useCallback(\n (newValue: string) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n const separatorOptions = React.useMemo(() => {\n const uomDefaultEntries: SelectOption<string>[] = [\n { value: \"\", label: translate(\"QuantityFormat.none\") },\n { value: \" \", label: translate(\"QuantityFormat.space\") },\n { value: \"-\", label: translate(\"QuantityFormat.dash\") },\n ];\n const completeListOfEntries: SelectOption<string>[] = [];\n\n if (\n undefined ===\n uomDefaultEntries.find((option) => option.value === separator)\n ) {\n completeListOfEntries.push({ value: separator, label: separator });\n }\n completeListOfEntries.push(...uomDefaultEntries);\n return completeListOfEntries;\n }, [separator, translate]);\n\n return (\n <Select\n options={separatorOptions}\n value={separator}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n\n/** Properties of [[FormatUnitLabel]] component.\n * @alpha\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof FormatUnitLabel>`\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface FormatUnitLabelProps extends CommonProps {\n formatProps: FormatProps;\n onUnitLabelChange?: (format: FormatProps) => void;\n}\n\n/** Component to set the label separator definition in a Quantity Format and if it the label is to be displayed.\n * @alpha\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function FormatUnitLabel(props: FormatUnitLabelProps) {\n const { formatProps, onUnitLabelChange } = props;\n const { translate } = useTranslation();\n\n const handleSetFormatProps = React.useCallback(\n (newProps: FormatProps) => {\n onUnitLabelChange && onUnitLabelChange(newProps);\n },\n [onUnitLabelChange]\n );\n\n const isFormatTraitSet = React.useCallback(\n (trait: FormatTraits) => {\n return Format.isFormatTraitSetInProps(formatProps, trait);\n },\n [formatProps]\n );\n\n const setFormatTrait = React.useCallback(\n (trait: FormatTraits, setActive: boolean) => {\n const traitStr = getTraitString(trait);\n let formatTraits: string[] = [traitStr];\n if (setActive) {\n // setting trait\n if (formatProps.formatTraits) {\n const traits = Array.isArray(formatProps.formatTraits)\n ? formatProps.formatTraits\n : formatProps.formatTraits.split(/,|;|\\|/);\n if (!traits.find((traitEntry) => traitStr === traitEntry)) {\n formatTraits = [...traits, traitStr];\n }\n }\n } else {\n // clearing trait\n if (!formatProps.formatTraits) return;\n const traits = Array.isArray(formatProps.formatTraits)\n ? formatProps.formatTraits\n : formatProps.formatTraits.split(/,|;|\\|/);\n formatTraits = traits.filter((traitEntry) => traitEntry !== traitStr);\n }\n const newFormatProps = { ...formatProps, formatTraits };\n handleSetFormatProps(newFormatProps);\n },\n [formatProps, handleSetFormatProps]\n );\n\n const handleUomSeparatorChange = React.useCallback(\n (newSeparator: string) => {\n const newFormatProps = { ...formatProps, uomSeparator: newSeparator };\n handleSetFormatProps(newFormatProps);\n },\n [formatProps, handleSetFormatProps]\n );\n\n const handleShowUnitLabelChange = React.useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.ShowUnitLabel, e.target.checked);\n },\n [setFormatTrait]\n );\n\n return (\n <>\n <span className={\"uicore-label\"}>\n {translate(\"QuantityFormat.labels.appendUnitLabel\")}\n </span>\n <Checkbox\n data-testid=\"show-unit-label-checkbox\"\n checked={isFormatTraitSet(FormatTraits.ShowUnitLabel)}\n onChange={handleShowUnitLabelChange}\n />\n <span\n className={classnames(\n \"uicore-label\",\n !isFormatTraitSet(FormatTraits.ShowUnitLabel) && \"uicore-disabled\"\n )}\n >\n {translate(\"QuantityFormat.labels.labelSeparator\")}\n </span>\n <UomSeparatorSelector\n data-testid=\"uom-separator-select\"\n separator={formatProps.uomSeparator ?? \"\"}\n onChange={handleUomSeparatorChange}\n disabled={!isFormatTraitSet(FormatTraits.ShowUnitLabel)}\n />\n </>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormatUnits.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatUnits.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACd,MAAM,sBAAsB,CAAC;AAK9B;;;GAGG;AAEH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,aAAa,EAAE,WAAW,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/C;AAED;;GAEG;AAEH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAuJlD"}
@@ -1,137 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module QuantityFormat
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.FormatUnits = void 0;
34
- const React = __importStar(require("react"));
35
- const itwinui_react_1 = require("@itwin/itwinui-react");
36
- const UnitDescr_1 = require("./misc/UnitDescr");
37
- const useTranslation_1 = require("../useTranslation");
38
- /** Component to show/edit Units used for Quantity Formatting.
39
- * @alpha
40
- */
41
- // eslint-disable-next-line deprecation/deprecation
42
- function FormatUnits(props) {
43
- const { initialFormat, persistenceUnit, unitsProvider, onUnitsChange } = props;
44
- const { translate } = (0, useTranslation_1.useTranslation)();
45
- const initialFormatRef = React.useRef(initialFormat);
46
- const [formatProps, setFormatProps] = React.useState(initialFormat);
47
- React.useEffect(() => {
48
- if (initialFormatRef.current !== initialFormat) {
49
- initialFormatRef.current = initialFormat;
50
- setFormatProps(initialFormat);
51
- }
52
- }, [initialFormat]);
53
- const handleSetFormatProps = React.useCallback((newProps) => {
54
- setFormatProps(newProps);
55
- onUnitsChange && onUnitsChange(newProps);
56
- }, [onUnitsChange]);
57
- const handleUnitLabelChange = React.useCallback((newLabel, index) => {
58
- if (formatProps.composite &&
59
- formatProps.composite.units.length > index &&
60
- index >= 0) {
61
- const units = formatProps.composite.units.map((entry, ndx) => {
62
- if (index === ndx)
63
- return { name: entry.name, label: newLabel };
64
- else
65
- return entry;
66
- });
67
- const composite = { ...formatProps.composite, units };
68
- const newFormatProps = { ...formatProps, composite };
69
- handleSetFormatProps(newFormatProps);
70
- }
71
- }, [formatProps, handleSetFormatProps]);
72
- const handleUnitChange = React.useCallback((newUnit, index) => {
73
- const unitParts = newUnit.split(/:/);
74
- if (unitParts[0] === "REMOVEUNIT") {
75
- if (formatProps.composite && formatProps.composite.units.length > 1) {
76
- const units = [...formatProps.composite.units];
77
- units.pop();
78
- const composite = { ...formatProps.composite, units };
79
- const newFormatProps = { ...formatProps, composite };
80
- handleSetFormatProps(newFormatProps);
81
- }
82
- }
83
- else if (unitParts[0] === "ADDSUBUNIT") {
84
- const units = formatProps.composite && formatProps.composite.units.length
85
- ? [
86
- ...formatProps.composite.units,
87
- { name: unitParts[1], label: unitParts[2] },
88
- ]
89
- : [{ name: unitParts[1], label: unitParts[2] }];
90
- const composite = { ...formatProps.composite, units };
91
- const newFormatProps = { ...formatProps, composite };
92
- handleSetFormatProps(newFormatProps);
93
- }
94
- else {
95
- if (formatProps.composite &&
96
- formatProps.composite.units.length > index &&
97
- index >= 0) {
98
- const units = formatProps.composite.units.map((entry, ndx) => {
99
- if (index === ndx)
100
- return { name: unitParts[0], label: unitParts[1] };
101
- else
102
- return entry;
103
- });
104
- const composite = { ...formatProps.composite, units };
105
- const newFormatProps = { ...formatProps, composite };
106
- handleSetFormatProps(newFormatProps);
107
- }
108
- else if (!formatProps.composite) {
109
- const composite = {
110
- units: [{ name: unitParts[0], label: unitParts[1] }],
111
- };
112
- const newFormatProps = { ...formatProps, composite };
113
- handleSetFormatProps(newFormatProps);
114
- }
115
- }
116
- }, [formatProps, handleSetFormatProps]);
117
- const handleOnSpacerChange = React.useCallback((e) => {
118
- if (formatProps.composite) {
119
- const spacerValue = e.target.value.length ? e.target.value[0] : ""; // spacer can only be empty or a single character
120
- const composite = { ...formatProps.composite, spacer: spacerValue };
121
- const newFormatProps = { ...formatProps, composite };
122
- handleSetFormatProps(newFormatProps);
123
- }
124
- }, [formatProps, handleSetFormatProps]);
125
- return (React.createElement(React.Fragment, null,
126
- formatProps.composite?.units
127
- ? formatProps.composite.units.map((value, index) => (React.createElement(UnitDescr_1.UnitDescr, { key: value.name, name: value.name, label: value.label ?? "", parentUnitName: index > 0
128
- ? formatProps.composite.units[index - 1].name
129
- : undefined, unitsProvider: unitsProvider, index: index, onUnitChange: handleUnitChange, onLabelChange: handleUnitLabelChange, readonly: index < formatProps.composite.units.length - 1 })))
130
- : persistenceUnit && (React.createElement(UnitDescr_1.UnitDescr, { key: persistenceUnit.name, name: persistenceUnit.name, label: persistenceUnit.label, unitsProvider: unitsProvider, index: 0, onUnitChange: handleUnitChange, onLabelChange: handleUnitLabelChange })),
131
- formatProps.composite?.units &&
132
- formatProps.composite.units.length > 1 && (React.createElement(React.Fragment, null,
133
- React.createElement("span", { key: "composite-spacer-label", className: "uicore-label" }, translate("QuantityFormat.labels.compositeSpacer")),
134
- React.createElement(itwinui_react_1.Input, { key: "composite-spacer", "data-testid": "composite-spacer", value: formatProps.composite.spacer ?? "", onChange: handleOnSpacerChange, size: "small" })))));
135
- }
136
- exports.FormatUnits = FormatUnits;
137
- //# sourceMappingURL=FormatUnits.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormatUnits.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatUnits.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAO/B,wDAA6C;AAC7C,gDAA6C;AAC7C,sDAAmD;AAcnD;;GAEG;AACH,mDAAmD;AACnD,SAAgB,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,GACpE,KAAK,CAAC;IACR,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IACvC,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAc,aAAa,CAAC,CAAC;IAClE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEpE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,gBAAgB,CAAC,OAAO,KAAK,aAAa,EAAE,CAAC;YAC/C,gBAAgB,CAAC,OAAO,GAAG,aAAa,CAAC;YACzC,cAAc,CAAC,aAAa,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,oBAAoB,GAAG,KAAK,CAAC,WAAW,CAC5C,CAAC,QAAqB,EAAE,EAAE;QACxB,cAAc,CAAC,QAAQ,CAAC,CA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EAC9B,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,EACzC,QAAQ,EAAE,oBAAoB,EAC9B,IAAI,EAAC,OAAO,GACZ,CACD,CACJ,CACF,CACJ,CAAC;AACJ,CAAC;AAvJD,kCAuJC","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 type { CommonProps } from \"@itwin/core-react\";\nimport type {\n FormatProps,\n UnitProps,\n UnitsProvider,\n} from \"@itwin/core-quantity\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { UnitDescr } from \"./misc/UnitDescr\";\nimport { useTranslation } from \"../useTranslation\";\n\n/** Properties of [[FormatUnits]] component.\n * @alpha\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof FormatUnits>`\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface FormatUnitsProps extends CommonProps {\n initialFormat: FormatProps;\n persistenceUnit?: UnitProps;\n unitsProvider: UnitsProvider;\n onUnitsChange?: (format: FormatProps) => void;\n}\n\n/** Component to show/edit Units used for Quantity Formatting.\n * @alpha\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function FormatUnits(props: FormatUnitsProps) {\n const { initialFormat, persistenceUnit, unitsProvider, onUnitsChange } =\n props;\n const { translate } = useTranslation();\n const initialFormatRef = React.useRef<FormatProps>(initialFormat);\n const [formatProps, setFormatProps] = React.useState(initialFormat);\n\n React.useEffect(() => {\n if (initialFormatRef.current !== initialFormat) {\n initialFormatRef.current = initialFormat;\n setFormatProps(initialFormat);\n }\n }, [initialFormat]);\n\n const handleSetFormatProps = React.useCallback(\n (newProps: FormatProps) => {\n setFormatProps(newProps);\n onUnitsChange && onUnitsChange(newProps);\n },\n [onUnitsChange]\n );\n\n const handleUnitLabelChange = React.useCallback(\n (newLabel: string, index: number) => {\n if (\n formatProps.composite &&\n formatProps.composite.units.length > index &&\n index >= 0\n ) {\n const units = formatProps.composite.units.map((entry, ndx) => {\n if (index === ndx) return { name: entry.name, label: newLabel };\n else return entry;\n });\n\n const composite = { ...formatProps.composite, units };\n const newFormatProps = { ...formatProps, composite };\n handleSetFormatProps(newFormatProps);\n }\n },\n [formatProps, handleSetFormatProps]\n );\n\n const handleUnitChange = React.useCallback(\n (newUnit: string, index: number) => {\n const unitParts = newUnit.split(/:/);\n if (unitParts[0] === \"REMOVEUNIT\") {\n if (formatProps.composite && formatProps.composite.units.length > 1) {\n const units = [...formatProps.composite.units];\n units.pop();\n const composite = { ...formatProps.composite, units };\n const newFormatProps = { ...formatProps, composite };\n handleSetFormatProps(newFormatProps);\n }\n } else if (unitParts[0] === \"ADDSUBUNIT\") {\n const units =\n formatProps.composite && formatProps.composite.units.length\n ? [\n ...formatProps.composite.units,\n { name: unitParts[1], label: unitParts[2] },\n ]\n : [{ name: unitParts[1], label: unitParts[2] }];\n const composite = { ...formatProps.composite, units };\n const newFormatProps = { ...formatProps, composite };\n handleSetFormatProps(newFormatProps);\n } else {\n if (\n formatProps.composite &&\n formatProps.composite.units.length > index &&\n index >= 0\n ) {\n const units = formatProps.composite.units.map((entry, ndx) => {\n if (index === ndx)\n return { name: unitParts[0], label: unitParts[1] };\n else return entry;\n });\n const composite = { ...formatProps.composite, units };\n const newFormatProps = { ...formatProps, composite };\n handleSetFormatProps(newFormatProps);\n } else if (!formatProps.composite) {\n const composite = {\n units: [{ name: unitParts[0], label: unitParts[1] }],\n };\n const newFormatProps = { ...formatProps, composite };\n handleSetFormatProps(newFormatProps);\n }\n }\n },\n [formatProps, handleSetFormatProps]\n );\n\n const handleOnSpacerChange = React.useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (formatProps.composite) {\n const spacerValue = e.target.value.length ? e.target.value[0] : \"\"; // spacer can only be empty or a single character\n const composite = { ...formatProps.composite, spacer: spacerValue };\n const newFormatProps = { ...formatProps, composite };\n handleSetFormatProps(newFormatProps);\n }\n },\n [formatProps, handleSetFormatProps]\n );\n\n return (\n <>\n {formatProps.composite?.units\n ? formatProps.composite.units.map((value, index) => (\n <UnitDescr\n key={value.name}\n name={value.name}\n label={value.label ?? \"\"}\n parentUnitName={\n index > 0\n ? formatProps.composite!.units[index - 1].name\n : undefined\n }\n unitsProvider={unitsProvider}\n index={index}\n onUnitChange={handleUnitChange}\n onLabelChange={handleUnitLabelChange}\n readonly={index < formatProps.composite!.units.length - 1}\n />\n ))\n : persistenceUnit && (\n <UnitDescr\n key={persistenceUnit.name}\n name={persistenceUnit.name}\n label={persistenceUnit.label}\n unitsProvider={unitsProvider}\n index={0}\n onUnitChange={handleUnitChange}\n onLabelChange={handleUnitLabelChange}\n />\n )}\n\n {formatProps.composite?.units &&\n formatProps.composite.units.length > 1 && (\n <>\n <span key={\"composite-spacer-label\"} className={\"uicore-label\"}>\n {translate(\"QuantityFormat.labels.compositeSpacer\")}\n </span>\n <Input\n key={\"composite-spacer\"}\n data-testid=\"composite-spacer\"\n value={formatProps.composite.spacer ?? \"\"}\n onChange={handleOnSpacerChange}\n size=\"small\"\n />\n </>\n )}\n </>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MiscFormatOptions.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/MiscFormatOptions.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AAqBxE;;;GAGG;AAEH,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AAEH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBAmW9D"}