@icij/murmur-next 4.0.7 → 4.0.9

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.
@@ -52,10 +52,9 @@ import noop from 'lodash/noop'
52
52
  import uniqueId from 'lodash/uniqueId'
53
53
  import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'
54
54
  import { BTooltip, PopoverPlacement } from 'bootstrap-vue-next'
55
- import { ComponentPublicInstance, defineComponent, PropType, ref } from 'vue'
55
+ import { ComponentPublicInstance, defineComponent, PropType, ref, onBeforeMount } from 'vue'
56
56
 
57
57
  import { default as Fa, library } from './Fa'
58
- import { onBeforeMount } from '@vue/runtime-core'
59
58
 
60
59
  /**
61
60
  * ConfirmButton
package/lib/main.ts CHANGED
@@ -51,7 +51,8 @@ type ComponentMap = {[name:string]:Component|DefineComponent}
51
51
  type PluginOptions = {
52
52
  useI18n?: boolean,
53
53
  useBootstrap?: boolean,
54
- useConfig?: boolean
54
+ useConfig?: boolean,
55
+ registerComponents?: boolean
55
56
  }
56
57
 
57
58
  const Murmur = {
@@ -84,7 +85,12 @@ const Murmur = {
84
85
  // @ts-expect-error not sure why typescript sees an error here
85
86
  return Murmur.i18n.global.locale.value
86
87
  },
87
- install(app: App<Element>, { useI18n = true, useBootstrap = true, useConfig = true }: PluginOptions = {}) {
88
+ install(app: App<Element>, {
89
+ useI18n = true,
90
+ useBootstrap = true,
91
+ useConfig = true,
92
+ registerComponents = true
93
+ }: PluginOptions = {}) {
88
94
 
89
95
  if (useBootstrap) {
90
96
  app.use(createBootstrap())
@@ -97,16 +103,19 @@ const Murmur = {
97
103
  if (useConfig) {
98
104
  app.config.globalProperties.$config = Murmur.config
99
105
  }
106
+
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
+ }
100
118
 
101
- Object.keys(this.components).forEach((key) =>
102
- app.component(key, this.components[key])
103
- )
104
- Object.keys(this.datavisualisations).forEach((key) =>
105
- app.component(key, this.datavisualisations[key])
106
- )
107
- Object.keys(this.maps).forEach((key) =>
108
- app.component(key, this.maps[key])
109
- )
110
119
  }
111
120
  }
112
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icij/murmur-next",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
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",