@tekkare/auriga 0.2.42 → 0.2.44

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.
Files changed (64) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/argChaptersNav.vue +23 -10
  3. package/dist/runtime/components/argChaptersNav.vue.d.ts +1 -0
  4. package/dist/runtime/components/argComplexSelect.vue +52 -51
  5. package/dist/runtime/components/argComplexSelect.vue.d.ts +11 -26
  6. package/dist/runtime/components/argDate.vue +46 -18
  7. package/dist/runtime/components/argDate.vue.d.ts +1 -1
  8. package/dist/runtime/components/argDropdownSelect.vue +25 -5
  9. package/dist/runtime/components/argDropdownSelect.vue.d.ts +4 -4
  10. package/dist/runtime/components/argFilterCard.vue +27 -34
  11. package/dist/runtime/components/argFilterCard.vue.d.ts +1 -0
  12. package/dist/runtime/components/argFooter.vue +29 -14
  13. package/dist/runtime/components/argFooter.vue.d.ts +3 -1
  14. package/dist/runtime/components/argHomeAllBlocks.vue +29 -15
  15. package/dist/runtime/components/argHomeAllBlocks.vue.d.ts +4 -3
  16. package/dist/runtime/components/argHomeHeader.vue +28 -3
  17. package/dist/runtime/components/argHomeHeader.vue.d.ts +3 -1
  18. package/dist/runtime/components/argHomeLayout.vue +1 -1
  19. package/dist/runtime/components/argHomeSelectedBlock.vue +29 -8
  20. package/dist/runtime/components/argHomeSelectedBlock.vue.d.ts +3 -1
  21. package/dist/runtime/components/argMainLayout.vue +1 -1
  22. package/dist/runtime/components/argMaps.vue +1 -1
  23. package/dist/runtime/components/argMapsFrRegionsToDepartements.vue +31 -15
  24. package/dist/runtime/components/argMapsFrRegionsToDepartements.vue.d.ts +12 -2
  25. package/dist/runtime/components/argMultipleSelect.vue +29 -8
  26. package/dist/runtime/components/argMultipleSelect.vue.d.ts +5 -4
  27. package/dist/runtime/components/argNoSavedScope.vue +44 -38
  28. package/dist/runtime/components/argNoSavedScope.vue.d.ts +4 -15
  29. package/dist/runtime/components/argNoSelectedScope.vue +35 -31
  30. package/dist/runtime/components/argNoSelectedScope.vue.d.ts +2 -1
  31. package/dist/runtime/components/argScopeChange.vue +27 -20
  32. package/dist/runtime/components/argScopeChange.vue.d.ts +2 -1
  33. package/dist/runtime/components/argScopeCriteria.vue +32 -31
  34. package/dist/runtime/components/argScopeCriteria.vue.d.ts +4 -11
  35. package/dist/runtime/components/argScopeCriteriaIndicator.vue +31 -18
  36. package/dist/runtime/components/argScopeCriteriaIndicator.vue.d.ts +3 -1
  37. package/dist/runtime/components/argScopeHeader.vue +27 -12
  38. package/dist/runtime/components/argScopeHeader.vue.d.ts +1 -0
  39. package/dist/runtime/components/argScopeManage.vue +29 -35
  40. package/dist/runtime/components/argScopeManage.vue.d.ts +1 -0
  41. package/dist/runtime/components/argScopeModal.vue +33 -64
  42. package/dist/runtime/components/argScopeModal.vue.d.ts +1 -0
  43. package/dist/runtime/components/argSearchInput.vue +36 -14
  44. package/dist/runtime/components/argSearchInput.vue.d.ts +2 -10
  45. package/dist/runtime/components/argSidebar.vue +26 -14
  46. package/dist/runtime/components/argSidebar.vue.d.ts +1 -0
  47. package/dist/runtime/components/argSourceCollapse.vue +26 -6
  48. package/dist/runtime/components/argSourceCollapse.vue.d.ts +1 -0
  49. package/dist/runtime/components/argTable.vue +42 -14
  50. package/dist/runtime/components/argTable.vue.d.ts +5 -5
  51. package/dist/runtime/components/argTipsBox.vue +27 -17
  52. package/dist/runtime/components/argTipsBox.vue.d.ts +3 -2
  53. package/dist/runtime/components/argToolbarSources.vue +29 -22
  54. package/dist/runtime/components/argToolbarSources.vue.d.ts +3 -1
  55. package/dist/runtime/components/locales/en.json +180 -1
  56. package/dist/runtime/components/locales/es.json +179 -1
  57. package/dist/runtime/components/locales/fr.json +179 -1
  58. package/dist/runtime/components/locales/jp.json +179 -2
  59. package/dist/runtime/components/maps/world/index.d.ts +10 -0
  60. package/dist/runtime/components/maps/world/index.mjs +1 -0
  61. package/dist/runtime/components/maps/world/world.svg +1286 -0
  62. package/package.json +1 -1
  63. package/dist/runtime/components/textHighlight.vue +0 -251
  64. package/dist/runtime/components/textHighlight.vue.d.ts +0 -96
