@icij/murmur-next 4.0.4 → 4.0.6
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 -3
- package/dist/lib/components/AccordionWrapper.vue.d.ts +1 -2
- package/dist/lib/components/ActiveTextTruncate.vue.d.ts +2 -2
- package/dist/lib/components/AdvancedLinkForm.vue.d.ts +5 -6
- package/dist/lib/components/Brand.vue.d.ts +8 -8
- package/dist/lib/components/BrandExpansion.vue.d.ts +6 -7
- package/dist/lib/components/ConfirmButton.vue.d.ts +1 -2
- package/dist/lib/components/ContentPlaceholder.vue.d.ts +2 -3
- package/dist/lib/components/CustomPagination.vue.d.ts +9 -10
- package/dist/lib/components/DigitsInput.vue.d.ts +3 -3
- package/dist/lib/components/DonateForm.vue.d.ts +4 -5
- package/dist/lib/components/EmbedForm.vue.d.ts +7 -8
- package/dist/lib/components/FollowUsPopover.vue.d.ts +4 -5
- package/dist/lib/components/GenericFooter.vue.d.ts +1 -2
- package/dist/lib/components/GenericHeader.vue.d.ts +283 -284
- package/dist/lib/components/HapticCopy.vue.d.ts +6 -8
- package/dist/lib/components/ImddbHeader.vue.d.ts +282 -283
- package/dist/lib/components/OrdinalLegend.vue.d.ts +8 -9
- package/dist/lib/components/RangePicker.vue.d.ts +10 -14
- package/dist/lib/components/ResponsiveIframe.vue.d.ts +2 -3
- package/dist/lib/components/ScaleLegend.vue.d.ts +2 -2
- package/dist/lib/components/SecretInput.vue.d.ts +3 -3
- package/dist/lib/components/SelectableDropdown.vue.d.ts +6 -7
- package/dist/lib/components/SharingOptions.vue.d.ts +1 -2
- package/dist/lib/components/SharingOptionsLink.vue.d.ts +2 -3
- package/dist/lib/components/SignUpForm.vue.d.ts +5 -6
- package/dist/lib/components/SlideUpDown.vue.d.ts +3 -4
- package/dist/lib/components/TexturedDeck.vue.d.ts +3 -4
- package/dist/lib/components/TinyPagination.vue.d.ts +15 -16
- package/dist/lib/composables/chart.d.ts +7 -8
- package/dist/lib/composables/resizeObserver.d.ts +1 -2
- package/dist/lib/composables/sendEmail.d.ts +1 -2
- package/dist/lib/config.d.ts +3 -2
- package/dist/lib/datavisualisations/BarChart.vue.d.ts +6 -8
- package/dist/lib/datavisualisations/ColumnChart.vue.d.ts +7 -4
- package/dist/lib/datavisualisations/LineChart.vue.d.ts +17 -9
- package/dist/lib/datavisualisations/StackedBarChart.vue.d.ts +4 -8
- package/dist/lib/datavisualisations/StackedColumnChart.vue.d.ts +4 -4
- package/dist/lib/i18n.d.ts +1 -0
- package/dist/lib/main.d.ts +11 -8
- package/dist/lib/maps/ChoroplethMap.vue.d.ts +10 -4
- package/dist/lib/maps/ChoroplethMapAnnotation.vue.d.ts +3 -3
- package/dist/lib/maps/SymbolMap.vue.d.ts +8 -8
- package/dist/lib/murmur.css +1 -1
- package/dist/lib/murmur.js +17563 -16205
- package/dist/lib/murmur.js.map +1 -1
- package/dist/lib/murmur.umd.cjs +60 -52
- package/dist/lib/murmur.umd.cjs.map +1 -1
- package/dist/lib/types.d.ts +4 -7
- package/dist/lib/utils/assets.d.ts +1 -1
- package/dist/lib/utils/iframe-resizer.d.ts +1 -0
- package/dist/lib/utils/placeholder.d.ts +1 -0
- package/dist/lib/utils/placeholderTypes.d.ts +2 -3
- package/lib/components/Brand.vue +9 -9
- package/lib/components/OrdinalLegend.vue +1 -1
- package/lib/components/RangePicker.vue +15 -9
- package/lib/composables/chart.ts +10 -7
- package/lib/composables/resizeObserver.ts +1 -1
- package/lib/composables/sendEmail.ts +0 -1
- package/lib/config.ts +2 -2
- package/lib/locales/en.json +1 -1
- package/lib/locales/fr.json +1 -1
- package/lib/main.ts +18 -12
- package/lib/maps/ChoroplethMap.vue +1 -1
- package/lib/maps/ChoroplethMapAnnotation.vue +2 -2
- package/lib/maps/SymbolMap.vue +5 -4
- package/lib/shims-pym.d.ts +7 -0
- package/lib/shims-vue.d.ts +1 -1
- package/lib/types.ts +5 -5
- package/lib/utils/iframe-resizer.ts +1 -1
- package/lib/utils/placeholder.ts +0 -1
- package/package.json +49 -43
- package/lib/locales/locales/en.json +0 -140
- package/lib/locales/locales/fr.json +0 -117
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="node_modules/vue-i18n/dist/vue-i18n" />
|
|
3
|
-
import type { StyleValue } from '../node_modules/vue';
|
|
1
|
+
import { StyleValue, ComputedRef, Ref } from '../node_modules/vue';
|
|
4
2
|
import { AccordionKey, ParentKey } from './keys';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { Ref } from '../node_modules/vue';
|
|
3
|
+
import { GeoProjection } from 'd3-geo';
|
|
4
|
+
|
|
8
5
|
export type Step = symbol | string;
|
|
9
6
|
export type Accordion = {
|
|
10
7
|
emitAccordionNextStepEvent: () => void;
|
|
@@ -37,7 +34,7 @@ export type MapTransform = {
|
|
|
37
34
|
export type ParentMap = {
|
|
38
35
|
mapRect: Ref<DOMRect>;
|
|
39
36
|
mapTransform: Ref<MapTransform>;
|
|
40
|
-
rotatingMapProjection: ComputedRef<GeoProjection |
|
|
37
|
+
rotatingMapProjection: ComputedRef<GeoProjection | (() => number[])>;
|
|
41
38
|
};
|
|
42
39
|
export type ParentMapProvide = {
|
|
43
40
|
[ParentKey]: ParentMap;
|
|
@@ -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,4 +1,5 @@
|
|
|
1
1
|
import { BoxStyle, ContentPlaceholderStyledRows, ContentPlaceholderRows } from './placeholderTypes';
|
|
2
|
+
|
|
2
3
|
export declare function isFlexBasis(value: string | number): boolean;
|
|
3
4
|
export declare function isWidth(value: string | number): boolean;
|
|
4
5
|
export declare function getBoxStyle(left: number, width: number, isLast: boolean, subClass?: string): BoxStyle[];
|
package/lib/components/Brand.vue
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import { computed, ref } from 'vue'
|
|
29
29
|
import isString from 'lodash/isString'
|
|
30
|
+
import { CSSProperties } from 'vue';
|
|
30
31
|
|
|
31
32
|
interface BrandProps {
|
|
32
33
|
/**
|
|
@@ -36,11 +37,11 @@ interface BrandProps {
|
|
|
36
37
|
/**
|
|
37
38
|
* Monochromatic logo's color
|
|
38
39
|
*/
|
|
39
|
-
color?: string |
|
|
40
|
+
color?: string | undefined
|
|
40
41
|
/**
|
|
41
42
|
* Logo's background color
|
|
42
43
|
*/
|
|
43
|
-
background?: string |
|
|
44
|
+
background?: string | undefined
|
|
44
45
|
/**
|
|
45
46
|
* Logo's size
|
|
46
47
|
*/
|
|
@@ -51,16 +52,15 @@ interface BrandProps {
|
|
|
51
52
|
square?: boolean
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
interface BrandStyle {
|
|
55
|
-
'--monochrome-color': string |
|
|
56
|
-
|
|
57
|
-
background: string | null
|
|
58
|
-
width: string | number
|
|
55
|
+
interface BrandStyle extends CSSProperties{
|
|
56
|
+
'--monochrome-color': string | undefined;
|
|
57
|
+
width: string | number;
|
|
59
58
|
}
|
|
60
59
|
|
|
60
|
+
|
|
61
61
|
const props = withDefaults(defineProps<BrandProps>(), {
|
|
62
|
-
color:
|
|
63
|
-
background:
|
|
62
|
+
color: undefined,
|
|
63
|
+
background: undefined,
|
|
64
64
|
size: '70px'
|
|
65
65
|
})
|
|
66
66
|
const sizeAsNumber = ref(
|
|
@@ -3,7 +3,7 @@ import { get, isFunction, kebabCase, uniqueId } from 'lodash'
|
|
|
3
3
|
import * as d3 from 'd3'
|
|
4
4
|
import { defineComponent, PropType, computed } from 'vue'
|
|
5
5
|
|
|
6
|
-
type Datum = { id
|
|
6
|
+
type Datum = { id?: string; color: string; path?: string; label: string }
|
|
7
7
|
type Category = 'id' | 'color' | 'path' | 'label'
|
|
8
8
|
export default defineComponent({
|
|
9
9
|
name: 'OrdinalLegend',
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
toRef
|
|
12
12
|
} from 'vue'
|
|
13
13
|
import { faGripLinesVertical } from '@fortawesome/free-solid-svg-icons/faGripLinesVertical'
|
|
14
|
-
import { clamp,
|
|
14
|
+
import { clamp, round } from 'lodash'
|
|
15
15
|
|
|
16
16
|
import Fa, { library } from './Fa'
|
|
17
17
|
|
|
18
18
|
import type { Variant } from '@/types'
|
|
19
|
-
|
|
19
|
+
type DragDropValue = {detail:number}
|
|
20
20
|
/**
|
|
21
21
|
* A component to wrap an HTML element with a range picker overlay.
|
|
22
22
|
*/
|
|
@@ -39,7 +39,7 @@ export default defineComponent({
|
|
|
39
39
|
name: string
|
|
40
40
|
data?: any
|
|
41
41
|
}) {
|
|
42
|
-
vnode.el
|
|
42
|
+
vnode.el?.dispatchEvent(new CustomEvent(name, { detail: data }))
|
|
43
43
|
//const handlers = get(vnode, 'data.on') ?? get(vnode, 'componentOptions.listeners')
|
|
44
44
|
/*if (has(handlers, name)) {
|
|
45
45
|
invoke(handlers, `${name}.fns`, data)
|
|
@@ -216,19 +216,19 @@ export default defineComponent({
|
|
|
216
216
|
}
|
|
217
217
|
})
|
|
218
218
|
|
|
219
|
-
function toggleMoving(value) {
|
|
219
|
+
function toggleMoving(value:boolean) {
|
|
220
220
|
moving.value = value ?? !moving.value
|
|
221
221
|
}
|
|
222
|
-
function toggleResizing(value) {
|
|
222
|
+
function toggleResizing(value:boolean) {
|
|
223
223
|
resizing.value = value ?? !resizing.value
|
|
224
224
|
}
|
|
225
|
-
function snapValue(value): number {
|
|
225
|
+
function snapValue(value:number): number {
|
|
226
226
|
return round(value / props.snap) * props.snap
|
|
227
227
|
}
|
|
228
228
|
function rangeWidth(): number {
|
|
229
229
|
return rangePickerBounds.value?.getBoundingClientRect().width ?? 0
|
|
230
230
|
}
|
|
231
|
-
function dragStartBound({ detail: dx }) {
|
|
231
|
+
function dragStartBound({ detail: dx }:DragDropValue) {
|
|
232
232
|
const newValue = snapValue(dx / rangeWidth())
|
|
233
233
|
// Ensure start value doesn't get too close to end value
|
|
234
234
|
if (newValue < end.value - props.minDistance) {
|
|
@@ -241,7 +241,7 @@ export default defineComponent({
|
|
|
241
241
|
emit('update:range', [start.value, end.value])
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
function dragEndBound({ detail: dx }) {
|
|
244
|
+
function dragEndBound({ detail: dx }:DragDropValue) {
|
|
245
245
|
const newValue = snapValue(dx / rangeWidth())
|
|
246
246
|
// Ensure end value doesn't get too close to start value
|
|
247
247
|
if (newValue > start.value + props.minDistance) {
|
|
@@ -254,7 +254,7 @@ export default defineComponent({
|
|
|
254
254
|
emit('update:range', [start.value, end.value])
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
function dragBounds({ detail: dx }) {
|
|
257
|
+
function dragBounds({ detail: dx }:DragDropValue) {
|
|
258
258
|
const diff = snapValue(end.value - start.value)
|
|
259
259
|
const newValue = snapValue(dx / rangeWidth())
|
|
260
260
|
start.value = round(newValue, props.precision)
|
|
@@ -269,6 +269,12 @@ export default defineComponent({
|
|
|
269
269
|
function valueWithUnit(value: number | string): string {
|
|
270
270
|
return typeof value === 'number' ? `${value}px` : `${value}`
|
|
271
271
|
}
|
|
272
|
+
|
|
273
|
+
watch(()=>props.range, (newRange) => {
|
|
274
|
+
start.value = newRange[0] ?? 0
|
|
275
|
+
end.value = newRange[1] ?? 0
|
|
276
|
+
})
|
|
277
|
+
|
|
272
278
|
return {
|
|
273
279
|
rangePickerBounds,
|
|
274
280
|
start,
|
package/lib/composables/chart.ts
CHANGED
|
@@ -98,11 +98,11 @@ export function useChart(
|
|
|
98
98
|
props: ChartProps,
|
|
99
99
|
{ emit }: ChartEmit,
|
|
100
100
|
isLoaded: Ref<boolean>,
|
|
101
|
-
onResized?:
|
|
101
|
+
onResized?: ()=>void,
|
|
102
102
|
afterLoaded?: () => Promise<any>
|
|
103
103
|
): Chart {
|
|
104
104
|
const { resizeRef, resizeState } = useResizeObserver(resizableRef)
|
|
105
|
-
const loadedData = ref([])
|
|
105
|
+
const loadedData = ref<unknown|unknown[]>([])
|
|
106
106
|
|
|
107
107
|
onMounted(async () => {
|
|
108
108
|
await document.fonts?.ready
|
|
@@ -110,7 +110,7 @@ export function useChart(
|
|
|
110
110
|
watchEffect(async () => {
|
|
111
111
|
if (!isLoaded.value) {
|
|
112
112
|
if (isString(props.data)) {
|
|
113
|
-
// @ts-
|
|
113
|
+
// @ts-expect-error introspection in typescript is tricky
|
|
114
114
|
loadedData.value = await d3[props.dataUrlType](props.data)
|
|
115
115
|
} else {
|
|
116
116
|
loadedData.value = props.data as unknown as []
|
|
@@ -134,11 +134,14 @@ export function useChart(
|
|
|
134
134
|
defaultWidth = null,
|
|
135
135
|
defaultHeight = null
|
|
136
136
|
} = {}) {
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
const returnDefault = { width: defaultWidth, height: defaultHeight }
|
|
138
|
+
if(!isLoaded.value || !resizeRef.value){
|
|
139
|
+
return returnDefault
|
|
140
|
+
}
|
|
141
|
+
const elements: NodeListOf<SVGGraphicsElement> = resizeRef.value.querySelectorAll(selector)
|
|
142
|
+
|
|
140
143
|
if (elements.length == 0) {
|
|
141
|
-
return
|
|
144
|
+
return returnDefault
|
|
142
145
|
}
|
|
143
146
|
const width = max(
|
|
144
147
|
[...elements].map((l) => {
|
|
@@ -2,7 +2,6 @@ import jsonp from 'jsonp'
|
|
|
2
2
|
import { computed, MaybeRefOrGetter, toValue } from 'vue'
|
|
3
3
|
import flatten from 'lodash/flatten'
|
|
4
4
|
import castArray from 'lodash/castArray'
|
|
5
|
-
import { Ref } from 'react'
|
|
6
5
|
|
|
7
6
|
type FormDataResult = { result: string; msg: string }
|
|
8
7
|
// by convention, composable function names start with "use"
|
package/lib/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import get from 'lodash/get'
|
|
2
2
|
import each from 'lodash/each'
|
|
3
|
-
import {
|
|
3
|
+
import { ref } from 'vue'
|
|
4
4
|
import defaultValues from './config.default'
|
|
5
5
|
import { Ref } from '@vue/runtime-core'
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ export class Config {
|
|
|
32
32
|
}
|
|
33
33
|
return value
|
|
34
34
|
}
|
|
35
|
-
get(key: string, defaultValue?:
|
|
35
|
+
get(key: string, defaultValue?: NonNullable<unknown> | null) {
|
|
36
36
|
return get(this._VALUES.value, key, defaultValue)
|
|
37
37
|
}
|
|
38
38
|
is(key: string) {
|
package/lib/locales/en.json
CHANGED
package/lib/locales/fr.json
CHANGED
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 {
|
|
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'
|
|
@@ -46,6 +46,9 @@ export { default as StackedBarChart } from './datavisualisations/StackedBarChart
|
|
|
46
46
|
export { default as ChoroplethMap } from './maps/ChoroplethMap.vue'
|
|
47
47
|
export { default as SymbolMap } from './maps/SymbolMap.vue'
|
|
48
48
|
|
|
49
|
+
type ComponentMap = {[name:string]:Component|DefineComponent}
|
|
50
|
+
|
|
51
|
+
|
|
49
52
|
const Murmur = {
|
|
50
53
|
get i18n() {
|
|
51
54
|
return i18n
|
|
@@ -53,9 +56,15 @@ const Murmur = {
|
|
|
53
56
|
get config() {
|
|
54
57
|
return config
|
|
55
58
|
},
|
|
56
|
-
get components() {
|
|
59
|
+
get components() :ComponentMap{
|
|
57
60
|
return components
|
|
58
61
|
},
|
|
62
|
+
get datavisualisations() : ComponentMap{
|
|
63
|
+
return datavisualisations
|
|
64
|
+
},
|
|
65
|
+
get maps() : ComponentMap{
|
|
66
|
+
return maps
|
|
67
|
+
},
|
|
59
68
|
setLocaleMessage(lang: string, message: any) {
|
|
60
69
|
return Murmur.i18n.global.setLocaleMessage(lang, message)
|
|
61
70
|
},
|
|
@@ -63,11 +72,11 @@ const Murmur = {
|
|
|
63
72
|
return Murmur.i18n.global.mergeLocaleMessage(lang, message)
|
|
64
73
|
},
|
|
65
74
|
setLocale(lang: 'fr' | 'en') {
|
|
66
|
-
// @ts-
|
|
75
|
+
// @ts-expect-error not sure why typescript sees an error here
|
|
67
76
|
return (Murmur.i18n.global.locale.value = lang)
|
|
68
77
|
},
|
|
69
78
|
getLocale() {
|
|
70
|
-
// @ts-
|
|
79
|
+
// @ts-expect-error not sure why typescript sees an error here
|
|
71
80
|
return Murmur.i18n.global.locale.value
|
|
72
81
|
},
|
|
73
82
|
install(app: App<Element>) {
|
|
@@ -75,16 +84,13 @@ const Murmur = {
|
|
|
75
84
|
app.use(i18n)
|
|
76
85
|
|
|
77
86
|
app.config.globalProperties.$config = Murmur.config
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
app.component(key, components[key])
|
|
87
|
+
Object.keys(this.components).forEach((key) =>
|
|
88
|
+
app.component(key, this.components[key])
|
|
81
89
|
)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
app.component(key, datavisualisations[key])
|
|
90
|
+
Object.keys(this.datavisualisations).forEach((key) =>
|
|
91
|
+
app.component(key, this.datavisualisations[key])
|
|
85
92
|
)
|
|
86
|
-
|
|
87
|
-
Object.keys(maps).forEach((key) => app.component(key, maps[key]))
|
|
93
|
+
Object.keys(this.maps).forEach((key) => app.component(key, this.maps[key]))
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
|
|
@@ -16,7 +16,7 @@ import { geoRobinson } from 'd3-geo-projection'
|
|
|
16
16
|
import type { GeoProjection } from 'd3-geo'
|
|
17
17
|
import { geoGraticule } from 'd3-geo'
|
|
18
18
|
import { feature } from 'topojson'
|
|
19
|
-
import { GeometryCollection } from 'topojson-specification'
|
|
19
|
+
import type { GeometryCollection } from 'topojson-specification'
|
|
20
20
|
|
|
21
21
|
import {
|
|
22
22
|
ComponentPublicInstance,
|
|
@@ -142,11 +142,11 @@ export default defineComponent({
|
|
|
142
142
|
})
|
|
143
143
|
|
|
144
144
|
const position = computed(() => {
|
|
145
|
-
const [x, y] = projection.value(center.value)
|
|
145
|
+
const [x, y] = projection.value(center.value) || []
|
|
146
146
|
return { x, y }
|
|
147
147
|
})
|
|
148
148
|
|
|
149
|
-
const mapK = computed(() => {
|
|
149
|
+
const mapK = computed(():number => {
|
|
150
150
|
return mapTransform.value.k
|
|
151
151
|
})
|
|
152
152
|
|
package/lib/maps/SymbolMap.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import * as d3 from 'd3'
|
|
3
|
-
import { GeoPermissibleObjects } from 'd3'
|
|
3
|
+
import type { GeoPermissibleObjects } from 'd3'
|
|
4
4
|
import { geoRobinson } from 'd3-geo-projection'
|
|
5
5
|
import { feature } from 'topojson'
|
|
6
6
|
import {
|
|
@@ -33,7 +33,8 @@ import {
|
|
|
33
33
|
ref,
|
|
34
34
|
watch
|
|
35
35
|
} from 'vue'
|
|
36
|
-
import { GeometryCollection } from 'topojson-specification'
|
|
36
|
+
import type { GeometryCollection } from 'topojson-specification'
|
|
37
|
+
import { PopoverPlacement } from 'bootstrap-vue-next'
|
|
37
38
|
|
|
38
39
|
export default defineComponent({
|
|
39
40
|
components: {
|
|
@@ -73,7 +74,7 @@ export default defineComponent({
|
|
|
73
74
|
default: 15
|
|
74
75
|
},
|
|
75
76
|
markerObjectsPath: {
|
|
76
|
-
type: [String, Array]
|
|
77
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
77
78
|
default: 'id'
|
|
78
79
|
},
|
|
79
80
|
markerPath: {
|
|
@@ -97,7 +98,7 @@ export default defineComponent({
|
|
|
97
98
|
default: null
|
|
98
99
|
},
|
|
99
100
|
tooltipPlacement: {
|
|
100
|
-
type: String
|
|
101
|
+
type: String as PropType<PopoverPlacement>,
|
|
101
102
|
default: 'top'
|
|
102
103
|
},
|
|
103
104
|
tooltipFallbackPlacement: {
|
package/lib/shims-vue.d.ts
CHANGED
package/lib/types.ts
CHANGED
|
@@ -45,17 +45,17 @@ export type Variant =
|
|
|
45
45
|
| 'light'
|
|
46
46
|
|
|
47
47
|
export type MapTransform = {
|
|
48
|
-
k: number
|
|
49
|
-
x: number
|
|
50
|
-
y: number
|
|
51
|
-
rotateX: number
|
|
48
|
+
k: number,
|
|
49
|
+
x: number,
|
|
50
|
+
y: number,
|
|
51
|
+
rotateX: number,
|
|
52
52
|
rotateY: number
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export type ParentMap = {
|
|
56
56
|
mapRect: Ref<DOMRect>
|
|
57
57
|
mapTransform: Ref<MapTransform>
|
|
58
|
-
rotatingMapProjection: ComputedRef<GeoProjection |
|
|
58
|
+
rotatingMapProjection: ComputedRef<GeoProjection | (()=>number[])>
|
|
59
59
|
}
|
|
60
60
|
export type ParentMapProvide = {
|
|
61
61
|
[ParentKey]: ParentMap
|
|
@@ -15,7 +15,7 @@ export default class IframeResizer {
|
|
|
15
15
|
constructor() {
|
|
16
16
|
this.initializer = injectAssets('//pym.nprapps.org/pym.v1.min.js').then(
|
|
17
17
|
() => {
|
|
18
|
-
pymChild = pymChild || new window.pym.Child({ polling: 300 })
|
|
18
|
+
pymChild = pymChild || new (window as any).pym.Child({ polling: 300 })
|
|
19
19
|
return pymChild
|
|
20
20
|
}
|
|
21
21
|
)
|
package/lib/utils/placeholder.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icij/murmur-next",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Murmur is ICIJ's Design System for Bootstrap 5 and Vue.js",
|
|
6
6
|
"author": "promera@icij.org",
|
|
@@ -14,14 +14,16 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"dev": "vite",
|
|
17
|
-
"build": "vite build",
|
|
17
|
+
"build:lib": "vite build",
|
|
18
18
|
"preview": "vite preview",
|
|
19
|
-
"lint": "eslint . --
|
|
19
|
+
"lint": "eslint . --fix",
|
|
20
20
|
"format": "prettier --write lib/ stories/ .storybook/ tests/",
|
|
21
21
|
"storybook": "storybook dev -p 6006",
|
|
22
|
-
"build
|
|
22
|
+
"build:storybook": "storybook build",
|
|
23
23
|
"test": "vitest",
|
|
24
|
-
"test:unit": "vitest run"
|
|
24
|
+
"test:unit": "vitest run",
|
|
25
|
+
"prepublish": "yarn build:lib",
|
|
26
|
+
"predeploy": "yarn build:storybook"
|
|
25
27
|
},
|
|
26
28
|
"main": "./dist/lib/murmur.umd.cjs",
|
|
27
29
|
"module": "./dist/lib/murmur.js",
|
|
@@ -40,65 +42,72 @@
|
|
|
40
42
|
"type": "module",
|
|
41
43
|
"dependencies": {
|
|
42
44
|
"@fortawesome/fontawesome": "^1.1.8",
|
|
43
|
-
"@fortawesome/fontawesome-svg-core": "^6.5.
|
|
44
|
-
"@fortawesome/free-brands-svg-icons": "^6.5.
|
|
45
|
-
"@fortawesome/free-regular-svg-icons": "^6.5.
|
|
46
|
-
"@fortawesome/free-solid-svg-icons": "^6.5.
|
|
47
|
-
"@fortawesome/vue-fontawesome": "^3.0.
|
|
45
|
+
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
46
|
+
"@fortawesome/free-brands-svg-icons": "^6.5.2",
|
|
47
|
+
"@fortawesome/free-regular-svg-icons": "^6.5.2",
|
|
48
|
+
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
49
|
+
"@fortawesome/vue-fontawesome": "^3.0.8",
|
|
48
50
|
"@storybook/preset-scss": "^1.0.3",
|
|
51
|
+
"@storybook/test": "^8.1.4",
|
|
49
52
|
"@types/topojson": "^3.2.6",
|
|
50
53
|
"@types/vue-i18n": "^7.0.0",
|
|
51
|
-
"@vue/compat": "^3.4.
|
|
54
|
+
"@vue/compat": "^3.4.27",
|
|
52
55
|
"bootstrap": "^5.3.3",
|
|
53
56
|
"bootstrap-vue-next": "^0.16.6",
|
|
54
57
|
"canvas": "^2.11.2",
|
|
55
58
|
"clipboard": "^2.0.11",
|
|
56
|
-
"d3": "^7.
|
|
59
|
+
"d3": "^7.9.0",
|
|
57
60
|
"d3-geo-projection": "^4.0.0",
|
|
61
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
58
62
|
"jsonp": "^0.2.1",
|
|
59
63
|
"lodash": "^4.17.21",
|
|
60
64
|
"mutationobserver-shim": "^0.3.7",
|
|
61
65
|
"querystring-es3": "^0.2.1",
|
|
62
66
|
"resize-observer-polyfill": "^1.5.1",
|
|
63
67
|
"topojson": "^3.0.2",
|
|
64
|
-
"vue": "^3.4.
|
|
65
|
-
"vue-i18n": "^9.
|
|
68
|
+
"vue": "^3.4.27",
|
|
69
|
+
"vue-i18n": "^9.13.1",
|
|
66
70
|
"vue-virtual-scroller": "^2.0.0-beta.8"
|
|
67
71
|
},
|
|
68
72
|
"devDependencies": {
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@storybook/addon-
|
|
75
|
-
"@storybook/addon-
|
|
76
|
-
"@storybook/
|
|
77
|
-
"@storybook/
|
|
78
|
-
"@storybook/
|
|
79
|
-
"@storybook/
|
|
73
|
+
"@chromatic-com/storybook": "^1",
|
|
74
|
+
"@eslint/js": "^9.3.0",
|
|
75
|
+
"@icij/eslint-config": "^2.0.0",
|
|
76
|
+
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
|
77
|
+
"@rushstack/eslint-patch": "^1.8.0",
|
|
78
|
+
"@storybook/addon-essentials": "^8.1.4",
|
|
79
|
+
"@storybook/addon-interactions": "^8.1.4",
|
|
80
|
+
"@storybook/addon-links": "^8.1.4",
|
|
81
|
+
"@storybook/addon-mdx-gfm": "^8.1.4",
|
|
82
|
+
"@storybook/addon-themes": "^8.1.4",
|
|
83
|
+
"@storybook/blocks": "^8.1.4",
|
|
84
|
+
"@storybook/vue3": "^8.1.4",
|
|
85
|
+
"@storybook/vue3-vite": "^8.1.4",
|
|
80
86
|
"@types/d3": "^7.4.3",
|
|
81
87
|
"@types/d3-geo": "^3.1.0",
|
|
88
|
+
"@types/eslint__js": "^8.42.3",
|
|
82
89
|
"@types/jsonp": "^0.2.3",
|
|
90
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
91
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
83
92
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
84
93
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
85
|
-
"@vue/test-utils": "^2.4.
|
|
86
|
-
"eslint": "^
|
|
94
|
+
"@vue/test-utils": "^2.4.6",
|
|
95
|
+
"eslint": "^9.3.0",
|
|
87
96
|
"eslint-plugin-storybook": "^0.8.0",
|
|
88
|
-
"eslint-plugin-vue": "^9.
|
|
89
|
-
"jsdom": "^24.
|
|
90
|
-
"msw": "^2.2.
|
|
91
|
-
"msw-storybook-addon": "^
|
|
97
|
+
"eslint-plugin-vue": "^9.26.0",
|
|
98
|
+
"jsdom": "^24.1.0",
|
|
99
|
+
"msw": "^2.2.12",
|
|
100
|
+
"msw-storybook-addon": "^2.0.2",
|
|
92
101
|
"prettier": "^3.2.5",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"unplugin-vue-components": "^0.
|
|
98
|
-
"vite": "^5.
|
|
99
|
-
"vite-plugin-dts": "^3.
|
|
100
|
-
"vitest": "^1.
|
|
101
|
-
"vue-docgen-cli": "^4.
|
|
102
|
+
"sass": "^1.77.2",
|
|
103
|
+
"storybook": "^8.1.4",
|
|
104
|
+
"typescript": "^5.4.5",
|
|
105
|
+
"typescript-eslint": "^7.11.0",
|
|
106
|
+
"unplugin-vue-components": "^0.27.0",
|
|
107
|
+
"vite": "^5.2.12",
|
|
108
|
+
"vite-plugin-dts": "^3.9.1",
|
|
109
|
+
"vitest": "^1.6.0",
|
|
110
|
+
"vue-docgen-cli": "^4.79.0",
|
|
102
111
|
"vue-headroom": "github:caro3801/vue-headroom"
|
|
103
112
|
},
|
|
104
113
|
"peerDependencies": {
|
|
@@ -108,8 +117,5 @@
|
|
|
108
117
|
"singleQuote": true,
|
|
109
118
|
"semi": false,
|
|
110
119
|
"trailingComma": "none"
|
|
111
|
-
},
|
|
112
|
-
"resolutions": {
|
|
113
|
-
"jackspeak": "2.1.1"
|
|
114
120
|
}
|
|
115
121
|
}
|