@bimdata/bcf-components 1.1.0-rc.5 → 1.1.0-rc.8
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/README.md +17 -15
- package/dist/i18n/index.js +7 -1
- package/dist/i18n/lang/en.json +2 -0
- package/dist/i18n/lang/fr.json +2 -0
- package/dist/vue2/bcf-components.es.js +508 -8015
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/bcf-components.es.js +504 -7978
- package/dist/vue3/style.css +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -31,20 +31,24 @@ Then, in your application bootstrap script, add the following:
|
|
|
31
31
|
```js
|
|
32
32
|
import Vue from "vue";
|
|
33
33
|
import VueCompositionApi from "@vue/composition-api";
|
|
34
|
+
import VueI18n from "vue-i18n"; // v8.x
|
|
35
|
+
import { makeBIMDataApiClient } from "@bimdata/typescript-fetch-api-client"; // v8.2+
|
|
36
|
+
// Import Vue 2 plugin factory
|
|
37
|
+
import BIMDataBcfComponents from "@bimdata/bcf-components/vue2-plugin.js";
|
|
34
38
|
...
|
|
35
39
|
|
|
40
|
+
// Instanciate i18n plugin
|
|
41
|
+
const i18nPlugin = new VueI18n({ ... });
|
|
42
|
+
// Instanciate BIMData API client
|
|
43
|
+
const apiClient = makeBIMDataApiClient({ ... });
|
|
44
|
+
|
|
36
45
|
Vue.use(VueCompositionApi);
|
|
46
|
+
Vue.use(i18nPlugin);
|
|
47
|
+
// Provide both i18n plugin and API client as plugin config
|
|
48
|
+
Vue.use(BIMDataBcfComponents({ i18nPlugin, apiClient }));
|
|
37
49
|
...
|
|
38
50
|
```
|
|
39
51
|
|
|
40
|
-
You can now use library components like so:
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
import { components } from "@bimdata/bcf-components/dist/vue2/bcf-components.es.js";
|
|
44
|
-
|
|
45
|
-
const { BcfTopicCard } = components;
|
|
46
|
-
```
|
|
47
|
-
|
|
48
52
|
### Vue 3.x application
|
|
49
53
|
|
|
50
54
|
**Using Vue plugin**
|
|
@@ -54,14 +58,14 @@ and make all components available globally.
|
|
|
54
58
|
|
|
55
59
|
```js
|
|
56
60
|
import { createApp } from "vue";
|
|
57
|
-
import { createI18n } from "vue-i18n";
|
|
58
|
-
import { makeBIMDataApiClient } from "@bimdata/typescript-fetch-api-client";
|
|
61
|
+
import { createI18n } from "vue-i18n"; // v9.x
|
|
62
|
+
import { makeBIMDataApiClient } from "@bimdata/typescript-fetch-api-client"; // v8.2+
|
|
59
63
|
// Import Vue 3 plugin factory
|
|
60
64
|
import BIMDataBcfComponents from "@bimdata/bcf-components/vue3-plugin.js";
|
|
61
65
|
|
|
62
|
-
// Instanciate i18n plugin
|
|
66
|
+
// Instanciate i18n plugin
|
|
63
67
|
const i18nPlugin = createI18n({ ... });
|
|
64
|
-
// Instanciate BIMData API client
|
|
68
|
+
// Instanciate BIMData API client
|
|
65
69
|
const apiClient = makeBIMDataApiClient({ ... });
|
|
66
70
|
|
|
67
71
|
const app = createApp()
|
|
@@ -95,9 +99,7 @@ setApiClient(apiClient);
|
|
|
95
99
|
Then you can directly use components in your app that way:
|
|
96
100
|
|
|
97
101
|
```js
|
|
98
|
-
import {
|
|
99
|
-
|
|
100
|
-
const { BcfTopicCard } = components;
|
|
102
|
+
import { BcfTopicCard } from "@bimdata/bcf-components";
|
|
101
103
|
```
|
|
102
104
|
|
|
103
105
|
## Build
|
package/dist/i18n/index.js
CHANGED
package/dist/i18n/lang/en.json
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"BcfTopicForm": {
|
|
54
54
|
"dragDropImageText": "Please select a file",
|
|
55
|
+
"addObjectButton": "Object",
|
|
56
|
+
"addAnnotationButton": "Annotation",
|
|
55
57
|
"addPictureButton": "Add a picture",
|
|
56
58
|
"titlePlaceholder": "Title *",
|
|
57
59
|
"titleErrorMessage": "Missing title",
|
package/dist/i18n/lang/fr.json
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"BcfTopicForm": {
|
|
54
54
|
"dragDropImageText": "Veuillez sélectionner un fichier",
|
|
55
|
+
"addObjectButton": "Objet",
|
|
56
|
+
"addAnnotationButton": "Annotation",
|
|
55
57
|
"addPictureButton": "Ajouter une image",
|
|
56
58
|
"titlePlaceholder": "Titre *",
|
|
57
59
|
"titleErrorMessage": "Titre manquant",
|