@webitel/ui-sdk 0.1.6-vue3 → 0.1.7-vue3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "0.1.6-vue3",
3
+ "version": "0.1.7-vue3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -1,3 +1,4 @@
1
+ import { reactive } from 'vue';
1
2
  import debounce from '../../scripts/debounce';
2
3
 
3
4
  // https://stackoverflow.com/questions/41791193/vuejs-reactive-binding-for-a-plugin-how-to/41801107#41801107
@@ -124,13 +125,13 @@ const onResize = () => {
124
125
  breakpoint.mobile = current <= max;
125
126
  };
126
127
 
127
- const install = (Vue) => {
128
+ const install = (app) => {
128
129
  window.addEventListener('resize', debounce(onResize), { passive: true });
129
130
 
130
131
  onResize();
131
132
 
132
133
  // eslint-disable-next-line no-param-reassign
133
- Vue.prototype.$breakpoint = Vue.observable(breakpoint);
134
+ app.config.globalProperties.$breakpoint = reactive(breakpoint);
134
135
  };
135
136
 
136
137
  export { install };