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.
- package/build/charts/Bar.d.ts +29 -0
- package/build/charts/Bar.js +74 -0
- package/build/charts/BarGraph.d.ts +29 -0
- package/build/charts/BarGraph.js +86 -0
- package/build/charts/BubbleGraph.d.ts +54 -0
- package/build/charts/BubbleGraph.js +80 -0
- package/build/charts/Chart.d.ts +31 -0
- package/build/charts/Chart.js +62 -0
- package/build/charts/ColorMap.d.ts +59 -0
- package/build/charts/ColorMap.js +97 -0
- package/build/charts/Column.d.ts +32 -0
- package/build/charts/Column.js +81 -0
- package/build/charts/ColumnBarBase.d.ts +92 -0
- package/build/charts/ColumnBarBase.js +144 -0
- package/build/charts/ColumnBarGraphBase.d.ts +91 -0
- package/build/charts/ColumnBarGraphBase.js +106 -0
- package/build/charts/ColumnGraph.d.ts +30 -0
- package/build/charts/ColumnGraph.js +94 -0
- package/build/charts/Grid.d.ts +2 -0
- package/build/charts/Grid.js +3 -0
- package/build/charts/Gridlines.d.ts +34 -0
- package/build/charts/Gridlines.js +42 -0
- package/build/charts/Legend.d.ts +73 -0
- package/build/charts/Legend.js +138 -0
- package/build/charts/LegendEntry.d.ts +60 -0
- package/build/charts/LegendEntry.js +101 -0
- package/build/charts/LineGraph.d.ts +111 -0
- package/build/charts/LineGraph.js +253 -0
- package/build/charts/Marker.d.ts +133 -0
- package/build/charts/Marker.js +275 -0
- package/build/charts/MarkerLine.d.ts +65 -0
- package/build/charts/MarkerLine.js +108 -0
- package/build/charts/MouseTracker.d.ts +34 -0
- package/build/charts/MouseTracker.js +55 -0
- package/build/charts/Pie.d.ts +4 -0
- package/build/charts/Pie.js +5 -0
- package/build/charts/PieChart.d.ts +158 -0
- package/build/charts/PieChart.js +445 -0
- package/build/charts/PieLabel.d.ts +34 -0
- package/build/charts/PieLabel.js +47 -0
- package/build/charts/PieLabelsContainer.d.ts +15 -0
- package/build/charts/PieLabelsContainer.js +54 -0
- package/build/charts/Range.d.ts +94 -0
- package/build/charts/Range.js +160 -0
- package/build/charts/RangeMarker.d.ts +65 -0
- package/build/charts/RangeMarker.js +143 -0
- package/build/charts/ScatterGraph.d.ts +72 -0
- package/build/charts/ScatterGraph.js +133 -0
- package/build/charts/Swimlane.d.ts +47 -0
- package/build/charts/Swimlane.js +113 -0
- package/build/charts/Swimlanes.d.ts +57 -0
- package/build/charts/Swimlanes.js +83 -0
- package/build/charts/axis/Axis.d.ts +141 -0
- package/build/charts/axis/Axis.js +215 -0
- package/build/charts/axis/CategoryAxis.d.ts +35 -0
- package/build/charts/axis/CategoryAxis.js +240 -0
- package/build/charts/axis/NumericAxis.d.ts +57 -0
- package/build/charts/axis/NumericAxis.js +316 -0
- package/build/charts/axis/Stack.d.ts +16 -0
- package/build/charts/axis/Stack.js +57 -0
- package/build/charts/axis/TimeAxis.d.ts +50 -0
- package/build/charts/axis/TimeAxis.js +554 -0
- package/build/charts/axis/index.d.ts +4 -0
- package/build/charts/axis/index.js +4 -0
- package/build/charts/helpers/MinMaxFinder.d.ts +36 -0
- package/build/charts/helpers/MinMaxFinder.js +37 -0
- package/build/charts/helpers/PointReducer.d.ts +41 -0
- package/build/charts/helpers/PointReducer.js +55 -0
- package/build/charts/helpers/SnapPointFinder.d.ts +58 -0
- package/build/charts/helpers/SnapPointFinder.js +65 -0
- package/build/charts/helpers/ValueAtFinder.d.ts +33 -0
- package/build/charts/helpers/ValueAtFinder.js +46 -0
- package/build/charts/helpers/index.d.ts +4 -0
- package/build/charts/helpers/index.js +4 -0
- package/build/charts/index.d.ts +26 -0
- package/build/charts/index.js +26 -0
- package/build/charts/shapes.d.ts +13 -0
- package/build/charts/shapes.js +62 -0
- package/build/data/AggregateFunction.d.ts +60 -0
- package/build/data/AggregateFunction.js +155 -0
- package/build/data/ArrayElementView.d.ts +33 -0
- package/build/data/ArrayElementView.js +65 -0
- package/build/data/ArrayElementView.spec.d.ts +1 -0
- package/build/data/ArrayElementView.spec.js +81 -0
- package/build/data/ArrayRef.d.ts +9 -0
- package/build/data/ArrayRef.js +29 -0
- package/build/data/AugmentedViewBase.d.ts +18 -0
- package/build/data/AugmentedViewBase.js +72 -0
- package/build/data/Binding.d.ts +23 -0
- package/build/data/Binding.js +78 -0
- package/build/data/Binding.spec.d.ts +1 -0
- package/build/data/Binding.spec.js +61 -0
- package/build/data/ExposedRecordView.d.ts +24 -0
- package/build/data/ExposedRecordView.js +76 -0
- package/build/data/ExposedValueView.d.ts +20 -0
- package/build/data/ExposedValueView.js +68 -0
- package/build/data/Expression.d.ts +12 -0
- package/build/data/Expression.js +201 -0
- package/build/data/Expression.spec.d.ts +1 -0
- package/build/data/Expression.spec.js +196 -0
- package/build/data/Grouper.d.ts +29 -0
- package/build/data/Grouper.js +138 -0
- package/build/data/Grouper.spec.d.ts +1 -0
- package/build/data/Grouper.spec.js +48 -0
- package/build/data/NestedDataView.d.ts +21 -0
- package/build/data/NestedDataView.js +24 -0
- package/build/data/ReadOnlyDataView.d.ts +13 -0
- package/build/data/ReadOnlyDataView.js +25 -0
- package/build/data/Ref.d.ts +23 -0
- package/build/data/Ref.js +79 -0
- package/build/data/Ref.spec.d.ts +1 -0
- package/build/data/Ref.spec.js +72 -0
- package/build/data/Selector.d.ts +8 -0
- package/build/data/Selector.js +1 -0
- package/build/data/Store.d.ts +12 -0
- package/build/data/Store.js +41 -0
- package/build/data/Store.spec.d.ts +1 -0
- package/build/data/Store.spec.js +19 -0
- package/build/data/StoreProxy.d.ts +6 -0
- package/build/data/StoreProxy.js +14 -0
- package/build/data/StoreRef.d.ts +22 -0
- package/build/data/StoreRef.js +47 -0
- package/build/data/StoreRef.spec.d.ts +1 -0
- package/build/data/StoreRef.spec.js +22 -0
- package/build/data/StringTemplate.d.ts +9 -0
- package/build/data/StringTemplate.js +81 -0
- package/build/data/StringTemplate.spec.d.ts +1 -0
- package/build/data/StringTemplate.spec.js +112 -0
- package/build/data/StructuredSelector.d.ts +12 -0
- package/build/data/StructuredSelector.js +131 -0
- package/build/data/StructuredSelector.spec.d.ts +1 -0
- package/build/data/StructuredSelector.spec.js +102 -0
- package/build/data/SubscribableView.d.ts +15 -0
- package/build/data/SubscribableView.js +52 -0
- package/build/data/View.d.ts +125 -0
- package/build/data/View.js +163 -0
- package/build/data/View.spec.d.ts +1 -0
- package/build/data/View.spec.js +44 -0
- package/build/data/ZoomIntoPropertyView.d.ts +15 -0
- package/build/data/ZoomIntoPropertyView.js +34 -0
- package/build/data/ZoomIntoPropertyView.spec.d.ts +1 -0
- package/build/data/ZoomIntoPropertyView.spec.js +54 -0
- package/build/data/comparer.d.ts +11 -0
- package/build/data/comparer.js +55 -0
- package/build/data/comparer.spec.d.ts +1 -0
- package/build/data/comparer.spec.js +50 -0
- package/build/data/computable.d.ts +10 -0
- package/build/data/computable.js +46 -0
- package/build/data/computable.spec.d.ts +1 -0
- package/build/data/computable.spec.js +56 -0
- package/build/data/createAccessorModelProxy.d.ts +17 -0
- package/build/data/createAccessorModelProxy.js +37 -0
- package/build/data/createAccessorModelProxy.spec.d.ts +1 -0
- package/build/data/createAccessorModelProxy.spec.js +30 -0
- package/build/data/createStructuredSelector.d.ts +9 -0
- package/build/data/createStructuredSelector.js +40 -0
- package/build/data/createStructuredSelector.spec.d.ts +1 -0
- package/build/data/createStructuredSelector.spec.js +42 -0
- package/build/data/defaultCompare.d.ts +1 -0
- package/build/data/defaultCompare.js +12 -0
- package/build/data/diff/diffArrays.d.ts +12 -0
- package/build/data/diff/diffArrays.js +34 -0
- package/build/data/diff/diffs.spec.d.ts +1 -0
- package/build/data/diff/diffs.spec.js +45 -0
- package/build/data/diff/index.d.ts +1 -0
- package/build/data/diff/index.js +1 -0
- package/build/data/enableFatArrowExpansion.d.ts +1 -0
- package/build/data/enableFatArrowExpansion.js +5 -0
- package/build/data/getAccessor.d.ts +11 -0
- package/build/data/getAccessor.js +51 -0
- package/build/data/getAccessor.spec.d.ts +1 -0
- package/build/data/getAccessor.spec.js +10 -0
- package/build/data/getSelector.d.ts +3 -0
- package/build/data/getSelector.js +60 -0
- package/build/data/getSelector.spec.d.ts +1 -0
- package/build/data/getSelector.spec.js +36 -0
- package/build/data/index.d.ts +29 -0
- package/build/data/index.js +29 -0
- package/build/data/isSelector.d.ts +1 -0
- package/build/data/isSelector.js +19 -0
- package/build/data/ops/append.d.ts +1 -0
- package/build/data/ops/append.js +7 -0
- package/build/data/ops/append.spec.d.ts +1 -0
- package/build/data/ops/append.spec.js +24 -0
- package/build/data/ops/filter.d.ts +1 -0
- package/build/data/ops/filter.js +8 -0
- package/build/data/ops/filter.spec.d.ts +1 -0
- package/build/data/ops/filter.spec.js +25 -0
- package/build/data/ops/findTreeNode.d.ts +1 -0
- package/build/data/ops/findTreeNode.js +13 -0
- package/build/data/ops/findTreeNode.spec.d.ts +1 -0
- package/build/data/ops/findTreeNode.spec.js +20 -0
- package/build/data/ops/findTreePath.d.ts +1 -0
- package/build/data/ops/findTreePath.js +15 -0
- package/build/data/ops/index.d.ts +10 -0
- package/build/data/ops/index.js +10 -0
- package/build/data/ops/insertElement.d.ts +1 -0
- package/build/data/ops/insertElement.js +3 -0
- package/build/data/ops/merge.d.ts +1 -0
- package/build/data/ops/merge.js +10 -0
- package/build/data/ops/merge.spec.d.ts +1 -0
- package/build/data/ops/merge.spec.js +23 -0
- package/build/data/ops/moveElement.d.ts +1 -0
- package/build/data/ops/moveElement.js +20 -0
- package/build/data/ops/removeTreeNodes.d.ts +1 -0
- package/build/data/ops/removeTreeNodes.js +4 -0
- package/build/data/ops/removeTreeNodes.spec.d.ts +1 -0
- package/build/data/ops/removeTreeNodes.spec.js +35 -0
- package/build/data/ops/updateArray.d.ts +1 -0
- package/build/data/ops/updateArray.js +23 -0
- package/build/data/ops/updateArray.spec.d.ts +1 -0
- package/build/data/ops/updateArray.spec.js +33 -0
- package/build/data/ops/updateTree.d.ts +1 -0
- package/build/data/ops/updateTree.js +14 -0
- package/build/data/ops/updateTree.spec.d.ts +1 -0
- package/build/data/ops/updateTree.spec.js +44 -0
- package/build/data/test-types.d.ts +1 -0
- package/build/data/test-types.js +2 -0
- package/build/hooks/createLocalStorageRef.d.ts +2 -0
- package/build/hooks/createLocalStorageRef.js +22 -0
- package/build/hooks/index.d.ts +8 -0
- package/build/hooks/index.js +8 -0
- package/build/hooks/invokeCallback.d.ts +2 -0
- package/build/hooks/invokeCallback.js +8 -0
- package/build/hooks/invokeCallback.spec.d.ts +1 -0
- package/build/hooks/invokeCallback.spec.js +44 -0
- package/build/hooks/resolveCallback.d.ts +2 -0
- package/build/hooks/resolveCallback.js +13 -0
- package/build/hooks/resolveCallback.spec.d.ts +1 -0
- package/build/hooks/resolveCallback.spec.js +35 -0
- package/build/hooks/store.d.ts +11 -0
- package/build/hooks/store.js +38 -0
- package/build/hooks/store.spec.d.ts +1 -0
- package/build/hooks/store.spec.js +48 -0
- package/build/hooks/useEffect.d.ts +2 -0
- package/build/hooks/useEffect.js +13 -0
- package/build/hooks/useInterval.d.ts +1 -0
- package/build/hooks/useInterval.js +7 -0
- package/build/hooks/useState.d.ts +2 -0
- package/build/hooks/useState.js +17 -0
- package/build/hooks/useTrigger.d.ts +3 -0
- package/build/hooks/useTrigger.js +22 -0
- package/build/hooks/useTrigger.spec.d.ts +1 -0
- package/build/hooks/useTrigger.spec.js +59 -0
- package/build/index.d.ts +7 -0
- package/build/index.js +7 -0
- package/build/jsx-runtime.d.ts +31 -0
- package/build/jsx-runtime.js +27 -0
- package/build/locale/de-de.d.ts +1 -0
- package/build/locale/de-de.js +62 -0
- package/build/locale/en-us.d.ts +1 -0
- package/build/locale/en-us.js +62 -0
- package/build/locale/es-es.d.ts +1 -0
- package/build/locale/es-es.js +62 -0
- package/build/locale/fr-fr.d.ts +1 -0
- package/build/locale/fr-fr.js +62 -0
- package/build/locale/nl-nl.d.ts +1 -0
- package/build/locale/nl-nl.js +62 -0
- package/build/locale/pt-pt.d.ts +1 -0
- package/build/locale/pt-pt.js +62 -0
- package/build/locale/sr-latn-ba.d.ts +1 -0
- package/build/locale/sr-latn-ba.js +62 -0
- package/build/svg/BoundedObject.d.ts +39 -0
- package/build/svg/BoundedObject.js +51 -0
- package/build/svg/ClipRect.d.ts +11 -0
- package/build/svg/ClipRect.js +18 -0
- package/build/svg/Ellipse.d.ts +27 -0
- package/build/svg/Ellipse.js +22 -0
- package/build/svg/Line.d.ts +26 -0
- package/build/svg/Line.js +19 -0
- package/build/svg/NonOverlappingRect.d.ts +12 -0
- package/build/svg/NonOverlappingRect.js +17 -0
- package/build/svg/NonOverlappingRectGroup.d.ts +15 -0
- package/build/svg/NonOverlappingRectGroup.js +38 -0
- package/build/svg/Rectangle.d.ts +40 -0
- package/build/svg/Rectangle.js +27 -0
- package/build/svg/Svg.d.ts +49 -0
- package/build/svg/Svg.js +132 -0
- package/build/svg/Text.d.ts +48 -0
- package/build/svg/Text.js +60 -0
- package/build/svg/TextualBoundedObject.d.ts +7 -0
- package/build/svg/TextualBoundedObject.js +22 -0
- package/build/svg/index.d.ts +11 -0
- package/build/svg/index.js +11 -0
- package/build/svg/util/Rect.d.ts +31 -0
- package/build/svg/util/Rect.js +83 -0
- package/build/svg/util/index.d.ts +1 -0
- package/build/svg/util/index.js +1 -0
- package/build/ui/CSS.d.ts +10 -0
- package/build/ui/CSS.js +77 -0
- package/build/ui/CSSHelper.d.ts +5 -0
- package/build/ui/CSSHelper.js +15 -0
- package/build/ui/Container.d.ts +55 -0
- package/build/ui/Container.js +160 -0
- package/build/ui/ContentResolver.d.ts +51 -0
- package/build/ui/ContentResolver.js +71 -0
- package/build/ui/Controller.d.ts +64 -0
- package/build/ui/Controller.js +110 -0
- package/build/ui/Controller.spec.d.ts +1 -0
- package/build/ui/Controller.spec.js +251 -0
- package/build/ui/Culture.d.ts +39 -0
- package/build/ui/Culture.js +124 -0
- package/build/ui/Cx.d.ts +57 -0
- package/build/ui/Cx.js +277 -0
- package/build/ui/Cx.spec.d.ts +1 -0
- package/build/ui/Cx.spec.js +153 -0
- package/build/ui/DataProxy.d.ts +24 -0
- package/build/ui/DataProxy.js +26 -0
- package/build/ui/DataProxy.spec.d.ts +1 -0
- package/build/ui/DataProxy.spec.js +208 -0
- package/build/ui/DetachedScope.d.ts +61 -0
- package/build/ui/DetachedScope.js +84 -0
- package/build/ui/FocusManager.d.ts +16 -0
- package/build/ui/FocusManager.js +149 -0
- package/build/ui/Format.d.ts +4 -0
- package/build/ui/Format.js +96 -0
- package/build/ui/HoverSync.d.ts +30 -0
- package/build/ui/HoverSync.js +129 -0
- package/build/ui/Instance.d.ts +219 -0
- package/build/ui/Instance.js +613 -0
- package/build/ui/IsolatedScope.d.ts +19 -0
- package/build/ui/IsolatedScope.js +31 -0
- package/build/ui/IsolatedScope.spec.d.ts +1 -0
- package/build/ui/IsolatedScope.spec.js +42 -0
- package/build/ui/Localization.d.ts +9 -0
- package/build/ui/Localization.js +63 -0
- package/build/ui/Prop.d.ts +83 -0
- package/build/ui/Prop.js +1 -0
- package/build/ui/PureContainer.d.ts +9 -0
- package/build/ui/PureContainer.js +9 -0
- package/build/ui/RenderingContext.d.ts +19 -0
- package/build/ui/RenderingContext.js +84 -0
- package/build/ui/Repeater.d.ts +73 -0
- package/build/ui/Repeater.js +99 -0
- package/build/ui/Repeater.spec.d.ts +1 -0
- package/build/ui/Repeater.spec.js +109 -0
- package/build/ui/Rescope.d.ts +18 -0
- package/build/ui/Rescope.js +31 -0
- package/build/ui/Rescope.spec.d.ts +1 -0
- package/build/ui/Rescope.spec.js +134 -0
- package/build/ui/ResizeManager.d.ts +5 -0
- package/build/ui/ResizeManager.js +24 -0
- package/build/ui/Restate.d.ts +44 -0
- package/build/ui/Restate.js +142 -0
- package/build/ui/Restate.spec.d.ts +1 -0
- package/build/ui/Restate.spec.js +257 -0
- package/build/ui/StaticText.d.ts +5 -0
- package/build/ui/StaticText.js +7 -0
- package/build/ui/StructuredInstanceDataAccessor.d.ts +13 -0
- package/build/ui/StructuredInstanceDataAccessor.js +30 -0
- package/build/ui/Text.d.ts +10 -0
- package/build/ui/Text.js +21 -0
- package/build/ui/VDOM.d.ts +20 -0
- package/build/ui/VDOM.js +3 -0
- package/build/ui/Widget.d.ts +111 -0
- package/build/ui/Widget.js +170 -0
- package/build/ui/ZIndexManager.d.ts +4 -0
- package/build/ui/ZIndexManager.js +9 -0
- package/build/ui/adapter/ArrayAdapter.d.ts +48 -0
- package/build/ui/adapter/ArrayAdapter.js +148 -0
- package/build/ui/adapter/ArrayAdapter.spec.d.ts +1 -0
- package/build/ui/adapter/ArrayAdapter.spec.js +44 -0
- package/build/ui/adapter/DataAdapter.d.ts +30 -0
- package/build/ui/adapter/DataAdapter.js +13 -0
- package/build/ui/adapter/GroupAdapter.d.ts +57 -0
- package/build/ui/adapter/GroupAdapter.js +137 -0
- package/build/ui/adapter/TreeAdapter.d.ts +51 -0
- package/build/ui/adapter/TreeAdapter.js +98 -0
- package/build/ui/adapter/TreeAdapter.spec.d.ts +1 -0
- package/build/ui/adapter/TreeAdapter.spec.js +71 -0
- package/build/ui/adapter/index.d.ts +4 -0
- package/build/ui/adapter/index.js +4 -0
- package/build/ui/app/History.d.ts +18 -0
- package/build/ui/app/History.js +109 -0
- package/build/ui/app/Url.d.ts +13 -0
- package/build/ui/app/Url.js +86 -0
- package/build/ui/app/Url.spec.d.ts +1 -0
- package/build/ui/app/Url.spec.js +43 -0
- package/build/ui/app/index.d.ts +4 -0
- package/build/ui/app/index.js +4 -0
- package/build/ui/app/startAppLoop.d.ts +10 -0
- package/build/ui/app/startAppLoop.js +53 -0
- package/build/ui/app/startHotAppLoop.d.ts +11 -0
- package/build/ui/app/startHotAppLoop.js +22 -0
- package/build/ui/batchUpdates.d.ts +5 -0
- package/build/ui/batchUpdates.js +60 -0
- package/build/ui/bind.d.ts +3 -0
- package/build/ui/bind.js +7 -0
- package/build/ui/createFunctionalComponent.d.ts +2 -0
- package/build/ui/createFunctionalComponent.js +58 -0
- package/build/ui/createFunctionalComponent.spec.d.ts +1 -0
- package/build/ui/createFunctionalComponent.spec.js +272 -0
- package/build/ui/expr.d.ts +11 -0
- package/build/ui/expr.js +17 -0
- package/build/ui/flattenProps.d.ts +1 -0
- package/build/ui/flattenProps.js +18 -0
- package/build/ui/index.d.ts +40 -0
- package/build/ui/index.js +41 -0
- package/build/ui/keyboardShortcuts.d.ts +10 -0
- package/build/ui/keyboardShortcuts.js +27 -0
- package/build/ui/layout/Content.d.ts +14 -0
- package/build/ui/layout/Content.js +15 -0
- package/build/ui/layout/ContentPlaceholder.d.ts +35 -0
- package/build/ui/layout/ContentPlaceholder.js +105 -0
- package/build/ui/layout/ContentPlaceholder.spec.d.ts +1 -0
- package/build/ui/layout/ContentPlaceholder.spec.js +333 -0
- package/build/ui/layout/FirstVisibleChildLayout.d.ts +7 -0
- package/build/ui/layout/FirstVisibleChildLayout.js +58 -0
- package/build/ui/layout/FirstVisibleChildLayout.spec.d.ts +1 -0
- package/build/ui/layout/FirstVisibleChildLayout.spec.js +101 -0
- package/build/ui/layout/LabelsLeftLayout.d.ts +17 -0
- package/build/ui/layout/LabelsLeftLayout.js +50 -0
- package/build/ui/layout/LabelsTopLayout.d.ts +36 -0
- package/build/ui/layout/LabelsTopLayout.js +97 -0
- package/build/ui/layout/UseParentLayout.d.ts +4 -0
- package/build/ui/layout/UseParentLayout.js +5 -0
- package/build/ui/layout/exploreChildren.d.ts +4 -0
- package/build/ui/layout/exploreChildren.js +27 -0
- package/build/ui/layout/index.d.ts +7 -0
- package/build/ui/layout/index.js +7 -0
- package/build/ui/selection/KeySelection.d.ts +37 -0
- package/build/ui/selection/KeySelection.js +125 -0
- package/build/ui/selection/PropertySelection.d.ts +26 -0
- package/build/ui/selection/PropertySelection.js +51 -0
- package/build/ui/selection/Selection.d.ts +35 -0
- package/build/ui/selection/Selection.js +75 -0
- package/build/ui/selection/index.d.ts +3 -0
- package/build/ui/selection/index.js +3 -0
- package/build/ui/tpl.d.ts +3 -0
- package/build/ui/tpl.js +5 -0
- package/build/util/Component.d.ts +149 -0
- package/build/util/Component.js +109 -0
- package/build/util/Console.d.ts +4 -0
- package/build/util/Console.js +10 -0
- package/build/util/DOM.d.ts +24 -0
- package/build/util/DOM.js +64 -0
- package/build/util/Debug.d.ts +25 -0
- package/build/util/Debug.js +42 -0
- package/build/util/Format.d.ts +14 -0
- package/build/util/Format.js +229 -0
- package/build/util/Format.spec.d.ts +1 -0
- package/build/util/Format.spec.js +58 -0
- package/build/util/GlobalCacheIdentifier.d.ts +4 -0
- package/build/util/GlobalCacheIdentifier.js +9 -0
- package/build/util/KeyCode.d.ts +21 -0
- package/build/util/KeyCode.js +21 -0
- package/build/util/SubscriberList.d.ts +39 -0
- package/build/util/SubscriberList.js +70 -0
- package/build/util/Timing.d.ts +15 -0
- package/build/util/Timing.js +49 -0
- package/build/util/TraversalStack.d.ts +8 -0
- package/build/util/TraversalStack.js +37 -0
- package/build/util/TraversalStack.spec.d.ts +1 -0
- package/build/util/TraversalStack.spec.js +43 -0
- package/build/util/addEventListenerWithOptions.d.ts +17 -0
- package/build/util/addEventListenerWithOptions.js +8 -0
- package/build/util/browserSupportsPassiveEventHandlers.d.ts +5 -0
- package/build/util/browserSupportsPassiveEventHandlers.js +20 -0
- package/build/util/calculateNaturalElementHeight.d.ts +1 -0
- package/build/util/calculateNaturalElementHeight.js +24 -0
- package/build/util/capitalize.d.ts +1 -0
- package/build/util/capitalize.js +5 -0
- package/build/util/coalesce.d.ts +1 -0
- package/build/util/coalesce.js +7 -0
- package/build/util/color/hslToRgb.d.ts +8 -0
- package/build/util/color/hslToRgb.js +38 -0
- package/build/util/color/index.d.ts +4 -0
- package/build/util/color/index.js +4 -0
- package/build/util/color/parseColor.d.ts +57 -0
- package/build/util/color/parseColor.js +114 -0
- package/build/util/color/rgbToHex.d.ts +8 -0
- package/build/util/color/rgbToHex.js +14 -0
- package/build/util/color/rgbToHsl.d.ts +8 -0
- package/build/util/color/rgbToHsl.js +35 -0
- package/build/util/date/dateDiff.d.ts +7 -0
- package/build/util/date/dateDiff.js +10 -0
- package/build/util/date/diff.d.ts +7 -0
- package/build/util/date/diff.js +11 -0
- package/build/util/date/encodeDate.d.ts +1 -0
- package/build/util/date/encodeDate.js +7 -0
- package/build/util/date/encodeDateWithTimezoneOffset.d.ts +1 -0
- package/build/util/date/encodeDateWithTimezoneOffset.js +16 -0
- package/build/util/date/index.d.ts +11 -0
- package/build/util/date/index.js +11 -0
- package/build/util/date/lowerBoundCheck.d.ts +8 -0
- package/build/util/date/lowerBoundCheck.js +12 -0
- package/build/util/date/maxDate.d.ts +6 -0
- package/build/util/date/maxDate.js +13 -0
- package/build/util/date/minDate.d.ts +6 -0
- package/build/util/date/minDate.js +13 -0
- package/build/util/date/monthStart.d.ts +6 -0
- package/build/util/date/monthStart.js +8 -0
- package/build/util/date/parseDateInvariant.d.ts +2 -0
- package/build/util/date/parseDateInvariant.js +18 -0
- package/build/util/date/sameDate.d.ts +7 -0
- package/build/util/date/sameDate.js +11 -0
- package/build/util/date/upperBoundCheck.d.ts +8 -0
- package/build/util/date/upperBoundCheck.js +12 -0
- package/build/util/date/upperBoundCheck.spec.d.ts +1 -0
- package/build/util/date/upperBoundCheck.spec.js +22 -0
- package/build/util/date/zeroTime.d.ts +7 -0
- package/build/util/date/zeroTime.js +9 -0
- package/build/util/debounce.d.ts +5 -0
- package/build/util/debounce.js +15 -0
- package/build/util/dummyCallback.d.ts +1 -0
- package/build/util/dummyCallback.js +1 -0
- package/build/util/escapeSpecialRegexCharacters.d.ts +6 -0
- package/build/util/escapeSpecialRegexCharacters.js +8 -0
- package/build/util/eventCallbacks.d.ts +7 -0
- package/build/util/eventCallbacks.js +6 -0
- package/build/util/expandFatArrows.d.ts +1 -0
- package/build/util/expandFatArrows.js +104 -0
- package/build/util/findScrollableParent.d.ts +1 -0
- package/build/util/findScrollableParent.js +16 -0
- package/build/util/getActiveElement.d.ts +1 -0
- package/build/util/getActiveElement.js +4 -0
- package/build/util/getParentFrameBoundingClientRect.d.ts +1 -0
- package/build/util/getParentFrameBoundingClientRect.js +13 -0
- package/build/util/getScrollerBoundingClientRect.d.ts +1 -0
- package/build/util/getScrollerBoundingClientRect.js +10 -0
- package/build/util/getSearchQueryPredicate.d.ts +2 -0
- package/build/util/getSearchQueryPredicate.js +54 -0
- package/build/util/getSearchQueryPredicate.spec.d.ts +1 -0
- package/build/util/getSearchQueryPredicate.spec.js +33 -0
- package/build/util/getTopLevelBoundingClientRect.d.ts +1 -0
- package/build/util/getTopLevelBoundingClientRect.js +6 -0
- package/build/util/getVendorPrefix.d.ts +1 -0
- package/build/util/getVendorPrefix.js +22 -0
- package/build/util/hasKey.d.ts +4 -0
- package/build/util/hasKey.js +14 -0
- package/build/util/index.d.ts +55 -0
- package/build/util/index.js +55 -0
- package/build/util/innerTextTrim.d.ts +6 -0
- package/build/util/innerTextTrim.js +10 -0
- package/build/util/isArray.d.ts +1 -0
- package/build/util/isArray.js +3 -0
- package/build/util/isDataRecord.d.ts +1 -0
- package/build/util/isDataRecord.js +4 -0
- package/build/util/isDefined.d.ts +1 -0
- package/build/util/isDefined.js +3 -0
- package/build/util/isDigit.d.ts +6 -0
- package/build/util/isDigit.js +8 -0
- package/build/util/isFunction.d.ts +1 -0
- package/build/util/isFunction.js +3 -0
- package/build/util/isNonEmptyArray.d.ts +1 -0
- package/build/util/isNonEmptyArray.js +3 -0
- package/build/util/isNumber.d.ts +1 -0
- package/build/util/isNumber.js +3 -0
- package/build/util/isObject.d.ts +1 -0
- package/build/util/isObject.js +3 -0
- package/build/util/isPromise.d.ts +1 -0
- package/build/util/isPromise.js +5 -0
- package/build/util/isString.d.ts +1 -0
- package/build/util/isString.js +3 -0
- package/build/util/isTextInputElement.d.ts +1 -0
- package/build/util/isTextInputElement.js +3 -0
- package/build/util/isTouchDevice.d.ts +1 -0
- package/build/util/isTouchDevice.js +6 -0
- package/build/util/isTouchEvent.d.ts +2 -0
- package/build/util/isTouchEvent.js +43 -0
- package/build/util/isUndefined.d.ts +1 -0
- package/build/util/isUndefined.js +3 -0
- package/build/util/isValidIdentifierName.d.ts +1 -0
- package/build/util/isValidIdentifierName.js +4 -0
- package/build/util/isValidIdentifierName.spec.d.ts +1 -0
- package/build/util/isValidIdentifierName.spec.js +28 -0
- package/build/util/onIdleCallback.d.ts +1 -0
- package/build/util/onIdleCallback.js +13 -0
- package/build/util/parseStyle.d.ts +2 -0
- package/build/util/parseStyle.js +22 -0
- package/build/util/quote.d.ts +2 -0
- package/build/util/quote.js +5 -0
- package/build/util/reverseSlice.d.ts +1 -0
- package/build/util/reverseSlice.js +10 -0
- package/build/util/routeAppend.d.ts +1 -0
- package/build/util/routeAppend.js +16 -0
- package/build/util/routeAppend.spec.d.ts +1 -0
- package/build/util/routeAppend.spec.js +14 -0
- package/build/util/scrollElementIntoView.d.ts +1 -0
- package/build/util/scrollElementIntoView.js +28 -0
- package/build/util/shallowEquals.d.ts +1 -0
- package/build/util/shallowEquals.js +30 -0
- package/build/util/test/createTestRenderer.d.ts +5 -0
- package/build/util/test/createTestRenderer.js +10 -0
- package/build/util/throttle.d.ts +9 -0
- package/build/util/throttle.js +19 -0
- package/build/util/validatedDebounce.d.ts +3 -0
- package/build/util/validatedDebounce.js +18 -0
- package/build/widgets/AccessorBindings.spec.d.ts +1 -0
- package/build/widgets/AccessorBindings.spec.js +40 -0
- package/build/widgets/Button.d.ts +57 -0
- package/build/widgets/Button.js +105 -0
- package/build/widgets/CxCredit.d.ts +11 -0
- package/build/widgets/CxCredit.js +25 -0
- package/build/widgets/DocumentTitle.d.ts +27 -0
- package/build/widgets/DocumentTitle.js +57 -0
- package/build/widgets/FlexBox.d.ts +79 -0
- package/build/widgets/FlexBox.js +77 -0
- package/build/widgets/Heading.d.ts +16 -0
- package/build/widgets/Heading.js +24 -0
- package/build/widgets/HighlightedSearchText.d.ts +18 -0
- package/build/widgets/HighlightedSearchText.js +32 -0
- package/build/widgets/HtmlElement.d.ts +46 -0
- package/build/widgets/HtmlElement.js +253 -0
- package/build/widgets/HtmlElement.spec.d.ts +1 -0
- package/build/widgets/HtmlElement.spec.js +38 -0
- package/build/widgets/Icon.d.ts +29 -0
- package/build/widgets/Icon.js +39 -0
- package/build/widgets/List.d.ts +122 -0
- package/build/widgets/List.js +510 -0
- package/build/widgets/ProgressBar.d.ts +20 -0
- package/build/widgets/ProgressBar.js +29 -0
- package/build/widgets/Resizer.d.ts +30 -0
- package/build/widgets/Resizer.js +111 -0
- package/build/widgets/Sandbox.d.ts +40 -0
- package/build/widgets/Sandbox.js +54 -0
- package/build/widgets/Section.d.ts +52 -0
- package/build/widgets/Section.js +93 -0
- package/build/widgets/autoFocus.d.ts +1 -0
- package/build/widgets/autoFocus.js +9 -0
- package/build/widgets/cx.d.ts +2 -0
- package/build/widgets/cx.js +53 -0
- package/build/widgets/drag-drop/DragHandle.d.ts +12 -0
- package/build/widgets/drag-drop/DragHandle.js +23 -0
- package/build/widgets/drag-drop/DragSource.d.ts +55 -0
- package/build/widgets/drag-drop/DragSource.js +135 -0
- package/build/widgets/drag-drop/DropZone.d.ts +103 -0
- package/build/widgets/drag-drop/DropZone.js +173 -0
- package/build/widgets/drag-drop/index.d.ts +4 -0
- package/build/widgets/drag-drop/index.js +4 -0
- package/build/widgets/drag-drop/ops.d.ts +55 -0
- package/build/widgets/drag-drop/ops.js +292 -0
- package/build/widgets/enableAllInternalDependencies.d.ts +1 -0
- package/build/widgets/enableAllInternalDependencies.js +10 -0
- package/build/widgets/form/Calendar.d.ts +130 -0
- package/build/widgets/form/Calendar.js +445 -0
- package/build/widgets/form/Checkbox.d.ts +46 -0
- package/build/widgets/form/Checkbox.js +157 -0
- package/build/widgets/form/ColorField.d.ts +49 -0
- package/build/widgets/form/ColorField.js +310 -0
- package/build/widgets/form/ColorPicker.d.ts +46 -0
- package/build/widgets/form/ColorPicker.js +304 -0
- package/build/widgets/form/DateField.d.ts +8 -0
- package/build/widgets/form/DateField.js +12 -0
- package/build/widgets/form/DateTimeField.d.ts +98 -0
- package/build/widgets/form/DateTimeField.js +474 -0
- package/build/widgets/form/DateTimePicker.d.ts +17 -0
- package/build/widgets/form/DateTimePicker.js +248 -0
- package/build/widgets/form/Field.d.ts +140 -0
- package/build/widgets/form/Field.js +369 -0
- package/build/widgets/form/FieldGroup.d.ts +5 -0
- package/build/widgets/form/FieldGroup.js +5 -0
- package/build/widgets/form/FieldIcon.d.ts +22 -0
- package/build/widgets/form/FieldIcon.js +41 -0
- package/build/widgets/form/HelpText.d.ts +6 -0
- package/build/widgets/form/HelpText.js +10 -0
- package/build/widgets/form/Label.d.ts +27 -0
- package/build/widgets/form/Label.js +74 -0
- package/build/widgets/form/LabeledContainer.d.ts +30 -0
- package/build/widgets/form/LabeledContainer.js +48 -0
- package/build/widgets/form/LookupField.d.ts +124 -0
- package/build/widgets/form/LookupField.js +907 -0
- package/build/widgets/form/MonthField.d.ts +104 -0
- package/build/widgets/form/MonthField.js +423 -0
- package/build/widgets/form/MonthPicker.d.ts +125 -0
- package/build/widgets/form/MonthPicker.js +557 -0
- package/build/widgets/form/NumberField.d.ts +63 -0
- package/build/widgets/form/NumberField.js +361 -0
- package/build/widgets/form/Radio.d.ts +43 -0
- package/build/widgets/form/Radio.js +131 -0
- package/build/widgets/form/Select.d.ts +40 -0
- package/build/widgets/form/Select.js +183 -0
- package/build/widgets/form/Slider.d.ts +68 -0
- package/build/widgets/form/Slider.js +264 -0
- package/build/widgets/form/Switch.d.ts +41 -0
- package/build/widgets/form/Switch.js +94 -0
- package/build/widgets/form/TextArea.d.ts +20 -0
- package/build/widgets/form/TextArea.js +128 -0
- package/build/widgets/form/TextField.d.ts +49 -0
- package/build/widgets/form/TextField.js +202 -0
- package/build/widgets/form/TimeField.d.ts +3 -0
- package/build/widgets/form/TimeField.js +8 -0
- package/build/widgets/form/TimeList.d.ts +1 -0
- package/build/widgets/form/TimeList.js +89 -0
- package/build/widgets/form/UploadButton.d.ts +17 -0
- package/build/widgets/form/UploadButton.js +163 -0
- package/build/widgets/form/ValidationError.d.ts +27 -0
- package/build/widgets/form/ValidationError.js +33 -0
- package/build/widgets/form/ValidationGroup.d.ts +63 -0
- package/build/widgets/form/ValidationGroup.js +58 -0
- package/build/widgets/form/ValidationGroup.spec.d.ts +1 -0
- package/build/widgets/form/ValidationGroup.spec.js +62 -0
- package/build/widgets/form/Validator.d.ts +8 -0
- package/build/widgets/form/Validator.js +19 -0
- package/build/widgets/form/Wheel.d.ts +61 -0
- package/build/widgets/form/Wheel.js +178 -0
- package/build/widgets/form/index.d.ts +28 -0
- package/build/widgets/form/index.js +28 -0
- package/build/widgets/grid/Grid.d.ts +517 -0
- package/build/widgets/grid/Grid.js +2756 -0
- package/build/widgets/grid/GridCell.d.ts +68 -0
- package/build/widgets/grid/GridCell.js +61 -0
- package/build/widgets/grid/GridCellEditor.d.ts +10 -0
- package/build/widgets/grid/GridCellEditor.js +29 -0
- package/build/widgets/grid/GridRow.d.ts +87 -0
- package/build/widgets/grid/GridRow.js +192 -0
- package/build/widgets/grid/GridRowLine.d.ts +27 -0
- package/build/widgets/grid/GridRowLine.js +24 -0
- package/build/widgets/grid/Pagination.d.ts +23 -0
- package/build/widgets/grid/Pagination.js +73 -0
- package/build/widgets/grid/TreeNode.d.ts +42 -0
- package/build/widgets/grid/TreeNode.js +82 -0
- package/build/widgets/grid/createGridCellEditor.d.ts +2 -0
- package/build/widgets/grid/createGridCellEditor.js +6 -0
- package/build/widgets/grid/index.d.ts +10 -0
- package/build/widgets/grid/index.js +10 -0
- package/build/widgets/icons/calendar.d.ts +2 -0
- package/build/widgets/icons/calendar.js +5 -0
- package/build/widgets/icons/check.d.ts +2 -0
- package/build/widgets/icons/check.js +5 -0
- package/build/widgets/icons/clear.d.ts +2 -0
- package/build/widgets/icons/clear.js +5 -0
- package/build/widgets/icons/close.d.ts +2 -0
- package/build/widgets/icons/close.js +5 -0
- package/build/widgets/icons/cx.d.ts +2 -0
- package/build/widgets/icons/cx.js +5 -0
- package/build/widgets/icons/drop-down.d.ts +2 -0
- package/build/widgets/icons/drop-down.js +5 -0
- package/build/widgets/icons/file.d.ts +2 -0
- package/build/widgets/icons/file.js +5 -0
- package/build/widgets/icons/folder-open.d.ts +2 -0
- package/build/widgets/icons/folder-open.js +5 -0
- package/build/widgets/icons/folder.d.ts +2 -0
- package/build/widgets/icons/folder.js +5 -0
- package/build/widgets/icons/forward.d.ts +2 -0
- package/build/widgets/icons/forward.js +5 -0
- package/build/widgets/icons/index.d.ts +12 -0
- package/build/widgets/icons/index.js +12 -0
- package/build/widgets/icons/loading.d.ts +2 -0
- package/build/widgets/icons/loading.js +14 -0
- package/build/widgets/icons/menu.d.ts +2 -0
- package/build/widgets/icons/menu.js +5 -0
- package/build/widgets/icons/pixel-picker.d.ts +2 -0
- package/build/widgets/icons/pixel-picker.js +5 -0
- package/build/widgets/icons/registry.d.ts +9 -0
- package/build/widgets/icons/registry.js +40 -0
- package/build/widgets/icons/search.d.ts +2 -0
- package/build/widgets/icons/search.js +5 -0
- package/build/widgets/icons/sort-asc.d.ts +2 -0
- package/build/widgets/icons/sort-asc.js +5 -0
- package/build/widgets/icons/square.d.ts +2 -0
- package/build/widgets/icons/square.js +5 -0
- package/build/widgets/index.d.ts +36 -0
- package/build/widgets/index.js +37 -0
- package/build/widgets/nav/Link.d.ts +6 -0
- package/build/widgets/nav/Link.js +6 -0
- package/build/widgets/nav/LinkButton.d.ts +45 -0
- package/build/widgets/nav/LinkButton.js +110 -0
- package/build/widgets/nav/Menu.d.ts +48 -0
- package/build/widgets/nav/Menu.js +336 -0
- package/build/widgets/nav/MenuItem.d.ts +68 -0
- package/build/widgets/nav/MenuItem.js +364 -0
- package/build/widgets/nav/MenuSpacer.d.ts +13 -0
- package/build/widgets/nav/MenuSpacer.js +11 -0
- package/build/widgets/nav/RedirectRoute.d.ts +14 -0
- package/build/widgets/nav/RedirectRoute.js +30 -0
- package/build/widgets/nav/Route.d.ts +40 -0
- package/build/widgets/nav/Route.js +94 -0
- package/build/widgets/nav/Route.spec.d.ts +1 -0
- package/build/widgets/nav/Route.spec.js +15 -0
- package/build/widgets/nav/Scroller.d.ts +55 -0
- package/build/widgets/nav/Scroller.js +125 -0
- package/build/widgets/nav/Submenu.d.ts +3 -0
- package/build/widgets/nav/Submenu.js +3 -0
- package/build/widgets/nav/Tab.d.ts +40 -0
- package/build/widgets/nav/Tab.js +66 -0
- package/build/widgets/nav/index.d.ts +10 -0
- package/build/widgets/nav/index.js +10 -0
- package/build/widgets/overlay/ContextMenu.d.ts +9 -0
- package/build/widgets/overlay/ContextMenu.js +31 -0
- package/build/widgets/overlay/Dropdown.d.ts +120 -0
- package/build/widgets/overlay/Dropdown.js +522 -0
- package/build/widgets/overlay/FlyweightTooltipTracker.d.ts +22 -0
- package/build/widgets/overlay/FlyweightTooltipTracker.js +39 -0
- package/build/widgets/overlay/MsgBox.d.ts +25 -0
- package/build/widgets/overlay/MsgBox.js +67 -0
- package/build/widgets/overlay/Overlay.d.ts +183 -0
- package/build/widgets/overlay/Overlay.js +597 -0
- package/build/widgets/overlay/Toast.d.ts +27 -0
- package/build/widgets/overlay/Toast.js +76 -0
- package/build/widgets/overlay/Tooltip.d.ts +55 -0
- package/build/widgets/overlay/Tooltip.js +307 -0
- package/build/widgets/overlay/Window.d.ts +65 -0
- package/build/widgets/overlay/Window.js +154 -0
- package/build/widgets/overlay/alerts.d.ts +12 -0
- package/build/widgets/overlay/alerts.js +31 -0
- package/build/widgets/overlay/captureMouse.d.ts +57 -0
- package/build/widgets/overlay/captureMouse.js +147 -0
- package/build/widgets/overlay/createHotPromiseWindowFactory.d.ts +10 -0
- package/build/widgets/overlay/createHotPromiseWindowFactory.js +54 -0
- package/build/widgets/overlay/index.d.ts +11 -0
- package/build/widgets/overlay/index.js +11 -0
- package/build/widgets/overlay/tooltip-ops.d.ts +73 -0
- package/build/widgets/overlay/tooltip-ops.js +34 -0
- package/dist/manifest.js +844 -844
- package/dist/util.js +0 -1
- package/dist/widgets.js +1 -2
- package/package.json +3 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PointReducer, PointReducerConfig, PointReducerInstance, PointReducerAccumulator } from "./PointReducer";
|
|
2
|
+
import { Bind, StructuredProp } from "../../ui/Prop";
|
|
3
|
+
import { AccessorChain } from "../../data/createAccessorModelProxy";
|
|
4
|
+
export interface MinMaxAccumulator extends PointReducerAccumulator {
|
|
5
|
+
params: any;
|
|
6
|
+
min: {
|
|
7
|
+
x: any;
|
|
8
|
+
y: any;
|
|
9
|
+
p?: any;
|
|
10
|
+
};
|
|
11
|
+
max: {
|
|
12
|
+
x: any;
|
|
13
|
+
y: any;
|
|
14
|
+
p?: any;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface MinMaxFinderConfig extends PointReducerConfig {
|
|
18
|
+
/** A binding used to receive the x value of the point with the minimum value */
|
|
19
|
+
minX?: Bind | AccessorChain<number>;
|
|
20
|
+
/** A binding used to receive the y value of the point with the minimum value */
|
|
21
|
+
minY?: Bind | AccessorChain<number>;
|
|
22
|
+
/** A binding used to receive the x value of the point with the maximum value */
|
|
23
|
+
maxX?: Bind | AccessorChain<number>;
|
|
24
|
+
/** A binding used to receive the y value of the point with the maximum value */
|
|
25
|
+
maxY?: Bind | AccessorChain<number>;
|
|
26
|
+
/** An object used for filtering data points. Available as accumulator.params inside the onMap function. */
|
|
27
|
+
params?: StructuredProp;
|
|
28
|
+
}
|
|
29
|
+
/** Find minimum and maximum points of a point series */
|
|
30
|
+
export declare class MinMaxFinder extends PointReducer<MinMaxAccumulator> {
|
|
31
|
+
constructor(config?: MinMaxFinderConfig);
|
|
32
|
+
declareData(...args: any[]): void;
|
|
33
|
+
onInitAccumulator: (acc: MinMaxAccumulator, { data }: PointReducerInstance<MinMaxAccumulator>) => void;
|
|
34
|
+
onMap: (acc: MinMaxAccumulator, x: any, y: any, name: string, p: any) => void;
|
|
35
|
+
onReduce: (acc: MinMaxAccumulator, instance: PointReducerInstance<MinMaxAccumulator>) => void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PointReducer } from "./PointReducer";
|
|
2
|
+
/** Find minimum and maximum points of a point series */
|
|
3
|
+
export class MinMaxFinder extends PointReducer {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
super(config);
|
|
6
|
+
}
|
|
7
|
+
declareData(...args) {
|
|
8
|
+
super.declareData(...args, {
|
|
9
|
+
minX: undefined,
|
|
10
|
+
minY: undefined,
|
|
11
|
+
maxX: undefined,
|
|
12
|
+
maxY: undefined,
|
|
13
|
+
params: {
|
|
14
|
+
structured: true,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
onInitAccumulator = (acc, { data }) => {
|
|
19
|
+
acc.params = data.params;
|
|
20
|
+
acc.min = { x: null, y: null };
|
|
21
|
+
acc.max = { x: null, y: null };
|
|
22
|
+
};
|
|
23
|
+
onMap = (acc, x, y, name, p) => {
|
|
24
|
+
if (y != null && (acc.max.y == null || acc.max.y < y))
|
|
25
|
+
acc.max = { x, y, p };
|
|
26
|
+
if (y != null && (acc.min.y == null || acc.min.y > y))
|
|
27
|
+
acc.min = { x, y, p };
|
|
28
|
+
};
|
|
29
|
+
onReduce = (acc, instance) => {
|
|
30
|
+
instance.set("minX", acc.min.x);
|
|
31
|
+
instance.set("minY", acc.min.y);
|
|
32
|
+
instance.set("minRecord", acc.min.p);
|
|
33
|
+
instance.set("maxX", acc.max.x);
|
|
34
|
+
instance.set("maxY", acc.max.y);
|
|
35
|
+
instance.set("maxRecord", acc.max.p);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PureContainerBase, PureContainerConfig } from "../../ui/PureContainer";
|
|
2
|
+
import { Instance } from "../../ui/Instance";
|
|
3
|
+
import { RenderingContext } from "../../ui/RenderingContext";
|
|
4
|
+
import { DataRecord, StructuredProp } from "../../ui/Prop";
|
|
5
|
+
export type PointReducerFunction = (x: any, y: any, name: string, data: any, array?: any[], index?: number) => void;
|
|
6
|
+
export interface PointReducerAccumulator {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export interface PointReducerInstance<TAccumulator extends PointReducerAccumulator = PointReducerAccumulator> extends Instance {
|
|
10
|
+
resetAccumulator: () => void;
|
|
11
|
+
pointFilter?: (x: any, y: any, name: string, data: any, array?: any[], index?: number) => boolean;
|
|
12
|
+
accumulator?: TAccumulator;
|
|
13
|
+
parentPointTracker?: PointReducerFunction;
|
|
14
|
+
pointReducer?: PointReducerFunction;
|
|
15
|
+
write?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface PointReducerConfig extends PureContainerConfig {
|
|
18
|
+
/** A callback function used to initialize the accumulator. */
|
|
19
|
+
onInitAccumulator?: string | ((accumulator: DataRecord, instance?: Instance) => void);
|
|
20
|
+
/** A callback function used to collect information about all data points. */
|
|
21
|
+
onMap?: string | ((accumulator: DataRecord, x?: any, y?: any, name?: string, data?: any, array?: any[], index?: number) => void);
|
|
22
|
+
/** A callback function used to process accumulated information and write results. */
|
|
23
|
+
onReduce?: string | ((accumulator: DataRecord, instance?: Instance) => void);
|
|
24
|
+
/** Parameters that trigger filter predicate re-creation. */
|
|
25
|
+
filterParams?: StructuredProp;
|
|
26
|
+
/** A callback function used to create a predicate for filtering points. */
|
|
27
|
+
onCreatePointFilter?: string | ((filterParams: any, instance: Instance) => (x: number, y: number, name: string, data: any, array?: any[], index?: number) => boolean);
|
|
28
|
+
}
|
|
29
|
+
export declare class PointReducer<TAccumulator extends PointReducerAccumulator = PointReducerAccumulator> extends PureContainerBase<PointReducerConfig, PointReducerInstance<TAccumulator>> {
|
|
30
|
+
onCreatePointFilter?: PointReducerConfig["onCreatePointFilter"];
|
|
31
|
+
onInitAccumulator?: (acc: TAccumulator, instance: PointReducerInstance<TAccumulator>) => void;
|
|
32
|
+
onMap?: (acc: TAccumulator, x: any, y: any, name: string, data?: any, array?: any[], index?: number) => void;
|
|
33
|
+
onReduce?: (acc: TAccumulator, instance: PointReducerInstance<TAccumulator>) => void;
|
|
34
|
+
constructor(config?: PointReducerConfig);
|
|
35
|
+
declareData(...args: any[]): void;
|
|
36
|
+
prepareData(context: RenderingContext, instance: PointReducerInstance<TAccumulator>): void;
|
|
37
|
+
explore(context: RenderingContext, instance: PointReducerInstance<TAccumulator>): void;
|
|
38
|
+
exploreCleanup(context: RenderingContext, instance: PointReducerInstance<TAccumulator>): void;
|
|
39
|
+
prepare(context: RenderingContext, instance: PointReducerInstance<TAccumulator>): void;
|
|
40
|
+
prepareCleanup(context: RenderingContext, instance: PointReducerInstance<TAccumulator>): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { PureContainerBase } from "../../ui/PureContainer";
|
|
2
|
+
export class PointReducer extends PureContainerBase {
|
|
3
|
+
constructor(config) {
|
|
4
|
+
super(config);
|
|
5
|
+
}
|
|
6
|
+
declareData(...args) {
|
|
7
|
+
super.declareData(...args, {
|
|
8
|
+
filterParams: {
|
|
9
|
+
structured: true,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
prepareData(context, instance) {
|
|
14
|
+
super.prepareData(context, instance);
|
|
15
|
+
instance.resetAccumulator = () => {
|
|
16
|
+
let accumulator = {};
|
|
17
|
+
if (this.onInitAccumulator) {
|
|
18
|
+
instance.invoke("onInitAccumulator", accumulator, instance);
|
|
19
|
+
instance.accumulator = accumulator;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
if (this.onCreatePointFilter)
|
|
23
|
+
instance.pointFilter = instance.invoke("onCreatePointFilter", instance.data.filterParams, instance);
|
|
24
|
+
}
|
|
25
|
+
explore(context, instance) {
|
|
26
|
+
instance.resetAccumulator();
|
|
27
|
+
let parentPointReducer = context.pointReducer;
|
|
28
|
+
instance.parentPointTracker = parentPointReducer;
|
|
29
|
+
let pointFilter = instance.pointFilter;
|
|
30
|
+
let accumulator = instance.accumulator;
|
|
31
|
+
let onMap = this.onMap && instance.getCallback("onMap");
|
|
32
|
+
instance.pointReducer = (x, y, name, data, array, index) => {
|
|
33
|
+
if (!pointFilter || pointFilter(x, y, name, data, array, index))
|
|
34
|
+
onMap?.(accumulator, x, y, name, data, array, index);
|
|
35
|
+
if (parentPointReducer)
|
|
36
|
+
parentPointReducer(x, y, name, data, array, index);
|
|
37
|
+
};
|
|
38
|
+
instance.write = () => {
|
|
39
|
+
if (this.onReduce)
|
|
40
|
+
instance.invoke("onReduce", accumulator, instance);
|
|
41
|
+
};
|
|
42
|
+
context.push("pointReducer", instance.pointReducer);
|
|
43
|
+
super.explore(context, instance);
|
|
44
|
+
}
|
|
45
|
+
exploreCleanup(context, instance) {
|
|
46
|
+
context.pop("pointReducer");
|
|
47
|
+
}
|
|
48
|
+
prepare(context, instance) {
|
|
49
|
+
context.push("pointReducer", instance.pointReducer);
|
|
50
|
+
}
|
|
51
|
+
prepareCleanup(context, instance) {
|
|
52
|
+
context.pop("pointReducer");
|
|
53
|
+
instance.write?.();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { PointReducer, PointReducerConfig, PointReducerInstance, PointReducerAccumulator } from "./PointReducer";
|
|
2
|
+
import { RenderingContext } from "../../ui/RenderingContext";
|
|
3
|
+
import { NumberProp, Bind, Prop, DataRecord } from "../../ui/Prop";
|
|
4
|
+
import { AccessorChain } from "../../data/createAccessorModelProxy";
|
|
5
|
+
export interface SnapAccumulator extends PointReducerAccumulator {
|
|
6
|
+
cursor: {
|
|
7
|
+
x: number | null;
|
|
8
|
+
y: number | null;
|
|
9
|
+
mapped: boolean;
|
|
10
|
+
mappedX?: number | null;
|
|
11
|
+
mappedY?: number | null;
|
|
12
|
+
};
|
|
13
|
+
dist: number;
|
|
14
|
+
snapX: any;
|
|
15
|
+
snapY: any;
|
|
16
|
+
snapRecord?: any;
|
|
17
|
+
xAxis: any;
|
|
18
|
+
yAxis: any;
|
|
19
|
+
}
|
|
20
|
+
export interface SnapPointFinderInstance extends PointReducerInstance<SnapAccumulator> {
|
|
21
|
+
xAxis?: any;
|
|
22
|
+
yAxis?: any;
|
|
23
|
+
}
|
|
24
|
+
export interface SnapPointFinderConfig extends PointReducerConfig {
|
|
25
|
+
/** Cursor X value. */
|
|
26
|
+
cursorX?: NumberProp;
|
|
27
|
+
/** Cursor Y value */
|
|
28
|
+
cursorY?: NumberProp;
|
|
29
|
+
/** A binding used to receive the x value of the nearest point.*/
|
|
30
|
+
snapX?: Bind | AccessorChain<number> | AccessorChain<string>;
|
|
31
|
+
/** A binding used to receive the y value of the nearest point. */
|
|
32
|
+
snapY?: Bind | AccessorChain<number> | AccessorChain<string>;
|
|
33
|
+
/** A binding used to receive the record prop */
|
|
34
|
+
snapRecord?: Prop<DataRecord>;
|
|
35
|
+
/** Maximum distance between cursor and the snap point. Default value is 50. Adjust accordingly for large distances, e.g. set to Infinity when using TimeAxis */
|
|
36
|
+
maxDistance?: number;
|
|
37
|
+
/** A function used to convert x values into numeric format. Commonly used with dates. */
|
|
38
|
+
convertX?: (value: number | string) => number;
|
|
39
|
+
/** A function used to convert y values into numeric format. Commonly used with dates. */
|
|
40
|
+
convertY?: (value: number | string) => number;
|
|
41
|
+
/** Name of the x-axis. Default is 'x'. */
|
|
42
|
+
xAxis?: string;
|
|
43
|
+
/** Name of the y-axis. Default is 'y'. */
|
|
44
|
+
yAxis?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare class SnapPointFinder extends PointReducer<SnapAccumulator> {
|
|
47
|
+
maxDistance: number;
|
|
48
|
+
convertX: (value: any) => number;
|
|
49
|
+
convertY: (value: any) => number;
|
|
50
|
+
xAxis: string;
|
|
51
|
+
yAxis: string;
|
|
52
|
+
constructor(config?: SnapPointFinderConfig);
|
|
53
|
+
declareData(...args: any[]): void;
|
|
54
|
+
explore(context: RenderingContext, instance: SnapPointFinderInstance): void;
|
|
55
|
+
onInitAccumulator: (acc: SnapAccumulator, { data, xAxis, yAxis }: SnapPointFinderInstance) => void;
|
|
56
|
+
onMap: (acc: SnapAccumulator, x: any, y: any, name: string, p: any) => void;
|
|
57
|
+
onReduce: (acc: SnapAccumulator, instance: PointReducerInstance<SnapAccumulator>) => void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PointReducer } from "./PointReducer";
|
|
2
|
+
export class SnapPointFinder extends PointReducer {
|
|
3
|
+
constructor(config) {
|
|
4
|
+
super(config);
|
|
5
|
+
}
|
|
6
|
+
declareData(...args) {
|
|
7
|
+
super.declareData(...args, {
|
|
8
|
+
cursorX: undefined,
|
|
9
|
+
cursorY: undefined,
|
|
10
|
+
snapX: undefined,
|
|
11
|
+
snapY: undefined,
|
|
12
|
+
snapRecord: undefined,
|
|
13
|
+
maxDistance: undefined,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
explore(context, instance) {
|
|
17
|
+
instance.xAxis = context.axes?.[this.xAxis];
|
|
18
|
+
instance.yAxis = context.axes?.[this.yAxis];
|
|
19
|
+
super.explore(context, instance);
|
|
20
|
+
}
|
|
21
|
+
onInitAccumulator = (acc, { data, xAxis, yAxis }) => {
|
|
22
|
+
const d = data;
|
|
23
|
+
acc.cursor = {
|
|
24
|
+
x: d.cursorX,
|
|
25
|
+
y: d.cursorY,
|
|
26
|
+
mapped: false,
|
|
27
|
+
};
|
|
28
|
+
acc.dist = d.maxDistance > 0 ? Math.pow(d.maxDistance, 2) : Number.POSITIVE_INFINITY;
|
|
29
|
+
acc.snapX = null;
|
|
30
|
+
acc.snapY = null;
|
|
31
|
+
acc.xAxis = xAxis;
|
|
32
|
+
acc.yAxis = yAxis;
|
|
33
|
+
};
|
|
34
|
+
onMap = (acc, x, y, name, p) => {
|
|
35
|
+
let { xAxis, yAxis, cursor } = acc;
|
|
36
|
+
if (!cursor.mapped) {
|
|
37
|
+
cursor.mappedX = cursor.x != null ? xAxis?.map(this.convertX(cursor.x)) : null;
|
|
38
|
+
cursor.mappedY = cursor.y != null ? yAxis?.map(this.convertY(cursor.y)) : null;
|
|
39
|
+
cursor.mapped = true;
|
|
40
|
+
}
|
|
41
|
+
let d = null;
|
|
42
|
+
let cx = x != null ? xAxis?.map(this.convertX(x)) : null;
|
|
43
|
+
let cy = y != null ? yAxis?.map(this.convertY(y)) : null;
|
|
44
|
+
if (cursor.mappedX != null && cx != null)
|
|
45
|
+
d = (d || 0) + Math.pow(Math.abs(cx - cursor.mappedX), 2);
|
|
46
|
+
if (cursor.mappedY != null && cy != null)
|
|
47
|
+
d = (d || 0) + Math.pow(Math.abs(cy - cursor.mappedY), 2);
|
|
48
|
+
if (d != null && d < acc.dist) {
|
|
49
|
+
acc.dist = d;
|
|
50
|
+
acc.snapX = x;
|
|
51
|
+
acc.snapY = y;
|
|
52
|
+
acc.snapRecord = p;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
onReduce = (acc, instance) => {
|
|
56
|
+
instance.set("snapX", acc.snapX);
|
|
57
|
+
instance.set("snapY", acc.snapY);
|
|
58
|
+
instance.set("snapRecord", acc.snapRecord);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
SnapPointFinder.prototype.maxDistance = 50;
|
|
62
|
+
SnapPointFinder.prototype.convertX = (x) => x;
|
|
63
|
+
SnapPointFinder.prototype.convertY = (y) => y;
|
|
64
|
+
SnapPointFinder.prototype.xAxis = "x";
|
|
65
|
+
SnapPointFinder.prototype.yAxis = "y";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PointReducer, PointReducerConfig, PointReducerInstance, PointReducerAccumulator } from "./PointReducer";
|
|
2
|
+
import { NumberProp, StringProp, Bind } from "../../ui/Prop";
|
|
3
|
+
import { AccessorChain } from "../../data/createAccessorModelProxy";
|
|
4
|
+
export interface ValueAtAccumulator extends PointReducerAccumulator {
|
|
5
|
+
at: number;
|
|
6
|
+
left?: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
d: number;
|
|
10
|
+
};
|
|
11
|
+
right?: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
d: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface ValueAtFinderConfig extends PointReducerConfig {
|
|
18
|
+
/** X axis probe value. */
|
|
19
|
+
at?: NumberProp | StringProp;
|
|
20
|
+
/** A binding used to receive the measured y axis value */
|
|
21
|
+
value?: Bind | AccessorChain<number>;
|
|
22
|
+
/** A function used to convert x values into numeric format. Commonly used with dates. */
|
|
23
|
+
convert?: (value: number | string) => number;
|
|
24
|
+
}
|
|
25
|
+
/** Calculate value at a given point on the graph */
|
|
26
|
+
export declare class ValueAtFinder extends PointReducer<ValueAtAccumulator> {
|
|
27
|
+
convert: (value: any) => number;
|
|
28
|
+
constructor(config?: ValueAtFinderConfig);
|
|
29
|
+
declareData(...args: any[]): void;
|
|
30
|
+
onInitAccumulator: (acc: ValueAtAccumulator, { data }: PointReducerInstance<ValueAtAccumulator>) => void;
|
|
31
|
+
onMap: (acc: ValueAtAccumulator, x: any, y: any, name: string) => void;
|
|
32
|
+
onReduce: (acc: ValueAtAccumulator, instance: PointReducerInstance<ValueAtAccumulator>) => void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { PointReducer } from "./PointReducer";
|
|
2
|
+
/** Calculate value at a given point on the graph */
|
|
3
|
+
export class ValueAtFinder extends PointReducer {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
super(config);
|
|
6
|
+
}
|
|
7
|
+
declareData(...args) {
|
|
8
|
+
super.declareData(...args, {
|
|
9
|
+
at: undefined,
|
|
10
|
+
value: undefined,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
onInitAccumulator = (acc, { data }) => {
|
|
14
|
+
acc.at = this.convert(data.at);
|
|
15
|
+
};
|
|
16
|
+
onMap = (acc, x, y, name) => {
|
|
17
|
+
let cx = this.convert(x);
|
|
18
|
+
let d = cx - acc.at;
|
|
19
|
+
if (d <= 0 && (!acc.left || acc.left.d < d)) {
|
|
20
|
+
acc.left = {
|
|
21
|
+
x: cx,
|
|
22
|
+
y,
|
|
23
|
+
d,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (d >= 0 && (!acc.right || acc.right.d > d)) {
|
|
27
|
+
acc.right = {
|
|
28
|
+
x: cx,
|
|
29
|
+
y,
|
|
30
|
+
d,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
onReduce = (acc, instance) => {
|
|
35
|
+
let y = null;
|
|
36
|
+
if (acc.left && acc.right) {
|
|
37
|
+
if (acc.left.x == acc.right.x)
|
|
38
|
+
y = acc.left.y;
|
|
39
|
+
else if (acc.left.y != null && acc.right.y != null) {
|
|
40
|
+
y = acc.left.y + ((acc.right.y - acc.left.y) * (acc.at - acc.left.x)) / (acc.right.x - acc.left.x);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
instance.set("value", y);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
ValueAtFinder.prototype.convert = (x) => x;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from "./Chart";
|
|
2
|
+
export * from "./PieChart";
|
|
3
|
+
export * from "./Pie";
|
|
4
|
+
export * from "./PieLabel";
|
|
5
|
+
export * from "./PieLabelsContainer";
|
|
6
|
+
export * from "./Column";
|
|
7
|
+
export * from "./Bar";
|
|
8
|
+
export * from "./Legend";
|
|
9
|
+
export * from "./LegendEntry";
|
|
10
|
+
export * from "./ColorMap";
|
|
11
|
+
export * from "./Marker";
|
|
12
|
+
export * from "./MarkerLine";
|
|
13
|
+
export * from "./Range";
|
|
14
|
+
export * from "./Gridlines";
|
|
15
|
+
export * from "./Swimlanes";
|
|
16
|
+
export * from "./Swimlane";
|
|
17
|
+
export * from "./RangeMarker";
|
|
18
|
+
export * from "./LineGraph";
|
|
19
|
+
export * from "./ColumnGraph";
|
|
20
|
+
export * from "./BarGraph";
|
|
21
|
+
export * from "./ScatterGraph";
|
|
22
|
+
export * from "./BubbleGraph";
|
|
23
|
+
export * from "./MouseTracker";
|
|
24
|
+
export * from "./shapes";
|
|
25
|
+
export * from "./axis/index";
|
|
26
|
+
export * from "./helpers/index";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from "./Chart";
|
|
2
|
+
export * from "./PieChart";
|
|
3
|
+
export * from "./Pie";
|
|
4
|
+
export * from "./PieLabel";
|
|
5
|
+
export * from "./PieLabelsContainer";
|
|
6
|
+
export * from "./Column";
|
|
7
|
+
export * from "./Bar";
|
|
8
|
+
export * from "./Legend";
|
|
9
|
+
export * from "./LegendEntry";
|
|
10
|
+
export * from "./ColorMap";
|
|
11
|
+
export * from "./Marker";
|
|
12
|
+
export * from "./MarkerLine";
|
|
13
|
+
export * from "./Range";
|
|
14
|
+
export * from "./Gridlines";
|
|
15
|
+
export * from "./Swimlanes";
|
|
16
|
+
export * from "./Swimlane";
|
|
17
|
+
export * from "./RangeMarker";
|
|
18
|
+
export * from "./LineGraph";
|
|
19
|
+
export * from "./ColumnGraph";
|
|
20
|
+
export * from "./BarGraph";
|
|
21
|
+
export * from "./ScatterGraph";
|
|
22
|
+
export * from "./BubbleGraph";
|
|
23
|
+
export * from "./MouseTracker";
|
|
24
|
+
export * from "./shapes";
|
|
25
|
+
export * from "./axis/index";
|
|
26
|
+
export * from "./helpers/index";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @jsxImportSource react */
|
|
2
|
+
import { Config } from "../ui/Prop";
|
|
3
|
+
export type ShapeRender = (cx: number, cy: number, size: number, props?: Config, options?: Config) => React.ReactElement;
|
|
4
|
+
export declare function registerShape(name: string, callback: ShapeRender): void;
|
|
5
|
+
export declare function getShape(shapeName: string): ShapeRender;
|
|
6
|
+
export declare function getAvailableShapes(): string[];
|
|
7
|
+
export declare function circle(cx: number, cy: number, size: number, props?: Config, options?: Config): React.ReactElement;
|
|
8
|
+
export declare function square(cx: number, cy: number, size: number, props?: Config, options?: Config): React.ReactElement;
|
|
9
|
+
export declare function bar(cx: number, cy: number, size: number, props?: Config, options?: Config): React.ReactElement;
|
|
10
|
+
export declare function column(cx: number, cy: number, size: number, props?: Config, options?: Config): React.ReactElement;
|
|
11
|
+
export declare function line(cx: number, cy: number, size: number, props?: Config, options?: Config): React.ReactElement;
|
|
12
|
+
export declare function vline(cx: number, cy: number, size: number, props?: Config, options?: Config): React.ReactElement;
|
|
13
|
+
export declare function triangle(cx: number, cy: number, size: number, props?: Config, options?: Config): React.ReactElement;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { debug } from "../util/Debug";
|
|
3
|
+
var shapes = {};
|
|
4
|
+
var warnings = {};
|
|
5
|
+
export function registerShape(name, callback) {
|
|
6
|
+
shapes[name] = callback;
|
|
7
|
+
}
|
|
8
|
+
export function getShape(shapeName) {
|
|
9
|
+
if (shapes[shapeName])
|
|
10
|
+
return shapes[shapeName];
|
|
11
|
+
if (!warnings[shapeName]) {
|
|
12
|
+
warnings[shapeName] = true;
|
|
13
|
+
debug(`Unknown shape '${shapeName}'. Using square instead.`);
|
|
14
|
+
}
|
|
15
|
+
return shapes["square"];
|
|
16
|
+
}
|
|
17
|
+
export function getAvailableShapes() {
|
|
18
|
+
return Object.keys(shapes);
|
|
19
|
+
}
|
|
20
|
+
export function circle(cx, cy, size, props, options) {
|
|
21
|
+
return _jsx("circle", { ...props, cx: cx, cy: cy, r: size / 2 });
|
|
22
|
+
}
|
|
23
|
+
registerShape("circle", circle);
|
|
24
|
+
export function square(cx, cy, size, props, options) {
|
|
25
|
+
size *= 0.9;
|
|
26
|
+
return _jsx("rect", { ...props, x: cx - size / 2, y: cy - size / 2, width: size, height: size });
|
|
27
|
+
}
|
|
28
|
+
registerShape("square", square);
|
|
29
|
+
registerShape("rect", square);
|
|
30
|
+
export function bar(cx, cy, size, props, options) {
|
|
31
|
+
size *= 0.9;
|
|
32
|
+
return _jsx("rect", { ...props, x: cx - size / 2, y: cy - size / 4, width: size, height: size / 2 });
|
|
33
|
+
}
|
|
34
|
+
registerShape("bar", bar);
|
|
35
|
+
export function column(cx, cy, size, props, options) {
|
|
36
|
+
size *= 0.9;
|
|
37
|
+
return _jsx("rect", { ...props, x: cx - size / 4, y: cy - size / 2, width: size / 2, height: size });
|
|
38
|
+
}
|
|
39
|
+
registerShape("column", column);
|
|
40
|
+
export function line(cx, cy, size, props, options) {
|
|
41
|
+
size *= 0.9;
|
|
42
|
+
return _jsx("line", { ...props, x1: cx - size / 2, y1: cy, x2: cx + size / 2, y2: cy });
|
|
43
|
+
}
|
|
44
|
+
registerShape("line", line);
|
|
45
|
+
registerShape("hline", line);
|
|
46
|
+
export function vline(cx, cy, size, props, options) {
|
|
47
|
+
size *= 0.9;
|
|
48
|
+
return _jsx("line", { ...props, x1: cx, y1: cy - size / 2, x2: cx, y2: cy + size / 2 });
|
|
49
|
+
}
|
|
50
|
+
registerShape("vline", vline);
|
|
51
|
+
export function triangle(cx, cy, size, props, options) {
|
|
52
|
+
size *= 1.29;
|
|
53
|
+
var d = "";
|
|
54
|
+
var cos = Math.cos(Math.PI / 6);
|
|
55
|
+
var sin = Math.sin(Math.PI / 6);
|
|
56
|
+
d += `M ${cx} ${cy - size / 2} `;
|
|
57
|
+
d += `L ${cx + (cos * size) / 2} ${cy + (sin * size) / 2} `;
|
|
58
|
+
d += `L ${cx - (cos * size) / 2} ${cy + (sin * size) / 2} `;
|
|
59
|
+
d += `Z`;
|
|
60
|
+
return _jsx("path", { ...props, d: d });
|
|
61
|
+
}
|
|
62
|
+
registerShape("triangle", triangle);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare class AggregateFunction {
|
|
2
|
+
static sum(): Sum;
|
|
3
|
+
static avg(): Avg;
|
|
4
|
+
static count(): Count;
|
|
5
|
+
static distinct(): Distinct;
|
|
6
|
+
static min(): Min;
|
|
7
|
+
static max(): Max;
|
|
8
|
+
static last(): LastValue;
|
|
9
|
+
}
|
|
10
|
+
declare class Sum {
|
|
11
|
+
result: number;
|
|
12
|
+
empty: boolean;
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
process(value: number): void;
|
|
15
|
+
getResult(): number | null;
|
|
16
|
+
}
|
|
17
|
+
declare class Avg {
|
|
18
|
+
result: number;
|
|
19
|
+
count: number;
|
|
20
|
+
empty: boolean;
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
process(value: number, count?: number): void;
|
|
23
|
+
getResult(): number | null;
|
|
24
|
+
}
|
|
25
|
+
declare class Count {
|
|
26
|
+
result: number;
|
|
27
|
+
process(value: any): void;
|
|
28
|
+
getResult(): number;
|
|
29
|
+
}
|
|
30
|
+
declare class Distinct {
|
|
31
|
+
values: {
|
|
32
|
+
[key: string]: boolean;
|
|
33
|
+
};
|
|
34
|
+
empty: boolean;
|
|
35
|
+
result: number;
|
|
36
|
+
invalid?: boolean;
|
|
37
|
+
constructor();
|
|
38
|
+
process(value: any): void;
|
|
39
|
+
getResult(): number | null;
|
|
40
|
+
}
|
|
41
|
+
declare class Max {
|
|
42
|
+
result: number;
|
|
43
|
+
empty: boolean;
|
|
44
|
+
invalid?: boolean;
|
|
45
|
+
process(value: number): void;
|
|
46
|
+
getResult(): number | null;
|
|
47
|
+
}
|
|
48
|
+
declare class Min {
|
|
49
|
+
result: number;
|
|
50
|
+
empty: boolean;
|
|
51
|
+
invalid?: boolean;
|
|
52
|
+
process(value: number): void;
|
|
53
|
+
getResult(): number | null;
|
|
54
|
+
}
|
|
55
|
+
declare class LastValue {
|
|
56
|
+
result: any;
|
|
57
|
+
process(value: any): void;
|
|
58
|
+
getResult(): any;
|
|
59
|
+
}
|
|
60
|
+
export {};
|