@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 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 (v9+)
66
+ // Instanciate i18n plugin
63
67
  const i18nPlugin = createI18n({ ... });
64
- // Instanciate BIMData API client (v8.2+)
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 { components } from "@bimdata/bcf-components";
99
-
100
- const { BcfTopicCard } = components;
102
+ import { BcfTopicCard } from "@bimdata/bcf-components";
101
103
  ```
102
104
 
103
105
  ## Build
@@ -1,7 +1,13 @@
1
+ import de from "./lang/de.json";
1
2
  import en from "./lang/en.json";
3
+ import es from "./lang/es.json";
2
4
  import fr from "./lang/fr.json";
5
+ import it from "./lang/it.json";
3
6
 
4
7
  export default {
8
+ de,
5
9
  en,
6
- fr
10
+ es,
11
+ fr,
12
+ it,
7
13
  };
@@ -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",
@@ -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",