@tekkare/auriga 0.2.46 → 0.2.47

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/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.2.46"
7
+ "version": "0.2.47"
8
8
  }
@@ -6,7 +6,7 @@
6
6
  <div class="oip_info_container" @click.stop>
7
7
  <div v-if="infoOpen" class="oip_info_close" @click="closeInfo()">
8
8
  <arg-icon name="X" size="20" />
9
- <p>Close</p>
9
+ <p>{{langData}}</p>
10
10
  </div>
11
11
  <div
12
12
  class="oip_info_section"
@@ -57,6 +57,7 @@
57
57
  import {
58
58
  onMounted,
59
59
  ref,
60
+ onBeforeMount,
60
61
  defineComponent,
61
62
  watch
62
63
  } from "vue";
@@ -84,12 +85,38 @@ export default defineComponent({
84
85
  sourceAmount: {
85
86
  type: Number,
86
87
  required: true
88
+ },
89
+ lang: {
90
+ type: String,
91
+ default: "en",
92
+ validator: (value) => {
93
+ return ["en", "fr", "es", "jp"].includes(value);
94
+ }
87
95
  }
88
96
  },
89
97
  emits: ["update:Open", "update:Menu"],
90
98
  setup(props, { emit }) {
91
99
  const trueActiveMenu = ref("");
92
100
  const infoOpen = ref(false);
101
+ const langData = ref("Close");
102
+ async function setLang() {
103
+ const jsonFiles = import.meta.glob("./locales/*.json");
104
+ for (const path in jsonFiles) {
105
+ if (path.split("/")[2].includes(props.lang)) {
106
+ const json = await jsonFiles[path]();
107
+ langData.value = json.close;
108
+ }
109
+ }
110
+ }
111
+ onBeforeMount(async () => {
112
+ setLang();
113
+ });
114
+ watch(
115
+ () => props.lang,
116
+ () => {
117
+ setLang();
118
+ }
119
+ );
93
120
  watch(
94
121
  () => props.toolbarOpen,
95
122
  (new_info_open) => {
@@ -130,7 +157,8 @@ export default defineComponent({
130
157
  infoOpen,
131
158
  trueActiveMenu,
132
159
  openMenu,
133
- closeInfo
160
+ closeInfo,
161
+ langData
134
162
  };
135
163
  }
136
164
  });
@@ -18,11 +18,17 @@ declare const _default: import("vue").DefineComponent<{
18
18
  type: NumberConstructor;
19
19
  required: true;
20
20
  };
21
+ lang: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ validator: (value: string) => boolean;
25
+ };
21
26
  }, {
22
27
  infoOpen: import("vue").Ref<boolean>;
23
28
  trueActiveMenu: import("vue").Ref<string>;
24
29
  openMenu: (item: string) => void;
25
30
  closeInfo: () => void;
31
+ langData: import("vue").Ref<any>;
26
32
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Menu" | "update:Open")[], "update:Menu" | "update:Open", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
33
  toolbarOpen: {
28
34
  type: BooleanConstructor;
@@ -43,10 +49,16 @@ declare const _default: import("vue").DefineComponent<{
43
49
  type: NumberConstructor;
44
50
  required: true;
45
51
  };
52
+ lang: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ validator: (value: string) => boolean;
56
+ };
46
57
  }>> & {
47
58
  "onUpdate:Menu"?: ((...args: any[]) => any) | undefined;
48
59
  "onUpdate:Open"?: ((...args: any[]) => any) | undefined;
49
60
  }, {
61
+ lang: string;
50
62
  toolbarOpen: boolean;
51
63
  toolbarArray: unknown[];
52
64
  activeMenu: string;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="toolbar_tab_container">
3
- <p class="oip_heading">Sources</p>
3
+ <p class="oip_heading">{{ langData?.sources }}</p>
4
4
  <div class="source_legal">
5
5
  <p>
6
6
  {{ langData?.comply }}
@@ -166,7 +166,8 @@
166
166
  "toolbarSource": {
167
167
  "comply": "To comply with the ",
168
168
  "list": "You must list in your reports the sources used.",
169
- "copy": "The ”Copy” button is provided to ease this process."
169
+ "copy": "The ”Copy” button is provided to ease this process.",
170
+ "sources": "Sources"
170
171
  },
171
172
  "filterCard": {
172
173
  "title": "Filters",
@@ -165,7 +165,8 @@
165
165
  "toolbarSource": {
166
166
  "comply": "Para cumplir con ",
167
167
  "list": "debe enumerar en sus informes las fuentes utilizadas.",
168
- "copy": "El botón ”Copiar” facilita este proceso."
168
+ "copy": "El botón ”Copiar” facilita este proceso.",
169
+ "sources": "Fuentes"
169
170
  },
170
171
  "filterCard": {
171
172
  "title": "Filtros",
@@ -165,7 +165,8 @@
165
165
  "toolbarSource": {
166
166
  "comply": "Pour être conforme à l’",
167
167
  "list": "vous devez annotez vos documents avec les sources utilisées.",
168
- "copy": "Le bouton “Copier” est prévu pour faciliter cette démarche."
168
+ "copy": "Le bouton “Copier” est prévu pour faciliter cette démarche.",
169
+ "sources": "Sources"
169
170
  },
170
171
  "filterCard": {
171
172
  "title": "Filtres",
@@ -165,7 +165,8 @@
165
165
  "toolbarSource": {
166
166
  "comply": "",
167
167
  "list": "に基づき、当データを使用したレポート等にデータソース名を掲載して下さい。",
168
- "copy": "”コピー”ボタンでデータソース名をコピーできます"
168
+ "copy": "”コピー”ボタンでデータソース名をコピーできます",
169
+ "sources": "データソース"
169
170
  },
170
171
  "filterCard": {
171
172
  "title": "フィルター",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",