@@ -8,9 +8,7 @@
8
8
  <div class="oip_row v-center gap-8">
9
9
  <slot v-if="customTitle" name="CardTitle" />
10
10
  <p v-else class="filters_title">
11
- {{
12
- lang === "fr" ? "Filtres" : lang === "es" ? "Filtros" : "Filters"
13
- }}
11
+ {{ langData?.title }}
14
12
  </p>
15
13
  <div class="filters_amount">{{ filters_amount }}</div>
16
14
  <p
@@ -18,26 +16,10 @@
18
16
  class="filters_save"
19
17
  @click="save()"
20
18
  >
21
- {{
22
- saveScopeMsg !== null
23
- ? saveScopeMsg
24
- : lang === "en"
25
- ? "Save scope"
26
- : lang === "es"
27
- ? "Salvar un scope"
28
- : "Sauvegarder un scope"
29
- }}
19
+ {{ saveScopeMsg !== null ? saveScopeMsg : langData?.save }}
30
20
  </p>
31
21
  <p v-if="haveClear" class="filters_clear" @click="clear()">
32
- {{
33
- clearMsg !== null
34
- ? clearMsg
35
- : lang === "en"
36
- ? "Clear all"
37
- : lang === "es"
38
- ? "Borrar todo"
39
- : "Tout effacer"
40
- }}
22
+ {{ clearMsg !== null ? clearMsg : langData?.clear }}
41
23
  </p>
42
24
  </div>
43
25
  <div
@@ -50,17 +32,7 @@
50
32
  :class="['filter-icon', filtersOpen ? 'icon-rotate' : '']"
51
33
  />
52
34
  <span class="filters_collapse">{{
53
- filtersOpen
54
- ? lang === "en"
55
- ? "Hide"
56
- : lang === "es"
57
- ? "Ocultar"
58
- : "Masquer"
59
- : lang === "en"
60
- ? "Show"
61
- : lang === "es"
62
- ? "Mostrar"
63
- : "Afficher"
35
+ filtersOpen ? langData?.hide : langData?.show
64
36
  }}</span>
65
37
  </div>
66
38
  </div>
@@ -82,6 +54,7 @@ import {
82
54
  ref,
83
55
  watch,
84
56
  defineComponent,
57
+ onBeforeMount,
85
58
  onUpdated
86
59
  } from "vue";
87
60
  import argIcon from "./argIcon.vue";
@@ -99,7 +72,7 @@ export default defineComponent({
99
72
  type: String,
100
73
  default: "en",
101
74
  validator: (value) => {
102
- return ["en", "fr", "es"].includes(value);
75
+ return ["en", "fr", "es", "jp"].includes(value);
103
76
  }
104
77
  }
105
78
  },
