cx 26.0.1 → 26.0.3

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 (808) hide show
  1. package/build/charts/Bar.d.ts +29 -0
  2. package/build/charts/Bar.js +74 -0
  3. package/build/charts/BarGraph.d.ts +29 -0
  4. package/build/charts/BarGraph.js +86 -0
  5. package/build/charts/BubbleGraph.d.ts +54 -0
  6. package/build/charts/BubbleGraph.js +80 -0
  7. package/build/charts/Chart.d.ts +31 -0
  8. package/build/charts/Chart.js +62 -0
  9. package/build/charts/ColorMap.d.ts +59 -0
  10. package/build/charts/ColorMap.js +97 -0
  11. package/build/charts/Column.d.ts +32 -0
  12. package/build/charts/Column.js +81 -0
  13. package/build/charts/ColumnBarBase.d.ts +92 -0
  14. package/build/charts/ColumnBarBase.js +144 -0
  15. package/build/charts/ColumnBarGraphBase.d.ts +91 -0
  16. package/build/charts/ColumnBarGraphBase.js +106 -0
  17. package/build/charts/ColumnGraph.d.ts +30 -0
  18. package/build/charts/ColumnGraph.js +94 -0
  19. package/build/charts/Grid.d.ts +2 -0
  20. package/build/charts/Grid.js +3 -0
  21. package/build/charts/Gridlines.d.ts +34 -0
  22. package/build/charts/Gridlines.js +42 -0
  23. package/build/charts/Legend.d.ts +73 -0
  24. package/build/charts/Legend.js +138 -0
  25. package/build/charts/LegendEntry.d.ts +60 -0
  26. package/build/charts/LegendEntry.js +101 -0
  27. package/build/charts/LineGraph.d.ts +111 -0
  28. package/build/charts/LineGraph.js +253 -0
  29. package/build/charts/Marker.d.ts +133 -0
  30. package/build/charts/Marker.js +275 -0
  31. package/build/charts/MarkerLine.d.ts +65 -0
  32. package/build/charts/MarkerLine.js +108 -0
  33. package/build/charts/MouseTracker.d.ts +34 -0
  34. package/build/charts/MouseTracker.js +55 -0
  35. package/build/charts/Pie.d.ts +4 -0
  36. package/build/charts/Pie.js +5 -0
  37. package/build/charts/PieChart.d.ts +158 -0
  38. package/build/charts/PieChart.js +445 -0
  39. package/build/charts/PieLabel.d.ts +34 -0
  40. package/build/charts/PieLabel.js +47 -0
  41. package/build/charts/PieLabelsContainer.d.ts +15 -0
  42. package/build/charts/PieLabelsContainer.js +54 -0
  43. package/build/charts/Range.d.ts +94 -0
  44. package/build/charts/Range.js +160 -0
  45. package/build/charts/RangeMarker.d.ts +65 -0
  46. package/build/charts/RangeMarker.js +143 -0
  47. package/build/charts/ScatterGraph.d.ts +72 -0
  48. package/build/charts/ScatterGraph.js +133 -0
  49. package/build/charts/Swimlane.d.ts +47 -0
  50. package/build/charts/Swimlane.js +113 -0
  51. package/build/charts/Swimlanes.d.ts +57 -0
  52. package/build/charts/Swimlanes.js +83 -0
  53. package/build/charts/axis/Axis.d.ts +141 -0
  54. package/build/charts/axis/Axis.js +215 -0
  55. package/build/charts/axis/CategoryAxis.d.ts +35 -0
  56. package/build/charts/axis/CategoryAxis.js +240 -0
  57. package/build/charts/axis/NumericAxis.d.ts +57 -0
  58. package/build/charts/axis/NumericAxis.js +316 -0
  59. package/build/charts/axis/Stack.d.ts +16 -0
  60. package/build/charts/axis/Stack.js +57 -0
  61. package/build/charts/axis/TimeAxis.d.ts +50 -0
  62. package/build/charts/axis/TimeAxis.js +554 -0
  63. package/build/charts/axis/index.d.ts +4 -0
  64. package/build/charts/axis/index.js +4 -0
  65. package/build/charts/helpers/MinMaxFinder.d.ts +36 -0
  66. package/build/charts/helpers/MinMaxFinder.js +37 -0
  67. package/build/charts/helpers/PointReducer.d.ts +41 -0
  68. package/build/charts/helpers/PointReducer.js +55 -0
  69. package/build/charts/helpers/SnapPointFinder.d.ts +58 -0
  70. package/build/charts/helpers/SnapPointFinder.js +65 -0
  71. package/build/charts/helpers/ValueAtFinder.d.ts +33 -0
  72. package/build/charts/helpers/ValueAtFinder.js +46 -0
  73. package/build/charts/helpers/index.d.ts +4 -0
  74. package/build/charts/helpers/index.js +4 -0
  75. package/build/charts/index.d.ts +26 -0
  76. package/build/charts/index.js +26 -0
  77. package/build/charts/shapes.d.ts +13 -0
  78. package/build/charts/shapes.js +62 -0
  79. package/build/data/AggregateFunction.d.ts +60 -0
  80. package/build/data/AggregateFunction.js +155 -0
  81. package/build/data/ArrayElementView.d.ts +33 -0
  82. package/build/data/ArrayElementView.js +65 -0
  83. package/build/data/ArrayElementView.spec.d.ts +1 -0
  84. package/build/data/ArrayElementView.spec.js +81 -0
  85. package/build/data/ArrayRef.d.ts +9 -0
  86. package/build/data/ArrayRef.js +29 -0
  87. package/build/data/AugmentedViewBase.d.ts +18 -0
  88. package/build/data/AugmentedViewBase.js +72 -0
  89. package/build/data/Binding.d.ts +23 -0
  90. package/build/data/Binding.js +78 -0
  91. package/build/data/Binding.spec.d.ts +1 -0
  92. package/build/data/Binding.spec.js +61 -0
  93. package/build/data/ExposedRecordView.d.ts +24 -0
  94. package/build/data/ExposedRecordView.js +76 -0
  95. package/build/data/ExposedValueView.d.ts +20 -0
  96. package/build/data/ExposedValueView.js +68 -0
  97. package/build/data/Expression.d.ts +12 -0
  98. package/build/data/Expression.js +201 -0
  99. package/build/data/Expression.spec.d.ts +1 -0
  100. package/build/data/Expression.spec.js +196 -0
  101. package/build/data/Grouper.d.ts +29 -0
  102. package/build/data/Grouper.js +138 -0
  103. package/build/data/Grouper.spec.d.ts +1 -0
  104. package/build/data/Grouper.spec.js +48 -0
  105. package/build/data/NestedDataView.d.ts +21 -0
  106. package/build/data/NestedDataView.js +24 -0
  107. package/build/data/ReadOnlyDataView.d.ts +13 -0
  108. package/build/data/ReadOnlyDataView.js +25 -0
  109. package/build/data/Ref.d.ts +23 -0
  110. package/build/data/Ref.js +79 -0
  111. package/build/data/Ref.spec.d.ts +1 -0
  112. package/build/data/Ref.spec.js +72 -0
  113. package/build/data/Selector.d.ts +8 -0
  114. package/build/data/Selector.js +1 -0
  115. package/build/data/Store.d.ts +12 -0
  116. package/build/data/Store.js +41 -0
  117. package/build/data/Store.spec.d.ts +1 -0
  118. package/build/data/Store.spec.js +19 -0
  119. package/build/data/StoreProxy.d.ts +6 -0
  120. package/build/data/StoreProxy.js +14 -0
  121. package/build/data/StoreRef.d.ts +22 -0
  122. package/build/data/StoreRef.js +47 -0
  123. package/build/data/StoreRef.spec.d.ts +1 -0
  124. package/build/data/StoreRef.spec.js +22 -0
  125. package/build/data/StringTemplate.d.ts +9 -0
  126. package/build/data/StringTemplate.js +81 -0
  127. package/build/data/StringTemplate.spec.d.ts +1 -0
  128. package/build/data/StringTemplate.spec.js +112 -0
  129. package/build/data/StructuredSelector.d.ts +12 -0
  130. package/build/data/StructuredSelector.js +131 -0
  131. package/build/data/StructuredSelector.spec.d.ts +1 -0
  132. package/build/data/StructuredSelector.spec.js +102 -0
  133. package/build/data/SubscribableView.d.ts +15 -0
  134. package/build/data/SubscribableView.js +52 -0
  135. package/build/data/View.d.ts +125 -0
  136. package/build/data/View.js +163 -0
  137. package/build/data/View.spec.d.ts +1 -0
  138. package/build/data/View.spec.js +44 -0
  139. package/build/data/ZoomIntoPropertyView.d.ts +15 -0
  140. package/build/data/ZoomIntoPropertyView.js +34 -0
  141. package/build/data/ZoomIntoPropertyView.spec.d.ts +1 -0
  142. package/build/data/ZoomIntoPropertyView.spec.js +54 -0
  143. package/build/data/comparer.d.ts +11 -0
  144. package/build/data/comparer.js +55 -0
  145. package/build/data/comparer.spec.d.ts +1 -0
  146. package/build/data/comparer.spec.js +50 -0
  147. package/build/data/computable.d.ts +10 -0
  148. package/build/data/computable.js +46 -0
  149. package/build/data/computable.spec.d.ts +1 -0
  150. package/build/data/computable.spec.js +56 -0
  151. package/build/data/createAccessorModelProxy.d.ts +17 -0
  152. package/build/data/createAccessorModelProxy.js +37 -0
  153. package/build/data/createAccessorModelProxy.spec.d.ts +1 -0
  154. package/build/data/createAccessorModelProxy.spec.js +30 -0
  155. package/build/data/createStructuredSelector.d.ts +9 -0
  156. package/build/data/createStructuredSelector.js +40 -0
  157. package/build/data/createStructuredSelector.spec.d.ts +1 -0
  158. package/build/data/createStructuredSelector.spec.js +42 -0
  159. package/build/data/defaultCompare.d.ts +1 -0
  160. package/build/data/defaultCompare.js +12 -0
  161. package/build/data/diff/diffArrays.d.ts +12 -0
  162. package/build/data/diff/diffArrays.js +34 -0
  163. package/build/data/diff/diffs.spec.d.ts +1 -0
  164. package/build/data/diff/diffs.spec.js +45 -0
  165. package/build/data/diff/index.d.ts +1 -0
  166. package/build/data/diff/index.js +1 -0
  167. package/build/data/enableFatArrowExpansion.d.ts +1 -0
  168. package/build/data/enableFatArrowExpansion.js +5 -0
  169. package/build/data/getAccessor.d.ts +11 -0
  170. package/build/data/getAccessor.js +51 -0
  171. package/build/data/getAccessor.spec.d.ts +1 -0
  172. package/build/data/getAccessor.spec.js +10 -0
  173. package/build/data/getSelector.d.ts +3 -0
  174. package/build/data/getSelector.js +60 -0
  175. package/build/data/getSelector.spec.d.ts +1 -0
  176. package/build/data/getSelector.spec.js +36 -0
  177. package/build/data/index.d.ts +29 -0
  178. package/build/data/index.js +29 -0
  179. package/build/data/isSelector.d.ts +1 -0
  180. package/build/data/isSelector.js +19 -0
  181. package/build/data/ops/append.d.ts +1 -0
  182. package/build/data/ops/append.js +7 -0
  183. package/build/data/ops/append.spec.d.ts +1 -0
  184. package/build/data/ops/append.spec.js +24 -0
  185. package/build/data/ops/filter.d.ts +1 -0
  186. package/build/data/ops/filter.js +8 -0
  187. package/build/data/ops/filter.spec.d.ts +1 -0
  188. package/build/data/ops/filter.spec.js +25 -0
  189. package/build/data/ops/findTreeNode.d.ts +1 -0
  190. package/build/data/ops/findTreeNode.js +13 -0
  191. package/build/data/ops/findTreeNode.spec.d.ts +1 -0
  192. package/build/data/ops/findTreeNode.spec.js +20 -0
  193. package/build/data/ops/findTreePath.d.ts +1 -0
  194. package/build/data/ops/findTreePath.js +15 -0
  195. package/build/data/ops/index.d.ts +10 -0
  196. package/build/data/ops/index.js +10 -0
  197. package/build/data/ops/insertElement.d.ts +1 -0
  198. package/build/data/ops/insertElement.js +3 -0
  199. package/build/data/ops/merge.d.ts +1 -0
  200. package/build/data/ops/merge.js +10 -0
  201. package/build/data/ops/merge.spec.d.ts +1 -0
  202. package/build/data/ops/merge.spec.js +23 -0
  203. package/build/data/ops/moveElement.d.ts +1 -0
  204. package/build/data/ops/moveElement.js +20 -0
  205. package/build/data/ops/removeTreeNodes.d.ts +1 -0
  206. package/build/data/ops/removeTreeNodes.js +4 -0
  207. package/build/data/ops/removeTreeNodes.spec.d.ts +1 -0
  208. package/build/data/ops/removeTreeNodes.spec.js +35 -0
  209. package/build/data/ops/updateArray.d.ts +1 -0
  210. package/build/data/ops/updateArray.js +23 -0
  211. package/build/data/ops/updateArray.spec.d.ts +1 -0
  212. package/build/data/ops/updateArray.spec.js +33 -0
  213. package/build/data/ops/updateTree.d.ts +1 -0
  214. package/build/data/ops/updateTree.js +14 -0
  215. package/build/data/ops/updateTree.spec.d.ts +1 -0
  216. package/build/data/ops/updateTree.spec.js +44 -0
  217. package/build/data/test-types.d.ts +1 -0
  218. package/build/data/test-types.js +2 -0
  219. package/build/hooks/createLocalStorageRef.d.ts +2 -0
  220. package/build/hooks/createLocalStorageRef.js +22 -0
  221. package/build/hooks/index.d.ts +8 -0
  222. package/build/hooks/index.js +8 -0
  223. package/build/hooks/invokeCallback.d.ts +2 -0
  224. package/build/hooks/invokeCallback.js +8 -0
  225. package/build/hooks/invokeCallback.spec.d.ts +1 -0
  226. package/build/hooks/invokeCallback.spec.js +44 -0
  227. package/build/hooks/resolveCallback.d.ts +2 -0
  228. package/build/hooks/resolveCallback.js +13 -0
  229. package/build/hooks/resolveCallback.spec.d.ts +1 -0
  230. package/build/hooks/resolveCallback.spec.js +35 -0
  231. package/build/hooks/store.d.ts +11 -0
  232. package/build/hooks/store.js +38 -0
  233. package/build/hooks/store.spec.d.ts +1 -0
  234. package/build/hooks/store.spec.js +48 -0
  235. package/build/hooks/useEffect.d.ts +2 -0
  236. package/build/hooks/useEffect.js +13 -0
  237. package/build/hooks/useInterval.d.ts +1 -0
  238. package/build/hooks/useInterval.js +7 -0
  239. package/build/hooks/useState.d.ts +2 -0
  240. package/build/hooks/useState.js +17 -0
  241. package/build/hooks/useTrigger.d.ts +3 -0
  242. package/build/hooks/useTrigger.js +22 -0
  243. package/build/hooks/useTrigger.spec.d.ts +1 -0
  244. package/build/hooks/useTrigger.spec.js +59 -0
  245. package/build/index.d.ts +7 -0
  246. package/build/index.js +7 -0
  247. package/build/jsx-runtime.d.ts +31 -0
  248. package/build/jsx-runtime.js +27 -0
  249. package/build/locale/de-de.d.ts +1 -0
  250. package/build/locale/de-de.js +62 -0
  251. package/build/locale/en-us.d.ts +1 -0
  252. package/build/locale/en-us.js +62 -0
  253. package/build/locale/es-es.d.ts +1 -0
  254. package/build/locale/es-es.js +62 -0
  255. package/build/locale/fr-fr.d.ts +1 -0
  256. package/build/locale/fr-fr.js +62 -0
  257. package/build/locale/nl-nl.d.ts +1 -0
  258. package/build/locale/nl-nl.js +62 -0
  259. package/build/locale/pt-pt.d.ts +1 -0
  260. package/build/locale/pt-pt.js +62 -0
  261. package/build/locale/sr-latn-ba.d.ts +1 -0
  262. package/build/locale/sr-latn-ba.js +62 -0
  263. package/build/svg/BoundedObject.d.ts +39 -0
  264. package/build/svg/BoundedObject.js +51 -0
  265. package/build/svg/ClipRect.d.ts +11 -0
  266. package/build/svg/ClipRect.js +18 -0
  267. package/build/svg/Ellipse.d.ts +27 -0
  268. package/build/svg/Ellipse.js +22 -0
  269. package/build/svg/Line.d.ts +26 -0
  270. package/build/svg/Line.js +19 -0
  271. package/build/svg/NonOverlappingRect.d.ts +12 -0
  272. package/build/svg/NonOverlappingRect.js +17 -0
  273. package/build/svg/NonOverlappingRectGroup.d.ts +15 -0
  274. package/build/svg/NonOverlappingRectGroup.js +38 -0
  275. package/build/svg/Rectangle.d.ts +40 -0
  276. package/build/svg/Rectangle.js +27 -0
  277. package/build/svg/Svg.d.ts +49 -0
  278. package/build/svg/Svg.js +132 -0
  279. package/build/svg/Text.d.ts +48 -0
  280. package/build/svg/Text.js +60 -0
  281. package/build/svg/TextualBoundedObject.d.ts +7 -0
  282. package/build/svg/TextualBoundedObject.js +22 -0
  283. package/build/svg/index.d.ts +11 -0
  284. package/build/svg/index.js +11 -0
  285. package/build/svg/util/Rect.d.ts +31 -0
  286. package/build/svg/util/Rect.js +83 -0
  287. package/build/svg/util/index.d.ts +1 -0
  288. package/build/svg/util/index.js +1 -0
  289. package/build/ui/CSS.d.ts +10 -0
  290. package/build/ui/CSS.js +77 -0
  291. package/build/ui/CSSHelper.d.ts +5 -0
  292. package/build/ui/CSSHelper.js +15 -0
  293. package/build/ui/Container.d.ts +55 -0
  294. package/build/ui/Container.js +160 -0
  295. package/build/ui/ContentResolver.d.ts +51 -0
  296. package/build/ui/ContentResolver.js +71 -0
  297. package/build/ui/Controller.d.ts +64 -0
  298. package/build/ui/Controller.js +110 -0
  299. package/build/ui/Controller.spec.d.ts +1 -0
  300. package/build/ui/Controller.spec.js +251 -0
  301. package/build/ui/Culture.d.ts +39 -0
  302. package/build/ui/Culture.js +124 -0
  303. package/build/ui/Cx.d.ts +57 -0
  304. package/build/ui/Cx.js +277 -0
  305. package/build/ui/Cx.spec.d.ts +1 -0
  306. package/build/ui/Cx.spec.js +153 -0
  307. package/build/ui/DataProxy.d.ts +24 -0
  308. package/build/ui/DataProxy.js +26 -0
  309. package/build/ui/DataProxy.spec.d.ts +1 -0
  310. package/build/ui/DataProxy.spec.js +208 -0
  311. package/build/ui/DetachedScope.d.ts +61 -0
  312. package/build/ui/DetachedScope.js +84 -0
  313. package/build/ui/FocusManager.d.ts +16 -0
  314. package/build/ui/FocusManager.js +149 -0
  315. package/build/ui/Format.d.ts +4 -0
  316. package/build/ui/Format.js +96 -0
  317. package/build/ui/HoverSync.d.ts +30 -0
  318. package/build/ui/HoverSync.js +129 -0
  319. package/build/ui/Instance.d.ts +219 -0
  320. package/build/ui/Instance.js +613 -0
  321. package/build/ui/IsolatedScope.d.ts +19 -0
  322. package/build/ui/IsolatedScope.js +31 -0
  323. package/build/ui/IsolatedScope.spec.d.ts +1 -0
  324. package/build/ui/IsolatedScope.spec.js +42 -0
  325. package/build/ui/Localization.d.ts +9 -0
  326. package/build/ui/Localization.js +63 -0
  327. package/build/ui/Prop.d.ts +83 -0
  328. package/build/ui/Prop.js +1 -0
  329. package/build/ui/PureContainer.d.ts +9 -0
  330. package/build/ui/PureContainer.js +9 -0
  331. package/build/ui/RenderingContext.d.ts +19 -0
  332. package/build/ui/RenderingContext.js +84 -0
  333. package/build/ui/Repeater.d.ts +73 -0
  334. package/build/ui/Repeater.js +99 -0
  335. package/build/ui/Repeater.spec.d.ts +1 -0
  336. package/build/ui/Repeater.spec.js +109 -0
  337. package/build/ui/Rescope.d.ts +18 -0
  338. package/build/ui/Rescope.js +31 -0
  339. package/build/ui/Rescope.spec.d.ts +1 -0
  340. package/build/ui/Rescope.spec.js +134 -0
  341. package/build/ui/ResizeManager.d.ts +5 -0
  342. package/build/ui/ResizeManager.js +24 -0
  343. package/build/ui/Restate.d.ts +44 -0
  344. package/build/ui/Restate.js +142 -0
  345. package/build/ui/Restate.spec.d.ts +1 -0
  346. package/build/ui/Restate.spec.js +257 -0
  347. package/build/ui/StaticText.d.ts +5 -0
  348. package/build/ui/StaticText.js +7 -0
  349. package/build/ui/StructuredInstanceDataAccessor.d.ts +13 -0
  350. package/build/ui/StructuredInstanceDataAccessor.js +30 -0
  351. package/build/ui/Text.d.ts +10 -0
  352. package/build/ui/Text.js +21 -0
  353. package/build/ui/VDOM.d.ts +20 -0
  354. package/build/ui/VDOM.js +3 -0
  355. package/build/ui/Widget.d.ts +111 -0
  356. package/build/ui/Widget.js +170 -0
  357. package/build/ui/ZIndexManager.d.ts +4 -0
  358. package/build/ui/ZIndexManager.js +9 -0
  359. package/build/ui/adapter/ArrayAdapter.d.ts +48 -0
  360. package/build/ui/adapter/ArrayAdapter.js +148 -0
  361. package/build/ui/adapter/ArrayAdapter.spec.d.ts +1 -0
  362. package/build/ui/adapter/ArrayAdapter.spec.js +44 -0
  363. package/build/ui/adapter/DataAdapter.d.ts +30 -0
  364. package/build/ui/adapter/DataAdapter.js +13 -0
  365. package/build/ui/adapter/GroupAdapter.d.ts +57 -0
  366. package/build/ui/adapter/GroupAdapter.js +137 -0
  367. package/build/ui/adapter/TreeAdapter.d.ts +51 -0
  368. package/build/ui/adapter/TreeAdapter.js +98 -0
  369. package/build/ui/adapter/TreeAdapter.spec.d.ts +1 -0
  370. package/build/ui/adapter/TreeAdapter.spec.js +71 -0
  371. package/build/ui/adapter/index.d.ts +4 -0
  372. package/build/ui/adapter/index.js +4 -0
  373. package/build/ui/app/History.d.ts +18 -0
  374. package/build/ui/app/History.js +109 -0
  375. package/build/ui/app/Url.d.ts +13 -0
  376. package/build/ui/app/Url.js +86 -0
  377. package/build/ui/app/Url.spec.d.ts +1 -0
  378. package/build/ui/app/Url.spec.js +43 -0
  379. package/build/ui/app/index.d.ts +4 -0
  380. package/build/ui/app/index.js +4 -0
  381. package/build/ui/app/startAppLoop.d.ts +10 -0
  382. package/build/ui/app/startAppLoop.js +53 -0
  383. package/build/ui/app/startHotAppLoop.d.ts +11 -0
  384. package/build/ui/app/startHotAppLoop.js +22 -0
  385. package/build/ui/batchUpdates.d.ts +5 -0
  386. package/build/ui/batchUpdates.js +60 -0
  387. package/build/ui/bind.d.ts +3 -0
  388. package/build/ui/bind.js +7 -0
  389. package/build/ui/createFunctionalComponent.d.ts +2 -0
  390. package/build/ui/createFunctionalComponent.js +58 -0
  391. package/build/ui/createFunctionalComponent.spec.d.ts +1 -0
  392. package/build/ui/createFunctionalComponent.spec.js +272 -0
  393. package/build/ui/expr.d.ts +11 -0
  394. package/build/ui/expr.js +17 -0
  395. package/build/ui/flattenProps.d.ts +1 -0
  396. package/build/ui/flattenProps.js +18 -0
  397. package/build/ui/index.d.ts +40 -0
  398. package/build/ui/index.js +41 -0
  399. package/build/ui/keyboardShortcuts.d.ts +10 -0
  400. package/build/ui/keyboardShortcuts.js +27 -0
  401. package/build/ui/layout/Content.d.ts +14 -0
  402. package/build/ui/layout/Content.js +15 -0
  403. package/build/ui/layout/ContentPlaceholder.d.ts +35 -0
  404. package/build/ui/layout/ContentPlaceholder.js +105 -0
  405. package/build/ui/layout/ContentPlaceholder.spec.d.ts +1 -0
  406. package/build/ui/layout/ContentPlaceholder.spec.js +333 -0
  407. package/build/ui/layout/FirstVisibleChildLayout.d.ts +7 -0
  408. package/build/ui/layout/FirstVisibleChildLayout.js +58 -0
  409. package/build/ui/layout/FirstVisibleChildLayout.spec.d.ts +1 -0
  410. package/build/ui/layout/FirstVisibleChildLayout.spec.js +101 -0
  411. package/build/ui/layout/LabelsLeftLayout.d.ts +17 -0
  412. package/build/ui/layout/LabelsLeftLayout.js +50 -0
  413. package/build/ui/layout/LabelsTopLayout.d.ts +36 -0
  414. package/build/ui/layout/LabelsTopLayout.js +97 -0
  415. package/build/ui/layout/UseParentLayout.d.ts +4 -0
  416. package/build/ui/layout/UseParentLayout.js +5 -0
  417. package/build/ui/layout/exploreChildren.d.ts +4 -0
  418. package/build/ui/layout/exploreChildren.js +27 -0
  419. package/build/ui/layout/index.d.ts +7 -0
  420. package/build/ui/layout/index.js +7 -0
  421. package/build/ui/selection/KeySelection.d.ts +37 -0
  422. package/build/ui/selection/KeySelection.js +125 -0
  423. package/build/ui/selection/PropertySelection.d.ts +26 -0
  424. package/build/ui/selection/PropertySelection.js +51 -0
  425. package/build/ui/selection/Selection.d.ts +35 -0
  426. package/build/ui/selection/Selection.js +75 -0
  427. package/build/ui/selection/index.d.ts +3 -0
  428. package/build/ui/selection/index.js +3 -0
  429. package/build/ui/tpl.d.ts +3 -0
  430. package/build/ui/tpl.js +5 -0
  431. package/build/util/Component.d.ts +149 -0
  432. package/build/util/Component.js +109 -0
  433. package/build/util/Console.d.ts +4 -0
  434. package/build/util/Console.js +10 -0
  435. package/build/util/DOM.d.ts +24 -0
  436. package/build/util/DOM.js +64 -0
  437. package/build/util/Debug.d.ts +25 -0
  438. package/build/util/Debug.js +42 -0
  439. package/build/util/Format.d.ts +14 -0
  440. package/build/util/Format.js +229 -0
  441. package/build/util/Format.spec.d.ts +1 -0
  442. package/build/util/Format.spec.js +58 -0
  443. package/build/util/GlobalCacheIdentifier.d.ts +4 -0
  444. package/build/util/GlobalCacheIdentifier.js +9 -0
  445. package/build/util/KeyCode.d.ts +21 -0
  446. package/build/util/KeyCode.js +21 -0
  447. package/build/util/SubscriberList.d.ts +39 -0
  448. package/build/util/SubscriberList.js +70 -0
  449. package/build/util/Timing.d.ts +15 -0
  450. package/build/util/Timing.js +49 -0
  451. package/build/util/TraversalStack.d.ts +8 -0
  452. package/build/util/TraversalStack.js +37 -0
  453. package/build/util/TraversalStack.spec.d.ts +1 -0
  454. package/build/util/TraversalStack.spec.js +43 -0
  455. package/build/util/addEventListenerWithOptions.d.ts +17 -0
  456. package/build/util/addEventListenerWithOptions.js +8 -0
  457. package/build/util/browserSupportsPassiveEventHandlers.d.ts +5 -0
  458. package/build/util/browserSupportsPassiveEventHandlers.js +20 -0
  459. package/build/util/calculateNaturalElementHeight.d.ts +1 -0
  460. package/build/util/calculateNaturalElementHeight.js +24 -0
  461. package/build/util/capitalize.d.ts +1 -0
  462. package/build/util/capitalize.js +5 -0
  463. package/build/util/coalesce.d.ts +1 -0
  464. package/build/util/coalesce.js +7 -0
  465. package/build/util/color/hslToRgb.d.ts +8 -0
  466. package/build/util/color/hslToRgb.js +38 -0
  467. package/build/util/color/index.d.ts +4 -0
  468. package/build/util/color/index.js +4 -0
  469. package/build/util/color/parseColor.d.ts +57 -0
  470. package/build/util/color/parseColor.js +114 -0
  471. package/build/util/color/rgbToHex.d.ts +8 -0
  472. package/build/util/color/rgbToHex.js +14 -0
  473. package/build/util/color/rgbToHsl.d.ts +8 -0
  474. package/build/util/color/rgbToHsl.js +35 -0
  475. package/build/util/date/dateDiff.d.ts +7 -0
  476. package/build/util/date/dateDiff.js +10 -0
  477. package/build/util/date/diff.d.ts +7 -0
  478. package/build/util/date/diff.js +11 -0
  479. package/build/util/date/encodeDate.d.ts +1 -0
  480. package/build/util/date/encodeDate.js +7 -0
  481. package/build/util/date/encodeDateWithTimezoneOffset.d.ts +1 -0
  482. package/build/util/date/encodeDateWithTimezoneOffset.js +16 -0
  483. package/build/util/date/index.d.ts +11 -0
  484. package/build/util/date/index.js +11 -0
  485. package/build/util/date/lowerBoundCheck.d.ts +8 -0
  486. package/build/util/date/lowerBoundCheck.js +12 -0
  487. package/build/util/date/maxDate.d.ts +6 -0
  488. package/build/util/date/maxDate.js +13 -0
  489. package/build/util/date/minDate.d.ts +6 -0
  490. package/build/util/date/minDate.js +13 -0
  491. package/build/util/date/monthStart.d.ts +6 -0
  492. package/build/util/date/monthStart.js +8 -0
  493. package/build/util/date/parseDateInvariant.d.ts +2 -0
  494. package/build/util/date/parseDateInvariant.js +18 -0
  495. package/build/util/date/sameDate.d.ts +7 -0
  496. package/build/util/date/sameDate.js +11 -0
  497. package/build/util/date/upperBoundCheck.d.ts +8 -0
  498. package/build/util/date/upperBoundCheck.js +12 -0
  499. package/build/util/date/upperBoundCheck.spec.d.ts +1 -0
  500. package/build/util/date/upperBoundCheck.spec.js +22 -0
  501. package/build/util/date/zeroTime.d.ts +7 -0
  502. package/build/util/date/zeroTime.js +9 -0
  503. package/build/util/debounce.d.ts +5 -0
  504. package/build/util/debounce.js +15 -0
  505. package/build/util/dummyCallback.d.ts +1 -0
  506. package/build/util/dummyCallback.js +1 -0
  507. package/build/util/escapeSpecialRegexCharacters.d.ts +6 -0
  508. package/build/util/escapeSpecialRegexCharacters.js +8 -0
  509. package/build/util/eventCallbacks.d.ts +7 -0
  510. package/build/util/eventCallbacks.js +6 -0
  511. package/build/util/expandFatArrows.d.ts +1 -0
  512. package/build/util/expandFatArrows.js +104 -0
  513. package/build/util/findScrollableParent.d.ts +1 -0
  514. package/build/util/findScrollableParent.js +16 -0
  515. package/build/util/getActiveElement.d.ts +1 -0
  516. package/build/util/getActiveElement.js +4 -0
  517. package/build/util/getParentFrameBoundingClientRect.d.ts +1 -0
  518. package/build/util/getParentFrameBoundingClientRect.js +13 -0
  519. package/build/util/getScrollerBoundingClientRect.d.ts +1 -0
  520. package/build/util/getScrollerBoundingClientRect.js +10 -0
  521. package/build/util/getSearchQueryPredicate.d.ts +2 -0
  522. package/build/util/getSearchQueryPredicate.js +54 -0
  523. package/build/util/getSearchQueryPredicate.spec.d.ts +1 -0
  524. package/build/util/getSearchQueryPredicate.spec.js +33 -0
  525. package/build/util/getTopLevelBoundingClientRect.d.ts +1 -0
  526. package/build/util/getTopLevelBoundingClientRect.js +6 -0
  527. package/build/util/getVendorPrefix.d.ts +1 -0
  528. package/build/util/getVendorPrefix.js +22 -0
  529. package/build/util/hasKey.d.ts +4 -0
  530. package/build/util/hasKey.js +14 -0
  531. package/build/util/index.d.ts +55 -0
  532. package/build/util/index.js +55 -0
  533. package/build/util/innerTextTrim.d.ts +6 -0
  534. package/build/util/innerTextTrim.js +10 -0
  535. package/build/util/isArray.d.ts +1 -0
  536. package/build/util/isArray.js +3 -0
  537. package/build/util/isDataRecord.d.ts +1 -0
  538. package/build/util/isDataRecord.js +4 -0
  539. package/build/util/isDefined.d.ts +1 -0
  540. package/build/util/isDefined.js +3 -0
  541. package/build/util/isDigit.d.ts +6 -0
  542. package/build/util/isDigit.js +8 -0
  543. package/build/util/isFunction.d.ts +1 -0
  544. package/build/util/isFunction.js +3 -0
  545. package/build/util/isNonEmptyArray.d.ts +1 -0
  546. package/build/util/isNonEmptyArray.js +3 -0
  547. package/build/util/isNumber.d.ts +1 -0
  548. package/build/util/isNumber.js +3 -0
  549. package/build/util/isObject.d.ts +1 -0
  550. package/build/util/isObject.js +3 -0
  551. package/build/util/isPromise.d.ts +1 -0
  552. package/build/util/isPromise.js +5 -0
  553. package/build/util/isString.d.ts +1 -0
  554. package/build/util/isString.js +3 -0
  555. package/build/util/isTextInputElement.d.ts +1 -0
  556. package/build/util/isTextInputElement.js +3 -0
  557. package/build/util/isTouchDevice.d.ts +1 -0
  558. package/build/util/isTouchDevice.js +6 -0
  559. package/build/util/isTouchEvent.d.ts +2 -0
  560. package/build/util/isTouchEvent.js +43 -0
  561. package/build/util/isUndefined.d.ts +1 -0
  562. package/build/util/isUndefined.js +3 -0
  563. package/build/util/isValidIdentifierName.d.ts +1 -0
  564. package/build/util/isValidIdentifierName.js +4 -0
  565. package/build/util/isValidIdentifierName.spec.d.ts +1 -0
  566. package/build/util/isValidIdentifierName.spec.js +28 -0
  567. package/build/util/onIdleCallback.d.ts +1 -0
  568. package/build/util/onIdleCallback.js +13 -0
  569. package/build/util/parseStyle.d.ts +2 -0
  570. package/build/util/parseStyle.js +22 -0
  571. package/build/util/quote.d.ts +2 -0
  572. package/build/util/quote.js +5 -0
  573. package/build/util/reverseSlice.d.ts +1 -0
  574. package/build/util/reverseSlice.js +10 -0
  575. package/build/util/routeAppend.d.ts +1 -0
  576. package/build/util/routeAppend.js +16 -0
  577. package/build/util/routeAppend.spec.d.ts +1 -0
  578. package/build/util/routeAppend.spec.js +14 -0
  579. package/build/util/scrollElementIntoView.d.ts +1 -0
  580. package/build/util/scrollElementIntoView.js +28 -0
  581. package/build/util/shallowEquals.d.ts +1 -0
  582. package/build/util/shallowEquals.js +30 -0
  583. package/build/util/test/createTestRenderer.d.ts +5 -0
  584. package/build/util/test/createTestRenderer.js +10 -0
  585. package/build/util/throttle.d.ts +9 -0
  586. package/build/util/throttle.js +19 -0
  587. package/build/util/validatedDebounce.d.ts +3 -0
  588. package/build/util/validatedDebounce.js +18 -0
  589. package/build/widgets/AccessorBindings.spec.d.ts +1 -0
  590. package/build/widgets/AccessorBindings.spec.js +40 -0
  591. package/build/widgets/Button.d.ts +57 -0
  592. package/build/widgets/Button.js +105 -0
  593. package/build/widgets/CxCredit.d.ts +11 -0
  594. package/build/widgets/CxCredit.js +25 -0
  595. package/build/widgets/DocumentTitle.d.ts +27 -0
  596. package/build/widgets/DocumentTitle.js +57 -0
  597. package/build/widgets/FlexBox.d.ts +79 -0
  598. package/build/widgets/FlexBox.js +77 -0
  599. package/build/widgets/Heading.d.ts +16 -0
  600. package/build/widgets/Heading.js +24 -0
  601. package/build/widgets/HighlightedSearchText.d.ts +18 -0
  602. package/build/widgets/HighlightedSearchText.js +32 -0
  603. package/build/widgets/HtmlElement.d.ts +46 -0
  604. package/build/widgets/HtmlElement.js +253 -0
  605. package/build/widgets/HtmlElement.spec.d.ts +1 -0
  606. package/build/widgets/HtmlElement.spec.js +38 -0
  607. package/build/widgets/Icon.d.ts +29 -0
  608. package/build/widgets/Icon.js +39 -0
  609. package/build/widgets/List.d.ts +122 -0
  610. package/build/widgets/List.js +510 -0
  611. package/build/widgets/ProgressBar.d.ts +20 -0
  612. package/build/widgets/ProgressBar.js +29 -0
  613. package/build/widgets/Resizer.d.ts +30 -0
  614. package/build/widgets/Resizer.js +111 -0
  615. package/build/widgets/Sandbox.d.ts +40 -0
  616. package/build/widgets/Sandbox.js +54 -0
  617. package/build/widgets/Section.d.ts +52 -0
  618. package/build/widgets/Section.js +93 -0
  619. package/build/widgets/autoFocus.d.ts +1 -0
  620. package/build/widgets/autoFocus.js +9 -0
  621. package/build/widgets/cx.d.ts +2 -0
  622. package/build/widgets/cx.js +53 -0
  623. package/build/widgets/drag-drop/DragHandle.d.ts +12 -0
  624. package/build/widgets/drag-drop/DragHandle.js +23 -0
  625. package/build/widgets/drag-drop/DragSource.d.ts +55 -0
  626. package/build/widgets/drag-drop/DragSource.js +135 -0
  627. package/build/widgets/drag-drop/DropZone.d.ts +103 -0
  628. package/build/widgets/drag-drop/DropZone.js +173 -0
  629. package/build/widgets/drag-drop/index.d.ts +4 -0
  630. package/build/widgets/drag-drop/index.js +4 -0
  631. package/build/widgets/drag-drop/ops.d.ts +55 -0
  632. package/build/widgets/drag-drop/ops.js +292 -0
  633. package/build/widgets/enableAllInternalDependencies.d.ts +1 -0
  634. package/build/widgets/enableAllInternalDependencies.js +10 -0
  635. package/build/widgets/form/Calendar.d.ts +130 -0
  636. package/build/widgets/form/Calendar.js +445 -0
  637. package/build/widgets/form/Checkbox.d.ts +46 -0
  638. package/build/widgets/form/Checkbox.js +157 -0
  639. package/build/widgets/form/ColorField.d.ts +49 -0
  640. package/build/widgets/form/ColorField.js +310 -0
  641. package/build/widgets/form/ColorPicker.d.ts +46 -0
  642. package/build/widgets/form/ColorPicker.js +304 -0
  643. package/build/widgets/form/DateField.d.ts +8 -0
  644. package/build/widgets/form/DateField.js +12 -0
  645. package/build/widgets/form/DateTimeField.d.ts +98 -0
  646. package/build/widgets/form/DateTimeField.js +474 -0
  647. package/build/widgets/form/DateTimePicker.d.ts +17 -0
  648. package/build/widgets/form/DateTimePicker.js +248 -0
  649. package/build/widgets/form/Field.d.ts +140 -0
  650. package/build/widgets/form/Field.js +369 -0
  651. package/build/widgets/form/FieldGroup.d.ts +5 -0
  652. package/build/widgets/form/FieldGroup.js +5 -0
  653. package/build/widgets/form/FieldIcon.d.ts +22 -0
  654. package/build/widgets/form/FieldIcon.js +41 -0
  655. package/build/widgets/form/HelpText.d.ts +6 -0
  656. package/build/widgets/form/HelpText.js +10 -0
  657. package/build/widgets/form/Label.d.ts +27 -0
  658. package/build/widgets/form/Label.js +74 -0
  659. package/build/widgets/form/LabeledContainer.d.ts +30 -0
  660. package/build/widgets/form/LabeledContainer.js +48 -0
  661. package/build/widgets/form/LookupField.d.ts +124 -0
  662. package/build/widgets/form/LookupField.js +907 -0
  663. package/build/widgets/form/MonthField.d.ts +104 -0
  664. package/build/widgets/form/MonthField.js +423 -0
  665. package/build/widgets/form/MonthPicker.d.ts +125 -0
  666. package/build/widgets/form/MonthPicker.js +557 -0
  667. package/build/widgets/form/NumberField.d.ts +63 -0
  668. package/build/widgets/form/NumberField.js +361 -0
  669. package/build/widgets/form/Radio.d.ts +43 -0
  670. package/build/widgets/form/Radio.js +131 -0
  671. package/build/widgets/form/Select.d.ts +40 -0
  672. package/build/widgets/form/Select.js +183 -0
  673. package/build/widgets/form/Slider.d.ts +68 -0
  674. package/build/widgets/form/Slider.js +264 -0
  675. package/build/widgets/form/Switch.d.ts +41 -0
  676. package/build/widgets/form/Switch.js +94 -0
  677. package/build/widgets/form/TextArea.d.ts +20 -0
  678. package/build/widgets/form/TextArea.js +128 -0
  679. package/build/widgets/form/TextField.d.ts +49 -0
  680. package/build/widgets/form/TextField.js +202 -0
  681. package/build/widgets/form/TimeField.d.ts +3 -0
  682. package/build/widgets/form/TimeField.js +8 -0
  683. package/build/widgets/form/TimeList.d.ts +1 -0
  684. package/build/widgets/form/TimeList.js +89 -0
  685. package/build/widgets/form/UploadButton.d.ts +17 -0
  686. package/build/widgets/form/UploadButton.js +163 -0
  687. package/build/widgets/form/ValidationError.d.ts +27 -0
  688. package/build/widgets/form/ValidationError.js +33 -0
  689. package/build/widgets/form/ValidationGroup.d.ts +63 -0
  690. package/build/widgets/form/ValidationGroup.js +58 -0
  691. package/build/widgets/form/ValidationGroup.spec.d.ts +1 -0
  692. package/build/widgets/form/ValidationGroup.spec.js +62 -0
  693. package/build/widgets/form/Validator.d.ts +8 -0
  694. package/build/widgets/form/Validator.js +19 -0
  695. package/build/widgets/form/Wheel.d.ts +61 -0
  696. package/build/widgets/form/Wheel.js +178 -0
  697. package/build/widgets/form/index.d.ts +28 -0
  698. package/build/widgets/form/index.js +28 -0
  699. package/build/widgets/grid/Grid.d.ts +517 -0
  700. package/build/widgets/grid/Grid.js +2756 -0
  701. package/build/widgets/grid/GridCell.d.ts +68 -0
  702. package/build/widgets/grid/GridCell.js +61 -0
  703. package/build/widgets/grid/GridCellEditor.d.ts +10 -0
  704. package/build/widgets/grid/GridCellEditor.js +29 -0
  705. package/build/widgets/grid/GridRow.d.ts +87 -0
  706. package/build/widgets/grid/GridRow.js +192 -0
  707. package/build/widgets/grid/GridRowLine.d.ts +27 -0
  708. package/build/widgets/grid/GridRowLine.js +24 -0
  709. package/build/widgets/grid/Pagination.d.ts +23 -0
  710. package/build/widgets/grid/Pagination.js +73 -0
  711. package/build/widgets/grid/TreeNode.d.ts +42 -0
  712. package/build/widgets/grid/TreeNode.js +82 -0
  713. package/build/widgets/grid/createGridCellEditor.d.ts +2 -0
  714. package/build/widgets/grid/createGridCellEditor.js +6 -0
  715. package/build/widgets/grid/index.d.ts +10 -0
  716. package/build/widgets/grid/index.js +10 -0
  717. package/build/widgets/icons/calendar.d.ts +2 -0
  718. package/build/widgets/icons/calendar.js +5 -0
  719. package/build/widgets/icons/check.d.ts +2 -0
  720. package/build/widgets/icons/check.js +5 -0
  721. package/build/widgets/icons/clear.d.ts +2 -0
  722. package/build/widgets/icons/clear.js +5 -0
  723. package/build/widgets/icons/close.d.ts +2 -0
  724. package/build/widgets/icons/close.js +5 -0
  725. package/build/widgets/icons/cx.d.ts +2 -0
  726. package/build/widgets/icons/cx.js +5 -0
  727. package/build/widgets/icons/drop-down.d.ts +2 -0
  728. package/build/widgets/icons/drop-down.js +5 -0
  729. package/build/widgets/icons/file.d.ts +2 -0
  730. package/build/widgets/icons/file.js +5 -0
  731. package/build/widgets/icons/folder-open.d.ts +2 -0
  732. package/build/widgets/icons/folder-open.js +5 -0
  733. package/build/widgets/icons/folder.d.ts +2 -0
  734. package/build/widgets/icons/folder.js +5 -0
  735. package/build/widgets/icons/forward.d.ts +2 -0
  736. package/build/widgets/icons/forward.js +5 -0
  737. package/build/widgets/icons/index.d.ts +12 -0
  738. package/build/widgets/icons/index.js +12 -0
  739. package/build/widgets/icons/loading.d.ts +2 -0
  740. package/build/widgets/icons/loading.js +14 -0
  741. package/build/widgets/icons/menu.d.ts +2 -0
  742. package/build/widgets/icons/menu.js +5 -0
  743. package/build/widgets/icons/pixel-picker.d.ts +2 -0
  744. package/build/widgets/icons/pixel-picker.js +5 -0
  745. package/build/widgets/icons/registry.d.ts +9 -0
  746. package/build/widgets/icons/registry.js +40 -0
  747. package/build/widgets/icons/search.d.ts +2 -0
  748. package/build/widgets/icons/search.js +5 -0
  749. package/build/widgets/icons/sort-asc.d.ts +2 -0
  750. package/build/widgets/icons/sort-asc.js +5 -0
  751. package/build/widgets/icons/square.d.ts +2 -0
  752. package/build/widgets/icons/square.js +5 -0
  753. package/build/widgets/index.d.ts +36 -0
  754. package/build/widgets/index.js +37 -0
  755. package/build/widgets/nav/Link.d.ts +6 -0
  756. package/build/widgets/nav/Link.js +6 -0
  757. package/build/widgets/nav/LinkButton.d.ts +45 -0
  758. package/build/widgets/nav/LinkButton.js +110 -0
  759. package/build/widgets/nav/Menu.d.ts +48 -0
  760. package/build/widgets/nav/Menu.js +336 -0
  761. package/build/widgets/nav/MenuItem.d.ts +68 -0
  762. package/build/widgets/nav/MenuItem.js +364 -0
  763. package/build/widgets/nav/MenuSpacer.d.ts +13 -0
  764. package/build/widgets/nav/MenuSpacer.js +11 -0
  765. package/build/widgets/nav/RedirectRoute.d.ts +14 -0
  766. package/build/widgets/nav/RedirectRoute.js +30 -0
  767. package/build/widgets/nav/Route.d.ts +40 -0
  768. package/build/widgets/nav/Route.js +94 -0
  769. package/build/widgets/nav/Route.spec.d.ts +1 -0
  770. package/build/widgets/nav/Route.spec.js +15 -0
  771. package/build/widgets/nav/Scroller.d.ts +55 -0
  772. package/build/widgets/nav/Scroller.js +125 -0
  773. package/build/widgets/nav/Submenu.d.ts +3 -0
  774. package/build/widgets/nav/Submenu.js +3 -0
  775. package/build/widgets/nav/Tab.d.ts +40 -0
  776. package/build/widgets/nav/Tab.js +66 -0
  777. package/build/widgets/nav/index.d.ts +10 -0
  778. package/build/widgets/nav/index.js +10 -0
  779. package/build/widgets/overlay/ContextMenu.d.ts +9 -0
  780. package/build/widgets/overlay/ContextMenu.js +31 -0
  781. package/build/widgets/overlay/Dropdown.d.ts +120 -0
  782. package/build/widgets/overlay/Dropdown.js +522 -0
  783. package/build/widgets/overlay/FlyweightTooltipTracker.d.ts +22 -0
  784. package/build/widgets/overlay/FlyweightTooltipTracker.js +39 -0
  785. package/build/widgets/overlay/MsgBox.d.ts +25 -0
  786. package/build/widgets/overlay/MsgBox.js +67 -0
  787. package/build/widgets/overlay/Overlay.d.ts +183 -0
  788. package/build/widgets/overlay/Overlay.js +597 -0
  789. package/build/widgets/overlay/Toast.d.ts +27 -0
  790. package/build/widgets/overlay/Toast.js +76 -0
  791. package/build/widgets/overlay/Tooltip.d.ts +55 -0
  792. package/build/widgets/overlay/Tooltip.js +307 -0
  793. package/build/widgets/overlay/Window.d.ts +65 -0
  794. package/build/widgets/overlay/Window.js +154 -0
  795. package/build/widgets/overlay/alerts.d.ts +12 -0
  796. package/build/widgets/overlay/alerts.js +31 -0
  797. package/build/widgets/overlay/captureMouse.d.ts +57 -0
  798. package/build/widgets/overlay/captureMouse.js +147 -0
  799. package/build/widgets/overlay/createHotPromiseWindowFactory.d.ts +10 -0
  800. package/build/widgets/overlay/createHotPromiseWindowFactory.js +54 -0
  801. package/build/widgets/overlay/index.d.ts +11 -0
  802. package/build/widgets/overlay/index.js +11 -0
  803. package/build/widgets/overlay/tooltip-ops.d.ts +73 -0
  804. package/build/widgets/overlay/tooltip-ops.js +34 -0
  805. package/dist/manifest.js +844 -844
  806. package/dist/util.js +0 -1
  807. package/dist/widgets.js +1 -2
  808. package/package.json +3 -2
