diff --git a/plugin-designs/research-dashboard/dashboard.config.js b/plugin-designs/research-dashboard/dashboard.config.js index 5e1175b97..77395c9e9 100644 --- a/plugin-designs/research-dashboard/dashboard.config.js +++ b/plugin-designs/research-dashboard/dashboard.config.js @@ -8,7 +8,7 @@ * generically. Values are copied faithfully from the original research-dashboard so the * migrated bundle behaves identically. */ -import { lbl } from './src/composables/useDashboardAggregations.js' +import { lbl } from '@map/composables/useFacetAggregation.js' import { tStatic } from '@map/i18n/index.js' import { RELIGION_FAMILIES } from '@map/colors/religion.js' import { canonicalFamilyName } from '@map/colors/language-family.js' diff --git a/plugin-designs/research-dashboard/src/components/dashboards/DashboardChartsRail.vue b/plugin-designs/research-dashboard/src/components/dashboards/DashboardChartsRail.vue index ba3044ebf..e8015da93 100644 --- a/plugin-designs/research-dashboard/src/components/dashboards/DashboardChartsRail.vue +++ b/plugin-designs/research-dashboard/src/components/dashboards/DashboardChartsRail.vue @@ -12,7 +12,8 @@ import { tStatic, getRuntimeLocale } from '@map/i18n/index.js' */ import { inject, computed, ref } from 'vue' import { useShadowStyles } from '@map/composables/useShadowStyles.js' -import { aggregate, buildDonut, buildBars, lbl, buildCountryRegionColors, OTHER_KEY, otherLabel } from '../../composables/useDashboardAggregations.js' +import { buildDonut, buildBars, buildCountryRegionColors } from '../../composables/useDashboardAggregations.js' +import { aggregate, lbl, OTHER_KEY, otherLabel } from '@map/composables/useFacetAggregation.js' import { buildSearchAccessors, makeSearchMatcher, filterRowsBySearch } from '@map/composables/useDashboardSearch.js' /** diff --git a/plugin-designs/research-dashboard/src/components/dashboards/DashboardDetailDrawer.vue b/plugin-designs/research-dashboard/src/components/dashboards/DashboardDetailDrawer.vue index 4703f5f58..7f2c8c113 100644 --- a/plugin-designs/research-dashboard/src/components/dashboards/DashboardDetailDrawer.vue +++ b/plugin-designs/research-dashboard/src/components/dashboards/DashboardDetailDrawer.vue @@ -24,7 +24,7 @@ import { useShadowStyles } from '@map/composables/useShadowStyles.js' import { useCsvExport } from '@map/composables/useCsvExport.js' import { formatCount } from '@map/utils/formatCount.js' import { useTreeLegendLabels } from '../../composables/useTreeLegendLabels.js' -import { lbl } from '../../composables/useDashboardAggregations.js' +import { lbl } from '@map/composables/useFacetAggregation.js' const dash = inject('dashboardData', null) const bus = inject('selectionBus', null) diff --git a/plugin-designs/research-dashboard/src/components/dashboards/DashboardMapPanel.vue b/plugin-designs/research-dashboard/src/components/dashboards/DashboardMapPanel.vue index 3a185def5..e6986eab9 100644 --- a/plugin-designs/research-dashboard/src/components/dashboards/DashboardMapPanel.vue +++ b/plugin-designs/research-dashboard/src/components/dashboards/DashboardMapPanel.vue @@ -28,7 +28,7 @@ import { useSelectionCamera } from '@map/composables/useSelectionCamera.js' import MapToolbar from '@map/components/map-controls/MapToolbar.vue' import ZoomInButton from '@map/components/map-controls/ZoomInButton.vue' import ZoomOutButton from '@map/components/map-controls/ZoomOutButton.vue' -import { lbl } from '../../composables/useDashboardAggregations.js' +import { lbl } from '@map/composables/useFacetAggregation.js' import { buildSearchAccessors, makeSearchMatcher, filterRowsBySearch } from '@map/composables/useDashboardSearch.js' // ── THE PRAYER COLOUR STRATEGY, REUSED NOT RE-DERIVED ── // applyColor() returns the SAME 3-tier expression the prayer map paints with, keyed off the diff --git a/plugin-designs/research-dashboard/src/components/dashboards/DashboardTopBar.vue b/plugin-designs/research-dashboard/src/components/dashboards/DashboardTopBar.vue index b10aee0d7..179a837ba 100644 --- a/plugin-designs/research-dashboard/src/components/dashboards/DashboardTopBar.vue +++ b/plugin-designs/research-dashboard/src/components/dashboards/DashboardTopBar.vue @@ -95,7 +95,7 @@ import SearchBar from '@map/components/search/SearchBar.vue' // DashboardBreadcrumb is NOT imported here — it renders bus.filterSet, i.e. selection state, which // this header must not show (see the ★ rule at the top). It remains exported from ./index.js. import ShareButton from '@map/components/map-controls/ShareButton.vue' -import { lbl } from '../../composables/useDashboardAggregations.js' +import { lbl } from '@map/composables/useFacetAggregation.js' const dash = inject('dashboardData', null) const bus = inject('selectionBus', null) diff --git a/plugin-designs/research-dashboard/src/composables/useDashboardAggregations.js b/plugin-designs/research-dashboard/src/composables/useDashboardAggregations.js index 68c8061a6..130c524ba 100644 --- a/plugin-designs/research-dashboard/src/composables/useDashboardAggregations.js +++ b/plugin-designs/research-dashboard/src/composables/useDashboardAggregations.js @@ -49,17 +49,18 @@ import { PALETTE as RELIGION_PALETTE, RELIGION_FAMILIES, getReligionFamily } fro * than re-implemented, so chart and pin can never drift. */ -// ★ THE GENERIC HALF MOVED OUT (kit landing 4c-1) AND IS RE-EXPORTED HERE FOR ONE CYCLE. -// lbl() and aggregate() are pure counting and now live in @map/composables/useFacetAggregation.js. -// Everything still in this file — colorFor and its hardcoded facet branches, the religion palettes, -// the donut and bar builders — is research-specific and stays. DashboardChartsRail imports those and -// is untouched by this commit. -export { lbl, aggregate, OTHER_KEY, otherLabel, NEUTRAL } from '@map/composables/useFacetAggregation.js' -// NEUTRAL is imported as well as re-exported: colorFor() and buildCountryRegionColors() below read it -// five times as the "this facet has no palette for that key" colour. Kit landing 4c-1 moved it to the -// library and updated the re-export line but not this one, so every read threw ReferenceError and -// Big Picture's Religion and Region charts came up empty on both engines and both languages. -import { lbl, aggregate, NEUTRAL } from '@map/composables/useFacetAggregation.js' +// ★ THE GENERIC HALF LIVES IN THE LIBRARY. lbl() and aggregate() are pure counting and moved to +// @map/composables/useFacetAggregation.js in kit landing 4c-1, re-exported from here for one cycle +// so callers could migrate. That cycle is over: every caller now imports them from the library +// directly, so the re-export is gone. What remains in this file — colorFor and its facet branches, +// the religion palettes, the donut and bar builders — is research-specific and stays. +// +// NEUTRAL is still IMPORTED, because colorFor() and buildCountryRegionColors() below read it five +// times as the "this facet has no palette for that key" colour. When 4c-1 moved it to the library it +// updated the re-export line and not this import, so every read threw ReferenceError and Big +// Picture's Religion and Region charts came up empty on both engines and both languages. Deleting a +// re-export is not the same as deleting the import beside it. +import { NEUTRAL } from '@map/composables/useFacetAggregation.js' // Place: the facet emits the localized label but the authoritative palette is slug-keyed