doxa-maps/plugin-designs/all-people-groups/index.js

33 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* app-profiles/all-people-groups/index.js
*
* Bundle entry for the ALL PEOPLE GROUPS map — every people group on earth
* (peoplegroups.org, 12,379 group×country rows) around the DOXA set.
*
* Usage from a host page:
* <script src="/doxa-maps/all-people-groups/all-people-groups.js"></script>
* <all-people-groups profile-config='{"profile":"all-people-groups"}'></all-people-groups>
*/
import { defineCustomElement } from 'vue'
import { createPinia } from 'pinia'
import ProfileLoader from '@map/ProfileLoader.vue'
import { createAppI18n } from '@map/i18n/index.js'
const profileModules = import.meta.glob('./*.vue')
const AllPeopleGroupsElement = defineCustomElement(ProfileLoader, {
configureApp(app) {
app.use(createPinia())
const i18n = createAppI18n()
app.use(i18n)
app.provide('appI18n', i18n)
app.provide('profileModules', profileModules)
}
})
if (typeof customElements !== 'undefined' && !customElements.get('all-people-groups')) {
customElements.define('all-people-groups', AllPeopleGroupsElement)
}
export default AllPeopleGroupsElement