diff --git a/library/ProfileLoader.vue b/library/ProfileLoader.vue index 0934325db..cfdf33a5c 100644 --- a/library/ProfileLoader.vue +++ b/library/ProfileLoader.vue @@ -97,7 +97,7 @@ if (!profileModules) { // it read as a blank map rather than a misconfiguration. // For a bundle that registers exactly ONE profile there is no ambiguity to resolve: the only // profile IS the answer, and requiring the host to name it makes a single-element bundle harder to -// embed than the paste-anywhere promise it exists for. 20 of the 25 bundles are single-profile. +// embed than the paste-anywhere promise it exists for. 20 of the 25 bundles are single-profile (10 of the 17 that mount this loader). // A bundle with SEVERAL profiles still requires the name — guessing there would silently mount the // wrong surface, which is worse than the warning. So the fallback is conditional on the count, not // on the name being absent. diff --git a/plugin-designs/country-map/country-map.vue b/plugin-designs/country-map/country-map.vue index ece51b7ea..52ffbc794 100644 --- a/plugin-designs/country-map/country-map.vue +++ b/plugin-designs/country-map/country-map.vue @@ -33,26 +33,6 @@ import { toNumber, PEOPLE_GROUP_LIST_FIELDS } from '@map/utils/countries-meta.js import { peopleGroupPoints, PEOPLE_GROUP_POINT_FIELDS } from '@map/utils/peopleGroupPoints.js' import { applyPeopleGroupList } from '@map/lists/peopleGroupList.js' import { useRegionsI18n } from '@map/i18n/useRegionsI18n.js' -import { retryableAsyncComponent } from '@map/composables/retryableAsyncComponent.js' -import { createPeopleGroupRecords } from '@map/lists/peopleGroupRecords.js' -import { makeCountrySheet } from '@map/packet/countrySheet.js' -import { resolveAssetsBase } from '@map/utils/embedBase.js' -import posterData from '@map/data/country-posters.json' - -// ★ THE PRINT SURFACE IS OPT-IN AND LAZY, AND BOTH HALVES MATTER. -// -// OPT-IN, because other sites embed this element. A page that does not set showPosters must render -// exactly what it renders today; the surface is additive, never a change to the existing contract. -// -// LAZY, because PosterWall STATICALLY imports usePosterPrints, which pulls the whole printing -// subsystem. A plain `import PosterWall` would therefore land that weight in every embed including -// the ones that never turn the flag on, which is the opposite of opt-in. An async component keeps -// it out until a page asks for it. -// -// retryableAsyncComponent, not raw defineAsyncComponent: Vue CACHES a rejected loader promise, so -// one dropped request would disable the surface for the life of the page. Same reason -// upg-100-list.vue uses it for its detail panel. -const PosterWall = retryableAsyncComponent(() => import('@map/components/poster/PosterWall.vue')) const props = defineProps({ profileConfig: { type: String, default: '' }, @@ -101,43 +81,6 @@ const researchUrl = computed(() => cfg.value.researchUrl || 'https://doxa.life/r const prayBaseUrl = computed(() => cfg.value.prayBaseUrl || 'https://pray.doxa.life') const countryUrl = computed(() => cfg.value.countryUrl || 'https://doxa.life/regions/') const languageCode = computed(() => cfg.value.languageCode || cfg.value.locale || cfg.value.lang || 'en') - -// OFF unless the host says otherwise, and only true for a literal true / 'true': an absent key, a -// typo'd value or a stray string must not switch a public page's UI on by accident. -const showPosters = computed(() => cfg.value.showPosters === true || cfg.value.showPosters === 'true') - -// The wall shows THIS element's country, not a region's list, so its single item is the entry for -// the first country code. An unknown code still yields a row, carrying the reason it cannot print, -// exactly as the regions list does for a country with no poster. -const POSTER_BY_ISO3 = new Map((posterData.countries || []).map((c) => [String(c.iso3 || '').toUpperCase(), c])) -const posterItems = computed(() => { - const iso3 = countryCodes.value[0] - if (!iso3) return [] - const rec = POSTER_BY_ISO3.get(iso3) - if (rec) return [rec] - return [{ - id: `country-${iso3.toLowerCase()}`, - iso3, - label: iso3, - count: 0, - unsupportedReason: t('No poster has been generated for this country yet.'), - }] -}) - -const instanceId = computed(() => cfg.value.instanceId || 'country-map') -const posterAssetsBase = computed(() => resolveAssetsBase(cfg.value)) -// The same shared provider the regions wall uses, not a copy of its fetch: one cached request per -// language, and the same rows feed the sheet, so the printed map and the printed list cannot -// disagree about which groups are in this country. -const countryRecords = createPeopleGroupRecords({ - apiBase: () => prayBaseUrl.value, - lang: () => languageCode.value, - profileConfig: injectedCfg, -}) -const countrySheet = makeCountrySheet({ - records: countryRecords, - assetsBase: () => posterAssetsBase.value, -}) const { t } = useRegionsI18n() // ★ THE ELEMENT FETCHES ITS OWN PINS. prayBaseUrl is in the contract, and it is the API base the @@ -224,29 +167,4 @@ watch(() => [languageCode.value, countryCodes.value.join(',')], loadPoints) "Regionsdaten" all say regions. The people-groups sentence is already in the catalogue and already translated in all eleven, so this costs no new string. -->
{{ t('People groups could not be loaded. This is a connection problem, not a filter.') }}
- -${b(L.description)}
`:""} +${z(L.description)}
`:""}