@icij/murmur-next 4.0.4 → 4.0.5
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/lib/components/Brand.vue +9 -9
- package/lib/components/OrdinalLegend.vue +1 -1
- package/lib/components/RangePicker.vue +15 -8
- 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 +44 -40
- package/dist/lib/components/AccordionStep.vue.d.ts +0 -79
- package/dist/lib/components/AccordionWrapper.vue.d.ts +0 -33
- package/dist/lib/components/ActiveTextTruncate.vue.d.ts +0 -101
- package/dist/lib/components/AdvancedLinkForm.vue.d.ts +0 -168
- package/dist/lib/components/Brand.vue.d.ts +0 -55
- package/dist/lib/components/BrandExpansion.vue.d.ts +0 -105
- package/dist/lib/components/ConfirmButton.vue.d.ts +0 -158
- package/dist/lib/components/ContentPlaceholder.vue.d.ts +0 -44
- package/dist/lib/components/CustomPagination.vue.d.ts +0 -130
- package/dist/lib/components/DigitsInput.vue.d.ts +0 -66
- package/dist/lib/components/DonateForm.vue.d.ts +0 -46
- package/dist/lib/components/EmbedForm.vue.d.ts +0 -121
- package/dist/lib/components/EmbeddableFooter.vue.d.ts +0 -103
- package/dist/lib/components/FollowUsPopover.vue.d.ts +0 -16
- package/dist/lib/components/GenericFooter.vue.d.ts +0 -47
- package/dist/lib/components/GenericHeader.vue.d.ts +0 -928
- package/dist/lib/components/HapticCopy.vue.d.ts +0 -156
- package/dist/lib/components/ImddbHeader.vue.d.ts +0 -960
- package/dist/lib/components/OrdinalLegend.vue.d.ts +0 -87
- package/dist/lib/components/RangePicker.vue.d.ts +0 -196
- package/dist/lib/components/ResponsiveIframe.vue.d.ts +0 -45
- package/dist/lib/components/ScaleLegend.vue.d.ts +0 -101
- package/dist/lib/components/SecretInput.vue.d.ts +0 -99
- package/dist/lib/components/SelectableDropdown.vue.d.ts +0 -210
- package/dist/lib/components/SharingOptions.vue.d.ts +0 -153
- package/dist/lib/components/SharingOptionsLink.vue.d.ts +0 -200
- package/dist/lib/components/SignUpForm.vue.d.ts +0 -141
- package/dist/lib/components/SlideUpDown.vue.d.ts +0 -74
- package/dist/lib/components/TexturedDeck.vue.d.ts +0 -89
- package/dist/lib/components/TinyPagination.vue.d.ts +0 -188
- package/dist/lib/composables/chart.d.ts +0 -48
- package/dist/lib/composables/resizeObserver.d.ts +0 -22
- package/dist/lib/composables/sendEmail.d.ts +0 -6
- package/dist/lib/config.d.ts +0 -19
- package/dist/lib/config.default.d.ts +0 -34
- package/dist/lib/datavisualisations/BarChart.vue.d.ts +0 -234
- package/dist/lib/datavisualisations/ColumnChart.vue.d.ts +0 -404
- package/dist/lib/datavisualisations/LineChart.vue.d.ts +0 -200
- package/dist/lib/datavisualisations/StackedBarChart.vue.d.ts +0 -342
- package/dist/lib/datavisualisations/StackedColumnChart.vue.d.ts +0 -412
- package/dist/lib/enums.d.ts +0 -32
- package/dist/lib/i18n.d.ts +0 -4
- package/dist/lib/keys.d.ts +0 -2
- package/dist/lib/main.d.ts +0 -52
- package/dist/lib/maps/ChoroplethMap.vue.d.ts +0 -460
- package/dist/lib/maps/ChoroplethMapAnnotation.vue.d.ts +0 -188
- package/dist/lib/maps/SymbolMap.vue.d.ts +0 -276
- package/dist/lib/murmur.css +0 -1
- package/dist/lib/murmur.js +0 -44661
- package/dist/lib/murmur.js.map +0 -1
- package/dist/lib/murmur.umd.cjs +0 -837
- package/dist/lib/murmur.umd.cjs.map +0 -1
- package/dist/lib/types.d.ts +0 -44
- package/dist/lib/utils/animation.d.ts +0 -8
- package/dist/lib/utils/assets.d.ts +0 -2
- package/dist/lib/utils/clipboard.d.ts +0 -2
- package/dist/lib/utils/iframe-resizer.d.ts +0 -10
- package/dist/lib/utils/placeholder.d.ts +0 -12
- package/dist/lib/utils/placeholderTypes.d.ts +0 -18
- package/dist/lib/utils/strings.d.ts +0 -1
- package/lib/locales/locales/en.json +0 -140
- package/lib/locales/locales/fr.json +0 -117
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',
|
|
@@ -16,7 +16,8 @@ import { clamp, get, has, invoke, round } from 'lodash'
|
|
|
16
16
|
import Fa, { library } from './Fa'
|
|
17
17
|
|
|
18
18
|
import type { Variant } from '@/types'
|
|
19
|
-
|
|
19
|
+
import isEqual from "lodash/isEqual";
|
|
20
|
+
type DragDropValue = {detail:number}
|
|
20
21
|
/**
|
|
21
22
|
* A component to wrap an HTML element with a range picker overlay.
|
|
22
23
|
*/
|
|
@@ -39,7 +40,7 @@ export default defineComponent({
|
|
|
39
40
|
name: string
|
|
40
41
|
data?: any
|
|
41
42
|
}) {
|
|
42
|
-
vnode.el
|
|
43
|
+
vnode.el?.dispatchEvent(new CustomEvent(name, { detail: data }))
|
|
43
44
|
//const handlers = get(vnode, 'data.on') ?? get(vnode, 'componentOptions.listeners')
|
|
44
45
|
/*if (has(handlers, name)) {
|
|
45
46
|
invoke(handlers, `${name}.fns`, data)
|
|
@@ -216,19 +217,19 @@ export default defineComponent({
|
|
|
216
217
|
}
|
|
217
218
|
})
|
|
218
219
|
|
|
219
|
-
function toggleMoving(value) {
|
|
220
|
+
function toggleMoving(value:boolean) {
|
|
220
221
|
moving.value = value ?? !moving.value
|
|
221
222
|
}
|
|
222
|
-
function toggleResizing(value) {
|
|
223
|
+
function toggleResizing(value:boolean) {
|
|
223
224
|
resizing.value = value ?? !resizing.value
|
|
224
225
|
}
|
|
225
|
-
function snapValue(value): number {
|
|
226
|
+
function snapValue(value:number): number {
|
|
226
227
|
return round(value / props.snap) * props.snap
|
|
227
228
|
}
|
|
228
229
|
function rangeWidth(): number {
|
|
229
230
|
return rangePickerBounds.value?.getBoundingClientRect().width ?? 0
|
|
230
231
|
}
|
|
231
|
-
function dragStartBound({ detail: dx }) {
|
|
232
|
+
function dragStartBound({ detail: dx }:DragDropValue) {
|
|
232
233
|
const newValue = snapValue(dx / rangeWidth())
|
|
233
234
|
// Ensure start value doesn't get too close to end value
|
|
234
235
|
if (newValue < end.value - props.minDistance) {
|
|
@@ -241,7 +242,7 @@ export default defineComponent({
|
|
|
241
242
|
emit('update:range', [start.value, end.value])
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
|
-
function dragEndBound({ detail: dx }) {
|
|
245
|
+
function dragEndBound({ detail: dx }:DragDropValue) {
|
|
245
246
|
const newValue = snapValue(dx / rangeWidth())
|
|
246
247
|
// Ensure end value doesn't get too close to start value
|
|
247
248
|
if (newValue > start.value + props.minDistance) {
|
|
@@ -254,7 +255,7 @@ export default defineComponent({
|
|
|
254
255
|
emit('update:range', [start.value, end.value])
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
|
-
function dragBounds({ detail: dx }) {
|
|
258
|
+
function dragBounds({ detail: dx }:DragDropValue) {
|
|
258
259
|
const diff = snapValue(end.value - start.value)
|
|
259
260
|
const newValue = snapValue(dx / rangeWidth())
|
|
260
261
|
start.value = round(newValue, props.precision)
|
|
@@ -269,6 +270,12 @@ export default defineComponent({
|
|
|
269
270
|
function valueWithUnit(value: number | string): string {
|
|
270
271
|
return typeof value === 'number' ? `${value}px` : `${value}`
|
|
271
272
|
}
|
|
273
|
+
|
|
274
|
+
watch(()=>props.range, (newRange) => {
|
|
275
|
+
start.value = newRange[0] ?? 0 ;
|
|
276
|
+
end.value = newRange[1] ?? 0;
|
|
277
|
+
})
|
|
278
|
+
|
|
272
279
|
return {
|
|
273
280
|
rangePickerBounds,
|
|
274
281
|
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.5",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dev": "vite",
|
|
17
17
|
"build": "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
22
|
"build-storybook": "storybook build",
|
|
@@ -40,65 +40,72 @@
|
|
|
40
40
|
"type": "module",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@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.
|
|
43
|
+
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
44
|
+
"@fortawesome/free-brands-svg-icons": "^6.5.2",
|
|
45
|
+
"@fortawesome/free-regular-svg-icons": "^6.5.2",
|
|
46
|
+
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
47
|
+
"@fortawesome/vue-fontawesome": "^3.0.8",
|
|
48
48
|
"@storybook/preset-scss": "^1.0.3",
|
|
49
|
+
"@storybook/test": "^8.1.4",
|
|
49
50
|
"@types/topojson": "^3.2.6",
|
|
50
51
|
"@types/vue-i18n": "^7.0.0",
|
|
51
|
-
"@vue/compat": "^3.4.
|
|
52
|
+
"@vue/compat": "^3.4.27",
|
|
52
53
|
"bootstrap": "^5.3.3",
|
|
53
54
|
"bootstrap-vue-next": "^0.16.6",
|
|
54
55
|
"canvas": "^2.11.2",
|
|
55
56
|
"clipboard": "^2.0.11",
|
|
56
|
-
"d3": "^7.
|
|
57
|
+
"d3": "^7.9.0",
|
|
57
58
|
"d3-geo-projection": "^4.0.0",
|
|
59
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
58
60
|
"jsonp": "^0.2.1",
|
|
59
61
|
"lodash": "^4.17.21",
|
|
60
62
|
"mutationobserver-shim": "^0.3.7",
|
|
61
63
|
"querystring-es3": "^0.2.1",
|
|
62
64
|
"resize-observer-polyfill": "^1.5.1",
|
|
63
65
|
"topojson": "^3.0.2",
|
|
64
|
-
"vue": "^3.4.
|
|
65
|
-
"vue-i18n": "^9.
|
|
66
|
+
"vue": "^3.4.27",
|
|
67
|
+
"vue-i18n": "^9.13.1",
|
|
66
68
|
"vue-virtual-scroller": "^2.0.0-beta.8"
|
|
67
69
|
},
|
|
68
70
|
"devDependencies": {
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@storybook/addon-
|
|
75
|
-
"@storybook/addon-
|
|
76
|
-
"@storybook/
|
|
77
|
-
"@storybook/
|
|
78
|
-
"@storybook/
|
|
79
|
-
"@storybook/
|
|
71
|
+
"@chromatic-com/storybook": "^1",
|
|
72
|
+
"@eslint/js": "^9.3.0",
|
|
73
|
+
"@icij/eslint-config": "^2.0.0",
|
|
74
|
+
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
|
75
|
+
"@rushstack/eslint-patch": "^1.8.0",
|
|
76
|
+
"@storybook/addon-essentials": "^8.1.4",
|
|
77
|
+
"@storybook/addon-interactions": "^8.1.4",
|
|
78
|
+
"@storybook/addon-links": "^8.1.4",
|
|
79
|
+
"@storybook/addon-mdx-gfm": "^8.1.4",
|
|
80
|
+
"@storybook/addon-themes": "^8.1.4",
|
|
81
|
+
"@storybook/blocks": "^8.1.4",
|
|
82
|
+
"@storybook/vue3": "^8.1.4",
|
|
83
|
+
"@storybook/vue3-vite": "^8.1.4",
|
|
80
84
|
"@types/d3": "^7.4.3",
|
|
81
85
|
"@types/d3-geo": "^3.1.0",
|
|
86
|
+
"@types/eslint__js": "^8.42.3",
|
|
82
87
|
"@types/jsonp": "^0.2.3",
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
89
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
83
90
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
84
91
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
85
|
-
"@vue/test-utils": "^2.4.
|
|
86
|
-
"eslint": "^
|
|
92
|
+
"@vue/test-utils": "^2.4.6",
|
|
93
|
+
"eslint": "^9.3.0",
|
|
87
94
|
"eslint-plugin-storybook": "^0.8.0",
|
|
88
|
-
"eslint-plugin-vue": "^9.
|
|
89
|
-
"jsdom": "^24.
|
|
90
|
-
"msw": "^2.2.
|
|
91
|
-
"msw-storybook-addon": "^
|
|
95
|
+
"eslint-plugin-vue": "^9.26.0",
|
|
96
|
+
"jsdom": "^24.1.0",
|
|
97
|
+
"msw": "^2.2.12",
|
|
98
|
+
"msw-storybook-addon": "^2.0.2",
|
|
92
99
|
"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.
|
|
100
|
+
"sass": "^1.77.2",
|
|
101
|
+
"storybook": "^8.1.4",
|
|
102
|
+
"typescript": "^5.4.5",
|
|
103
|
+
"typescript-eslint": "^7.11.0",
|
|
104
|
+
"unplugin-vue-components": "^0.27.0",
|
|
105
|
+
"vite": "^5.2.12",
|
|
106
|
+
"vite-plugin-dts": "^3.9.1",
|
|
107
|
+
"vitest": "^1.6.0",
|
|
108
|
+
"vue-docgen-cli": "^4.79.0",
|
|
102
109
|
"vue-headroom": "github:caro3801/vue-headroom"
|
|
103
110
|
},
|
|
104
111
|
"peerDependencies": {
|
|
@@ -108,8 +115,5 @@
|
|
|
108
115
|
"singleQuote": true,
|
|
109
116
|
"semi": false,
|
|
110
117
|
"trailingComma": "none"
|
|
111
|
-
},
|
|
112
|
-
"resolutions": {
|
|
113
|
-
"jackspeak": "2.1.1"
|
|
114
118
|
}
|
|
115
119
|
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/// <reference types="@/shims-vue" />
|
|
2
|
-
/// <reference types="vue-i18n" />
|
|
3
|
-
import { PropType } from '../../node_modules/vue';
|
|
4
|
-
import { Accordion, Step } from '../types';
|
|
5
|
-
declare const _default: import('../../node_modules/vue').DefineComponent<{
|
|
6
|
-
/**
|
|
7
|
-
* Step name
|
|
8
|
-
*/
|
|
9
|
-
step: {
|
|
10
|
-
type: (SymbolConstructor | StringConstructor | (() => Step))[];
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Title of the step card
|
|
15
|
-
*/
|
|
16
|
-
title: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Content of the step card
|
|
22
|
-
*/
|
|
23
|
-
content: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
default: string;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Force card expansion/collapse
|
|
29
|
-
*/
|
|
30
|
-
active: {
|
|
31
|
-
type: PropType<boolean | undefined>;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
isFirst: import('../../node_modules/vue').ComputedRef<boolean>;
|
|
36
|
-
isLast: import('../../node_modules/vue').ComputedRef<boolean>;
|
|
37
|
-
isActive: import('../../node_modules/vue').ComputedRef<boolean>;
|
|
38
|
-
isPrevious: import('../../node_modules/vue').ComputedRef<boolean>;
|
|
39
|
-
nextStep: () => void;
|
|
40
|
-
previousStep: () => void;
|
|
41
|
-
accordion: Accordion | undefined;
|
|
42
|
-
}, unknown, {}, {}, import('../../node_modules/vue').ComponentOptionsMixin, import('../../node_modules/vue').ComponentOptionsMixin, ("next-step" | "previous-step")[], "next-step" | "previous-step", import('../../node_modules/vue').PublicProps, Readonly<import('../../node_modules/vue').ExtractPropTypes<{
|
|
43
|
-
/**
|
|
44
|
-
* Step name
|
|
45
|
-
*/
|
|
46
|
-
step: {
|
|
47
|
-
type: (SymbolConstructor | StringConstructor | (() => Step))[];
|
|
48
|
-
required: true;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Title of the step card
|
|
52
|
-
*/
|
|
53
|
-
title: {
|
|
54
|
-
type: StringConstructor;
|
|
55
|
-
default: string;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Content of the step card
|
|
59
|
-
*/
|
|
60
|
-
content: {
|
|
61
|
-
type: StringConstructor;
|
|
62
|
-
default: string;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Force card expansion/collapse
|
|
66
|
-
*/
|
|
67
|
-
active: {
|
|
68
|
-
type: PropType<boolean | undefined>;
|
|
69
|
-
default: boolean;
|
|
70
|
-
};
|
|
71
|
-
}>> & {
|
|
72
|
-
"onNext-step"?: ((...args: any[]) => any) | undefined;
|
|
73
|
-
"onPrevious-step"?: ((...args: any[]) => any) | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
content: string;
|
|
76
|
-
title: string;
|
|
77
|
-
active: boolean | undefined;
|
|
78
|
-
}, {}>;
|
|
79
|
-
export default _default;
|