@icij/murmur-next 4.1.0 → 4.1.1

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.
@@ -1,13 +1,5 @@
1
1
  <script lang="ts">
2
- import {
3
- ComponentPublicInstance,
4
- computed,
5
- defineComponent,
6
- PropType,
7
- ref,
8
- watchEffect,
9
- onMounted
10
- } from 'vue'
2
+ import { ComponentPublicInstance, computed, defineComponent, PropType, ref, watch } from 'vue'
11
3
  import { identity, iteratee, sortBy } from 'lodash'
12
4
  import * as d3 from 'd3'
13
5
  import { chartProps, getChartProps, useChart } from '@/composables/chart'
@@ -175,6 +167,7 @@ export default defineComponent({
175
167
  const isLoaded = ref(false)
176
168
  const {
177
169
  loadedData,
170
+ mounted,
178
171
  elementsMaxBBox,
179
172
  d3Formatter,
180
173
  baseHeightRatio,
@@ -339,7 +332,7 @@ export default defineComponent({
339
332
  }
340
333
 
341
334
  function update() {
342
- if (!el.value) {
335
+ if (!mounted.value) {
343
336
  return
344
337
  }
345
338
 
@@ -369,10 +362,9 @@ export default defineComponent({
369
362
  datum.highlight || props.highlights.includes(datum[props.timeseriesKey])
370
363
  )
371
364
  }
372
-
373
- watchEffect(async () => {
374
- update()
375
- })
365
+
366
+ watch([width, height, loadedData, mounted], update.bind(this), { immediate: true})
367
+ watch(() => props.socialMode, update.bind(this), { immediate: true})
376
368
 
377
369
  return {
378
370
  el,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icij/murmur-next",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
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",