cx 25.10.1 → 26.0.1

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 (1247) hide show
  1. package/.mocharc.json +5 -0
  2. package/LICENSE-THIRD-PARTY.md +91 -91
  3. package/LICENSE.md +7 -7
  4. package/README.md +46 -46
  5. package/build.js +129 -0
  6. package/dist/charts.css +250 -250
  7. package/dist/charts.js +2421 -3102
  8. package/dist/data.js +857 -1063
  9. package/dist/hooks.js +48 -59
  10. package/dist/jsx-runtime.js +24 -0
  11. package/dist/manifest.js +959 -953
  12. package/dist/svg.js +266 -432
  13. package/dist/ui.js +1935 -2388
  14. package/dist/util.js +587 -557
  15. package/dist/widgets.css +6 -6
  16. package/dist/widgets.js +7543 -9909
  17. package/package.json +39 -5
  18. package/src/charts/Bar.scss +5 -3
  19. package/src/charts/Bar.ts +114 -0
  20. package/src/charts/BarGraph.scss +4 -3
  21. package/src/charts/BarGraph.tsx +145 -0
  22. package/src/charts/BubbleGraph.scss +5 -3
  23. package/src/charts/BubbleGraph.tsx +165 -0
  24. package/src/charts/Chart.ts +108 -0
  25. package/src/charts/ColorMap.ts +150 -0
  26. package/src/charts/Column.scss +5 -3
  27. package/src/charts/Column.ts +124 -0
  28. package/src/charts/ColumnBarBase.tsx +284 -0
  29. package/src/charts/ColumnBarGraphBase.tsx +229 -0
  30. package/src/charts/ColumnGraph.scss +5 -3
  31. package/src/charts/ColumnGraph.tsx +153 -0
  32. package/src/charts/Grid.ts +5 -0
  33. package/src/charts/Gridlines.scss +5 -3
  34. package/src/charts/Gridlines.tsx +88 -0
  35. package/src/charts/Legend.scss +5 -3
  36. package/src/charts/Legend.tsx +270 -0
  37. package/src/charts/LegendEntry.scss +5 -3
  38. package/src/charts/LegendEntry.tsx +197 -0
  39. package/src/charts/LineGraph.scss +4 -3
  40. package/src/charts/LineGraph.tsx +441 -0
  41. package/src/charts/Marker.scss +5 -3
  42. package/src/charts/Marker.tsx +483 -0
  43. package/src/charts/MarkerLine.scss +5 -3
  44. package/src/charts/MarkerLine.tsx +214 -0
  45. package/src/charts/MouseTracker.tsx +112 -0
  46. package/src/charts/Pie.ts +8 -0
  47. package/src/charts/PieChart.scss +5 -3
  48. package/src/charts/PieChart.tsx +717 -0
  49. package/src/charts/PieLabel.tsx +106 -0
  50. package/src/charts/PieLabelsContainer.ts +68 -0
  51. package/src/charts/Range.scss +4 -3
  52. package/src/charts/Range.tsx +318 -0
  53. package/src/charts/RangeMarker.scss +5 -3
  54. package/src/charts/RangeMarker.tsx +233 -0
  55. package/src/charts/ScatterGraph.scss +5 -3
  56. package/src/charts/ScatterGraph.tsx +245 -0
  57. package/src/charts/Swimlane.scss +5 -3
  58. package/src/charts/Swimlane.tsx +195 -0
  59. package/src/charts/Swimlanes.scss +5 -3
  60. package/src/charts/Swimlanes.tsx +179 -0
  61. package/src/charts/axis/Axis.scss +22 -22
  62. package/src/charts/axis/Axis.tsx +444 -0
  63. package/src/charts/axis/CategoryAxis.scss +5 -3
  64. package/src/charts/axis/CategoryAxis.tsx +313 -0
  65. package/src/charts/axis/NumericAxis.scss +5 -3
  66. package/src/charts/axis/NumericAxis.tsx +437 -0
  67. package/src/charts/axis/Stack.ts +61 -0
  68. package/src/charts/axis/TimeAxis.scss +4 -3
  69. package/src/charts/axis/TimeAxis.tsx +718 -0
  70. package/src/charts/axis/index.scss +5 -5
  71. package/src/charts/axis/index.ts +4 -0
  72. package/src/charts/axis/variables.scss +2 -2
  73. package/src/charts/helpers/MinMaxFinder.ts +66 -0
  74. package/src/charts/helpers/PointReducer.ts +135 -0
  75. package/src/charts/helpers/SnapPointFinder.ts +136 -0
  76. package/src/charts/helpers/ValueAtFinder.ts +72 -0
  77. package/src/charts/helpers/index.ts +4 -0
  78. package/src/charts/index.scss +22 -22
  79. package/src/charts/palette.scss +7 -5
  80. package/src/charts/shapes.tsx +86 -0
  81. package/src/charts/variables.scss +2 -1
  82. package/src/core.d.ts +182 -310
  83. package/src/data/AggregateFunction.ts +171 -0
  84. package/src/data/ArrayElementView.spec.ts +88 -0
  85. package/src/data/ArrayElementView.ts +90 -0
  86. package/src/data/ArrayRef.ts +35 -0
  87. package/src/data/AugmentedViewBase.ts +88 -0
  88. package/src/data/Binding.ts +104 -0
  89. package/src/data/ExposedRecordView.ts +95 -0
  90. package/src/data/ExposedValueView.ts +89 -0
  91. package/src/data/Expression.spec.ts +229 -0
  92. package/src/data/Expression.ts +233 -0
  93. package/src/data/Grouper.spec.ts +57 -0
  94. package/src/data/Grouper.ts +158 -0
  95. package/src/data/NestedDataView.ts +43 -0
  96. package/src/data/ReadOnlyDataView.ts +39 -0
  97. package/src/data/Ref.spec.ts +79 -0
  98. package/src/data/Ref.ts +104 -0
  99. package/src/data/Selector.ts +10 -0
  100. package/src/data/Store.spec.ts +22 -0
  101. package/src/data/Store.ts +52 -0
  102. package/src/data/StoreProxy.ts +19 -0
  103. package/src/data/StoreRef.spec.ts +24 -0
  104. package/src/data/StoreRef.ts +66 -0
  105. package/src/data/StringTemplate.spec.ts +132 -0
  106. package/src/data/StringTemplate.ts +93 -0
  107. package/src/data/StructuredSelector.spec.ts +113 -0
  108. package/src/data/StructuredSelector.ts +146 -0
  109. package/src/data/SubscribableView.ts +63 -0
  110. package/src/data/View.ts +289 -0
  111. package/src/data/ZoomIntoPropertyView.spec.ts +64 -0
  112. package/src/data/ZoomIntoPropertyView.ts +45 -0
  113. package/src/data/comparer.ts +78 -0
  114. package/src/data/computable.spec.ts +62 -0
  115. package/src/data/computable.ts +72 -0
  116. package/src/data/createAccessorModelProxy.ts +60 -0
  117. package/src/data/createStructuredSelector.spec.ts +45 -0
  118. package/src/data/createStructuredSelector.ts +62 -0
  119. package/src/data/defaultCompare.ts +15 -0
  120. package/src/data/diff/diffArrays.ts +49 -0
  121. package/src/data/diff/diffs.spec.ts +49 -0
  122. package/src/data/diff/index.ts +1 -0
  123. package/src/data/enableFatArrowExpansion.ts +6 -0
  124. package/src/data/getAccessor.spec.ts +11 -0
  125. package/src/data/getAccessor.ts +74 -0
  126. package/src/data/getSelector.spec.ts +43 -0
  127. package/src/data/getSelector.ts +66 -0
  128. package/src/data/index.ts +30 -0
  129. package/src/data/isSelector.ts +26 -0
  130. package/src/data/ops/append.spec.ts +28 -0
  131. package/src/data/ops/append.ts +5 -0
  132. package/src/data/ops/filter.spec.ts +35 -0
  133. package/src/data/ops/filter.ts +9 -0
  134. package/src/data/ops/findTreeNode.spec.ts +23 -0
  135. package/src/data/ops/findTreeNode.ts +18 -0
  136. package/src/data/ops/findTreePath.ts +23 -0
  137. package/src/data/ops/insertElement.ts +3 -0
  138. package/src/data/ops/merge.spec.ts +27 -0
  139. package/src/data/ops/merge.ts +13 -0
  140. package/src/data/ops/moveElement.ts +21 -0
  141. package/src/data/ops/removeTreeNodes.spec.ts +37 -0
  142. package/src/data/ops/removeTreeNodes.ts +15 -0
  143. package/src/data/ops/updateArray.spec.ts +69 -0
  144. package/src/data/ops/updateArray.ts +31 -0
  145. package/src/data/ops/updateTree.spec.ts +54 -0
  146. package/src/data/ops/updateTree.ts +23 -0
  147. package/src/data/test-types.ts +7 -0
  148. package/src/global.scss +13 -13
  149. package/src/hooks/createLocalStorageRef.ts +21 -0
  150. package/src/hooks/invokeCallback.spec.tsx +59 -0
  151. package/src/hooks/invokeCallback.ts +8 -0
  152. package/src/hooks/resolveCallback.spec.tsx +48 -0
  153. package/src/hooks/resolveCallback.ts +16 -0
  154. package/src/hooks/store.spec.tsx +67 -0
  155. package/src/hooks/store.ts +46 -0
  156. package/src/hooks/useEffect.ts +14 -0
  157. package/src/hooks/useInterval.ts +8 -0
  158. package/src/hooks/useState.ts +20 -0
  159. package/src/hooks/useTrigger.spec.tsx +99 -0
  160. package/src/hooks/useTrigger.ts +26 -0
  161. package/src/jsx-runtime.ts +72 -0
  162. package/src/locale/de-de.ts +76 -0
  163. package/src/locale/en-us.ts +75 -0
  164. package/src/locale/es-es.ts +76 -0
  165. package/src/locale/fr-fr.ts +76 -0
  166. package/src/locale/nl-nl.ts +76 -0
  167. package/src/locale/pt-pt.ts +76 -0
  168. package/src/locale/sr-latn-ba.ts +76 -0
  169. package/src/svg/BoundedObject.ts +101 -0
  170. package/src/svg/ClipRect.tsx +29 -0
  171. package/src/svg/Ellipse.tsx +69 -0
  172. package/src/svg/Line.tsx +58 -0
  173. package/src/svg/NonOverlappingRect.ts +26 -0
  174. package/src/svg/NonOverlappingRectGroup.ts +49 -0
  175. package/src/svg/Rectangle.tsx +91 -0
  176. package/src/svg/Svg.scss +5 -4
  177. package/src/svg/Svg.tsx +241 -0
  178. package/src/svg/Text.tsx +134 -0
  179. package/src/svg/TextualBoundedObject.ts +35 -0
  180. package/src/svg/index.scss +8 -8
  181. package/src/svg/util/Rect.ts +105 -0
  182. package/src/ui/CSS.ts +87 -0
  183. package/src/ui/CSSHelper.ts +17 -0
  184. package/src/ui/Container.tsx +216 -0
  185. package/src/ui/ContentResolver.spec.tsx +430 -0
  186. package/src/ui/ContentResolver.ts +124 -0
  187. package/src/ui/Controller.spec.tsx +566 -0
  188. package/src/ui/Controller.ts +189 -0
  189. package/src/ui/Culture.ts +159 -0
  190. package/src/ui/Cx.spec.tsx +208 -0
  191. package/src/ui/Cx.tsx +386 -0
  192. package/src/ui/DataProxy.spec.tsx +337 -0
  193. package/src/ui/DataProxy.ts +55 -0
  194. package/src/ui/DetachedScope.tsx +159 -0
  195. package/src/ui/FocusManager.ts +171 -0
  196. package/src/ui/Format.ts +108 -0
  197. package/src/ui/HoverSync.tsx +189 -0
  198. package/src/ui/Instance.ts +868 -0
  199. package/src/ui/IsolatedScope.spec.tsx +55 -0
  200. package/src/ui/IsolatedScope.ts +50 -0
  201. package/src/ui/Localization.ts +70 -0
  202. package/src/ui/Prop.ts +112 -0
  203. package/src/ui/PureContainer.spec.tsx +230 -0
  204. package/src/ui/PureContainer.tsx +19 -0
  205. package/src/ui/RenderingContext.ts +99 -0
  206. package/src/ui/Repeater.spec.tsx +141 -0
  207. package/src/ui/Repeater.ts +203 -0
  208. package/src/ui/Rescope.spec.tsx +199 -0
  209. package/src/ui/Rescope.ts +49 -0
  210. package/src/ui/ResizeManager.ts +31 -0
  211. package/src/ui/Restate.spec.tsx +418 -0
  212. package/src/ui/Restate.tsx +217 -0
  213. package/src/ui/StaticText.ts +11 -0
  214. package/src/ui/StructuredInstanceDataAccessor.ts +32 -0
  215. package/src/ui/Text.ts +30 -0
  216. package/src/ui/VDOM.ts +34 -0
  217. package/src/ui/Widget.spec.tsx +53 -0
  218. package/src/ui/Widget.tsx +308 -0
  219. package/src/ui/ZIndexManager.ts +11 -0
  220. package/src/ui/adapter/ArrayAdapter.spec.ts +55 -0
  221. package/src/ui/adapter/ArrayAdapter.ts +226 -0
  222. package/src/ui/adapter/DataAdapter.ts +52 -0
  223. package/src/ui/adapter/GroupAdapter.ts +235 -0
  224. package/src/ui/adapter/TreeAdapter.spec.ts +76 -0
  225. package/src/ui/adapter/TreeAdapter.ts +185 -0
  226. package/src/ui/app/History.ts +133 -0
  227. package/src/ui/app/Url.spec.ts +50 -0
  228. package/src/ui/app/Url.ts +102 -0
  229. package/src/ui/app/startAppLoop.tsx +74 -0
  230. package/src/ui/app/startHotAppLoop.ts +40 -0
  231. package/src/ui/batchUpdates.ts +77 -0
  232. package/src/ui/bind.ts +10 -0
  233. package/src/ui/createFunctionalComponent.spec.tsx +399 -0
  234. package/src/ui/createFunctionalComponent.ts +65 -0
  235. package/src/ui/expr.ts +44 -0
  236. package/src/ui/flattenProps.ts +21 -0
  237. package/src/ui/index.scss +2 -2
  238. package/src/ui/index.ts +45 -0
  239. package/src/ui/keyboardShortcuts.ts +40 -0
  240. package/src/ui/layout/Content.ts +30 -0
  241. package/src/ui/layout/ContentPlaceholder.spec.tsx +587 -0
  242. package/src/ui/layout/ContentPlaceholder.ts +133 -0
  243. package/src/ui/layout/FirstVisibleChildLayout.spec.tsx +195 -0
  244. package/src/ui/layout/FirstVisibleChildLayout.ts +60 -0
  245. package/src/ui/layout/LabelsLeftLayout.scss +6 -4
  246. package/src/ui/layout/LabelsLeftLayout.tsx +76 -0
  247. package/src/ui/layout/LabelsTopLayout.scss +5 -4
  248. package/src/ui/layout/LabelsTopLayout.tsx +156 -0
  249. package/src/ui/layout/UseParentLayout.ts +8 -0
  250. package/src/ui/layout/exploreChildren.ts +38 -0
  251. package/src/ui/layout/index.scss +3 -3
  252. package/src/ui/layout/variables.scss +2 -2
  253. package/src/ui/selection/KeySelection.ts +165 -0
  254. package/src/ui/selection/PropertySelection.ts +87 -0
  255. package/src/ui/selection/Selection.ts +118 -0
  256. package/src/ui/tpl.ts +5 -0
  257. package/src/ui/variables.scss +1 -1
  258. package/src/util/Component.spec.ts +381 -0
  259. package/src/util/Component.ts +296 -0
  260. package/src/util/Console.ts +11 -0
  261. package/src/util/DOM.ts +88 -0
  262. package/src/util/Debug.ts +71 -0
  263. package/src/util/Format.spec.ts +69 -0
  264. package/src/util/Format.ts +267 -0
  265. package/src/util/GlobalCacheIdentifier.ts +11 -0
  266. package/src/util/KeyCode.ts +21 -0
  267. package/src/util/SubscriberList.ts +87 -0
  268. package/src/util/Timing.ts +59 -0
  269. package/src/util/TraversalStack.spec.ts +54 -0
  270. package/src/util/TraversalStack.ts +48 -0
  271. package/src/util/addEventListenerWithOptions.ts +41 -0
  272. package/src/util/browserSupportsPassiveEventHandlers.ts +20 -0
  273. package/src/util/calculateNaturalElementHeight.ts +22 -0
  274. package/src/util/call-once.scss +6 -6
  275. package/src/util/capitalize.ts +4 -0
  276. package/src/util/coalesce.ts +6 -0
  277. package/src/util/color/hslToRgb.ts +34 -0
  278. package/src/util/color/parseColor.ts +173 -0
  279. package/src/util/color/rgbToHex.ts +15 -0
  280. package/src/util/color/rgbToHsl.ts +36 -0
  281. package/src/util/date/dateDiff.ts +9 -0
  282. package/src/util/date/diff.ts +13 -0
  283. package/src/util/date/encodeDate.ts +8 -0
  284. package/src/util/date/encodeDateWithTimezoneOffset.ts +19 -0
  285. package/src/util/date/lowerBoundCheck.ts +13 -0
  286. package/src/util/date/maxDate.ts +14 -0
  287. package/src/util/date/minDate.ts +14 -0
  288. package/src/util/date/monthStart.ts +8 -0
  289. package/src/util/date/parseDateInvariant.ts +20 -0
  290. package/src/util/date/sameDate.ts +11 -0
  291. package/src/util/date/upperBoundCheck.ts +13 -0
  292. package/src/util/date/zeroTime.ts +9 -0
  293. package/src/util/debounce.ts +26 -0
  294. package/src/util/dummyCallback.ts +1 -0
  295. package/src/util/escapeSpecialRegexCharacters.ts +8 -0
  296. package/src/util/eventCallbacks.ts +12 -0
  297. package/src/util/expandFatArrows.ts +118 -0
  298. package/src/util/findScrollableParent.ts +15 -0
  299. package/src/util/getActiveElement.ts +4 -0
  300. package/src/util/getParentFrameBoundingClientRect.ts +13 -0
  301. package/src/util/getScrollerBoundingClientRect.ts +12 -0
  302. package/src/util/getSearchQueryPredicate.ts +58 -0
  303. package/src/util/getTopLevelBoundingClientRect.ts +7 -0
  304. package/src/util/getVendorPrefix.ts +33 -0
  305. package/src/util/hasKey.ts +18 -0
  306. package/src/util/index.scss +10 -10
  307. package/src/util/index.ts +55 -0
  308. package/src/util/innerTextTrim.ts +10 -0
  309. package/src/util/isArray.ts +3 -0
  310. package/src/util/isDataRecord.ts +5 -0
  311. package/src/util/isDefined.ts +3 -0
  312. package/src/util/isDigit.ts +8 -0
  313. package/src/util/isFunction.ts +3 -0
  314. package/src/util/isNonEmptyArray.ts +3 -0
  315. package/src/util/isNumber.ts +3 -0
  316. package/src/util/isObject.ts +3 -0
  317. package/src/util/isPromise.ts +6 -0
  318. package/src/util/isString.ts +3 -0
  319. package/src/util/isTextInputElement.ts +3 -0
  320. package/src/util/isTouchDevice.ts +7 -0
  321. package/src/util/isTouchEvent.ts +64 -0
  322. package/src/util/isUndefined.ts +3 -0
  323. package/src/util/isValidIdentifierName.ts +5 -0
  324. package/src/util/onIdleCallback.ts +10 -0
  325. package/src/util/parseStyle.ts +29 -0
  326. package/src/util/quote.ts +6 -0
  327. package/src/util/reverseSlice.ts +10 -0
  328. package/src/util/routeAppend.ts +16 -0
  329. package/src/util/scrollElementIntoView.ts +40 -0
  330. package/src/util/scss/add-rules.scss +7 -5
  331. package/src/util/scss/calc.scss +12 -8
  332. package/src/util/scss/call-once.scss +5 -3
  333. package/src/util/scss/clockwise.scss +20 -18
  334. package/src/util/scss/colors.scss +4 -2
  335. package/src/util/scss/deep-get.scss +3 -1
  336. package/src/util/scss/deep-merge.scss +6 -3
  337. package/src/util/scss/divide.scss +3 -3
  338. package/src/util/scss/include.scss +6 -5
  339. package/src/util/scss/index.scss +9 -9
  340. package/src/util/shallowEquals.ts +43 -0
  341. package/src/util/test/createTestRenderer.tsx +12 -0
  342. package/src/util/throttle.ts +21 -0
  343. package/src/util/validatedDebounce.ts +23 -0
  344. package/src/variables.scss +217 -217
  345. package/src/widgets/AccessorBindings.spec.tsx +64 -66
  346. package/src/widgets/Button.scss +6 -4
  347. package/src/widgets/Button.tsx +201 -0
  348. package/src/widgets/Button.variables.scss +13 -10
  349. package/src/widgets/CxCredit.scss +6 -4
  350. package/src/widgets/CxCredit.tsx +46 -0
  351. package/src/widgets/DocumentTitle.ts +92 -0
  352. package/src/widgets/FlexBox.scss +7 -5
  353. package/src/widgets/FlexBox.tsx +169 -0
  354. package/src/widgets/Heading.scss +6 -4
  355. package/src/widgets/Heading.ts +43 -0
  356. package/src/widgets/HighlightedSearchText.scss +6 -4
  357. package/src/widgets/HighlightedSearchText.tsx +54 -0
  358. package/src/widgets/HtmlElement.spec.tsx +79 -0
  359. package/src/widgets/HtmlElement.tsx +349 -0
  360. package/src/widgets/Icon.scss +6 -4
  361. package/src/widgets/Icon.ts +78 -0
  362. package/src/widgets/List.scss +6 -4
  363. package/src/widgets/List.tsx +787 -0
  364. package/src/widgets/ProgressBar.scss +5 -4
  365. package/src/widgets/ProgressBar.tsx +66 -0
  366. package/src/widgets/Resizer.scss +5 -4
  367. package/src/widgets/Resizer.tsx +200 -0
  368. package/src/widgets/Sandbox.ts +103 -0
  369. package/src/widgets/Section.scss +5 -4
  370. package/src/widgets/Section.tsx +187 -0
  371. package/src/widgets/animations.scss +10 -10
  372. package/src/widgets/autoFocus.ts +9 -0
  373. package/src/widgets/cx.ts +63 -0
  374. package/src/widgets/drag-drop/DragClone.scss +6 -4
  375. package/src/widgets/drag-drop/DragHandle.scss +6 -4
  376. package/src/widgets/drag-drop/DragHandle.tsx +47 -0
  377. package/src/widgets/drag-drop/DragSource.scss +6 -4
  378. package/src/widgets/drag-drop/DragSource.tsx +238 -0
  379. package/src/widgets/drag-drop/DropZone.scss +6 -4
  380. package/src/widgets/drag-drop/DropZone.tsx +354 -0
  381. package/src/widgets/drag-drop/index.scss +3 -3
  382. package/src/widgets/drag-drop/ops.tsx +422 -0
  383. package/src/widgets/drag-drop/variables.scss +4 -1
  384. package/src/widgets/enableAllInternalDependencies.ts +11 -0
  385. package/src/widgets/form/Calendar.scss +8 -5
  386. package/src/widgets/form/Calendar.tsx +760 -0
  387. package/src/widgets/form/Calendar.variables.scss +63 -63
  388. package/src/widgets/form/Checkbox.scss +5 -3
  389. package/src/widgets/form/Checkbox.tsx +285 -0
  390. package/src/widgets/form/Checkbox.variables.scss +39 -39
  391. package/src/widgets/form/ColorField.scss +5 -3
  392. package/src/widgets/form/ColorField.tsx +491 -0
  393. package/src/widgets/form/ColorPicker.scss +5 -3
  394. package/src/widgets/form/ColorPicker.tsx +544 -0
  395. package/src/widgets/form/ColorPicker.variables.scss +22 -22
  396. package/src/widgets/form/DateField.ts +21 -0
  397. package/src/widgets/form/DateTimeField.scss +5 -3
  398. package/src/widgets/form/DateTimeField.tsx +723 -0
  399. package/src/widgets/form/DateTimePicker.scss +6 -4
  400. package/src/widgets/form/DateTimePicker.tsx +431 -0
  401. package/src/widgets/form/Field.scss +4 -2
  402. package/src/widgets/form/Field.tsx +611 -0
  403. package/src/widgets/form/FieldGroup.ts +10 -0
  404. package/src/widgets/form/FieldIcon.ts +61 -0
  405. package/src/widgets/form/HelpText.scss +5 -4
  406. package/src/widgets/form/HelpText.ts +15 -0
  407. package/src/widgets/form/Label.scss +5 -4
  408. package/src/widgets/form/Label.tsx +116 -0
  409. package/src/widgets/form/LabeledContainer.ts +81 -0
  410. package/src/widgets/form/LookupField.scss +5 -3
  411. package/src/widgets/form/LookupField.tsx +1326 -0
  412. package/src/widgets/form/MonthField.scss +4 -3
  413. package/src/widgets/form/MonthField.tsx +665 -0
  414. package/src/widgets/form/MonthPicker.scss +8 -5
  415. package/src/widgets/form/MonthPicker.tsx +822 -0
  416. package/src/widgets/form/NumberField.scss +5 -3
  417. package/src/widgets/form/NumberField.tsx +540 -0
  418. package/src/widgets/form/Radio.scss +5 -3
  419. package/src/widgets/form/Radio.tsx +245 -0
  420. package/src/widgets/form/Radio.variables.scss +45 -45
  421. package/src/widgets/form/Select.scss +6 -4
  422. package/src/widgets/form/Select.tsx +322 -0
  423. package/src/widgets/form/Slider.scss +6 -3
  424. package/src/widgets/form/Slider.tsx +461 -0
  425. package/src/widgets/form/Switch.scss +5 -3
  426. package/src/widgets/form/Switch.tsx +174 -0
  427. package/src/widgets/form/TextArea.scss +6 -4
  428. package/src/widgets/form/TextArea.tsx +229 -0
  429. package/src/widgets/form/TextField.scss +6 -4
  430. package/src/widgets/form/TextField.tsx +345 -0
  431. package/src/widgets/form/TimeField.ts +10 -0
  432. package/src/widgets/form/TimeList.tsx +94 -0
  433. package/src/widgets/form/UploadButton.scss +5 -3
  434. package/src/widgets/form/UploadButton.tsx +256 -0
  435. package/src/widgets/form/ValidationError.scss +4 -3
  436. package/src/widgets/form/ValidationError.tsx +72 -0
  437. package/src/widgets/form/ValidationGroup.spec.tsx +147 -0
  438. package/src/widgets/form/ValidationGroup.ts +141 -0
  439. package/src/widgets/form/Validator.ts +23 -0
  440. package/src/widgets/form/Wheel.scss +9 -7
  441. package/src/widgets/form/Wheel.tsx +315 -0
  442. package/src/widgets/form/index.scss +24 -24
  443. package/src/widgets/form/variables.scss +3 -1
  444. package/src/widgets/grid/Grid.scss +6 -4
  445. package/src/widgets/grid/Grid.tsx +4247 -0
  446. package/src/widgets/grid/GridCell.ts +143 -0
  447. package/src/widgets/grid/GridCellEditor.tsx +52 -0
  448. package/src/widgets/grid/GridRow.ts +302 -0
  449. package/src/widgets/grid/GridRowLine.ts +49 -0
  450. package/src/widgets/grid/Pagination.scss +5 -3
  451. package/src/widgets/grid/Pagination.tsx +126 -0
  452. package/src/widgets/grid/TreeNode.scss +6 -4
  453. package/src/widgets/grid/TreeNode.tsx +145 -0
  454. package/src/widgets/grid/createGridCellEditor.tsx +18 -0
  455. package/src/widgets/grid/index.scss +3 -3
  456. package/src/widgets/grid/index.ts +17 -0
  457. package/src/widgets/grid/variables.scss +8 -4
  458. package/src/widgets/icons/arrow-down.svg +3 -3
  459. package/src/widgets/icons/arrow-right.svg +2 -2
  460. package/src/widgets/icons/base.svg +104 -104
  461. package/src/widgets/icons/calendar-old.svg +169 -169
  462. package/src/widgets/icons/calendar.svg +187 -187
  463. package/src/widgets/icons/calendar.tsx +17 -0
  464. package/src/widgets/icons/check.tsx +13 -0
  465. package/src/widgets/icons/clear.svg +74 -74
  466. package/src/widgets/icons/clear.tsx +15 -0
  467. package/src/widgets/icons/close.svg +74 -74
  468. package/src/widgets/icons/close.tsx +20 -0
  469. package/src/widgets/icons/cx.tsx +38 -0
  470. package/src/widgets/icons/drop-down.tsx +15 -0
  471. package/src/widgets/icons/dropdown-arrow.svg +61 -61
  472. package/src/widgets/icons/file.svg +4 -4
  473. package/src/widgets/icons/file.tsx +13 -0
  474. package/src/widgets/icons/folder-open.svg +5 -5
  475. package/src/widgets/icons/folder-open.tsx +15 -0
  476. package/src/widgets/icons/folder.svg +58 -58
  477. package/src/widgets/icons/folder.tsx +13 -0
  478. package/src/widgets/icons/forward.svg +67 -67
  479. package/src/widgets/icons/forward.tsx +22 -0
  480. package/src/widgets/icons/loading.svg +4 -4
  481. package/src/widgets/icons/loading.tsx +24 -0
  482. package/src/widgets/icons/menu.tsx +17 -0
  483. package/src/widgets/icons/pixel-picker.tsx +18 -0
  484. package/src/widgets/icons/registry.ts +57 -0
  485. package/src/widgets/icons/search.svg +107 -107
  486. package/src/widgets/icons/search.tsx +13 -0
  487. package/src/widgets/icons/sort-asc.svg +3 -3
  488. package/src/widgets/icons/sort-asc.tsx +14 -0
  489. package/src/widgets/icons/square.tsx +18 -0
  490. package/src/widgets/index.d.ts +55 -55
  491. package/src/widgets/index.scss +16 -16
  492. package/src/widgets/nav/Link.scss +5 -3
  493. package/src/widgets/nav/Link.ts +12 -0
  494. package/src/widgets/nav/LinkButton.ts +176 -0
  495. package/src/widgets/nav/Menu.scss +7 -5
  496. package/src/widgets/nav/Menu.tsx +489 -0
  497. package/src/widgets/nav/Menu.variables.scss +3 -1
  498. package/src/widgets/nav/MenuItem.scss +6 -4
  499. package/src/widgets/nav/MenuItem.tsx +523 -0
  500. package/src/widgets/nav/MenuSpacer.ts +19 -0
  501. package/src/widgets/nav/RedirectRoute.ts +50 -0
  502. package/src/widgets/nav/Route.spec.tsx +24 -0
  503. package/src/widgets/nav/Route.ts +142 -0
  504. package/src/widgets/nav/Scroller.scss +5 -3
  505. package/src/widgets/nav/Scroller.tsx +253 -0
  506. package/src/widgets/nav/Submenu.ts +6 -0
  507. package/src/widgets/nav/Tab.scss +5 -4
  508. package/src/widgets/nav/Tab.ts +120 -0
  509. package/src/widgets/nav/Tab.variables.scss +84 -84
  510. package/src/widgets/nav/cover.scss +5 -4
  511. package/src/widgets/nav/index.scss +5 -5
  512. package/src/widgets/nav/variables.scss +3 -1
  513. package/src/widgets/overlay/ContextMenu.ts +42 -0
  514. package/src/widgets/overlay/Dropdown.scss +11 -9
  515. package/src/widgets/overlay/Dropdown.tsx +762 -0
  516. package/src/widgets/overlay/FlyweightTooltipTracker.ts +57 -0
  517. package/src/widgets/overlay/MsgBox.tsx +141 -0
  518. package/src/widgets/overlay/Overlay.scss +5 -3
  519. package/src/widgets/overlay/Overlay.tsx +942 -0
  520. package/src/widgets/overlay/Toast.scss +8 -7
  521. package/src/widgets/overlay/Toast.ts +111 -0
  522. package/src/widgets/overlay/Tooltip.scss +6 -4
  523. package/src/widgets/overlay/Tooltip.tsx +393 -0
  524. package/src/widgets/overlay/Window.scss +6 -4
  525. package/src/widgets/overlay/Window.tsx +299 -0
  526. package/src/widgets/overlay/Window.variables.scss +62 -62
  527. package/src/widgets/overlay/alerts.ts +46 -0
  528. package/src/widgets/overlay/captureMouse.scss +13 -13
  529. package/src/widgets/overlay/captureMouse.ts +195 -0
  530. package/src/widgets/overlay/createHotPromiseWindowFactory.ts +72 -0
  531. package/src/widgets/overlay/index.scss +15 -15
  532. package/src/widgets/overlay/index.ts +11 -0
  533. package/src/widgets/overlay/tooltip-ops.ts +173 -0
  534. package/src/widgets/overlay/variables.scss +3 -1
  535. package/src/widgets/variables.scss +3 -1
  536. package/tsconfig.compile.json +4 -0
  537. package/tsconfig.json +34 -0
  538. package/tsconfig.mocha.json +14 -0
  539. package/charts.d.ts +0 -1
  540. package/charts.js +0 -1
  541. package/data.d.ts +0 -1
  542. package/data.js +0 -1
  543. package/hooks.d.ts +0 -1
  544. package/hooks.js +0 -1
  545. package/index.js +0 -17
  546. package/locale/de-de.js +0 -75
  547. package/locale/en-us.js +0 -75
  548. package/locale/es-es.js +0 -75
  549. package/locale/fr-fr.js +0 -75
  550. package/locale/nl-nl.js +0 -75
  551. package/locale/pt-pt.js +0 -75
  552. package/locale/sr-latn-ba.js +0 -75
  553. package/manifest.js +0 -1
  554. package/src/charts/Bar.d.ts +0 -28
  555. package/src/charts/Bar.js +0 -90
  556. package/src/charts/BarGraph.d.ts +0 -15
  557. package/src/charts/BarGraph.js +0 -112
  558. package/src/charts/BubbleGraph.js +0 -93
  559. package/src/charts/Chart.d.ts +0 -12
  560. package/src/charts/Chart.js +0 -75
  561. package/src/charts/ColorMap.d.ts +0 -21
  562. package/src/charts/ColorMap.js +0 -97
  563. package/src/charts/Column.d.ts +0 -29
  564. package/src/charts/Column.js +0 -88
  565. package/src/charts/ColumnBarBase.d.ts +0 -64
  566. package/src/charts/ColumnBarBase.js +0 -176
  567. package/src/charts/ColumnBarGraphBase.d.ts +0 -73
  568. package/src/charts/ColumnBarGraphBase.js +0 -114
  569. package/src/charts/ColumnGraph.d.ts +0 -18
  570. package/src/charts/ColumnGraph.js +0 -120
  571. package/src/charts/Grid.js +0 -5
  572. package/src/charts/Gridlines.d.ts +0 -25
  573. package/src/charts/Gridlines.js +0 -49
  574. package/src/charts/Legend.d.ts +0 -45
  575. package/src/charts/Legend.js +0 -187
  576. package/src/charts/LegendEntry.d.ts +0 -54
  577. package/src/charts/LegendEntry.js +0 -128
  578. package/src/charts/LineGraph.d.ts +0 -101
  579. package/src/charts/LineGraph.js +0 -300
  580. package/src/charts/Marker.d.ts +0 -110
  581. package/src/charts/Marker.js +0 -311
  582. package/src/charts/MarkerLine.d.ts +0 -56
  583. package/src/charts/MarkerLine.js +0 -128
  584. package/src/charts/MouseTracker.d.ts +0 -17
  585. package/src/charts/MouseTracker.js +0 -81
  586. package/src/charts/Pie.js +0 -8
  587. package/src/charts/PieChart.d.ts +0 -92
  588. package/src/charts/PieChart.js +0 -530
  589. package/src/charts/PieLabel.d.ts +0 -26
  590. package/src/charts/PieLabel.js +0 -71
  591. package/src/charts/PieLabelsContainer.d.ts +0 -6
  592. package/src/charts/PieLabelsContainer.js +0 -55
  593. package/src/charts/Range.d.ts +0 -75
  594. package/src/charts/Range.js +0 -206
  595. package/src/charts/RangeMarker.d.ts +0 -35
  596. package/src/charts/RangeMarker.js +0 -159
  597. package/src/charts/ScatterGraph.d.ts +0 -64
  598. package/src/charts/ScatterGraph.js +0 -164
  599. package/src/charts/Swimlane.d.ts +0 -24
  600. package/src/charts/Swimlane.js +0 -140
  601. package/src/charts/Swimlanes.d.ts +0 -41
  602. package/src/charts/Swimlanes.js +0 -114
  603. package/src/charts/axis/Axis.d.ts +0 -113
  604. package/src/charts/axis/Axis.js +0 -288
  605. package/src/charts/axis/CategoryAxis.d.ts +0 -30
  606. package/src/charts/axis/CategoryAxis.js +0 -241
  607. package/src/charts/axis/NumericAxis.d.ts +0 -46
  608. package/src/charts/axis/NumericAxis.js +0 -351
  609. package/src/charts/axis/Stack.d.ts +0 -11
  610. package/src/charts/axis/Stack.js +0 -55
  611. package/src/charts/axis/TimeAxis.d.ts +0 -31
  612. package/src/charts/axis/TimeAxis.js +0 -611
  613. package/src/charts/axis/index.d.ts +0 -4
  614. package/src/charts/axis/index.js +0 -4
  615. package/src/charts/helpers/MinMaxFinder.d.ts +0 -22
  616. package/src/charts/helpers/MinMaxFinder.js +0 -36
  617. package/src/charts/helpers/PointReducer.d.ts +0 -24
  618. package/src/charts/helpers/PointReducer.js +0 -61
  619. package/src/charts/helpers/SnapPointFinder.d.ts +0 -30
  620. package/src/charts/helpers/SnapPointFinder.js +0 -69
  621. package/src/charts/helpers/ValueAtFinder.d.ts +0 -16
  622. package/src/charts/helpers/ValueAtFinder.js +0 -46
  623. package/src/charts/helpers/index.d.ts +0 -4
  624. package/src/charts/helpers/index.js +0 -4
  625. package/src/charts/index.d.ts +0 -27
  626. package/src/charts/shapes.d.ts +0 -23
  627. package/src/charts/shapes.js +0 -79
  628. package/src/data/AggregateFunction.d.ts +0 -20
  629. package/src/data/AggregateFunction.js +0 -145
  630. package/src/data/ArrayElementView.d.ts +0 -13
  631. package/src/data/ArrayElementView.js +0 -64
  632. package/src/data/ArrayElementView.spec.js +0 -88
  633. package/src/data/ArrayRef.d.ts +0 -15
  634. package/src/data/ArrayRef.js +0 -35
  635. package/src/data/AugmentedViewBase.d.ts +0 -18
  636. package/src/data/AugmentedViewBase.js +0 -77
  637. package/src/data/Binding.d.ts +0 -19
  638. package/src/data/Binding.js +0 -76
  639. package/src/data/ExposedRecordView.d.ts +0 -14
  640. package/src/data/ExposedRecordView.js +0 -75
  641. package/src/data/ExposedValueView.d.ts +0 -19
  642. package/src/data/ExposedValueView.js +0 -73
  643. package/src/data/Expression.d.ts +0 -17
  644. package/src/data/Expression.js +0 -229
  645. package/src/data/Expression.spec.js +0 -229
  646. package/src/data/Grouper.d.ts +0 -21
  647. package/src/data/Grouper.js +0 -144
  648. package/src/data/Grouper.spec.js +0 -57
  649. package/src/data/NestedDataView.d.ts +0 -19
  650. package/src/data/NestedDataView.js +0 -22
  651. package/src/data/ReadOnlyDataView.d.ts +0 -14
  652. package/src/data/ReadOnlyDataView.js +0 -27
  653. package/src/data/Ref.d.ts +0 -24
  654. package/src/data/Ref.js +0 -79
  655. package/src/data/Ref.spec.js +0 -79
  656. package/src/data/Store.d.ts +0 -14
  657. package/src/data/Store.js +0 -46
  658. package/src/data/Store.spec.js +0 -22
  659. package/src/data/StoreProxy.d.ts +0 -5
  660. package/src/data/StoreProxy.js +0 -17
  661. package/src/data/StoreRef.js +0 -54
  662. package/src/data/StoreRef.spec.js +0 -24
  663. package/src/data/StringTemplate.d.ts +0 -15
  664. package/src/data/StringTemplate.js +0 -92
  665. package/src/data/StringTemplate.spec.js +0 -132
  666. package/src/data/StructuredDataAccessor.d.ts +0 -7
  667. package/src/data/StructuredSelector.d.ts +0 -17
  668. package/src/data/StructuredSelector.js +0 -132
  669. package/src/data/StructuredSelector.spec.js +0 -113
  670. package/src/data/SubscribableView.d.ts +0 -11
  671. package/src/data/SubscribableView.js +0 -54
  672. package/src/data/View.d.ts +0 -155
  673. package/src/data/View.js +0 -182
  674. package/src/data/ZoomIntoPropertyView.d.ts +0 -11
  675. package/src/data/ZoomIntoPropertyView.js +0 -33
  676. package/src/data/ZoomIntoPropertyView.spec.js +0 -65
  677. package/src/data/comparer.d.ts +0 -7
  678. package/src/data/comparer.js +0 -54
  679. package/src/data/computable.d.ts +0 -125
  680. package/src/data/computable.js +0 -56
  681. package/src/data/computable.spec.js +0 -55
  682. package/src/data/createAccessorModelProxy.d.ts +0 -6
  683. package/src/data/createAccessorModelProxy.js +0 -43
  684. package/src/data/createStructuredSelector.d.ts +0 -3
  685. package/src/data/createStructuredSelector.js +0 -43
  686. package/src/data/createStructuredSelector.spec.js +0 -46
  687. package/src/data/defaultCompare.d.ts +0 -1
  688. package/src/data/defaultCompare.js +0 -15
  689. package/src/data/diff/diffArrays.d.ts +0 -15
  690. package/src/data/diff/diffArrays.js +0 -41
  691. package/src/data/diff/diffs.spec.js +0 -49
  692. package/src/data/diff/index.d.ts +0 -1
  693. package/src/data/diff/index.js +0 -1
  694. package/src/data/enableFatArrowExpansion.d.ts +0 -1
  695. package/src/data/enableFatArrowExpansion.js +0 -6
  696. package/src/data/getAccessor.d.ts +0 -9
  697. package/src/data/getAccessor.js +0 -61
  698. package/src/data/getAccessor.spec.js +0 -11
  699. package/src/data/getSelector.d.ts +0 -3
  700. package/src/data/getSelector.js +0 -49
  701. package/src/data/getSelector.spec.js +0 -43
  702. package/src/data/index.d.ts +0 -30
  703. package/src/data/index.js +0 -29
  704. package/src/data/isSelector.d.ts +0 -1
  705. package/src/data/isSelector.js +0 -26
  706. package/src/data/ops/append.d.ts +0 -1
  707. package/src/data/ops/append.js +0 -7
  708. package/src/data/ops/append.spec.js +0 -28
  709. package/src/data/ops/filter.d.ts +0 -1
  710. package/src/data/ops/filter.js +0 -8
  711. package/src/data/ops/filter.spec.js +0 -29
  712. package/src/data/ops/findTreeNode.d.ts +0 -1
  713. package/src/data/ops/findTreeNode.js +0 -15
  714. package/src/data/ops/findTreeNode.spec.js +0 -24
  715. package/src/data/ops/findTreePath.d.ts +0 -6
  716. package/src/data/ops/findTreePath.js +0 -16
  717. package/src/data/ops/index.d.ts +0 -10
  718. package/src/data/ops/insertElement.d.ts +0 -1
  719. package/src/data/ops/insertElement.js +0 -3
  720. package/src/data/ops/merge.d.ts +0 -3
  721. package/src/data/ops/merge.js +0 -9
  722. package/src/data/ops/merge.spec.js +0 -27
  723. package/src/data/ops/moveElement.d.ts +0 -1
  724. package/src/data/ops/moveElement.js +0 -14
  725. package/src/data/ops/removeTreeNodes.d.ts +0 -5
  726. package/src/data/ops/removeTreeNodes.js +0 -5
  727. package/src/data/ops/removeTreeNodes.spec.js +0 -28
  728. package/src/data/ops/updateArray.d.ts +0 -6
  729. package/src/data/ops/updateArray.js +0 -24
  730. package/src/data/ops/updateArray.spec.js +0 -38
  731. package/src/data/ops/updateTree.d.ts +0 -7
  732. package/src/data/ops/updateTree.js +0 -25
  733. package/src/data/ops/updateTree.spec.js +0 -36
  734. package/src/hooks/createLocalStorageRef.d.ts +0 -3
  735. package/src/hooks/createLocalStorageRef.js +0 -20
  736. package/src/hooks/index.js +0 -8
  737. package/src/hooks/invokeCallback.d.ts +0 -5
  738. package/src/hooks/invokeCallback.js +0 -7
  739. package/src/hooks/invokeCallback.spec.js +0 -53
  740. package/src/hooks/resolveCallback.d.ts +0 -3
  741. package/src/hooks/resolveCallback.js +0 -12
  742. package/src/hooks/resolveCallback.spec.js +0 -54
  743. package/src/hooks/store.d.ts +0 -8
  744. package/src/hooks/store.js +0 -32
  745. package/src/hooks/store.spec.js +0 -73
  746. package/src/hooks/useEffect.d.ts +0 -3
  747. package/src/hooks/useEffect.js +0 -15
  748. package/src/hooks/useInterval.d.ts +0 -1
  749. package/src/hooks/useInterval.js +0 -8
  750. package/src/hooks/useState.d.ts +0 -3
  751. package/src/hooks/useState.js +0 -16
  752. package/src/hooks/useTrigger.d.ts +0 -5
  753. package/src/hooks/useTrigger.js +0 -20
  754. package/src/hooks/useTrigger.spec.js +0 -102
  755. package/src/svg/BoundedObject.d.ts +0 -23
  756. package/src/svg/BoundedObject.js +0 -59
  757. package/src/svg/ClipRect.d.ts +0 -5
  758. package/src/svg/ClipRect.js +0 -23
  759. package/src/svg/Ellipse.d.ts +0 -24
  760. package/src/svg/Ellipse.js +0 -37
  761. package/src/svg/Line.d.ts +0 -21
  762. package/src/svg/Line.js +0 -33
  763. package/src/svg/NonOverlappingRect.d.ts +0 -5
  764. package/src/svg/NonOverlappingRect.js +0 -15
  765. package/src/svg/NonOverlappingRectGroup.d.ts +0 -3
  766. package/src/svg/NonOverlappingRectGroup.js +0 -37
  767. package/src/svg/Rectangle.d.ts +0 -37
  768. package/src/svg/Rectangle.js +0 -42
  769. package/src/svg/Svg.d.ts +0 -32
  770. package/src/svg/Svg.js +0 -177
  771. package/src/svg/Text.d.ts +0 -40
  772. package/src/svg/Text.js +0 -78
  773. package/src/svg/TextualBoundedObject.d.ts +0 -7
  774. package/src/svg/TextualBoundedObject.js +0 -28
  775. package/src/svg/index.d.ts +0 -11
  776. package/src/svg/util/Rect.d.ts +0 -41
  777. package/src/svg/util/Rect.js +0 -109
  778. package/src/svg/util/index.js +0 -1
  779. package/src/ui/CSS.d.ts +0 -20
  780. package/src/ui/CSS.js +0 -79
  781. package/src/ui/CSSHelper.d.ts +0 -11
  782. package/src/ui/CSSHelper.js +0 -18
  783. package/src/ui/Container.d.ts +0 -18
  784. package/src/ui/Container.js +0 -154
  785. package/src/ui/ContentResolver.d.ts +0 -12
  786. package/src/ui/ContentResolver.js +0 -78
  787. package/src/ui/Controller.d.ts +0 -182
  788. package/src/ui/Controller.js +0 -114
  789. package/src/ui/Controller.spec.js +0 -415
  790. package/src/ui/Culture.d.ts +0 -57
  791. package/src/ui/Culture.js +0 -139
  792. package/src/ui/Cx.d.ts +0 -18
  793. package/src/ui/Cx.js +0 -325
  794. package/src/ui/Cx.spec.js +0 -194
  795. package/src/ui/DataProxy.d.ts +0 -12
  796. package/src/ui/DataProxy.js +0 -31
  797. package/src/ui/DataProxy.spec.js +0 -338
  798. package/src/ui/DetachedScope.d.ts +0 -21
  799. package/src/ui/DetachedScope.js +0 -98
  800. package/src/ui/FocusManager.d.ts +0 -29
  801. package/src/ui/FocusManager.js +0 -171
  802. package/src/ui/Format.d.ts +0 -3
  803. package/src/ui/Format.js +0 -108
  804. package/src/ui/HoverSync.d.ts +0 -13
  805. package/src/ui/HoverSync.js +0 -147
  806. package/src/ui/Instance.d.ts +0 -72
  807. package/src/ui/Instance.js +0 -620
  808. package/src/ui/IsolatedScope.d.ts +0 -16
  809. package/src/ui/IsolatedScope.js +0 -30
  810. package/src/ui/IsolatedScope.spec.js +0 -62
  811. package/src/ui/Localization.d.ts +0 -17
  812. package/src/ui/Localization.js +0 -70
  813. package/src/ui/PureContainer.d.ts +0 -16
  814. package/src/ui/PureContainer.js +0 -7
  815. package/src/ui/RenderingContext.d.ts +0 -9
  816. package/src/ui/RenderingContext.js +0 -88
  817. package/src/ui/Repeater.d.ts +0 -61
  818. package/src/ui/Repeater.js +0 -109
  819. package/src/ui/Repeater.spec.js +0 -143
  820. package/src/ui/Rescope.d.ts +0 -10
  821. package/src/ui/Rescope.js +0 -35
  822. package/src/ui/Rescope.spec.js +0 -195
  823. package/src/ui/ResizeManager.d.ts +0 -10
  824. package/src/ui/ResizeManager.js +0 -31
  825. package/src/ui/Restate.d.ts +0 -21
  826. package/src/ui/Restate.js +0 -167
  827. package/src/ui/Restate.spec.js +0 -422
  828. package/src/ui/StaticText.d.ts +0 -8
  829. package/src/ui/StaticText.js +0 -9
  830. package/src/ui/StructuredInstanceDataAccessor.d.ts +0 -16
  831. package/src/ui/StructuredInstanceDataAccessor.js +0 -26
  832. package/src/ui/Text.d.ts +0 -10
  833. package/src/ui/Text.js +0 -25
  834. package/src/ui/VDOM.d.ts +0 -12
  835. package/src/ui/VDOM.js +0 -2
  836. package/src/ui/Widget.d.ts +0 -14
  837. package/src/ui/Widget.js +0 -184
  838. package/src/ui/ZIndexManager.d.ts +0 -7
  839. package/src/ui/ZIndexManager.js +0 -11
  840. package/src/ui/adapter/ArrayAdapter.d.ts +0 -17
  841. package/src/ui/adapter/ArrayAdapter.js +0 -152
  842. package/src/ui/adapter/ArrayAdapter.spec.js +0 -55
  843. package/src/ui/adapter/DataAdapter.d.ts +0 -31
  844. package/src/ui/adapter/DataAdapter.js +0 -15
  845. package/src/ui/adapter/GroupAdapter.d.ts +0 -23
  846. package/src/ui/adapter/GroupAdapter.js +0 -140
  847. package/src/ui/adapter/TreeAdapter.d.ts +0 -24
  848. package/src/ui/adapter/TreeAdapter.js +0 -101
  849. package/src/ui/adapter/TreeAdapter.spec.js +0 -67
  850. package/src/ui/adapter/index.js +0 -4
  851. package/src/ui/app/History.d.ts +0 -17
  852. package/src/ui/app/History.js +0 -114
  853. package/src/ui/app/Url.d.ts +0 -21
  854. package/src/ui/app/Url.js +0 -103
  855. package/src/ui/app/Url.spec.js +0 -51
  856. package/src/ui/app/index.d.ts +0 -4
  857. package/src/ui/app/startAppLoop.d.ts +0 -4
  858. package/src/ui/app/startAppLoop.js +0 -58
  859. package/src/ui/app/startHotAppLoop.d.ts +0 -7
  860. package/src/ui/app/startHotAppLoop.js +0 -25
  861. package/src/ui/batchUpdates.d.ts +0 -11
  862. package/src/ui/batchUpdates.js +0 -67
  863. package/src/ui/bind.d.ts +0 -4
  864. package/src/ui/bind.js +0 -7
  865. package/src/ui/createFunctionalComponent.d.ts +0 -1
  866. package/src/ui/createFunctionalComponent.js +0 -63
  867. package/src/ui/createFunctionalComponent.spec.js +0 -400
  868. package/src/ui/expr.d.ts +0 -24
  869. package/src/ui/expr.js +0 -17
  870. package/src/ui/flattenProps.js +0 -21
  871. package/src/ui/index.d.ts +0 -42
  872. package/src/ui/index.js +0 -44
  873. package/src/ui/keyboardShortcuts.d.ts +0 -5
  874. package/src/ui/keyboardShortcuts.js +0 -31
  875. package/src/ui/layout/Content.d.ts +0 -14
  876. package/src/ui/layout/Content.js +0 -16
  877. package/src/ui/layout/ContentPlaceholder.d.ts +0 -19
  878. package/src/ui/layout/ContentPlaceholder.js +0 -105
  879. package/src/ui/layout/ContentPlaceholder.spec.js +0 -579
  880. package/src/ui/layout/FirstVisibleChildLayout.d.ts +0 -4
  881. package/src/ui/layout/FirstVisibleChildLayout.js +0 -66
  882. package/src/ui/layout/FirstVisibleChildLayout.spec.js +0 -196
  883. package/src/ui/layout/LabelsLeftLayout.d.ts +0 -11
  884. package/src/ui/layout/LabelsLeftLayout.js +0 -59
  885. package/src/ui/layout/LabelsTopLayout.d.ts +0 -15
  886. package/src/ui/layout/LabelsTopLayout.js +0 -135
  887. package/src/ui/layout/UseParentLayout.d.ts +0 -4
  888. package/src/ui/layout/UseParentLayout.js +0 -6
  889. package/src/ui/layout/exploreChildren.d.ts +0 -12
  890. package/src/ui/layout/exploreChildren.js +0 -27
  891. package/src/ui/layout/index.js +0 -10
  892. package/src/ui/selection/KeySelection.d.ts +0 -17
  893. package/src/ui/selection/KeySelection.js +0 -129
  894. package/src/ui/selection/PropertySelection.d.ts +0 -17
  895. package/src/ui/selection/PropertySelection.js +0 -55
  896. package/src/ui/selection/Selection.d.ts +0 -27
  897. package/src/ui/selection/Selection.js +0 -93
  898. package/src/ui/selection/index.js +0 -3
  899. package/src/ui/tpl.d.ts +0 -3
  900. package/src/ui/tpl.js +0 -5
  901. package/src/util/Component.d.ts +0 -42
  902. package/src/util/Component.js +0 -108
  903. package/src/util/Console.d.ts +0 -4
  904. package/src/util/Console.js +0 -11
  905. package/src/util/DOM.d.ts +0 -33
  906. package/src/util/DOM.js +0 -72
  907. package/src/util/Debug.d.ts +0 -11
  908. package/src/util/Debug.js +0 -45
  909. package/src/util/Format.d.ts +0 -18
  910. package/src/util/Format.js +0 -270
  911. package/src/util/Format.spec.js +0 -69
  912. package/src/util/GlobalCacheIdentifier.js +0 -11
  913. package/src/util/GlobalCacheldentifier.d.ts +0 -7
  914. package/src/util/KeyCode.d.ts +0 -21
  915. package/src/util/KeyCode.js +0 -21
  916. package/src/util/SubscriberList.d.ts +0 -42
  917. package/src/util/SubscriberList.js +0 -58
  918. package/src/util/Timing.d.ts +0 -14
  919. package/src/util/Timing.js +0 -58
  920. package/src/util/TraversalStack.js +0 -43
  921. package/src/util/TraversalStack.spec.js +0 -47
  922. package/src/util/addEventListenerWithOptions.d.ts +0 -6
  923. package/src/util/addEventListenerWithOptions.js +0 -9
  924. package/src/util/browserSupportsPassiveEventHandlers.d.ts +0 -5
  925. package/src/util/browserSupportsPassiveEventHandlers.js +0 -18
  926. package/src/util/calculateNaturalElementHeight.d.ts +0 -1
  927. package/src/util/calculateNaturalElementHeight.js +0 -22
  928. package/src/util/capitalize.d.ts +0 -1
  929. package/src/util/capitalize.js +0 -4
  930. package/src/util/coalesce.d.ts +0 -1
  931. package/src/util/coalesce.js +0 -6
  932. package/src/util/color/hslToRgb.d.ts +0 -9
  933. package/src/util/color/hslToRgb.js +0 -27
  934. package/src/util/color/index.d.ts +0 -4
  935. package/src/util/color/parseColor.d.ts +0 -60
  936. package/src/util/color/parseColor.js +0 -119
  937. package/src/util/color/rgbToHex.d.ts +0 -9
  938. package/src/util/color/rgbToHex.js +0 -8
  939. package/src/util/color/rgbToHsl.d.ts +0 -9
  940. package/src/util/color/rgbToHsl.js +0 -28
  941. package/src/util/date/dateDiff.d.ts +0 -8
  942. package/src/util/date/dateDiff.js +0 -3
  943. package/src/util/date/diff.d.ts +0 -8
  944. package/src/util/date/diff.js +0 -7
  945. package/src/util/date/encodeDate.d.ts +0 -1
  946. package/src/util/date/encodeDate.js +0 -8
  947. package/src/util/date/encodeDateWithTimezoneOffset.d.ts +0 -1
  948. package/src/util/date/encodeDateWithTimezoneOffset.js +0 -19
  949. package/src/util/date/index.js +0 -11
  950. package/src/util/date/lowerBoundCheck.d.ts +0 -8
  951. package/src/util/date/lowerBoundCheck.js +0 -6
  952. package/src/util/date/maxDate.d.ts +0 -6
  953. package/src/util/date/maxDate.js +0 -9
  954. package/src/util/date/minDate.d.ts +0 -6
  955. package/src/util/date/minDate.js +0 -9
  956. package/src/util/date/monthStart.d.ts +0 -6
  957. package/src/util/date/monthStart.js +0 -3
  958. package/src/util/date/parseDateInvariant.d.ts +0 -3
  959. package/src/util/date/parseDateInvariant.js +0 -20
  960. package/src/util/date/sameDate.d.ts +0 -7
  961. package/src/util/date/sameDate.js +0 -5
  962. package/src/util/date/upperBoundCheck.d.ts +0 -8
  963. package/src/util/date/upperBoundCheck.js +0 -6
  964. package/src/util/date/zeroTime.d.ts +0 -7
  965. package/src/util/date/zeroTime.js +0 -3
  966. package/src/util/debounce.d.ts +0 -9
  967. package/src/util/debounce.js +0 -18
  968. package/src/util/dummyCallback.d.ts +0 -1
  969. package/src/util/dummyCallback.js +0 -1
  970. package/src/util/escapeSpecialRegexCharacters.d.ts +0 -7
  971. package/src/util/escapeSpecialRegexCharacters.js +0 -3
  972. package/src/util/eventCallbacks.d.ts +0 -5
  973. package/src/util/eventCallbacks.js +0 -2
  974. package/src/util/expandFatArrows.d.ts +0 -1
  975. package/src/util/expandFatArrows.js +0 -118
  976. package/src/util/findScrollableParent.d.ts +0 -1
  977. package/src/util/findScrollableParent.js +0 -16
  978. package/src/util/getActiveElement.d.ts +0 -1
  979. package/src/util/getActiveElement.js +0 -4
  980. package/src/util/getParentFrameBoundingClientRect.d.ts +0 -1
  981. package/src/util/getParentFrameBoundingClientRect.js +0 -21
  982. package/src/util/getScrollerBoundingClientRect.d.ts +0 -1
  983. package/src/util/getScrollerBoundingClientRect.js +0 -22
  984. package/src/util/getSearchQueryPredicate.d.ts +0 -1
  985. package/src/util/getSearchQueryPredicate.js +0 -59
  986. package/src/util/getTopLevelBoundingClientRect.d.ts +0 -1
  987. package/src/util/getTopLevelBoundingClientRect.js +0 -14
  988. package/src/util/getVendorPrefix.d.ts +0 -1
  989. package/src/util/getVendorPrefix.js +0 -26
  990. package/src/util/index.d.ts +0 -51
  991. package/src/util/index.js +0 -54
  992. package/src/util/innerTextTrim.d.ts +0 -7
  993. package/src/util/innerTextTrim.js +0 -5
  994. package/src/util/isArray.d.ts +0 -1
  995. package/src/util/isArray.js +0 -3
  996. package/src/util/isDefined.d.ts +0 -1
  997. package/src/util/isDefined.js +0 -3
  998. package/src/util/isDigit.d.ts +0 -7
  999. package/src/util/isDigit.js +0 -3
  1000. package/src/util/isFunction.d.ts +0 -1
  1001. package/src/util/isFunction.js +0 -3
  1002. package/src/util/isNonEmptyArray.d.ts +0 -1
  1003. package/src/util/isNonEmptyArray.js +0 -3
  1004. package/src/util/isNumber.d.ts +0 -1
  1005. package/src/util/isNumber.js +0 -3
  1006. package/src/util/isObject.d.ts +0 -1
  1007. package/src/util/isObject.js +0 -3
  1008. package/src/util/isPromise.d.ts +0 -1
  1009. package/src/util/isPromise.js +0 -6
  1010. package/src/util/isString.d.ts +0 -1
  1011. package/src/util/isString.js +0 -3
  1012. package/src/util/isTextInputElement.d.ts +0 -1
  1013. package/src/util/isTextInputElement.js +0 -3
  1014. package/src/util/isTouchDevice.d.ts +0 -2
  1015. package/src/util/isTouchDevice.js +0 -7
  1016. package/src/util/isTouchEvent.d.ts +0 -4
  1017. package/src/util/isTouchEvent.js +0 -64
  1018. package/src/util/isUndefined.d.ts +0 -1
  1019. package/src/util/isUndefined.js +0 -3
  1020. package/src/util/isValidIdentifierName.d.ts +0 -1
  1021. package/src/util/isValidIdentifierName.js +0 -5
  1022. package/src/util/onIdleCallback.d.ts +0 -1
  1023. package/src/util/onIdleCallback.js +0 -14
  1024. package/src/util/parseStyle.d.ts +0 -4
  1025. package/src/util/parseStyle.js +0 -27
  1026. package/src/util/quote.d.ts +0 -3
  1027. package/src/util/quote.js +0 -4
  1028. package/src/util/reverseSlice.d.ts +0 -1
  1029. package/src/util/reverseSlice.js +0 -10
  1030. package/src/util/routeAppend.d.ts +0 -1
  1031. package/src/util/routeAppend.js +0 -16
  1032. package/src/util/scrollElementIntoView.d.ts +0 -7
  1033. package/src/util/scrollElementIntoView.js +0 -34
  1034. package/src/util/shallowEquals.d.ts +0 -1
  1035. package/src/util/shallowEquals.js +0 -43
  1036. package/src/util/throttle.d.ts +0 -9
  1037. package/src/util/throttle.js +0 -14
  1038. package/src/util/validatedDebounce.js +0 -19
  1039. package/src/widgets/Button.d.ts +0 -58
  1040. package/src/widgets/Button.js +0 -118
  1041. package/src/widgets/CxCredit.d.ts +0 -12
  1042. package/src/widgets/CxCredit.js +0 -32
  1043. package/src/widgets/DocumentTitle.d.ts +0 -11
  1044. package/src/widgets/DocumentTitle.js +0 -69
  1045. package/src/widgets/FlexBox.d.ts +0 -69
  1046. package/src/widgets/FlexBox.js +0 -93
  1047. package/src/widgets/Heading.d.ts +0 -16
  1048. package/src/widgets/Heading.js +0 -33
  1049. package/src/widgets/HighlightedSearchText.d.ts +0 -9
  1050. package/src/widgets/HighlightedSearchText.js +0 -36
  1051. package/src/widgets/HtmlElement.d.ts +0 -30
  1052. package/src/widgets/HtmlElement.js +0 -275
  1053. package/src/widgets/HtmlElement.spec.js +0 -57
  1054. package/src/widgets/Icon.d.ts +0 -34
  1055. package/src/widgets/Icon.js +0 -50
  1056. package/src/widgets/List.d.ts +0 -96
  1057. package/src/widgets/List.js +0 -594
  1058. package/src/widgets/ProgressBar.d.ts +0 -17
  1059. package/src/widgets/ProgressBar.js +0 -46
  1060. package/src/widgets/Resizer.d.ts +0 -27
  1061. package/src/widgets/Resizer.js +0 -151
  1062. package/src/widgets/Sandbox.d.ts +0 -18
  1063. package/src/widgets/Sandbox.js +0 -65
  1064. package/src/widgets/Section.d.ts +0 -52
  1065. package/src/widgets/Section.js +0 -139
  1066. package/src/widgets/autoFocus.d.ts +0 -1
  1067. package/src/widgets/autoFocus.js +0 -9
  1068. package/src/widgets/cx.d.ts +0 -2
  1069. package/src/widgets/cx.js +0 -72
  1070. package/src/widgets/drag-drop/DragHandle.d.ts +0 -10
  1071. package/src/widgets/drag-drop/DragHandle.js +0 -37
  1072. package/src/widgets/drag-drop/DragSource.d.ts +0 -45
  1073. package/src/widgets/drag-drop/DragSource.js +0 -160
  1074. package/src/widgets/drag-drop/DropZone.d.ts +0 -98
  1075. package/src/widgets/drag-drop/DropZone.js +0 -214
  1076. package/src/widgets/drag-drop/index.d.ts +0 -4
  1077. package/src/widgets/drag-drop/ops.d.ts +0 -57
  1078. package/src/widgets/drag-drop/ops.js +0 -344
  1079. package/src/widgets/enableAllInternalDependencies.d.ts +0 -1
  1080. package/src/widgets/enableAllInternalDependencies.js +0 -11
  1081. package/src/widgets/form/Calendar.d.ts +0 -86
  1082. package/src/widgets/form/Calendar.js +0 -618
  1083. package/src/widgets/form/Checkbox.d.ts +0 -43
  1084. package/src/widgets/form/Checkbox.js +0 -203
  1085. package/src/widgets/form/ColorField.d.ts +0 -44
  1086. package/src/widgets/form/ColorField.js +0 -397
  1087. package/src/widgets/form/ColorPicker.d.ts +0 -23
  1088. package/src/widgets/form/ColorPicker.js +0 -485
  1089. package/src/widgets/form/DateField.d.ts +0 -6
  1090. package/src/widgets/form/DateField.js +0 -12
  1091. package/src/widgets/form/DateTimeField.d.ts +0 -89
  1092. package/src/widgets/form/DateTimeField.js +0 -576
  1093. package/src/widgets/form/DateTimePicker.js +0 -392
  1094. package/src/widgets/form/Field.d.ts +0 -112
  1095. package/src/widgets/form/Field.js +0 -446
  1096. package/src/widgets/form/FieldGroup.d.ts +0 -6
  1097. package/src/widgets/form/FieldGroup.js +0 -6
  1098. package/src/widgets/form/FieldIcon.js +0 -42
  1099. package/src/widgets/form/HelpText.d.ts +0 -10
  1100. package/src/widgets/form/HelpText.js +0 -9
  1101. package/src/widgets/form/Label.d.ts +0 -23
  1102. package/src/widgets/form/Label.js +0 -89
  1103. package/src/widgets/form/LabeledContainer.d.ts +0 -9
  1104. package/src/widgets/form/LabeledContainer.js +0 -59
  1105. package/src/widgets/form/LookupField.d.ts +0 -179
  1106. package/src/widgets/form/LookupField.js +0 -1135
  1107. package/src/widgets/form/MonthField.d.ts +0 -104
  1108. package/src/widgets/form/MonthField.js +0 -524
  1109. package/src/widgets/form/MonthPicker.d.ts +0 -97
  1110. package/src/widgets/form/MonthPicker.js +0 -687
  1111. package/src/widgets/form/NumberField.d.ts +0 -96
  1112. package/src/widgets/form/NumberField.js +0 -459
  1113. package/src/widgets/form/Radio.d.ts +0 -37
  1114. package/src/widgets/form/Radio.js +0 -188
  1115. package/src/widgets/form/Select.d.ts +0 -69
  1116. package/src/widgets/form/Select.js +0 -269
  1117. package/src/widgets/form/Slider.d.ts +0 -65
  1118. package/src/widgets/form/Slider.js +0 -351
  1119. package/src/widgets/form/Switch.d.ts +0 -38
  1120. package/src/widgets/form/Switch.js +0 -118
  1121. package/src/widgets/form/TextArea.d.ts +0 -17
  1122. package/src/widgets/form/TextArea.js +0 -195
  1123. package/src/widgets/form/TextField.d.ts +0 -78
  1124. package/src/widgets/form/TextField.js +0 -290
  1125. package/src/widgets/form/TimeField.d.ts +0 -6
  1126. package/src/widgets/form/TimeField.js +0 -11
  1127. package/src/widgets/form/TimeList.js +0 -84
  1128. package/src/widgets/form/UploadButton.d.ts +0 -34
  1129. package/src/widgets/form/UploadButton.js +0 -213
  1130. package/src/widgets/form/ValidationError.d.ts +0 -10
  1131. package/src/widgets/form/ValidationError.js +0 -44
  1132. package/src/widgets/form/ValidationGroup.d.ts +0 -41
  1133. package/src/widgets/form/ValidationGroup.js +0 -68
  1134. package/src/widgets/form/ValidationGroup.spec.js +0 -148
  1135. package/src/widgets/form/Validator.d.ts +0 -8
  1136. package/src/widgets/form/Validator.js +0 -21
  1137. package/src/widgets/form/Wheel.js +0 -261
  1138. package/src/widgets/form/index.d.ts +0 -26
  1139. package/src/widgets/grid/Grid.d.ts +0 -442
  1140. package/src/widgets/grid/Grid.js +0 -3429
  1141. package/src/widgets/grid/GridCell.d.ts +0 -38
  1142. package/src/widgets/grid/GridCell.js +0 -71
  1143. package/src/widgets/grid/GridCellEditor.js +0 -41
  1144. package/src/widgets/grid/GridRow.js +0 -228
  1145. package/src/widgets/grid/GridRowLine.js +0 -24
  1146. package/src/widgets/grid/Pagination.d.ts +0 -14
  1147. package/src/widgets/grid/Pagination.js +0 -95
  1148. package/src/widgets/grid/TreeNode.d.ts +0 -23
  1149. package/src/widgets/grid/TreeNode.js +0 -102
  1150. package/src/widgets/grid/index.d.ts +0 -4
  1151. package/src/widgets/grid/index.js +0 -15
  1152. package/src/widgets/icons/calendar.js +0 -16
  1153. package/src/widgets/icons/check.js +0 -12
  1154. package/src/widgets/icons/clear.js +0 -14
  1155. package/src/widgets/icons/close.js +0 -19
  1156. package/src/widgets/icons/cx.js +0 -37
  1157. package/src/widgets/icons/drop-down.js +0 -14
  1158. package/src/widgets/icons/file.js +0 -12
  1159. package/src/widgets/icons/folder-open.js +0 -14
  1160. package/src/widgets/icons/folder.js +0 -12
  1161. package/src/widgets/icons/forward.js +0 -21
  1162. package/src/widgets/icons/loading.js +0 -23
  1163. package/src/widgets/icons/menu.js +0 -16
  1164. package/src/widgets/icons/pixel-picker.js +0 -17
  1165. package/src/widgets/icons/registry.js +0 -54
  1166. package/src/widgets/icons/search.js +0 -12
  1167. package/src/widgets/icons/sort-asc.js +0 -13
  1168. package/src/widgets/icons/square.js +0 -17
  1169. package/src/widgets/nav/Link.d.ts +0 -26
  1170. package/src/widgets/nav/Link.js +0 -8
  1171. package/src/widgets/nav/LinkButton.d.ts +0 -34
  1172. package/src/widgets/nav/LinkButton.js +0 -128
  1173. package/src/widgets/nav/Menu.d.ts +0 -27
  1174. package/src/widgets/nav/Menu.js +0 -406
  1175. package/src/widgets/nav/MenuItem.d.ts +0 -31
  1176. package/src/widgets/nav/MenuItem.js +0 -445
  1177. package/src/widgets/nav/MenuSpacer.d.ts +0 -5
  1178. package/src/widgets/nav/MenuSpacer.js +0 -13
  1179. package/src/widgets/nav/RedirectRoute.d.ts +0 -9
  1180. package/src/widgets/nav/RedirectRoute.js +0 -41
  1181. package/src/widgets/nav/Route.d.ts +0 -21
  1182. package/src/widgets/nav/Route.js +0 -102
  1183. package/src/widgets/nav/Route.spec.js +0 -27
  1184. package/src/widgets/nav/Scroller.d.ts +0 -17
  1185. package/src/widgets/nav/Scroller.js +0 -214
  1186. package/src/widgets/nav/Submenu.d.ts +0 -6
  1187. package/src/widgets/nav/Submenu.js +0 -6
  1188. package/src/widgets/nav/Tab.d.ts +0 -33
  1189. package/src/widgets/nav/Tab.js +0 -82
  1190. package/src/widgets/nav/index.d.ts +0 -10
  1191. package/src/widgets/overlay/ContextMenu.d.ts +0 -10
  1192. package/src/widgets/overlay/ContextMenu.js +0 -29
  1193. package/src/widgets/overlay/Dropdown.d.ts +0 -32
  1194. package/src/widgets/overlay/Dropdown.js +0 -612
  1195. package/src/widgets/overlay/FlyweightTooltipTracker.d.ts +0 -8
  1196. package/src/widgets/overlay/FlyweightTooltipTracker.js +0 -39
  1197. package/src/widgets/overlay/MsgBox.d.ts +0 -17
  1198. package/src/widgets/overlay/MsgBox.js +0 -116
  1199. package/src/widgets/overlay/Overlay.d.ts +0 -73
  1200. package/src/widgets/overlay/Overlay.js +0 -747
  1201. package/src/widgets/overlay/Toast.d.ts +0 -30
  1202. package/src/widgets/overlay/Toast.js +0 -93
  1203. package/src/widgets/overlay/Tooltip.d.ts +0 -50
  1204. package/src/widgets/overlay/Tooltip.js +0 -308
  1205. package/src/widgets/overlay/Window.d.ts +0 -42
  1206. package/src/widgets/overlay/Window.js +0 -202
  1207. package/src/widgets/overlay/alerts.d.ts +0 -7
  1208. package/src/widgets/overlay/alerts.js +0 -39
  1209. package/src/widgets/overlay/captureMouse.d.ts +0 -54
  1210. package/src/widgets/overlay/captureMouse.js +0 -124
  1211. package/src/widgets/overlay/createHotPromiseWindowFactory.d.ts +0 -18
  1212. package/src/widgets/overlay/createHotPromiseWindowFactory.js +0 -56
  1213. package/src/widgets/overlay/index.js +0 -11
  1214. package/src/widgets/overlay/tooltip-ops.d.ts +0 -11
  1215. package/src/widgets/overlay/tooltip-ops.js +0 -29
  1216. package/svg.d.ts +0 -1
  1217. package/svg.js +0 -1
  1218. package/ui.d.ts +0 -1
  1219. package/ui.js +0 -1
  1220. package/util.d.ts +0 -1
  1221. package/util.js +0 -1
  1222. package/widgets.d.ts +0 -1
  1223. package/widgets.js +0 -1
  1224. /package/src/charts/{index.js → index.ts} +0 -0
  1225. /package/src/data/{Binding.spec.js → Binding.spec.ts} +0 -0
  1226. /package/src/data/{View.spec.js → View.spec.ts} +0 -0
  1227. /package/src/data/{comparer.spec.js → comparer.spec.ts} +0 -0
  1228. /package/src/data/ops/{index.js → index.ts} +0 -0
  1229. /package/src/hooks/{index.d.ts → index.ts} +0 -0
  1230. /package/src/{index.js → index.ts} +0 -0
  1231. /package/src/svg/{index.js → index.ts} +0 -0
  1232. /package/src/svg/util/{index.d.ts → index.ts} +0 -0
  1233. /package/src/ui/adapter/{index.d.ts → index.ts} +0 -0
  1234. /package/src/ui/app/{index.js → index.ts} +0 -0
  1235. /package/src/ui/layout/{index.d.ts → index.ts} +0 -0
  1236. /package/src/ui/selection/{index.d.ts → index.ts} +0 -0
  1237. /package/src/util/color/{index.js → index.ts} +0 -0
  1238. /package/src/util/date/{index.d.ts → index.ts} +0 -0
  1239. /package/src/util/date/{upperBoundCheck.spec.js → upperBoundCheck.spec.ts} +0 -0
  1240. /package/src/util/{getSearchQueryPredicate.spec.js → getSearchQueryPredicate.spec.ts} +0 -0
  1241. /package/src/util/{isValidIdentifierName.spec.js → isValidIdentifierName.spec.ts} +0 -0
  1242. /package/src/util/{routeAppend.spec.js → routeAppend.spec.ts} +0 -0
  1243. /package/src/widgets/drag-drop/{index.js → index.ts} +0 -0
  1244. /package/src/widgets/form/{index.js → index.ts} +0 -0
  1245. /package/src/widgets/icons/{index.js → index.ts} +0 -0
  1246. /package/src/widgets/{index.js → index.ts} +0 -0
  1247. /package/src/widgets/nav/{index.js → index.ts} +0 -0
