Kit 4d-2: useDashboardData moves to the library

82 lines, one importer (useDashboardShell), and every import already @map/ — so it moves as-is with
no adapter and no shim. Its inject('profileConfig') stays inside its try/catch: it can be called from
outside setup, and that is the property the move had to preserve.

Source only. research-dashboard and dashboard-plus-grid need a rebuild.
This commit is contained in:
Doxa Maps 2026-09-27 05:14:56 +00:00
parent be3ee1cdde
commit 68c7a6d4b6
3 changed files with 7 additions and 1 deletions

View file

@ -135,6 +135,8 @@ and a change here can break other maps.
`import … from '@map/composables/useCountryOutline.js'`
- **useCsvExport** — useCsvExport.js — ★ SHARED LIBRARY CODE (dashboard-kit landing 3). Two parameters make it
`import … from '@map/composables/useCsvExport.js'`
- **useDashboardData** — useDashboardData.js — RDASH phase 2: the single in-memory row store (kills the hardcode).
`import … from '@map/composables/useDashboardData.js'`
- **useDashboardLayout** — useDashboardLayout.js — reusable drag-resize + persistence engine for the CMV dashboard grid.
`import … from '@map/composables/useDashboardLayout.js'`
- **useDashboardSearch** — useDashboardSearch.js — the ONE free-text search the whole dashboard shares.

View file

@ -11,6 +11,10 @@
*
* Shadow-DOM safe: pure data, no DOM/style. Reuses read-only @map config without editing it.
*/
// KIT LANDING 4d-2: moved from plugin-designs/research-dashboard/src/composables/. It needed no
// adapter — every import was already @map/ — and it injects profileConfig in a try/catch because it
// can be called outside setup, which is the one property the move had to preserve.
import { ref, shallowRef, inject } from 'vue'
import { getApiBaseUrl } from '@map/api/apiBaseUrl.js'
import sourcesConfig from '@map/api/sources.json'

View file

@ -26,7 +26,7 @@
import { exactMatches, fuzzyMatches, resolveFuzzyValues } from '@map/components/search/fuzzy.js'
import { provide, inject, ref, computed, watch, onMounted, onBeforeUnmount } from 'vue'
import { createSelectionBus } from '@map/composables/useSelectionBus.js'
import { useDashboardData } from './useDashboardData.js'
import { useDashboardData } from '@map/composables/useDashboardData.js'
import { useCsvExport } from '@map/composables/useCsvExport.js'
import { buildSearchAccessors, makeSearchMatcher, filterRowsBySearch } from '@map/composables/useDashboardSearch.js'
import { formatCount } from '@map/utils/formatCount.js'