@amcharts/amcharts5 5.13.5 → 5.14.0
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/.internal/charts/funnel/FunnelSeries.d.ts +1 -1
- package/.internal/charts/funnel/FunnelSeries.d.ts.map +1 -1
- package/.internal/charts/funnel/FunnelSeries.js.map +1 -1
- package/.internal/charts/funnel/FunnelSlice.d.ts +1 -1
- package/.internal/charts/funnel/FunnelSlice.d.ts.map +1 -1
- package/.internal/charts/funnel/FunnelSlice.js.map +1 -1
- package/.internal/charts/funnel/PyramidSeries.d.ts.map +1 -1
- package/.internal/charts/funnel/PyramidSeries.js.map +1 -1
- package/.internal/charts/funnel/SlicedChart.d.ts +1 -1
- package/.internal/charts/funnel/SlicedChart.d.ts.map +1 -1
- package/.internal/charts/funnel/SlicedChart.js.map +1 -1
- package/.internal/charts/gantt/Gantt.d.ts +216 -0
- package/.internal/charts/gantt/Gantt.d.ts.map +1 -0
- package/.internal/charts/gantt/Gantt.js +772 -0
- package/.internal/charts/gantt/Gantt.js.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxis.d.ts +287 -0
- package/.internal/charts/gantt/GanttCategoryAxis.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxis.js +1238 -0
- package/.internal/charts/gantt/GanttCategoryAxis.js.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.d.ts +98 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.js +270 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.js.map +1 -0
- package/.internal/charts/gantt/GanttDateAxis.d.ts +36 -0
- package/.internal/charts/gantt/GanttDateAxis.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttDateAxis.js +35 -0
- package/.internal/charts/gantt/GanttDateAxis.js.map +1 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.d.ts +19 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.js +23 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.js.map +1 -0
- package/.internal/charts/gantt/GanttDefaultTheme.d.ts +8 -0
- package/.internal/charts/gantt/GanttDefaultTheme.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttDefaultTheme.js +756 -0
- package/.internal/charts/gantt/GanttDefaultTheme.js.map +1 -0
- package/.internal/charts/gantt/GanttSeries.d.ts +348 -0
- package/.internal/charts/gantt/GanttSeries.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttSeries.js +1524 -0
- package/.internal/charts/gantt/GanttSeries.js.map +1 -0
- package/.internal/charts/hierarchy/Hierarchy.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyDefaultTheme.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyLink.d.ts +1 -1
- package/.internal/charts/hierarchy/HierarchyLink.d.ts.map +1 -1
- package/.internal/charts/hierarchy/HierarchyLink.js.map +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchy.d.ts +2 -2
- package/.internal/charts/hierarchy/LinkedHierarchy.d.ts.map +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchy.js +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchy.js.map +1 -1
- package/.internal/charts/hierarchy/Pack.d.ts.map +1 -1
- package/.internal/charts/hierarchy/Pack.js.map +1 -1
- package/.internal/charts/hierarchy/Partition.d.ts.map +1 -1
- package/.internal/charts/hierarchy/Partition.js.map +1 -1
- package/.internal/charts/hierarchy/Treemap.js.map +1 -1
- package/.internal/charts/hierarchy/VoronoiTreemap.d.ts.map +1 -1
- package/.internal/charts/hierarchy/VoronoiTreemap.js +3 -3
- package/.internal/charts/hierarchy/VoronoiTreemap.js.map +1 -1
- package/.internal/charts/map/MapChart.d.ts.map +1 -1
- package/.internal/charts/map/MapChart.js +1 -3
- package/.internal/charts/map/MapChart.js.map +1 -1
- package/.internal/charts/stock/StockChart.d.ts +0 -1
- package/.internal/charts/stock/StockChart.d.ts.map +1 -1
- package/.internal/charts/stock/StockChart.js +11 -8
- package/.internal/charts/stock/StockChart.js.map +1 -1
- package/.internal/charts/stock/StockChartDefaultTheme.js +0 -1
- package/.internal/charts/stock/StockChartDefaultTheme.js.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts +1 -0
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.js +18 -10
- package/.internal/charts/stock/drawing/DrawingSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.js +2 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.js +2 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.js.map +1 -1
- package/.internal/charts/stock/drawing/ParallelChannelSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/ParallelChannelSeries.js +2 -1
- package/.internal/charts/stock/drawing/ParallelChannelSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/PolylineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/PolylineSeries.js +3 -1
- package/.internal/charts/stock/drawing/PolylineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.js +2 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.js +2 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.js.map +1 -1
- package/.internal/charts/stock/toolbar/DrawingControl.js +2 -2
- package/.internal/charts/stock/toolbar/DrawingControl.js.map +1 -1
- package/.internal/charts/timeline/AxisRendererCurveX.js.map +1 -1
- package/.internal/charts/timeline/AxisRendererCurveY.js.map +1 -1
- package/.internal/charts/timeline/CurveChart.js.map +1 -1
- package/.internal/charts/timeline/CurveColumnSeries.js.map +1 -1
- package/.internal/charts/timeline/CurveCursor.js +1 -1
- package/.internal/charts/timeline/CurveCursor.js.map +1 -1
- package/.internal/charts/timeline/SerpentineChart.d.ts +1 -1
- package/.internal/charts/timeline/SerpentineChart.d.ts.map +1 -1
- package/.internal/charts/timeline/SerpentineChart.js.map +1 -1
- package/.internal/charts/timeline/SpiralChart.d.ts +1 -1
- package/.internal/charts/timeline/SpiralChart.d.ts.map +1 -1
- package/.internal/charts/timeline/SpiralChart.js.map +1 -1
- package/.internal/charts/wordcloud/WordCloud.js.map +1 -1
- package/.internal/charts/xy/XYChart.d.ts.map +1 -1
- package/.internal/charts/xy/XYChart.js +16 -8
- package/.internal/charts/xy/XYChart.js.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.js +6 -3
- package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
- package/.internal/charts/xy/axes/Axis.d.ts +17 -1
- package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/Axis.js +46 -26
- package/.internal/charts/xy/axes/Axis.js.map +1 -1
- package/.internal/charts/xy/axes/AxisBullet.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisBullet.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisBullet.js.map +1 -1
- package/.internal/charts/xy/axes/AxisLabel.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisLabel.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisLabel.js.map +1 -1
- package/.internal/charts/xy/axes/AxisLabelRadial.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisLabelRadial.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisLabelRadial.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRenderer.d.ts +5 -5
- package/.internal/charts/xy/axes/AxisRenderer.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRenderer.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.js +9 -5
- package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.js +9 -5
- package/.internal/charts/xy/axes/AxisRendererY.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.d.ts +34 -3
- package/.internal/charts/xy/axes/CategoryAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.js +243 -40
- package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.d.ts +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts +16 -2
- package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +20 -5
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/EditableAxisLabel.d.ts +21 -0
- package/.internal/charts/xy/axes/EditableAxisLabel.d.ts.map +1 -0
- package/.internal/charts/xy/axes/EditableAxisLabel.js +31 -0
- package/.internal/charts/xy/axes/EditableAxisLabel.js.map +1 -0
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts +2 -2
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.d.ts +2 -2
- package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js +4 -3
- package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.d.ts +5 -1
- package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js +60 -32
- package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/CandlestickSeries.d.ts +2 -1
- package/.internal/charts/xy/series/CandlestickSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/CandlestickSeries.js +99 -44
- package/.internal/charts/xy/series/CandlestickSeries.js.map +1 -1
- package/.internal/charts/xy/series/ColumnSeries.d.ts +39 -0
- package/.internal/charts/xy/series/ColumnSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/ColumnSeries.js +77 -1
- package/.internal/charts/xy/series/ColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/LineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/LineSeries.js.map +1 -1
- package/.internal/charts/xy/series/OHLC.d.ts +6 -0
- package/.internal/charts/xy/series/OHLC.d.ts.map +1 -1
- package/.internal/charts/xy/series/OHLC.js +6 -0
- package/.internal/charts/xy/series/OHLC.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedXLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/SmoothedXLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedXYLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/SmoothedXYLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedYLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/SmoothedYLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/StepLineSeries.d.ts +8 -2
- package/.internal/charts/xy/series/StepLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/StepLineSeries.js +6 -0
- package/.internal/charts/xy/series/StepLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +4 -1
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/Classes.d.ts +28 -0
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/Root.d.ts +8 -0
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +26 -19
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Button.d.ts +4 -1
- package/.internal/core/render/Button.d.ts.map +1 -1
- package/.internal/core/render/Button.js.map +1 -1
- package/.internal/core/render/Component.d.ts +8 -0
- package/.internal/core/render/Component.d.ts.map +1 -1
- package/.internal/core/render/Component.js +17 -0
- package/.internal/core/render/Component.js.map +1 -1
- package/.internal/core/render/ConfirmButton.d.ts +30 -0
- package/.internal/core/render/ConfirmButton.d.ts.map +1 -0
- package/.internal/core/render/ConfirmButton.js +84 -0
- package/.internal/core/render/ConfirmButton.js.map +1 -0
- package/.internal/core/render/Container.d.ts +6 -0
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +49 -2
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/EditableLabel.d.ts.map +1 -1
- package/.internal/core/render/EditableLabel.js +6 -6
- package/.internal/core/render/EditableLabel.js.map +1 -1
- package/.internal/core/render/HeatLegend.d.ts +14 -0
- package/.internal/core/render/HeatLegend.d.ts.map +1 -1
- package/.internal/core/render/HeatLegend.js +16 -3
- package/.internal/core/render/HeatLegend.js.map +1 -1
- package/.internal/core/render/Link.d.ts +28 -0
- package/.internal/core/render/Link.d.ts.map +1 -0
- package/.internal/core/render/Link.js +90 -0
- package/.internal/core/render/Link.js.map +1 -0
- package/.internal/core/render/MonotoneXTension.d.ts.map +1 -1
- package/.internal/core/render/MonotoneXTension.js.map +1 -1
- package/.internal/core/render/MonotoneYTension.d.ts.map +1 -1
- package/.internal/core/render/MonotoneYTension.js.map +1 -1
- package/.internal/core/render/NumericStepper.d.ts +27 -0
- package/.internal/core/render/NumericStepper.d.ts.map +1 -0
- package/.internal/core/render/NumericStepper.js +117 -0
- package/.internal/core/render/NumericStepper.js.map +1 -0
- package/.internal/core/render/OrthogonalLine.d.ts +33 -0
- package/.internal/core/render/OrthogonalLine.d.ts.map +1 -0
- package/.internal/core/render/OrthogonalLine.js +97 -0
- package/.internal/core/render/OrthogonalLine.js.map +1 -0
- package/.internal/core/render/ProgressPie.d.ts +32 -0
- package/.internal/core/render/ProgressPie.d.ts.map +1 -0
- package/.internal/core/render/ProgressPie.js +89 -0
- package/.internal/core/render/ProgressPie.js.map +1 -0
- package/.internal/core/render/Series.d.ts +0 -7
- package/.internal/core/render/Series.d.ts.map +1 -1
- package/.internal/core/render/Series.js +24 -27
- package/.internal/core/render/Series.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts +3 -2
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +40 -30
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/core/render/patterns/LinePattern.d.ts +8 -0
- package/.internal/core/render/patterns/LinePattern.d.ts.map +1 -1
- package/.internal/core/render/patterns/LinePattern.js +32 -1
- package/.internal/core/render/patterns/LinePattern.js.map +1 -1
- package/.internal/core/util/DurationFormatter.js +1 -1
- package/.internal/core/util/DurationFormatter.js.map +1 -1
- package/.internal/core/util/Entity.d.ts.map +1 -1
- package/.internal/core/util/Entity.js.map +1 -1
- package/.internal/core/util/EventDispatcher.d.ts +32 -3
- package/.internal/core/util/EventDispatcher.d.ts.map +1 -1
- package/.internal/core/util/EventDispatcher.js +51 -5
- package/.internal/core/util/EventDispatcher.js.map +1 -1
- package/.internal/core/util/Language.d.ts +2 -0
- package/.internal/core/util/Language.d.ts.map +1 -1
- package/.internal/core/util/Language.js.map +1 -1
- package/.internal/core/util/Time.d.ts.map +1 -1
- package/.internal/core/util/Time.js +4 -1
- package/.internal/core/util/Time.js.map +1 -1
- package/.internal/plugins/colorPicker/ColorPicker.d.ts +151 -0
- package/.internal/plugins/colorPicker/ColorPicker.d.ts.map +1 -0
- package/.internal/plugins/colorPicker/ColorPicker.js +665 -0
- package/.internal/plugins/colorPicker/ColorPicker.js.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.d.ts +28 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.d.ts.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.js +87 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.js.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.d.ts +8 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.d.ts.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.js +248 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.js.map +1 -0
- package/.internal/plugins/json/Classes-script.d.ts +28 -0
- package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
- package/.internal/plugins/json/Classes-script.js +14 -0
- package/.internal/plugins/json/Classes-script.js.map +1 -1
- package/.internal/plugins/json/Classes.d.ts +28 -0
- package/.internal/plugins/json/Classes.d.ts.map +1 -1
- package/.internal/plugins/json/Classes.js +14 -0
- package/.internal/plugins/json/Classes.js.map +1 -1
- package/.internal/themes/DefaultTheme.d.ts.map +1 -1
- package/.internal/themes/DefaultTheme.js +227 -2
- package/.internal/themes/DefaultTheme.js.map +1 -1
- package/CHANGELOG.md +34 -0
- package/examples/javascript/flow-arc-horizontal/package.json +1 -1
- package/examples/javascript/flow-arc-vertical/package.json +1 -1
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gantt/README.md +6 -0
- package/examples/javascript/gantt/index.css +11 -0
- package/examples/javascript/gantt/index.html +12 -0
- package/examples/javascript/gantt/index.js +233 -0
- package/examples/javascript/gantt/package.json +16 -0
- package/examples/javascript/gantt/webpack.config.js +38 -0
- package/examples/javascript/gantt-multilevel/README.md +6 -0
- package/examples/javascript/gantt-multilevel/index.css +11 -0
- package/examples/javascript/gantt-multilevel/index.html +12 -0
- package/examples/javascript/gantt-multilevel/index.js +111 -0
- package/examples/javascript/gantt-multilevel/package.json +16 -0
- package/examples/javascript/gantt-multilevel/webpack.config.js +38 -0
- package/examples/javascript/gantt-simple/README.md +6 -0
- package/examples/javascript/gantt-simple/index.css +11 -0
- package/examples/javascript/gantt-simple/index.html +12 -0
- package/examples/javascript/gantt-simple/index.js +94 -0
- package/examples/javascript/gantt-simple/package.json +16 -0
- package/examples/javascript/gantt-simple/webpack.config.js +38 -0
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-clustered-points/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/index.js +2 -0
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/index.js +2 -0
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/index.js +2 -0
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/index.js +2 -0
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/index.js +2 -0
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/index.js +1 -0
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/index.js +2 -0
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/timeline-horizontal-serpentine-chart/package.json +1 -1
- package/examples/javascript/timeline-linear-process-diagram/package.json +1 -1
- package/examples/javascript/timeline-serpentine-chart/package.json +1 -1
- package/examples/javascript/timeline-spiral-chart/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/index.js +1 -0
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-arc-horizontal/package.json +1 -1
- package/examples/typescript/flow-arc-vertical/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gantt/README.md +6 -0
- package/examples/typescript/gantt/index.css +11 -0
- package/examples/typescript/gantt/index.html +12 -0
- package/examples/typescript/gantt/index.ts +233 -0
- package/examples/typescript/gantt/package.json +18 -0
- package/examples/typescript/gantt/tsconfig.json +12 -0
- package/examples/typescript/gantt/webpack.config.js +45 -0
- package/examples/typescript/gantt-multilevel/README.md +6 -0
- package/examples/typescript/gantt-multilevel/index.css +11 -0
- package/examples/typescript/gantt-multilevel/index.html +12 -0
- package/examples/typescript/gantt-multilevel/index.ts +111 -0
- package/examples/typescript/gantt-multilevel/package.json +18 -0
- package/examples/typescript/gantt-multilevel/tsconfig.json +12 -0
- package/examples/typescript/gantt-multilevel/webpack.config.js +45 -0
- package/examples/typescript/gantt-simple/README.md +6 -0
- package/examples/typescript/gantt-simple/index.css +11 -0
- package/examples/typescript/gantt-simple/index.html +12 -0
- package/examples/typescript/gantt-simple/index.ts +94 -0
- package/examples/typescript/gantt-simple/package.json +18 -0
- package/examples/typescript/gantt-simple/tsconfig.json +12 -0
- package/examples/typescript/gantt-simple/webpack.config.js +45 -0
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-clustered-points/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/index.ts +2 -0
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/index.ts +2 -0
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/index.ts +2 -0
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/index.ts +2 -0
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/index.ts +2 -0
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/index.ts +1 -0
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/index.ts +2 -0
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/timeline-horizontal-serpentine-chart/package.json +1 -1
- package/examples/typescript/timeline-linear-process-diagram/package.json +1 -1
- package/examples/typescript/timeline-serpentine-chart/package.json +1 -1
- package/examples/typescript/timeline-spiral-chart/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/index.ts +1 -0
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/gantt.d.ts +9 -0
- package/gantt.d.ts.map +1 -0
- package/gantt.js +9 -0
- package/gantt.js.map +1 -0
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.js +5 -0
- package/index.js.map +1 -1
- package/locales/ar.d.ts +4 -0
- package/locales/ar.d.ts.map +1 -1
- package/locales/ar.js +5 -0
- package/locales/ar.js.map +1 -1
- package/locales/bg_BG.d.ts +2 -0
- package/locales/bg_BG.d.ts.map +1 -1
- package/locales/bg_BG.js +3 -1
- package/locales/bg_BG.js.map +1 -1
- package/locales/bs_BA.d.ts +4 -0
- package/locales/bs_BA.d.ts.map +1 -1
- package/locales/bs_BA.js +5 -0
- package/locales/bs_BA.js.map +1 -1
- package/locales/ca_ES.d.ts +4 -0
- package/locales/ca_ES.d.ts.map +1 -1
- package/locales/ca_ES.js +5 -0
- package/locales/ca_ES.js.map +1 -1
- package/locales/cs_CZ.d.ts +4 -0
- package/locales/cs_CZ.d.ts.map +1 -1
- package/locales/cs_CZ.js +5 -0
- package/locales/cs_CZ.js.map +1 -1
- package/locales/da_DK.d.ts +4 -0
- package/locales/da_DK.d.ts.map +1 -1
- package/locales/da_DK.js +5 -0
- package/locales/da_DK.js.map +1 -1
- package/locales/de_CH.d.ts +4 -0
- package/locales/de_CH.d.ts.map +1 -1
- package/locales/de_CH.js +5 -0
- package/locales/de_CH.js.map +1 -1
- package/locales/de_DE.d.ts +4 -0
- package/locales/de_DE.d.ts.map +1 -1
- package/locales/de_DE.js +5 -0
- package/locales/de_DE.js.map +1 -1
- package/locales/el_GR.d.ts +4 -0
- package/locales/el_GR.d.ts.map +1 -1
- package/locales/el_GR.js +5 -0
- package/locales/el_GR.js.map +1 -1
- package/locales/en.d.ts +2 -0
- package/locales/en.d.ts.map +1 -1
- package/locales/en.js +3 -1
- package/locales/en.js.map +1 -1
- package/locales/en_CA.d.ts +4 -0
- package/locales/en_CA.d.ts.map +1 -1
- package/locales/en_CA.js +5 -0
- package/locales/en_CA.js.map +1 -1
- package/locales/en_US.d.ts +4 -0
- package/locales/en_US.d.ts.map +1 -1
- package/locales/en_US.js +5 -0
- package/locales/en_US.js.map +1 -1
- package/locales/es_ES.d.ts +4 -0
- package/locales/es_ES.d.ts.map +1 -1
- package/locales/es_ES.js +6 -1
- package/locales/es_ES.js.map +1 -1
- package/locales/et_EE.d.ts +4 -0
- package/locales/et_EE.d.ts.map +1 -1
- package/locales/et_EE.js +5 -0
- package/locales/et_EE.js.map +1 -1
- package/locales/fi_FI.d.ts +4 -0
- package/locales/fi_FI.d.ts.map +1 -1
- package/locales/fi_FI.js +5 -0
- package/locales/fi_FI.js.map +1 -1
- package/locales/fo_FO.d.ts +2 -0
- package/locales/fo_FO.d.ts.map +1 -1
- package/locales/fo_FO.js +3 -1
- package/locales/fo_FO.js.map +1 -1
- package/locales/fr_FR.d.ts +4 -0
- package/locales/fr_FR.d.ts.map +1 -1
- package/locales/fr_FR.js +5 -0
- package/locales/fr_FR.js.map +1 -1
- package/locales/he_IL.d.ts +4 -0
- package/locales/he_IL.d.ts.map +1 -1
- package/locales/he_IL.js +5 -0
- package/locales/he_IL.js.map +1 -1
- package/locales/hi_IN.d.ts +4 -0
- package/locales/hi_IN.d.ts.map +1 -1
- package/locales/hi_IN.js +5 -0
- package/locales/hi_IN.js.map +1 -1
- package/locales/hr_HR.d.ts +4 -0
- package/locales/hr_HR.d.ts.map +1 -1
- package/locales/hr_HR.js +5 -0
- package/locales/hr_HR.js.map +1 -1
- package/locales/hu_HU.d.ts +4 -0
- package/locales/hu_HU.d.ts.map +1 -1
- package/locales/hu_HU.js +5 -0
- package/locales/hu_HU.js.map +1 -1
- package/locales/id_ID.d.ts +4 -0
- package/locales/id_ID.d.ts.map +1 -1
- package/locales/id_ID.js +5 -0
- package/locales/id_ID.js.map +1 -1
- package/locales/it_IT.d.ts +4 -0
- package/locales/it_IT.d.ts.map +1 -1
- package/locales/it_IT.js +5 -0
- package/locales/it_IT.js.map +1 -1
- package/locales/ja_JP.d.ts +4 -0
- package/locales/ja_JP.d.ts.map +1 -1
- package/locales/ja_JP.js +5 -0
- package/locales/ja_JP.js.map +1 -1
- package/locales/ko_KR.d.ts +4 -0
- package/locales/ko_KR.d.ts.map +1 -1
- package/locales/ko_KR.js +5 -0
- package/locales/ko_KR.js.map +1 -1
- package/locales/lt_LT.d.ts +4 -0
- package/locales/lt_LT.d.ts.map +1 -1
- package/locales/lt_LT.js +5 -0
- package/locales/lt_LT.js.map +1 -1
- package/locales/lv_LV.d.ts +4 -0
- package/locales/lv_LV.d.ts.map +1 -1
- package/locales/lv_LV.js +5 -0
- package/locales/lv_LV.js.map +1 -1
- package/locales/nb_NO.d.ts +4 -0
- package/locales/nb_NO.d.ts.map +1 -1
- package/locales/nb_NO.js +5 -0
- package/locales/nb_NO.js.map +1 -1
- package/locales/nl_NL.d.ts +4 -0
- package/locales/nl_NL.d.ts.map +1 -1
- package/locales/nl_NL.js +5 -0
- package/locales/nl_NL.js.map +1 -1
- package/locales/pl_PL.d.ts +4 -0
- package/locales/pl_PL.d.ts.map +1 -1
- package/locales/pl_PL.js +5 -0
- package/locales/pl_PL.js.map +1 -1
- package/locales/pt_BR.d.ts +4 -0
- package/locales/pt_BR.d.ts.map +1 -1
- package/locales/pt_BR.js +5 -0
- package/locales/pt_BR.js.map +1 -1
- package/locales/pt_PT.d.ts +4 -0
- package/locales/pt_PT.d.ts.map +1 -1
- package/locales/pt_PT.js +5 -0
- package/locales/pt_PT.js.map +1 -1
- package/locales/ro_RO.d.ts +4 -0
- package/locales/ro_RO.d.ts.map +1 -1
- package/locales/ro_RO.js +5 -0
- package/locales/ro_RO.js.map +1 -1
- package/locales/ru_RU.d.ts +4 -0
- package/locales/ru_RU.d.ts.map +1 -1
- package/locales/ru_RU.js +5 -0
- package/locales/ru_RU.js.map +1 -1
- package/locales/sk_SK.d.ts +4 -0
- package/locales/sk_SK.d.ts.map +1 -1
- package/locales/sk_SK.js +5 -0
- package/locales/sk_SK.js.map +1 -1
- package/locales/sl_SL.d.ts +4 -0
- package/locales/sl_SL.d.ts.map +1 -1
- package/locales/sl_SL.js +5 -0
- package/locales/sl_SL.js.map +1 -1
- package/locales/sr_RS.d.ts +4 -0
- package/locales/sr_RS.d.ts.map +1 -1
- package/locales/sr_RS.js +5 -0
- package/locales/sr_RS.js.map +1 -1
- package/locales/sv_SE.d.ts +4 -0
- package/locales/sv_SE.d.ts.map +1 -1
- package/locales/sv_SE.js +5 -0
- package/locales/sv_SE.js.map +1 -1
- package/locales/th_TH.d.ts +4 -0
- package/locales/th_TH.d.ts.map +1 -1
- package/locales/th_TH.js +5 -0
- package/locales/th_TH.js.map +1 -1
- package/locales/tr_TR.d.ts +4 -0
- package/locales/tr_TR.d.ts.map +1 -1
- package/locales/tr_TR.js +5 -0
- package/locales/tr_TR.js.map +1 -1
- package/locales/uk_UA.d.ts +4 -0
- package/locales/uk_UA.d.ts.map +1 -1
- package/locales/uk_UA.js +5 -0
- package/locales/uk_UA.js.map +1 -1
- package/locales/vi_VN.d.ts +4 -0
- package/locales/vi_VN.d.ts.map +1 -1
- package/locales/vi_VN.js +5 -0
- package/locales/vi_VN.js.map +1 -1
- package/locales/zh_Hans.d.ts +4 -0
- package/locales/zh_Hans.d.ts.map +1 -1
- package/locales/zh_Hans.js +5 -0
- package/locales/zh_Hans.js.map +1 -1
- package/locales/zh_Hant.d.ts +4 -0
- package/locales/zh_Hant.d.ts.map +1 -1
- package/locales/zh_Hant.js +5 -0
- package/locales/zh_Hant.js.map +1 -1
- package/package.json +1 -1
- package/plugins/colorPicker.d.ts +3 -0
- package/plugins/colorPicker.d.ts.map +1 -0
- package/plugins/colorPicker.js +3 -0
- package/plugins/colorPicker.js.map +1 -0
- package/xy.d.ts +1 -0
- package/xy.d.ts.map +1 -1
- package/xy.js +1 -0
- package/xy.js.map +1 -1
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
import { ColorPickerDefaultTheme } from "./ColorPickerDefaultTheme";
|
|
2
|
+
import { color, Color } from "../../core/util/Color";
|
|
3
|
+
import { ListTemplate } from "../../core/util/List";
|
|
4
|
+
import { p100 } from "../../core/util/Percent";
|
|
5
|
+
import { Template } from "../../core/util/Template";
|
|
6
|
+
import { Button } from "../../core/render/Button";
|
|
7
|
+
import { Circle } from "../../core/render/Circle";
|
|
8
|
+
import { Container } from "../../core/render/Container";
|
|
9
|
+
import { EditableLabel } from "../../core/render/EditableLabel";
|
|
10
|
+
import { Graphics } from "../../core/render/Graphics";
|
|
11
|
+
import { Label } from "../../core/render/Label";
|
|
12
|
+
import { Rectangle } from "../../core/render/Rectangle";
|
|
13
|
+
import { RoundedRectangle } from "../../core/render/RoundedRectangle";
|
|
14
|
+
import { Slider } from "../../core/render/Slider";
|
|
15
|
+
import { LinearGradient } from "../../core/render/gradients/LinearGradient";
|
|
16
|
+
import * as $utils from "../../core/util/Utils";
|
|
17
|
+
import * as $type from "../../core/util/Type";
|
|
18
|
+
export class ColorPicker extends Container {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
Object.defineProperty(this, "_currentRectangle", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: void 0
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "_clickOverlay", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: this.children.push(Rectangle.new(this._root, {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
fillOpacity: 0,
|
|
34
|
+
interactive: true,
|
|
35
|
+
isMeasured: false,
|
|
36
|
+
fill: color(0x000000),
|
|
37
|
+
forceHidden: true
|
|
38
|
+
}))
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(this, "rectangles", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: new ListTemplate(Template.new({}), () => RoundedRectangle._new(this._root, {}, [this.rectangles.template]))
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Container for color gradients.
|
|
48
|
+
*/
|
|
49
|
+
Object.defineProperty(this, "gradientsContainer", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: this.children.push(Container.new(this._root, {
|
|
54
|
+
themeTagsSelf: ["gradientscontainer"],
|
|
55
|
+
width: p100,
|
|
56
|
+
layout: this._root.horizontalLayout
|
|
57
|
+
}))
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Container for color gradients.
|
|
61
|
+
* @ignore
|
|
62
|
+
*/
|
|
63
|
+
Object.defineProperty(this, "colorGradientsContainer", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true,
|
|
66
|
+
writable: true,
|
|
67
|
+
value: this.gradientsContainer.children.push(Container.new(this._root, {
|
|
68
|
+
width: p100,
|
|
69
|
+
layer: 0
|
|
70
|
+
}))
|
|
71
|
+
});
|
|
72
|
+
/**
|
|
73
|
+
* Rectangle that displays the color gradient.
|
|
74
|
+
* @ignore
|
|
75
|
+
*/
|
|
76
|
+
Object.defineProperty(this, "colorRectangle", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
configurable: true,
|
|
79
|
+
writable: true,
|
|
80
|
+
value: this.colorGradientsContainer.children.push(Rectangle.new(this._root, {
|
|
81
|
+
crisp: true,
|
|
82
|
+
themeTags: ["colorrectangle"],
|
|
83
|
+
width: p100,
|
|
84
|
+
height: p100,
|
|
85
|
+
strokeWidth: 1
|
|
86
|
+
}))
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Rectangle that displays the white overlay.
|
|
90
|
+
* @ignore*
|
|
91
|
+
*/
|
|
92
|
+
Object.defineProperty(this, "colorRectangleWhiteOverlay", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
configurable: true,
|
|
95
|
+
writable: true,
|
|
96
|
+
value: this.colorGradientsContainer.children.push(Rectangle.new(this._root, {
|
|
97
|
+
crisp: true,
|
|
98
|
+
forceInactive: true,
|
|
99
|
+
width: p100,
|
|
100
|
+
height: p100
|
|
101
|
+
}))
|
|
102
|
+
});
|
|
103
|
+
/**
|
|
104
|
+
* Rectangle that displays the black overlay.
|
|
105
|
+
* @ignore
|
|
106
|
+
*/
|
|
107
|
+
Object.defineProperty(this, "colorRectangleBlackOverlay", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
configurable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
value: this.colorGradientsContainer.children.push(Rectangle.new(this._root, {
|
|
112
|
+
crisp: true,
|
|
113
|
+
forceInactive: true,
|
|
114
|
+
width: p100,
|
|
115
|
+
height: p100
|
|
116
|
+
}))
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* Slider that displays the hue of the color.
|
|
120
|
+
*/
|
|
121
|
+
Object.defineProperty(this, "slider", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
configurable: true,
|
|
124
|
+
writable: true,
|
|
125
|
+
value: this.gradientsContainer.children.push(Slider.new(this._root, {
|
|
126
|
+
orientation: "vertical",
|
|
127
|
+
themeTags: ["gradient"]
|
|
128
|
+
}))
|
|
129
|
+
});
|
|
130
|
+
/**
|
|
131
|
+
* @ignore
|
|
132
|
+
*/
|
|
133
|
+
Object.defineProperty(this, "inputContainer", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
configurable: true,
|
|
136
|
+
writable: true,
|
|
137
|
+
value: this.children.push(Container.new(this._root, {
|
|
138
|
+
marginTop: 10,
|
|
139
|
+
layout: this._root.horizontalLayout,
|
|
140
|
+
width: p100
|
|
141
|
+
}))
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* Button that shows color picker button.
|
|
145
|
+
*/
|
|
146
|
+
Object.defineProperty(this, "pickerButton", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
configurable: true,
|
|
149
|
+
writable: true,
|
|
150
|
+
value: this.inputContainer.children.push(Button.new(this._root, {
|
|
151
|
+
themeTags: ["picker", "pickertool"],
|
|
152
|
+
toggleKey: "active",
|
|
153
|
+
icon: Graphics.new(this._root, {
|
|
154
|
+
themeTags: ["icon"]
|
|
155
|
+
})
|
|
156
|
+
}))
|
|
157
|
+
});
|
|
158
|
+
/**
|
|
159
|
+
* Button that allows to remove color.
|
|
160
|
+
*/
|
|
161
|
+
Object.defineProperty(this, "noColorButton", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
configurable: true,
|
|
164
|
+
writable: true,
|
|
165
|
+
value: this.inputContainer.children.push(Button.new(this._root, {
|
|
166
|
+
themeTags: ["nocolor", "pickertool"],
|
|
167
|
+
icon: Graphics.new(this._root, {
|
|
168
|
+
themeTags: ["icon"]
|
|
169
|
+
})
|
|
170
|
+
}))
|
|
171
|
+
});
|
|
172
|
+
/**
|
|
173
|
+
* Editable label that allows to input color in hex format.
|
|
174
|
+
*/
|
|
175
|
+
Object.defineProperty(this, "colorInput", {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
configurable: true,
|
|
178
|
+
writable: true,
|
|
179
|
+
value: this.inputContainer.children.push(EditableLabel.new(this._root, {
|
|
180
|
+
themeTags: ["input", "color"]
|
|
181
|
+
}))
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* @ignore
|
|
185
|
+
*/
|
|
186
|
+
Object.defineProperty(this, "opacityContainer", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
configurable: true,
|
|
189
|
+
writable: true,
|
|
190
|
+
value: this.children.push(Container.new(this._root, {
|
|
191
|
+
width: p100,
|
|
192
|
+
marginTop: 10,
|
|
193
|
+
layout: this._root.horizontalLayout
|
|
194
|
+
}))
|
|
195
|
+
});
|
|
196
|
+
/**
|
|
197
|
+
* Slider that allows to change opacity of the color.
|
|
198
|
+
*/
|
|
199
|
+
Object.defineProperty(this, "opacitySlider", {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
configurable: true,
|
|
202
|
+
writable: true,
|
|
203
|
+
value: this.opacityContainer.children.push(Slider.new(this._root, {
|
|
204
|
+
themeTags: ["opacity"],
|
|
205
|
+
orientation: "horizontal"
|
|
206
|
+
}))
|
|
207
|
+
});
|
|
208
|
+
/**
|
|
209
|
+
* Circle that indicates the target color.
|
|
210
|
+
*/
|
|
211
|
+
Object.defineProperty(this, "targetCircle", {
|
|
212
|
+
enumerable: true,
|
|
213
|
+
configurable: true,
|
|
214
|
+
writable: true,
|
|
215
|
+
value: this.colorGradientsContainer.children.push(Circle.new(this._root, {
|
|
216
|
+
themeTags: ["circle", "target"],
|
|
217
|
+
isMeasured: false,
|
|
218
|
+
forceInactive: true,
|
|
219
|
+
position: "absolute",
|
|
220
|
+
layer: 30
|
|
221
|
+
}))
|
|
222
|
+
});
|
|
223
|
+
/**
|
|
224
|
+
* @ignore
|
|
225
|
+
*/
|
|
226
|
+
Object.defineProperty(this, "buttonsContainer", {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
configurable: true,
|
|
229
|
+
writable: true,
|
|
230
|
+
value: this.children.push(Container.new(this._root, {
|
|
231
|
+
marginTop: 10,
|
|
232
|
+
layout: this._root.horizontalLayout,
|
|
233
|
+
width: p100
|
|
234
|
+
}))
|
|
235
|
+
});
|
|
236
|
+
/**
|
|
237
|
+
* Button that allows to cancel color selection.
|
|
238
|
+
*/
|
|
239
|
+
Object.defineProperty(this, "cancelButton", {
|
|
240
|
+
enumerable: true,
|
|
241
|
+
configurable: true,
|
|
242
|
+
writable: true,
|
|
243
|
+
value: this.buttonsContainer.children.push(Button.new(this._root, {
|
|
244
|
+
themeTags: ["cancel"],
|
|
245
|
+
label: Label.new(this._root, {})
|
|
246
|
+
}))
|
|
247
|
+
});
|
|
248
|
+
/**
|
|
249
|
+
* Button that allows to confirm color selection.
|
|
250
|
+
*/
|
|
251
|
+
Object.defineProperty(this, "okButton", {
|
|
252
|
+
enumerable: true,
|
|
253
|
+
configurable: true,
|
|
254
|
+
writable: true,
|
|
255
|
+
value: this.buttonsContainer.children.push(Button.new(this._root, {
|
|
256
|
+
themeTags: ["ok"],
|
|
257
|
+
label: Label.new(this._root, {})
|
|
258
|
+
}))
|
|
259
|
+
});
|
|
260
|
+
Object.defineProperty(this, "_isColorDown", {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
configurable: true,
|
|
263
|
+
writable: true,
|
|
264
|
+
value: false
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(this, "_isPicking", {
|
|
267
|
+
enumerable: true,
|
|
268
|
+
configurable: true,
|
|
269
|
+
writable: true,
|
|
270
|
+
value: false
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(this, "_isEditing", {
|
|
273
|
+
enumerable: true,
|
|
274
|
+
configurable: true,
|
|
275
|
+
writable: true,
|
|
276
|
+
value: false
|
|
277
|
+
});
|
|
278
|
+
Object.defineProperty(this, "_previousColor", {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
configurable: true,
|
|
281
|
+
writable: true,
|
|
282
|
+
value: void 0
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(this, "_previousOpacity", {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
configurable: true,
|
|
287
|
+
writable: true,
|
|
288
|
+
value: void 0
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(this, "_prevColor", {
|
|
291
|
+
enumerable: true,
|
|
292
|
+
configurable: true,
|
|
293
|
+
writable: true,
|
|
294
|
+
value: void 0
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* @ignore
|
|
299
|
+
*/
|
|
300
|
+
_afterNew() {
|
|
301
|
+
this._defaultThemes.push(ColorPickerDefaultTheme.new(this._root));
|
|
302
|
+
this.addTag("colorpicker");
|
|
303
|
+
super._afterNew();
|
|
304
|
+
this.set("tooltip", this._root.systemTooltip);
|
|
305
|
+
this.cancelButton.events.on("click", () => {
|
|
306
|
+
this.cancel();
|
|
307
|
+
});
|
|
308
|
+
this.okButton.events.on("click", () => {
|
|
309
|
+
this.set("colorButton", undefined);
|
|
310
|
+
// dispatch event
|
|
311
|
+
this.events.dispatch("colorchanged", {
|
|
312
|
+
type: "colorchanged",
|
|
313
|
+
target: this,
|
|
314
|
+
color: this.get("color"),
|
|
315
|
+
colorOpacity: this.get("colorOpacity")
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
const container = this.root.container;
|
|
319
|
+
container.events.on("boundschanged", () => {
|
|
320
|
+
const w = container.width();
|
|
321
|
+
const h = container.height();
|
|
322
|
+
this._clickOverlay.setAll({
|
|
323
|
+
width: w,
|
|
324
|
+
height: h,
|
|
325
|
+
x: 0,
|
|
326
|
+
y: 0
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
this._clickOverlay.events.on("click", () => {
|
|
330
|
+
if (!this._isPicking && !this._isEditing) {
|
|
331
|
+
this.cancel();
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
this.pickerButton.set("active", false);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
this.set("layout", this._root.verticalLayout);
|
|
338
|
+
// remove text color input when nocolor button is pressed
|
|
339
|
+
this.noColorButton.events.on("click", () => {
|
|
340
|
+
this.set("color", undefined);
|
|
341
|
+
const colorButton = this.get("colorButton");
|
|
342
|
+
if (colorButton) {
|
|
343
|
+
colorButton.setAll({
|
|
344
|
+
color: undefined,
|
|
345
|
+
colorOpacity: 1
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
// dispatch event
|
|
349
|
+
this.events.dispatch("colorchanged", {
|
|
350
|
+
type: "colorchanged",
|
|
351
|
+
target: this,
|
|
352
|
+
color: undefined,
|
|
353
|
+
colorOpacity: 1
|
|
354
|
+
});
|
|
355
|
+
this.set("colorButton", undefined);
|
|
356
|
+
});
|
|
357
|
+
this.colorInput.on("text", (text) => {
|
|
358
|
+
if (text) {
|
|
359
|
+
text = text.replace(/[^abcdef0-9#]/ig, "");
|
|
360
|
+
if (text.substring(0, 1) !== "#") {
|
|
361
|
+
text = "#" + text;
|
|
362
|
+
}
|
|
363
|
+
try {
|
|
364
|
+
this.set("color", color(text));
|
|
365
|
+
}
|
|
366
|
+
catch (e) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
this.colorInput.set("text", text);
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
this.pickerButton.on("active", (active) => {
|
|
373
|
+
this._isPicking = Boolean(active);
|
|
374
|
+
this.set("forceInactive", active);
|
|
375
|
+
});
|
|
376
|
+
if ($utils.supports("keyboardevents")) {
|
|
377
|
+
this._disposers.push($utils.addEventListener(document, "keyup", (e) => {
|
|
378
|
+
if (e.key === "Escape") {
|
|
379
|
+
this.set("colorButton", undefined);
|
|
380
|
+
}
|
|
381
|
+
}));
|
|
382
|
+
}
|
|
383
|
+
this.gradientsContainer.events.on("boundschanged", () => {
|
|
384
|
+
const w = Math.floor(this.colorGradientsContainer.width());
|
|
385
|
+
this.colorGradientsContainer.setAll({ width: w, height: w });
|
|
386
|
+
this.slider.set("height", w);
|
|
387
|
+
});
|
|
388
|
+
this.targetCircle.setAll({
|
|
389
|
+
x: this.colorRectangle.width(),
|
|
390
|
+
y: 0
|
|
391
|
+
});
|
|
392
|
+
// limit target circle to the bounds of the color gradient
|
|
393
|
+
this.targetCircle.adapters.add("x", (x) => {
|
|
394
|
+
if ($type.isNumber(x)) {
|
|
395
|
+
const w = this.colorRectangle.width();
|
|
396
|
+
return Math.min(w, Math.max(0, x));
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
this.targetCircle.adapters.add("y", (y) => {
|
|
400
|
+
if ($type.isNumber(y)) {
|
|
401
|
+
const h = this.colorRectangle.height();
|
|
402
|
+
return Math.min(h, Math.max(0, y));
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
this.slider.on("start", () => {
|
|
406
|
+
this.set("hue", this.slider.get("start", 0));
|
|
407
|
+
});
|
|
408
|
+
const sliderBg = this.slider.get("background");
|
|
409
|
+
if (sliderBg) {
|
|
410
|
+
sliderBg.set("layer", 0);
|
|
411
|
+
}
|
|
412
|
+
// handle opacity slider changes
|
|
413
|
+
this.opacitySlider.on("start", () => {
|
|
414
|
+
this.set("colorOpacity", this.opacitySlider.get("start", 1));
|
|
415
|
+
});
|
|
416
|
+
const opacitySliderBg = this.opacitySlider.get("background");
|
|
417
|
+
if (opacitySliderBg) {
|
|
418
|
+
opacitySliderBg.set("layer", 0);
|
|
419
|
+
}
|
|
420
|
+
// big rectangle events
|
|
421
|
+
this.colorRectangle.events.on("pointerdown", (e) => {
|
|
422
|
+
this._isColorDown = true;
|
|
423
|
+
this._handleTargetMove(e);
|
|
424
|
+
this.set("draggable", false);
|
|
425
|
+
this.dragStop(e);
|
|
426
|
+
});
|
|
427
|
+
this.colorRectangle.events.on("globalpointermove", (e) => {
|
|
428
|
+
if (this._isColorDown) {
|
|
429
|
+
this._handleTargetMove(e);
|
|
430
|
+
}
|
|
431
|
+
if (this._isPicking) {
|
|
432
|
+
const display = this._root.container._display;
|
|
433
|
+
const context = display.getLayer().context;
|
|
434
|
+
const resolution = display._renderer.resolution;
|
|
435
|
+
const imageData = context.getImageData(Math.floor(e.point.x * resolution), Math.floor(e.point.y * resolution), 1, 1).data;
|
|
436
|
+
const fill = Color.fromRGB(imageData[0], imageData[1], imageData[2]);
|
|
437
|
+
this.set("color", fill);
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
this.colorRectangle.events.on("globalpointerup", (e) => {
|
|
441
|
+
this.set("draggable", true);
|
|
442
|
+
this.dragStop(e);
|
|
443
|
+
this._isColorDown = false;
|
|
444
|
+
});
|
|
445
|
+
this.colorInput.on("active", (active) => {
|
|
446
|
+
this._isEditing = Boolean(active);
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* @ignore
|
|
451
|
+
*/
|
|
452
|
+
_updateChildren() {
|
|
453
|
+
var _a, _b, _c, _d;
|
|
454
|
+
super._updateChildren();
|
|
455
|
+
if (this.isDirty("colorButton")) {
|
|
456
|
+
this.pickerButton.set("active", false);
|
|
457
|
+
const colorButton = this.get("colorButton");
|
|
458
|
+
let hidden = true;
|
|
459
|
+
if (colorButton) {
|
|
460
|
+
this.opacityContainer.set("forceHidden", colorButton.get("disableOpacity"));
|
|
461
|
+
this._previousColor = colorButton.get("color", colorButton.getPrivate("color"));
|
|
462
|
+
this._previousOpacity = colorButton.get("colorOpacity");
|
|
463
|
+
const parent = this.parent;
|
|
464
|
+
if (parent) {
|
|
465
|
+
parent.children.moveValue(this._clickOverlay);
|
|
466
|
+
parent.children.moveValue(this);
|
|
467
|
+
}
|
|
468
|
+
hidden = false;
|
|
469
|
+
this.show();
|
|
470
|
+
this.set("color", colorButton.get("color", colorButton.getPrivate("color")));
|
|
471
|
+
this.set("colorOpacity", colorButton.get("colorOpacity") || 1);
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
this.hide();
|
|
475
|
+
}
|
|
476
|
+
this._clickOverlay.set("forceHidden", hidden);
|
|
477
|
+
}
|
|
478
|
+
if (this.isDirty("hue")) {
|
|
479
|
+
this._handleDirtyHue();
|
|
480
|
+
this._updateColor();
|
|
481
|
+
}
|
|
482
|
+
if (this.isDirty("colorOpacity")) {
|
|
483
|
+
const opacitySlider = this.opacitySlider;
|
|
484
|
+
const opacity = this.get("colorOpacity", 1);
|
|
485
|
+
opacitySlider.startGrip.set("tooltipText", "opacity:" + Math.round(opacity * 100) + "%");
|
|
486
|
+
if (!opacitySlider.startGrip.isDragging()) {
|
|
487
|
+
opacitySlider.set("start", opacity);
|
|
488
|
+
opacitySlider.markDirtyKey("start");
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
opacitySlider.startGrip.hover();
|
|
492
|
+
}
|
|
493
|
+
const colorButton = this.get("colorButton");
|
|
494
|
+
if (colorButton) {
|
|
495
|
+
colorButton.set("colorOpacity", opacity);
|
|
496
|
+
}
|
|
497
|
+
this._updateOpacitySliderGrip();
|
|
498
|
+
}
|
|
499
|
+
if (this.isDirty("color")) {
|
|
500
|
+
const fill = this.get("color");
|
|
501
|
+
const prevColor = this._prevColor;
|
|
502
|
+
let same = false;
|
|
503
|
+
if (fill && prevColor && fill.toCSSHex() === prevColor.toCSSHex()) {
|
|
504
|
+
same = true;
|
|
505
|
+
// void
|
|
506
|
+
}
|
|
507
|
+
if (!same) {
|
|
508
|
+
if (fill) {
|
|
509
|
+
this.targetCircle.show();
|
|
510
|
+
if (!this._isColorDown) {
|
|
511
|
+
const hsv = $utils.hslToHsv(fill.toHSL());
|
|
512
|
+
this.setRaw("hue", hsv.h);
|
|
513
|
+
if (!this.slider.startGrip.isDragging()) {
|
|
514
|
+
this.slider.set("start", hsv.h);
|
|
515
|
+
}
|
|
516
|
+
this.targetCircle.setAll({
|
|
517
|
+
x: this.colorRectangle.width() * hsv.s,
|
|
518
|
+
y: this.colorRectangle.height() * (1 - hsv.v)
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
this.targetCircle.set("fill", fill);
|
|
522
|
+
this._handleDirtyHue();
|
|
523
|
+
this.colorInput.set("text", fill.toCSSHex().substring(1, 7));
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
this.targetCircle.hide();
|
|
527
|
+
this.colorInput.set("text", "");
|
|
528
|
+
}
|
|
529
|
+
this._prevColor = fill;
|
|
530
|
+
const opacitySliderBg = this.opacitySlider.get("background");
|
|
531
|
+
if (opacitySliderBg) {
|
|
532
|
+
opacitySliderBg.set("fillGradient", LinearGradient.new(this._root, {
|
|
533
|
+
rotation: 0,
|
|
534
|
+
stops: [
|
|
535
|
+
{ color: fill, opacity: 0 },
|
|
536
|
+
{ color: fill, opacity: 1 }
|
|
537
|
+
]
|
|
538
|
+
}));
|
|
539
|
+
}
|
|
540
|
+
const colorButton = this.get("colorButton");
|
|
541
|
+
if (colorButton) {
|
|
542
|
+
colorButton.set("color", fill);
|
|
543
|
+
}
|
|
544
|
+
this._updateOpacitySliderGrip();
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
if (this.isDirty("backgroundColor")) {
|
|
548
|
+
const bgColor = this.get("backgroundColor", color(0xffffff));
|
|
549
|
+
this.colorRectangle.setAll({
|
|
550
|
+
stroke: bgColor
|
|
551
|
+
});
|
|
552
|
+
this.colorRectangleBlackOverlay.setAll({
|
|
553
|
+
stroke: bgColor
|
|
554
|
+
});
|
|
555
|
+
this.colorRectangleWhiteOverlay.setAll({
|
|
556
|
+
stroke: bgColor
|
|
557
|
+
});
|
|
558
|
+
(_a = this.pickerButton.get("background")) === null || _a === void 0 ? void 0 : _a.states.applyAnimate("default", 0);
|
|
559
|
+
(_b = this.noColorButton.get("background")) === null || _b === void 0 ? void 0 : _b.states.applyAnimate("default", 0);
|
|
560
|
+
(_c = this.cancelButton.get("background")) === null || _c === void 0 ? void 0 : _c.states.applyAnimate("default", 0);
|
|
561
|
+
(_d = this.okButton.get("background")) === null || _d === void 0 ? void 0 : _d.states.applyAnimate("default", 0);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* @ignore
|
|
566
|
+
*/
|
|
567
|
+
_handleDirtyHue() {
|
|
568
|
+
var _a, _b, _c;
|
|
569
|
+
const start = this.slider.get("start", 0);
|
|
570
|
+
const fill = Color.fromHSL(start, 1, .5);
|
|
571
|
+
const grip = this.slider.startGrip;
|
|
572
|
+
this.colorRectangle.setAll({
|
|
573
|
+
fill: fill,
|
|
574
|
+
stroke: this.get("backgroundColor", color(0xffffff))
|
|
575
|
+
});
|
|
576
|
+
const gripBg = grip.get("background");
|
|
577
|
+
if (gripBg) {
|
|
578
|
+
gripBg.set("fill", fill);
|
|
579
|
+
(_a = gripBg.states.lookup("default")) === null || _a === void 0 ? void 0 : _a.set("fill", fill);
|
|
580
|
+
(_b = gripBg.states.lookup("hover")) === null || _b === void 0 ? void 0 : _b.set("fill", fill);
|
|
581
|
+
(_c = gripBg.states.lookup("down")) === null || _c === void 0 ? void 0 : _c.set("fill", fill);
|
|
582
|
+
}
|
|
583
|
+
this.colorRectangleWhiteOverlay.setAll({
|
|
584
|
+
fillGradient: LinearGradient.new(this._root, {
|
|
585
|
+
rotation: 0,
|
|
586
|
+
stops: [
|
|
587
|
+
{ color: color(0xffffff), opacity: 1, offset: 0 },
|
|
588
|
+
{ color: color(0xffffff), opacity: 0, offset: 1 }
|
|
589
|
+
]
|
|
590
|
+
})
|
|
591
|
+
});
|
|
592
|
+
this.colorRectangleBlackOverlay.setAll({
|
|
593
|
+
fillGradient: LinearGradient.new(this._root, {
|
|
594
|
+
stops: [
|
|
595
|
+
{ color: color(0x000000), opacity: 0, offset: 0 },
|
|
596
|
+
{ color: color(0x000000), opacity: 1, offset: 1 }
|
|
597
|
+
]
|
|
598
|
+
})
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* @ignore
|
|
603
|
+
*/
|
|
604
|
+
_handleTargetMove(e) {
|
|
605
|
+
const point = this.colorGradientsContainer.toLocal({ x: e.point.x, y: e.point.y });
|
|
606
|
+
this.targetCircle.setAll({
|
|
607
|
+
x: point.x,
|
|
608
|
+
y: point.y
|
|
609
|
+
});
|
|
610
|
+
this._updateColor();
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* @ignore
|
|
614
|
+
*/
|
|
615
|
+
_updateColor() {
|
|
616
|
+
const x = this.targetCircle.x();
|
|
617
|
+
const y = this.targetCircle.y();
|
|
618
|
+
const h = this.colorRectangle.height();
|
|
619
|
+
const w = this.colorRectangle.width();
|
|
620
|
+
const start = this.slider.get("start", 0);
|
|
621
|
+
let hsl = $utils.hsvToHsl({ h: start, s: x / w, v: 1 - y / h });
|
|
622
|
+
this.set("color", Color.fromHSL(hsl.h, hsl.s, hsl.l));
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* @ignore
|
|
626
|
+
*/
|
|
627
|
+
_updateOpacitySliderGrip() {
|
|
628
|
+
var _a, _b, _c;
|
|
629
|
+
const opacityBg = this.opacitySlider.startGrip.get("background");
|
|
630
|
+
if (opacityBg) {
|
|
631
|
+
const fill = Color.interpolate(this.get("colorOpacity", 1), this.get("backgroundColor", color(0xffffff)), this.get("color", color(0xffffff)));
|
|
632
|
+
opacityBg.set("fill", fill);
|
|
633
|
+
(_a = opacityBg.states.lookup("default")) === null || _a === void 0 ? void 0 : _a.set("fill", fill);
|
|
634
|
+
(_b = opacityBg.states.lookup("hover")) === null || _b === void 0 ? void 0 : _b.set("fill", fill);
|
|
635
|
+
(_c = opacityBg.states.lookup("down")) === null || _c === void 0 ? void 0 : _c.set("fill", fill);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Cancels color selection and restores previous color.
|
|
640
|
+
*/
|
|
641
|
+
cancel() {
|
|
642
|
+
var _a;
|
|
643
|
+
(_a = this.get("colorButton")) === null || _a === void 0 ? void 0 : _a.setAll({
|
|
644
|
+
color: this._previousColor,
|
|
645
|
+
colorOpacity: this._previousOpacity
|
|
646
|
+
});
|
|
647
|
+
this._isEditing = false;
|
|
648
|
+
this._isPicking = false;
|
|
649
|
+
this.set("color", this._previousColor);
|
|
650
|
+
this.set("colorButton", undefined);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
Object.defineProperty(ColorPicker, "className", {
|
|
654
|
+
enumerable: true,
|
|
655
|
+
configurable: true,
|
|
656
|
+
writable: true,
|
|
657
|
+
value: "ColorPicker"
|
|
658
|
+
});
|
|
659
|
+
Object.defineProperty(ColorPicker, "classNames", {
|
|
660
|
+
enumerable: true,
|
|
661
|
+
configurable: true,
|
|
662
|
+
writable: true,
|
|
663
|
+
value: Container.classNames.concat([ColorPicker.className])
|
|
664
|
+
});
|
|
665
|
+
//# sourceMappingURL=ColorPicker.js.map
|