@@ -0,0 +1,723 @@
1
+ /** @jsxImportSource react */
2
+
3
+ import * as React from "react";
4
+ import { StringTemplate } from "../../data/StringTemplate";
5
+ import { Culture } from "../../ui/Culture";
6
+ import { Cx } from "../../ui/Cx";
7
+ import type { DropdownInstance, Instance } from "../../ui/Instance";
8
+ import { FieldInstance } from "./Field";
9
+ import { Localization } from "../../ui/Localization";
10
+ import type { RenderingContext } from "../../ui/RenderingContext";
11
+ import { VDOM, Widget, getContent } from "../../ui/Widget";
12
+ import { getActiveElement, parseDateInvariant } from "../../util";
13
+ import { dateDiff } from "../../util/date/dateDiff";
14
+ import { zeroTime } from "../../util/date/zeroTime";
15
+ import { stopPropagation } from "../../util/eventCallbacks";
16
+ import { Format } from "../../util/Format";
17
+ import { isTouchDevice } from "../../util/isTouchDevice";
18
+ import { isTouchEvent } from "../../util/isTouchEvent";
19
+ import { KeyCode } from "../../util/KeyCode";
20
+ import { autoFocus } from "../autoFocus";
21
+ import ClearIcon from "../icons/clear";
22
+ import DropdownIcon from "../icons/drop-down";
23
+ import { Dropdown, DropdownConfig } from "../overlay/Dropdown";
24
+ import {
25
+ tooltipMouseLeave,
26
+ tooltipMouseMove,
27
+ tooltipParentDidMount,
28
+ tooltipParentWillReceiveProps,
29
+ tooltipParentWillUnmount,
30
+ } from "../overlay/tooltip-ops";
31
+ import { Calendar } from "./Calendar";
32
+ import { DateTimePicker } from "./DateTimePicker";
33
+ import { Field, FieldConfig, getFieldTooltip } from "./Field";
34
+ import { TimeList } from "./TimeList";
35
+ import { BooleanProp, Config, Prop, StringProp } from "../../ui/Prop";
36
+
37
+ export interface DateTimeFieldConfig extends FieldConfig {
38
+ /** Selected date. This should be a Date object or a valid date string consumable by Date.parse function. */
39
+ value?: Prop<string | Date>;
40
+
41
+ /** Defaults to false. Used to make the field read-only. */
42
+ readOnly?: BooleanProp;
43
+
44
+ /** The opposite of `disabled`. */
45
+ enabled?: BooleanProp;
46
+
47
+ /** Default text displayed when the field is empty. */
48
+ placeholder?: StringProp;
49
+
50
+ /** Minimum date value. This should be a Date object or a valid date string consumable by Date.parse function. */
51
+ minValue?: Prop<string | Date>;
52
+
53
+ /** Set to `true` to disallow the `minValue`. Default value is `false`. */
54
+ minExclusive?: BooleanProp;
55
+
56
+ /** Maximum date value. This should be a Date object or a valid date string consumable by Date.parse function. */
57
+ maxValue?: Prop<string | Date>;
58
+
59
+ /** Set to `true` to disallow the `maxValue`. Default value is `false`. */
60
+ maxExclusive?: BooleanProp;
61
+
62
+ /** Date format used to display the selected date. */
63
+ format?: StringProp;
64
+
65
+ /** Base CSS class to be applied to the field. Defaults to `datefield`. */
66
+ baseClass?: string;
67
+
68
+ /** Maximum value error text. */
69
+ maxValueErrorText?: string;
70
+
71
+ /** Maximum exclusive value error text. */
72
+ maxExclusiveErrorText?: string;
73
+
74
+ /** Minimum value error text. */
75
+ minValueErrorText?: string;
76
+
77
+ /** Minimum exclusive value error text. */
78
+ minExclusiveErrorText?: string;
79
+
80
+ /** Error message used to indicate wrong user input. */
81
+ inputErrorText?: string;
82
+
83
+ /** Name or configuration of the icon to be put on the left side of the input. */
84
+ icon?: StringProp | Config;
85
+
86
+ /** Set to false to hide the clear button. Default value is true. */
87
+ showClear?: boolean;
88
+
89
+ /** Set to `true` to display the clear button even if `required` is set. Default is `false`. */
90
+ alwaysShowClear?: boolean;
91
+
92
+ /** Set to true to hide the clear button. Default value is false. */
93
+ hideClear?: boolean;
94
+
95
+ /** Determines which segment of date/time is used. Default value is `datetime`. */
96
+ segment?: "date" | "time" | "datetime";
97
+
98
+ /** Set to `true` to indicate that only one segment of the selected date is affected. */
99
+ partial?: boolean;
100
+
101
+ /** The function that will be used to convert Date objects before writing data to the store. */
102
+ encoding?: (date: Date) => any;
103
+
104
+ /** Defines which days of week should be displayed as disabled. */
105
+ disabledDaysOfWeek?: number[];
106
+
107
+ /** Set to true to focus the input field instead of the picker first. */
108
+ focusInputFirst?: boolean;
109
+
110
+ /** Set to true to enable seconds segment in the picker. */
111
+ showSeconds?: boolean;
112
+
113
+ /** Additional configuration to be passed to the dropdown. */
114
+ dropdownOptions?: Partial<DropdownConfig>;
115
+ }
116
+
117
+ export class DateTimeField extends Field<DateTimeFieldConfig> {
118
+ declare public showClear?: boolean;
119
+ declare public alwaysShowClear?: boolean;
120
+ declare public hideClear?: boolean;
121
+ declare public format?: string;
122
+ declare public segment?: string;
123
+ declare public maxValueErrorText?: string;
124
+ declare public maxExclusiveErrorText?: string;
125
+ declare public minValueErrorText?: string;
126
+ declare public minExclusiveErrorText?: string;
127
+ declare public inputErrorText?: string;
128
+ declare public disabledDaysOfWeekErrorText?: string;
129
+ declare public value?: unknown;
130
+ declare public minValue?: unknown;
131
+ declare public maxValue?: unknown;
132
+ declare public minExclusive?: boolean;
133
+ declare public maxExclusive?: boolean;
134
+ declare public picker?: string;
135
+ declare public partial?: boolean;
136
+ declare public encoding?: (date: Date) => string;
137
+ declare public disabledDaysOfWeek?: number[] | null;
138
+ declare public reactOn?: string;
139
+ declare public focusInputFirst?: boolean;
140
+ declare public dropdownOptions?: Partial<DropdownConfig>;
141
+ declare public onParseInput?: string | ((date: unknown, instance: Instance) => Date | undefined);
142
+ declare public showSeconds?: boolean;
143
+ declare public step?: number;
144
+
145
+ constructor(config?: DateTimeFieldConfig) {
146
+ super(config);
147
+ }
148
+
149
+ declareData(...args: Record<string, unknown>[]): void {
150
+ super.declareData(
151
+ {
152
+ value: this.emptyValue,
153
+ disabled: undefined,
154
+ readOnly: undefined,
155
+ enabled: undefined,
156
+ placeholder: undefined,
157
+ required: undefined,
158
+ minValue: undefined,
159
+ minExclusive: undefined,
160
+ maxValue: undefined,
161
+ maxExclusive: undefined,
162
+ format: undefined,
163
+ icon: undefined,
164
+ autoOpen: undefined,
165
+ },
166
+ ...args,
167
+ );
168
+ }
169
+
170
+ init(): void {
171
+ if (typeof this.hideClear !== "undefined") this.showClear = !this.hideClear;
172
+
173
+ if (this.alwaysShowClear) this.showClear = true;
174
+
175
+ if (!this.format) {
176
+ switch (this.segment) {
177
+ case "datetime":
178
+ this.format = "datetime;YYYYMMddhhmm";
179
+ break;
180
+
181
+ case "time":
182
+ this.format = "time;hhmm";
183
+ break;
184
+
185
+ case "date":
186
+ this.format = "date;yyyyMMMdd";
187
+ break;
188
+ }
189
+ }
190
+ super.init();
191
+ }
192
+
193
+ prepareData(context: RenderingContext, instance: FieldInstance<DateTimeField>): void {
194
+ let { data } = instance;
195
+ let dropdownInstance = instance as DropdownInstance;
196
+
197
+ if (data.value) {
198
+ let date = parseDateInvariant(data.value);
199
+ // let date = new Date(data.value);
200
+
201
+ if (isNaN(date.getTime())) data.formatted = String(data.value);
202
+ else {
203
+ // handle utc edge cases
204
+ if (this.segment == "date") date = zeroTime(date);
205
+ data.formatted = Format.value(date, data.format);
206
+ }
207
+ data.date = date;
208
+ } else data.formatted = "";
209
+
210
+ if (data.refDate) data.refDate = zeroTime(parseDateInvariant(data.refDate));
211
+
212
+ if (data.maxValue) data.maxValue = parseDateInvariant(data.maxValue);
213
+
214
+ if (data.minValue) data.minValue = parseDateInvariant(data.minValue);
215
+
216
+ if (this.segment == "date") {
217
+ if (data.minValue) data.minValue = zeroTime(data.minValue);
218
+
219
+ if (data.maxValue) data.maxValue = zeroTime(data.maxValue);
220
+ }
221
+
222
+ dropdownInstance.lastDropdown = context.lastDropdown;
223
+
224
+ super.prepareData(context, instance);
225
+ }
226
+
227
+ validate(context: RenderingContext, instance: FieldInstance<DateTimeField>): void {
228
+ super.validate(context, instance);
229
+ let { data, widget } = instance;
230
+ let dateTimeWidget = widget as DateTimeField;
231
+
232
+ if (!data.error && data.date) {
233
+ if (isNaN(data.date)) data.error = this.inputErrorText;
234
+ else {
235
+ let d;
236
+ if (data.maxValue) {
237
+ d = dateDiff(data.date, data.maxValue);
238
+ if (d > 0) data.error = StringTemplate.format(this.maxValueErrorText!, data.maxValue);
239
+ else if (d == 0 && data.maxExclusive)
240
+ data.error = StringTemplate.format(this.maxExclusiveErrorText!, data.maxValue);
241
+ }
242
+ if (data.minValue) {
243
+ d = dateDiff(data.date, data.minValue);
244
+ if (d < 0) data.error = StringTemplate.format(this.minValueErrorText!, data.minValue);
245
+ else if (d == 0 && data.minExclusive)
246
+ data.error = StringTemplate.format(this.minExclusiveErrorText!, data.minValue);
247
+ }
248
+ if (dateTimeWidget.disabledDaysOfWeek) {
249
+ if (dateTimeWidget.disabledDaysOfWeek.includes(data.date.getDay()))
250
+ data.error = this.disabledDaysOfWeekErrorText;
251
+ }
252
+ }
253
+ }
254
+ }
255
+
256
+ renderInput(context: RenderingContext, instance: FieldInstance<DateTimeField>, key: string): React.ReactNode {
257
+ return (
258
+ <DateTimeInput
259
+ key={key}
260
+ instance={instance}
261
+ data={instance.data}
262
+ picker={{
263
+ value: this.value,
264
+ minValue: this.minValue,
265
+ maxValue: this.maxValue,
266
+ minExclusive: this.minExclusive,
267
+ maxExclusive: this.maxExclusive,
268
+ maxValueErrorText: this.maxValueErrorText,
269
+ maxExclusiveErrorText: this.maxExclusiveErrorText,
270
+ minValueErrorText: this.minValueErrorText,
271
+ minExclusiveErrorText: this.minExclusiveErrorText,
272
+ }}
273
+ label={this.labelPlacement && getContent(this.renderLabel(context, instance, "label"))}
274
+ help={this.helpPlacement && getContent(this.renderHelp(context, instance, "help"))}
275
+ icon={getContent(this.renderIcon(context, instance, "icon"))}
276
+ />
277
+ );
278
+ }
279
+
280
+ formatValue(context: RenderingContext, { data }: Instance): React.ReactNode {
281
+ return data.value ? data.formatted : null;
282
+ }
283
+
284
+ parseDate(date: unknown, instance: Instance): Date | null {
285
+ if (!date) return null;
286
+ if (date instanceof Date) return date;
287
+ if (this.onParseInput) {
288
+ let result = instance.invoke("onParseInput", date, instance);
289
+ if (result !== undefined) return result;
290
+ }
291
+ date = Culture.getDateTimeCulture().parse(date, { useCurrentDateForDefaults: true }) as Date;
292
+ return date as Date | null;
293
+ }
294
+ }
295
+
296
+ DateTimeField.prototype.baseClass = "datetimefield";
297
+ DateTimeField.prototype.maxValueErrorText = "Select {0:d} or before.";
298
+ DateTimeField.prototype.maxExclusiveErrorText = "Select a date before {0:d}.";
299
+ DateTimeField.prototype.minValueErrorText = "Select {0:d} or later.";
300
+ DateTimeField.prototype.minExclusiveErrorText = "Select a date after {0:d}.";
301
+ DateTimeField.prototype.inputErrorText = "Invalid date entered.";
302
+ DateTimeField.prototype.disabledDaysOfWeekErrorText = "Selected day of week is not allowed.";
303
+
304
+ DateTimeField.prototype.suppressErrorsUntilVisited = true;
305
+ DateTimeField.prototype.icon = "calendar";
306
+ DateTimeField.prototype.showClear = true;
307
+ DateTimeField.prototype.alwaysShowClear = false;
308
+ DateTimeField.prototype.reactOn = "enter blur";
309
+ DateTimeField.prototype.segment = "datetime";
310
+ DateTimeField.prototype.picker = "auto";
311
+ DateTimeField.prototype.disabledDaysOfWeek = null;
312
+ DateTimeField.prototype.focusInputFirst = false;
313
+
314
+ Widget.alias("datetimefield", DateTimeField);
315
+ Localization.registerPrototype("cx/widgets/DateTimeField", DateTimeField);
316
+
317
+ interface DateTimeInputProps {
318
+ instance: FieldInstance<DateTimeField>;
319
+ data: Record<string, unknown>;
320
+ picker: Record<string, unknown>;
321
+ label?: React.ReactNode;
322
+ help?: React.ReactNode;
323
+ icon?: React.ReactNode;
324
+ }
325
+
326
+ interface DateTimeInputState {
327
+ dropdownOpen: boolean;
328
+ focus: boolean;
329
+ dropdownOpenTime?: number;
330
+ }
331
+
332
+ class DateTimeInput extends VDOM.Component<DateTimeInputProps, DateTimeInputState> {
333
+ input!: HTMLInputElement;
334
+ dropdown?: Widget;
335
+ scrollableParents?: Element[];
336
+ openDropdownOnFocus: boolean = false;
337
+ updateDropdownPosition: () => void;
338
+ scrolling?: boolean;
339
+
340
+ constructor(props: DateTimeInputProps) {
341
+ super(props);
342
+ (props.instance as any).component = this;
343
+ this.state = {
344
+ dropdownOpen: false,
345
+ focus: false,
346
+ };
347
+ this.updateDropdownPosition = () => {};
348
+ }
349
+
350
+ getDropdown(): Widget {
351
+ if (this.dropdown) return this.dropdown;
352
+
353
+ let { widget, lastDropdown } = this.props.instance as DropdownInstance;
354
+ let dateTimeWidget = widget as DateTimeField;
355
+
356
+ let pickerConfig;
357
+
358
+ switch (dateTimeWidget.picker) {
359
+ case "calendar":
360
+ pickerConfig = {
361
+ type: Calendar,
362
+ partial: dateTimeWidget.partial,
363
+ encoding: dateTimeWidget.encoding,
364
+ disabledDaysOfWeek: dateTimeWidget.disabledDaysOfWeek,
365
+ focusable: !dateTimeWidget.focusInputFirst,
366
+ };
367
+ break;
368
+
369
+ case "list":
370
+ pickerConfig = {
371
+ type: TimeList,
372
+ style: "height: 300px",
373
+ encoding: dateTimeWidget.encoding,
374
+ step: dateTimeWidget.step,
375
+ format: dateTimeWidget.format,
376
+ scrollSelectionIntoView: true,
377
+ };
378
+ break;
379
+
380
+ default:
381
+ pickerConfig = {
382
+ type: DateTimePicker,
383
+ segment: dateTimeWidget.segment,
384
+ encoding: dateTimeWidget.encoding,
385
+ showSeconds: dateTimeWidget.showSeconds,
386
+ };
387
+ break;
388
+ }
389
+
390
+ let dropdown = {
391
+ scrollTracking: true,
392
+ inline: !isTouchDevice() || !!lastDropdown,
393
+ matchWidth: false,
394
+ placementOrder: "down down-right down-left up up-right up-left",
395
+ touchFriendly: true,
396
+ firstChildDefinesHeight: true,
397
+ firstChildDefinesWidth: true,
398
+ ...dateTimeWidget.dropdownOptions,
399
+ type: Dropdown,
400
+ relatedElement: this.input,
401
+ onFocusOut: (e: unknown) => {
402
+ this.closeDropdown(e);
403
+ },
404
+ onMouseDown: stopPropagation,
405
+ items: {
406
+ ...pickerConfig,
407
+ ...this.props.picker,
408
+ autoFocus: !dateTimeWidget.focusInputFirst,
409
+ tabIndex: dateTimeWidget.focusInputFirst ? -1 : 0,
410
+ onKeyDown: (e: React.KeyboardEvent) => this.onKeyDown(e),
411
+ onSelect: (e: React.MouseEvent, calendar: any, date: Date) => {
412
+ e.stopPropagation();
413
+ e.preventDefault();
414
+ let touch = isTouchEvent();
415
+ this.closeDropdown(e, () => {
416
+ if (date) {
417
+ // If a blur event occurs before we re-render the input,
418
+ // the old input value is parsed and written to the store.
419
+ // We want to prevent that by eagerly updating the input value.
420
+ // This can happen if the date field is within a menu.
421
+ let newFormattedValue = Format.value(date, this.props.data.format as string);
422
+ this.input.value = newFormattedValue;
423
+ }
424
+ if (!touch) this.input.focus();
425
+ });
426
+ },
427
+ },
428
+ };
429
+
430
+ return (this.dropdown = Widget.create(dropdown));
431
+ }
432
+
433
+ render(): React.ReactNode {
434
+ let { instance, label, help, icon: iconVDOM } = this.props;
435
+ let { data, widget, state } = instance;
436
+ let { CSS, baseClass, suppressErrorsUntilVisited, showClear, alwaysShowClear } = widget;
437
+
438
+ let insideButton, icon;
439
+
440
+ if (!data.readOnly && !data.disabled) {
441
+ if (showClear && (((alwaysShowClear || !data.required) && !data.empty) || instance.state?.inputError))
442
+ insideButton = (
443
+ <div
444
+ className={CSS.element(baseClass, "clear")}
445
+ onMouseDown={(e) => {
446
+ e.preventDefault();
447
+ e.stopPropagation();
448
+ }}
449
+ onClick={(e) => this.onClearClick(e)}
450
+ >
451
+ <ClearIcon className={CSS.element(baseClass, "icon")} />
452
+ </div>
453
+ );
454
+ else
455
+ insideButton = (
456
+ <div className={CSS.element(baseClass, "right-icon")}>
457
+ <DropdownIcon className={CSS.element(baseClass, "icon")} />
458
+ </div>
459
+ );
460
+ }
461
+
462
+ if (iconVDOM) {
463
+ icon = <div className={CSS.element(baseClass, "left-icon")}>{iconVDOM}</div>;
464
+ }
465
+
466
+ let dropdown: React.ReactNode | undefined;
467
+ if (this.state.dropdownOpen)
468
+ dropdown = (
469
+ <Cx
470
+ widget={this.getDropdown()}
471
+ parentInstance={instance}
472
+ options={{ name: "datefield-dropdown" }}
473
+ subscribe
474
+ />
475
+ );
476
+
477
+ let empty = this.input ? !this.input.value : data.empty;
478
+
479
+ return (
480
+ <div
481
+ className={CSS.expand(
482
+ data.classNames,
483
+ CSS.state({
484
+ visited: state?.visited,
485
+ focus: this.state.focus || this.state.dropdownOpen,
486
+ icon: !!icon,
487
+ empty: empty && !data.placeholder,
488
+ error: data.error && (state?.visited || !suppressErrorsUntilVisited || !empty),
489
+ }),
490
+ )}
491
+ style={data.style as React.CSSProperties}
492
+ onMouseDown={this.onMouseDown.bind(this)}
493
+ onTouchStart={stopPropagation}
494
+ >
495
+ <input
496
+ id={data.id as string}
497
+ ref={(el) => {
498
+ this.input = el!;
499
+ }}
500
+ type="text"
501
+ className={CSS.expand(CSS.element(baseClass, "input"), data.inputClass)}
502
+ style={data.inputStyle as React.CSSProperties}
503
+ defaultValue={data.formatted as string}
504
+ disabled={data.disabled as boolean}
505
+ readOnly={data.readOnly as boolean}
506
+ tabIndex={data.tabIndex as number}
507
+ placeholder={data.placeholder as string}
508
+ {...(data.inputAttrs as Record<string, any>)}
509
+ onInput={(e) => this.onChange((e.target as HTMLInputElement).value, "input")}
510
+ onChange={(e) => this.onChange(e.target.value, "change")}
511
+ onKeyDown={(e) => this.onKeyDown(e)}
512
+ onBlur={(e) => {
513
+ this.onBlur(e);
514
+ }}
515
+ onFocus={(e) => {
516
+ this.onFocus(e);
517
+ }}
518
+ onMouseMove={(e) => tooltipMouseMove(e, ...getFieldTooltip(this.props.instance))}
519
+ onMouseLeave={(e) => tooltipMouseLeave(e, ...getFieldTooltip(this.props.instance))}
520
+ />
521
+ {icon}
522
+ {insideButton}
523
+ {dropdown}
524
+ {label}
525
+ {help}
526
+ </div>
527
+ );
528
+ }
529
+
530
+ onMouseDown(e: React.MouseEvent): void {
531
+ e.stopPropagation();
532
+ let { widget } = this.props.instance;
533
+
534
+ if (this.state.dropdownOpen) {
535
+ this.closeDropdown(e);
536
+ } else {
537
+ this.openDropdownOnFocus = true;
538
+ }
539
+
540
+ //icon click
541
+ if (e.target !== this.input) {
542
+ e.preventDefault();
543
+
544
+ //the field should not focus only in case when dropdown will open and autofocus
545
+ if (widget.focusInputFirst || this.state.dropdownOpen) this.input.focus();
546
+
547
+ if (this.state.dropdownOpen) this.closeDropdown(e);
548
+ else this.openDropdown();
549
+ }
550
+ }
551
+
552
+ onFocus(e: React.FocusEvent): void {
553
+ let { instance } = this.props;
554
+ let { widget } = instance;
555
+
556
+ if (widget.trackFocus) {
557
+ this.setState({
558
+ focus: true,
559
+ });
560
+ }
561
+ if (this.openDropdownOnFocus || widget.focusInputFirst) this.openDropdown();
562
+ }
563
+
564
+ onKeyDown(e: React.KeyboardEvent): void {
565
+ let { instance } = this.props;
566
+ if (instance.widget.handleKeyDown(e, instance) === false) return;
567
+
568
+ switch (e.keyCode) {
569
+ case KeyCode.enter:
570
+ this.onChange((e.target as HTMLInputElement).value, "enter");
571
+ break;
572
+
573
+ case KeyCode.esc:
574
+ if (this.state.dropdownOpen) {
575
+ e.stopPropagation();
576
+ this.closeDropdown(e, () => {
577
+ this.input.focus();
578
+ });
579
+ }
580
+ break;
581
+
582
+ case KeyCode.left:
583
+ case KeyCode.right:
584
+ e.stopPropagation();
585
+ break;
586
+
587
+ case KeyCode.down:
588
+ this.openDropdown();
589
+ e.stopPropagation();
590
+ e.preventDefault();
591
+ break;
592
+ }
593
+ }
594
+
595
+ onBlur(e: React.FocusEvent<HTMLInputElement>): void {
596
+ let { widget } = this.props.instance;
597
+ let dateTimeWidget = widget as DateTimeField;
598
+
599
+ if (!this.state.dropdownOpen) this.props.instance.setState({ visited: true });
600
+ else if (dateTimeWidget.focusInputFirst) this.closeDropdown(e);
601
+ if (this.state.focus)
602
+ this.setState({
603
+ focus: false,
604
+ });
605
+ this.onChange(e.target.value, "blur");
606
+ }
607
+
608
+ closeDropdown(e: unknown, callback?: () => void): void {
609
+ if (this.state.dropdownOpen) {
610
+ if (this.scrollableParents)
611
+ this.scrollableParents.forEach((el) => {
612
+ el.removeEventListener("scroll", this.updateDropdownPosition);
613
+ });
614
+
615
+ this.setState({ dropdownOpen: false }, callback);
616
+ this.props.instance.setState({ visited: true });
617
+ } else if (callback) callback();
618
+ }
619
+
620
+ openDropdown(): void {
621
+ let { data } = this.props.instance;
622
+ this.openDropdownOnFocus = false;
623
+
624
+ if (!this.state.dropdownOpen && !(data.disabled || data.readOnly)) {
625
+ this.setState({
626
+ dropdownOpen: true,
627
+ dropdownOpenTime: Date.now(),
628
+ });
629
+ }
630
+ }
631
+
632
+ onClearClick(e: React.MouseEvent): void {
633
+ this.setValue(null);
634
+ e.stopPropagation();
635
+ e.preventDefault();
636
+ }
637
+
638
+ UNSAFE_componentWillReceiveProps(props: DateTimeInputProps): void {
639
+ let { data, state } = props.instance;
640
+ if (data.formatted !== this.input.value && (data.formatted !== this.props.data.formatted || !state?.inputError)) {
641
+ this.input.value = data.formatted || "";
642
+ props.instance.setState({
643
+ inputError: false,
644
+ });
645
+ }
646
+
647
+ tooltipParentWillReceiveProps(this.input, ...getFieldTooltip(this.props.instance));
648
+ }
649
+
650
+ componentDidMount(): void {
651
+ tooltipParentDidMount(this.input, ...getFieldTooltip(this.props.instance));
652
+ autoFocus(this.input, this);
653
+ if (this.props.data.autoOpen) this.openDropdown();
654
+ }
655
+
656
+ componentDidUpdate(): void {
657
+ autoFocus(this.input, this);
658
+ }
659
+
660
+ componentWillUnmount(): void {
661
+ if (this.input == getActiveElement() && this.input.value != this.props.data.formatted) {
662
+ this.onChange(this.input.value, "blur");
663
+ }
664
+ tooltipParentWillUnmount(this.props.instance);
665
+ }
666
+
667
+ onChange(inputValue: string, eventType: string): void {
668
+ let { instance, data } = this.props;
669
+ let { widget } = instance;
670
+ let dateTimeWidget = widget as DateTimeField;
671
+
672
+ if (data.disabled || data.readOnly) return;
673
+
674
+ if (dateTimeWidget.reactOn!.indexOf(eventType) === -1) return;
675
+
676
+ if (eventType == "enter") instance.setState({ visited: true });
677
+
678
+ this.setValue(inputValue, data.value);
679
+ }
680
+
681
+ setValue(text: string | null, baseValue?: unknown): void {
682
+ let { instance, data } = this.props;
683
+ let { widget } = instance;
684
+ let dateTimeWidget = widget as DateTimeField;
685
+
686
+ let date = dateTimeWidget.parseDate(text, instance);
687
+
688
+ instance.setState({
689
+ inputError: isNaN(date as any) && dateTimeWidget.inputErrorText,
690
+ });
691
+
692
+ if (!isNaN(date as any)) {
693
+ let mixed = parseDateInvariant(baseValue as string);
694
+ if (date && baseValue && !isNaN(mixed as any) && dateTimeWidget.partial) {
695
+ switch (dateTimeWidget.segment) {
696
+ case "date":
697
+ mixed.setFullYear(date!.getFullYear());
698
+ mixed.setMonth(date!.getMonth());
699
+ mixed.setDate(date!.getDate());
700
+ break;
701
+
702
+ case "time":
703
+ mixed.setHours(date!.getHours());
704
+ mixed.setMinutes(date!.getMinutes());
705
+ mixed.setSeconds(date!.getSeconds());
706
+ break;
707
+
708
+ default:
709
+ mixed = date;
710
+ break;
711
+ }
712
+
713
+ date = mixed;
714
+ }
715
+
716
+ let encode = dateTimeWidget.encoding || Culture.getDefaultDateEncoding();
717
+
718
+ let value = date ? encode!(date!) : dateTimeWidget.emptyValue;
719
+
720
+ if (!instance.set("value", value)) this.input.value = value ? Format.value(date!, data.format as string) : "";
721
+ }
722
+ }
723
+ }