Compare commits
4 commits
main
...
reg-post/b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
508fc752d4 | ||
|
|
c39a6b88ee | ||
|
|
220d36796e | ||
|
|
9fc2a5047b |
20 changed files with 205 additions and 22 deletions
|
|
@ -21,6 +21,12 @@ const unknownType = ref(false)
|
|||
async function resolveType(name) {
|
||||
const a = await posterType(name)
|
||||
if (name !== typeName.value) return // the type changed while this one loaded
|
||||
// A type whose cards come from a FETCHED table (indiaState) loads it first; items() then reads it. A failed load
|
||||
// leaves items() empty, so the section says it has none rather than guessing.
|
||||
if (a && typeof a.load === 'function') {
|
||||
try { await a.load({ assetsBase: assetsBase.value }) } catch (_) { /* items() stays empty: the none line */ }
|
||||
if (name !== typeName.value) return
|
||||
}
|
||||
adapter.value = a; unknownType.value = !a
|
||||
}
|
||||
watch(typeName, resolveType, { immediate: true })
|
||||
|
|
|
|||
|
|
@ -64,3 +64,7 @@ if (!registry().loaders.has('country')) {
|
|||
registry().loaders.set('country', () => import('./types/countryPosterType.js'))
|
||||
announce('country')
|
||||
}
|
||||
if (!registry().loaders.has('indiaState')) {
|
||||
registry().loaders.set('indiaState', () => import('./types/indiaStatePosterType.js'))
|
||||
announce('indiaState')
|
||||
}
|
||||
|
|
|
|||
42
library/components/poster/types/indiaStatePosterType.js
Normal file
42
library/components/poster/types/indiaStatePosterType.js
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* The 'indiaState' poster type: one poster per Indian state or union territory, from the shared state table
|
||||
* (library/data/indiaStates.js, served + pinned) and the ONE state-sheet path (@map/packet/indiaStateSheet.js), the
|
||||
* same cards and sheets as Country Posters' India section, so a host embeds them with
|
||||
* <dxm-poster-section type="indiaState" scope="all">
|
||||
* Each card prints its state poster, its prayer list/packet and its card deck. The WHOLE-INDIA card (country-ind)
|
||||
* is not in this type: it stays withheld wherever it appears (countrySheet.js WITHHELD).
|
||||
* The table is fetched, so the type has a load(): <dxm-poster-section> awaits it before reading items().
|
||||
* scope = 'all' (the only one). Order: most people groups first, as on the wall, matching each sheet's "map N of M".
|
||||
*/
|
||||
import { loadIndiaStates } from '@map/data/indiaStates.js'
|
||||
import { makeIndiaStateSheet, stateCards } from '@map/packet/indiaStateSheet.js'
|
||||
import { createPeopleGroupRecords } from '@map/lists/peopleGroupRecords.js'
|
||||
import { tStatic, getRuntimeLocale, detectLocale } from '@map/i18n/index.js'
|
||||
import { countryName } from '@map/utils/countryName.js'
|
||||
import data from '@map/data/country-posters.json'
|
||||
|
||||
const REGION = (data.countries.find((c) => c.iso3 === 'IND') || {}).region || 'Asia' // India's hue, as on the wall
|
||||
let table = null
|
||||
|
||||
export default {
|
||||
async load({ assetsBase }) { if (!table) table = (await loadIndiaStates(assetsBase)).states || [] },
|
||||
scopes: () => ['all'],
|
||||
items(scope, locale) {
|
||||
const cards = stateCards(table, REGION)
|
||||
if (/^en\b/i.test(locale || 'en')) return cards
|
||||
// named in the reader's language from the catalogue; the printed sheet stays English, like a country's
|
||||
return cards.map((st) => ({ ...st, label: tStatic(`countryPosters.stateNames.${st.iso}`, locale) || st.label }))
|
||||
},
|
||||
// the section is India's: its name in the reader's language (a host adds its own heading if it wants one)
|
||||
title() { const l = getRuntimeLocale() || detectLocale() || 'en'; return countryName('IND', l) || 'India' },
|
||||
actions({ assetsBase, apiBase, lang, profileConfig, t }) {
|
||||
const recordsFor = createPeopleGroupRecords({ apiBase, lang, profileConfig })
|
||||
const sheet = makeIndiaStateSheet({ records: recordsFor, assetsBase, states: () => table, region: REGION })
|
||||
return {
|
||||
records: (c) => (c.slugs && c.slugs.length ? recordsFor({ type: 'pg_slugs', values: c.slugs }) : Promise.resolve([])),
|
||||
sheet: (card, format) => sheet(card, format),
|
||||
unsupported: (c) => (c.noGroups ? t('countryPosters.indiaStateNoGroups') : null),
|
||||
unit: 'UPG', itemCountKey: 'countryPosters.indiaItemCount', eventName: 'doxa-country-posters:show-on-map', downloadPrefix: 'doxa-india-state', cardStocks: true,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "جارٍ توليد الملصق من البيانات الحية…",
|
||||
"error": "تعذَّر توليد الملصق: {msg}",
|
||||
"photos": "فقط {real} من {total} مجموعة في الهند لديها صورة في البيانات؛ المستند المطبوع يحملها، بينما الصورة المسطحة لا تستطيع. هذا التصميم المرقَّم يطبع الأسماء بدون صور لتكون كل مجموعة متساوية وواضحة.",
|
||||
"posterHeader": "باركوا الهند باسم يسوع"
|
||||
"posterHeader": "باركوا الهند باسم يسوع",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "Poster wird aus den Live-Daten erzeugt…",
|
||||
"error": "Poster konnte nicht erzeugt werden: {msg}",
|
||||
"photos": "Nur {real} von {total} indischen Gruppen haben ein Foto in den Daten; ein gedrucktes Dokument trägt sie, ein flaches Bild nicht. Dieses nummerierte Design druckt Namen ohne Fotos, damit jede Gruppe gleich und lesbar ist.",
|
||||
"posterHeader": "Segne Indien im Namen Jesu"
|
||||
"posterHeader": "Segne Indien im Namen Jesu",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "Generating the poster from the live data…",
|
||||
"error": "Couldn't generate the poster: {msg}",
|
||||
"photos": "Only {real} of {total} India groups have a photo in the data; a printed document carries them, a flat image can't. This numbered design prints names without photos so every group is equal and legible.",
|
||||
"posterHeader": "Bless India in Jesus' name"
|
||||
"posterHeader": "Bless India in Jesus' name",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "Generando el póster a partir de los datos en vivo…",
|
||||
"error": "No se pudo generar el póster: {msg}",
|
||||
"photos": "Solo {real} de {total} grupos de la India tienen foto en los datos; un documento impreso las lleva, una imagen plana no. Este diseño numerado imprime los nombres sin fotos para que cada grupo sea igual y legible.",
|
||||
"posterHeader": "Bendice a la India en el nombre de Jesús"
|
||||
"posterHeader": "Bendice a la India en el nombre de Jesús",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "Génération de l'affiche à partir des données en direct…",
|
||||
"error": "Impossible de générer l'affiche : {msg}",
|
||||
"photos": "Seulement {real} des {total} groupes de l'Inde ont une photo dans les données ; un document imprimé les porte, une image plate non. Ce modèle numéroté imprime les noms sans photos pour que chaque groupe soit égal et lisible.",
|
||||
"posterHeader": "Bénissez l'Inde au nom de Jésus"
|
||||
"posterHeader": "Bénissez l'Inde au nom de Jésus",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "लाइव डेटा से पोस्टर बनाया जा रहा है…",
|
||||
"error": "पोस्टर नहीं बन सका: {msg}",
|
||||
"photos": "डेटा में {total} में से केवल {real} भारतीय समूहों के पास फ़ोटो है; मुद्रित दस्तावेज़ उन्हें ले जाता है, सपाट छवि नहीं। यह क्रमांकित डिज़ाइन बिना फ़ोटो के नाम छापता है ताकि हर समूह समान और सुपाठ्य हो।",
|
||||
"posterHeader": "यीशु के नाम में भारत को आशीष दें"
|
||||
"posterHeader": "यीशु के नाम में भारत को आशीष दें",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "Generazione del poster dai dati dal vivo…",
|
||||
"error": "Impossibile generare il poster: {msg}",
|
||||
"photos": "Solo {real} di {total} gruppi dell'India hanno una foto nei dati; un documento stampato le porta, un'immagine piatta no. Questo design numerato stampa i nomi senza foto così ogni gruppo è uguale e leggibile.",
|
||||
"posterHeader": "Benedici l'India nel nome di Gesù"
|
||||
"posterHeader": "Benedici l'India nel nome di Gesù",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "A gerar o pôster a partir dos dados ao vivo…",
|
||||
"error": "Não foi possível gerar o pôster: {msg}",
|
||||
"photos": "Apenas {real} de {total} grupos da Índia têm foto nos dados; um documento impresso leva-as, uma imagem plana não. Este design numerado imprime os nomes sem fotos para que cada grupo seja igual e legível.",
|
||||
"posterHeader": "Abençoe a Índia em nome de Jesus"
|
||||
"posterHeader": "Abençoe a Índia em nome de Jesus",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "Se generează posterul din datele live…",
|
||||
"error": "Nu s-a putut genera posterul: {msg}",
|
||||
"photos": "Doar {real} din {total} grupuri din India au o fotografie în date; un document tipărit le poartă, o imagine plană nu. Acest design numerotat tipărește numele fără fotografii, astfel încât fiecare grup să fie egal și lizibil.",
|
||||
"posterHeader": "Binecuvântează India în numele lui Isus"
|
||||
"posterHeader": "Binecuvântează India în numele lui Isus",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "Плакат создаётся по «живым» данным…",
|
||||
"error": "Не удалось создать плакат: {msg}",
|
||||
"photos": "Только у {real} из {total} народностей Индии есть фото в данных; печатный документ несёт их, плоское изображение — нет. Этот нумерованный дизайн печатает имена без фото, чтобы каждая народность была равной и читаемой.",
|
||||
"posterHeader": "Благословите Индию во имя Иисуса"
|
||||
"posterHeader": "Благословите Индию во имя Иисуса",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,12 @@
|
|||
"generating": "正在根据实时数据生成海报……",
|
||||
"error": "无法生成海报:{msg}",
|
||||
"photos": "数据中 {total} 个印度族群中只有 {real} 个有照片;打印文档能承载它们,而平面图像不能。此编号设计打印名称而不带照片,使每个族群平等且清晰易读。",
|
||||
"posterHeader": "奉耶稣的名祝福印度"
|
||||
"posterHeader": "奉耶稣的名祝福印度",
|
||||
"swpHeading": "Start with Prayer",
|
||||
"swpLead": "India has 36 states and union territories. The Great Commission, state by state:",
|
||||
"swpDisciples": "36 disciples — each praying through one state’s people groups by name.",
|
||||
"swpChurches": "36 churches — each displaying this poster and adopting one state in prayer.",
|
||||
"swpLeaders": "36 indigenous leaders — one per state, equipped with its prayer packet to reach their unreached neighbours.",
|
||||
"swpClose": "Disciples, churches, and leaders — one for each state, until every group is prayed for.",
|
||||
"statesHeading": "India’s 36 states & union territories"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
* const sheet = makeIndiaStateSheet({ records, assetsBase: () => base, states })
|
||||
* <PosterWall :sheet="sheet" /> // (item, format) -> html, '' when it cannot be drawn
|
||||
*
|
||||
* ONE PATH: the wall's state cards draw through this and nothing else (check:country-sheet-one-path).
|
||||
* ONE PATH: the state cards draw through this and nothing else: Country Posters' wall and the library 'indiaState'
|
||||
* poster type (<dxm-poster-section type="indiaState">) both build their cards with stateCards() and their sheets
|
||||
* with makeIndiaStateSheet() (check:country-sheet-one-path).
|
||||
*/
|
||||
|
||||
// The states that get a poster: those with people groups listed, in the wall's own order (most groups first,
|
||||
|
|
@ -20,6 +22,17 @@ export function statesWithPosters(states) {
|
|||
.slice().sort((a, b) => b.count - a.count || String(a.name).localeCompare(String(b.name), 'en'))
|
||||
}
|
||||
|
||||
// The cards, in the wall's order: the states with people groups (a poster each), then those with none listed
|
||||
// (Nagaland, Mizoram), named with a card that says so rather than silently left out.
|
||||
export function stateCards(states, region = 'Asia') {
|
||||
const all = states || []
|
||||
const withGroups = statesWithPosters(all).map((st) => ({
|
||||
id: st.id, iso: st.iso, label: st.name, count: st.count, sheet: '3x3', region, indiaState: true, slugs: st.slugs,
|
||||
}))
|
||||
const none = all.filter((st) => !st.count).map((st) => ({ id: st.id, iso: st.iso, label: st.name, count: 0, indiaState: true, noGroups: true, slugs: [] }))
|
||||
return [...withGroups, ...none]
|
||||
}
|
||||
|
||||
export function stateSeries(states, state) {
|
||||
const tier = statesWithPosters(states)
|
||||
const index = tier.findIndex((s) => s.id === state?.id) + 1
|
||||
|
|
@ -483,7 +483,7 @@
|
|||
"check:composite-token-url": "a composite embedded BARE (no outer ProfileLoader) must honour a tokenUrl-only config: it reads tokenUrl, forwards it, and asks the token service only when no token is given. The expectation is derived from ProfileLoader, not restated. Headless; in gates:pre.",
|
||||
"check:composites-mount": "every capability-4/5 composite's OWN setup() and mounted hooks run without throwing, in en and ar, headless (no browser): vite loads each composite as its bundle entry defines it (configureApp, and ProfileLoader's provides where the entry mounts ProfileLoader), and @vue/runtime-core mounts it on a no-op renderer. Exists because 08f89f55 shipped two composites calling getRuntimeLocale/detectLocale/RTL_LOCALES with no import: the build was green, setup threw a ReferenceError in every locale, and Big Picture and Simple Research rendered nothing. Proves setup runs; cannot prove the children render.",
|
||||
"check:country-names": "every ISO 3166-1 alpha-3 our data uses must resolve to a localized country name. Guards the JOIN, not Intl: library/data/iso3-to-alpha2.json drifting from library/data/countries.json makes a country render as a bare code, which still looks like a value. Checks en/ar/zh (ar is our only RTL locale; zh makes an untranslated Latin code unmistakable) and asserts BOTH directions of drift. Carries two negative arms — an unassigned code and a malformed one — and FAILS if either resolves, because a coverage count cannot otherwise tell a hit from a lookup that returns its input.",
|
||||
"check:country-sheet-one-path": "a country sheet, and an Indian state or union territory sheet, each draw through ONE path (@map/packet/countrySheet.js; country-posters/src/indiaStateSheet.js), so one place cannot print two posters. Parses (comments cannot count) plugin sources: a direct generateCountrySheet FAILS anywhere, a direct generateSheet FAILS inside country-posters outside the state helper, every makeCountrySheet call must pass `countries`, and the known callers must be found. Named data answers: seriesFor over country-posters.json (India 1 of 1, each 3x3 country N of 173, an absent code no series, exactly one no-sheet country); over the served india-states.json + gb-IND-ADM1.geojson: 36 divisions, the 34 with groups numbered 1..34 each with an outline, the rest named, the shared ADM1 never mutated.",
|
||||
"check:country-sheet-one-path": "a country sheet, and an Indian state or union territory sheet, each draw through ONE path (@map/packet/countrySheet.js; library/packet/indiaStateSheet.js), so one place cannot print two posters. Parses (comments cannot count) plugin sources: a direct generateCountrySheet FAILS anywhere, a direct generateSheet FAILS inside country-posters outside the state helper, every makeCountrySheet call must pass `countries`, and the known callers must be found. Named data answers: seriesFor over country-posters.json (India 1 of 1, each 3x3 country N of 173, an absent code no series, exactly one no-sheet country); over the served india-states.json + gb-IND-ADM1.geojson: 36 divisions, the 34 with groups numbered 1..34 each with an outline, the rest named, the shared ADM1 never mutated.",
|
||||
"check:country-sheet-one-path:self-test": "plants each defect check:country-sheet-one-path guards (a direct generateCountrySheet call, makeCountrySheet without countries, the old guard that skipped India, a position given to an absent code) and requires each to FAIL; a comment naming generateCountrySheet must NOT.",
|
||||
"check:coverage-consistent": "the gospel-resources surfaces must agree: no resource on an ISO RESERVED code (und/mul/mis/zxx), every resourced code NAMED, table reach recounted off the pins, no invented URL, tiers reconcile. Static, sub-second. Self-test: `bun run check:coverage-consistent:poison`, all 12 clauses (A-L) must fail. Clause L is the one that is not about consistency: it fails when the link-verification record goes stale, because 'link checked' is a claim about the present tense. Written after the same drift defect was found by hand three times.",
|
||||
"check:csv-shape": "the export must OPEN as a table: header on line 0, every row matching. Run the `check:csv-shape:self-test` script for the NEGATIVE test (forces the provenance comment back to line 0 IN MEMORY and requires this gate to REJECT it) — the header used to claim 'NEGATIVE-TESTED' with no way to re-run it.",
|
||||
|
|
|
|||
|
|
@ -51,6 +51,19 @@
|
|||
|
||||
<p class="bip-photos">{{ t('photos', { real: n(realPhotos), total: n(stats ? stats.placed : 855) }) }}</p>
|
||||
</section>
|
||||
|
||||
<!-- Start with Prayer: the Great Commission triple, one for each of India's 36 states/UTs.
|
||||
English for now (keys carry the English value in every locale until localization reopens). -->
|
||||
<section class="bip-swp" aria-labelledby="bip-swp-h">
|
||||
<h2 id="bip-swp-h" class="bip-swp-h">{{ t('swpHeading') }}</h2>
|
||||
<p class="bip-swp-lead">{{ t('swpLead') }}</p>
|
||||
<ul class="bip-swp-list">
|
||||
<li>{{ t('swpDisciples') }}</li>
|
||||
<li>{{ t('swpChurches') }}</li>
|
||||
<li>{{ t('swpLeaders') }}</li>
|
||||
</ul>
|
||||
<p class="bip-swp-close">{{ t('swpClose') }}</p>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -176,4 +189,10 @@ onBeforeUnmount(() => { if (blobUrl) URL.revokeObjectURL(blobUrl) })
|
|||
.bip-note { color: #55503f; font-size: 14px; }
|
||||
.bip-err { color: #b23b2e; }
|
||||
.bip-photos { font-size: 12px; color: #6b6450; margin-top: 10px; max-width: 70ch; }
|
||||
.bip-swp { max-width: 820px; margin: 28px auto 0; border-top: 2px solid #d9d2c2; padding-top: 18px; }
|
||||
.bip-swp-h { font-size: 18px; margin: 0 0 6px; color: #1c1c17; }
|
||||
.bip-swp-lead { margin: 0 0 10px; font-size: 13.5px; color: #55503f; max-width: 70ch; }
|
||||
.bip-swp-list { margin: 0 0 10px; padding-inline-start: 20px; display: grid; gap: 6px; }
|
||||
.bip-swp-list li { font-size: 13.5px; color: #1c1c17; max-width: 70ch; }
|
||||
.bip-swp-close { margin: 0; font-size: 13px; font-style: italic; color: #55503f; max-width: 70ch; }
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -10,8 +10,15 @@ import { defineCustomElement } from 'vue'
|
|||
import BlessIndiaPosters from './bless-india-posters.vue'
|
||||
import { registerPosterType } from '@map/components/poster/posterTypes.js'
|
||||
import blessIndiaType from './src/blessIndiaPosterType.js'
|
||||
import indiaStateType from '@map/components/poster/types/indiaStatePosterType.js'
|
||||
import { registerPosterSectionElement } from '@map/elements/posterSectionElement.js'
|
||||
|
||||
registerPosterType('blessIndia', blessIndiaType)
|
||||
// The 36-state section under the big poster embeds <dxm-poster-section type="indiaState"> — the SHARED
|
||||
// library type (country-posters owns it; the whole-India card is NOT in it, it stays withheld). Register
|
||||
// the type + define the section element here so this bundle can host the section on its own leaf too.
|
||||
registerPosterType('indiaState', indiaStateType)
|
||||
registerPosterSectionElement()
|
||||
|
||||
const BlessIndiaPostersElement = defineCustomElement(BlessIndiaPosters)
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ import { isPhonePrint } from '@map/composables/printInPlace.js'
|
|||
import { keyedError } from '@map/i18n/keyedError.js'
|
||||
// India's states and union territories: the shared table (fetched when the wall shows them) and their sheet.
|
||||
import { loadIndiaStates } from '@map/data/indiaStates.js'
|
||||
import { makeIndiaStateSheet, statesWithPosters } from './src/indiaStateSheet.js'
|
||||
import { makeIndiaStateSheet, stateCards } from '@map/packet/indiaStateSheet.js'
|
||||
// The regions catalogue holds the not-yet sentence a host's country gets when no poster exists (all eleven locales);
|
||||
// its keys are English sentences with dots, so it is read by literal key, the way regions-list.vue reads it.
|
||||
import { useRegionsI18n } from '@map/i18n/useRegionsI18n.js'
|
||||
|
|
@ -128,11 +128,7 @@ const INDIA_REGION = (byIso3.get('IND') || {}).region || 'Asia'
|
|||
const stateItems = computed(() => {
|
||||
const all = indiaStates.value
|
||||
if (filtered.value || !all) return []
|
||||
const withGroups = statesWithPosters(all).map((st) => ({
|
||||
id: st.id, iso: st.iso, label: st.name, count: st.count, sheet: '3x3', region: INDIA_REGION, indiaState: true, slugs: st.slugs,
|
||||
}))
|
||||
const none = all.filter((st) => !st.count).map((st) => ({ id: st.id, iso: st.iso, label: st.name, count: 0, indiaState: true, noGroups: true, slugs: [] }))
|
||||
return [...withGroups, ...none]
|
||||
return stateCards(all, INDIA_REGION)
|
||||
})
|
||||
|
||||
const items = computed(() => {
|
||||
|
|
@ -187,7 +183,7 @@ const sheetForRecord = makeCountrySheet({
|
|||
countries: data.countries || [],
|
||||
})
|
||||
const countryOnlySheet = (card, format) => sheetForRecord(byId.get(card.id) || card, format)
|
||||
// A state's sheet through its own ONE path (src/indiaStateSheet.js), in India's hue and the indiaState series.
|
||||
// A state's sheet through its own ONE path (@map/packet/indiaStateSheet.js), in India's hue and the indiaState series.
|
||||
const stateSheet = makeIndiaStateSheet({
|
||||
records: recordsFor, assetsBase: () => assetsBase.value, states: () => indiaStates.value, region: INDIA_REGION,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -31,6 +31,21 @@ const REGIONS_LIST = 'plugin-designs/regions-dashboard/regions-list.vue'
|
|||
const COUNTRY_TYPE = 'library/components/poster/types/countryPosterType.js'
|
||||
// ARM H: the library 'country' type (the element's caller) withholds like the wall: rows reject with the sentence,
|
||||
// a withheld poster's card shows the sentence.
|
||||
// ARM I: the library 'indiaState' type (<dxm-poster-section type="indiaState">, Bless India's states) is the SAME
|
||||
// engine as the wall's India section: both build their cards with stateCards() and their sheets with
|
||||
// makeIndiaStateSheet() from @map/packet/indiaStateSheet.js; the type never reaches the whole-India card or its sheet.
|
||||
const STATE_TYPE = 'library/components/poster/types/indiaStatePosterType.js'
|
||||
export function armI(H, states, typeSrc, wallSrc) {
|
||||
const fails = []
|
||||
if (!/import \{[^}]*\bmakeIndiaStateSheet\b[^}]*\bstateCards\b[^}]*\} from '@map\/packet\/indiaStateSheet\.js'/.test(typeSrc)) fails.push(`${STATE_TYPE}: does not build through @map/packet/indiaStateSheet.js (stateCards + makeIndiaStateSheet): a second engine`)
|
||||
if (/makeCountrySheet|country-ind|'IND'\s*\)\s*\?/.test(typeSrc.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\/\/.*$/gm, '').replace(/c\.iso3 === 'IND'/, ''))) fails.push(`${STATE_TYPE}: reaches the whole-India card or its sheet (it must stay withheld)`)
|
||||
if (!/stateCards\(/.test(wallSrc)) fails.push('country-poster-wall.vue builds its own state cards: it must use stateCards() (one engine with the indiaState type)')
|
||||
const cards = H.stateCards ? H.stateCards(states, 'Asia') : []
|
||||
if (cards.length !== states.length) fails.push(`stateCards() gives ${cards.length} cards for ${states.length} states/UTs`)
|
||||
if (cards.some((c) => c.id === 'country-ind' || !c.indiaState)) fails.push('stateCards() returns a non-state card')
|
||||
return fails
|
||||
}
|
||||
|
||||
export function armH(typeSrc) {
|
||||
const fails = []
|
||||
if (!/makeCountrySheet\(/.test(typeSrc)) fails.push(`${COUNTRY_TYPE}: no longer draws through makeCountrySheet`)
|
||||
|
|
@ -40,7 +55,7 @@ export function armH(typeSrc) {
|
|||
}
|
||||
// India's states and union territories draw through their own ONE path; inside this plugin only that helper may
|
||||
// call the generator directly.
|
||||
const STATE_HELPER = 'plugin-designs/country-posters/src/indiaStateSheet.js'
|
||||
const STATE_HELPER = 'library/packet/indiaStateSheet.js'
|
||||
const STATE_CALLER = 'plugin-designs/country-posters/country-poster-wall.vue'
|
||||
|
||||
function scriptsOf(file, src) {
|
||||
|
|
@ -271,6 +286,7 @@ async function main() {
|
|||
const REG = readFileSync(join(ROOT, 'plugin-designs/regions-dashboard/regions-list.vue'), 'utf8')
|
||||
const MFE = readFileSync(join(ROOT, 'plugin-designs/country-posters/country-posters-mfe.vue'), 'utf8')
|
||||
const TYPE = readFileSync(join(ROOT, COUNTRY_TYPE), 'utf8')
|
||||
const TYPE_STATE = readFileSync(join(ROOT, STATE_TYPE), 'utf8')
|
||||
const regIsCaller = /makeCountrySheet\(/.test(REG)
|
||||
const lists = (wallSrc, regSrc = REG) => (regIsCaller ? { wall: wallSrc, regions: regSrc } : { wall: wallSrc })
|
||||
if (selfTest) {
|
||||
|
|
@ -302,6 +318,9 @@ async function main() {
|
|||
['the India tab shown on the pilot by dev mode alone', async () => armG(CS, lists(files[wall]), MFE.replace(' && previewOptedIn() ? [INDIA_PANE]', ' ? [INDIA_PANE]'))],
|
||||
['the wall prints the list of a country whose rows are withheld', async () => armG(CS, lists(files[wall].replace('rowsWithheld(c) ? withheld() : ', '')))],
|
||||
['the library type prints withheld rows', () => armH(TYPE.replace('rowsWithheld(c) ? ', 'false ? '))],
|
||||
['the indiaState type draws a second way', () => armI(H, states, TYPE_STATE.replace("from '@map/packet/indiaStateSheet.js'", "from './myOwnStateSheet.js'"), files[wall])],
|
||||
['the indiaState type reaches the whole-India sheet', () => armI(H, states, TYPE_STATE + "\nimport { makeCountrySheet } from '@map/packet/countrySheet.js'", files[wall])],
|
||||
['the wall builds its own state cards again', () => armI(H, states, TYPE_STATE, files[wall].replace('stateCards(all, INDIA_REGION)', 'all.map((st) => st)'))],
|
||||
['the library type shows a withheld poster', () => armH(TYPE.replace('posterWithheld(c) ||', 'false ||'))],
|
||||
['a helper that mutates the shared ADM1', () => armC({ ...H, stateGeometry: (z, a, n) => { (a.features || []).forEach((f) => { if (f.properties.shapeName === n) f.properties.listId = z.id }); return H.stateGeometry(z, a, n) } }, states, JSON.parse(JSON.stringify(adm1Ind)))],
|
||||
]
|
||||
|
|
@ -322,7 +341,7 @@ async function main() {
|
|||
|
||||
const callers = []
|
||||
const E = armE(countries, states, files['plugin-designs/country-posters/country-poster-wall.vue'], readFileSync(join(ROOT, 'library/components/poster/PosterWall.vue'), 'utf8'), H)
|
||||
const G = [...await armG(CS, lists(files['plugin-designs/country-posters/country-poster-wall.vue']), MFE), ...armH(TYPE)]
|
||||
const G = [...await armG(CS, lists(files['plugin-designs/country-posters/country-poster-wall.vue']), MFE), ...armH(TYPE), ...armI(H, states, TYPE_STATE, files['plugin-designs/country-posters/country-poster-wall.vue'])]
|
||||
const fails = [...armA(files, callers), ...armB(seriesFor, countries, sheetFormatFor), ...armC(H, states, adm1Ind), ...G, ...E.fails, ...armD(states, areas, meta), ...armF(lists(files['plugin-designs/country-posters/country-poster-wall.vue']))]
|
||||
const missing = [...KNOWN_CALLERS, `${STATE_CALLER}#state`].filter((k) => !callers.includes(k))
|
||||
if (missing.length) fails.push(`known callers not found calling makeCountrySheet: ${missing.join(', ')}`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue