From 8890377993720aa98ea666fa6e9f6d2623cdc90e Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Tue, 29 Sep 2026 04:44:24 +0000 Subject: [PATCH] The Country Posters map's legend Packet export works, and the card deck rolls out behind one switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The legend's packet submenu emits 'packet:full' | 'packet:lightweight', and the country map compared against a bare 'packet', so its legend Packet export did nothing at all. It splits the kind first, as the UPG-100 map's handler does (the research map carries the same three lines; reported to its owner). - The selection's rows come from the print standard's records provider by slug (full print fields, the reader's language); the rows mapped by hand put the country's NAME in country_code and carried no language, so every profile description ran short. They remain as the fallback. The live map's raster goes in through the mapImage seam, so page 1 is the map full page. - The legend gains an OPT-IN Card Deck export (exportCards; provide('legendExportCards') for the mobile sheet), so a map that does not handle it never shows a dead item. - library/print/experimentalExports.js is the ONE switch for rolling the standard's exports out on maps that are not production print surfaces (production: the UPG 100 list, the Regions dashboard's country posters, the Country Posters wall). This map's card deck sits behind it; off — per page, per visit (?exports=off), per site or everywhere — restores the menu it had before. - The records provider returns coordinates (a generated map's pins), exposes the unselected set (recordsFor.all) and sorts in the reader's collation. --- library/components/legends/LegendMobile.vue | 3 + .../components/legends/SemanticTreeLegend.vue | 12 ++++ library/lists/peopleGroupRecords.js | 12 ++-- library/print/experimentalExports.js | 29 +++++++++ .../country-posters/countries-map.vue | 60 +++++++++++++++---- 5 files changed, 100 insertions(+), 16 deletions(-) create mode 100644 library/print/experimentalExports.js diff --git a/library/components/legends/LegendMobile.vue b/library/components/legends/LegendMobile.vue index 5c2943793..d38745c2f 100644 --- a/library/components/legends/LegendMobile.vue +++ b/library/components/legends/LegendMobile.vue @@ -430,6 +430,8 @@ const onSemanticTreeSelect = inject('onSemanticTreeSelect', () => {}) // handler, so the three profiles that do not provide one are untouched. const onLegendExport = inject('onLegendExport', null) const mobileExportEnabled = computed(() => typeof onLegendExport === 'function') +// The card deck is opt-in the same way: a profile that handles 'cards' provides legendExportCards = true. +const mobileExportCards = inject('legendExportCards', false) // ── Data-driven legend (universal for all legend types) ───────────────────── const legendTypeRef = toRef(props, 'legendType') @@ -899,6 +901,7 @@ onBeforeUnmount(() => { :columnLabel="treeColumnLabelForMobile" :columns="columns || ['count', 'pop']" :export-enabled="mobileExportEnabled" + :export-cards="mobileExportEnabled && mobileExportCards === true" @select="onSemanticTreeSelect" @export="(kind) => onLegendExport && onLegendExport(kind)" > diff --git a/library/components/legends/SemanticTreeLegend.vue b/library/components/legends/SemanticTreeLegend.vue index 715f99847..b4a323fc8 100644 --- a/library/components/legends/SemanticTreeLegend.vue +++ b/library/components/legends/SemanticTreeLegend.vue @@ -111,6 +111,9 @@ const props = defineProps({ // unchanged; a profile opts in by passing :export-enabled. Gates the // top-right Export affordance (UX scaffold only — no export yet). exportEnabled: { type: Boolean, default: false }, + // Which prayer resources the host can print for the selection. 'cards' (the card deck) is OPT-IN: a + // host that does not handle it must not show a menu item that does nothing. Poster and packet stay on. + exportCards: { type: Boolean, default: false }, // Prayer progress payload for the header bar — { covered, total, segments } from // useLegendData(...).progress. null → no bar (every non-prayer legend). Falls back // to inject('legendProgress') so the mobile sheet's embedded legend (LegendMobile → @@ -1290,6 +1293,15 @@ useShadowStyles(` {{ t('legend.export.poster') }} + +