@buildcanada/charts 0.3.5 → 0.3.7
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/package.json +1 -1
- package/src/components/GrapherTabIcon.tsx +1 -1
- package/src/components/GrapherTrendArrow.tsx +1 -1
- package/src/components/Halo/Halo.tsx +1 -1
- package/src/components/LabeledSwitch/LabeledSwitch.tsx +1 -1
- package/src/components/MarkdownTextWrap/MarkdownTextWrap.tsx +4 -4
- package/src/components/OverlayHeader.tsx +1 -1
- package/src/components/SimpleMarkdownText.tsx +1 -1
- package/src/components/TextWrap/TextWrap.tsx +2 -2
- package/src/components/index.ts +23 -23
- package/src/components/loadingIndicator/LoadingIndicator.tsx +1 -1
- package/src/config/ChartsProvider.tsx +1 -1
- package/src/config/index.ts +2 -2
- package/src/core-table/ChartsTable.ts +7 -7
- package/src/core-table/CoreTable.ts +6 -6
- package/src/core-table/CoreTableColumns.ts +5 -5
- package/src/core-table/CoreTableUtils.ts +3 -3
- package/src/core-table/ErrorValues.ts +1 -1
- package/src/core-table/TableSynthesizers.ts +3 -3
- package/src/core-table/TableUtil.ts +2 -2
- package/src/core-table/Transforms.ts +3 -3
- package/src/core-table/index.ts +8 -8
- package/src/explorer/ColumnGrammar.ts +4 -4
- package/src/explorer/Explorer.sample.ts +4 -4
- package/src/explorer/Explorer.tsx +10 -10
- package/src/explorer/ExplorerConstants.ts +2 -2
- package/src/explorer/ExplorerControls.tsx +4 -4
- package/src/explorer/ExplorerDecisionMatrix.ts +7 -7
- package/src/explorer/ExplorerGrammar.ts +4 -4
- package/src/explorer/ExplorerProgram.ts +11 -11
- package/src/explorer/ExplorerUtils.ts +4 -4
- package/src/explorer/GrapherGrammar.ts +3 -3
- package/src/explorer/gridLang/GridCell.ts +4 -4
- package/src/explorer/gridLang/GridLangConstants.ts +1 -1
- package/src/explorer/gridLang/GridProgram.ts +5 -5
- package/src/explorer/index.ts +15 -15
- package/src/explorer/urlMigrations/CO2UrlMigration.ts +3 -3
- package/src/explorer/urlMigrations/CovidUrlMigration.ts +2 -2
- package/src/explorer/urlMigrations/EnergyUrlMigration.ts +3 -3
- package/src/explorer/urlMigrations/ExplorerPageUrlMigrationSpec.ts +1 -1
- package/src/explorer/urlMigrations/ExplorerUrlMigrationUtils.ts +2 -2
- package/src/explorer/urlMigrations/ExplorerUrlMigrations.ts +5 -5
- package/src/explorer/urlMigrations/LegacyCovidUrlMigration.ts +4 -4
- package/src/grapher/axis/Axis.ts +8 -8
- package/src/grapher/axis/AxisConfig.ts +4 -4
- package/src/grapher/axis/AxisViews.tsx +6 -6
- package/src/grapher/barCharts/DiscreteBarChart.tsx +17 -17
- package/src/grapher/barCharts/DiscreteBarChartConstants.ts +6 -6
- package/src/grapher/barCharts/DiscreteBarChartHelpers.ts +3 -3
- package/src/grapher/barCharts/DiscreteBarChartState.ts +13 -13
- package/src/grapher/barCharts/DiscreteBarChartThumbnail.tsx +4 -4
- package/src/grapher/captionedChart/CaptionedChart.tsx +19 -19
- package/src/grapher/captionedChart/Logos.tsx +3 -3
- package/src/grapher/captionedChart/StaticChartRasterizer.tsx +1 -1
- package/src/grapher/chart/Chart.tsx +5 -5
- package/src/grapher/chart/ChartAreaContent.tsx +10 -10
- package/src/grapher/chart/ChartDimension.ts +2 -2
- package/src/grapher/chart/ChartInterface.ts +7 -7
- package/src/grapher/chart/ChartManager.ts +9 -9
- package/src/grapher/chart/ChartTabs.ts +1 -1
- package/src/grapher/chart/ChartTypeMap.tsx +31 -31
- package/src/grapher/chart/ChartTypeSwitcher.tsx +1 -1
- package/src/grapher/chart/ChartUtils.tsx +10 -10
- package/src/grapher/chart/DimensionSlot.ts +3 -3
- package/src/grapher/chart/StaticChartWrapper.tsx +5 -5
- package/src/grapher/chart/guidedChartUtils.ts +4 -4
- package/src/grapher/color/BinningStrategies.ts +4 -4
- package/src/grapher/color/BinningStrategyEqualSizeBins.ts +3 -3
- package/src/grapher/color/BinningStrategyLogarithmic.ts +3 -3
- package/src/grapher/color/CategoricalColorAssigner.ts +3 -3
- package/src/grapher/color/ColorBrewerSchemes.ts +1 -1
- package/src/grapher/color/ColorScale.ts +9 -9
- package/src/grapher/color/ColorScaleBin.ts +2 -2
- package/src/grapher/color/ColorScaleConfig.ts +3 -3
- package/src/grapher/color/ColorScheme.ts +3 -3
- package/src/grapher/color/ColorSchemes.ts +4 -4
- package/src/grapher/color/ColorUtils.ts +1 -1
- package/src/grapher/color/CustomSchemes.ts +2 -2
- package/src/grapher/comparisonLine/ComparisonLine.tsx +5 -5
- package/src/grapher/comparisonLine/ComparisonLineGenerator.ts +1 -1
- package/src/grapher/comparisonLine/ComparisonLineHelpers.ts +1 -1
- package/src/grapher/comparisonLine/CustomComparisonLine.tsx +8 -8
- package/src/grapher/comparisonLine/VerticalComparisonLine.tsx +5 -5
- package/src/grapher/controls/ActionButtons.tsx +4 -4
- package/src/grapher/controls/CommandPalette.tsx +1 -1
- package/src/grapher/controls/ContentSwitchers.tsx +4 -4
- package/src/grapher/controls/DataTableFilterDropdown.tsx +7 -7
- package/src/grapher/controls/DataTableSearchField.tsx +4 -4
- package/src/grapher/controls/Dropdown.tsx +1 -1
- package/src/grapher/controls/EntitySelectionToggle.tsx +1 -1
- package/src/grapher/controls/MapRegionDropdown.tsx +5 -5
- package/src/grapher/controls/MapResetButton.tsx +3 -3
- package/src/grapher/controls/MapZoomDropdown.tsx +5 -5
- package/src/grapher/controls/MapZoomToSelectionButton.tsx +3 -3
- package/src/grapher/controls/SearchField.tsx +1 -1
- package/src/grapher/controls/SettingsMenu.tsx +14 -14
- package/src/grapher/controls/ShareMenu.tsx +4 -4
- package/src/grapher/controls/SortIcon.tsx +1 -1
- package/src/grapher/controls/controlsRow/ControlsRow.tsx +11 -11
- package/src/grapher/controls/entityPicker/EntityPicker.tsx +7 -7
- package/src/grapher/controls/entityPicker/EntityPickerConstants.ts +5 -5
- package/src/grapher/controls/globalEntitySelector/GlobalEntitySelector.tsx +7 -7
- package/src/grapher/controls/settings/AbsRelToggle.tsx +2 -2
- package/src/grapher/controls/settings/AxisScaleToggle.tsx +2 -2
- package/src/grapher/controls/settings/FacetStrategySelector.tsx +2 -2
- package/src/grapher/controls/settings/FacetYDomainToggle.tsx +3 -3
- package/src/grapher/controls/settings/NoDataAreaToggle.tsx +1 -1
- package/src/grapher/controls/settings/ZoomToggle.tsx +1 -1
- package/src/grapher/core/EntitiesByRegionType.ts +3 -3
- package/src/grapher/core/EntityCodes.ts +2 -2
- package/src/grapher/core/EntityUrlBuilder.ts +3 -3
- package/src/grapher/core/FetchingGrapher.tsx +8 -8
- package/src/grapher/core/Grapher.tsx +20 -20
- package/src/grapher/core/GrapherAnalytics.ts +1 -1
- package/src/grapher/core/GrapherConstants.ts +3 -3
- package/src/grapher/core/GrapherState.tsx +38 -38
- package/src/grapher/core/GrapherUrl.ts +4 -4
- package/src/grapher/core/GrapherUrlMigrations.ts +2 -2
- package/src/grapher/core/GrapherUseHelpers.tsx +5 -5
- package/src/grapher/core/LegacyToChartsTable.ts +5 -5
- package/src/grapher/core/grapher.entry.ts +1 -1
- package/src/grapher/core/loadGrapherTableHelpers.ts +4 -4
- package/src/grapher/core/loadVariable.ts +2 -2
- package/src/grapher/core/relatedQuestion.ts +1 -1
- package/src/grapher/dataTable/DataTable.sample.ts +5 -5
- package/src/grapher/dataTable/DataTable.tsx +10 -10
- package/src/grapher/dataTable/DataTableConstants.ts +5 -5
- package/src/grapher/entitySelector/EntitySelector.tsx +15 -15
- package/src/grapher/facet/FacetChart.tsx +19 -19
- package/src/grapher/facet/FacetChartConstants.ts +4 -4
- package/src/grapher/facet/FacetChartUtils.ts +1 -1
- package/src/grapher/facet/FacetMap.tsx +15 -15
- package/src/grapher/facet/FacetMapConstants.ts +4 -4
- package/src/grapher/focus/FocusArray.ts +2 -2
- package/src/grapher/footer/Footer.tsx +7 -7
- package/src/grapher/footer/FooterManager.ts +4 -4
- package/src/grapher/fullScreen/FullScreen.tsx +2 -2
- package/src/grapher/header/Header.tsx +6 -6
- package/src/grapher/header/HeaderManager.ts +2 -2
- package/src/grapher/index.ts +57 -57
- package/src/grapher/legend/HorizontalColorLegends.tsx +7 -7
- package/src/grapher/legend/LegendInteractionState.ts +1 -1
- package/src/grapher/legend/VerticalColorLegend.tsx +6 -6
- package/src/grapher/lineCharts/LineChart.tsx +26 -26
- package/src/grapher/lineCharts/LineChartConstants.ts +8 -8
- package/src/grapher/lineCharts/LineChartHelpers.ts +7 -7
- package/src/grapher/lineCharts/LineChartState.ts +17 -17
- package/src/grapher/lineCharts/LineChartThumbnail.tsx +15 -15
- package/src/grapher/lineCharts/Lines.tsx +6 -6
- package/src/grapher/lineLegend/LineLegend.tsx +12 -12
- package/src/grapher/lineLegend/LineLegendFilterAlgorithms.ts +2 -2
- package/src/grapher/lineLegend/LineLegendHelpers.ts +3 -3
- package/src/grapher/lineLegend/LineLegendTypes.ts +4 -4
- package/src/grapher/mapCharts/ChoroplethGlobe.tsx +11 -11
- package/src/grapher/mapCharts/ChoroplethMap.tsx +11 -11
- package/src/grapher/mapCharts/GeoFeatures.ts +5 -5
- package/src/grapher/mapCharts/GlobeController.ts +7 -7
- package/src/grapher/mapCharts/MapAnnotationPlacements.ts +2 -2
- package/src/grapher/mapCharts/MapAnnotations.ts +6 -6
- package/src/grapher/mapCharts/MapChart.sample.ts +3 -3
- package/src/grapher/mapCharts/MapChart.tsx +23 -23
- package/src/grapher/mapCharts/MapChartConstants.ts +10 -10
- package/src/grapher/mapCharts/MapChartState.ts +11 -11
- package/src/grapher/mapCharts/MapChartThumbnail.tsx +3 -3
- package/src/grapher/mapCharts/MapComponents.tsx +8 -8
- package/src/grapher/mapCharts/MapConfig.ts +5 -5
- package/src/grapher/mapCharts/MapHelpers.ts +6 -6
- package/src/grapher/mapCharts/MapProjections.ts +2 -2
- package/src/grapher/mapCharts/MapSparkline.tsx +9 -9
- package/src/grapher/mapCharts/MapTooltip.tsx +10 -10
- package/src/grapher/modal/DownloadModal.tsx +9 -9
- package/src/grapher/modal/EmbedModal.tsx +4 -4
- package/src/grapher/modal/EntitySelectorModal.tsx +4 -4
- package/src/grapher/modal/Modal.tsx +2 -2
- package/src/grapher/modal/ModalHeader.tsx +1 -1
- package/src/grapher/modal/SourcesDescriptions.tsx +1 -1
- package/src/grapher/modal/SourcesKeyDataTable.tsx +2 -2
- package/src/grapher/modal/SourcesModal.tsx +10 -10
- package/src/grapher/noDataModal/NoDataModal.tsx +4 -4
- package/src/grapher/scatterCharts/ConnectedScatterLegend.tsx +4 -4
- package/src/grapher/scatterCharts/NoDataSection.tsx +3 -3
- package/src/grapher/scatterCharts/ScatterPlotChart.tsx +27 -27
- package/src/grapher/scatterCharts/ScatterPlotChartConstants.ts +10 -10
- package/src/grapher/scatterCharts/ScatterPlotChartState.ts +15 -15
- package/src/grapher/scatterCharts/ScatterPlotChartThumbnail.tsx +12 -12
- package/src/grapher/scatterCharts/ScatterPlotTooltip.tsx +6 -6
- package/src/grapher/scatterCharts/ScatterPoints.tsx +4 -4
- package/src/grapher/scatterCharts/ScatterPointsWithLabels.tsx +11 -11
- package/src/grapher/scatterCharts/ScatterSizeLegend.tsx +7 -7
- package/src/grapher/scatterCharts/ScatterUtils.ts +5 -5
- package/src/grapher/schema/defaultGrapherConfig.ts +1 -1
- package/src/grapher/schema/migrations/helpers.ts +1 -1
- package/src/grapher/schema/migrations/migrate.ts +4 -4
- package/src/grapher/schema/migrations/migrations.ts +2 -2
- package/src/grapher/selection/MapSelectionArray.ts +2 -2
- package/src/grapher/selection/SelectionArray.ts +1 -1
- package/src/grapher/sidePanel/SidePanel.tsx +2 -2
- package/src/grapher/slideInDrawer/SlideInDrawer.tsx +1 -1
- package/src/grapher/slopeCharts/MarkX.tsx +2 -2
- package/src/grapher/slopeCharts/Slope.tsx +3 -3
- package/src/grapher/slopeCharts/SlopeChart.tsx +29 -29
- package/src/grapher/slopeCharts/SlopeChartConstants.ts +6 -6
- package/src/grapher/slopeCharts/SlopeChartHelpers.ts +4 -4
- package/src/grapher/slopeCharts/SlopeChartState.ts +14 -14
- package/src/grapher/slopeCharts/SlopeChartThumbnail.tsx +14 -14
- package/src/grapher/stackedCharts/AbstractStackedChartState.ts +13 -13
- package/src/grapher/stackedCharts/MarimekkoBars.tsx +8 -8
- package/src/grapher/stackedCharts/MarimekkoBarsForOneEntity.tsx +5 -5
- package/src/grapher/stackedCharts/MarimekkoChart.tsx +23 -23
- package/src/grapher/stackedCharts/MarimekkoChartConstants.ts +6 -6
- package/src/grapher/stackedCharts/MarimekkoChartHelpers.ts +3 -3
- package/src/grapher/stackedCharts/MarimekkoChartState.ts +16 -16
- package/src/grapher/stackedCharts/MarimekkoChartThumbnail.tsx +13 -13
- package/src/grapher/stackedCharts/MarimekkoInternalLabels.tsx +4 -4
- package/src/grapher/stackedCharts/StackedAreaChart.tsx +22 -22
- package/src/grapher/stackedCharts/StackedAreaChartState.ts +5 -5
- package/src/grapher/stackedCharts/StackedAreaChartThumbnail.tsx +14 -14
- package/src/grapher/stackedCharts/StackedAreas.tsx +4 -4
- package/src/grapher/stackedCharts/StackedBarChart.tsx +21 -21
- package/src/grapher/stackedCharts/StackedBarChartState.ts +8 -8
- package/src/grapher/stackedCharts/StackedBarChartThumbnail.tsx +14 -14
- package/src/grapher/stackedCharts/StackedBarSegment.tsx +3 -3
- package/src/grapher/stackedCharts/StackedBars.tsx +6 -6
- package/src/grapher/stackedCharts/StackedConstants.ts +6 -6
- package/src/grapher/stackedCharts/StackedDiscreteBarChart.tsx +14 -14
- package/src/grapher/stackedCharts/StackedDiscreteBarChartState.ts +13 -13
- package/src/grapher/stackedCharts/StackedDiscreteBarChartThumbnail.tsx +4 -4
- package/src/grapher/stackedCharts/StackedDiscreteBars.tsx +15 -15
- package/src/grapher/stackedCharts/StackedUtils.ts +3 -3
- package/src/grapher/tabs/TabsWithDropdown.tsx +1 -1
- package/src/grapher/testData/TestData.sample.ts +5 -5
- package/src/grapher/testData/TestData.ts +2 -2
- package/src/grapher/timeline/TimelineComponent.tsx +4 -4
- package/src/grapher/timeline/TimelineController.ts +2 -2
- package/src/grapher/tooltip/Tooltip.tsx +5 -5
- package/src/grapher/tooltip/TooltipContents.tsx +6 -6
- package/src/grapher/tooltip/TooltipProps.ts +1 -1
- package/src/grapher/tooltip/TooltipState.ts +2 -2
- package/src/grapher/verticalLabels/VerticalLabels.tsx +3 -3
- package/src/grapher/verticalLabels/VerticalLabelsState.ts +2 -2
- package/src/index.ts +55 -55
- package/src/types/Origin.ts +1 -1
- package/src/types/Variable.ts +3 -3
- package/src/types/VariableDisplayConfigInterface.ts +2 -2
- package/src/types/domainTypes/ContentGraph.ts +2 -2
- package/src/types/domainTypes/CoreTableTypes.ts +5 -5
- package/src/types/domainTypes/Posts.ts +4 -4
- package/src/types/domainTypes/Search.ts +2 -2
- package/src/types/domainTypes/Various.ts +1 -1
- package/src/types/gdocTypes/Gdoc.ts +2 -2
- package/src/types/grapherTypes/GrapherTypes.ts +9 -9
- package/src/types/index.ts +15 -15
- package/src/utils/Bounds.ts +2 -2
- package/src/utils/FuzzySearch.ts +1 -1
- package/src/utils/TimeBounds.ts +2 -2
- package/src/utils/Util.ts +3 -3
- package/src/utils/Variable.ts +2 -2
- package/src/utils/archival/archivalDate.ts +2 -2
- package/src/utils/formatValue.ts +2 -2
- package/src/utils/grapherConfigUtils.ts +2 -2
- package/src/utils/image.ts +2 -2
- package/src/utils/index.ts +27 -27
- package/src/utils/metadataHelpers.ts +4 -4
- package/src/utils/regions.ts +2 -2
- package/src/utils/urls/Url.ts +3 -3
- package/src/utils/urls/UrlMigration.ts +1 -1
- package/src/utils/urls/UrlUtils.ts +2 -2
|
@@ -11,26 +11,26 @@ import {
|
|
|
11
11
|
dyFromAlign,
|
|
12
12
|
exposeInstanceOnWindow,
|
|
13
13
|
bind,
|
|
14
|
-
} from "../../utils/index.
|
|
14
|
+
} from "../../utils/index.js"
|
|
15
15
|
import { action, computed, makeObservable } from "mobx"
|
|
16
16
|
import { observer } from "mobx-react"
|
|
17
|
-
import { ScaleType, SeriesName, VerticalAlign } from "../../types/index.
|
|
17
|
+
import { ScaleType, SeriesName, VerticalAlign } from "../../types/index.js"
|
|
18
18
|
import {
|
|
19
19
|
BASE_FONT_SIZE,
|
|
20
20
|
DEFAULT_GRAPHER_BOUNDS,
|
|
21
21
|
GRAPHER_FONT_SCALE_12,
|
|
22
22
|
GRAPHER_OPACITY_MUTE,
|
|
23
|
-
} from "../core/GrapherConstants"
|
|
23
|
+
} from "../core/GrapherConstants.js"
|
|
24
24
|
import {
|
|
25
25
|
HorizontalAxisComponent,
|
|
26
26
|
HorizontalAxisGridLines,
|
|
27
27
|
HorizontalAxisZeroLine,
|
|
28
|
-
} from "../axis/AxisViews"
|
|
29
|
-
import { AxisConfig } from "../axis/AxisConfig"
|
|
30
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
31
|
-
import { ChartsTable, CoreColumn } from "../../core-table/index.
|
|
32
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
33
|
-
import { TooltipFooterIcon } from "../tooltip/TooltipProps.
|
|
28
|
+
} from "../axis/AxisViews.js"
|
|
29
|
+
import { AxisConfig } from "../axis/AxisConfig.js"
|
|
30
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
31
|
+
import { ChartsTable, CoreColumn } from "../../core-table/index.js"
|
|
32
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
33
|
+
import { TooltipFooterIcon } from "../tooltip/TooltipProps.js"
|
|
34
34
|
import {
|
|
35
35
|
Tooltip,
|
|
36
36
|
TooltipState,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
makeTooltipRoundingNotice,
|
|
39
39
|
makeTooltipToleranceNotice,
|
|
40
40
|
toTooltipTableColumns,
|
|
41
|
-
} from "../tooltip/Tooltip"
|
|
41
|
+
} from "../tooltip/Tooltip.js"
|
|
42
42
|
import {
|
|
43
43
|
Bar,
|
|
44
44
|
BAR_OPACITY,
|
|
@@ -46,13 +46,13 @@ import {
|
|
|
46
46
|
SizedItem,
|
|
47
47
|
StackedPoint,
|
|
48
48
|
StackedSeries,
|
|
49
|
-
} from "./StackedConstants"
|
|
50
|
-
import { isDarkColor } from "../color/ColorUtils"
|
|
51
|
-
import { HorizontalAxis } from "../axis/Axis"
|
|
49
|
+
} from "./StackedConstants.js"
|
|
50
|
+
import { isDarkColor } from "../color/ColorUtils.js"
|
|
51
|
+
import { HorizontalAxis } from "../axis/Axis.js"
|
|
52
52
|
import { HashMap, NodeGroup } from "react-move"
|
|
53
53
|
import { easeQuadOut } from "d3-ease"
|
|
54
|
-
import { StackedDiscreteBarChartState } from "./StackedDiscreteBarChartState"
|
|
55
|
-
import { enrichSeriesWithLabels } from "../barCharts/DiscreteBarChartHelpers.
|
|
54
|
+
import { StackedDiscreteBarChartState } from "./StackedDiscreteBarChartState.js"
|
|
55
|
+
import { enrichSeriesWithLabels } from "../barCharts/DiscreteBarChartHelpers.js"
|
|
56
56
|
|
|
57
57
|
const BAR_SPACING_FACTOR = 0.35
|
|
58
58
|
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
rollingMap,
|
|
8
8
|
omitUndefinedValues,
|
|
9
9
|
AxisConfigInterface,
|
|
10
|
-
} from "../../utils/index.
|
|
11
|
-
import { StackedPointPositionType, StackedSeries } from "./StackedConstants"
|
|
12
|
-
import { StackedBarChartState } from "./StackedBarChartState.
|
|
10
|
+
} from "../../utils/index.js"
|
|
11
|
+
import { StackedPointPositionType, StackedSeries } from "./StackedConstants.js"
|
|
12
|
+
import { StackedBarChartState } from "./StackedBarChartState.js"
|
|
13
13
|
|
|
14
14
|
// This method shift up the Y Values of a Series with Points in place.
|
|
15
15
|
export const stackSeries = <PositionType extends StackedPointPositionType>(
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "react-aria-components"
|
|
11
11
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
|
12
12
|
import { faEllipsisVertical } from "@fortawesome/free-solid-svg-icons"
|
|
13
|
-
import { TabItem, Tabs } from "./Tabs"
|
|
13
|
+
import { TabItem, Tabs } from "./Tabs.js"
|
|
14
14
|
|
|
15
15
|
export const TabsWithDropdown = <TabKey extends string = string>({
|
|
16
16
|
items,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { DimensionProperty } from "../../utils/index.
|
|
2
|
-
import { GrapherProgrammaticInterface } from "../core/Grapher"
|
|
3
|
-
import { GrapherState } from "../core/GrapherState"
|
|
1
|
+
import { DimensionProperty } from "../../utils/index.js"
|
|
2
|
+
import { GrapherProgrammaticInterface } from "../core/Grapher.js"
|
|
3
|
+
import { GrapherState } from "../core/GrapherState.js"
|
|
4
4
|
import {
|
|
5
5
|
TestData,
|
|
6
6
|
TestMetadata,
|
|
7
7
|
createTestDataset,
|
|
8
8
|
fakeEntities,
|
|
9
|
-
} from "../testData/TestData"
|
|
10
|
-
import { legacyToChartsTableAndDimensionsWithMandatorySlug } from "../core/LegacyToChartsTable.
|
|
9
|
+
} from "../testData/TestData.js"
|
|
10
|
+
import { legacyToChartsTableAndDimensionsWithMandatorySlug } from "../core/LegacyToChartsTable.js"
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Comprehensive life expectancy test data covering:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
|
-
import { Region, regions } from "../../utils/index.
|
|
2
|
+
import { Region, regions } from "../../utils/index.js"
|
|
3
3
|
import {
|
|
4
4
|
MultipleVariableDataDimensionsMap,
|
|
5
5
|
VariableWithSource,
|
|
6
6
|
EntityCode,
|
|
7
7
|
EntityId,
|
|
8
8
|
EntityName,
|
|
9
|
-
} from "../../types/index.
|
|
9
|
+
} from "../../types/index.js"
|
|
10
10
|
|
|
11
11
|
type Entity = { id: EntityId; code?: EntityCode; name?: EntityName }
|
|
12
12
|
type TestDatum = { year: number; entity: Entity; value: string | number }
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
Bounds,
|
|
9
9
|
Time,
|
|
10
10
|
Tippy,
|
|
11
|
-
} from "../../utils/index.
|
|
11
|
+
} from "../../utils/index.js"
|
|
12
12
|
import { observable, computed, action, makeObservable } from "mobx"
|
|
13
13
|
import { observer } from "mobx-react"
|
|
14
14
|
import { faPlay, faPause } from "@fortawesome/free-solid-svg-icons"
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
TimelineController,
|
|
17
17
|
TimelineManager,
|
|
18
18
|
TimelineDragTarget,
|
|
19
|
-
} from "./TimelineController"
|
|
20
|
-
import { ActionButton } from "../controls/ActionButtons"
|
|
19
|
+
} from "./TimelineController.js"
|
|
20
|
+
import { ActionButton } from "../controls/ActionButtons.js"
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_GRAPHER_BOUNDS,
|
|
23
23
|
GRAPHER_FRAME_PADDING_HORIZONTAL,
|
|
24
24
|
GRAPHER_TIMELINE_CLASS,
|
|
25
|
-
} from "../core/GrapherConstants.
|
|
25
|
+
} from "../core/GrapherConstants.js"
|
|
26
26
|
|
|
27
27
|
export const TIMELINE_HEIGHT = 32 // Keep in sync with $timelineHeight in TimelineComponent.scss
|
|
28
28
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as R from "remeda"
|
|
2
|
-
import { Time } from "../../types/index.
|
|
2
|
+
import { Time } from "../../types/index.js"
|
|
3
3
|
import {
|
|
4
4
|
TimeBound,
|
|
5
5
|
TimeBoundValue,
|
|
6
6
|
sleep,
|
|
7
7
|
findClosestTime,
|
|
8
|
-
} from "../../utils/index.
|
|
8
|
+
} from "../../utils/index.js"
|
|
9
9
|
import { action } from "mobx"
|
|
10
10
|
|
|
11
11
|
export type TimelineDragTarget = "start" | "end" | "both"
|
|
@@ -9,18 +9,18 @@ import {
|
|
|
9
9
|
Bounds,
|
|
10
10
|
GrapherTooltipAnchor,
|
|
11
11
|
stripOuterParentheses,
|
|
12
|
-
} from "../../utils/index.
|
|
12
|
+
} from "../../utils/index.js"
|
|
13
13
|
import {
|
|
14
14
|
TooltipProps,
|
|
15
15
|
TooltipManager,
|
|
16
16
|
TooltipContainerProps,
|
|
17
17
|
TooltipContext,
|
|
18
18
|
TooltipFooterIcon,
|
|
19
|
-
} from "./TooltipProps"
|
|
20
|
-
import { SignificanceIcon } from "./TooltipContents.
|
|
19
|
+
} from "./TooltipProps.js"
|
|
20
|
+
import { SignificanceIcon } from "./TooltipContents.js"
|
|
21
21
|
|
|
22
|
-
export * from "./TooltipContents.
|
|
23
|
-
export { TooltipState } from "./TooltipState.
|
|
22
|
+
export * from "./TooltipContents.js"
|
|
23
|
+
export { TooltipState } from "./TooltipState.js"
|
|
24
24
|
|
|
25
25
|
export class TooltipCard extends React.Component<
|
|
26
26
|
TooltipProps & TooltipContainerProps
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
2
|
import * as React from "react"
|
|
3
3
|
import classnames from "classnames"
|
|
4
|
-
import { NO_DATA_LABEL } from "../color/ColorScale.
|
|
4
|
+
import { NO_DATA_LABEL } from "../color/ColorScale.js"
|
|
5
5
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
|
6
6
|
import { faInfoCircle, faS } from "@fortawesome/free-solid-svg-icons"
|
|
7
|
-
import { formatInlineList, GrapherTooltipAnchor } from "../../utils/index.
|
|
8
|
-
import { GrapherTrendArrow } from "../../components/index.
|
|
7
|
+
import { formatInlineList, GrapherTooltipAnchor } from "../../utils/index.js"
|
|
8
|
+
import { GrapherTrendArrow } from "../../components/index.js"
|
|
9
9
|
import {
|
|
10
10
|
TooltipValueProps,
|
|
11
11
|
TooltipValueRangeProps,
|
|
12
12
|
TooltipContext,
|
|
13
13
|
TooltipTableProps,
|
|
14
14
|
TooltipVariableProps,
|
|
15
|
-
} from "./TooltipProps"
|
|
16
|
-
import { makeAxisLabel } from "../chart/ChartUtils.
|
|
15
|
+
} from "./TooltipProps.js"
|
|
16
|
+
import { makeAxisLabel } from "../chart/ChartUtils.js"
|
|
17
17
|
import * as R from "remeda"
|
|
18
|
-
import { CoreColumn } from "../../core-table/index.
|
|
18
|
+
import { CoreColumn } from "../../core-table/index.js"
|
|
19
19
|
|
|
20
20
|
type TooltipValue = number | string | undefined
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { observable, computed, action, makeObservable } from "mobx"
|
|
2
|
-
import { PointVector } from "../../utils/index.
|
|
3
|
-
import { TooltipFadeMode } from "./TooltipProps"
|
|
2
|
+
import { PointVector } from "../../utils/index.js"
|
|
3
|
+
import { TooltipFadeMode } from "./TooltipProps.js"
|
|
4
4
|
|
|
5
5
|
const TOOLTIP_FADE_DURATION = 400 // $fade-time + $fade-delay in scss
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { VerticalAxis } from "../axis/Axis"
|
|
3
|
-
import { VerticalLabelsState } from "./VerticalLabelsState"
|
|
4
|
-
import { darkenColorForText } from "../color/ColorUtils.
|
|
2
|
+
import { VerticalAxis } from "../axis/Axis.js"
|
|
3
|
+
import { VerticalLabelsState } from "./VerticalLabelsState.js"
|
|
4
|
+
import { darkenColorForText } from "../color/ColorUtils.js"
|
|
5
5
|
|
|
6
6
|
export function VerticalLabels({
|
|
7
7
|
state,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as R from "remeda"
|
|
2
2
|
import { computed } from "mobx"
|
|
3
|
-
import { Bounds, RequiredBy, VerticalAlign } from "../../utils/index.
|
|
4
|
-
import { TextWrap } from "../../components/index.
|
|
3
|
+
import { Bounds, RequiredBy, VerticalAlign } from "../../utils/index.js"
|
|
4
|
+
import { TextWrap } from "../../components/index.js"
|
|
5
5
|
|
|
6
6
|
interface VerticalLabelsOptions {
|
|
7
7
|
/** Font size for the labels */
|
package/src/index.ts
CHANGED
|
@@ -41,49 +41,49 @@ export {
|
|
|
41
41
|
createFallbackConfig,
|
|
42
42
|
reportError,
|
|
43
43
|
trackEvent,
|
|
44
|
-
} from "./config/index.
|
|
44
|
+
} from "./config/index.js"
|
|
45
45
|
|
|
46
46
|
// Re-export grapher components
|
|
47
47
|
export {
|
|
48
48
|
Grapher,
|
|
49
49
|
type GrapherProgrammaticInterface,
|
|
50
50
|
type GrapherManager,
|
|
51
|
-
} from "./grapher/core/Grapher.
|
|
51
|
+
} from "./grapher/core/Grapher.js"
|
|
52
52
|
|
|
53
|
-
export { GrapherState } from "./grapher/core/GrapherState.
|
|
54
|
-
export { FetchingGrapher } from "./grapher/core/FetchingGrapher.
|
|
53
|
+
export { GrapherState } from "./grapher/core/GrapherState.js"
|
|
54
|
+
export { FetchingGrapher } from "./grapher/core/FetchingGrapher.js"
|
|
55
55
|
|
|
56
56
|
// Explorer
|
|
57
|
-
export { Explorer } from "./explorer/Explorer.
|
|
58
|
-
export type { ExplorerProps } from "./explorer/Explorer.
|
|
57
|
+
export { Explorer } from "./explorer/Explorer.js"
|
|
58
|
+
export type { ExplorerProps } from "./explorer/Explorer.js"
|
|
59
59
|
|
|
60
60
|
// Chart State types
|
|
61
|
-
export type { ChartState, ChartSeries } from "./grapher/chart/ChartInterface.
|
|
62
|
-
export type { LineChartState } from "./grapher/lineCharts/LineChartState.
|
|
63
|
-
export type { SlopeChartState } from "./grapher/slopeCharts/SlopeChartState.
|
|
64
|
-
export type { DiscreteBarChartState } from "./grapher/barCharts/DiscreteBarChartState.
|
|
65
|
-
export type { StackedAreaChartState } from "./grapher/stackedCharts/StackedAreaChartState.
|
|
66
|
-
export type { StackedBarChartState } from "./grapher/stackedCharts/StackedBarChartState.
|
|
67
|
-
export type { StackedDiscreteBarChartState } from "./grapher/stackedCharts/StackedDiscreteBarChartState.
|
|
68
|
-
export type { ScatterPlotChartState } from "./grapher/scatterCharts/ScatterPlotChartState.
|
|
69
|
-
export type { MarimekkoChartState } from "./grapher/stackedCharts/MarimekkoChartState.
|
|
70
|
-
export { MapChartState } from "./grapher/mapCharts/MapChartState.
|
|
71
|
-
export { MapConfig } from "./grapher/mapCharts/MapConfig.
|
|
61
|
+
export type { ChartState, ChartSeries } from "./grapher/chart/ChartInterface.js"
|
|
62
|
+
export type { LineChartState } from "./grapher/lineCharts/LineChartState.js"
|
|
63
|
+
export type { SlopeChartState } from "./grapher/slopeCharts/SlopeChartState.js"
|
|
64
|
+
export type { DiscreteBarChartState } from "./grapher/barCharts/DiscreteBarChartState.js"
|
|
65
|
+
export type { StackedAreaChartState } from "./grapher/stackedCharts/StackedAreaChartState.js"
|
|
66
|
+
export type { StackedBarChartState } from "./grapher/stackedCharts/StackedBarChartState.js"
|
|
67
|
+
export type { StackedDiscreteBarChartState } from "./grapher/stackedCharts/StackedDiscreteBarChartState.js"
|
|
68
|
+
export type { ScatterPlotChartState } from "./grapher/scatterCharts/ScatterPlotChartState.js"
|
|
69
|
+
export type { MarimekkoChartState } from "./grapher/stackedCharts/MarimekkoChartState.js"
|
|
70
|
+
export { MapChartState } from "./grapher/mapCharts/MapChartState.js"
|
|
71
|
+
export { MapConfig } from "./grapher/mapCharts/MapConfig.js"
|
|
72
72
|
|
|
73
73
|
// Data loading
|
|
74
74
|
export {
|
|
75
75
|
fetchInputTableForConfig,
|
|
76
76
|
getCachingInputTableFetcher,
|
|
77
77
|
type FetchInputTableForConfigFn,
|
|
78
|
-
} from "./grapher/core/loadGrapherTableHelpers.
|
|
78
|
+
} from "./grapher/core/loadGrapherTableHelpers.js"
|
|
79
79
|
|
|
80
|
-
export { loadVariableDataAndMetadata } from "./grapher/core/loadVariable.
|
|
80
|
+
export { loadVariableDataAndMetadata } from "./grapher/core/loadVariable.js"
|
|
81
81
|
|
|
82
82
|
// Color system
|
|
83
|
-
export { ColorScale } from "./grapher/color/ColorScale.
|
|
84
|
-
export { ColorScaleConfig } from "./grapher/color/ColorScaleConfig.
|
|
85
|
-
export { ColorScheme } from "./grapher/color/ColorScheme.
|
|
86
|
-
export { ColorSchemes, getColorSchemeForChartType } from "./grapher/color/ColorSchemes.
|
|
83
|
+
export { ColorScale } from "./grapher/color/ColorScale.js"
|
|
84
|
+
export { ColorScaleConfig } from "./grapher/color/ColorScaleConfig.js"
|
|
85
|
+
export { ColorScheme } from "./grapher/color/ColorScheme.js"
|
|
86
|
+
export { ColorSchemes, getColorSchemeForChartType } from "./grapher/color/ColorSchemes.js"
|
|
87
87
|
export {
|
|
88
88
|
NumericBin,
|
|
89
89
|
CategoricalBin,
|
|
@@ -92,11 +92,11 @@ export {
|
|
|
92
92
|
isNumericBin,
|
|
93
93
|
isNoDataBin,
|
|
94
94
|
isProjectedDataBin,
|
|
95
|
-
} from "./grapher/color/ColorScaleBin.
|
|
95
|
+
} from "./grapher/color/ColorScaleBin.js"
|
|
96
96
|
|
|
97
97
|
// Selection and Focus
|
|
98
|
-
export { SelectionArray } from "./grapher/selection/SelectionArray.
|
|
99
|
-
export { FocusArray } from "./grapher/focus/FocusArray.
|
|
98
|
+
export { SelectionArray } from "./grapher/selection/SelectionArray.js"
|
|
99
|
+
export { FocusArray } from "./grapher/focus/FocusArray.js"
|
|
100
100
|
|
|
101
101
|
// Constants
|
|
102
102
|
export {
|
|
@@ -108,20 +108,20 @@ export {
|
|
|
108
108
|
BASE_FONT_SIZE,
|
|
109
109
|
Patterns,
|
|
110
110
|
latestGrapherConfigSchema,
|
|
111
|
-
} from "./grapher/core/GrapherConstants.
|
|
111
|
+
} from "./grapher/core/GrapherConstants.js"
|
|
112
112
|
|
|
113
113
|
// Controls
|
|
114
|
-
export { EntityPicker } from "./grapher/controls/entityPicker/EntityPicker.
|
|
115
|
-
export type { EntityPickerManager } from "./grapher/controls/entityPicker/EntityPickerConstants.
|
|
116
|
-
export { GlobalEntitySelector } from "./grapher/controls/globalEntitySelector/GlobalEntitySelector.
|
|
117
|
-
export { Dropdown } from "./grapher/controls/Dropdown.
|
|
114
|
+
export { EntityPicker } from "./grapher/controls/entityPicker/EntityPicker.js"
|
|
115
|
+
export type { EntityPickerManager } from "./grapher/controls/entityPicker/EntityPickerConstants.js"
|
|
116
|
+
export { GlobalEntitySelector } from "./grapher/controls/globalEntitySelector/GlobalEntitySelector.js"
|
|
117
|
+
export { Dropdown } from "./grapher/controls/Dropdown.js"
|
|
118
118
|
|
|
119
119
|
// Schema and migrations
|
|
120
|
-
export { defaultGrapherConfig } from "./grapher/schema/defaultGrapherConfig.
|
|
120
|
+
export { defaultGrapherConfig } from "./grapher/schema/defaultGrapherConfig.js"
|
|
121
121
|
export {
|
|
122
122
|
migrateGrapherConfigToLatestVersion,
|
|
123
123
|
migrateGrapherConfigToLatestVersionAndFailOnError,
|
|
124
|
-
} from "./grapher/schema/migrations/migrate.
|
|
124
|
+
} from "./grapher/schema/migrations/migrate.js"
|
|
125
125
|
|
|
126
126
|
// URL utilities
|
|
127
127
|
export {
|
|
@@ -131,46 +131,46 @@ export {
|
|
|
131
131
|
generateSelectedEntityNamesParam,
|
|
132
132
|
generateFocusedSeriesNamesParam,
|
|
133
133
|
getEntityNamesParam,
|
|
134
|
-
} from "./grapher/core/EntityUrlBuilder.
|
|
134
|
+
} from "./grapher/core/EntityUrlBuilder.js"
|
|
135
135
|
|
|
136
|
-
export { grapherConfigToQueryParams } from "./grapher/core/GrapherUrl.
|
|
136
|
+
export { grapherConfigToQueryParams } from "./grapher/core/GrapherUrl.js"
|
|
137
137
|
|
|
138
138
|
// Chart utilities
|
|
139
|
-
export { ChartDimension } from "./grapher/chart/ChartDimension.
|
|
140
|
-
export { DimensionSlot } from "./grapher/chart/DimensionSlot.
|
|
141
|
-
export { makeChartState } from "./grapher/chart/ChartTypeMap.
|
|
142
|
-
export { generateGrapherImageSrcSet } from "./grapher/chart/ChartUtils.
|
|
139
|
+
export { ChartDimension } from "./grapher/chart/ChartDimension.js"
|
|
140
|
+
export { DimensionSlot } from "./grapher/chart/DimensionSlot.js"
|
|
141
|
+
export { makeChartState } from "./grapher/chart/ChartTypeMap.js"
|
|
142
|
+
export { generateGrapherImageSrcSet } from "./grapher/chart/ChartUtils.js"
|
|
143
143
|
|
|
144
144
|
// Slideshow
|
|
145
145
|
export {
|
|
146
146
|
type SlideShowManager,
|
|
147
147
|
SlideShowController,
|
|
148
|
-
} from "./grapher/slideshowController/SlideShowController.
|
|
148
|
+
} from "./grapher/slideshowController/SlideShowController.js"
|
|
149
149
|
|
|
150
150
|
// Analytics
|
|
151
|
-
export { GrapherAnalytics } from "./grapher/core/GrapherAnalytics.
|
|
151
|
+
export { GrapherAnalytics } from "./grapher/core/GrapherAnalytics.js"
|
|
152
152
|
|
|
153
153
|
// Rendering helpers
|
|
154
154
|
export {
|
|
155
155
|
renderGrapherIntoContainer,
|
|
156
156
|
renderSingleGrapherOnGrapherPage,
|
|
157
|
-
} from "./grapher/core/GrapherUseHelpers.
|
|
157
|
+
} from "./grapher/core/GrapherUseHelpers.js"
|
|
158
158
|
|
|
159
159
|
// Map features
|
|
160
|
-
export { GeoFeatures } from "./grapher/mapCharts/GeoFeatures.
|
|
160
|
+
export { GeoFeatures } from "./grapher/mapCharts/GeoFeatures.js"
|
|
161
161
|
export {
|
|
162
162
|
MAP_REGION_LABELS,
|
|
163
163
|
type GeoFeature,
|
|
164
164
|
type Direction,
|
|
165
165
|
type Ellipse,
|
|
166
166
|
type EllipseCoords,
|
|
167
|
-
} from "./grapher/mapCharts/MapChartConstants.
|
|
167
|
+
} from "./grapher/mapCharts/MapChartConstants.js"
|
|
168
168
|
|
|
169
169
|
// Comparison lines
|
|
170
|
-
export { isValidVerticalComparisonLineConfig } from "./grapher/comparisonLine/ComparisonLineHelpers.
|
|
170
|
+
export { isValidVerticalComparisonLineConfig } from "./grapher/comparisonLine/ComparisonLineHelpers.js"
|
|
171
171
|
|
|
172
172
|
// Binning strategies
|
|
173
|
-
export { hasValidConfigForBinningStrategy } from "./grapher/color/BinningStrategies.
|
|
173
|
+
export { hasValidConfigForBinningStrategy } from "./grapher/color/BinningStrategies.js"
|
|
174
174
|
|
|
175
175
|
// Chart tabs
|
|
176
176
|
export {
|
|
@@ -180,7 +180,7 @@ export {
|
|
|
180
180
|
mapGrapherTabNameToQueryParam,
|
|
181
181
|
mapGrapherTabNameToConfigOption,
|
|
182
182
|
makeLabelForGrapherTab,
|
|
183
|
-
} from "./grapher/chart/ChartTabs.
|
|
183
|
+
} from "./grapher/chart/ChartTabs.js"
|
|
184
184
|
|
|
185
185
|
// Guided chart utilities
|
|
186
186
|
export {
|
|
@@ -190,15 +190,15 @@ export {
|
|
|
190
190
|
type GuidedChartContextValue,
|
|
191
191
|
type ArchiveGuidedChartRegistration,
|
|
192
192
|
buildArchiveGuidedChartSrc,
|
|
193
|
-
} from "./grapher/chart/guidedChartUtils.
|
|
193
|
+
} from "./grapher/chart/guidedChartUtils.js"
|
|
194
194
|
|
|
195
195
|
// Legacy conversion
|
|
196
196
|
export {
|
|
197
197
|
legacyToChartsTableAndDimensions,
|
|
198
198
|
legacyToChartsTableAndDimensionsWithMandatorySlug,
|
|
199
|
-
} from "./grapher/core/LegacyToChartsTable.
|
|
199
|
+
} from "./grapher/core/LegacyToChartsTable.js"
|
|
200
200
|
|
|
201
|
-
export { legacyToCurrentGrapherUrl } from "./grapher/core/GrapherUrlMigrations.
|
|
201
|
+
export { legacyToCurrentGrapherUrl } from "./grapher/core/GrapherUrlMigrations.js"
|
|
202
202
|
|
|
203
203
|
// Test data helpers (useful for demos and testing)
|
|
204
204
|
export {
|
|
@@ -206,8 +206,8 @@ export {
|
|
|
206
206
|
createTestDataset,
|
|
207
207
|
type TestData,
|
|
208
208
|
type TestMetadata,
|
|
209
|
-
} from "./grapher/testData/TestData.
|
|
210
|
-
export { LifeExpectancyGrapher } from "./grapher/testData/TestData.sample.
|
|
209
|
+
} from "./grapher/testData/TestData.js"
|
|
210
|
+
export { LifeExpectancyGrapher } from "./grapher/testData/TestData.sample.js"
|
|
211
211
|
|
|
212
212
|
// Types commonly needed for data loading
|
|
213
213
|
export {
|
|
@@ -219,8 +219,8 @@ export {
|
|
|
219
219
|
type EntityName,
|
|
220
220
|
type EntityId,
|
|
221
221
|
type EntityCode,
|
|
222
|
-
} from "./types/index.
|
|
222
|
+
} from "./types/index.js"
|
|
223
223
|
|
|
224
224
|
// Utilities for data loading
|
|
225
|
-
export { Bounds } from "./utils/index.
|
|
226
|
-
export { parseDelimited, ChartsTable, BlankChartsTable } from "./core-table/index.
|
|
225
|
+
export { Bounds } from "./utils/index.js"
|
|
226
|
+
export { parseDelimited, ChartsTable, BlankChartsTable } from "./core-table/index.js"
|
package/src/types/Origin.ts
CHANGED
package/src/types/Variable.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Origin } from "./Origin.
|
|
2
|
-
import { Source } from "./Source.
|
|
3
|
-
import { VariableDisplayConfigInterface } from "./VariableDisplayConfigInterface.
|
|
1
|
+
import { Origin } from "./Origin.js"
|
|
2
|
+
import { Source } from "./Source.js"
|
|
3
|
+
import { VariableDisplayConfigInterface } from "./VariableDisplayConfigInterface.js"
|
|
4
4
|
|
|
5
5
|
export interface VariableWithSource {
|
|
6
6
|
id: number
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { VariableId } from "./domainTypes/Various.
|
|
1
|
+
import { VariableId } from "./domainTypes/Various.js"
|
|
2
2
|
import {
|
|
3
3
|
ColumnSlug,
|
|
4
4
|
DimensionProperty,
|
|
5
5
|
Time,
|
|
6
|
-
} from "./grapherTypes/GrapherTypes.
|
|
6
|
+
} from "./grapherTypes/GrapherTypes.js"
|
|
7
7
|
|
|
8
8
|
export interface VariableDisplayConfigInterface {
|
|
9
9
|
name?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Origin } from "../Origin.
|
|
1
|
+
import { Origin } from "../Origin.js"
|
|
2
2
|
import {
|
|
3
3
|
ProcessingLevel,
|
|
4
4
|
VariablePresentation,
|
|
5
|
-
} from "../Variable.
|
|
6
|
-
import { VariableDisplayConfigInterface } from "../VariableDisplayConfigInterface.
|
|
5
|
+
} from "../Variable.js"
|
|
6
|
+
import { VariableDisplayConfigInterface } from "../VariableDisplayConfigInterface.js"
|
|
7
7
|
import {
|
|
8
8
|
Color,
|
|
9
9
|
ColumnSlug,
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
Time,
|
|
12
12
|
ToleranceStrategy,
|
|
13
13
|
Year,
|
|
14
|
-
} from "../grapherTypes/GrapherTypes.
|
|
15
|
-
import { Integer } from "./Various.
|
|
14
|
+
} from "../grapherTypes/GrapherTypes.js"
|
|
15
|
+
import { Integer } from "./Various.js"
|
|
16
16
|
|
|
17
17
|
export type TableSlug = string // a url friendly name for a table
|
|
18
18
|
export type ColumnSlugs = string // slugs cannot have spaces, so this is a space delimited array of ColumnSlugs
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GdocType } from "../gdocTypes/Gdoc.
|
|
2
|
-
import { WP_PostType } from "../wordpressTypes/WordpressTypes.
|
|
3
|
-
import { RelatedChart } from "../grapherTypes/GrapherTypes.
|
|
4
|
-
import { TocHeading } from "./Toc.
|
|
1
|
+
import { GdocType } from "../gdocTypes/Gdoc.js"
|
|
2
|
+
import { WP_PostType } from "../wordpressTypes/WordpressTypes.js"
|
|
3
|
+
import { RelatedChart } from "../grapherTypes/GrapherTypes.js"
|
|
4
|
+
import { TocHeading } from "./Toc.js"
|
|
5
5
|
|
|
6
6
|
export interface FormattedPost extends FullPost {
|
|
7
7
|
stickyNavLinks?: { text: string; target: string }[]
|
|
@@ -4,8 +4,8 @@ import type {
|
|
|
4
4
|
Hit,
|
|
5
5
|
HitHighlightResult,
|
|
6
6
|
} from "instantsearch.js"
|
|
7
|
-
import { GdocType } from "../gdocTypes/Gdoc.
|
|
8
|
-
import { GrapherTabName } from "../grapherTypes/GrapherTypes.
|
|
7
|
+
import { GdocType } from "../gdocTypes/Gdoc.js"
|
|
8
|
+
import { GrapherTabName } from "../grapherTypes/GrapherTypes.js"
|
|
9
9
|
import * as z from "zod/mini"
|
|
10
10
|
|
|
11
11
|
export const PagesIndexRecordSchema = z.object({
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* but the types are required for compilation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { QueryParams } from "../domainTypes/Various.
|
|
9
|
-
import { ArchivedPageVersion } from "../domainTypes/Archive.
|
|
8
|
+
import { QueryParams } from "../domainTypes/Various.js"
|
|
9
|
+
import { ArchivedPageVersion } from "../domainTypes/Archive.js"
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Document types in the CMS.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChartDimensionInterface,
|
|
3
3
|
VariableRoundingMode,
|
|
4
|
-
} from "../VariableDisplayConfigInterface.
|
|
5
|
-
import { ColumnSlugs, EntityName } from "../domainTypes/CoreTableTypes.
|
|
6
|
-
import { AxisAlign, Position } from "../domainTypes/Layout.
|
|
7
|
-
import { Integer, VariableId } from "../domainTypes/Various.
|
|
8
|
-
import { DetailDictionary } from "../gdocTypes/Gdoc.
|
|
4
|
+
} from "../VariableDisplayConfigInterface.js"
|
|
5
|
+
import { ColumnSlugs, EntityName } from "../domainTypes/CoreTableTypes.js"
|
|
6
|
+
import { AxisAlign, Position } from "../domainTypes/Layout.js"
|
|
7
|
+
import { Integer, VariableId } from "../domainTypes/Various.js"
|
|
8
|
+
import { DetailDictionary } from "../gdocTypes/Gdoc.js"
|
|
9
9
|
import {
|
|
10
10
|
GRAPHER_CHART_TYPES,
|
|
11
11
|
GRAPHER_MAP_TYPE,
|
|
12
12
|
GRAPHER_TAB_NAMES,
|
|
13
13
|
GRAPHER_TAB_CONFIG_OPTIONS,
|
|
14
14
|
GRAPHER_TAB_QUERY_PARAMS,
|
|
15
|
-
} from "./GrapherConstants.
|
|
16
|
-
import { VariableDataMetadataDimensions } from "../Variable.
|
|
17
|
-
import { ArchiveContext } from "../domainTypes/Archive.
|
|
15
|
+
} from "./GrapherConstants.js"
|
|
16
|
+
import { VariableDataMetadataDimensions } from "../Variable.js"
|
|
17
|
+
import { ArchiveContext } from "../domainTypes/Archive.js"
|
|
18
18
|
import {
|
|
19
19
|
BinningStrategyIncludingManual,
|
|
20
20
|
MidpointMode,
|
|
21
|
-
} from "./BinningStrategyTypes.
|
|
21
|
+
} from "./BinningStrategyTypes.js"
|
|
22
22
|
|
|
23
23
|
// Utility type that marks all properties of T that may be undefined as optional.
|
|
24
24
|
export type UndefinedToOptional<T> = Partial<T> & {
|