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,68 @@
|
|
|
1
|
+
import { StyledContainerBase, StyledContainerConfig } from "../../ui";
|
|
2
|
+
import { Instance } from "../../ui/Instance";
|
|
3
|
+
import { BooleanProp, NumberProp, Prop, StringProp } from "../../ui/Prop";
|
|
4
|
+
import { RenderingContext } from "../../ui/RenderingContext";
|
|
5
|
+
export interface GridCellConfig extends StyledContainerConfig {
|
|
6
|
+
/** Selector used to obtain the value that should be displayed inside the cell. Not required if `field` is used. */
|
|
7
|
+
value?: StringProp | NumberProp;
|
|
8
|
+
/** Selector used to obtain the weight of the cell in aggregate operations, such as weighted averages. */
|
|
9
|
+
weight?: Prop<any>;
|
|
10
|
+
/** Add default padding to grid cell. */
|
|
11
|
+
pad?: BooleanProp;
|
|
12
|
+
/** Format specifier used to convert the value into a string. */
|
|
13
|
+
format?: StringProp;
|
|
14
|
+
/** Name of the field that holds the value to be displayed. */
|
|
15
|
+
field?: string;
|
|
16
|
+
/** Record alias. Default is `$record`. */
|
|
17
|
+
recordName?: string;
|
|
18
|
+
/** Record alias. Default is `$record`. */
|
|
19
|
+
recordAlias?: string;
|
|
20
|
+
/** Indicate if a cell is editable or not. Default value is true. */
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Used to indicate that the adjacent cells in the column should be merged together.
|
|
24
|
+
* If set to `same-value`, only cells with the same value will be merged.
|
|
25
|
+
* If set to `always`, all cells within the group will be merged.
|
|
26
|
+
* This is an experimental feature that might not work well with other
|
|
27
|
+
* grid related features such as multi-line rows, buffered rendering, etc.
|
|
28
|
+
*/
|
|
29
|
+
mergeCells?: Prop<"same-value" | "always">;
|
|
30
|
+
/** Aggregate value for the cell. */
|
|
31
|
+
aggregateValue?: Prop<any>;
|
|
32
|
+
/** Column span. */
|
|
33
|
+
colSpan?: NumberProp;
|
|
34
|
+
/** Row span. */
|
|
35
|
+
rowSpan?: NumberProp;
|
|
36
|
+
/** Whether the column is fixed. */
|
|
37
|
+
fixed?: BooleanProp;
|
|
38
|
+
/** Cell alignment. */
|
|
39
|
+
align?: "left" | "right" | "center";
|
|
40
|
+
/** Editor widget for cell editing. */
|
|
41
|
+
editor?: any;
|
|
42
|
+
/** Unique column identifier. */
|
|
43
|
+
uniqueColumnId?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare class GridCell extends StyledContainerBase<GridCellConfig> {
|
|
46
|
+
value?: StringProp | NumberProp;
|
|
47
|
+
field?: string;
|
|
48
|
+
recordName?: string;
|
|
49
|
+
editable?: boolean;
|
|
50
|
+
align?: "left" | "right" | "center";
|
|
51
|
+
editor?: any;
|
|
52
|
+
uniqueColumnId?: string;
|
|
53
|
+
pad?: boolean;
|
|
54
|
+
fixed?: boolean;
|
|
55
|
+
merged?: boolean;
|
|
56
|
+
constructor(config?: GridCellConfig);
|
|
57
|
+
declareData(...args: any[]): void;
|
|
58
|
+
init(): void;
|
|
59
|
+
prepareCSS(context: RenderingContext, instance: Instance): void;
|
|
60
|
+
render(context: RenderingContext, instance: Instance, key: string): {
|
|
61
|
+
atomic: boolean;
|
|
62
|
+
content: any;
|
|
63
|
+
instance: Instance<import("..").Widget<any, any>>;
|
|
64
|
+
data: Record<string, any>;
|
|
65
|
+
key: string;
|
|
66
|
+
uniqueColumnId: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { StyledContainerBase } from "../../ui";
|
|
2
|
+
import { Format } from "../../ui/Format";
|
|
3
|
+
import { isUndefined } from "../../util/isUndefined";
|
|
4
|
+
export class GridCell extends StyledContainerBase {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
super(config);
|
|
7
|
+
}
|
|
8
|
+
declareData(...args) {
|
|
9
|
+
return super.declareData(...args, {
|
|
10
|
+
value: undefined,
|
|
11
|
+
aggregateValue: undefined,
|
|
12
|
+
weight: undefined,
|
|
13
|
+
pad: undefined,
|
|
14
|
+
format: undefined,
|
|
15
|
+
colSpan: undefined,
|
|
16
|
+
rowSpan: undefined,
|
|
17
|
+
editable: undefined,
|
|
18
|
+
fixed: undefined,
|
|
19
|
+
mergeCells: undefined,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
init() {
|
|
23
|
+
if (!this.value && this.field)
|
|
24
|
+
this.value = { bind: this.recordName + "." + this.field };
|
|
25
|
+
if (isUndefined(this.editable))
|
|
26
|
+
this.editable = !!this.editor;
|
|
27
|
+
super.init();
|
|
28
|
+
}
|
|
29
|
+
prepareCSS(context, instance) {
|
|
30
|
+
let { data } = instance;
|
|
31
|
+
data.classNames = this.CSS.expand(data.className, data.class, this.CSS.state({
|
|
32
|
+
pad: data.pad,
|
|
33
|
+
editable: data.editable,
|
|
34
|
+
["aligned-" + this.align]: this.align,
|
|
35
|
+
mergable: data.merged,
|
|
36
|
+
}));
|
|
37
|
+
data.style = this.CSS.parseStyle(data.style);
|
|
38
|
+
}
|
|
39
|
+
render(context, instance, key) {
|
|
40
|
+
let { data } = instance;
|
|
41
|
+
let content;
|
|
42
|
+
if (this.items.length > 0)
|
|
43
|
+
content = this.renderChildren(context, instance);
|
|
44
|
+
else {
|
|
45
|
+
content = data.value;
|
|
46
|
+
if (data.format)
|
|
47
|
+
content = Format.value(content, data.format);
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
atomic: true,
|
|
51
|
+
content,
|
|
52
|
+
instance,
|
|
53
|
+
data,
|
|
54
|
+
key,
|
|
55
|
+
uniqueColumnId: this.uniqueColumnId,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
GridCell.prototype.pad = true;
|
|
60
|
+
GridCell.prototype.fixed = false;
|
|
61
|
+
GridCell.prototype.merged = false;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsxImportSource react */
|
|
2
|
+
import { ContainerBase, StyledContainerConfig } from "../../ui/Container";
|
|
3
|
+
import { Instance } from "../../ui/Instance";
|
|
4
|
+
import { RenderingContext } from "../../ui/RenderingContext";
|
|
5
|
+
export interface GridCellEditorConfig extends StyledContainerConfig {
|
|
6
|
+
}
|
|
7
|
+
export declare class GridCellEditor extends ContainerBase<GridCellEditorConfig> {
|
|
8
|
+
constructor(config?: GridCellEditorConfig);
|
|
9
|
+
render(context: RenderingContext, instance: Instance, key: string): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource react */
|
|
3
|
+
import { ContainerBase } from "../../ui/Container";
|
|
4
|
+
import { VDOM } from "../../ui/VDOM";
|
|
5
|
+
import { findFirstChild, isFocusable, isFocusedDeep } from "../../util/DOM";
|
|
6
|
+
export class GridCellEditor extends ContainerBase {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
}
|
|
10
|
+
render(context, instance, key) {
|
|
11
|
+
let { data } = instance;
|
|
12
|
+
return (_jsx(GridCellEditorCmp, { className: data.className, style: data.style, children: this.renderChildren(context, instance) }, key));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
GridCellEditor.prototype.styled = true;
|
|
16
|
+
class GridCellEditorCmp extends VDOM.Component {
|
|
17
|
+
el = null;
|
|
18
|
+
render() {
|
|
19
|
+
let { className, style, children } = this.props;
|
|
20
|
+
return (_jsx("div", { ref: (el) => (this.el = el), className: className, style: style, children: children }));
|
|
21
|
+
}
|
|
22
|
+
componentDidMount() {
|
|
23
|
+
if (!isFocusedDeep(this.el)) {
|
|
24
|
+
let focusableChild = findFirstChild(this.el, isFocusable);
|
|
25
|
+
if (focusableChild)
|
|
26
|
+
focusableChild.focus();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { RenderingContext } from "../../ui/RenderingContext";
|
|
2
|
+
import { VDOM } from "../../ui/Widget";
|
|
3
|
+
import { ValidationGroup, ValidationGroupConfig, ValidationGroupInstance } from "../../widgets/form/ValidationGroup";
|
|
4
|
+
import { GridRowLineConfig } from "./GridRowLine";
|
|
5
|
+
import type { GridInstance } from "./Grid";
|
|
6
|
+
import { BooleanProp, StringProp, Prop, StructuredProp } from "../../ui/Prop";
|
|
7
|
+
import { WidgetStyleConfig } from "../../ui/Widget";
|
|
8
|
+
export interface GridRowInstance extends ValidationGroupInstance {
|
|
9
|
+
dragHandles: any[];
|
|
10
|
+
}
|
|
11
|
+
export interface GridRowConfig extends ValidationGroupConfig, WidgetStyleConfig {
|
|
12
|
+
hoverId?: any;
|
|
13
|
+
line0?: GridRowLineConfig;
|
|
14
|
+
line1?: GridRowLineConfig;
|
|
15
|
+
line2?: GridRowLineConfig;
|
|
16
|
+
line3?: GridRowLineConfig;
|
|
17
|
+
line4?: GridRowLineConfig;
|
|
18
|
+
line5?: GridRowLineConfig;
|
|
19
|
+
line6?: GridRowLineConfig;
|
|
20
|
+
line7?: GridRowLineConfig;
|
|
21
|
+
line8?: GridRowLineConfig;
|
|
22
|
+
line9?: GridRowLineConfig;
|
|
23
|
+
recordName?: string;
|
|
24
|
+
invalid?: BooleanProp;
|
|
25
|
+
valid?: BooleanProp;
|
|
26
|
+
mod?: StringProp | Prop<string[]> | StructuredProp;
|
|
27
|
+
}
|
|
28
|
+
export declare class GridRow extends ValidationGroup<GridRowConfig> {
|
|
29
|
+
recordName?: string;
|
|
30
|
+
line0?: GridRowLineConfig;
|
|
31
|
+
line1?: GridRowLineConfig;
|
|
32
|
+
line2?: GridRowLineConfig;
|
|
33
|
+
line3?: GridRowLineConfig;
|
|
34
|
+
line4?: GridRowLineConfig;
|
|
35
|
+
line5?: GridRowLineConfig;
|
|
36
|
+
line6?: GridRowLineConfig;
|
|
37
|
+
line7?: GridRowLineConfig;
|
|
38
|
+
line8?: GridRowLineConfig;
|
|
39
|
+
line9?: GridRowLineConfig;
|
|
40
|
+
declareData(...args: Record<string, unknown>[]): void;
|
|
41
|
+
init(): void;
|
|
42
|
+
explore(context: RenderingContext, instance: GridRowInstance): void;
|
|
43
|
+
exploreCleanup(context: RenderingContext, instance: GridRowInstance): void;
|
|
44
|
+
}
|
|
45
|
+
export interface GridRowComponentProps {
|
|
46
|
+
key?: string;
|
|
47
|
+
className?: string;
|
|
48
|
+
store?: any;
|
|
49
|
+
dragSource?: any;
|
|
50
|
+
instance: GridRowInstance;
|
|
51
|
+
grid: GridInstance;
|
|
52
|
+
record: any;
|
|
53
|
+
parent: any;
|
|
54
|
+
cursorIndex?: number;
|
|
55
|
+
selected?: boolean;
|
|
56
|
+
isBeingDragged?: any;
|
|
57
|
+
isDraggedOver?: boolean;
|
|
58
|
+
cursor?: boolean;
|
|
59
|
+
cursorCellIndex?: number | false;
|
|
60
|
+
cellEdit?: any;
|
|
61
|
+
onMouseLeave?: any;
|
|
62
|
+
useTrTag?: boolean;
|
|
63
|
+
shouldUpdate?: boolean;
|
|
64
|
+
dimensionsVersion?: number;
|
|
65
|
+
fixed?: boolean;
|
|
66
|
+
children?: React.ReactNode;
|
|
67
|
+
}
|
|
68
|
+
interface GridRowComponentState {
|
|
69
|
+
hover?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export declare class GridRowComponent extends VDOM.Component<GridRowComponentProps, GridRowComponentState> {
|
|
72
|
+
onDoubleClick?: (e: React.MouseEvent) => void;
|
|
73
|
+
onRowContextMenu?: (e: React.MouseEvent) => void;
|
|
74
|
+
unsubscribeHoverSync?: () => void;
|
|
75
|
+
constructor(props: GridRowComponentProps);
|
|
76
|
+
render(): React.ReactNode;
|
|
77
|
+
onMouseDown(e: React.MouseEvent | React.TouchEvent): void;
|
|
78
|
+
onMouseMove(e: React.MouseEvent | React.TouchEvent): void;
|
|
79
|
+
onMouseLeave(e: React.MouseEvent): void;
|
|
80
|
+
getCellIndex(e: React.MouseEvent | React.TouchEvent | React.KeyboardEvent): number;
|
|
81
|
+
onKeyDown(e: React.KeyboardEvent): void;
|
|
82
|
+
onClick(e: React.MouseEvent): void;
|
|
83
|
+
shouldComponentUpdate(props: GridRowComponentProps, state: GridRowComponentState): boolean;
|
|
84
|
+
componentWillUnmount(): void;
|
|
85
|
+
componentDidMount(): void;
|
|
86
|
+
}
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { preventFocusOnTouch, unfocusElement } from "../../ui/FocusManager";
|
|
2
|
+
import { VDOM } from "../../ui/Widget";
|
|
3
|
+
import { closest } from "../../util/DOM";
|
|
4
|
+
import { isTouchEvent } from "../../util/isTouchEvent";
|
|
5
|
+
import { KeyCode } from "../../util/KeyCode";
|
|
6
|
+
import { ValidationGroup } from "../../widgets/form/ValidationGroup";
|
|
7
|
+
import { ddDetect, ddMouseDown, ddMouseUp, isDragHandleEvent } from "../drag-drop/ops";
|
|
8
|
+
import { GridRowLine } from "./GridRowLine";
|
|
9
|
+
export class GridRow extends ValidationGroup {
|
|
10
|
+
declareData(...args) {
|
|
11
|
+
super.declareData(...args, {
|
|
12
|
+
hoverId: undefined,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
init() {
|
|
16
|
+
this.items = [];
|
|
17
|
+
for (let i = 0; i < 10; i++) {
|
|
18
|
+
const lineKey = ("line" + i);
|
|
19
|
+
if (this[lineKey])
|
|
20
|
+
this.items.push(GridRowLine.create(this[lineKey], {
|
|
21
|
+
recordName: this.recordName,
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
super.init();
|
|
25
|
+
}
|
|
26
|
+
explore(context, instance) {
|
|
27
|
+
context.push("dragHandles", (instance.dragHandles = []));
|
|
28
|
+
super.explore(context, instance);
|
|
29
|
+
}
|
|
30
|
+
exploreCleanup(context, instance) {
|
|
31
|
+
super.exploreCleanup(context, instance);
|
|
32
|
+
context.pop("dragHandles");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
GridRow.prototype.styled = true; //styles used on the wrapper component
|
|
36
|
+
export class GridRowComponent extends VDOM.Component {
|
|
37
|
+
onDoubleClick;
|
|
38
|
+
onRowContextMenu;
|
|
39
|
+
unsubscribeHoverSync;
|
|
40
|
+
constructor(props) {
|
|
41
|
+
super(props);
|
|
42
|
+
this.onMouseMove = this.onMouseMove.bind(this);
|
|
43
|
+
this.onMouseDown = this.onMouseDown.bind(this);
|
|
44
|
+
this.onMouseLeave = this.onMouseLeave.bind(this);
|
|
45
|
+
this.onClick = this.onClick.bind(this);
|
|
46
|
+
this.onKeyDown = this.onKeyDown.bind(this);
|
|
47
|
+
let { grid, instance } = props;
|
|
48
|
+
if (grid.widget.onRowDoubleClick)
|
|
49
|
+
this.onDoubleClick = (e) => {
|
|
50
|
+
grid.invoke("onRowDoubleClick", e, instance);
|
|
51
|
+
};
|
|
52
|
+
if (grid.widget.cellEditable)
|
|
53
|
+
this.onDoubleClick = (e) => {
|
|
54
|
+
this.props.parent.moveCursor(this.props.cursorIndex, {
|
|
55
|
+
cellEdit: true,
|
|
56
|
+
});
|
|
57
|
+
e.preventDefault(); //prevent text selection
|
|
58
|
+
};
|
|
59
|
+
if (grid.widget.onRowContextMenu)
|
|
60
|
+
this.onRowContextMenu = (e) => {
|
|
61
|
+
grid.invoke("onRowContextMenu", e, instance);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
let { className, dragSource, instance, record, useTrTag, children } = this.props;
|
|
66
|
+
let { data, widget } = instance;
|
|
67
|
+
let { CSS } = widget;
|
|
68
|
+
let move, up, keyDown, leave;
|
|
69
|
+
if (dragSource || data.hoverId != null) {
|
|
70
|
+
move = this.onMouseMove;
|
|
71
|
+
up = ddMouseUp;
|
|
72
|
+
}
|
|
73
|
+
if (data.hoverId != null) {
|
|
74
|
+
leave = this.onMouseLeave;
|
|
75
|
+
}
|
|
76
|
+
if (this.props.grid.widget.onRowClick)
|
|
77
|
+
keyDown = this.onKeyDown;
|
|
78
|
+
return VDOM.createElement(useTrTag ? "tr" : "tbody", {
|
|
79
|
+
className: CSS.expand(data.classNames, className, this.state && this.state.hover && CSS.state("hover")),
|
|
80
|
+
style: data.style,
|
|
81
|
+
onClick: this.onClick,
|
|
82
|
+
onDoubleClick: this.onDoubleClick,
|
|
83
|
+
onTouchStart: this.onMouseDown,
|
|
84
|
+
onMouseDown: this.onMouseDown,
|
|
85
|
+
onTouchMove: move,
|
|
86
|
+
onMouseMove: move,
|
|
87
|
+
onMouseLeave: leave,
|
|
88
|
+
onTouchEnd: up,
|
|
89
|
+
onMouseUp: up,
|
|
90
|
+
onKeyDown: keyDown,
|
|
91
|
+
onContextMenu: this.onRowContextMenu,
|
|
92
|
+
"data-record-key": record.key,
|
|
93
|
+
}, children);
|
|
94
|
+
}
|
|
95
|
+
onMouseDown(e) {
|
|
96
|
+
let { grid, record, instance, parent, cursorIndex } = this.props;
|
|
97
|
+
if (this.props.dragSource) {
|
|
98
|
+
ddMouseDown(e);
|
|
99
|
+
if (isDragHandleEvent(e) || instance.dragHandles.length == 0) {
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
e.stopPropagation();
|
|
102
|
+
//close context menu
|
|
103
|
+
unfocusElement(e.target, false);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
let { store, widget } = grid;
|
|
107
|
+
if (widget.selectable)
|
|
108
|
+
preventFocusOnTouch(e);
|
|
109
|
+
parent.moveCursor(cursorIndex, {
|
|
110
|
+
select: !isTouchEvent() &&
|
|
111
|
+
(e.shiftKey || e.ctrlKey || !widget.selection.isSelected(store, record.data, record.index)),
|
|
112
|
+
selectRange: e.shiftKey,
|
|
113
|
+
selectOptions: {
|
|
114
|
+
toggle: e.ctrlKey && !e.shiftKey,
|
|
115
|
+
add: e.ctrlKey && e.shiftKey,
|
|
116
|
+
},
|
|
117
|
+
cellIndex: this.getCellIndex(e),
|
|
118
|
+
});
|
|
119
|
+
if (e.shiftKey && !isTouchEvent())
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
}
|
|
122
|
+
onMouseMove(e) {
|
|
123
|
+
let { grid, instance, parent, record } = this.props;
|
|
124
|
+
if (ddDetect(e) && (isDragHandleEvent(e) || instance.dragHandles.length == 0))
|
|
125
|
+
parent.beginDragDrop(e, record);
|
|
126
|
+
if (grid.hoverSync && instance.data.hoverId != null)
|
|
127
|
+
grid.hoverSync.report(grid.widget.hoverChannel, instance.data.hoverId, true);
|
|
128
|
+
}
|
|
129
|
+
onMouseLeave(e) {
|
|
130
|
+
let { grid, instance } = this.props;
|
|
131
|
+
if (grid.hoverSync && instance.data.hoverId != null)
|
|
132
|
+
grid.hoverSync.report(grid.widget.hoverChannel, instance.data.hoverId, false);
|
|
133
|
+
}
|
|
134
|
+
getCellIndex(e) {
|
|
135
|
+
let td = closest(e.target, (node) => node.tagName == "TD");
|
|
136
|
+
if (td)
|
|
137
|
+
return ((this.props.fixed ? 0 : this.props.grid.fixedColumnCount) +
|
|
138
|
+
Array.from(td.parentElement.children).indexOf(td));
|
|
139
|
+
return -1;
|
|
140
|
+
}
|
|
141
|
+
onKeyDown(e) {
|
|
142
|
+
let { grid, instance } = this.props;
|
|
143
|
+
if (e.keyCode == KeyCode.enter && grid.invoke("onRowClick", e, instance) === false) {
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
onClick(e) {
|
|
148
|
+
let { grid, record, instance, parent, cursorIndex } = this.props;
|
|
149
|
+
let { store, widget } = grid;
|
|
150
|
+
if (grid.widget.onRowClick) {
|
|
151
|
+
if (grid.invoke("onRowClick", e, instance) === false)
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
e.stopPropagation();
|
|
155
|
+
parent.moveCursor(cursorIndex, {
|
|
156
|
+
select: isTouchEvent() ||
|
|
157
|
+
(!e.shiftKey && !e.ctrlKey && widget.selection.isSelected(store, record.data, record.index)),
|
|
158
|
+
selectRange: e.shiftKey,
|
|
159
|
+
selectOptions: {
|
|
160
|
+
toggle: e.ctrlKey && !e.shiftKey,
|
|
161
|
+
add: e.ctrlKey && e.shiftKey,
|
|
162
|
+
},
|
|
163
|
+
cellIndex: this.getCellIndex(e),
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
shouldComponentUpdate(props, state) {
|
|
167
|
+
return (props.shouldUpdate !== false ||
|
|
168
|
+
props.record != this.props.record ||
|
|
169
|
+
props.cursor != this.props.cursor ||
|
|
170
|
+
props.selected != this.props.selected ||
|
|
171
|
+
props.isBeingDragged != this.props.isBeingDragged ||
|
|
172
|
+
props.cursorIndex !== this.props.cursorIndex ||
|
|
173
|
+
props.cursorCellIndex !== this.props.cursorCellIndex ||
|
|
174
|
+
props.cellEdit !== this.props.cellEdit ||
|
|
175
|
+
props.dimensionsVersion !== this.props.dimensionsVersion ||
|
|
176
|
+
props.isDraggedOver !== this.props.isDraggedOver ||
|
|
177
|
+
state !== this.state);
|
|
178
|
+
}
|
|
179
|
+
componentWillUnmount() {
|
|
180
|
+
this.unsubscribeHoverSync && this.unsubscribeHoverSync();
|
|
181
|
+
}
|
|
182
|
+
componentDidMount() {
|
|
183
|
+
let { grid } = this.props;
|
|
184
|
+
if (grid.hoverSync) {
|
|
185
|
+
this.unsubscribeHoverSync = grid.hoverSync.subscribe(grid.widget.hoverChannel, (hoverId) => {
|
|
186
|
+
let hover = hoverId === this.props.instance.data.hoverId;
|
|
187
|
+
if (!this.state || hover !== this.state.hover)
|
|
188
|
+
this.setState({ hover });
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Container, ContainerConfig } from "../../ui/Container";
|
|
2
|
+
import type { GridColumnConfig } from "./Grid";
|
|
3
|
+
import { RenderingContext } from "../../ui/RenderingContext";
|
|
4
|
+
import { Instance } from "../../ui/Instance";
|
|
5
|
+
import { BooleanProp } from "../../ui/Prop";
|
|
6
|
+
export interface GridRowLineConfig extends ContainerConfig {
|
|
7
|
+
/** Array of column configurations for this row line. */
|
|
8
|
+
columns?: GridColumnConfig[];
|
|
9
|
+
/** Record alias used for data binding. */
|
|
10
|
+
recordName?: string;
|
|
11
|
+
/** Whether this row line is visible. */
|
|
12
|
+
visible?: BooleanProp;
|
|
13
|
+
/** Whether to show the header row for this line. */
|
|
14
|
+
showHeader?: BooleanProp;
|
|
15
|
+
}
|
|
16
|
+
export declare class GridRowLine extends Container {
|
|
17
|
+
columns?: GridColumnConfig[];
|
|
18
|
+
recordName?: string;
|
|
19
|
+
constructor(config?: GridRowLineConfig);
|
|
20
|
+
init(): void;
|
|
21
|
+
render(context: RenderingContext, instance: Instance, key: string): {
|
|
22
|
+
key: string;
|
|
23
|
+
data: Record<string, any>;
|
|
24
|
+
content: any;
|
|
25
|
+
atomic: boolean;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Container } from "../../ui/Container";
|
|
2
|
+
import { Widget } from "../../ui/Widget";
|
|
3
|
+
import { GridCell } from "./GridCell";
|
|
4
|
+
export class GridRowLine extends Container {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
super(config);
|
|
7
|
+
}
|
|
8
|
+
init() {
|
|
9
|
+
this.items = Widget.create(GridCell, this.columns || [], {
|
|
10
|
+
recordName: this.recordName
|
|
11
|
+
});
|
|
12
|
+
super.init();
|
|
13
|
+
}
|
|
14
|
+
render(context, instance, key) {
|
|
15
|
+
let { data } = instance;
|
|
16
|
+
return {
|
|
17
|
+
key,
|
|
18
|
+
data,
|
|
19
|
+
content: this.renderChildren(context, instance),
|
|
20
|
+
atomic: true
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
GridRowLine.prototype.styled = true;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @jsxImportSource react */
|
|
2
|
+
import { Widget } from "../../ui/Widget";
|
|
3
|
+
import { NumberProp } from "../../ui/Prop";
|
|
4
|
+
import { StyledContainerConfig } from "../../ui/Container";
|
|
5
|
+
import { Instance } from "../../ui/Instance";
|
|
6
|
+
import { RenderingContext } from "../../ui/RenderingContext";
|
|
7
|
+
export interface PaginationConfig extends StyledContainerConfig {
|
|
8
|
+
/** Current page number. */
|
|
9
|
+
page?: NumberProp;
|
|
10
|
+
/** Total number of pages. */
|
|
11
|
+
pageCount?: NumberProp;
|
|
12
|
+
/** Number of page buttons to display. */
|
|
13
|
+
length?: NumberProp;
|
|
14
|
+
}
|
|
15
|
+
export declare class Pagination extends Widget<PaginationConfig> {
|
|
16
|
+
baseClass: string;
|
|
17
|
+
length: number;
|
|
18
|
+
constructor(config?: PaginationConfig);
|
|
19
|
+
declareData(): void;
|
|
20
|
+
render(context: RenderingContext, instance: Instance, key: string): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
onKeyDown(e: React.KeyboardEvent, instance: Instance): void;
|
|
22
|
+
setPage(e: React.SyntheticEvent, instance: Instance, page: number): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource react */
|
|
3
|
+
import { Widget } from "../../ui/Widget";
|
|
4
|
+
import { KeyCode } from "../../util/KeyCode";
|
|
5
|
+
import { preventFocusOnTouch } from "../../ui/FocusManager";
|
|
6
|
+
import ForwardIcon from "../icons/forward";
|
|
7
|
+
export class Pagination extends Widget {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
super(config);
|
|
10
|
+
}
|
|
11
|
+
declareData() {
|
|
12
|
+
super.declareData({
|
|
13
|
+
page: undefined,
|
|
14
|
+
length: undefined,
|
|
15
|
+
pageCount: undefined,
|
|
16
|
+
}, ...arguments);
|
|
17
|
+
}
|
|
18
|
+
render(context, instance, key) {
|
|
19
|
+
let { data } = instance;
|
|
20
|
+
let { page, pageCount, length } = data;
|
|
21
|
+
let { CSS, baseClass } = this;
|
|
22
|
+
if (!pageCount)
|
|
23
|
+
pageCount = 1;
|
|
24
|
+
let minPage = Math.max(1, page - Math.floor(length / 2));
|
|
25
|
+
let maxPage = minPage + length - 1;
|
|
26
|
+
if (maxPage > pageCount) {
|
|
27
|
+
maxPage = Math.max(pageCount, length);
|
|
28
|
+
minPage = maxPage - length + 1;
|
|
29
|
+
}
|
|
30
|
+
let nextPageIcon = _jsx(ForwardIcon, { className: CSS.element(baseClass, "icon-next-page") });
|
|
31
|
+
let prevPageIcon = _jsx(ForwardIcon, { className: CSS.element(baseClass, "icon-prev-page") });
|
|
32
|
+
let pageBtns = [];
|
|
33
|
+
for (let p = minPage - 1; p <= maxPage + 1; p++) {
|
|
34
|
+
pageBtns.push(_jsx("li", { className: CSS.element(baseClass, "page", {
|
|
35
|
+
active: page == p,
|
|
36
|
+
disabled: (p <= maxPage && p > pageCount) ||
|
|
37
|
+
(p < minPage && page == 1) ||
|
|
38
|
+
(p > maxPage && page + 1 > pageCount),
|
|
39
|
+
}), onMouseDown: (e) => {
|
|
40
|
+
e.stopPropagation();
|
|
41
|
+
preventFocusOnTouch(e);
|
|
42
|
+
}, onClick: (e) => {
|
|
43
|
+
this.setPage(e, instance, p < minPage ? page - 1 : p > maxPage ? page + 1 : p);
|
|
44
|
+
}, children: p < minPage ? prevPageIcon : p > maxPage ? nextPageIcon : p }, p < minPage ? "-1" : p > maxPage ? "-2" : p));
|
|
45
|
+
}
|
|
46
|
+
return (_jsx("ul", { className: data.classNames, style: data.style, tabIndex: 0, onKeyDown: (e) => {
|
|
47
|
+
this.onKeyDown(e, instance);
|
|
48
|
+
}, children: pageBtns }, key));
|
|
49
|
+
}
|
|
50
|
+
onKeyDown(e, instance) {
|
|
51
|
+
let { data } = instance;
|
|
52
|
+
switch (e.keyCode) {
|
|
53
|
+
case KeyCode.left:
|
|
54
|
+
this.setPage(e, instance, data.page - 1);
|
|
55
|
+
break;
|
|
56
|
+
case KeyCode.right:
|
|
57
|
+
this.setPage(e, instance, data.page + 1);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
setPage(e, instance, page) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
let { data } = instance;
|
|
65
|
+
let { pageCount } = data;
|
|
66
|
+
if (page <= pageCount && page > 0)
|
|
67
|
+
instance.set("page", page);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
Pagination.prototype.baseClass = "pagination";
|
|
71
|
+
Pagination.prototype.length = 5;
|
|
72
|
+
Pagination.prototype.styled = true;
|
|
73
|
+
Widget.alias("pagination", Pagination);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ContainerBase, StyledContainerConfig } from "../../ui/Container";
|
|
2
|
+
import { BooleanProp, NumberProp, StringProp } from "../../ui/Prop";
|
|
3
|
+
import { Instance } from "../../ui/Instance";
|
|
4
|
+
import { RenderingContext } from "../../ui/RenderingContext";
|
|
5
|
+
export interface TreeNodeConfig extends StyledContainerConfig {
|
|
6
|
+
/** Indentation level of the node. */
|
|
7
|
+
level?: NumberProp;
|
|
8
|
+
/** Set to `true` if the node is expanded. */
|
|
9
|
+
expanded?: BooleanProp;
|
|
10
|
+
/** Set to `true` if the node is a leaf (has no children). */
|
|
11
|
+
leaf?: BooleanProp;
|
|
12
|
+
/** Text to be displayed. */
|
|
13
|
+
text?: StringProp;
|
|
14
|
+
/** Set to `true` if the node is loading. */
|
|
15
|
+
loading?: BooleanProp;
|
|
16
|
+
/** Icon to be displayed. */
|
|
17
|
+
icon?: StringProp;
|
|
18
|
+
/** Icon for leaf nodes. */
|
|
19
|
+
leafIcon?: StringProp;
|
|
20
|
+
/** Icon for open folder. */
|
|
21
|
+
openFolderIcon?: StringProp;
|
|
22
|
+
/** Icon for folder. */
|
|
23
|
+
folderIcon?: StringProp;
|
|
24
|
+
/** Set to `true` to hide the arrow. */
|
|
25
|
+
hideArrow?: BooleanProp;
|
|
26
|
+
}
|
|
27
|
+
export declare class TreeNode extends ContainerBase<TreeNodeConfig> {
|
|
28
|
+
baseClass: string;
|
|
29
|
+
itemIcon: string;
|
|
30
|
+
leafIcon: string;
|
|
31
|
+
loadingIcon: string;
|
|
32
|
+
folderIcon: string;
|
|
33
|
+
openFolderIcon: string;
|
|
34
|
+
arrowIcon: string;
|
|
35
|
+
hideIcon: boolean;
|
|
36
|
+
constructor(config?: TreeNodeConfig);
|
|
37
|
+
init(): void;
|
|
38
|
+
declareData(): void;
|
|
39
|
+
prepareData(context: RenderingContext, instance: Instance): void;
|
|
40
|
+
render(context: RenderingContext, instance: Instance, key: string): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
toggle(e: React.MouseEvent, instance: Instance): void;
|
|
42
|
+
}
|