@antv/component 2.1.1-alpha.1 → 2.1.1-alpha.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/dist/component.min.js +1 -1
- package/esm/animation/fadeIn.d.ts +1 -1
- package/esm/animation/fadeOut.d.ts +1 -1
- package/esm/animation/utils.d.ts +3 -3
- package/esm/animation/utils.js +37 -31
- package/esm/animation/utils.js.map +1 -1
- package/esm/constant.js +1 -1
- package/esm/constant.js.map +1 -1
- package/esm/core/component.js +43 -30
- package/esm/core/component.js.map +1 -1
- package/esm/shapes/Text.js +21 -13
- package/esm/shapes/Text.js.map +1 -1
- package/esm/ui/axis/axis.d.ts +1 -1
- package/esm/ui/axis/axis.js +31 -25
- package/esm/ui/axis/axis.js.map +1 -1
- package/esm/ui/axis/constant.js +13 -11
- package/esm/ui/axis/constant.js.map +1 -1
- package/esm/ui/axis/guides/grid.d.ts +1 -1
- package/esm/ui/axis/guides/grid.js +34 -29
- package/esm/ui/axis/guides/grid.js.map +1 -1
- package/esm/ui/axis/guides/labels.js +83 -76
- package/esm/ui/axis/guides/labels.js.map +1 -1
- package/esm/ui/axis/guides/line.js +87 -74
- package/esm/ui/axis/guides/line.js.map +1 -1
- package/esm/ui/axis/guides/ticks.d.ts +1 -1
- package/esm/ui/axis/guides/ticks.js +39 -31
- package/esm/ui/axis/guides/ticks.js.map +1 -1
- package/esm/ui/axis/guides/title.d.ts +1 -1
- package/esm/ui/axis/guides/title.js +37 -33
- package/esm/ui/axis/guides/title.js.map +1 -1
- package/esm/ui/axis/guides/utils.js +12 -10
- package/esm/ui/axis/guides/utils.js.map +1 -1
- package/esm/ui/axis/overlap/autoEllipsis.js +19 -12
- package/esm/ui/axis/overlap/autoEllipsis.js.map +1 -1
- package/esm/ui/axis/overlap/autoHide.js +24 -20
- package/esm/ui/axis/overlap/autoHide.js.map +1 -1
- package/esm/ui/axis/overlap/autoRotate.js +25 -11
- package/esm/ui/axis/overlap/autoRotate.js.map +1 -1
- package/esm/ui/axis/overlap/autoWrap.js +14 -11
- package/esm/ui/axis/overlap/autoWrap.js.map +1 -1
- package/esm/ui/axis/overlap/index.js +7 -7
- package/esm/ui/axis/overlap/index.js.map +1 -1
- package/esm/ui/axis/utils/bounds.js +75 -48
- package/esm/ui/axis/utils/bounds.js.map +1 -1
- package/esm/ui/axis/utils/contain.js +14 -14
- package/esm/ui/axis/utils/contain.js.map +1 -1
- package/esm/ui/axis/utils/index.js +7 -3
- package/esm/ui/axis/utils/index.js.map +1 -1
- package/esm/ui/axis/utils/intersect.js +33 -21
- package/esm/ui/axis/utils/intersect.js.map +1 -1
- package/esm/ui/axis/utils/test.js +41 -29
- package/esm/ui/axis/utils/test.js.map +1 -1
- package/esm/ui/breadcrumb/index.js +72 -64
- package/esm/ui/breadcrumb/index.js.map +1 -1
- package/esm/ui/button/constant.js +3 -3
- package/esm/ui/button/constant.js.map +1 -1
- package/esm/ui/button/index.js +97 -81
- package/esm/ui/button/index.js.map +1 -1
- package/esm/ui/checkbox/constant.js +4 -4
- package/esm/ui/checkbox/constant.js.map +1 -1
- package/esm/ui/checkbox/index.js +26 -23
- package/esm/ui/checkbox/index.js.map +1 -1
- package/esm/ui/crosshair/base.js +45 -29
- package/esm/ui/crosshair/base.js.map +1 -1
- package/esm/ui/crosshair/circle.js +34 -25
- package/esm/ui/crosshair/circle.js.map +1 -1
- package/esm/ui/crosshair/constant.js +4 -4
- package/esm/ui/crosshair/constant.js.map +1 -1
- package/esm/ui/crosshair/line.js +75 -55
- package/esm/ui/crosshair/line.js.map +1 -1
- package/esm/ui/crosshair/polygon.js +70 -54
- package/esm/ui/crosshair/polygon.js.map +1 -1
- package/esm/ui/grid/index.d.ts +1 -1
- package/esm/ui/grid/index.js +95 -73
- package/esm/ui/grid/index.js.map +1 -1
- package/esm/ui/indicator/constant.js +2 -2
- package/esm/ui/indicator/constant.js.map +1 -1
- package/esm/ui/indicator/indicator.js +63 -58
- package/esm/ui/indicator/indicator.js.map +1 -1
- package/esm/ui/layout/layout.js +66 -52
- package/esm/ui/layout/layout.js.map +1 -1
- package/esm/ui/legend/base.js +13 -12
- package/esm/ui/legend/base.js.map +1 -1
- package/esm/ui/legend/category/item.js +156 -122
- package/esm/ui/legend/category/item.js.map +1 -1
- package/esm/ui/legend/category/items.js +201 -158
- package/esm/ui/legend/category/items.js.map +1 -1
- package/esm/ui/legend/category.js +56 -46
- package/esm/ui/legend/category.js.map +1 -1
- package/esm/ui/legend/constant.js +6 -6
- package/esm/ui/legend/constant.js.map +1 -1
- package/esm/ui/legend/continuous/handle.js +33 -28
- package/esm/ui/legend/continuous/handle.js.map +1 -1
- package/esm/ui/legend/continuous/ribbon.js +38 -34
- package/esm/ui/legend/continuous/ribbon.js.map +1 -1
- package/esm/ui/legend/continuous/utils.js +11 -10
- package/esm/ui/legend/continuous/utils.js.map +1 -1
- package/esm/ui/legend/continuous.js +521 -417
- package/esm/ui/legend/continuous.js.map +1 -1
- package/esm/ui/legend/utils.js +31 -24
- package/esm/ui/legend/utils.js.map +1 -1
- package/esm/ui/marker/index.js +44 -38
- package/esm/ui/marker/index.js.map +1 -1
- package/esm/ui/marker/symbol.js +24 -24
- package/esm/ui/marker/symbol.js.map +1 -1
- package/esm/ui/marker/utils.js +2 -2
- package/esm/ui/marker/utils.js.map +1 -1
- package/esm/ui/navigator/index.js +159 -128
- package/esm/ui/navigator/index.js.map +1 -1
- package/esm/ui/poptip/constant.d.ts +1 -1
- package/esm/ui/poptip/constant.js +69 -68
- package/esm/ui/poptip/constant.js.map +1 -1
- package/esm/ui/poptip/index.js +111 -95
- package/esm/ui/poptip/index.js.map +1 -1
- package/esm/ui/poptip/utils.js +15 -8
- package/esm/ui/poptip/utils.js.map +1 -1
- package/esm/ui/scrollbar/index.js +132 -102
- package/esm/ui/scrollbar/index.js.map +1 -1
- package/esm/ui/select/option.js +58 -48
- package/esm/ui/select/option.js.map +1 -1
- package/esm/ui/select/select.js +164 -142
- package/esm/ui/select/select.js.map +1 -1
- package/esm/ui/slider/constant.js +4 -4
- package/esm/ui/slider/constant.js.map +1 -1
- package/esm/ui/slider/handle.js +54 -46
- package/esm/ui/slider/handle.js.map +1 -1
- package/esm/ui/slider/index.js +328 -282
- package/esm/ui/slider/index.js.map +1 -1
- package/esm/ui/sparkline/columns.js +34 -25
- package/esm/ui/sparkline/columns.js.map +1 -1
- package/esm/ui/sparkline/index.js +180 -145
- package/esm/ui/sparkline/index.js.map +1 -1
- package/esm/ui/sparkline/lines.js +50 -37
- package/esm/ui/sparkline/lines.js.map +1 -1
- package/esm/ui/sparkline/path.js +40 -36
- package/esm/ui/sparkline/path.js.map +1 -1
- package/esm/ui/sparkline/utils.js +9 -8
- package/esm/ui/sparkline/utils.js.map +1 -1
- package/esm/ui/switch/constant.js +1 -1
- package/esm/ui/switch/constant.js.map +1 -1
- package/esm/ui/switch/index.js +54 -44
- package/esm/ui/switch/index.js.map +1 -1
- package/esm/ui/tag/index.js +32 -29
- package/esm/ui/tag/index.js.map +1 -1
- package/esm/ui/timebar/controller.js +79 -69
- package/esm/ui/timebar/controller.js.map +1 -1
- package/esm/ui/timebar/handle.js +71 -62
- package/esm/ui/timebar/handle.js.map +1 -1
- package/esm/ui/timebar/icons.js +478 -308
- package/esm/ui/timebar/icons.js.map +1 -1
- package/esm/ui/timebar/timebar.js +318 -263
- package/esm/ui/timebar/timebar.js.map +1 -1
- package/esm/ui/timebar/utils.js +7 -7
- package/esm/ui/timebar/utils.js.map +1 -1
- package/esm/ui/timeline/index.js +6 -2
- package/esm/ui/timeline/index.js.map +1 -1
- package/esm/ui/title/index.js +64 -59
- package/esm/ui/title/index.js.map +1 -1
- package/esm/ui/tooltip/constant.js +30 -26
- package/esm/ui/tooltip/constant.js.map +1 -1
- package/esm/ui/tooltip/index.js +126 -109
- package/esm/ui/tooltip/index.js.map +1 -1
- package/esm/util/bbox.js +47 -24
- package/esm/util/bbox.js.map +1 -1
- package/esm/util/callback.js +2 -1
- package/esm/util/callback.js.map +1 -1
- package/esm/util/classnames.js +10 -8
- package/esm/util/classnames.js.map +1 -1
- package/esm/util/deep-assign.js +14 -6
- package/esm/util/deep-assign.js.map +1 -1
- package/esm/util/defined.js +1 -1
- package/esm/util/defined.js.map +1 -1
- package/esm/util/ellipsis.js +2 -1
- package/esm/util/ellipsis.js.map +1 -1
- package/esm/util/event.js +3 -3
- package/esm/util/event.js.map +1 -1
- package/esm/util/geometry/line-length.js +4 -1
- package/esm/util/geometry/line-length.js.map +1 -1
- package/esm/util/geometry/lines-intersection.js +10 -5
- package/esm/util/geometry/lines-intersection.js.map +1 -1
- package/esm/util/group-by.js +1 -1
- package/esm/util/group-by.js.map +1 -1
- package/esm/util/group.js +3 -3
- package/esm/util/group.js.map +1 -1
- package/esm/util/html.js +1 -1
- package/esm/util/html.js.map +1 -1
- package/esm/util/if-show.js +5 -3
- package/esm/util/if-show.js.map +1 -1
- package/esm/util/in-range.js +3 -1
- package/esm/util/in-range.js.map +1 -1
- package/esm/util/interpolate.js +19 -12
- package/esm/util/interpolate.js.map +1 -1
- package/esm/util/keyframe-interpolate.d.ts +1 -1
- package/esm/util/keyframe-interpolate.js +7 -6
- package/esm/util/keyframe-interpolate.js.map +1 -1
- package/esm/util/layout/executer.js +4 -4
- package/esm/util/layout/executer.js.map +1 -1
- package/esm/util/layout/flex/index.js +26 -24
- package/esm/util/layout/flex/index.js.map +1 -1
- package/esm/util/layout/grid/index.js +1 -1
- package/esm/util/layout/grid/index.js.map +1 -1
- package/esm/util/layout/utils/helper.js +8 -7
- package/esm/util/layout/utils/helper.js.map +1 -1
- package/esm/util/matrix.js +8 -7
- package/esm/util/matrix.js.map +1 -1
- package/esm/util/number.js +7 -6
- package/esm/util/number.js.map +1 -1
- package/esm/util/offscreen.js +17 -9
- package/esm/util/offscreen.js.map +1 -1
- package/esm/util/omit.js +3 -3
- package/esm/util/omit.js.map +1 -1
- package/esm/util/path.js +41 -36
- package/esm/util/path.js.map +1 -1
- package/esm/util/primitive.js +3 -3
- package/esm/util/primitive.js.map +1 -1
- package/esm/util/replace-children.js +4 -3
- package/esm/util/replace-children.js.map +1 -1
- package/esm/util/sampling.js +3 -3
- package/esm/util/sampling.js.map +1 -1
- package/esm/util/scale-to-pixel.js +5 -4
- package/esm/util/scale-to-pixel.js.map +1 -1
- package/esm/util/selection.js +186 -142
- package/esm/util/selection.js.map +1 -1
- package/esm/util/series.js +1 -1
- package/esm/util/series.js.map +1 -1
- package/esm/util/shape.js +27 -15
- package/esm/util/shape.js.map +1 -1
- package/esm/util/string.js +5 -4
- package/esm/util/string.js.map +1 -1
- package/esm/util/style.js +29 -23
- package/esm/util/style.js.map +1 -1
- package/esm/util/svg2marker.js +16 -13
- package/esm/util/svg2marker.js.map +1 -1
- package/esm/util/text.js +14 -14
- package/esm/util/text.js.map +1 -1
- package/esm/util/throttle.js +13 -7
- package/esm/util/throttle.js.map +1 -1
- package/esm/util/time.js +24 -22
- package/esm/util/time.js.map +1 -1
- package/esm/util/timer.js +9 -5
- package/esm/util/timer.js.map +1 -1
- package/esm/util/transform.js +6 -5
- package/esm/util/transform.js.map +1 -1
- package/esm/util/transpose.js +1 -1
- package/esm/util/transpose.js.map +1 -1
- package/esm/util/traverse.js +1 -1
- package/esm/util/traverse.js.map +1 -1
- package/esm/util/visibility.js +2 -2
- package/esm/util/visibility.js.map +1 -1
- package/esm/util/wrap.js +4 -2
- package/esm/util/wrap.js.map +1 -1
- package/lib/animation/fadeIn.d.ts +1 -1
- package/lib/animation/fadeIn.js +1 -1
- package/lib/animation/fadeIn.js.map +1 -1
- package/lib/animation/fadeOut.d.ts +1 -1
- package/lib/animation/fadeOut.js +1 -1
- package/lib/animation/fadeOut.js.map +1 -1
- package/lib/animation/index.js +1 -1
- package/lib/animation/utils.d.ts +3 -3
- package/lib/animation/utils.js +39 -33
- package/lib/animation/utils.js.map +1 -1
- package/lib/core/component.js +43 -31
- package/lib/core/component.js.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/shapes/Text.js +22 -15
- package/lib/shapes/Text.js.map +1 -1
- package/lib/shapes/index.js +1 -1
- package/lib/types/index.js +1 -1
- package/lib/ui/axis/axis.d.ts +1 -1
- package/lib/ui/axis/axis.js +39 -34
- package/lib/ui/axis/axis.js.map +1 -1
- package/lib/ui/axis/constant.js +12 -10
- package/lib/ui/axis/constant.js.map +1 -1
- package/lib/ui/axis/guides/grid.d.ts +1 -1
- package/lib/ui/axis/guides/grid.js +40 -35
- package/lib/ui/axis/guides/grid.js.map +1 -1
- package/lib/ui/axis/guides/labels.js +89 -82
- package/lib/ui/axis/guides/labels.js.map +1 -1
- package/lib/ui/axis/guides/line.js +92 -79
- package/lib/ui/axis/guides/line.js.map +1 -1
- package/lib/ui/axis/guides/ticks.d.ts +1 -1
- package/lib/ui/axis/guides/ticks.js +45 -37
- package/lib/ui/axis/guides/ticks.js.map +1 -1
- package/lib/ui/axis/guides/title.d.ts +1 -1
- package/lib/ui/axis/guides/title.js +41 -37
- package/lib/ui/axis/guides/title.js.map +1 -1
- package/lib/ui/axis/guides/utils.js +14 -12
- package/lib/ui/axis/guides/utils.js.map +1 -1
- package/lib/ui/axis/overlap/autoEllipsis.js +22 -15
- package/lib/ui/axis/overlap/autoEllipsis.js.map +1 -1
- package/lib/ui/axis/overlap/autoHide.js +27 -23
- package/lib/ui/axis/overlap/autoHide.js.map +1 -1
- package/lib/ui/axis/overlap/autoRotate.js +26 -12
- package/lib/ui/axis/overlap/autoRotate.js.map +1 -1
- package/lib/ui/axis/overlap/autoWrap.js +16 -13
- package/lib/ui/axis/overlap/autoWrap.js.map +1 -1
- package/lib/ui/axis/overlap/index.js +12 -12
- package/lib/ui/axis/overlap/index.js.map +1 -1
- package/lib/ui/axis/utils/bounds.js +75 -49
- package/lib/ui/axis/utils/bounds.js.map +1 -1
- package/lib/ui/axis/utils/contain.js +15 -15
- package/lib/ui/axis/utils/contain.js.map +1 -1
- package/lib/ui/axis/utils/index.js +8 -4
- package/lib/ui/axis/utils/index.js.map +1 -1
- package/lib/ui/axis/utils/intersect.js +34 -22
- package/lib/ui/axis/utils/intersect.js.map +1 -1
- package/lib/ui/axis/utils/test.js +47 -35
- package/lib/ui/axis/utils/test.js.map +1 -1
- package/lib/ui/breadcrumb/index.js +77 -70
- package/lib/ui/breadcrumb/index.js.map +1 -1
- package/lib/ui/button/index.js +101 -86
- package/lib/ui/button/index.js.map +1 -1
- package/lib/ui/checkbox/constant.js +2 -2
- package/lib/ui/checkbox/constant.js.map +1 -1
- package/lib/ui/checkbox/index.js +28 -26
- package/lib/ui/checkbox/index.js.map +1 -1
- package/lib/ui/crosshair/base.js +48 -33
- package/lib/ui/crosshair/base.js.map +1 -1
- package/lib/ui/crosshair/circle.js +37 -29
- package/lib/ui/crosshair/circle.js.map +1 -1
- package/lib/ui/crosshair/constant.js +1 -1
- package/lib/ui/crosshair/constant.js.map +1 -1
- package/lib/ui/crosshair/index.js +1 -1
- package/lib/ui/crosshair/line.js +77 -58
- package/lib/ui/crosshair/line.js.map +1 -1
- package/lib/ui/crosshair/polygon.js +72 -57
- package/lib/ui/crosshair/polygon.js.map +1 -1
- package/lib/ui/grid/index.d.ts +1 -1
- package/lib/ui/grid/index.js +97 -76
- package/lib/ui/grid/index.js.map +1 -1
- package/lib/ui/indicator/constant.js +1 -1
- package/lib/ui/indicator/constant.js.map +1 -1
- package/lib/ui/indicator/index.js +1 -1
- package/lib/ui/indicator/indicator.js +67 -63
- package/lib/ui/indicator/indicator.js.map +1 -1
- package/lib/ui/layout/layout.js +70 -57
- package/lib/ui/layout/layout.js.map +1 -1
- package/lib/ui/legend/base.js +15 -14
- package/lib/ui/legend/base.js.map +1 -1
- package/lib/ui/legend/category/item.js +159 -126
- package/lib/ui/legend/category/item.js.map +1 -1
- package/lib/ui/legend/category/items.js +208 -166
- package/lib/ui/legend/category/items.js.map +1 -1
- package/lib/ui/legend/category.js +60 -51
- package/lib/ui/legend/category.js.map +1 -1
- package/lib/ui/legend/constant.js +2 -2
- package/lib/ui/legend/constant.js.map +1 -1
- package/lib/ui/legend/continuous/handle.js +35 -31
- package/lib/ui/legend/continuous/handle.js.map +1 -1
- package/lib/ui/legend/continuous/ribbon.js +43 -40
- package/lib/ui/legend/continuous/ribbon.js.map +1 -1
- package/lib/ui/legend/continuous/utils.js +11 -10
- package/lib/ui/legend/continuous/utils.js.map +1 -1
- package/lib/ui/legend/continuous.js +535 -432
- package/lib/ui/legend/continuous.js.map +1 -1
- package/lib/ui/legend/index.js +2 -2
- package/lib/ui/legend/index.js.map +1 -1
- package/lib/ui/legend/utils.js +32 -25
- package/lib/ui/legend/utils.js.map +1 -1
- package/lib/ui/marker/index.js +48 -43
- package/lib/ui/marker/index.js.map +1 -1
- package/lib/ui/marker/symbol.js +22 -22
- package/lib/ui/marker/symbol.js.map +1 -1
- package/lib/ui/marker/utils.js +3 -3
- package/lib/ui/marker/utils.js.map +1 -1
- package/lib/ui/navigator/index.js +165 -135
- package/lib/ui/navigator/index.js.map +1 -1
- package/lib/ui/poptip/constant.d.ts +1 -1
- package/lib/ui/poptip/constant.js +67 -66
- package/lib/ui/poptip/constant.js.map +1 -1
- package/lib/ui/poptip/index.js +115 -100
- package/lib/ui/poptip/index.js.map +1 -1
- package/lib/ui/poptip/utils.js +15 -8
- package/lib/ui/poptip/utils.js.map +1 -1
- package/lib/ui/scrollbar/index.js +136 -107
- package/lib/ui/scrollbar/index.js.map +1 -1
- package/lib/ui/select/option.js +61 -52
- package/lib/ui/select/option.js.map +1 -1
- package/lib/ui/select/select.js +169 -148
- package/lib/ui/select/select.js.map +1 -1
- package/lib/ui/slider/constant.js +1 -1
- package/lib/ui/slider/constant.js.map +1 -1
- package/lib/ui/slider/handle.js +56 -49
- package/lib/ui/slider/handle.js.map +1 -1
- package/lib/ui/slider/index.js +336 -291
- package/lib/ui/slider/index.js.map +1 -1
- package/lib/ui/sparkline/columns.js +36 -28
- package/lib/ui/sparkline/columns.js.map +1 -1
- package/lib/ui/sparkline/index.js +187 -153
- package/lib/ui/sparkline/index.js.map +1 -1
- package/lib/ui/sparkline/lines.js +52 -40
- package/lib/ui/sparkline/lines.js.map +1 -1
- package/lib/ui/sparkline/path.js +42 -38
- package/lib/ui/sparkline/path.js.map +1 -1
- package/lib/ui/sparkline/utils.js +10 -9
- package/lib/ui/sparkline/utils.js.map +1 -1
- package/lib/ui/switch/index.js +58 -49
- package/lib/ui/switch/index.js.map +1 -1
- package/lib/ui/tag/index.js +36 -34
- package/lib/ui/tag/index.js.map +1 -1
- package/lib/ui/timebar/controller.js +82 -73
- package/lib/ui/timebar/controller.js.map +1 -1
- package/lib/ui/timebar/handle.js +74 -67
- package/lib/ui/timebar/handle.js.map +1 -1
- package/lib/ui/timebar/icons.js +466 -312
- package/lib/ui/timebar/icons.js.map +1 -1
- package/lib/ui/timebar/timebar.js +326 -272
- package/lib/ui/timebar/timebar.js.map +1 -1
- package/lib/ui/timebar/utils.js +8 -8
- package/lib/ui/timebar/utils.js.map +1 -1
- package/lib/ui/timeline/index.js +5 -2
- package/lib/ui/timeline/index.js.map +1 -1
- package/lib/ui/title/index.js +65 -61
- package/lib/ui/title/index.js.map +1 -1
- package/lib/ui/tooltip/constant.js +30 -26
- package/lib/ui/tooltip/constant.js.map +1 -1
- package/lib/ui/tooltip/index.js +129 -113
- package/lib/ui/tooltip/index.js.map +1 -1
- package/lib/util/bbox.js +46 -24
- package/lib/util/bbox.js.map +1 -1
- package/lib/util/callback.js +3 -2
- package/lib/util/callback.js.map +1 -1
- package/lib/util/classnames.js +10 -8
- package/lib/util/classnames.js.map +1 -1
- package/lib/util/deep-assign.js +15 -7
- package/lib/util/deep-assign.js.map +1 -1
- package/lib/util/defined.js +1 -1
- package/lib/util/defined.js.map +1 -1
- package/lib/util/ellipsis.js +3 -2
- package/lib/util/ellipsis.js.map +1 -1
- package/lib/util/event.js +3 -3
- package/lib/util/event.js.map +1 -1
- package/lib/util/extend-display-object.js +2 -2
- package/lib/util/extend-display-object.js.map +1 -1
- package/lib/util/geometry/index.js +1 -1
- package/lib/util/geometry/line-length.js +4 -1
- package/lib/util/geometry/line-length.js.map +1 -1
- package/lib/util/geometry/lines-intersection.js +10 -5
- package/lib/util/geometry/lines-intersection.js.map +1 -1
- package/lib/util/group-by.js +1 -1
- package/lib/util/group-by.js.map +1 -1
- package/lib/util/group.js +3 -3
- package/lib/util/group.js.map +1 -1
- package/lib/util/html.js +1 -1
- package/lib/util/html.js.map +1 -1
- package/lib/util/if-show.js +5 -3
- package/lib/util/if-show.js.map +1 -1
- package/lib/util/in-range.js +3 -1
- package/lib/util/in-range.js.map +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/interpolate.js +19 -12
- package/lib/util/interpolate.js.map +1 -1
- package/lib/util/keyframe-interpolate.d.ts +1 -1
- package/lib/util/keyframe-interpolate.js +8 -7
- package/lib/util/keyframe-interpolate.js.map +1 -1
- package/lib/util/layout/executer.js +6 -6
- package/lib/util/layout/executer.js.map +1 -1
- package/lib/util/layout/flex/index.js +28 -26
- package/lib/util/layout/flex/index.js.map +1 -1
- package/lib/util/layout/grid/index.js +1 -1
- package/lib/util/layout/grid/index.js.map +1 -1
- package/lib/util/layout/index.js +1 -1
- package/lib/util/layout/utils/helper.js +9 -8
- package/lib/util/layout/utils/helper.js.map +1 -1
- package/lib/util/matrix.js +8 -7
- package/lib/util/matrix.js.map +1 -1
- package/lib/util/number.js +7 -6
- package/lib/util/number.js.map +1 -1
- package/lib/util/offscreen.js +20 -12
- package/lib/util/offscreen.js.map +1 -1
- package/lib/util/omit.js +3 -3
- package/lib/util/omit.js.map +1 -1
- package/lib/util/path.js +42 -37
- package/lib/util/path.js.map +1 -1
- package/lib/util/primitive.js +2 -2
- package/lib/util/primitive.js.map +1 -1
- package/lib/util/replace-children.js +4 -3
- package/lib/util/replace-children.js.map +1 -1
- package/lib/util/sampling.js +3 -3
- package/lib/util/sampling.js.map +1 -1
- package/lib/util/scale-to-pixel.js +5 -4
- package/lib/util/scale-to-pixel.js.map +1 -1
- package/lib/util/selection.js +187 -144
- package/lib/util/selection.js.map +1 -1
- package/lib/util/series.js +2 -2
- package/lib/util/series.js.map +1 -1
- package/lib/util/shape.js +28 -16
- package/lib/util/shape.js.map +1 -1
- package/lib/util/string.js +5 -4
- package/lib/util/string.js.map +1 -1
- package/lib/util/style.js +30 -24
- package/lib/util/style.js.map +1 -1
- package/lib/util/svg2marker.js +17 -15
- package/lib/util/svg2marker.js.map +1 -1
- package/lib/util/text.js +16 -16
- package/lib/util/text.js.map +1 -1
- package/lib/util/throttle.js +13 -7
- package/lib/util/throttle.js.map +1 -1
- package/lib/util/time.js +24 -22
- package/lib/util/time.js.map +1 -1
- package/lib/util/timer.js +9 -5
- package/lib/util/timer.js.map +1 -1
- package/lib/util/transform.js +6 -5
- package/lib/util/transform.js.map +1 -1
- package/lib/util/transpose.js +1 -1
- package/lib/util/transpose.js.map +1 -1
- package/lib/util/traverse.js +1 -1
- package/lib/util/traverse.js.map +1 -1
- package/lib/util/visibility.js +3 -3
- package/lib/util/visibility.js.map +1 -1
- package/lib/util/wrap.js +5 -3
- package/lib/util/wrap.js.map +1 -1
- package/package.json +8 -8
- package/src/ui/poptip/constant.ts +1 -1
- package/src/ui/slider/index.ts +2 -3
package/lib/ui/timebar/icons.js
CHANGED
|
@@ -1,58 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChartType = exports.SelectionType = exports.PlayPause = exports.ToggleIcon = exports.SpeedSelect = exports.Split = exports.BarChart = exports.LineChart = exports.Value = exports.Range = exports.Pause = exports.Play = exports.Forward = exports.Backward = exports.Reset = exports.IconBase = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var util_1 = require("@antv/util");
|
|
6
|
+
var core_1 = require("../../core");
|
|
7
|
+
var shapes_1 = require("../../shapes");
|
|
8
|
+
var util_2 = require("../../util");
|
|
9
|
+
var indicator_1 = require("../indicator");
|
|
10
|
+
var select_1 = require("../select");
|
|
11
|
+
var IconBase = /** @class */ (function (_super) {
|
|
12
|
+
tslib_1.__extends(IconBase, _super);
|
|
13
|
+
function IconBase(options) {
|
|
14
|
+
var _this = _super.call(this, (0, util_2.deepAssign)({}, { style: { backgroundOpacity: IconBase.backgroundOpacities.default } }, IconBase.defaultOptions, options)) || this;
|
|
15
|
+
/** hover 时是否显示背景 */
|
|
16
|
+
_this.showBackground = true;
|
|
17
|
+
_this.background = _this.appendChild(new shapes_1.Rect({}));
|
|
18
|
+
_this.icon = _this.appendChild(new shapes_1.Group({}));
|
|
19
|
+
return _this;
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(IconBase.prototype, "label", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return 'BaseIcon';
|
|
24
|
+
},
|
|
25
|
+
enumerable: false,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(IconBase.prototype, "lineWidth", {
|
|
29
|
+
get: function () {
|
|
30
|
+
return Math.log10(this.attributes.size);
|
|
31
|
+
},
|
|
32
|
+
enumerable: false,
|
|
33
|
+
configurable: true
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(IconBase.prototype, "padding", {
|
|
36
|
+
get: function () {
|
|
37
|
+
return (0, util_2.parseSeriesAttr)(this.attributes.size / 5);
|
|
38
|
+
},
|
|
39
|
+
enumerable: false,
|
|
40
|
+
configurable: true
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(IconBase.prototype, "iconSize", {
|
|
43
|
+
get: function () {
|
|
44
|
+
var size = this.attributes.size;
|
|
45
|
+
var _a = tslib_1.__read(this.padding, 4), top = _a[0], right = _a[1], bottom = _a[2], left = _a[3];
|
|
46
|
+
return Math.max(size - Math.max(left + right, top + bottom), this.lineWidth * 2 + 1);
|
|
47
|
+
},
|
|
48
|
+
enumerable: false,
|
|
49
|
+
configurable: true
|
|
50
|
+
});
|
|
51
|
+
IconBase.prototype.renderBackground = function () {
|
|
52
|
+
var _a = this.attributes, x = _a.x, y = _a.y, size = _a.size;
|
|
53
|
+
var halfSize = size / 2;
|
|
54
|
+
var backgroundStyle = (0, util_2.subStyleProps)(this.attributes, 'background');
|
|
55
|
+
this.background.attr(tslib_1.__assign({ x: x - halfSize, y: y - halfSize, width: size, height: size }, backgroundStyle));
|
|
56
|
+
};
|
|
57
|
+
IconBase.prototype.showIndicator = function () {
|
|
33
58
|
if (!this.label)
|
|
34
59
|
return;
|
|
35
|
-
|
|
36
|
-
|
|
60
|
+
var size = this.attributes.size;
|
|
61
|
+
var _a = this.background.getBBox(), x = _a.x, y = _a.y;
|
|
37
62
|
this.indicator.update({ x: x + size / 2, y: y - 5, labelText: this.label, visibility: 'visible' });
|
|
38
|
-
}
|
|
39
|
-
hideIndicator() {
|
|
63
|
+
};
|
|
64
|
+
IconBase.prototype.hideIndicator = function () {
|
|
40
65
|
this.indicator.update({ visibility: 'hidden' });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
super((0, util_2.deepAssign)({}, { style: { backgroundOpacity: IconBase.backgroundOpacities.default } }, IconBase.defaultOptions, options));
|
|
44
|
-
/** hover 时是否显示背景 */
|
|
45
|
-
this.showBackground = true;
|
|
46
|
-
this.background = this.appendChild(new shapes_1.Rect({}));
|
|
47
|
-
this.icon = this.appendChild(new shapes_1.Group({}));
|
|
48
|
-
}
|
|
49
|
-
connectedCallback() {
|
|
66
|
+
};
|
|
67
|
+
IconBase.prototype.connectedCallback = function () {
|
|
50
68
|
var _a;
|
|
51
|
-
|
|
69
|
+
_super.prototype.connectedCallback.call(this);
|
|
52
70
|
// indicator 脱离文档流,需要手动添加到 canvas
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
71
|
+
var size = this.attributes.size;
|
|
72
|
+
var _b = this.background.getBBox(), x = _b.x, y = _b.y;
|
|
73
|
+
var canvas = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
56
74
|
if (canvas) {
|
|
57
75
|
this.indicator = canvas.appendChild(new indicator_1.Indicator({
|
|
58
76
|
style: {
|
|
@@ -65,106 +83,126 @@ class IconBase extends core_1.Component {
|
|
|
65
83
|
},
|
|
66
84
|
}));
|
|
67
85
|
}
|
|
68
|
-
}
|
|
69
|
-
disconnectedCallback() {
|
|
86
|
+
};
|
|
87
|
+
IconBase.prototype.disconnectedCallback = function () {
|
|
70
88
|
this.indicator.destroy();
|
|
71
|
-
}
|
|
72
|
-
render() {
|
|
89
|
+
};
|
|
90
|
+
IconBase.prototype.render = function () {
|
|
73
91
|
this.renderIcon();
|
|
74
92
|
if (this.showBackground)
|
|
75
93
|
this.renderBackground();
|
|
76
|
-
}
|
|
77
|
-
bindEvents() {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
94
|
+
};
|
|
95
|
+
IconBase.prototype.bindEvents = function () {
|
|
96
|
+
var _this = this;
|
|
97
|
+
var onClick = this.attributes.onClick;
|
|
98
|
+
this.addEventListener('click', function () {
|
|
99
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(_this);
|
|
81
100
|
});
|
|
82
101
|
if (this.showBackground) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this.addEventListener('pointerenter', ()
|
|
87
|
-
|
|
88
|
-
|
|
102
|
+
var resetBackground_1 = function () { return _this.background.attr({ opacity: IconBase.backgroundOpacities.default }); };
|
|
103
|
+
var hoverBackground_1 = function () { return _this.background.attr({ opacity: IconBase.backgroundOpacities.hover }); };
|
|
104
|
+
var activeBackground_1 = function () { return _this.background.attr({ opacity: IconBase.backgroundOpacities.active }); };
|
|
105
|
+
this.addEventListener('pointerenter', function () {
|
|
106
|
+
hoverBackground_1();
|
|
107
|
+
_this.showIndicator();
|
|
89
108
|
});
|
|
90
|
-
this.addEventListener('pointerleave', ()
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
this.addEventListener('pointerleave', function () {
|
|
110
|
+
resetBackground_1();
|
|
111
|
+
_this.hideIndicator();
|
|
93
112
|
});
|
|
94
|
-
this.addEventListener('pointerdown', ()
|
|
95
|
-
|
|
113
|
+
this.addEventListener('pointerdown', function () {
|
|
114
|
+
activeBackground_1();
|
|
96
115
|
});
|
|
97
|
-
this.addEventListener('pointerup', ()
|
|
98
|
-
|
|
116
|
+
this.addEventListener('pointerup', function () {
|
|
117
|
+
resetBackground_1();
|
|
99
118
|
});
|
|
100
119
|
}
|
|
101
|
-
}
|
|
102
|
-
|
|
120
|
+
};
|
|
121
|
+
IconBase.tag = 'IconBase';
|
|
122
|
+
IconBase.defaultOptions = {
|
|
123
|
+
style: {
|
|
124
|
+
x: 0,
|
|
125
|
+
y: 0,
|
|
126
|
+
size: 10,
|
|
127
|
+
color: '#565758',
|
|
128
|
+
backgroundRadius: 4,
|
|
129
|
+
backgroundFill: '#e2e2e2',
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
IconBase.backgroundOpacities = {
|
|
133
|
+
default: 0,
|
|
134
|
+
hover: 0.8,
|
|
135
|
+
active: 1,
|
|
136
|
+
};
|
|
137
|
+
return IconBase;
|
|
138
|
+
}(core_1.Component));
|
|
103
139
|
exports.IconBase = IconBase;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
style: {
|
|
107
|
-
x: 0,
|
|
108
|
-
y: 0,
|
|
109
|
-
size: 10,
|
|
110
|
-
color: '#565758',
|
|
111
|
-
backgroundRadius: 4,
|
|
112
|
-
backgroundFill: '#e2e2e2',
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
IconBase.backgroundOpacities = {
|
|
116
|
-
default: 0,
|
|
117
|
-
hover: 0.8,
|
|
118
|
-
active: 1,
|
|
119
|
-
};
|
|
120
|
-
const arrow = (size, color = '#565758') => {
|
|
140
|
+
var arrow = function (size, color) {
|
|
141
|
+
if (color === void 0) { color = '#565758'; }
|
|
121
142
|
return new shapes_1.Path({
|
|
122
143
|
style: {
|
|
123
144
|
fill: color,
|
|
124
|
-
d:
|
|
145
|
+
d: "M ".concat(size, ",").concat(size, " L -").concat(size, ",0 L ").concat(size, ",-").concat(size, " Z"),
|
|
125
146
|
transformOrigin: 'center',
|
|
126
147
|
},
|
|
127
148
|
});
|
|
128
149
|
};
|
|
129
150
|
/** 重置 */
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
151
|
+
var Reset = /** @class */ (function (_super) {
|
|
152
|
+
tslib_1.__extends(Reset, _super);
|
|
153
|
+
function Reset() {
|
|
154
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
155
|
+
}
|
|
156
|
+
Reset.prototype.arcPath = function (cx, cy, radius) {
|
|
157
|
+
var _a = tslib_1.__read([radius, radius], 2), rx = _a[0], ry = _a[1];
|
|
158
|
+
var getPosByAngle = function (angle) { return [cx + radius * Math.cos(angle), cy + radius * Math.sin(angle)]; };
|
|
159
|
+
var _b = tslib_1.__read(getPosByAngle((-5 / 4) * Math.PI), 2), x1 = _b[0], y1 = _b[1];
|
|
160
|
+
var _c = tslib_1.__read(getPosByAngle((1 / 4) * Math.PI), 2), x2 = _c[0], y2 = _c[1];
|
|
161
|
+
return "M".concat(x1, ",").concat(y1, ",A").concat(rx, ",").concat(ry, ",0,1,1,").concat(x2, ",").concat(y2);
|
|
162
|
+
};
|
|
163
|
+
Object.defineProperty(Reset.prototype, "label", {
|
|
164
|
+
get: function () {
|
|
165
|
+
return '重置';
|
|
166
|
+
},
|
|
167
|
+
enumerable: false,
|
|
168
|
+
configurable: true
|
|
169
|
+
});
|
|
170
|
+
Reset.prototype.renderIcon = function () {
|
|
171
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
172
|
+
var size = this.iconSize;
|
|
173
|
+
var lineWidth = this.lineWidth;
|
|
174
|
+
var arrowSize = lineWidth + 0.5;
|
|
146
175
|
(0, util_2.select)(this.icon)
|
|
147
176
|
.maybeAppend('.reset', 'path')
|
|
148
177
|
.styles({
|
|
149
178
|
stroke: color,
|
|
150
|
-
lineWidth,
|
|
179
|
+
lineWidth: lineWidth,
|
|
151
180
|
d: this.arcPath(x, y, size / 2 - lineWidth),
|
|
152
181
|
markerStart: arrow(arrowSize, color),
|
|
153
182
|
});
|
|
154
|
-
}
|
|
155
|
-
|
|
183
|
+
};
|
|
184
|
+
return Reset;
|
|
185
|
+
}(IconBase));
|
|
156
186
|
exports.Reset = Reset;
|
|
157
187
|
/** 快退 */
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
188
|
+
var Backward = /** @class */ (function (_super) {
|
|
189
|
+
tslib_1.__extends(Backward, _super);
|
|
190
|
+
function Backward() {
|
|
191
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
192
|
+
}
|
|
193
|
+
Object.defineProperty(Backward.prototype, "label", {
|
|
194
|
+
get: function () {
|
|
195
|
+
return '快退';
|
|
196
|
+
},
|
|
197
|
+
enumerable: false,
|
|
198
|
+
configurable: true
|
|
199
|
+
});
|
|
200
|
+
Backward.prototype.renderIcon = function () {
|
|
201
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
202
|
+
var size = this.iconSize;
|
|
203
|
+
var deltaX = size / 2;
|
|
204
|
+
var deltaY = size / 2 / Math.pow(3, 0.5);
|
|
205
|
+
var points = [
|
|
168
206
|
[x, y],
|
|
169
207
|
[x, y - deltaY],
|
|
170
208
|
[x - deltaX, y],
|
|
@@ -175,23 +213,32 @@ class Backward extends IconBase {
|
|
|
175
213
|
[x, y],
|
|
176
214
|
];
|
|
177
215
|
(0, util_2.select)(this.icon).maybeAppend('.backward', 'polygon').styles({
|
|
178
|
-
points,
|
|
216
|
+
points: points,
|
|
179
217
|
fill: color,
|
|
180
218
|
});
|
|
181
|
-
}
|
|
182
|
-
|
|
219
|
+
};
|
|
220
|
+
return Backward;
|
|
221
|
+
}(IconBase));
|
|
183
222
|
exports.Backward = Backward;
|
|
184
223
|
/** 快进 */
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
224
|
+
var Forward = /** @class */ (function (_super) {
|
|
225
|
+
tslib_1.__extends(Forward, _super);
|
|
226
|
+
function Forward() {
|
|
227
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
228
|
+
}
|
|
229
|
+
Object.defineProperty(Forward.prototype, "label", {
|
|
230
|
+
get: function () {
|
|
231
|
+
return '快进';
|
|
232
|
+
},
|
|
233
|
+
enumerable: false,
|
|
234
|
+
configurable: true
|
|
235
|
+
});
|
|
236
|
+
Forward.prototype.renderIcon = function () {
|
|
237
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
238
|
+
var size = this.iconSize;
|
|
239
|
+
var deltaX = size / 2;
|
|
240
|
+
var deltaY = size / 2 / Math.pow(3, 0.5);
|
|
241
|
+
var points = [
|
|
195
242
|
[x, y],
|
|
196
243
|
[x, y - deltaY],
|
|
197
244
|
[x + deltaX, y],
|
|
@@ -202,42 +249,60 @@ class Forward extends IconBase {
|
|
|
202
249
|
[x, y],
|
|
203
250
|
];
|
|
204
251
|
(0, util_2.select)(this.icon).maybeAppend('.forward', 'polygon').styles({
|
|
205
|
-
points,
|
|
252
|
+
points: points,
|
|
206
253
|
fill: color,
|
|
207
254
|
});
|
|
208
|
-
}
|
|
209
|
-
|
|
255
|
+
};
|
|
256
|
+
return Forward;
|
|
257
|
+
}(IconBase));
|
|
210
258
|
exports.Forward = Forward;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
259
|
+
var Play = /** @class */ (function (_super) {
|
|
260
|
+
tslib_1.__extends(Play, _super);
|
|
261
|
+
function Play() {
|
|
262
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
263
|
+
}
|
|
264
|
+
Object.defineProperty(Play.prototype, "label", {
|
|
265
|
+
get: function () {
|
|
266
|
+
return '播放';
|
|
267
|
+
},
|
|
268
|
+
enumerable: false,
|
|
269
|
+
configurable: true
|
|
270
|
+
});
|
|
271
|
+
Play.prototype.renderIcon = function () {
|
|
272
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
273
|
+
var size = this.iconSize;
|
|
274
|
+
var deltaX = (size / 3) * Math.pow(3, 0.5) * 0.8;
|
|
275
|
+
var points = [
|
|
220
276
|
[x + deltaX, y],
|
|
221
277
|
[x - deltaX / 2, y - (size / 2) * 0.8],
|
|
222
278
|
[x - deltaX / 2, y + (size / 2) * 0.8],
|
|
223
279
|
[x + deltaX, y],
|
|
224
280
|
];
|
|
225
281
|
(0, util_2.select)(this.icon).maybeAppend('.play', 'polygon').styles({
|
|
226
|
-
points,
|
|
282
|
+
points: points,
|
|
227
283
|
fill: color,
|
|
228
284
|
});
|
|
229
|
-
}
|
|
230
|
-
|
|
285
|
+
};
|
|
286
|
+
return Play;
|
|
287
|
+
}(IconBase));
|
|
231
288
|
exports.Play = Play;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
289
|
+
var Pause = /** @class */ (function (_super) {
|
|
290
|
+
tslib_1.__extends(Pause, _super);
|
|
291
|
+
function Pause() {
|
|
292
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
293
|
+
}
|
|
294
|
+
Object.defineProperty(Pause.prototype, "label", {
|
|
295
|
+
get: function () {
|
|
296
|
+
return '暂停';
|
|
297
|
+
},
|
|
298
|
+
enumerable: false,
|
|
299
|
+
configurable: true
|
|
300
|
+
});
|
|
301
|
+
Pause.prototype.renderIcon = function () {
|
|
302
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
303
|
+
var size = this.iconSize;
|
|
304
|
+
var deltaX = size / 3;
|
|
305
|
+
var points = [
|
|
241
306
|
[x - deltaX, y - size / 2],
|
|
242
307
|
[x - deltaX, y + size / 2],
|
|
243
308
|
[x - deltaX / 2, y + size / 2],
|
|
@@ -249,21 +314,30 @@ class Pause extends IconBase {
|
|
|
249
314
|
[x + deltaX, y - size / 2],
|
|
250
315
|
];
|
|
251
316
|
(0, util_2.select)(this.icon).maybeAppend('.pause', 'polygon').styles({
|
|
252
|
-
points,
|
|
317
|
+
points: points,
|
|
253
318
|
fill: color,
|
|
254
319
|
});
|
|
255
|
-
}
|
|
256
|
-
|
|
320
|
+
};
|
|
321
|
+
return Pause;
|
|
322
|
+
}(IconBase));
|
|
257
323
|
exports.Pause = Pause;
|
|
258
324
|
/** 时间范围 */
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
325
|
+
var Range = /** @class */ (function (_super) {
|
|
326
|
+
tslib_1.__extends(Range, _super);
|
|
327
|
+
function Range() {
|
|
328
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
329
|
+
}
|
|
330
|
+
Object.defineProperty(Range.prototype, "label", {
|
|
331
|
+
get: function () {
|
|
332
|
+
return '范围时间';
|
|
333
|
+
},
|
|
334
|
+
enumerable: false,
|
|
335
|
+
configurable: true
|
|
336
|
+
});
|
|
337
|
+
Range.prototype.renderIcon = function () {
|
|
338
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
339
|
+
var _b = this, size = _b.iconSize, lineWidth = _b.lineWidth;
|
|
340
|
+
var gap = lineWidth;
|
|
267
341
|
(0, util_2.select)(this.icon)
|
|
268
342
|
.maybeAppend('.left-line', 'line')
|
|
269
343
|
.styles({
|
|
@@ -272,7 +346,7 @@ class Range extends IconBase {
|
|
|
272
346
|
x2: x - size / 2,
|
|
273
347
|
y2: y + size / 2,
|
|
274
348
|
stroke: color,
|
|
275
|
-
lineWidth,
|
|
349
|
+
lineWidth: lineWidth,
|
|
276
350
|
});
|
|
277
351
|
(0, util_2.select)(this.icon)
|
|
278
352
|
.maybeAppend('.right-line', 'line')
|
|
@@ -282,7 +356,7 @@ class Range extends IconBase {
|
|
|
282
356
|
x2: x + size / 2,
|
|
283
357
|
y2: y + size / 2,
|
|
284
358
|
stroke: color,
|
|
285
|
-
lineWidth,
|
|
359
|
+
lineWidth: lineWidth,
|
|
286
360
|
});
|
|
287
361
|
(0, util_2.select)(this.icon)
|
|
288
362
|
.maybeAppend('.left-arrow', 'line')
|
|
@@ -292,7 +366,7 @@ class Range extends IconBase {
|
|
|
292
366
|
x2: x - size / 2 + gap * 2,
|
|
293
367
|
y2: y,
|
|
294
368
|
stroke: color,
|
|
295
|
-
lineWidth,
|
|
369
|
+
lineWidth: lineWidth,
|
|
296
370
|
markerEnd: arrow(lineWidth * 2, color),
|
|
297
371
|
});
|
|
298
372
|
(0, util_2.select)(this.icon)
|
|
@@ -303,20 +377,29 @@ class Range extends IconBase {
|
|
|
303
377
|
x2: x + size / 2 - gap * 2,
|
|
304
378
|
y2: y,
|
|
305
379
|
stroke: color,
|
|
306
|
-
lineWidth,
|
|
380
|
+
lineWidth: lineWidth,
|
|
307
381
|
markerEnd: arrow(lineWidth * 2, color),
|
|
308
382
|
});
|
|
309
|
-
}
|
|
310
|
-
|
|
383
|
+
};
|
|
384
|
+
return Range;
|
|
385
|
+
}(IconBase));
|
|
311
386
|
exports.Range = Range;
|
|
312
387
|
/** 值范围 */
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
388
|
+
var Value = /** @class */ (function (_super) {
|
|
389
|
+
tslib_1.__extends(Value, _super);
|
|
390
|
+
function Value() {
|
|
391
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
392
|
+
}
|
|
393
|
+
Object.defineProperty(Value.prototype, "label", {
|
|
394
|
+
get: function () {
|
|
395
|
+
return '单一时间';
|
|
396
|
+
},
|
|
397
|
+
enumerable: false,
|
|
398
|
+
configurable: true
|
|
399
|
+
});
|
|
400
|
+
Value.prototype.renderIcon = function () {
|
|
401
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
402
|
+
var _b = this, size = _b.iconSize, lineWidth = _b.lineWidth;
|
|
320
403
|
(0, util_2.select)(this.icon)
|
|
321
404
|
.maybeAppend('.line', 'line')
|
|
322
405
|
.styles({
|
|
@@ -325,9 +408,9 @@ class Value extends IconBase {
|
|
|
325
408
|
x2: x,
|
|
326
409
|
y2: y + size / 2,
|
|
327
410
|
stroke: color,
|
|
328
|
-
lineWidth,
|
|
411
|
+
lineWidth: lineWidth,
|
|
329
412
|
});
|
|
330
|
-
|
|
413
|
+
var gap = lineWidth;
|
|
331
414
|
(0, util_2.select)(this.icon)
|
|
332
415
|
.maybeAppend('.left-arrow', 'line')
|
|
333
416
|
.styles({
|
|
@@ -336,7 +419,7 @@ class Value extends IconBase {
|
|
|
336
419
|
x2: x - gap * 2,
|
|
337
420
|
y2: y,
|
|
338
421
|
stroke: color,
|
|
339
|
-
lineWidth,
|
|
422
|
+
lineWidth: lineWidth,
|
|
340
423
|
markerEnd: arrow(lineWidth * 2, color),
|
|
341
424
|
});
|
|
342
425
|
(0, util_2.select)(this.icon)
|
|
@@ -347,36 +430,48 @@ class Value extends IconBase {
|
|
|
347
430
|
x2: x + gap * 2,
|
|
348
431
|
y2: y,
|
|
349
432
|
stroke: color,
|
|
350
|
-
lineWidth,
|
|
433
|
+
lineWidth: lineWidth,
|
|
351
434
|
markerEnd: arrow(lineWidth * 2, color),
|
|
352
435
|
});
|
|
353
|
-
}
|
|
354
|
-
|
|
436
|
+
};
|
|
437
|
+
return Value;
|
|
438
|
+
}(IconBase));
|
|
355
439
|
exports.Value = Value;
|
|
356
|
-
|
|
440
|
+
var getCoordinatePoints = function (size) {
|
|
357
441
|
return [
|
|
358
442
|
[-size / 2, -size / 2],
|
|
359
443
|
[-size / 2, size / 2],
|
|
360
444
|
[size / 2, size / 2],
|
|
361
445
|
];
|
|
362
446
|
};
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
447
|
+
var LineChart = /** @class */ (function (_super) {
|
|
448
|
+
tslib_1.__extends(LineChart, _super);
|
|
449
|
+
function LineChart() {
|
|
450
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
451
|
+
}
|
|
452
|
+
Object.defineProperty(LineChart.prototype, "label", {
|
|
453
|
+
get: function () {
|
|
454
|
+
return '折线图';
|
|
455
|
+
},
|
|
456
|
+
enumerable: false,
|
|
457
|
+
configurable: true
|
|
458
|
+
});
|
|
459
|
+
LineChart.prototype.renderIcon = function () {
|
|
460
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
461
|
+
var _b = this, size = _b.iconSize, lineWidth = _b.lineWidth;
|
|
462
|
+
var gap = lineWidth;
|
|
463
|
+
var deltaX = (size - gap * 2 - lineWidth) / 4;
|
|
464
|
+
var deltaY = (size - gap * 2 - lineWidth) / 2;
|
|
465
|
+
var _c = tslib_1.__read([x - size / 2 + gap, y + size / 2 - gap * 2], 2), ox = _c[0], oy = _c[1];
|
|
374
466
|
(0, util_2.select)(this.icon)
|
|
375
467
|
.maybeAppend('.coordinate', 'polyline')
|
|
376
468
|
.styles({
|
|
377
|
-
points: getCoordinatePoints(size).map((
|
|
469
|
+
points: getCoordinatePoints(size).map(function (_a) {
|
|
470
|
+
var _b = tslib_1.__read(_a, 2), px = _b[0], py = _b[1];
|
|
471
|
+
return [px + x, py + y];
|
|
472
|
+
}),
|
|
378
473
|
stroke: color,
|
|
379
|
-
lineWidth,
|
|
474
|
+
lineWidth: lineWidth,
|
|
380
475
|
});
|
|
381
476
|
(0, util_2.select)(this.icon)
|
|
382
477
|
.maybeAppend('.line', 'polyline')
|
|
@@ -388,61 +483,91 @@ class LineChart extends IconBase {
|
|
|
388
483
|
[ox + deltaX * 4, oy - deltaY * 2],
|
|
389
484
|
],
|
|
390
485
|
stroke: color,
|
|
391
|
-
lineWidth,
|
|
486
|
+
lineWidth: lineWidth,
|
|
392
487
|
});
|
|
393
|
-
}
|
|
394
|
-
|
|
488
|
+
};
|
|
489
|
+
return LineChart;
|
|
490
|
+
}(IconBase));
|
|
395
491
|
exports.LineChart = LineChart;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
492
|
+
var BarChart = /** @class */ (function (_super) {
|
|
493
|
+
tslib_1.__extends(BarChart, _super);
|
|
494
|
+
function BarChart() {
|
|
495
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
496
|
+
}
|
|
497
|
+
Object.defineProperty(BarChart.prototype, "label", {
|
|
498
|
+
get: function () {
|
|
499
|
+
return '条形图';
|
|
500
|
+
},
|
|
501
|
+
enumerable: false,
|
|
502
|
+
configurable: true
|
|
503
|
+
});
|
|
504
|
+
Object.defineProperty(BarChart.prototype, "data", {
|
|
505
|
+
get: function () {
|
|
506
|
+
return [1, 4, 2, 4, 3];
|
|
507
|
+
},
|
|
508
|
+
enumerable: false,
|
|
509
|
+
configurable: true
|
|
510
|
+
});
|
|
511
|
+
BarChart.prototype.renderIcon = function () {
|
|
512
|
+
var data = this.data;
|
|
513
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
514
|
+
var _b = this, size = _b.iconSize, lineWidth = _b.lineWidth;
|
|
515
|
+
var gap = lineWidth;
|
|
516
|
+
var deltaX = (size - gap) / data.length;
|
|
517
|
+
var deltaY = (size - gap * 2) / 4;
|
|
518
|
+
var _c = tslib_1.__read([x - size / 2 + gap * 2, y + size / 2 - gap], 2), ox = _c[0], oy = _c[1];
|
|
411
519
|
(0, util_2.select)(this.icon)
|
|
412
520
|
.maybeAppend('.coordinate', 'polyline')
|
|
413
521
|
.styles({
|
|
414
|
-
points: getCoordinatePoints(size).map((
|
|
522
|
+
points: getCoordinatePoints(size).map(function (_a) {
|
|
523
|
+
var _b = tslib_1.__read(_a, 2), px = _b[0], py = _b[1];
|
|
524
|
+
return [px + x, py + y];
|
|
525
|
+
}),
|
|
415
526
|
stroke: color,
|
|
416
|
-
lineWidth,
|
|
527
|
+
lineWidth: lineWidth,
|
|
417
528
|
});
|
|
418
529
|
(0, util_2.select)(this.icon)
|
|
419
530
|
.maybeAppend('.bars', 'g')
|
|
420
531
|
.selectAll('.column')
|
|
421
|
-
.data(this.data.map((value, index)
|
|
422
|
-
.join((enter)
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
532
|
+
.data(this.data.map(function (value, index) { return ({ value: value, index: index }); }))
|
|
533
|
+
.join(function (enter) {
|
|
534
|
+
return enter
|
|
535
|
+
.append('line')
|
|
536
|
+
.attr('className', 'column')
|
|
537
|
+
.style('x1', function (_a) {
|
|
538
|
+
var index = _a.index;
|
|
539
|
+
return ox + deltaX * index;
|
|
540
|
+
})
|
|
541
|
+
.style('y1', oy)
|
|
542
|
+
.style('x2', function (_a) {
|
|
543
|
+
var index = _a.index;
|
|
544
|
+
return ox + deltaX * index;
|
|
545
|
+
})
|
|
546
|
+
.style('y2', function (_a) {
|
|
547
|
+
var value = _a.value;
|
|
548
|
+
return oy - deltaY * value;
|
|
549
|
+
})
|
|
550
|
+
.styles({
|
|
551
|
+
y1: oy,
|
|
552
|
+
stroke: color,
|
|
553
|
+
lineWidth: lineWidth,
|
|
554
|
+
});
|
|
555
|
+
});
|
|
556
|
+
};
|
|
557
|
+
return BarChart;
|
|
558
|
+
}(IconBase));
|
|
436
559
|
exports.BarChart = BarChart;
|
|
437
560
|
/** 分割线 */
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
this.
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
561
|
+
var Split = /** @class */ (function (_super) {
|
|
562
|
+
tslib_1.__extends(Split, _super);
|
|
563
|
+
function Split(options) {
|
|
564
|
+
var _this = _super.call(this, (0, util_2.deepAssign)({}, { style: { color: '#d8d9d9' } }, options)) || this;
|
|
565
|
+
_this.showBackground = false;
|
|
566
|
+
return _this;
|
|
567
|
+
}
|
|
568
|
+
Split.prototype.renderIcon = function () {
|
|
569
|
+
var _a = this.attributes, x = _a.x, y = _a.y, color = _a.color;
|
|
570
|
+
var _b = this, size = _b.iconSize, lineWidth = _b.lineWidth;
|
|
446
571
|
(0, util_2.select)(this.icon)
|
|
447
572
|
.maybeAppend('.split', 'line')
|
|
448
573
|
.styles({
|
|
@@ -451,23 +576,30 @@ class Split extends IconBase {
|
|
|
451
576
|
x2: x,
|
|
452
577
|
y2: y + size / 2,
|
|
453
578
|
stroke: color,
|
|
454
|
-
lineWidth,
|
|
579
|
+
lineWidth: lineWidth,
|
|
455
580
|
});
|
|
456
|
-
}
|
|
457
|
-
|
|
581
|
+
};
|
|
582
|
+
return Split;
|
|
583
|
+
}(IconBase));
|
|
458
584
|
exports.Split = Split;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
this.
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
585
|
+
var SpeedSelect = /** @class */ (function (_super) {
|
|
586
|
+
tslib_1.__extends(SpeedSelect, _super);
|
|
587
|
+
function SpeedSelect() {
|
|
588
|
+
var _this = _super.apply(this, tslib_1.__spreadArray([], tslib_1.__read(arguments), false)) || this;
|
|
589
|
+
_this.showBackground = false;
|
|
590
|
+
return _this;
|
|
591
|
+
}
|
|
592
|
+
Object.defineProperty(SpeedSelect.prototype, "padding", {
|
|
593
|
+
get: function () {
|
|
594
|
+
return (0, util_2.parseSeriesAttr)(0);
|
|
595
|
+
},
|
|
596
|
+
enumerable: false,
|
|
597
|
+
configurable: true
|
|
598
|
+
});
|
|
599
|
+
SpeedSelect.prototype.renderIcon = function () {
|
|
600
|
+
var iconSize = this.iconSize;
|
|
601
|
+
var _a = this.attributes, x = _a.x, y = _a.y, _b = _a.speed, speed = _b === void 0 ? 1 : _b;
|
|
602
|
+
var inheritStyle = (0, util_1.omit)(this.attributes, [
|
|
471
603
|
'x',
|
|
472
604
|
'y',
|
|
473
605
|
'transform',
|
|
@@ -478,93 +610,115 @@ class SpeedSelect extends IconBase {
|
|
|
478
610
|
'color',
|
|
479
611
|
'speed',
|
|
480
612
|
]);
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
height, defaultValue: speed, bordered: false, showDropdownIcon: false, selectRadius: 2, dropdownPadding: this.padding, dropdownRadius: 2, dropdownSpacing: iconSize / 5, placeholderFontSize: iconSize / 2, optionPadding: 0, optionLabelFontSize: iconSize / 2, optionBackgroundRadius: 1, options: [
|
|
613
|
+
var width = (0, util_1.clamp)(iconSize, 20, Infinity);
|
|
614
|
+
var height = 20;
|
|
615
|
+
var style = tslib_1.__assign(tslib_1.__assign({}, inheritStyle), { x: x - width / 2, y: y - height / 2, width: width, height: height, defaultValue: speed, bordered: false, showDropdownIcon: false, selectRadius: 2, dropdownPadding: this.padding, dropdownRadius: 2, dropdownSpacing: iconSize / 5, placeholderFontSize: iconSize / 2, optionPadding: 0, optionLabelFontSize: iconSize / 2, optionBackgroundRadius: 1, options: [
|
|
485
616
|
{ label: '1x', value: 1 },
|
|
486
617
|
{ label: '1.5x', value: 1.5 },
|
|
487
618
|
{ label: '2x', value: 2 },
|
|
488
619
|
] });
|
|
489
620
|
(0, util_2.select)(this.icon)
|
|
490
|
-
.maybeAppend('.speed', ()
|
|
621
|
+
.maybeAppend('.speed', function () { return new select_1.Select({ style: style }); })
|
|
491
622
|
.attr('className', 'speed')
|
|
492
623
|
.each(function () {
|
|
493
624
|
this.update(style);
|
|
494
625
|
});
|
|
495
|
-
}
|
|
496
|
-
|
|
626
|
+
};
|
|
627
|
+
SpeedSelect.tag = 'SpeedSelect';
|
|
628
|
+
return SpeedSelect;
|
|
629
|
+
}(IconBase));
|
|
497
630
|
exports.SpeedSelect = SpeedSelect;
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
631
|
+
var ToggleIcon = /** @class */ (function (_super) {
|
|
632
|
+
tslib_1.__extends(ToggleIcon, _super);
|
|
633
|
+
function ToggleIcon(options) {
|
|
634
|
+
var _this = _super.call(this, options) || this;
|
|
635
|
+
_this.icon = _this.appendChild(new shapes_1.Group({}));
|
|
636
|
+
_this.currentType = _this.attributes.type;
|
|
637
|
+
return _this;
|
|
638
|
+
}
|
|
639
|
+
ToggleIcon.prototype.getType = function () {
|
|
501
640
|
return this.currentType;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
this.
|
|
506
|
-
this.currentType = this.attributes.type;
|
|
507
|
-
}
|
|
508
|
-
render() {
|
|
509
|
-
const _a = this.attributes, { onChange } = _a, restStyles = tslib_1.__rest(_a, ["onChange"]);
|
|
641
|
+
};
|
|
642
|
+
ToggleIcon.prototype.render = function () {
|
|
643
|
+
var _this = this;
|
|
644
|
+
var _a = this.attributes, onChange = _a.onChange, restStyles = tslib_1.__rest(_a, ["onChange"]);
|
|
510
645
|
(0, util_2.select)(this.icon)
|
|
511
646
|
.selectAll('.icon')
|
|
512
647
|
.data([this.currentType])
|
|
513
|
-
.join((enter)
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
648
|
+
.join(function (enter) {
|
|
649
|
+
return enter
|
|
650
|
+
.append(function (type) {
|
|
651
|
+
var _a;
|
|
652
|
+
var Ctor = (_a = _this.toggles.find(function (_a) {
|
|
653
|
+
var _b = tslib_1.__read(_a, 1), key = _b[0];
|
|
654
|
+
return key === type;
|
|
655
|
+
})) === null || _a === void 0 ? void 0 : _a[1];
|
|
656
|
+
if (!Ctor)
|
|
657
|
+
throw new Error("Invalid type: ".concat(type));
|
|
658
|
+
return new Ctor({});
|
|
659
|
+
})
|
|
660
|
+
.attr('className', 'icon')
|
|
661
|
+
.styles(restStyles, false)
|
|
662
|
+
.update({});
|
|
663
|
+
}, function (update) { return update.styles({ restStyles: restStyles }).update({}); }, function (exit) { return exit.remove(); });
|
|
664
|
+
};
|
|
665
|
+
ToggleIcon.prototype.bindEvents = function () {
|
|
666
|
+
var _this = this;
|
|
667
|
+
var onChange = this.attributes.onChange;
|
|
668
|
+
this.addEventListener('click', function (e) {
|
|
528
669
|
e.preventDefault();
|
|
529
670
|
e.stopPropagation();
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
671
|
+
var nextIndex = (_this.toggles.findIndex(function (_a) {
|
|
672
|
+
var _b = tslib_1.__read(_a, 1), key = _b[0];
|
|
673
|
+
return key === _this.currentType;
|
|
674
|
+
}) + 1) % _this.toggles.length;
|
|
675
|
+
var nextType = _this.toggles[nextIndex][0];
|
|
676
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_this.currentType);
|
|
677
|
+
_this.currentType = nextType;
|
|
678
|
+
_this.render();
|
|
535
679
|
});
|
|
536
|
-
}
|
|
537
|
-
|
|
680
|
+
};
|
|
681
|
+
ToggleIcon.tag = 'ToggleIcon';
|
|
682
|
+
return ToggleIcon;
|
|
683
|
+
}(core_1.Component));
|
|
538
684
|
exports.ToggleIcon = ToggleIcon;
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
685
|
+
var PlayPause = /** @class */ (function (_super) {
|
|
686
|
+
tslib_1.__extends(PlayPause, _super);
|
|
687
|
+
function PlayPause(options) {
|
|
688
|
+
var _this = _super.call(this, (0, util_2.deepAssign)({}, { style: { type: 'play' } }, options)) || this;
|
|
689
|
+
_this.toggles = [
|
|
544
690
|
['play', Play],
|
|
545
691
|
['pause', Pause],
|
|
546
692
|
];
|
|
693
|
+
return _this;
|
|
547
694
|
}
|
|
548
|
-
|
|
695
|
+
return PlayPause;
|
|
696
|
+
}(ToggleIcon));
|
|
549
697
|
exports.PlayPause = PlayPause;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
this.
|
|
698
|
+
var SelectionType = /** @class */ (function (_super) {
|
|
699
|
+
tslib_1.__extends(SelectionType, _super);
|
|
700
|
+
function SelectionType(options) {
|
|
701
|
+
var _this = _super.call(this, (0, util_2.deepAssign)({}, { style: { type: 'range' } }, options)) || this;
|
|
702
|
+
_this.toggles = [
|
|
554
703
|
['range', Range],
|
|
555
704
|
['value', Value],
|
|
556
705
|
];
|
|
706
|
+
return _this;
|
|
557
707
|
}
|
|
558
|
-
|
|
708
|
+
return SelectionType;
|
|
709
|
+
}(ToggleIcon));
|
|
559
710
|
exports.SelectionType = SelectionType;
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
this.
|
|
711
|
+
var ChartType = /** @class */ (function (_super) {
|
|
712
|
+
tslib_1.__extends(ChartType, _super);
|
|
713
|
+
function ChartType(options) {
|
|
714
|
+
var _this = _super.call(this, (0, util_2.deepAssign)({}, { style: { type: 'column' } }, options)) || this;
|
|
715
|
+
_this.toggles = [
|
|
564
716
|
['line', LineChart],
|
|
565
717
|
['column', BarChart],
|
|
566
718
|
];
|
|
719
|
+
return _this;
|
|
567
720
|
}
|
|
568
|
-
|
|
721
|
+
return ChartType;
|
|
722
|
+
}(ToggleIcon));
|
|
569
723
|
exports.ChartType = ChartType;
|
|
570
724
|
//# sourceMappingURL=icons.js.map
|