@@ -107,6 +80,25 @@ export default defineComponent({
107
80
  setup(props, { emit }) {
108
81
  const filtersOpen = ref(null);
109
82
  const scrollPosition = ref(0);
83
+ const langData = ref(null);
84
+ async function setLang() {
85
+ const jsonFiles = import.meta.glob("./locales/*.json");
86
+ for (const path in jsonFiles) {
87
+ if (path.split("/")[2].includes(props.lang)) {
88
+ const json = await jsonFiles[path]();
89
+ langData.value = json.filterCard;
90
+ }
91
+ }
92
+ }
93
+ onBeforeMount(async () => {
94
+ setLang();
95
+ });
96
+ watch(
97
+ () => props.lang,
98
+ () => {
99
+ setLang();
100
+ }
101
+ );
110
102
  function openFromScroll() {
111
103
  if (window.scrollY === 0) {
112
104
  filtersOpen.value = true;
@@ -178,7 +170,8 @@ export default defineComponent({
178
170
  filtersOpen,
179
171
  clear,
180
172
  save,
181
- handleCard
173
+ handleCard,
174
+ langData
182
175
  };
183
176
  }
184
177
  });
@@ -33,6 +33,7 @@ declare const _default: import("vue").DefineComponent<{
33
33
  clear: () => void;
34
34
  save: () => void;
35
35
  handleCard: () => void;
36
+ langData: import("vue").Ref<any>;
36
37
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clearFilters" | "saveScope")[], "clearFilters" | "saveScope", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
37
38
  filters_amount: {
38
39
  type: NumberConstructor;
@@ -2,26 +2,19 @@
2
2
  <div class="oip_footer">
3
3
  <p>
4
4
  ©2024 Tekkare®.
5
- {{
6
- lang === "fr"
7
- ? "Tous droits réservés"
8
- : lang === "es"
9
- ? "Todos derechos reservados"
10
- : "All rights reserved"
11
- }}
5
+ {{ langData?.rights }}
12
6
  </p>
13
7
  <a href="https://openinnovationprogram.com/legal-notices" target="_blank">{{
14
- lang === "fr"
15
- ? "Mentions légales"
16
- : lang === "es"
17
- ? "Condiciones de uso"
18
- : "Terms of use"
8
+ langData?.terms
19
9
  }}</a>
20
10
  </div>
21
11
  </template>
22
12
  <script>
23
13
  import {
24
- defineComponent
14
+ ref,
15
+ watch,
16
+ defineComponent,
17
+ onBeforeMount
25
18
  } from "vue";
26
19
  import argStyle from "./argStyle.vue";
27
20
  export default defineComponent({
@@ -32,9 +25,31 @@ export default defineComponent({
32
25
  type: String,
33
26
  default: "en",
34
27
  validator: (value) => {
35
- return ["en", "fr", "es"].includes(value);
28
+ return ["en", "fr", "es", "jp"].includes(value);
36
29
  }
37
30
  }
31
+ },
32
+ setup(props) {
33
+ const langData = ref(null);
34
+ async function setLang() {
35
+ const jsonFiles = import.meta.glob("./locales/*.json");
36
+ for (const path in jsonFiles) {
37
+ if (path.split("/")[2].includes(props.lang)) {
38
+ const json = await jsonFiles[path]();
39
+ langData.value = json.footer;
40
+ }
41
+ }
42
+ }
43
+ onBeforeMount(async () => {
44
+ setLang();
45
+ });
46
+ watch(
47
+ () => props.lang,
48
+ () => {
49
+ setLang();
50
+ }
51
+ );
52
+ return { langData };
38
53
  }
39
54
  });
40
55
  </script>
@@ -4,7 +4,9 @@ declare const _default: import("vue").DefineComponent<{
4
4
  default: string;
5
5
  validator: (value: string) => boolean;
6
6
  };
7
- }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
+ }, {
8
+ langData: import("vue").Ref<any>;
9
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
10
  lang: {
9
11
  type: StringConstructor;
10
12
  default: string;
@@ -64,16 +64,8 @@
64
64
  <div v-else class="oip_row v-center centered full_stretch">
65
65
  <arg-errors
66
66
  error-type="result"
67
- :error-title="
68
- lang === 'en'
69
- ? 'No applications found'
70
- : 'Aucune application trouvée'
71
- "
72
- :error-text="
73
- lang === 'en'
74
- ? 'No applications were found matching your search. Try changing your search terms or contact us fore more assistance.'
75
- : `Aucune application n'a été trouvée pour votre recherche. Essayez de modifier notre recherche ou contactez-nous pour plus d'assistance.`
76
- "
67
+ :error-title="langData?.empty1"
68
+ :error-text="langData?.empty2"
77
69
  />
78
70
  </div>
79
71
  </div>
@@ -84,7 +76,9 @@
84
76
  import {
85
77
  ref,
86
78
  computed,
87
- defineComponent
79
+ watch,
80
+ defineComponent,
81
+ onBeforeMount
88
82
  } from "vue";
89
83
  import argSearchInput from "./argSearchInput.vue";
90
84
  import argFlag from "./argFlag.vue";
@@ -132,23 +126,42 @@ export default defineComponent({
132
126
  setup(props, { emit }) {
133
127
  const searchBlocks = ref("");
134
128
  const selectedBlock = ref(null);
129
+ const langData = ref(null);
130
+ async function setLang() {
131
+ const jsonFiles = import.meta.glob("./locales/*.json");
132
+ for (const path in jsonFiles) {
133
+ if (path.split("/")[2].includes(props.lang)) {
134
+ const json = await jsonFiles[path]();
135
+ langData.value = json.homeBlocks;
136
+ }
137
+ }
138
+ }
139
+ onBeforeMount(async () => {
140
+ setLang();
141
+ });
142
+ watch(
143
+ () => props.lang,
144
+ () => {
145
+ setLang();
146
+ }
147
+ );
135
148
  const getTitle = computed(() => {
136
149
  if (props.title !== null) {
137
150
  return props.title;
138
151
  } else
139
- return props.hasGlobal ? props.lang === "en" ? "Countries" : "Pays" : props.lang === "en" ? "All themes" : "Tous les th\xE8mes";
152
+ return props.hasGlobal ? langData.value?.countries : langData.value?.all;
140
153
  });
141
154
  const getGlobalTitle = computed(() => {
142
155
  if (props.globalTitle !== null) {
143
156
  return props.globalTitle;
144
157
  } else
145
- return props.lang === "en" ? "Global Themes" : "Th\xE8mes Globaux";
158
+ return langData.value?.global;
146
159
  });
147
160
  const getSearchPlaceholder = computed(() => {
148
161
  if (props.searchPlaceholder !== null) {
149
162
  return props.searchPlaceholder;
150
163
  } else
151
- return props.lang === "en" ? "Search here..." : "Recherchez ici...";
164
+ return langData.value?.search;
152
165
  });
153
166
  const filterBlocks = computed(() => {
154
167
  return props.appBlocks.length > 0 ? props.appBlocks.filter((a) => includesValue(a)) : null;
@@ -175,7 +188,8 @@ export default defineComponent({
175
188
  selectedBlock,
176
189
  selectBlock,
177
190
  filterBlocks,
178
- getGlobalTitle
191
+ getGlobalTitle,
192
+ langData
179
193
  };
180
194
  }
181
195
  });
@@ -34,12 +34,13 @@ declare const _default: import("vue").DefineComponent<{
34
34
  };
35
35
  }, {
36
36
  searchBlocks: import("vue").Ref<string>;
37
- getTitle: import("vue").ComputedRef<string>;
38
- getSearchPlaceholder: import("vue").ComputedRef<string>;
37
+ getTitle: import("vue").ComputedRef<any>;
38
+ getSearchPlaceholder: import("vue").ComputedRef<any>;
39
39
  selectedBlock: import("vue").Ref<any>;
40
40
  selectBlock: (block: any) => void;
41
41
  filterBlocks: import("vue").ComputedRef<unknown[] | null>;
42
- getGlobalTitle: import("vue").ComputedRef<string>;
42
+ getGlobalTitle: import("vue").ComputedRef<any>;
43
+ langData: import("vue").Ref<any>;
43
44
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSelectBlock" | "update:Block")[], "onSelectBlock" | "update:Block", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
45
  title: {
45
46
  type: StringConstructor;
@@ -13,7 +13,7 @@
13
13
  <arg-menu-link
14
14
  :sidebar-open="true"
15
15
  to="https://openinnovationprogram.com/"
16
- :label="lang === 'en' ? 'Back to OIP' : 'Retour OIP'"
16
+ :label="langData"
17
17
  icon="ArrowSquareOut"
18
18
  />
19
19
  </div>
@@ -22,7 +22,10 @@
22
22
 
23
23
  <script>
24
24
  import {
25
- defineComponent
25
+ ref,
26
+ watch,
27
+ defineComponent,
28
+ onBeforeMount
26
29
  } from "vue";
27
30
  import argMenuLink from "./argMenuLink.vue";
28
31
  export default defineComponent({
@@ -42,9 +45,31 @@ export default defineComponent({
42
45
  type: String,
43
46
  default: "en",
44
47
  validator: (value) => {
45
- return ["en", "fr"].includes(value);
48
+ return ["en", "fr", "es", "jp"].includes(value);
46
49
  }
47
50
  }
51
+ },
52
+ setup(props) {
53
+ const langData = ref(null);
54
+ async function setLang() {
55
+ const jsonFiles = import.meta.glob("./locales/*.json");
56
+ for (const path in jsonFiles) {
57
+ if (path.split("/")[2].includes(props.lang)) {
58
+ const json = await jsonFiles[path]();
59
+ langData.value = json.backOIP;
60
+ }
61
+ }
62
+ }
63
+ onBeforeMount(async () => {
64
+ setLang();
65
+ });
66
+ watch(
67
+ () => props.lang,
68
+ () => {
69
+ setLang();
70
+ }
71
+ );
72
+ return { langData };
48
73
  }
49
74
  });
50
75
  </script>
@@ -13,7 +13,9 @@ declare const _default: import("vue").DefineComponent<{
13
13
  default: string;
14
14
  validator: (value: string) => boolean;
15
15
  };
16
- }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ }, {
17
+ langData: import("vue").Ref<any>;
18
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
19
  homeTitle: {
18
20
  type: StringConstructor;
19
21
  required: true;
@@ -22,7 +22,7 @@ export default defineComponent({
22
22
  type: String,
23
23
  default: "en",
24
24
  validator: (value) => {
25
- return ["en", "fr"].includes(value);
25
+ return ["en", "fr", "es", "jp"].includes(value);
26
26
  }
27
27
  }
28
28
  }
@@ -6,14 +6,10 @@
6
6
  </div>
7
7
  <div class="theme_select_message">
8
8
  <p class="theme_title">
9
- {{ lang === "en" ? "Select a theme" : "Choisissez un thème" }}
9
+ {{ langData?.title }}
10
10
  </p>
11
11
  <p class="theme_descr">
12
- {{
13
- lang === "en"
14
- ? "Select a theme to display the analyses available within it."
15
- : "Choisissez un thème pour afficher les analyses disponibles."
16
- }}
12
+ {{ langData?.subtitle }}
17
13
  </p>
18
14
  </div>
19
15
  </div>
@@ -72,7 +68,10 @@
72
68
 
73
69
  <script>
74
70
  import {
75
- defineComponent
71
+ ref,
72
+ watch,
73
+ defineComponent,
74
+ onBeforeMount
76
75
  } from "vue";
77
76
  import argIcon from "./argIcon.vue";
78
77
  import argFlag from "./argFlag.vue";
@@ -90,9 +89,31 @@ export default defineComponent({
90
89
  type: String,
91
90
  default: "en",
92
91
  validator: (value) => {
93
- return ["en", "fr"].includes(value);
92
+ return ["en", "fr", "es", "jp"].includes(value);
94
93
  }
95
94
  }
95
+ },
96
+ setup(props) {
97
+ const langData = ref(null);
98
+ async function setLang() {
99
+ const jsonFiles = import.meta.glob("./locales/*.json");
100
+ for (const path in jsonFiles) {
101
+ if (path.split("/")[2].includes(props.lang)) {
102
+ const json = await jsonFiles[path]();
103
+ langData.value = json.selectedBlock;
104
+ }
105
+ }
106
+ }
107
+ onBeforeMount(async () => {
108
+ setLang();
109
+ });
110
+ watch(
111
+ () => props.lang,
112
+ () => {
113
+ setLang();
114
+ }
115
+ );
116
+ return { langData };
96
117
  }
97
118
  });
98
119
  </script>
@@ -8,7 +8,9 @@ declare const _default: import("vue").DefineComponent<{
8
8
  default: string;
9
9
  validator: (value: string) => boolean;
10
10
  };
11
- }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
+ }, {
12
+ langData: import("vue").Ref<any>;
13
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
14
  selected: {
13
15
  type: ObjectConstructor;
14
16
  default: null;
@@ -39,7 +39,7 @@ export default defineComponent({
39
39
  type: String,
40
40
  default: "en",
41
41
  validator: (value) => {
42
- return ["en", "fr", "es"].includes(value);
42
+ return ["en", "fr", "es", "jp"].includes(value);
43
43
  }
44
44
  }
45
45
  },
@@ -121,7 +121,7 @@ import Usa from "@svg-maps/usa";
121
121
  import UsaCounties from "@svg-maps/usa.counties";
122
122
  import France from "@svg-maps/france.regions";
123
123
  import FranceDepartments from "@svg-maps/france.departments";
124
- import World from "@svg-maps/world";
124
+ import World from "./maps/world";
125
125
  import SvgMap from "./SvgMap.vue";
126
126
  export default defineComponent({
127
127
  name: "argMaps",
@@ -2,7 +2,7 @@
2
2
  <div class="oip_table_card map_card-container" :id="`container_map-${title}`">
3
3
  <div class="p-24">
4
4
  <div class="oip_row v-center oip_subtitle">
5
- <span v-if="title !== null">{{ title }}</span>
5
+ <span v-if="title !== null && !haveCustomTitle">{{ title }}</span>
6
6
  <slot
7
7
  v-else-if="!withDynamicTitle || (withDynamicTitle && !clickedRegion)"
8
8
  name="customTitle"
@@ -757,15 +757,7 @@
757
757
  </div>
758
758
  <div class="legend">
759
759
  <p class="oip_filter_label oip_row v-center centered">
760
- {{
761
- clickedRegion
762
- ? lang === "fr"
763
- ? "Échelle départementale"
764
- : "Departemental scale"
765
- : lang === "fr"
766
- ? "Échelle Regionale"
767
- : "Regional scale"
768
- }}
760
+ {{ clickedRegion ? langData?.dep : langData?.reg }}
769
761
  </p>
770
762
  <div class="scale" />
771
763
  <div class="legend-text" v-if="clickedRegion">
@@ -790,7 +782,8 @@ import {
790
782
  watch,
791
783
  nextTick,
792
784
  defineComponent,
793
- computed
785
+ computed,
786
+ onBeforeMount
794
787
  } from "vue";
795
788
  import { Regions } from "./maps/interfaces";
796
789
  import regionsPath from "./maps/regionsPath.json";
@@ -808,7 +801,7 @@ export default defineComponent({
808
801
  },
809
802
  title: {
810
803
  type: String,
811
- default: null,
804
+ default: "frRegDep",
812
805
  required: false
813
806
  },
814
807
  source: {
@@ -820,6 +813,10 @@ export default defineComponent({
820
813
  type: Boolean,
821
814
  default: false
822
815
  },
816
+ haveCustomTitle: {
817
+ type: Boolean,
818
+ default: false
819
+ },
823
820
  lang: {
824
821
  type: String,
825
822
  default: "en",
@@ -841,6 +838,25 @@ export default defineComponent({
841
838
  const dptScale = ref([]);
842
839
  const componentKey = ref(0);
843
840
  const mapPosition = ref({ x: 0, y: 0 });
841
+ const langData = ref(null);
842
+ async function setLang() {
843
+ const jsonFiles = import.meta.glob("./locales/*.json");
844
+ for (const path in jsonFiles) {
845
+ if (path.split("/")[2].includes(props.lang)) {
846
+ const json = await jsonFiles[path]();
847
+ langData.value = json.map;
848
+ }
849
+ }
850
+ }
851
+ onBeforeMount(async () => {
852
+ setLang();
853
+ });
854
+ watch(
855
+ () => props.lang,
856
+ () => {
857
+ setLang();
858
+ }
859
+ );
844
860
  const RegionsData = computed(() => {
845
861
  const base = [];
846
862
  for (const region in Regions) {
@@ -1012,8 +1028,7 @@ export default defineComponent({
1012
1028
  };
1013
1029
  }
1014
1030
  const getReturnText = computed(() => {
1015
- const returnText = { en: "Return to regions", fr: "Retour aux re\u0301gions" };
1016
- return returnText[props.lang];
1031
+ return langData.value?.return;
1017
1032
  });
1018
1033
  onMounted(() => {
1019
1034
  setupScale();
@@ -1131,7 +1146,8 @@ export default defineComponent({
1131
1146
  Regions,
1132
1147
  getColor,
1133
1148
  regionsPath,
1134
- getReturnText
1149
+ getReturnText,
1150
+ langData
1135
1151
  };
1136
1152
  }
1137
1153
  });
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
12
12
  };
13
13
  title: {
14
14
  type: StringConstructor;
15
- default: null;
15
+ default: string;
16
16
  required: false;
17
17
  };
18
18
  source: {
@@ -24,6 +24,10 @@ declare const _default: import("vue").DefineComponent<{
24
24
  type: BooleanConstructor;
25
25
  default: boolean;
26
26
  };
27
+ haveCustomTitle: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
27
31
  lang: {
28
32
  type: StringConstructor;
29
33
  default: string;
@@ -60,6 +64,7 @@ declare const _default: import("vue").DefineComponent<{
60
64
  getColor: (value?: number) => "var(--lightest)" | "#3F1151" | "#432974" | "#404A85" | "#3F668A" | "#43808C" | "#4C9C8A" | "#5FB57E" | "#85CB68" | "#BDDD51" | "#F9E855" | undefined;
61
65
  regionsPath: any;
62
66
  getReturnText: import("vue").ComputedRef<any>;
67
+ langData: import("vue").Ref<any>;
63
68
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "openSource"[], "openSource", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
64
69
  data: {
65
70
  type: PropType<Data[]>;
@@ -68,7 +73,7 @@ declare const _default: import("vue").DefineComponent<{
68
73
  };
69
74
  title: {
70
75
  type: StringConstructor;
71
- default: null;
76
+ default: string;
72
77
  required: false;
73
78
  };
74
79
  source: {
@@ -80,6 +85,10 @@ declare const _default: import("vue").DefineComponent<{
80
85
  type: BooleanConstructor;
81
86
  default: boolean;
82
87
  };
88
+ haveCustomTitle: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
83
92
  lang: {
84
93
  type: StringConstructor;
85
94
  default: string;
@@ -94,5 +103,6 @@ declare const _default: import("vue").DefineComponent<{
94
103
  source: string;
95
104
  title: string;
96
105
  withDynamicTitle: boolean;
106
+ haveCustomTitle: boolean;
97
107
  }, {}>;
98
108
  export default _default;