@progress/kendo-charts 2.7.2-dev.202502101310 → 2.7.2-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/barcode/barcode-validator.js +10 -12
- package/dist/es/barcode/barcode.js +84 -96
- package/dist/es/barcode/encodings/code11.js +41 -57
- package/dist/es/barcode/encodings/code128.js +222 -354
- package/dist/es/barcode/encodings/code39-extended.js +20 -34
- package/dist/es/barcode/encodings/code39.js +49 -75
- package/dist/es/barcode/encodings/code93-extended.js +12 -24
- package/dist/es/barcode/encodings/code93.js +52 -70
- package/dist/es/barcode/encodings/ean13.js +28 -42
- package/dist/es/barcode/encodings/ean8.js +8 -18
- package/dist/es/barcode/encodings/encoding.js +18 -24
- package/dist/es/barcode/encodings/main.js +13 -10
- package/dist/es/barcode/encodings/msi.js +56 -112
- package/dist/es/barcode/encodings/postnet.js +31 -45
- package/dist/es/barcode/surface-size.js +2 -2
- package/dist/es/chart/aggregates/aggregates.js +23 -23
- package/dist/es/chart/aggregates/default-aggregates.js +10 -18
- package/dist/es/chart/aggregates/series-aggregator.js +42 -54
- package/dist/es/chart/animations/bar-chart-animation.js +15 -26
- package/dist/es/chart/animations/bubble-animation.js +7 -17
- package/dist/es/chart/animations/clip-animation.js +13 -23
- package/dist/es/chart/animations/fade-in-animation.js +6 -16
- package/dist/es/chart/animations/pie-animation.js +6 -16
- package/dist/es/chart/api-elements/chart-axis.js +14 -22
- package/dist/es/chart/api-elements/chart-pane.js +10 -8
- package/dist/es/chart/api-elements/chart-plotarea.js +4 -10
- package/dist/es/chart/api-elements/find-axis-by-name.js +1 -1
- package/dist/es/chart/area-chart/area-chart.js +46 -60
- package/dist/es/chart/area-chart/area-segment.js +46 -52
- package/dist/es/chart/area-chart/spline-area-segment.js +12 -21
- package/dist/es/chart/area-chart/step-area-segment.js +6 -15
- package/dist/es/chart/axis-group-range-tracker.js +14 -20
- package/dist/es/chart/bar-chart/bar-chart.js +65 -80
- package/dist/es/chart/bar-chart/bar-label.js +25 -32
- package/dist/es/chart/bar-chart/bar.js +76 -91
- package/dist/es/chart/box-plot-chart/box-plot-chart.js +33 -48
- package/dist/es/chart/box-plot-chart/box-plot.js +55 -68
- package/dist/es/chart/box-plot-chart/vertical-box-plot.js +13 -23
- package/dist/es/chart/bubble-chart/bubble-chart.js +51 -64
- package/dist/es/chart/bubble-chart/bubble.js +21 -27
- package/dist/es/chart/bullet-chart/bullet-chart.js +45 -57
- package/dist/es/chart/bullet-chart/bullet.js +48 -57
- package/dist/es/chart/bullet-chart/target.js +1 -11
- package/dist/es/chart/candlestick-chart/candlestick-chart.js +41 -55
- package/dist/es/chart/candlestick-chart/candlestick.js +60 -69
- package/dist/es/chart/categorical-chart.js +178 -206
- package/dist/es/chart/chart-container.js +30 -39
- package/dist/es/chart/chart.js +641 -701
- package/dist/es/chart/constants.js +103 -103
- package/dist/es/chart/crosshair/crosshair-tooltip.js +22 -34
- package/dist/es/chart/crosshair/crosshair.js +39 -47
- package/dist/es/chart/donut-chart/donut-chart.js +36 -48
- package/dist/es/chart/donut-chart/donut-segment.js +12 -24
- package/dist/es/chart/error-bars/categorical-error-bar.js +5 -15
- package/dist/es/chart/error-bars/error-bar-base.js +37 -49
- package/dist/es/chart/error-bars/error-range-calculator.js +46 -56
- package/dist/es/chart/error-bars/scatter-error-bar.js +6 -16
- package/dist/es/chart/funnel-chart/funnel-chart.js +86 -103
- package/dist/es/chart/funnel-chart/funnel-segment.js +46 -54
- package/dist/es/chart/funnel-chart/pyramid-chart.js +5 -11
- package/dist/es/chart/heatmap-chart/color-scale.js +7 -9
- package/dist/es/chart/heatmap-chart/heatmap-chart.js +87 -110
- package/dist/es/chart/heatmap-chart/heatmap-point.js +72 -78
- package/dist/es/chart/highlight.js +26 -36
- package/dist/es/chart/layout/cluster-layout.js +16 -25
- package/dist/es/chart/layout/radar-cluster-layout.js +15 -24
- package/dist/es/chart/layout/radar-stack-layout.js +10 -22
- package/dist/es/chart/layout/stack-wrap.js +12 -24
- package/dist/es/chart/layout/utils.js +2 -2
- package/dist/es/chart/legend/legend-item-line-area.js +8 -19
- package/dist/es/chart/legend/legend-item-line.js +21 -31
- package/dist/es/chart/legend/legend-item-marker.js +18 -28
- package/dist/es/chart/legend/legend-item-square.js +8 -18
- package/dist/es/chart/legend/legend-item.js +91 -105
- package/dist/es/chart/legend/legend-layout.js +18 -25
- package/dist/es/chart/legend/legend.js +68 -92
- package/dist/es/chart/line-chart/line-chart.js +35 -48
- package/dist/es/chart/line-chart/line-point.js +90 -103
- package/dist/es/chart/line-chart/line-segment.js +23 -34
- package/dist/es/chart/line-chart/spline-segment.js +10 -20
- package/dist/es/chart/line-chart/step-line-mixin.js +14 -17
- package/dist/es/chart/line-chart/step-line-segment.js +4 -14
- package/dist/es/chart/mixins/accessibility-attributes-mixin.js +7 -7
- package/dist/es/chart/mixins/clip-animation-mixin.js +7 -7
- package/dist/es/chart/mixins/line-chart-mixin.js +27 -31
- package/dist/es/chart/mixins/note-mixin.js +3 -3
- package/dist/es/chart/mixins/pie-chart-mixin.js +9 -9
- package/dist/es/chart/mixins/plotarea-events-mixin.js +1 -1
- package/dist/es/chart/mixins/point-events-mixin.js +1 -1
- package/dist/es/chart/ohlc-chart/ohlc-chart.js +4 -14
- package/dist/es/chart/ohlc-chart/ohlc-point.js +15 -28
- package/dist/es/chart/pan-and-zoom/accept-key.js +3 -3
- package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +25 -33
- package/dist/es/chart/pan-and-zoom/pannable.js +29 -37
- package/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js +3 -3
- package/dist/es/chart/pan-and-zoom/zoom-selection.js +61 -70
- package/dist/es/chart/pane.js +71 -79
- package/dist/es/chart/pie-chart/pie-chart.js +153 -183
- package/dist/es/chart/pie-chart/pie-segment.js +82 -98
- package/dist/es/chart/plotarea/categorical-plotarea.js +285 -318
- package/dist/es/chart/plotarea/donut-plotarea.js +12 -22
- package/dist/es/chart/plotarea/funnel-plotarea.js +17 -27
- package/dist/es/chart/plotarea/heatmap-plotarea.js +139 -167
- package/dist/es/chart/plotarea/pie-plotarea.js +15 -25
- package/dist/es/chart/plotarea/plotarea-base.js +423 -462
- package/dist/es/chart/plotarea/plotarea-factory.js +15 -20
- package/dist/es/chart/plotarea/polar-plotarea-base.js +37 -51
- package/dist/es/chart/plotarea/polar-plotarea.js +39 -49
- package/dist/es/chart/plotarea/radar-plotarea.js +55 -65
- package/dist/es/chart/plotarea/xy-plotarea.js +111 -128
- package/dist/es/chart/polar-area-chart/polar-area-chart.js +22 -36
- package/dist/es/chart/polar-area-chart/polar-area-segment.js +7 -17
- package/dist/es/chart/polar-area-chart/spline-polar-area-segment.js +15 -25
- package/dist/es/chart/polar-line-chart/polar-line-chart.js +2 -11
- package/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js +6 -16
- package/dist/es/chart/radar-area-chart/radar-area-chart.js +11 -21
- package/dist/es/chart/radar-area-chart/radar-area-segment.js +3 -13
- package/dist/es/chart/radar-area-chart/spline-radar-area-segment.js +3 -13
- package/dist/es/chart/radar-bar-chart/radar-bar-chart.js +19 -29
- package/dist/es/chart/radar-bar-chart/radar-segment.js +6 -12
- package/dist/es/chart/radar-line-chart/radar-line-chart.js +26 -35
- package/dist/es/chart/range-area-chart/range-area-chart.js +46 -58
- package/dist/es/chart/range-area-chart/range-area-point.js +55 -66
- package/dist/es/chart/range-area-chart/range-area-segment.js +19 -28
- package/dist/es/chart/range-area-chart/range-line-point.js +4 -14
- package/dist/es/chart/range-area-chart/spline-range-area-segment.js +11 -18
- package/dist/es/chart/range-area-chart/step-range-area-segment.js +7 -16
- package/dist/es/chart/range-bar-chart/range-bar-chart.js +18 -29
- package/dist/es/chart/range-bar-chart/range-bar.js +10 -23
- package/dist/es/chart/register-charts.js +20 -16
- package/dist/es/chart/scatter-charts/scatter-chart.js +100 -122
- package/dist/es/chart/scatter-charts/scatter-line-chart.js +15 -25
- package/dist/es/chart/selection.js +176 -201
- package/dist/es/chart/series-binder.js +55 -66
- package/dist/es/chart/theme/base-theme.js +75 -79
- package/dist/es/chart/theme/load-theme.js +52 -52
- package/dist/es/chart/tooltip/base-tooltip.js +17 -24
- package/dist/es/chart/tooltip/shared-tooltip.js +25 -31
- package/dist/es/chart/tooltip/tooltip.js +10 -20
- package/dist/es/chart/trendlines/calculate-moving-average.js +11 -13
- package/dist/es/chart/trendlines/calculate-polynomial.js +24 -26
- package/dist/es/chart/trendlines/calculate-slope.js +12 -14
- package/dist/es/chart/trendlines/check-all-positive.js +2 -5
- package/dist/es/chart/trendlines/exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/get-scatter-trendline-data.js +6 -7
- package/dist/es/chart/trendlines/get-trendline-data.js +6 -6
- package/dist/es/chart/trendlines/linear-trendline.js +12 -21
- package/dist/es/chart/trendlines/logarithmic-trendline.js +14 -23
- package/dist/es/chart/trendlines/moving-average.js +15 -26
- package/dist/es/chart/trendlines/polynomial-trendline.js +13 -21
- package/dist/es/chart/trendlines/power-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-linear-trendline.js +10 -16
- package/dist/es/chart/trendlines/scatter-logarithmic-trendline.js +17 -27
- package/dist/es/chart/trendlines/scatter-moving-average.js +7 -10
- package/dist/es/chart/trendlines/scatter-polynomial-trendline.js +11 -16
- package/dist/es/chart/trendlines/scatter-power-trendline.js +15 -22
- package/dist/es/chart/trendlines/scatter-trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/scatter-value-getter.js +2 -5
- package/dist/es/chart/trendlines/trendline-factory.js +1 -1
- package/dist/es/chart/trendlines/trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/x-value-limits.js +6 -8
- package/dist/es/chart/utils/any-has-z-index.js +1 -1
- package/dist/es/chart/utils/bind-segments.js +8 -8
- package/dist/es/chart/utils/categories-count.js +3 -3
- package/dist/es/chart/utils/count-numbers.js +4 -4
- package/dist/es/chart/utils/create-out-of-range-points.js +13 -22
- package/dist/es/chart/utils/eval-options.js +7 -10
- package/dist/es/chart/utils/filter-series-by-type.js +4 -4
- package/dist/es/chart/utils/get-field.js +1 -1
- package/dist/es/chart/utils/has-gradient-overlay.js +1 -1
- package/dist/es/chart/utils/is-date-axis.js +2 -2
- package/dist/es/chart/utils/parse-date-category.js +2 -2
- package/dist/es/chart/utils/segment-visible.js +2 -2
- package/dist/es/chart/waterfall-chart/waterfall-chart.js +41 -55
- package/dist/es/chart/waterfall-chart/waterfall-segment.js +16 -24
- package/dist/es/chart-wizard/get-wizard-data-from-data-rows.js +5 -6
- package/dist/es/chart-wizard/messages.js +1 -1
- package/dist/es/chart-wizard/state.js +145 -137
- package/dist/es/chart-wizard.js +12 -12
- package/dist/es/common/add-class.js +3 -3
- package/dist/es/common/align-path-to-pixel.js +2 -2
- package/dist/es/common/auto-text-color.js +1 -1
- package/dist/es/common/constants.js +53 -53
- package/dist/es/common/create-hash-set.js +59 -65
- package/dist/es/common/cycleDown.js +1 -1
- package/dist/es/common/deep-extend.js +10 -12
- package/dist/es/common/element-scale.js +9 -9
- package/dist/es/common/element-styles.js +8 -8
- package/dist/es/common/event-map.js +4 -4
- package/dist/es/common/event-utils.js +13 -13
- package/dist/es/common/find.js +2 -2
- package/dist/es/common/font-loader.js +42 -44
- package/dist/es/common/get-aria-template.js +2 -4
- package/dist/es/common/get-spacing.js +2 -4
- package/dist/es/common/get-supported-features.js +7 -7
- package/dist/es/common/get-template.js +2 -4
- package/dist/es/common/getter.js +5 -5
- package/dist/es/common/grep.js +3 -3
- package/dist/es/common/has-classes.js +2 -2
- package/dist/es/common/hash-map.js +11 -11
- package/dist/es/common/instance-observer.js +28 -33
- package/dist/es/common/keys.js +1 -1
- package/dist/es/common/map.js +4 -4
- package/dist/es/common/matrix.js +142 -150
- package/dist/es/common/mousewheel-delta.js +2 -2
- package/dist/es/common/observable.js +40 -52
- package/dist/es/common/remove-class.js +1 -1
- package/dist/es/common/render-icon.js +50 -60
- package/dist/es/common/set-default-options.js +1 -1
- package/dist/es/common/sparse-array-limits.js +4 -4
- package/dist/es/common/user-events.js +124 -150
- package/dist/es/core/axis-label.js +38 -43
- package/dist/es/core/axis.js +293 -345
- package/dist/es/core/box-element.js +36 -46
- package/dist/es/core/box.js +75 -83
- package/dist/es/core/category-axis.js +265 -314
- package/dist/es/core/chart-element.js +98 -109
- package/dist/es/core/constants.js +3 -3
- package/dist/es/core/curve-processor.js +86 -93
- package/dist/es/core/date-category-axis.js +381 -413
- package/dist/es/core/date-value-axis.js +108 -118
- package/dist/es/core/float-element.js +54 -78
- package/dist/es/core/gradients.js +3 -3
- package/dist/es/core/logarithmic-axis.js +134 -186
- package/dist/es/core/mixins/grid-lines-mixin.js +18 -20
- package/dist/es/core/mixins/radar-numeric-axis-mixin.js +46 -51
- package/dist/es/core/note.js +58 -73
- package/dist/es/core/numeric-axis.js +111 -133
- package/dist/es/core/pattern.js +4 -8
- package/dist/es/core/point.js +25 -34
- package/dist/es/core/polar-axis.js +73 -91
- package/dist/es/core/radar-category-axis.js +90 -114
- package/dist/es/core/radar-logarithmic-axis.js +10 -20
- package/dist/es/core/radar-numeric-axis.js +10 -20
- package/dist/es/core/ring.js +61 -68
- package/dist/es/core/root-element.js +40 -48
- package/dist/es/core/sector.js +11 -17
- package/dist/es/core/shape-builder.js +13 -23
- package/dist/es/core/shape-element.js +27 -37
- package/dist/es/core/text-box.js +50 -59
- package/dist/es/core/text.js +13 -24
- package/dist/es/core/title.js +19 -25
- package/dist/es/core/utils/auto-axis-max.js +3 -3
- package/dist/es/core/utils/auto-axis-min.js +3 -3
- package/dist/es/core/utils/auto-major-unit.js +4 -4
- package/dist/es/core/utils/box-diff.js +9 -9
- package/dist/es/core/utils/create-axis-grid-line.js +2 -4
- package/dist/es/core/utils/create-axis-tick.js +2 -4
- package/dist/es/core/utils/guid.js +3 -3
- package/dist/es/core/utils/rect-to-box.js +2 -2
- package/dist/es/date-utils/absolute-date-diff.js +2 -2
- package/dist/es/date-utils/add-duration.js +5 -5
- package/dist/es/date-utils/ceil-date.js +1 -1
- package/dist/es/date-utils/constants.js +17 -17
- package/dist/es/date-utils/date-index.js +3 -3
- package/dist/es/date-utils/duration.js +1 -1
- package/dist/es/date-utils/lte-date-index.js +4 -4
- package/dist/es/date-utils/parse-date.js +1 -1
- package/dist/es/date-utils/parse-dates.js +2 -2
- package/dist/es/date-utils/start-of-week.js +3 -5
- package/dist/es/date-utils/to-date.js +1 -1
- package/dist/es/date-utils/to-time.js +2 -2
- package/dist/es/drawing-utils.js +18 -17
- package/dist/es/gauges/arc/arc-gauge.js +29 -38
- package/dist/es/gauges/arc/arc-scale.js +16 -29
- package/dist/es/gauges/arc/range-pointer-animation.js +16 -25
- package/dist/es/gauges/arc/range-pointer.js +25 -46
- package/dist/es/gauges/circular/circular-gauge.js +7 -17
- package/dist/es/gauges/constants.js +14 -14
- package/dist/es/gauges/gauge.js +84 -96
- package/dist/es/gauges/linear/arrow-linear-pointer-animation.js +13 -25
- package/dist/es/gauges/linear/arrow-linear-pointer.js +23 -35
- package/dist/es/gauges/linear/bar-linear-pointer-animation.js +15 -24
- package/dist/es/gauges/linear/bar-linear-pointer.js +38 -51
- package/dist/es/gauges/linear/linear-gauge.js +61 -83
- package/dist/es/gauges/linear/linear-pointer.js +25 -39
- package/dist/es/gauges/linear/linear-scale.js +57 -74
- package/dist/es/gauges/pointer.js +11 -21
- package/dist/es/gauges/radial/radial-gauge.js +58 -81
- package/dist/es/gauges/radial/radial-pointer-animation.js +9 -15
- package/dist/es/gauges/radial/radial-pointer.js +33 -48
- package/dist/es/gauges/radial/radial-scale.js +154 -186
- package/dist/es/gauges/utils/build-label-element.js +10 -12
- package/dist/es/gauges/utils/get-range.js +2 -2
- package/dist/es/gauges/utils/pad.js +3 -3
- package/dist/es/gauges/utils/unpad.js +1 -1
- package/dist/es/map/attribution.js +42 -52
- package/dist/es/map/constants.js +5 -5
- package/dist/es/map/crs.js +68 -112
- package/dist/es/map/datums.js +3 -3
- package/dist/es/map/extent.js +40 -54
- package/dist/es/map/layers/bubble.js +52 -70
- package/dist/es/map/layers/layer.js +50 -56
- package/dist/es/map/layers/marker.js +109 -129
- package/dist/es/map/layers/shape.js +111 -133
- package/dist/es/map/layers/tile.js +144 -170
- package/dist/es/map/location.js +70 -78
- package/dist/es/map/map.js +261 -291
- package/dist/es/map/navigator.js +33 -39
- package/dist/es/map/scroller/draggable.js +98 -134
- package/dist/es/map/scroller/fx.js +39 -46
- package/dist/es/map/scroller/scroller.js +144 -174
- package/dist/es/map/tooltip/tooltip.js +15 -25
- package/dist/es/map/utils.js +25 -26
- package/dist/es/map/zoom.js +30 -36
- package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +14 -26
- package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +15 -25
- package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +8 -7
- package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +14 -24
- package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +15 -21
- package/dist/es/qrcode/encodings/encoders/iso-encoder.js +6 -16
- package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +28 -36
- package/dist/es/qrcode/encodings/encoding-result.js +4 -10
- package/dist/es/qrcode/encodings/encoding.js +68 -192
- package/dist/es/qrcode/encodings/free-cell-visitor.js +16 -24
- package/dist/es/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es/qrcode/encodings/utils/index.js +5 -0
- package/dist/es/qrcode/encodings/version-codewords.js +1 -1
- package/dist/es/qrcode/qrcode-validator.js +3 -5
- package/dist/es/qrcode/qrcode.js +104 -114
- package/dist/es/qrcode/utils.js +4 -4
- package/dist/es/sankey/calculation.js +286 -307
- package/dist/es/sankey/element.js +15 -23
- package/dist/es/sankey/label.js +29 -44
- package/dist/es/sankey/legend.js +15 -29
- package/dist/es/sankey/link.js +80 -98
- package/dist/es/sankey/node.js +26 -37
- package/dist/es/sankey/sankey.js +318 -385
- package/dist/es/sankey/title.js +9 -20
- package/dist/es/sankey/utils.js +18 -23
- package/dist/es/services/chart-service.js +24 -28
- package/dist/es/services/dom-events-builder.js +15 -15
- package/dist/es/services/format-service.js +30 -35
- package/dist/es/services/intl-service.js +14 -18
- package/dist/es/services/map-service.js +11 -11
- package/dist/es/services/template-service.js +9 -9
- package/dist/es/sparkline/shared-tooltip.js +11 -21
- package/dist/es/sparkline/sparkline.js +50 -60
- package/dist/es/stock/constants.js +3 -3
- package/dist/es/stock/fade-out-animation.js +12 -21
- package/dist/es/stock/navigator-hint.js +37 -49
- package/dist/es/stock/navigator.js +130 -161
- package/dist/es/stock/stock-chart.js +58 -67
- package/dist/es2015/chart/legend/legend-item.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoding.js +3 -127
- package/dist/es2015/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es2015/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es2015/qrcode/encodings/utils/index.js +5 -0
- package/dist/npm/main.js +3222 -3589
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +19 -57
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import isArray from './is-array';
|
|
2
2
|
|
|
3
3
|
export default function addClass(element, classes) {
|
|
4
|
-
|
|
4
|
+
const classArray = isArray(classes) ? classes : [ classes ];
|
|
5
5
|
|
|
6
|
-
for (
|
|
7
|
-
|
|
6
|
+
for (let idx = 0; idx < classArray.length; idx++) {
|
|
7
|
+
const className = classArray[idx];
|
|
8
8
|
if (element.className.indexOf(className) === -1) {
|
|
9
9
|
element.className += " " + className;
|
|
10
10
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { drawing } from '@progress/kendo-drawing';
|
|
2
2
|
|
|
3
3
|
export default function alignPathToPixel(path) {
|
|
4
|
-
|
|
4
|
+
let offset = 0.5;
|
|
5
5
|
if (path.options.stroke && drawing.util.defined(path.options.stroke.width)) {
|
|
6
6
|
if (path.options.stroke.width % 2 === 0) {
|
|
7
7
|
offset = 0;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
for (
|
|
11
|
+
for (let i = 0; i < path.segments.length; i++) {
|
|
12
12
|
path.segments[i].anchor().round(0).translate(offset, offset);
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
1
|
+
export const ARC = "arc";
|
|
2
|
+
export const ARROW_UP = "ArrowUp";
|
|
3
|
+
export const ARROW_DOWN = "ArrowDown";
|
|
4
|
+
export const ARROW_LEFT = "ArrowLeft";
|
|
5
|
+
export const ARROW_RIGHT = "ArrowRight";
|
|
6
|
+
export const TAB = "Tab";
|
|
7
|
+
export const ARIA_ACTIVE_DESCENDANT = "aria-activedescendant";
|
|
8
|
+
export const AXIS_LABEL_CLICK = "axisLabelClick";
|
|
9
|
+
export const BLACK = "#000";
|
|
10
|
+
export const BOTTOM = "bottom";
|
|
11
|
+
export const CENTER = "center";
|
|
12
|
+
export const CIRCLE = "circle";
|
|
13
|
+
export const COORD_PRECISION = 3;
|
|
14
|
+
export const CROSS = "cross";
|
|
15
|
+
export const DATE = "date";
|
|
16
|
+
export const DEFAULT_FONT = "12px sans-serif";
|
|
17
|
+
export const DEFAULT_HEIGHT = 400;
|
|
18
|
+
export const DEFAULT_PRECISION = 10;
|
|
19
|
+
export const DEFAULT_WIDTH = 600;
|
|
20
|
+
export const END = "end";
|
|
21
|
+
export const ENTER = "Enter";
|
|
22
|
+
export const ESCAPE = "Escape";
|
|
23
|
+
export const FORMAT_REGEX = /\{\d+:?/;
|
|
24
|
+
export const HEIGHT = "height";
|
|
25
|
+
export const HIGHLIGHT_ZINDEX = 100;
|
|
26
|
+
export const INSIDE = "inside";
|
|
27
|
+
export const INHERIT = "inherit";
|
|
28
|
+
export const LEFT = "left";
|
|
29
|
+
export const MAX_VALUE = Number.MAX_VALUE;
|
|
30
|
+
export const MIN_VALUE = -Number.MAX_VALUE;
|
|
31
|
+
export const NONE = "none";
|
|
32
|
+
export const NOTE_CLICK = "noteClick";
|
|
33
|
+
export const NOTE_HOVER = "noteHover";
|
|
34
|
+
export const NOTE_LEAVE = "noteLeave";
|
|
35
|
+
export const OBJECT = "object";
|
|
36
|
+
export const OUTSIDE = "outside";
|
|
37
|
+
export const RIGHT = "right";
|
|
38
|
+
export const ROUNDED_RECT = "roundedRect";
|
|
39
|
+
export const START = "start";
|
|
40
|
+
export const STRING = "string";
|
|
41
|
+
export const TOP = "top";
|
|
42
|
+
export const TRIANGLE = "triangle";
|
|
43
|
+
export const SQUARE = "square";
|
|
44
|
+
export const RECT = "rect";
|
|
45
|
+
export const VALUE = "value";
|
|
46
|
+
export const WHITE = "#fff";
|
|
47
|
+
export const WIDTH = "width";
|
|
48
|
+
export const X = "x";
|
|
49
|
+
export const Y = "y";
|
|
50
|
+
export const DEFAULT_SERIES_OPACITY = 1;
|
|
51
|
+
export const POINTER = "pointer";
|
|
52
|
+
export const HORIZONTAL = "horizontal";
|
|
53
|
+
export const VERTICAL = "vertical";
|
|
@@ -1,90 +1,84 @@
|
|
|
1
|
-
|
|
1
|
+
const DELETED = {};
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class LegacySet {
|
|
4
|
+
constructor(values) {
|
|
5
|
+
this._index = {};
|
|
6
|
+
this._values = values ? values.slice(0) : [];
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
for (var i = 0; i < this._values.length; i++) {
|
|
10
|
-
this$1._index[this$1._values[i]] = i;
|
|
8
|
+
for (let i = 0; i < this._values.length; i++) {
|
|
9
|
+
this._index[this._values[i]] = i;
|
|
10
|
+
}
|
|
11
11
|
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var prototypeAccessors = { size: { configurable: true } };
|
|
15
|
-
|
|
16
|
-
LegacySet.prototype.values = function values () {
|
|
17
|
-
return this._values.filter(function (item) { return item !== DELETED; });
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
LegacySet.prototype.has = function has (value) {
|
|
21
|
-
return this._index[value] !== undefined;
|
|
22
|
-
};
|
|
23
12
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this._index[value] = this._values.length;
|
|
27
|
-
this._values.push(value);
|
|
13
|
+
values() {
|
|
14
|
+
return this._values.filter(item => item !== DELETED);
|
|
28
15
|
}
|
|
29
|
-
};
|
|
30
16
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (index !== undefined) {
|
|
34
|
-
this._values[index] = DELETED;
|
|
35
|
-
delete this._index[value];
|
|
17
|
+
has(value) {
|
|
18
|
+
return this._index[value] !== undefined;
|
|
36
19
|
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
LegacySet.prototype.clear = function clear () {
|
|
40
|
-
this._index = {};
|
|
41
|
-
this._values = [];
|
|
42
|
-
};
|
|
43
20
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
add(value) {
|
|
22
|
+
if (!this.has(value)) {
|
|
23
|
+
this._index[value] = this._values.length;
|
|
24
|
+
this._values.push(value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
47
27
|
|
|
48
|
-
|
|
28
|
+
delete(value) {
|
|
29
|
+
const index = this._index[value];
|
|
30
|
+
if (index !== undefined) {
|
|
31
|
+
this._values[index] = DELETED;
|
|
32
|
+
delete this._index[value];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
49
35
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
clear() {
|
|
37
|
+
this._index = {};
|
|
38
|
+
this._values = [];
|
|
39
|
+
}
|
|
53
40
|
|
|
54
|
-
|
|
41
|
+
get size() {
|
|
42
|
+
return this._values.length;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
55
45
|
|
|
56
|
-
SetWrapper
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
class SetWrapper {
|
|
47
|
+
constructor(values) {
|
|
48
|
+
this._set = new Set(values);
|
|
49
|
+
}
|
|
59
50
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
51
|
+
values() {
|
|
52
|
+
return Array.from(this._set);
|
|
53
|
+
}
|
|
63
54
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
55
|
+
has(value) {
|
|
56
|
+
return this._set.has(value);
|
|
57
|
+
}
|
|
67
58
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
59
|
+
add(value) {
|
|
60
|
+
this._set.add(value);
|
|
61
|
+
}
|
|
71
62
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
63
|
+
delete(value) {
|
|
64
|
+
this._set.delete(value);
|
|
65
|
+
}
|
|
75
66
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
67
|
+
clear() {
|
|
68
|
+
this._set.clear();
|
|
69
|
+
}
|
|
79
70
|
|
|
80
|
-
|
|
71
|
+
get size() {
|
|
72
|
+
return this._set.size;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
81
75
|
|
|
82
76
|
// TODO: Drop LegacySet when removing support for IE10
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
let supportsSet = () => {
|
|
78
|
+
let supported = false;
|
|
85
79
|
|
|
86
80
|
if (typeof Set === 'function') {
|
|
87
|
-
|
|
81
|
+
const set = new Set([1]);
|
|
88
82
|
supported = set.has(1);
|
|
89
83
|
}
|
|
90
84
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import isFunction from './is-function';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const OBJECT = "object";
|
|
4
|
+
const UNDEFINED = "undefined";
|
|
5
5
|
|
|
6
6
|
function deepExtendOne(destination, source) {
|
|
7
|
-
for (
|
|
7
|
+
for (let property in source) {
|
|
8
8
|
if (property === '__proto__' || property === 'constructor') {
|
|
9
9
|
continue;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
let propValue = source[property];
|
|
13
|
+
let propType = typeof propValue;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
let propInit;
|
|
16
16
|
if (propType === OBJECT && propValue !== null) {
|
|
17
17
|
propInit = propValue.constructor;
|
|
18
18
|
} else {
|
|
@@ -25,7 +25,7 @@ function deepExtendOne(destination, source) {
|
|
|
25
25
|
} else if (isFunction(propValue.clone)) {
|
|
26
26
|
destination[property] = propValue.clone();
|
|
27
27
|
} else {
|
|
28
|
-
|
|
28
|
+
let destProp = destination[property];
|
|
29
29
|
if (typeof (destProp) === OBJECT) {
|
|
30
30
|
destination[property] = destProp || {};
|
|
31
31
|
} else {
|
|
@@ -42,12 +42,10 @@ function deepExtendOne(destination, source) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export default function deepExtend(destination) {
|
|
45
|
-
|
|
45
|
+
const length = arguments.length;
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
for (var i = 1; i < length; i++) {
|
|
50
|
-
deepExtendOne(destination, arguments$1[i]);
|
|
47
|
+
for (let i = 1; i < length; i++) {
|
|
48
|
+
deepExtendOne(destination, arguments[i]);
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
return destination;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { geometry } from '@progress/kendo-drawing';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const Matrix = geometry.Matrix;
|
|
4
|
+
const matrixRegexp = /matrix\((.*)\)/;
|
|
5
5
|
|
|
6
6
|
function parseMatrix(matrixString) {
|
|
7
|
-
|
|
7
|
+
const match = matrixString.match(matrixRegexp);
|
|
8
8
|
if (match === null || match.length !== 2) {
|
|
9
9
|
return Matrix.unit();
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
return new
|
|
12
|
+
const members = match[1].split(',').map(x => parseFloat(x));
|
|
13
|
+
return new Matrix(...members);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function transformMatrix(element) {
|
|
17
|
-
|
|
17
|
+
const transform = getComputedStyle(element).transform;
|
|
18
18
|
|
|
19
19
|
if (transform === 'none') {
|
|
20
20
|
return Matrix.unit();
|
|
@@ -28,10 +28,10 @@ export default function elementScale(element) {
|
|
|
28
28
|
return Matrix.unit();
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
let matrix = transformMatrix(element);
|
|
32
|
+
let parent = element.parentElement;
|
|
33
33
|
while (parent) {
|
|
34
|
-
|
|
34
|
+
const parentMatrix = transformMatrix(parent);
|
|
35
35
|
matrix = matrix.multiplyCopy(parentMatrix);
|
|
36
36
|
parent = parent.parentElement;
|
|
37
37
|
}
|
|
@@ -3,28 +3,28 @@ import isArray from './is-array';
|
|
|
3
3
|
import isString from './is-string';
|
|
4
4
|
import styleValue from './style-value';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const SIZE_STYLES_REGEX = /width|height|top|left|bottom|right/i;
|
|
7
7
|
|
|
8
8
|
function isSizeField(field) {
|
|
9
9
|
return SIZE_STYLES_REGEX.test(field);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export default function elementStyles(element, styles) {
|
|
13
|
-
|
|
13
|
+
const stylesArray = isString(styles) ? [ styles ] : styles;
|
|
14
14
|
|
|
15
15
|
if (isArray(stylesArray)) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const result = {};
|
|
17
|
+
const style = window.getComputedStyle(element);
|
|
18
18
|
|
|
19
|
-
for (
|
|
20
|
-
|
|
19
|
+
for (let idx = 0; idx < stylesArray.length; idx++) {
|
|
20
|
+
let field = stylesArray[idx];
|
|
21
21
|
result[field] = isSizeField(field) ? parseFloat(style[field]) : style[field];
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return result;
|
|
25
25
|
} else if (isObject(styles)) {
|
|
26
|
-
for (
|
|
27
|
-
element.style[field
|
|
26
|
+
for (let field in styles) {
|
|
27
|
+
element.style[field] = styleValue(styles[field]);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const eventMap = {
|
|
2
2
|
down: "pointerdown",
|
|
3
3
|
move: "pointermove",
|
|
4
4
|
up: "pointerup",
|
|
@@ -9,9 +9,9 @@ function queryEventMap(e) {
|
|
|
9
9
|
return eventMap[e] || e;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
export const applyEventMap = (events) => {
|
|
13
|
+
const eventRegEx = /([^ ]+)/g;
|
|
14
|
+
const appliedEvents = events.replace(eventRegEx, queryEventMap);
|
|
15
15
|
|
|
16
16
|
return appliedEvents;
|
|
17
17
|
};
|
|
@@ -2,8 +2,8 @@ import isFunction from './is-function';
|
|
|
2
2
|
import isArray from './is-array';
|
|
3
3
|
import guid from '../core/utils/guid';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const elementEventHandlers = new WeakMap();
|
|
6
|
+
const ID = Symbol('id');
|
|
7
7
|
|
|
8
8
|
export function on(element, events, filter, handler, useCapture) {
|
|
9
9
|
addEventListeners(element, events, filter, handler, useCapture);
|
|
@@ -18,7 +18,7 @@ function isString(value) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
function addEventListeners(element, events, filter, handler, useCapture) {
|
|
21
|
-
|
|
21
|
+
const eventNames = isArray(events) ? events : (events || "").split(" ");
|
|
22
22
|
|
|
23
23
|
eventNames.forEach(function(eventName) {
|
|
24
24
|
addEventListener(element, eventName, filter, handler, useCapture);
|
|
@@ -26,8 +26,8 @@ function addEventListeners(element, events, filter, handler, useCapture) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
function addEventListener(element, event, filter, handler, useCapture) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
let eventHandler = handler;
|
|
30
|
+
let eventFilter;
|
|
31
31
|
|
|
32
32
|
if (filter && isFunction(filter) && !handler) {
|
|
33
33
|
eventHandler = filter;
|
|
@@ -35,12 +35,12 @@ function addEventListener(element, event, filter, handler, useCapture) {
|
|
|
35
35
|
eventFilter = filter;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const attachedHandler = function(e) {
|
|
39
|
+
const closestMatchingTarget = e.target ? e.target.closest(eventFilter) : null;
|
|
40
40
|
|
|
41
41
|
if (!eventFilter ||
|
|
42
42
|
(eventFilter && e.target && closestMatchingTarget)) {
|
|
43
|
-
|
|
43
|
+
const currentTarget = eventFilter ? closestMatchingTarget : e.currentTarget;
|
|
44
44
|
|
|
45
45
|
// reassign the property as it is a getters only
|
|
46
46
|
Object.defineProperty(e, "currentTarget", { value: currentTarget });
|
|
@@ -53,7 +53,7 @@ function addEventListener(element, event, filter, handler, useCapture) {
|
|
|
53
53
|
if (!eventHandler[ID]) {
|
|
54
54
|
eventHandler[ID] = guid();
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
let eventHandlers = elementEventHandlers.get(element);
|
|
57
57
|
|
|
58
58
|
if (!eventHandlers) {
|
|
59
59
|
eventHandlers = new Map();
|
|
@@ -65,7 +65,7 @@ function addEventListener(element, event, filter, handler, useCapture) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
function removeEventListeners(element, events, handler, useCapture) {
|
|
68
|
-
|
|
68
|
+
const eventNames = isArray(events) ? events : (events || "").split(" ");
|
|
69
69
|
|
|
70
70
|
eventNames.forEach(function(eventName) {
|
|
71
71
|
removeEventListener(element, eventName, handler, useCapture);
|
|
@@ -73,11 +73,11 @@ function removeEventListeners(element, events, handler, useCapture) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
function removeEventListener(element, event, handler, useCapture) {
|
|
76
|
-
|
|
76
|
+
const eventHandlers = elementEventHandlers.get(element);
|
|
77
77
|
|
|
78
78
|
if (eventHandlers && handler && handler[ID]) {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
const handlerId = event + handler[ID];
|
|
80
|
+
const attachedHandler = eventHandlers.get(handlerId);
|
|
81
81
|
|
|
82
82
|
eventHandlers.delete(handlerId);
|
|
83
83
|
|
package/dist/es/common/find.js
CHANGED
|
@@ -1,56 +1,54 @@
|
|
|
1
1
|
import { logToConsole } from '../drawing-utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class FontLoader {
|
|
4
|
+
static fetchFonts(options, fonts, state = { depth: 0 }) {
|
|
5
|
+
const MAX_DEPTH = 5;
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
if ( state === void 0 ) state = { depth: 0 };
|
|
7
|
-
|
|
8
|
-
var MAX_DEPTH = 5;
|
|
9
|
-
|
|
10
|
-
if (!options || state.depth > MAX_DEPTH || !document.fonts) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
Object.keys(options).forEach(function(key) {
|
|
15
|
-
var value = options[key];
|
|
16
|
-
if (key === "dataSource" || key[0] === "$" || !value) {
|
|
7
|
+
if (!options || state.depth > MAX_DEPTH || !document.fonts) {
|
|
17
8
|
return;
|
|
18
9
|
}
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
FontLoader.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
promises = fonts.map(function(font) {
|
|
36
|
-
return document.fonts.load(font);
|
|
37
|
-
});
|
|
38
|
-
} catch (e) {
|
|
39
|
-
// Silence font-loading errors
|
|
40
|
-
logToConsole(e);
|
|
41
|
-
}
|
|
11
|
+
Object.keys(options).forEach(function(key) {
|
|
12
|
+
const value = options[key];
|
|
13
|
+
if (key === "dataSource" || key[0] === "$" || !value) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (key === "font") {
|
|
18
|
+
fonts.push(value);
|
|
19
|
+
} else if (typeof value === "object") {
|
|
20
|
+
state.depth++;
|
|
21
|
+
FontLoader.fetchFonts(value, fonts, state);
|
|
22
|
+
state.depth--;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
42
26
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
static loadFonts(fonts, callback) {
|
|
28
|
+
let promises = [];
|
|
29
|
+
|
|
30
|
+
if (fonts.length > 0 && document.fonts) {
|
|
31
|
+
try {
|
|
32
|
+
promises = fonts.map(function(font) {
|
|
33
|
+
return document.fonts.load(font);
|
|
34
|
+
});
|
|
35
|
+
} catch (e) {
|
|
36
|
+
// Silence font-loading errors
|
|
37
|
+
logToConsole(e);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
Promise.all(promises).then(callback, callback);
|
|
41
|
+
} else {
|
|
42
|
+
callback();
|
|
43
|
+
}
|
|
46
44
|
}
|
|
47
|
-
};
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
static preloadFonts(options, callback) {
|
|
47
|
+
const fonts = [];
|
|
48
|
+
FontLoader.fetchFonts(options, fonts);
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
}
|
|
50
|
+
FontLoader.loadFonts(fonts, callback);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
55
53
|
|
|
56
54
|
export default FontLoader;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import TemplateService from '../services/template-service';
|
|
2
2
|
import isFunction from './is-function';
|
|
3
3
|
|
|
4
|
-
export default function getTemplate(options) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var ariaTemplate;
|
|
4
|
+
export default function getTemplate(options = {}) {
|
|
5
|
+
let ariaTemplate;
|
|
8
6
|
if (options.ariaTemplate) {
|
|
9
7
|
options.ariaTemplate = ariaTemplate = TemplateService.compile(options.ariaTemplate);
|
|
10
8
|
} else if (isFunction(options.ariaContent)) {
|