@@ -0,0 +1,183 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /** @jsxImportSource react */
3
+ import { Widget, VDOM, getContent } from "../../ui/Widget";
4
+ import { HtmlElement } from "../HtmlElement";
5
+ import { Field, getFieldTooltip } from "./Field";
6
+ import { tooltipParentWillReceiveProps, tooltipMouseMove, tooltipMouseLeave, tooltipParentDidMount, } from "../overlay/tooltip-ops";
7
+ import { stopPropagation, preventDefault } from "../../util/eventCallbacks";
8
+ import DropdownIcon from "../icons/drop-down";
9
+ import ClearIcon from "../icons/clear";
10
+ import { Localization } from "../../ui/Localization";
11
+ import { isString } from "../../util/isString";
12
+ import { isDefined } from "../../util/isDefined";
13
+ import { KeyCode } from "../../util/KeyCode";
14
+ import { autoFocus } from "../autoFocus";
15
+ export class Select extends Field {
16
+ declareData(...args) {
17
+ super.declareData({
18
+ value: undefined,
19
+ disabled: undefined,
20
+ enabled: undefined,
21
+ required: undefined,
22
+ placeholder: undefined,
23
+ icon: undefined,
24
+ }, ...args);
25
+ }
26
+ init() {
27
+ if (isDefined(this.hideClear))
28
+ this.showClear = !this.hideClear;
29
+ if (this.alwaysShowClear)
30
+ this.showClear = true;
31
+ super.init();
32
+ }
33
+ renderInput(context, instance, key) {
34
+ return (_jsx(SelectComponent, { instance: instance, multiple: this.multiple, select: (v) => this.select(v, instance), label: this.labelPlacement && getContent(this.renderLabel(context, instance, "label")), help: this.helpPlacement && getContent(this.renderHelp(context, instance, "help")), icon: this.renderIcon(context, instance, "icon"), children: this.renderChildren(context, instance) }, key));
35
+ }
36
+ convert(value) {
37
+ if (value == this.nullString)
38
+ return null;
39
+ if (value == "true")
40
+ return true;
41
+ if (value == "false")
42
+ return false;
43
+ if (value.match(/^\d+(\.\d+)?$/))
44
+ return Number(value);
45
+ return value;
46
+ }
47
+ select(value, instance) {
48
+ let processedValue = value;
49
+ if (this.convertValues && value != null)
50
+ processedValue = this.convert(value);
51
+ instance.set("value", processedValue);
52
+ }
53
+ add(item) {
54
+ if (isString(item))
55
+ return;
56
+ super.add(item);
57
+ }
58
+ }
59
+ Select.prototype.baseClass = "select";
60
+ Select.prototype.multiple = false;
61
+ Select.prototype.convertValues = true;
62
+ Select.prototype.nullString = "";
63
+ Select.prototype.suppressErrorsUntilVisited = true;
64
+ Select.prototype.showClear = true;
65
+ Select.prototype.alwaysShowClear = false;
66
+ Select.prototype.icon = null;
67
+ Widget.alias("select", Select);
68
+ Localization.registerPrototype("cx/widgets/Select", Select);
69
+ class SelectComponent extends VDOM.Component {
70
+ select = null;
71
+ constructor(props) {
72
+ super(props);
73
+ this.state = {
74
+ visited: false,
75
+ focus: false,
76
+ };
77
+ }
78
+ render() {
79
+ let { multiple, select, instance, label, help, icon: iconVDOM } = this.props;
80
+ let { data, widget, state } = instance;
81
+ let { CSS, baseClass } = widget;
82
+ let icon = iconVDOM && _jsx("div", { className: CSS.element(baseClass, "left-icon"), children: iconVDOM });
83
+ let insideButton, readOnly = data.disabled || data.readOnly;
84
+ if (widget.showClear &&
85
+ !readOnly &&
86
+ !this.props.multiple &&
87
+ (widget.alwaysShowClear || !data.required) &&
88
+ data.placeholder &&
89
+ !data.empty) {
90
+ insideButton = (_jsx("div", { onMouseDown: preventDefault, onClick: (e) => this.onClearClick(e), className: CSS.element(baseClass, "clear"), children: _jsx(ClearIcon, { className: CSS.element(baseClass, "icon") }) }));
91
+ }
92
+ else {
93
+ insideButton = (_jsx("div", { className: CSS.element(baseClass, "tool"), children: _jsx(DropdownIcon, { className: CSS.element(baseClass, "icon") }) }));
94
+ }
95
+ let placeholder;
96
+ if (data.placeholder) {
97
+ placeholder = (_jsx("option", { value: widget.nullString, className: CSS.element(baseClass, "placeholder"), disabled: true, hidden: true, children: data.placeholder }));
98
+ }
99
+ return (_jsxs("div", { className: CSS.expand(data.classNames, CSS.state({
100
+ visited: state.visited,
101
+ icon: !!iconVDOM,
102
+ focus: this.state.focus,
103
+ error: state.visited && data.error,
104
+ empty: data.empty && !data.placeholder,
105
+ })), style: data.style, onMouseDown: stopPropagation, onTouchStart: stopPropagation, children: [_jsxs("select", { id: data.id, ref: (el) => {
106
+ this.select = el;
107
+ }, className: CSS.expand(CSS.element(baseClass, "select"), data.inputClass), style: data.inputStyle, value: data.value == null ? widget.nullString : String(data.value), multiple: multiple, disabled: data.disabled, tabIndex: data.tabIndex, ...data.inputAttrs, onBlur: this.onBlur.bind(this), onFocus: (e) => this.onFocus(), onKeyDown: this.onKeyDown.bind(this), onChange: (e) => {
108
+ e.preventDefault();
109
+ select(e.target.value);
110
+ }, onMouseMove: (e) => tooltipMouseMove(e, ...getFieldTooltip(instance)), onMouseLeave: (e) => tooltipMouseLeave(e, ...getFieldTooltip(instance)), children: [placeholder, this.props.children] }), insideButton, icon, label, help] }));
111
+ }
112
+ onBlur() {
113
+ this.props.instance.setState({ visited: true });
114
+ if (this.state.focus)
115
+ this.setState({
116
+ focus: false,
117
+ });
118
+ }
119
+ onFocus() {
120
+ let { instance } = this.props;
121
+ let { widget } = instance;
122
+ if (widget.trackFocus) {
123
+ this.setState({
124
+ focus: true,
125
+ });
126
+ }
127
+ }
128
+ onClearClick(e) {
129
+ e.preventDefault();
130
+ e.stopPropagation();
131
+ let { instance } = this.props;
132
+ let { widget } = instance;
133
+ instance.set("value", widget.emptyValue);
134
+ }
135
+ onKeyDown(e) {
136
+ switch (e.keyCode) {
137
+ case KeyCode.up:
138
+ case KeyCode.down:
139
+ e.stopPropagation();
140
+ break;
141
+ }
142
+ }
143
+ componentDidMount() {
144
+ const { select } = this.props;
145
+ if (this.select) {
146
+ select(this.select.value);
147
+ tooltipParentDidMount(this.select, ...getFieldTooltip(this.props.instance));
148
+ autoFocus(this.select, this);
149
+ }
150
+ }
151
+ componentDidUpdate() {
152
+ if (this.select) {
153
+ autoFocus(this.select, this);
154
+ }
155
+ }
156
+ UNSAFE_componentWillReceiveProps(props) {
157
+ if (this.select) {
158
+ tooltipParentWillReceiveProps(this.select, ...getFieldTooltip(props.instance));
159
+ }
160
+ }
161
+ }
162
+ export class Option extends HtmlElement {
163
+ declareData(...args) {
164
+ super.declareData({
165
+ value: undefined,
166
+ disabled: undefined,
167
+ enabled: undefined,
168
+ selected: undefined,
169
+ text: undefined,
170
+ }, ...args);
171
+ }
172
+ prepareData(context, instance) {
173
+ super.prepareData(context, instance);
174
+ const { data } = instance;
175
+ if (!data.empty)
176
+ data.value = data.value.toString();
177
+ }
178
+ render(context, instance, key) {
179
+ const { data } = instance;
180
+ return (_jsx("option", { value: data.value, children: data.text || this.renderChildren(context, instance) }, key));
181
+ }
182
+ }
183
+ Widget.alias("option", Option);
@@ -0,0 +1,68 @@
1
+ /** @jsxImportSource react */
2
+ import { BooleanProp, NumberProp, StringProp, StructuredProp, StyleProp } from "../../ui/Prop";
3
+ import type { RenderingContext } from "../../ui/RenderingContext";
4
+ import { type TooltipConfig } from "../overlay/tooltip-ops";
5
+ import { Field, FieldConfig, FieldInstance } from "./Field";
6
+ export interface SliderConfig extends FieldConfig {
7
+ /** Low value of the slider range. */
8
+ from?: NumberProp;
9
+ /** High value of the slider range. */
10
+ to?: NumberProp;
11
+ /** Rounding step. */
12
+ step?: NumberProp;
13
+ /** Minimum allowed value. Default is `0`. */
14
+ minValue?: NumberProp;
15
+ /** Maximum allowed value. Default is `100`. */
16
+ maxValue?: NumberProp;
17
+ /** Style object to be applied on the selected axis range. */
18
+ rangeStyle?: StyleProp;
19
+ /** Style object to be applied on the handle. */
20
+ handleStyle?: StyleProp;
21
+ /** Minimum allowed value. Default is `0`. */
22
+ min?: NumberProp;
23
+ /** Maximum allowed value. Default is `100`. */
24
+ max?: NumberProp;
25
+ /** High value of the slider range. */
26
+ value?: NumberProp;
27
+ /** Set to `true` to orient the slider vertically. */
28
+ vertical?: boolean;
29
+ /** Invert vertical slider behavior. Set this to `true` if you want the slider to go from `top` to `bottom`. */
30
+ invert?: boolean;
31
+ /** Range tooltip configuration. */
32
+ toTooltip?: StringProp | StructuredProp;
33
+ /** Range tooltip configuration. */
34
+ valueTooltip?: StringProp | StructuredProp;
35
+ /** Range tooltip configuration. */
36
+ fromTooltip?: StringProp | StructuredProp;
37
+ /** When set to `true`, slider responds to mouse wheel events, while hovering it. It will not work if both `from` and `to` values are used. Default value is `false`. */
38
+ wheel?: BooleanProp;
39
+ /** Value increment/decrement, when controlling the slider with mouse wheel. Default value is set to `1%` of range. */
40
+ increment?: NumberProp;
41
+ /** Increment percentage. Default value is `0.01` (1%). */
42
+ incrementPercentage?: number;
43
+ /** Set to `true` to make the slider read-only. */
44
+ readOnly?: BooleanProp;
45
+ }
46
+ export declare class Slider extends Field<SliderConfig, FieldInstance<Slider>> {
47
+ baseClass: string;
48
+ min?: number;
49
+ max?: number;
50
+ minValue: number;
51
+ maxValue: number;
52
+ value?: number;
53
+ vertical: boolean;
54
+ invert: boolean;
55
+ from?: number;
56
+ to?: number;
57
+ showFrom?: boolean;
58
+ showTo?: boolean;
59
+ toTooltip?: TooltipConfig;
60
+ fromTooltip?: TooltipConfig;
61
+ valueTooltip?: TooltipConfig;
62
+ incrementPercentage: number;
63
+ wheel: boolean;
64
+ declareData(...args: Record<string, unknown>[]): void;
65
+ init(): void;
66
+ prepareData(context: RenderingContext, instance: FieldInstance<Slider>): void;
67
+ renderInput(context: RenderingContext, instance: FieldInstance<Slider>, key: string): React.ReactNode;
68
+ }
@@ -0,0 +1,264 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { VDOM, Widget, getContent } from "../../ui/Widget";
3
+ import { addEventListenerWithOptions } from "../../util/addEventListenerWithOptions";
4
+ import { getTopLevelBoundingClientRect } from "../../util/getTopLevelBoundingClientRect";
5
+ import { isDefined } from "../../util/isDefined";
6
+ import { isUndefined } from "../../util/isUndefined";
7
+ import { captureMouseOrTouch, getCursorPos } from "../overlay/captureMouse";
8
+ import { tooltipMouseLeave, tooltipMouseMove, tooltipParentDidMount, tooltipParentWillReceiveProps, tooltipParentWillUnmount, } from "../overlay/tooltip-ops";
9
+ import { Field, getFieldTooltip } from "./Field";
10
+ export class Slider extends Field {
11
+ declareData(...args) {
12
+ super.declareData({
13
+ from: 0,
14
+ to: 0,
15
+ step: undefined,
16
+ minValue: undefined,
17
+ maxValue: undefined,
18
+ increment: undefined,
19
+ incrementPercentage: undefined,
20
+ wheel: undefined,
21
+ disabled: undefined,
22
+ enabled: undefined,
23
+ readOnly: undefined,
24
+ rangeStyle: {
25
+ structured: true,
26
+ },
27
+ handleStyle: {
28
+ structured: true,
29
+ },
30
+ invert: false,
31
+ }, ...args);
32
+ }
33
+ init() {
34
+ if (isDefined(this.min))
35
+ this.minValue = this.min;
36
+ if (isDefined(this.max))
37
+ this.maxValue = this.max;
38
+ if (this.value != null)
39
+ this.to = this.value;
40
+ if (isUndefined(this.from))
41
+ this.from = this.minValue;
42
+ else
43
+ this.showFrom = true;
44
+ if (isUndefined(this.to))
45
+ this.to = this.maxValue;
46
+ else
47
+ this.showTo = true;
48
+ if (this.valueTooltip)
49
+ this.toTooltip = this.valueTooltip;
50
+ super.init();
51
+ }
52
+ prepareData(context, instance) {
53
+ let { data } = instance;
54
+ data.stateMods = {
55
+ ...data.stateMods,
56
+ horizontal: !this.vertical,
57
+ vertical: this.vertical,
58
+ disabled: data.disabled,
59
+ };
60
+ super.prepareData(context, instance);
61
+ }
62
+ renderInput(context, instance, key) {
63
+ return (_jsx(SliderComponent, { instance: instance, data: instance.data, label: this.labelPlacement && getContent(this.renderLabel(context, instance, "label")) }, key));
64
+ }
65
+ }
66
+ Slider.prototype.baseClass = "slider";
67
+ Slider.prototype.minValue = 0;
68
+ Slider.prototype.maxValue = 100;
69
+ Slider.prototype.vertical = false;
70
+ Slider.prototype.incrementPercentage = 0.01;
71
+ Slider.prototype.wheel = false;
72
+ Slider.prototype.invert = false;
73
+ Widget.alias("slider", Slider);
74
+ class SliderComponent extends VDOM.Component {
75
+ dom;
76
+ unsubscribeOnWheel;
77
+ constructor(props) {
78
+ super(props);
79
+ this.dom = {};
80
+ let { data } = props;
81
+ this.state = {
82
+ from: data.from,
83
+ to: data.to,
84
+ };
85
+ }
86
+ render() {
87
+ let { instance, data, label } = this.props;
88
+ let { widget } = instance;
89
+ let { CSS, baseClass } = widget;
90
+ let { minValue, maxValue } = data;
91
+ let { from, to } = this.state;
92
+ from = Math.min(maxValue, Math.max(minValue, from));
93
+ to = Math.min(maxValue, Math.max(minValue, to));
94
+ let handleStyle = CSS.parseStyle(data.handleStyle);
95
+ let anchor = widget.vertical ? (widget.invert ? "top" : "bottom") : "left";
96
+ let rangeStart = from - minValue;
97
+ let rangeSize = to - from;
98
+ let fromHandleStyle = {
99
+ ...handleStyle,
100
+ [anchor]: `${(100 * (from - minValue)) / (maxValue - minValue)}%`,
101
+ };
102
+ let toHandleStyle = {
103
+ ...handleStyle,
104
+ [anchor]: `${(100 * (to - minValue)) / (maxValue - minValue)}%`,
105
+ };
106
+ let rangeStyle = {
107
+ ...CSS.parseStyle(data.rangeStyle),
108
+ [anchor]: `${(100 * rangeStart) / (maxValue - minValue)}%`,
109
+ [widget.vertical ? "height" : "width"]: `${(100 * rangeSize) / (maxValue - minValue)}%`,
110
+ };
111
+ return (_jsxs("div", { className: data.classNames, style: data.style, id: data.id, onClick: (e) => this.onClick(e), ref: (el) => (this.dom.el = el || undefined), onMouseMove: (e) => tooltipMouseMove(e, ...getFieldTooltip(instance)), onMouseLeave: (e) => tooltipMouseLeave(e, ...getFieldTooltip(instance)), children: [label, "\u00A0", _jsxs("div", { className: CSS.element(baseClass, "axis"), children: [rangeSize > 0 && _jsx("div", { className: CSS.element(baseClass, "range"), style: rangeStyle }, "range"), _jsxs("div", { className: CSS.element(baseClass, "space"), ref: (c) => (this.dom.range = c || undefined), children: [widget.showFrom && (_jsx("div", { className: CSS.element(baseClass, "handle"), tabIndex: data.disabled ? undefined : data.tabIndex || 0, style: fromHandleStyle, onMouseDown: (e) => this.onHandleMouseDown(e, "from"), onMouseMove: (e) => tooltipMouseMove(e, instance, widget.fromTooltip, { tooltipName: "fromTooltip" }), onMouseLeave: (e) => this.onHandleMouseLeave(e, "from"), onTouchStart: (e) => this.onHandleMouseDown(e, "from"), ref: (c) => (this.dom.from = c || undefined) }, "from")), widget.showTo && (_jsx("div", { className: CSS.element(baseClass, "handle"), tabIndex: data.disabled ? undefined : 0, style: toHandleStyle, onMouseDown: (e) => this.onHandleMouseDown(e, "to"), onMouseMove: (e) => tooltipMouseMove(e, instance, widget.toTooltip, { tooltipName: "toTooltip" }), onMouseLeave: (e) => this.onHandleMouseLeave(e, "to"), onTouchStart: (e) => this.onHandleMouseDown(e, "to"), ref: (c) => (this.dom.to = c || undefined) }, "to"))] }, "space")] })] }));
112
+ }
113
+ UNSAFE_componentWillReceiveProps(props) {
114
+ this.setState({
115
+ from: props.data.from,
116
+ to: props.data.to,
117
+ });
118
+ let { instance } = props;
119
+ let { widget } = instance;
120
+ tooltipParentWillReceiveProps(this.dom.to, instance, widget.toTooltip, { tooltipName: "toTooltip" });
121
+ tooltipParentWillReceiveProps(this.dom.from, instance, widget.fromTooltip, { tooltipName: "fromTooltip" });
122
+ }
123
+ componentWillUnmount() {
124
+ tooltipParentWillUnmount(this.props.instance);
125
+ this.unsubscribeOnWheel?.();
126
+ }
127
+ componentDidMount() {
128
+ let { instance } = this.props;
129
+ let { widget } = instance;
130
+ tooltipParentDidMount(this.dom.to, instance, widget.toTooltip, { tooltipName: "toTooltip" });
131
+ tooltipParentDidMount(this.dom.from, instance, widget.fromTooltip, { tooltipName: "fromTooltip" });
132
+ this.unsubscribeOnWheel = addEventListenerWithOptions(this.dom.el, "wheel", (e) => this.onWheel(e), {
133
+ passive: false,
134
+ });
135
+ }
136
+ onHandleMouseLeave(e, handle) {
137
+ if (!this.state.drag) {
138
+ let tooltipName = handle + "Tooltip";
139
+ let { instance } = this.props;
140
+ let tooltip = handle == "from" ? instance.widget.fromTooltip : instance.widget.toTooltip;
141
+ tooltipMouseLeave(e, instance, tooltip, { tooltipName });
142
+ }
143
+ }
144
+ onHandleMouseDown(e, handle) {
145
+ e.preventDefault();
146
+ e.stopPropagation();
147
+ let { instance } = this.props;
148
+ let { data, widget } = instance;
149
+ if (data.disabled || data.readOnly)
150
+ return;
151
+ let handleEl = this.dom[handle];
152
+ let b = getTopLevelBoundingClientRect(handleEl);
153
+ let pos = getCursorPos(e);
154
+ let dx = pos.clientX - (b.left + b.right) / 2;
155
+ let dy = pos.clientY - (b.top + b.bottom) / 2;
156
+ let tooltipName = handle + "Tooltip";
157
+ let tooltip = handle == "from" ? widget.fromTooltip : widget.toTooltip;
158
+ this.setState({
159
+ drag: true,
160
+ });
161
+ captureMouseOrTouch(e, (e) => {
162
+ let { value } = this.getValues(e, widget.vertical ? dy : dx);
163
+ if (handle === "from") {
164
+ if (instance.set("from", value))
165
+ this.setState({ from: value });
166
+ if (value > this.state.to) {
167
+ if (instance.set("to", value))
168
+ this.setState({ to: value });
169
+ }
170
+ }
171
+ else if (handle === "to") {
172
+ if (instance.set("to", value))
173
+ this.setState({ to: value });
174
+ if (value < this.state.from) {
175
+ if (instance.set("from", value))
176
+ this.setState({ from: value });
177
+ }
178
+ }
179
+ tooltipMouseMove(e, instance, tooltip, { tooltipName, target: handleEl });
180
+ }, (e) => {
181
+ this.setState({
182
+ drag: false,
183
+ });
184
+ let pos = getCursorPos(e);
185
+ let el = document.elementFromPoint(pos.clientX, pos.clientY);
186
+ if (el !== handleEl)
187
+ tooltipMouseLeave(e, instance, tooltip, { tooltipName, target: handleEl });
188
+ });
189
+ }
190
+ getValues(e, d = 0) {
191
+ let { data, widget } = this.props.instance;
192
+ let { minValue, maxValue } = data;
193
+ let b = getTopLevelBoundingClientRect(this.dom.range);
194
+ let pos = getCursorPos(e);
195
+ let pct = widget.vertical
196
+ ? widget.invert
197
+ ? Math.max(0, Math.min(1, (pos.clientY - b.top - d) / this.dom.range.offsetHeight))
198
+ : Math.max(0, Math.min(1, (b.bottom - pos.clientY + d) / this.dom.range.offsetHeight))
199
+ : Math.max(0, Math.min(1, (pos.clientX - b.left - d) / this.dom.range.offsetWidth));
200
+ let delta = (maxValue - minValue) * pct;
201
+ if (data.step) {
202
+ let currentValue = Math.round(delta / data.step) * data.step + minValue;
203
+ let value = this.checkBoundaries(currentValue);
204
+ if (maxValue % data.step === 0)
205
+ delta = Math.round(delta / data.step) * data.step;
206
+ delta = value - minValue;
207
+ }
208
+ return {
209
+ percent: delta / (maxValue - minValue),
210
+ value: minValue + delta,
211
+ };
212
+ }
213
+ onClick(e) {
214
+ let { instance } = this.props;
215
+ let { data, widget } = instance;
216
+ if (!data.disabled && !data.readOnly) {
217
+ let { value } = this.getValues(e);
218
+ this.props.instance.set("value", value, { immediate: true });
219
+ if (widget.showFrom) {
220
+ this.setState({ from: value });
221
+ this.props.instance.set("from", value, { immediate: true });
222
+ }
223
+ if (widget.showTo) {
224
+ this.setState({ to: value });
225
+ this.props.instance.set("to", value, { immediate: true });
226
+ }
227
+ }
228
+ }
229
+ onWheel(e) {
230
+ let { instance } = this.props;
231
+ let { data, widget } = instance;
232
+ if ((widget.showFrom && widget.showTo) || !data.wheel)
233
+ return;
234
+ e.preventDefault();
235
+ e.stopPropagation();
236
+ let increment = e.deltaY > 0 ? this.getIncrement() : -this.getIncrement();
237
+ if (!data.disabled && !data.readOnly) {
238
+ if (widget.showFrom) {
239
+ let value = this.checkBoundaries(data.from + increment);
240
+ if (instance.set("from", value))
241
+ this.setState({ from: value });
242
+ }
243
+ else if (widget.showTo) {
244
+ let value = this.checkBoundaries(data.to + increment);
245
+ if (instance.set("to", value))
246
+ this.setState({ to: value });
247
+ }
248
+ }
249
+ }
250
+ checkBoundaries(value) {
251
+ let { data } = this.props.instance;
252
+ if (value > data.maxValue)
253
+ value = data.maxValue;
254
+ else if (value < data.minValue)
255
+ value = data.minValue;
256
+ return value;
257
+ }
258
+ getIncrement() {
259
+ let { instance } = this.props;
260
+ let { data } = instance;
261
+ let increment = data.increment || (data.maxValue - data.minValue) * data.incrementPercentage;
262
+ return increment;
263
+ }
264
+ }
@@ -0,0 +1,41 @@
1
+ /** @jsxImportSource react */
2
+ import type { RenderingContext } from "../../ui/RenderingContext";
3
+ import type { Instance } from "../../ui/Instance";
4
+ import { Field, FieldConfig, FieldInstance } from "./Field";
5
+ import * as React from "react";
6
+ import { BooleanProp, StringProp, StyleProp } from "../../ui/Prop";
7
+ export interface SwitchConfig extends FieldConfig {
8
+ /** Value indicating that switch is on. */
9
+ on?: BooleanProp;
10
+ /** Value indicating that switch is off. */
11
+ off?: BooleanProp;
12
+ /** Value indicating that switch is on. */
13
+ value?: BooleanProp;
14
+ /** Defaults to `false`. Used to make the field read-only. */
15
+ readOnly?: BooleanProp;
16
+ /** Text description. */
17
+ text?: StringProp;
18
+ /** Style object to be applied on the axis range when the switch is on. */
19
+ rangeStyle?: StyleProp;
20
+ /** Style object to be applied on the switch handle. */
21
+ handleStyle?: StyleProp;
22
+ /** Base CSS class to be applied to the field. Defaults to `switch`. */
23
+ baseClass?: string;
24
+ /** Determines if button should receive focus on mousedown event. Default is `false`. */
25
+ focusOnMouseDown?: boolean;
26
+ }
27
+ export declare class Switch extends Field<SwitchConfig> {
28
+ on?: unknown;
29
+ off?: unknown;
30
+ value?: unknown;
31
+ rangeStyle?: Record<string, unknown> | string;
32
+ handleStyle?: Record<string, unknown> | string;
33
+ focusOnMouseDown?: boolean;
34
+ constructor(config?: SwitchConfig);
35
+ declareData(...args: Record<string, unknown>[]): void;
36
+ isEmpty(): boolean;
37
+ init(): void;
38
+ prepareData(context: RenderingContext, instance: FieldInstance<Switch>): void;
39
+ renderInput(context: RenderingContext, instance: FieldInstance, key: string): React.ReactElement;
40
+ toggle(e: React.MouseEvent | React.KeyboardEvent, instance: Instance): void;
41
+ }
@@ -0,0 +1,94 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Widget, getContent } from "../../ui/Widget";
3
+ import { KeyCode } from "../../util/KeyCode";
4
+ import { parseStyle } from "../../util/parseStyle";
5
+ import { Field, getFieldTooltip } from "./Field";
6
+ import { tooltipMouseMove, tooltipMouseLeave } from "../overlay/tooltip-ops";
7
+ import { preventFocus } from "../../ui/FocusManager";
8
+ import { isDefined } from "../../util/isDefined";
9
+ export class Switch extends Field {
10
+ constructor(config) {
11
+ super(config);
12
+ }
13
+ declareData(...args) {
14
+ super.declareData({
15
+ on: false,
16
+ off: true,
17
+ value: undefined,
18
+ disabled: undefined,
19
+ enabled: undefined,
20
+ readOnly: undefined,
21
+ text: undefined,
22
+ rangeStyle: {
23
+ structured: true,
24
+ },
25
+ handleStyle: {
26
+ structured: true,
27
+ },
28
+ }, ...args);
29
+ }
30
+ isEmpty() {
31
+ return false;
32
+ }
33
+ init() {
34
+ if (isDefined(this.value))
35
+ this.on = this.value;
36
+ this.rangeStyle = parseStyle(this.rangeStyle);
37
+ this.handleStyle = parseStyle(this.handleStyle);
38
+ super.init();
39
+ }
40
+ prepareData(context, instance) {
41
+ let { data } = instance;
42
+ if (isDefined(this.off))
43
+ data.on = !data.off;
44
+ data.stateMods = {
45
+ ...data.stateMods,
46
+ on: data.on,
47
+ disabled: data.disabled,
48
+ };
49
+ super.prepareData(context, instance);
50
+ }
51
+ renderInput(context, instance, key) {
52
+ let { data, widget } = instance;
53
+ let { rangeStyle, handleStyle } = data;
54
+ let { CSS, baseClass } = this;
55
+ let text = data.text || this.renderChildren(context, instance);
56
+ let renderTextElement = text?.length != 0;
57
+ return (_jsxs("div", { className: data.classNames, style: data.style, id: data.id, tabIndex: data.disabled ? undefined : (data.tabIndex || 0), onMouseDown: (e) => {
58
+ e.stopPropagation();
59
+ if (!this.focusOnMouseDown)
60
+ preventFocus(e);
61
+ }, onClick: (e) => {
62
+ this.toggle(e, instance);
63
+ }, onKeyDown: (e) => {
64
+ const switchWidget = widget;
65
+ if (switchWidget.handleKeyDown && switchWidget.handleKeyDown(e, instance) === false)
66
+ return;
67
+ if (e.keyCode == KeyCode.space) {
68
+ this.toggle(e, instance);
69
+ }
70
+ }, onMouseMove: (e) => {
71
+ const tooltip = getFieldTooltip(instance);
72
+ if (Array.isArray(tooltip)) {
73
+ tooltipMouseMove(e, ...tooltip);
74
+ }
75
+ }, onMouseLeave: (e) => {
76
+ const tooltip = getFieldTooltip(instance);
77
+ if (Array.isArray(tooltip)) {
78
+ tooltipMouseLeave(e, ...tooltip);
79
+ }
80
+ }, children: [this.labelPlacement && getContent(this.renderLabel(context, instance, "label")), "\u00A0", _jsxs("div", { className: CSS.element(baseClass, "axis"), children: [_jsx("div", { className: CSS.element(baseClass, "range"), style: parseStyle(rangeStyle) }), _jsx("div", { className: CSS.element(baseClass, "space"), children: _jsx("div", { className: CSS.element(baseClass, "handle"), style: parseStyle(handleStyle) }) })] }), renderTextElement && (_jsx("div", { className: CSS.element(this.baseClass, "text"), children: text }, "text"))] }, key));
81
+ }
82
+ toggle(e, instance) {
83
+ let { data } = instance;
84
+ if (data.readOnly || data.disabled)
85
+ return;
86
+ instance.set("on", !data.on);
87
+ instance.set("off", data.on);
88
+ e.preventDefault();
89
+ e.stopPropagation();
90
+ }
91
+ }
92
+ Switch.prototype.baseClass = "switch";
93
+ Switch.prototype.focusOnMouseDown = false;
94
+ Widget.alias("switch", Switch);
@@ -0,0 +1,20 @@
1
+ /** @jsxImportSource react */
2
+ import { TextField, TextFieldConfig } from "./TextField";
3
+ import { FieldInstance } from "./Field";
4
+ import type { RenderingContext } from "../../ui/RenderingContext";
5
+ import { NumberProp } from "../../ui/Prop";
6
+ export interface TextAreaConfig extends TextFieldConfig {
7
+ /** Specifies the number of visible lines. */
8
+ rows?: NumberProp;
9
+ /** Event used to report on a new value. Defaults to `blur`. Other permitted value is `input`. */
10
+ reactOn?: string;
11
+ /** Base CSS class to be applied to the element. Defaults to `textarea`. */
12
+ baseClass?: string;
13
+ }
14
+ export declare class TextArea extends TextField<TextAreaConfig> {
15
+ constructor(config?: TextAreaConfig);
16
+ declareData(...args: Record<string, unknown>[]): void;
17
+ prepareData(context: RenderingContext, instance: FieldInstance<TextArea>): void;
18
+ renderInput(context: RenderingContext, instance: FieldInstance<TextArea>, key: string): React.ReactNode;
19
+ validateRequired(context: RenderingContext, instance: FieldInstance<TextArea>): string | undefined;
20
+ }