@icij/murmur-next 4.0.6 → 4.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/components/AccordionStep.vue.d.ts +2 -1
- package/dist/lib/components/AccordionWrapper.vue.d.ts +2 -1
- package/dist/lib/components/AdvancedLinkForm.vue.d.ts +5 -4
- package/dist/lib/components/BrandExpansion.vue.d.ts +3 -2
- package/dist/lib/components/ConfirmButton.vue.d.ts +2 -1
- package/dist/lib/components/ContentPlaceholder.vue.d.ts +3 -2
- package/dist/lib/components/CustomPagination.vue.d.ts +6 -5
- package/dist/lib/components/DonateForm.vue.d.ts +5 -4
- package/dist/lib/components/EmbedForm.vue.d.ts +5 -4
- package/dist/lib/components/FollowUsPopover.vue.d.ts +5 -4
- package/dist/lib/components/GenericFooter.vue.d.ts +2 -1
- package/dist/lib/components/GenericHeader.vue.d.ts +232 -231
- package/dist/lib/components/HapticCopy.vue.d.ts +7 -5
- package/dist/lib/components/ImddbHeader.vue.d.ts +231 -230
- package/dist/lib/components/OrdinalLegend.vue.d.ts +2 -1
- package/dist/lib/components/RangePicker.vue.d.ts +3 -2
- package/dist/lib/components/ResponsiveIframe.vue.d.ts +4 -2
- package/dist/lib/components/ScaleLegend.vue.d.ts +1 -1
- package/dist/lib/components/SelectableDropdown.vue.d.ts +3 -2
- package/dist/lib/components/SharingOptions.vue.d.ts +2 -1
- package/dist/lib/components/SharingOptionsLink.vue.d.ts +2 -1
- package/dist/lib/components/SignUpForm.vue.d.ts +6 -5
- package/dist/lib/components/SlideUpDown.vue.d.ts +3 -2
- package/dist/lib/components/TexturedDeck.vue.d.ts +2 -1
- package/dist/lib/components/TinyPagination.vue.d.ts +9 -8
- package/dist/lib/composables/chart.d.ts +2 -1
- package/dist/lib/composables/resizeObserver.d.ts +2 -1
- package/dist/lib/composables/sendEmail.d.ts +2 -1
- package/dist/lib/config.d.ts +0 -1
- package/dist/lib/datavisualisations/ColumnChart.vue.d.ts +2 -1
- package/dist/lib/datavisualisations/LineChart.vue.d.ts +1 -1
- package/dist/lib/datavisualisations/StackedBarChart.vue.d.ts +1 -1
- package/dist/lib/datavisualisations/StackedColumnChart.vue.d.ts +1 -1
- package/dist/lib/i18n.d.ts +2 -2
- package/dist/lib/main.d.ts +11 -4
- package/dist/lib/maps/ChoroplethMap.vue.d.ts +2 -2
- package/dist/lib/maps/SymbolMap.vue.d.ts +2 -1
- package/dist/lib/murmur.css +1 -1
- package/dist/lib/murmur.js +15996 -17076
- package/dist/lib/murmur.js.map +1 -1
- package/dist/lib/murmur.umd.cjs +52 -60
- package/dist/lib/murmur.umd.cjs.map +1 -1
- package/dist/lib/types.d.ts +6 -3
- package/dist/lib/utils/assets.d.ts +1 -1
- package/dist/lib/utils/iframe-resizer.d.ts +1 -1
- package/dist/lib/utils/placeholder.d.ts +0 -1
- package/dist/lib/utils/placeholderTypes.d.ts +3 -2
- package/lib/i18n.ts +5 -4
- package/lib/main.ts +37 -12
- package/package.json +1 -1
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="@/shims-vue" />
|
|
2
|
+
/// <reference types="node_modules/vue-i18n/dist/vue-i18n" />
|
|
3
|
+
import type { StyleValue } from '../node_modules/vue';
|
|
2
4
|
import { AccordionKey, ParentKey } from './keys';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
+
import { ComputedRef } from '../node_modules/vue';
|
|
6
|
+
import type { GeoProjection } from 'd3-geo';
|
|
7
|
+
import { Ref } from '../node_modules/vue';
|
|
5
8
|
export type Step = symbol | string;
|
|
6
9
|
export type Accordion = {
|
|
7
10
|
emitAccordionNextStepEvent: () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const injectAsset: ((file: string, id?: string) => Promise<unknown>) & import(
|
|
1
|
+
export declare const injectAsset: ((file: string, id?: string) => Promise<unknown>) & import("lodash").MemoizedFunction;
|
|
2
2
|
export declare const injectAssets: (...args: string[]) => Promise<void>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BoxStyle, ContentPlaceholderStyledRows, ContentPlaceholderRows } from './placeholderTypes';
|
|
2
|
-
|
|
3
2
|
export declare function isFlexBasis(value: string | number): boolean;
|
|
4
3
|
export declare function isWidth(value: string | number): boolean;
|
|
5
4
|
export declare function getBoxStyle(left: number, width: number, isLast: boolean, subClass?: string): BoxStyle[];
|
package/lib/i18n.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { createI18n, I18n } from 'vue-i18n'
|
|
1
|
+
import { createI18n, I18n, I18nOptions } from 'vue-i18n'
|
|
2
2
|
|
|
3
3
|
import fr from '@/locales/fr.json'
|
|
4
4
|
import en from '@/locales/en.json'
|
|
5
5
|
|
|
6
6
|
export const locale: string = 'en'
|
|
7
7
|
export const fallbackLocale: string = 'en'
|
|
8
|
-
|
|
9
|
-
export const i18n: I18n = createI18n({
|
|
8
|
+
export const options: I18nOptions = {
|
|
10
9
|
warnHtmlMessage: false,
|
|
10
|
+
// https://vue-i18n.intlify.dev/guide/advanced/composition.html#implicit-with-injected-properties-and-functions
|
|
11
11
|
globalInjection: true,
|
|
12
12
|
legacy: false,
|
|
13
13
|
locale,
|
|
14
14
|
fallbackLocale,
|
|
15
15
|
messages: { fr, en }
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
export const i18n: I18n = createI18n(options)
|
package/lib/main.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as components from './components'
|
|
|
4
4
|
import * as datavisualisations from './datavisualisations'
|
|
5
5
|
import * as maps from './maps'
|
|
6
6
|
import config from './config'
|
|
7
|
-
import { App,Component,DefineComponent } from 'vue'
|
|
7
|
+
import { App,Component, DefineComponent } from 'vue'
|
|
8
8
|
|
|
9
9
|
export { default as AccordionWrapper } from './components/AccordionWrapper.vue'
|
|
10
10
|
export { default as AccordionStep } from './components/AccordionStep.vue'
|
|
@@ -48,6 +48,12 @@ export { default as SymbolMap } from './maps/SymbolMap.vue'
|
|
|
48
48
|
|
|
49
49
|
type ComponentMap = {[name:string]:Component|DefineComponent}
|
|
50
50
|
|
|
51
|
+
type PluginOptions = {
|
|
52
|
+
useI18n?: boolean,
|
|
53
|
+
useBootstrap?: boolean,
|
|
54
|
+
useConfig?: boolean,
|
|
55
|
+
registerComponents?: boolean
|
|
56
|
+
}
|
|
51
57
|
|
|
52
58
|
const Murmur = {
|
|
53
59
|
get i18n() {
|
|
@@ -79,18 +85,37 @@ const Murmur = {
|
|
|
79
85
|
// @ts-expect-error not sure why typescript sees an error here
|
|
80
86
|
return Murmur.i18n.global.locale.value
|
|
81
87
|
},
|
|
82
|
-
install(app: App<Element
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
install(app: App<Element>, {
|
|
89
|
+
useI18n = true,
|
|
90
|
+
useBootstrap = true,
|
|
91
|
+
useConfig = true,
|
|
92
|
+
registerComponents = true
|
|
93
|
+
}: PluginOptions = {}) {
|
|
94
|
+
|
|
95
|
+
if (useBootstrap) {
|
|
96
|
+
app.use(createBootstrap())
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (useI18n) {
|
|
100
|
+
app.use(Murmur.i18n)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (useConfig) {
|
|
104
|
+
app.config.globalProperties.$config = Murmur.config
|
|
105
|
+
}
|
|
85
106
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
107
|
+
if (registerComponents) {
|
|
108
|
+
Object.keys(this.components).forEach((key) =>
|
|
109
|
+
app.component(key, this.components[key])
|
|
110
|
+
)
|
|
111
|
+
Object.keys(this.datavisualisations).forEach((key) =>
|
|
112
|
+
app.component(key, this.datavisualisations[key])
|
|
113
|
+
)
|
|
114
|
+
Object.keys(this.maps).forEach((key) =>
|
|
115
|
+
app.component(key, this.maps[key])
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
94
119
|
}
|
|
95
120
|
}
|
|
96
121
|
|