@bimdata/viewer 2.0.0-alpha.1 → 2.0.0-alpha.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
|
-
# [
|
|
1
|
+
# [2.0.0-alpha.1](https://github.com/bimdata/viewer/compare/v2.0.0-alpha.1...v1.9.0) (2023-04-14)
|
|
2
|
+
|
|
3
|
+
Update to [Vue.js](https://vuejs.org/) framework version 3.
|
|
4
|
+
This brings some breaking changes in the writting of plugins due to the major version increase.
|
|
5
|
+
Please follow [this guide](https://v3-migration.vuejs.org/) to update your plugins.
|
|
6
|
+
|
|
7
|
+
## FEATURES
|
|
8
|
+
|
|
9
|
+
[Vue.js](https://vuejs.org/) v3 brings the new [composition API](https://vuejs.org/guide/introduction.html#composition-api) & the [script setup support](https://vuejs.org/api/sfc-script-setup.html).
|
|
10
|
+
|
|
11
|
+
`$viewer` is available as injection.
|
|
12
|
+
|
|
13
|
+
Example of a plugin using the composition API:
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { inject } from "vue";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
setup() {
|
|
20
|
+
const $viewer = inject("$viewer");
|
|
21
|
+
// your code here
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## DEPRECATED
|
|
27
|
+
|
|
28
|
+
* To limit incompatibility issues, `destroyed` & `beforeDestroy` vue.js component lifecyles are still available but logged as deprecated. Please migrate to `beforeUnmount` & `unmounted`.
|
|
2
29
|
|
|
30
|
+
* `localContext` & `globalContext` `incrementSpinnerProcesses` & `decrementSpinnerProcesses` are deprecated, please use `loadingProcessStart` & `loadingProcessEnd` instead.
|
|
31
|
+
|
|
32
|
+
* `localContext.getPlugin(pluginName: string): Plugin` is deprecated, please use `localContext.plugins: Map<string, Plugin>` instead.
|
|
33
|
+
* `globalContext.getPlugins(pluginName: string): Plugin[]` is deprecated, please use `globalContext.plugins: Map<string, Plugin[]>` instead.
|
|
34
|
+
* `BIMDataViewerVue` is the `vue.js` instance the viewer is based on. Use it to write render functions or if you use the composition API in your plugins.
|
|
35
|
+
|
|
36
|
+
## PLUGIN BUILD
|
|
37
|
+
|
|
38
|
+
Due to the major Vue.js update, plugin build configuration must be updated. As the `h` function is now exposed on the vue.js instance, please use the globally available `BIMDataViewerVue` singleton.
|
|
39
|
+
|
|
40
|
+
Example of vite configuration:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import { defineConfig } from "vite";
|
|
44
|
+
|
|
45
|
+
import vue from "@vitejs/plugin-vue";
|
|
46
|
+
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
|
|
47
|
+
import externalGlobals from "rollup-plugin-external-globals";
|
|
48
|
+
|
|
49
|
+
export default defineConfig(() => {
|
|
50
|
+
return {
|
|
51
|
+
build: {
|
|
52
|
+
lib: {
|
|
53
|
+
entry: "./src/myPlugin.js",
|
|
54
|
+
formats: ["es"],
|
|
55
|
+
name: "myPlugin",
|
|
56
|
+
fileName: "myPlugin.plugin",
|
|
57
|
+
},
|
|
58
|
+
minify: 'terser',
|
|
59
|
+
},
|
|
60
|
+
plugins: [
|
|
61
|
+
vue(),
|
|
62
|
+
cssInjectedByJsPlugin(),
|
|
63
|
+
externalGlobals({
|
|
64
|
+
vue: 'BIMDataViewerVue', // MANDATORY
|
|
65
|
+
}),
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
# [1.9.0](https://github.com/bimdata/viewer/compare/v1.8.2...v1.9.0) (2022-11-24)
|
|
3
72
|
|
|
4
73
|
### ci
|
|
5
74
|
|