@mathstack/viz 2.0.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mathstack-viz.mjs +11024 -0
- package/fesm2022/mathstack-viz.mjs.map +1 -0
- package/package.json +14 -5
- package/types/mathstack-viz.d.ts +5830 -0
- package/CHANGELOG.md +0 -0
- package/cypress/fixtures/example.json +0 -5
- package/cypress/fixtures/usMap.json +0 -13511
- package/cypress/support/commands.ts +0 -104
- package/cypress/support/component-index.html +0 -12
- package/cypress/support/component.ts +0 -33
- package/cypress.config.ts +0 -9
- package/karma.conf.js +0 -62
- package/ng-package.json +0 -8
- package/project.json +0 -97
- package/src/.eslintrc.json +0 -35
- package/src/.prettierrc +0 -31
- package/src/lib/axes/base/config/xy-axis-builder.ts +0 -68
- package/src/lib/axes/base/config/xy-axis-config.ts +0 -35
- package/src/lib/axes/base/config/xy-axis-options.ts +0 -11
- package/src/lib/axes/base/xy-axis-base.spec.ts +0 -114
- package/src/lib/axes/base/xy-axis-base.ts +0 -300
- package/src/lib/axes/base/xy-axis-domain-lines.cy.ts +0 -511
- package/src/lib/axes/baseline/axis-baseline-builder.ts +0 -77
- package/src/lib/axes/baseline/axis-baseline-options.ts +0 -4
- package/src/lib/axes/baseline/axis-baseline.ts +0 -11
- package/src/lib/axes/grid/grid-builder.ts +0 -74
- package/src/lib/axes/grid/grid-config.ts +0 -13
- package/src/lib/axes/grid/grid-options.ts +0 -7
- package/src/lib/axes/index.ts +0 -40
- package/src/lib/axes/label/axis-label-builder.ts +0 -140
- package/src/lib/axes/label/axis-label-options.ts +0 -12
- package/src/lib/axes/label/axis-label.ts +0 -18
- package/src/lib/axes/label/axis-labels.cy.ts +0 -303
- package/src/lib/axes/ordinal/ordinal-axis-config.ts +0 -31
- package/src/lib/axes/ordinal/ordinal-axis.spec.ts +0 -30
- package/src/lib/axes/ordinal/ordinal-axis.ts +0 -26
- package/src/lib/axes/quantitative/quantitative-axis-config.ts +0 -39
- package/src/lib/axes/quantitative/quantitative-axis-ticks.cy.ts +0 -748
- package/src/lib/axes/quantitative/quantitative-axis.spec.ts +0 -537
- package/src/lib/axes/quantitative/quantitative-axis.ts +0 -191
- package/src/lib/axes/ticks/tick-wrap/tick-wrap-builder.ts +0 -141
- package/src/lib/axes/ticks/tick-wrap/tick-wrap-options.ts +0 -11
- package/src/lib/axes/ticks/tick-wrap/tick-wrap.cy.ts +0 -360
- package/src/lib/axes/ticks/tick-wrap/tick-wrap.ts +0 -21
- package/src/lib/axes/ticks/ticks-builder.ts +0 -370
- package/src/lib/axes/ticks/ticks-options.ts +0 -24
- package/src/lib/axes/ticks/ticks.ts +0 -33
- package/src/lib/axes/x/x-axis-config.ts +0 -48
- package/src/lib/axes/x/x-axis.spec.ts +0 -90
- package/src/lib/axes/x/x-axis.ts +0 -109
- package/src/lib/axes/x-ordinal/x-ordinal-axis-builder.ts +0 -75
- package/src/lib/axes/x-ordinal/x-ordinal-axis-config.ts +0 -27
- package/src/lib/axes/x-ordinal/x-ordinal-axis.component.ts +0 -33
- package/src/lib/axes/x-quantitative/x-quantitative-axis-builder.ts +0 -74
- package/src/lib/axes/x-quantitative/x-quantitative-axis-config.ts +0 -32
- package/src/lib/axes/x-quantitative/x-quantitative-axis.component.ts +0 -40
- package/src/lib/axes/xy-axis.module.ts +0 -20
- package/src/lib/axes/y/y-axis-config.ts +0 -47
- package/src/lib/axes/y/y-axis.spec.ts +0 -92
- package/src/lib/axes/y/y-axis.ts +0 -161
- package/src/lib/axes/y-ordinal/y-ordinal-axis-builder.ts +0 -76
- package/src/lib/axes/y-ordinal/y-ordinal-axis-config.ts +0 -29
- package/src/lib/axes/y-ordinal/y-ordinal-axis.component.ts +0 -33
- package/src/lib/axes/y-quantitative-axis/y-quantitative-axis-builder.ts +0 -74
- package/src/lib/axes/y-quantitative-axis/y-quantitative-axis-config.ts +0 -34
- package/src/lib/axes/y-quantitative-axis/y-quantitative-axis.component.ts +0 -40
- package/src/lib/bars/bars.component.scss +0 -0
- package/src/lib/bars/bars.component.spec.ts +0 -1470
- package/src/lib/bars/bars.component.ts +0 -717
- package/src/lib/bars/bars.cy.ts +0 -829
- package/src/lib/bars/bars.module.ts +0 -9
- package/src/lib/bars/config/backgrounds/bars-backgrounds-builder.ts +0 -51
- package/src/lib/bars/config/backgrounds/bars-backgrounds-options.ts +0 -4
- package/src/lib/bars/config/backgrounds/bars-backgrounds.ts +0 -11
- package/src/lib/bars/config/bars-builder.ts +0 -340
- package/src/lib/bars/config/bars-config.spec.ts +0 -132
- package/src/lib/bars/config/bars-config.ts +0 -70
- package/src/lib/bars/config/bars-dimensions.ts +0 -29
- package/src/lib/bars/config/bars-options.ts +0 -20
- package/src/lib/bars/config/labels/bars-labels-builder.ts +0 -89
- package/src/lib/bars/config/labels/bars-labels-options.ts +0 -6
- package/src/lib/bars/config/labels/bars-labels.cy.ts +0 -781
- package/src/lib/bars/config/labels/bars-labels.ts +0 -13
- package/src/lib/bars/events/actions/bars-click-actions.ts +0 -23
- package/src/lib/bars/events/actions/bars-hover-actions.ts +0 -43
- package/src/lib/bars/events/actions/bars-hover-move-actions.ts +0 -21
- package/src/lib/bars/events/bars-events.directive.spec.ts +0 -186
- package/src/lib/bars/events/bars-events.directive.ts +0 -235
- package/src/lib/bars/events/bars-interaction-output.ts +0 -17
- package/src/lib/bars/events/bars-tooltip-positioner.ts +0 -24
- package/src/lib/bars/index.ts +0 -18
- package/src/lib/charts/chart/chart-scaling.cy.ts +0 -323
- package/src/lib/charts/chart/chart.component.html +0 -45
- package/src/lib/charts/chart/chart.component.scss +0 -37
- package/src/lib/charts/chart/chart.component.ts +0 -243
- package/src/lib/charts/chart/chart.token.ts +0 -4
- package/src/lib/charts/chart/chart.ts +0 -5
- package/src/lib/charts/chart/config/chart-builder.ts +0 -194
- package/src/lib/charts/chart/config/chart-config.ts +0 -21
- package/src/lib/charts/chart/config/chart-options.ts +0 -11
- package/src/lib/charts/chart.module.ts +0 -10
- package/src/lib/charts/index.ts +0 -9
- package/src/lib/charts/map-chart/map-chart.component.scss +0 -0
- package/src/lib/charts/map-chart/map-chart.component.spec.ts +0 -35
- package/src/lib/charts/map-chart/map-chart.component.ts +0 -61
- package/src/lib/charts/xy-chart/xy-chart.component.spec.ts +0 -34
- package/src/lib/charts/xy-chart/xy-chart.component.ts +0 -65
- package/src/lib/core/common-behaviors/constructor.ts +0 -7
- package/src/lib/core/index.ts +0 -11
- package/src/lib/core/pipes/resize-chart-height.pipe.spec.ts +0 -23
- package/src/lib/core/pipes/resize-chart-height.pipe.ts +0 -20
- package/src/lib/core/styles/_spacing.scss +0 -4
- package/src/lib/core/types/layout.ts +0 -28
- package/src/lib/core/types/scale.ts +0 -6
- package/src/lib/core/types/utility.ts +0 -11
- package/src/lib/core/types/values.ts +0 -10
- package/src/lib/core/utilities/colors.spec.ts +0 -57
- package/src/lib/core/utilities/colors.ts +0 -42
- package/src/lib/core/utilities/fill-utilities.spec.ts +0 -25
- package/src/lib/core/utilities/fill-utilities.ts +0 -21
- package/src/lib/core/utilities/type-guards.spec.ts +0 -55
- package/src/lib/core/utilities/type-guards.ts +0 -33
- package/src/lib/core/utilities/value-format.ts +0 -21
- package/src/lib/core/utilities/values.spec.ts +0 -954
- package/src/lib/core/utilities/values.ts +0 -189
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-builder.ts +0 -105
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position-options.ts +0 -24
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position.spec.ts +0 -66
- package/src/lib/data-dimensions/continuous-quantitative/date-chart-position/date-chart-position.ts +0 -72
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/concrete-domain-padding.ts +0 -10
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/domain-padding.ts +0 -76
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/domain-test-utility.ts +0 -130
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/percent-over/percent-over.ts +0 -37
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/pixel/pixel.ts +0 -73
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/quantitative-domain-padding.cy.ts +0 -978
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-interval/round-to-interval.ts +0 -27
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig-options.ts +0 -3
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/domain-padding/round-to-sig-fig/round-to-sig-fig.ts +0 -30
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-builder.ts +0 -183
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position-options.ts +0 -8
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position.spec.ts +0 -28
- package/src/lib/data-dimensions/continuous-quantitative/number-chart-position/number-chart-position.ts +0 -62
- package/src/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension-options.ts +0 -15
- package/src/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension.spec.ts +0 -155
- package/src/lib/data-dimensions/continuous-quantitative/number-dimension/number-dimension.ts +0 -57
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-builder.ts +0 -166
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value-options.ts +0 -10
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value.spec.ts +0 -34
- package/src/lib/data-dimensions/continuous-quantitative/number-visual-value/number-visual-value.ts +0 -57
- package/src/lib/data-dimensions/dimension-builder.ts +0 -45
- package/src/lib/data-dimensions/dimension-options.ts +0 -12
- package/src/lib/data-dimensions/dimension.ts +0 -30
- package/src/lib/data-dimensions/index.ts +0 -31
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-builder.ts +0 -122
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position-options.ts +0 -12
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position.spec.ts +0 -83
- package/src/lib/data-dimensions/ordinal/ordinal-chart-position/ordinal-chart-position.ts +0 -101
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-builder.ts +0 -108
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value-options.ts +0 -12
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.cy.ts +0 -384
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.spec.ts +0 -63
- package/src/lib/data-dimensions/ordinal/ordinal-visual-value/ordinal-visual-value.ts +0 -79
- package/src/lib/data-export/data-export-config.ts +0 -98
- package/src/lib/data-export/data-export.spec.ts +0 -33
- package/src/lib/data-export/data-export.ts +0 -87
- package/src/lib/data-export/index.ts +0 -2
- package/src/lib/dots/config/dots-builder.ts +0 -442
- package/src/lib/dots/config/dots-config.spec.ts +0 -123
- package/src/lib/dots/config/dots-config.ts +0 -81
- package/src/lib/dots/config/dots-options.ts +0 -32
- package/src/lib/dots/dots.component.scss +0 -0
- package/src/lib/dots/dots.component.spec.ts +0 -143
- package/src/lib/dots/dots.component.ts +0 -291
- package/src/lib/dots/dots.cy.ts +0 -594
- package/src/lib/dots/dots.module.ts +0 -9
- package/src/lib/dots/events/actions/dots-hover-actions.ts +0 -19
- package/src/lib/dots/events/actions/dots-hover-move-actions.ts +0 -38
- package/src/lib/dots/events/dots-events.directive.ts +0 -214
- package/src/lib/dots/events/dots-interaction-output.ts +0 -15
- package/src/lib/dots/events/dots-tooltip-positioner.ts +0 -24
- package/src/lib/dots/index.ts +0 -10
- package/src/lib/events/events.directive.ts +0 -184
- package/src/lib/events/events.types.ts +0 -57
- package/src/lib/events/index.ts +0 -4
- package/src/lib/events/interaction-output.ts +0 -34
- package/src/lib/events/tooltip-positioner.ts +0 -15
- package/src/lib/fill-definitions/fill-definitions.ts +0 -4
- package/src/lib/fill-definitions/index.ts +0 -1
- package/src/lib/geographies/config/geographies-builder.ts +0 -224
- package/src/lib/geographies/config/geographies-config.spec.ts +0 -100
- package/src/lib/geographies/config/geographies-config.ts +0 -81
- package/src/lib/geographies/config/geographies-options.ts +0 -37
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-builder.ts +0 -212
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer-options.ts +0 -26
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer.spec.ts +0 -119
- package/src/lib/geographies/config/layers/attribute-data-layer/attribute-data-layer.ts +0 -148
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-builder.ts +0 -65
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension-options.ts +0 -15
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data/attribute-data-dimension.ts +0 -32
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-enums.ts +0 -10
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-types.ts +0 -15
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-builder.ts +0 -18
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins.spec.ts +0 -60
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/calculated-bins/calculated-bins.ts +0 -34
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-builder.ts +0 -46
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.cy.ts +0 -437
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.spec.ts +0 -105
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/categorical-bins/categorical-bins.ts +0 -54
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-builder.ts +0 -65
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins-options.ts +0 -9
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins.spec.ts +0 -82
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks-bins.ts +0 -81
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/custom-breaks/custom-breaks.cy.ts +0 -378
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-builder.ts +0 -50
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.cy.ts +0 -362
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.spec.ts +0 -72
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-frequencies-bins/equal-frequencies-bins.ts +0 -56
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-builder.ts +0 -60
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins-options.ts +0 -9
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.cy.ts +0 -307
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.spec.ts +0 -104
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/equal-value-ranges-bins/equal-value-ranges-bins.ts +0 -89
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-builder.ts +0 -62
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins-options.ts +0 -8
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.cy.ts +0 -265
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.spec.ts +0 -42
- package/src/lib/geographies/config/layers/attribute-data-layer/dimensions/no-bins/no-bins.ts +0 -42
- package/src/lib/geographies/config/layers/geographies-layer/geographies-layer-builder.ts +0 -116
- package/src/lib/geographies/config/layers/geographies-layer/geographies-layer-options.ts +0 -20
- package/src/lib/geographies/config/layers/geographies-layer/geographies-layer.ts +0 -104
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-builder.ts +0 -111
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer-options.ts +0 -19
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer.spec.ts +0 -41
- package/src/lib/geographies/config/layers/geojson-properties-layer/geojson-properties-layer.ts +0 -67
- package/src/lib/geographies/config/layers/labels/geographies-labels-builder.ts +0 -269
- package/src/lib/geographies/config/layers/labels/geographies-labels-options.ts +0 -45
- package/src/lib/geographies/config/layers/labels/geographies-labels.ts +0 -38
- package/src/lib/geographies/events/actions/geographies-click-actions.ts +0 -21
- package/src/lib/geographies/events/actions/geographies-hover-actions.ts +0 -17
- package/src/lib/geographies/events/actions/geographies-hover-move-actions.ts +0 -19
- package/src/lib/geographies/events/geographies-events.directive.spec.ts +0 -225
- package/src/lib/geographies/events/geographies-events.directive.ts +0 -235
- package/src/lib/geographies/events/geographies-interaction-output.ts +0 -17
- package/src/lib/geographies/events/geographies-tooltip-positioner.ts +0 -23
- package/src/lib/geographies/geographies-feature.ts +0 -16
- package/src/lib/geographies/geographies.component.html +0 -1
- package/src/lib/geographies/geographies.component.scss +0 -0
- package/src/lib/geographies/geographies.component.spec.ts +0 -148
- package/src/lib/geographies/geographies.component.ts +0 -318
- package/src/lib/geographies/geographies.cy.ts +0 -640
- package/src/lib/geographies/geographies.module.ts +0 -9
- package/src/lib/geographies/index.ts +0 -32
- package/src/lib/grouped-bars/config/grouped-bars-builder.ts +0 -66
- package/src/lib/grouped-bars/config/grouped-bars-config.ts +0 -41
- package/src/lib/grouped-bars/config/grouped-bars-options.ts +0 -9
- package/src/lib/grouped-bars/events/grouped-bars-events.directive.ts +0 -221
- package/src/lib/grouped-bars/grouped-bars.component.scss +0 -0
- package/src/lib/grouped-bars/grouped-bars.component.spec.ts +0 -25
- package/src/lib/grouped-bars/grouped-bars.component.ts +0 -94
- package/src/lib/grouped-bars/grouped-bars.module.ts +0 -9
- package/src/lib/grouped-bars/index.ts +0 -10
- package/src/lib/image-download/image-download-config.ts +0 -57
- package/src/lib/image-download/image-download-enums.ts +0 -7
- package/src/lib/image-download/image-download-options.ts +0 -14
- package/src/lib/image-download/image-download.service.ts +0 -70
- package/src/lib/image-download/index.ts +0 -4
- package/src/lib/lines/config/area-fills/area-fills-builder.ts +0 -87
- package/src/lib/lines/config/area-fills/area-fills-options.ts +0 -8
- package/src/lib/lines/config/area-fills/area-fills.ts +0 -14
- package/src/lib/lines/config/lines-builder.ts +0 -242
- package/src/lib/lines/config/lines-config.spec.ts +0 -52
- package/src/lib/lines/config/lines-config.ts +0 -96
- package/src/lib/lines/config/lines-options.ts +0 -19
- package/src/lib/lines/config/stroke/lines-stroke-builder.ts +0 -135
- package/src/lib/lines/config/stroke/lines-stroke-options.ts +0 -6
- package/src/lib/lines/config/stroke/lines-stroke.ts +0 -15
- package/src/lib/lines/events/actions/lines-click-actions.ts +0 -17
- package/src/lib/lines/events/actions/lines-hover-move-actions.ts +0 -113
- package/src/lib/lines/events/actions/lines-marker-click-actions.ts +0 -29
- package/src/lib/lines/events/lines-events.directive.spec.ts +0 -152
- package/src/lib/lines/events/lines-events.directive.ts +0 -310
- package/src/lib/lines/events/lines-interaction-output.ts +0 -17
- package/src/lib/lines/events/lines-tooltip-positioner.ts +0 -24
- package/src/lib/lines/index.ts +0 -17
- package/src/lib/lines/lines.component.scss +0 -0
- package/src/lib/lines/lines.component.spec.ts +0 -95
- package/src/lib/lines/lines.component.ts +0 -425
- package/src/lib/lines/lines.cy.ts +0 -738
- package/src/lib/lines/lines.module.ts +0 -9
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.html +0 -28
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.scss +0 -76
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.spec.ts +0 -61
- package/src/lib/map-legend/continuous-legend/continuous-legend.component.ts +0 -82
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.html +0 -40
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.scss +0 -141
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.spec.ts +0 -75
- package/src/lib/map-legend/discontinuous-legend/discontinuous-legend.component.ts +0 -57
- package/src/lib/map-legend/index.ts +0 -2
- package/src/lib/map-legend/map-legend-base.spec.ts +0 -190
- package/src/lib/map-legend/map-legend-base.ts +0 -99
- package/src/lib/map-legend/map-legend.component.html +0 -24
- package/src/lib/map-legend/map-legend.component.scss +0 -0
- package/src/lib/map-legend/map-legend.component.spec.ts +0 -125
- package/src/lib/map-legend/map-legend.component.ts +0 -80
- package/src/lib/map-legend/map-legend.module.ts +0 -8
- package/src/lib/marks/aux-marks/aux-marks.ts +0 -18
- package/src/lib/marks/aux-marks/config/aux-marks-builder.ts +0 -25
- package/src/lib/marks/aux-marks/config/aux-marks-config.ts +0 -6
- package/src/lib/marks/config/marks-config.ts +0 -14
- package/src/lib/marks/config/marks-options.ts +0 -9
- package/src/lib/marks/index.ts +0 -15
- package/src/lib/marks/map-marks/map-aux-marks/map-aux-marks.spec.ts +0 -74
- package/src/lib/marks/map-marks/map-aux-marks/map-aux-marks.ts +0 -40
- package/src/lib/marks/map-marks/map-primary-marks/map-primary-marks.spec.ts +0 -79
- package/src/lib/marks/map-marks/map-primary-marks/map-primary-marks.ts +0 -63
- package/src/lib/marks/marks.ts +0 -39
- package/src/lib/marks/primary-marks/config/primary-marks-builder.ts +0 -75
- package/src/lib/marks/primary-marks/config/primary-marks-config.ts +0 -9
- package/src/lib/marks/primary-marks/primary-marks-base.spec.ts +0 -58
- package/src/lib/marks/primary-marks/primary-marks.ts +0 -43
- package/src/lib/marks/xy-marks/xy-aux-marks/xy-aux-marks.ts +0 -40
- package/src/lib/marks/xy-marks/xy-marks-config.ts +0 -5
- package/src/lib/marks/xy-marks/xy-marks.ts +0 -10
- package/src/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks-config.ts +0 -7
- package/src/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks.spec.ts +0 -186
- package/src/lib/marks/xy-marks/xy-primary-marks/xy-primary-marks.ts +0 -72
- package/src/lib/point-markers/index.ts +0 -3
- package/src/lib/point-markers/point-markers-builder.ts +0 -93
- package/src/lib/point-markers/point-markers-options.ts +0 -6
- package/src/lib/point-markers/point-markers.ts +0 -13
- package/src/lib/quantitative-rules/config/labels/quantitative-rules-labels-builder.ts +0 -162
- package/src/lib/quantitative-rules/config/labels/quantitative-rules-labels-options.ts +0 -17
- package/src/lib/quantitative-rules/config/labels/quantitative-rules-labels.ts +0 -26
- package/src/lib/quantitative-rules/config/quantitative-rules-builder.ts +0 -134
- package/src/lib/quantitative-rules/config/quantitative-rules-config.ts +0 -21
- package/src/lib/quantitative-rules/config/quantitative-rules-dimensions.ts +0 -20
- package/src/lib/quantitative-rules/config/quantitative-rules-options.ts +0 -13
- package/src/lib/quantitative-rules/index.ts +0 -6
- package/src/lib/quantitative-rules/quantitative-rules.component.scss +0 -3
- package/src/lib/quantitative-rules/quantitative-rules.component.spec.ts +0 -50
- package/src/lib/quantitative-rules/quantitative-rules.component.ts +0 -224
- package/src/lib/quantitative-rules/quantitative-rules.cy.ts +0 -549
- package/src/lib/quantitative-rules/quantitative-rules.module.ts +0 -8
- package/src/lib/stacked-area/config/stacked-area-builder.ts +0 -264
- package/src/lib/stacked-area/config/stacked-area-config.spec.ts +0 -107
- package/src/lib/stacked-area/config/stacked-area-config.ts +0 -109
- package/src/lib/stacked-area/config/stacked-area-options.ts +0 -28
- package/src/lib/stacked-area/events/actions/stacked-area-hover-move-actions.ts +0 -17
- package/src/lib/stacked-area/events/stacked-area-events.directive.spec.ts +0 -168
- package/src/lib/stacked-area/events/stacked-area-events.directive.ts +0 -272
- package/src/lib/stacked-area/events/stacked-area-interaction-output.ts +0 -33
- package/src/lib/stacked-area/events/stacked-area-tooltip-positioner.ts +0 -37
- package/src/lib/stacked-area/index.ts +0 -7
- package/src/lib/stacked-area/stacked-area.component.scss +0 -0
- package/src/lib/stacked-area/stacked-area.component.spec.ts +0 -41
- package/src/lib/stacked-area/stacked-area.component.ts +0 -241
- package/src/lib/stacked-area/stacked-area.module.ts +0 -9
- package/src/lib/stacked-bars/config/stacked-bars-builder.ts +0 -109
- package/src/lib/stacked-bars/config/stacked-bars-config.spec.ts +0 -122
- package/src/lib/stacked-bars/config/stacked-bars-config.ts +0 -79
- package/src/lib/stacked-bars/config/stacked-bars-options.ts +0 -16
- package/src/lib/stacked-bars/events/actions/stacked-bars-click-actions.ts +0 -23
- package/src/lib/stacked-bars/events/actions/stacked-bars-hover-actions.ts +0 -22
- package/src/lib/stacked-bars/events/actions/stacked-bars-hover-move-actions.ts +0 -21
- package/src/lib/stacked-bars/events/stacked-bars-events.directive.spec.ts +0 -266
- package/src/lib/stacked-bars/events/stacked-bars-events.directive.ts +0 -240
- package/src/lib/stacked-bars/index.ts +0 -10
- package/src/lib/stacked-bars/stacked-bars.component.scss +0 -0
- package/src/lib/stacked-bars/stacked-bars.component.spec.ts +0 -25
- package/src/lib/stacked-bars/stacked-bars.component.ts +0 -158
- package/src/lib/stacked-bars/stacked-bars.module.ts +0 -9
- package/src/lib/stroke/base/stroke-base-options.ts +0 -7
- package/src/lib/stroke/base/stroke-base.ts +0 -9
- package/src/lib/stroke/index.ts +0 -5
- package/src/lib/stroke/stroke-builder.ts +0 -103
- package/src/lib/stroke/stroke-options.ts +0 -5
- package/src/lib/stroke/stroke.ts +0 -12
- package/src/lib/svg-text-wrap/index.ts +0 -3
- package/src/lib/svg-text-wrap/svg-text-wrap-builder.ts +0 -105
- package/src/lib/svg-text-wrap/svg-text-wrap-options.ts +0 -8
- package/src/lib/svg-text-wrap/svg-text-wrap.ts +0 -137
- package/src/lib/testing/data/continent-population-year-data.ts +0 -126
- package/src/lib/testing/data/country-area-continent.ts +0 -59
- package/src/lib/testing/data/state-population-income-year-data.ts +0 -123
- package/src/lib/testing/stubs/bars.component.stub.ts +0 -12
- package/src/lib/testing/stubs/chart.component.stub.ts +0 -6
- package/src/lib/testing/stubs/click.directive.stub.ts +0 -15
- package/src/lib/testing/stubs/core/destroy-ref.stub.ts +0 -9
- package/src/lib/testing/stubs/core/overlay-ref.stub.ts +0 -13
- package/src/lib/testing/stubs/core/overlay.stub.ts +0 -8
- package/src/lib/testing/stubs/event.directive.stub.ts +0 -10
- package/src/lib/testing/stubs/hover-move.directive.stub.ts +0 -17
- package/src/lib/testing/stubs/hover.directive.stub.ts +0 -14
- package/src/lib/testing/stubs/input-event.directive.stub.ts +0 -9
- package/src/lib/testing/stubs/lines.component.stub.ts +0 -13
- package/src/lib/testing/stubs/map-aux-marks.stub.ts +0 -10
- package/src/lib/testing/stubs/map-chart.component.stub.ts +0 -3
- package/src/lib/testing/stubs/map-legend-content.stub.ts +0 -16
- package/src/lib/testing/stubs/map-legend.component.stub.ts +0 -10
- package/src/lib/testing/stubs/map-primary-marks.stub.ts +0 -16
- package/src/lib/testing/stubs/ordinal-axis.stub.ts +0 -18
- package/src/lib/testing/stubs/primary-marks.stub.ts +0 -18
- package/src/lib/testing/stubs/quantitative-axis.stub.ts +0 -18
- package/src/lib/testing/stubs/services/main.service.stub.ts +0 -5
- package/src/lib/testing/stubs/services/utilities.service.stub.ts +0 -7
- package/src/lib/testing/stubs/stacked-area.component.stub.ts +0 -13
- package/src/lib/testing/stubs/x-axis.stub.ts +0 -10
- package/src/lib/testing/stubs/xy-axis.class.stub.ts +0 -20
- package/src/lib/testing/stubs/xy-axis.stub.ts +0 -44
- package/src/lib/testing/stubs/xy-chart.component.stub.ts +0 -5
- package/src/lib/testing/stubs/xy-data-marks.stub.ts +0 -15
- package/src/lib/testing/stubs/y-axis.stub.ts +0 -15
- package/src/lib/tooltips/config/tooltip.ts +0 -11
- package/src/lib/tooltips/html-tooltip/config/html-tooltip-builder.ts +0 -134
- package/src/lib/tooltips/html-tooltip/config/html-tooltip-config.ts +0 -21
- package/src/lib/tooltips/html-tooltip/config/html-tooltip-options.ts +0 -12
- package/src/lib/tooltips/html-tooltip/config/position/tooltip-position-builder.ts +0 -191
- package/src/lib/tooltips/html-tooltip/config/position/tooltip-position.ts +0 -42
- package/src/lib/tooltips/html-tooltip/config/size/tooltip-size-builder.ts +0 -75
- package/src/lib/tooltips/html-tooltip/config/size/tooltip-size-options.ts +0 -8
- package/src/lib/tooltips/html-tooltip/config/size/tooltip-size.ts +0 -15
- package/src/lib/tooltips/html-tooltip/html-tooltip.directive.spec.ts +0 -537
- package/src/lib/tooltips/html-tooltip/html-tooltip.directive.ts +0 -210
- package/src/lib/tooltips/html-tooltip/html-tooltip.module.ts +0 -16
- package/src/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.html +0 -41
- package/src/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.scss +0 -63
- package/src/lib/tooltips/html-tooltip/tooltip-triangle/tooltip-triangle.component.ts +0 -19
- package/src/lib/tooltips/index.ts +0 -11
- package/src/lib/tooltips/svg-tooltip/config/svg-tooltip.ts +0 -5
- package/src/lib/xy-background/index.ts +0 -2
- package/src/lib/xy-background/xy-background.component.html +0 -10
- package/src/lib/xy-background/xy-background.component.scss +0 -0
- package/src/lib/xy-background/xy-background.component.spec.ts +0 -24
- package/src/lib/xy-background/xy-background.component.ts +0 -19
- package/src/lib/xy-background/xy-background.module.ts +0 -8
- package/src/public-api.ts +0 -26
- package/src/test.ts +0 -15
- package/tsconfig.doc.json +0 -4
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -23
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -10
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
-
import { InputEventDirective } from '../../events/input-event.directive';
|
|
4
|
-
|
|
5
|
-
export class InputEventDirectiveStub extends InputEventDirective {
|
|
6
|
-
handleNewEvent(event: any): void {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
import { VicAttributeDataDimensionConfig } from '../../geographies/config/layers/attribute-data-layer/dimensions/attribute-data-bin-types';
|
|
3
|
-
import { MapLegend } from '../../map-legend/map-legend-base';
|
|
4
|
-
|
|
5
|
-
export class MapLegendContentStub<Datum> extends MapLegend<
|
|
6
|
-
Datum,
|
|
7
|
-
VicAttributeDataDimensionConfig<Datum>
|
|
8
|
-
> {
|
|
9
|
-
getValuesFromScale(): number[] {
|
|
10
|
-
return [1, 12];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
getLeftOffset(values: string[]): number {
|
|
14
|
-
return 12;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { VicCategoricalAttributeDataDimensionConfig } from '../../geographies/config/geographies-config';
|
|
2
|
-
|
|
3
|
-
export class MapLegendComponentStub {
|
|
4
|
-
attributeDataConfig = new VicCategoricalAttributeDataDimensionConfig();
|
|
5
|
-
|
|
6
|
-
constructor() {
|
|
7
|
-
this.attributeDataConfig.range = ['red', 'blue'];
|
|
8
|
-
this.attributeDataConfig.domain = ['a', 'b'];
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
|
|
3
|
-
import { MarksOptions } from '../../marks/config/marks-options';
|
|
4
|
-
import { MapPrimaryMarks } from '../../marks/map-marks/map-primary-marks/map-primary-marks';
|
|
5
|
-
|
|
6
|
-
export class MapPrimaryMarksStub<Datum> extends MapPrimaryMarks<
|
|
7
|
-
Datum,
|
|
8
|
-
MarksOptions
|
|
9
|
-
> {
|
|
10
|
-
override setChartScalesFromRanges(useTransition: boolean): void {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
drawMarks(): void {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ordinalAxisMixin } from '../../axes/ordinal/ordinal-axis';
|
|
2
|
-
import { Ticks } from '../../axes/ticks/ticks';
|
|
3
|
-
import { DataValue } from '../../core/types/values';
|
|
4
|
-
import { XyAxisStub } from './xy-axis.stub';
|
|
5
|
-
|
|
6
|
-
export class OrdinalAxisStub<T extends DataValue> extends ordinalAxisMixin(
|
|
7
|
-
XyAxisStub
|
|
8
|
-
)<T, Ticks<T>> {
|
|
9
|
-
setScale(): void {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
setAxisFunction(): void {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
setTranslate(): void {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DataMarksOptions } from '../../marks/config/marks-options';
|
|
2
|
-
import { PrimaryMarks } from '../../marks/primary-marks/primary-marks';
|
|
3
|
-
|
|
4
|
-
export class PrimaryMarksStub<Datum> extends PrimaryMarks<
|
|
5
|
-
Datum,
|
|
6
|
-
DataMarksOptions<Datum>
|
|
7
|
-
> {
|
|
8
|
-
override drawMarks(): void {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
override getTransitionDuration(): number {
|
|
12
|
-
return 0;
|
|
13
|
-
}
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
override setChartScalesFromRanges(useTransition: boolean): void {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { quantitativeAxisMixin } from '../../axes/quantitative/quantitative-axis';
|
|
2
|
-
import { Ticks } from '../../axes/ticks/ticks';
|
|
3
|
-
import { DataValue } from '../../core/types/values';
|
|
4
|
-
import { XyAxisStub } from './xy-axis.stub';
|
|
5
|
-
|
|
6
|
-
export class QuantitativeAxisStub<
|
|
7
|
-
T extends DataValue,
|
|
8
|
-
> extends quantitativeAxisMixin(XyAxisStub)<T, Ticks<T>> {
|
|
9
|
-
setScale(): void {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
setAxisFunction() {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
setTranslate(): void {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { Ticks } from '../../axes/ticks/ticks';
|
|
3
|
-
import { xAxisMixin } from '../../axes/x/x-axis';
|
|
4
|
-
import { DataValue } from '../../core/types/values';
|
|
5
|
-
import { XyAxisStub } from './xy-axis.stub';
|
|
6
|
-
|
|
7
|
-
export class XAxisStub<T extends DataValue> extends xAxisMixin(XyAxisStub)<
|
|
8
|
-
T,
|
|
9
|
-
Ticks<T>
|
|
10
|
-
> {}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { XyAxisElement } from '../../xy-chart-space/xy-axis.class';
|
|
3
|
-
|
|
4
|
-
export class XyAxisElementStub extends XyAxisElement {
|
|
5
|
-
setAxisFunction() {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
initNumTicks(): number {
|
|
9
|
-
return 10;
|
|
10
|
-
}
|
|
11
|
-
subscribeToScale(): void {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
getAxisFunction(): any {
|
|
15
|
-
return {};
|
|
16
|
-
}
|
|
17
|
-
setTranslate(): void {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { Observable, of } from 'rxjs';
|
|
3
|
-
import { XyAxis, XyAxisScale } from '../../axes/base/xy-axis-base';
|
|
4
|
-
import { Ticks } from '../../axes/ticks/ticks';
|
|
5
|
-
import { DataValue } from '../../core/types/values';
|
|
6
|
-
|
|
7
|
-
export class XyAxisStub<
|
|
8
|
-
T extends DataValue,
|
|
9
|
-
TicksConfig extends Ticks<T>,
|
|
10
|
-
> extends XyAxis<T, TicksConfig> {
|
|
11
|
-
getBaselineTranslate(): string | null {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
createLabel(): void {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19
|
-
setTicks(tickFormat: string | ((value: T) => string)): void {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
setScale(): void {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
getScale(): Observable<XyAxisScale> {
|
|
26
|
-
return of({ scale: 'scale', useTransition: false } as any);
|
|
27
|
-
}
|
|
28
|
-
setAxisFunction() {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
32
|
-
setAxis(axisFunction: any): void {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
initNumTicks(): number {
|
|
36
|
-
return 10;
|
|
37
|
-
}
|
|
38
|
-
getAxisFunction(): any {
|
|
39
|
-
return {};
|
|
40
|
-
}
|
|
41
|
-
setTranslate(): void {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PrimaryMarksConfig } from '../../marks/primary-marks/config/primary-marks-config';
|
|
2
|
-
import { VicXyPrimaryMarks } from '../../marks/xy-marks/xy-primary-marks/xy-primary-marks';
|
|
3
|
-
|
|
4
|
-
export class XyPrimaryMarksStub<Datum> extends VicXyPrimaryMarks<
|
|
5
|
-
Datum,
|
|
6
|
-
PrimaryMarksConfig<Datum>
|
|
7
|
-
> {
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
-
override setChartScalesFromRanges(useTransition: boolean): void {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
override drawMarks(): void {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { XyAxis } from '../../axes/base/xy-axis-base';
|
|
3
|
-
import { Ticks } from '../../axes/ticks/ticks';
|
|
4
|
-
import { yAxisMixin } from '../../axes/y/y-axis';
|
|
5
|
-
import { DataValue } from '../../core/types/values';
|
|
6
|
-
|
|
7
|
-
export class YAxisStub<
|
|
8
|
-
T extends DataValue,
|
|
9
|
-
TicksConfig extends Ticks<T>,
|
|
10
|
-
> extends yAxisMixin(XyAxis)<T, TicksConfig> {
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
-
setAxis(axisFunction: any): void {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { ElementRef, Injectable } from '@angular/core';
|
|
2
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
3
|
-
import { InteractionOutput } from '../../../events/interaction-output';
|
|
4
|
-
import { HtmlTooltipConfig } from './html-tooltip-config';
|
|
5
|
-
import { HtmlTooltipCdkManagedPosition } from './position/tooltip-position';
|
|
6
|
-
import { HtmlTooltipSizeBuilder } from './size/tooltip-size-builder';
|
|
7
|
-
|
|
8
|
-
const DEFAULT = {
|
|
9
|
-
_minWidth: 300,
|
|
10
|
-
_applyEventsDisabledClass: true,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
@Injectable()
|
|
14
|
-
export class VicHtmlTooltipConfigBuilder {
|
|
15
|
-
private _applyEventsDisabledClass: boolean;
|
|
16
|
-
private sizeBuilder: HtmlTooltipSizeBuilder;
|
|
17
|
-
private _panelClass: string | string[];
|
|
18
|
-
private _origin: ElementRef<Element>;
|
|
19
|
-
private _hasBackdrop: boolean;
|
|
20
|
-
private _position: HtmlTooltipCdkManagedPosition;
|
|
21
|
-
private _show: boolean;
|
|
22
|
-
|
|
23
|
-
constructor() {
|
|
24
|
-
safeAssign(this, DEFAULT);
|
|
25
|
-
this.sizeBuilder = new HtmlTooltipSizeBuilder();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* OPTIONAL. If set to true, the tooltip will have the class 'events-disabled' that can be used to disable pointer events.
|
|
30
|
-
* This is useful when the tooltip should not interfere with user interactions, such as when it is used for informational purposes only.
|
|
31
|
-
*
|
|
32
|
-
* Default is true, meaning the class will be applied.
|
|
33
|
-
*
|
|
34
|
-
* @param apply - Whether to apply the events-disabled class or not.
|
|
35
|
-
*/
|
|
36
|
-
applyEventsDisabledClass(apply: boolean): this {
|
|
37
|
-
this._applyEventsDisabledClass = apply;
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* OPTIONAL. Will create a Material CDK-provided backdrop if set to true. Clicking on the backdrop will dismiss the backdrop and emit an event.
|
|
43
|
-
*
|
|
44
|
-
* @param hasBackdrop - Whether to show a backdrop or not.
|
|
45
|
-
*/
|
|
46
|
-
hasBackdrop(hasBackdrop: boolean): this {
|
|
47
|
-
this._hasBackdrop = hasBackdrop;
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* OPTIONAL. Sets CSS classes to apply to the tooltip panel.
|
|
53
|
-
*
|
|
54
|
-
* @param panelClass - CSS class name(s) to apply to the tooltip panel.
|
|
55
|
-
*/
|
|
56
|
-
panelClass(panelClass: string | string[]): this {
|
|
57
|
-
this._panelClass = panelClass;
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Sets the origin and position of the tooltip based on the output from a BaseInteractionOutput.
|
|
63
|
-
*
|
|
64
|
-
* @param origin - The origin element reference.
|
|
65
|
-
* @param position - Optional position configuration. If not provided, the default position from the output will be used. Note that the output has several methods to return a position that can be used here.
|
|
66
|
-
*/
|
|
67
|
-
positionFromOutput(
|
|
68
|
-
// intentionally using InteractionOutput<unknown> to allow flexibility in the type of output
|
|
69
|
-
output: InteractionOutput<unknown>,
|
|
70
|
-
position?: HtmlTooltipCdkManagedPosition
|
|
71
|
-
): this {
|
|
72
|
-
if (output) {
|
|
73
|
-
this._origin = new ElementRef(output.origin);
|
|
74
|
-
this._position = position || output?.defaultPosition;
|
|
75
|
-
}
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Sets whether the tooltip should be shown or not.
|
|
81
|
-
*
|
|
82
|
-
* @param show - Whether to show the tooltip or not.
|
|
83
|
-
*/
|
|
84
|
-
show(show: boolean): this {
|
|
85
|
-
this._show = show;
|
|
86
|
-
return this;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
size(size: null): this;
|
|
90
|
-
size(size: (size: HtmlTooltipSizeBuilder) => void): this;
|
|
91
|
-
size(size: ((size: HtmlTooltipSizeBuilder) => void) | null): this {
|
|
92
|
-
if (size === null) {
|
|
93
|
-
this.sizeBuilder = undefined;
|
|
94
|
-
return this;
|
|
95
|
-
}
|
|
96
|
-
this.initSizeBuilder();
|
|
97
|
-
size(this.sizeBuilder);
|
|
98
|
-
return this;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
private initSizeBuilder(): void {
|
|
102
|
-
this.sizeBuilder = new HtmlTooltipSizeBuilder();
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
getConfig(): HtmlTooltipConfig {
|
|
106
|
-
this.validateBuilder();
|
|
107
|
-
return new HtmlTooltipConfig({
|
|
108
|
-
hasBackdrop: this._hasBackdrop,
|
|
109
|
-
panelClass: this.getPanelClasses(),
|
|
110
|
-
origin: this._origin,
|
|
111
|
-
position: this._position,
|
|
112
|
-
show: this._show,
|
|
113
|
-
size: this.sizeBuilder._build(),
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
private validateBuilder(): void {
|
|
118
|
-
if (!this.sizeBuilder) {
|
|
119
|
-
this.initSizeBuilder();
|
|
120
|
-
}
|
|
121
|
-
if (this._show && !this._position) {
|
|
122
|
-
throw new Error('Position must be set using positionFromOutput');
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
private getPanelClasses(): string[] {
|
|
127
|
-
const userClasses = this._panelClass ? [this._panelClass].flat() : [];
|
|
128
|
-
const panelClasses = ['vic-html-tooltip-overlay', ...userClasses].flat();
|
|
129
|
-
if (this._applyEventsDisabledClass) {
|
|
130
|
-
panelClasses.push('events-disabled');
|
|
131
|
-
}
|
|
132
|
-
return panelClasses;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { safeAssign } from '@mathstack/app-kit';
|
|
3
|
-
import { Tooltip } from '../../config/tooltip';
|
|
4
|
-
import { HtmlTooltipOptions } from './html-tooltip-options';
|
|
5
|
-
import { HtmlTooltipCdkManagedPosition } from './position/tooltip-position';
|
|
6
|
-
import { HtmlTooltipSize } from './size/tooltip-size';
|
|
7
|
-
|
|
8
|
-
export class HtmlTooltipConfig extends Tooltip implements HtmlTooltipOptions {
|
|
9
|
-
override type: 'html';
|
|
10
|
-
applyEventsDisabledClass: boolean;
|
|
11
|
-
hasBackdrop: boolean;
|
|
12
|
-
origin: ElementRef<Element>;
|
|
13
|
-
panelClass: string[];
|
|
14
|
-
position: HtmlTooltipCdkManagedPosition;
|
|
15
|
-
size: HtmlTooltipSize;
|
|
16
|
-
|
|
17
|
-
constructor(options: HtmlTooltipOptions) {
|
|
18
|
-
super();
|
|
19
|
-
safeAssign(this, options);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { HtmlTooltipCdkManagedPosition } from './position/tooltip-position';
|
|
3
|
-
import { HtmlTooltipSize } from './size/tooltip-size';
|
|
4
|
-
|
|
5
|
-
export interface HtmlTooltipOptions {
|
|
6
|
-
hasBackdrop: boolean;
|
|
7
|
-
origin: ElementRef<Element>;
|
|
8
|
-
panelClass: string | string[];
|
|
9
|
-
position: HtmlTooltipCdkManagedPosition;
|
|
10
|
-
size: HtmlTooltipSize;
|
|
11
|
-
show: boolean;
|
|
12
|
-
}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
2
|
-
import { TooltipPosition, TooltipPositionConfig } from './tooltip-position';
|
|
3
|
-
|
|
4
|
-
// Primarily used internally in the library, though a user could use it to make custom positions
|
|
5
|
-
|
|
6
|
-
export class TooltipPositionBuilder {
|
|
7
|
-
private originX?: TooltipPositionConfig['originX'];
|
|
8
|
-
private originY?: TooltipPositionConfig['originY'];
|
|
9
|
-
private overlayX: TooltipPositionConfig['overlayX'] = 'center';
|
|
10
|
-
private overlayY: TooltipPositionConfig['overlayY'] = 'bottom';
|
|
11
|
-
private currentOffsetX = 0;
|
|
12
|
-
private currentOffsetY = 0;
|
|
13
|
-
private additionalConfig: Partial<ConnectedPosition> = {};
|
|
14
|
-
|
|
15
|
-
// From methods - set origin
|
|
16
|
-
fromTopLeft(): this {
|
|
17
|
-
this.originX = 'start';
|
|
18
|
-
this.originY = 'top';
|
|
19
|
-
return this;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
fromTopCenter(): this {
|
|
23
|
-
this.originX = 'center';
|
|
24
|
-
this.originY = 'top';
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
fromTopRight(): this {
|
|
29
|
-
this.originX = 'end';
|
|
30
|
-
this.originY = 'top';
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
fromCenterLeft(): this {
|
|
35
|
-
this.originX = 'start';
|
|
36
|
-
this.originY = 'center';
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
fromCenter(): this {
|
|
41
|
-
this.originX = 'center';
|
|
42
|
-
this.originY = 'center';
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
fromCenterRight(): this {
|
|
47
|
-
this.originX = 'end';
|
|
48
|
-
this.originY = 'center';
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
fromBottomLeft(): this {
|
|
53
|
-
this.originX = 'start';
|
|
54
|
-
this.originY = 'bottom';
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
fromBottomCenter(): this {
|
|
59
|
-
this.originX = 'center';
|
|
60
|
-
this.originY = 'bottom';
|
|
61
|
-
return this;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
fromBottomRight(): this {
|
|
65
|
-
this.originX = 'end';
|
|
66
|
-
this.originY = 'bottom';
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Attach methods - set overlay
|
|
71
|
-
attachTopLeft(): this {
|
|
72
|
-
this.overlayX = 'start';
|
|
73
|
-
this.overlayY = 'top';
|
|
74
|
-
this.additionalConfig = { panelClass: 'position-top-left' };
|
|
75
|
-
return this;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
attachTopCenter(): this {
|
|
79
|
-
this.overlayX = 'center';
|
|
80
|
-
this.overlayY = 'top';
|
|
81
|
-
this.additionalConfig = { panelClass: 'position-top-center' };
|
|
82
|
-
return this;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
attachTopRight(): this {
|
|
86
|
-
this.overlayX = 'end';
|
|
87
|
-
this.overlayY = 'top';
|
|
88
|
-
this.additionalConfig = { panelClass: 'position-top-right' };
|
|
89
|
-
return this;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
attachCenterLeft(): this {
|
|
93
|
-
this.overlayX = 'start';
|
|
94
|
-
this.overlayY = 'center';
|
|
95
|
-
this.additionalConfig = { panelClass: 'position-center-left' };
|
|
96
|
-
return this;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
attachCenter(): this {
|
|
100
|
-
this.overlayX = 'center';
|
|
101
|
-
this.overlayY = 'center';
|
|
102
|
-
this.additionalConfig = { panelClass: 'position-center' };
|
|
103
|
-
return this;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
attachCenterRight(): this {
|
|
107
|
-
this.overlayX = 'end';
|
|
108
|
-
this.overlayY = 'center';
|
|
109
|
-
this.additionalConfig = { panelClass: 'position-center-right' };
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
attachBottomLeft(): this {
|
|
114
|
-
this.overlayX = 'start';
|
|
115
|
-
this.overlayY = 'bottom';
|
|
116
|
-
this.additionalConfig = { panelClass: 'position-bottom-left' };
|
|
117
|
-
return this;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
attachBottomCenter(): this {
|
|
121
|
-
this.overlayX = 'center';
|
|
122
|
-
this.overlayY = 'bottom';
|
|
123
|
-
this.additionalConfig = { panelClass: 'position-bottom-center' };
|
|
124
|
-
return this;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
attachBottomRight(): this {
|
|
128
|
-
this.overlayX = 'end';
|
|
129
|
-
this.overlayY = 'bottom';
|
|
130
|
-
this.additionalConfig = { panelClass: 'position-bottom-right' };
|
|
131
|
-
return this;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Offset method
|
|
135
|
-
offset(offsetX: number, offsetY: number): this {
|
|
136
|
-
this.currentOffsetX = offsetX;
|
|
137
|
-
this.currentOffsetY = offsetY;
|
|
138
|
-
return this;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Additional config
|
|
142
|
-
withConfig(config: Partial<ConnectedPosition>): this {
|
|
143
|
-
this.additionalConfig = { ...this.additionalConfig, ...config };
|
|
144
|
-
return this;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Build the position
|
|
148
|
-
getPosition(): TooltipPosition {
|
|
149
|
-
if (!this.originX || !this.originY) {
|
|
150
|
-
throw new Error('Origin position must be set using a from* method');
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return new TooltipPosition({
|
|
154
|
-
originX: this.originX,
|
|
155
|
-
originY: this.originY,
|
|
156
|
-
overlayX: this.overlayX,
|
|
157
|
-
overlayY: this.overlayY,
|
|
158
|
-
offsetX: this.currentOffsetX,
|
|
159
|
-
offsetY: this.currentOffsetY,
|
|
160
|
-
...this.additionalConfig,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// Reset builder for reuse
|
|
165
|
-
reset(): this {
|
|
166
|
-
this.originX = undefined;
|
|
167
|
-
this.originY = undefined;
|
|
168
|
-
this.overlayX = 'center';
|
|
169
|
-
this.overlayY = 'bottom';
|
|
170
|
-
this.currentOffsetX = 0;
|
|
171
|
-
this.currentOffsetY = 0;
|
|
172
|
-
this.additionalConfig = {};
|
|
173
|
-
return this;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// Utility method for applying offsets to multiple positions
|
|
177
|
-
applyOffsets(
|
|
178
|
-
positions: TooltipPosition[],
|
|
179
|
-
offsetX: number,
|
|
180
|
-
offsetY: number
|
|
181
|
-
): TooltipPosition[] {
|
|
182
|
-
return positions.map(
|
|
183
|
-
(pos) =>
|
|
184
|
-
new TooltipPosition({
|
|
185
|
-
...pos,
|
|
186
|
-
offsetX: (pos.offsetX || 0) + offsetX,
|
|
187
|
-
offsetY: (pos.offsetY || 0) + offsetY,
|
|
188
|
-
})
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
}
|