@tekkare/auriga 0.2.43 → 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 (60) 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/argMapsFrRegionsToDepartements.vue +31 -15
  23. package/dist/runtime/components/argMapsFrRegionsToDepartements.vue.d.ts +12 -2
  24. package/dist/runtime/components/argMultipleSelect.vue +29 -8
  25. package/dist/runtime/components/argMultipleSelect.vue.d.ts +5 -4
  26. package/dist/runtime/components/argNoSavedScope.vue +44 -38
  27. package/dist/runtime/components/argNoSavedScope.vue.d.ts +4 -15
  28. package/dist/runtime/components/argNoSelectedScope.vue +35 -31
  29. package/dist/runtime/components/argNoSelectedScope.vue.d.ts +2 -1
  30. package/dist/runtime/components/argScopeChange.vue +27 -20
  31. package/dist/runtime/components/argScopeChange.vue.d.ts +2 -1
  32. package/dist/runtime/components/argScopeCriteria.vue +32 -31
  33. package/dist/runtime/components/argScopeCriteria.vue.d.ts +4 -11
  34. package/dist/runtime/components/argScopeCriteriaIndicator.vue +31 -18
  35. package/dist/runtime/components/argScopeCriteriaIndicator.vue.d.ts +3 -1
  36. package/dist/runtime/components/argScopeHeader.vue +27 -12
  37. package/dist/runtime/components/argScopeHeader.vue.d.ts +1 -0
  38. package/dist/runtime/components/argScopeManage.vue +29 -35
  39. package/dist/runtime/components/argScopeManage.vue.d.ts +1 -0
  40. package/dist/runtime/components/argScopeModal.vue +33 -64
  41. package/dist/runtime/components/argScopeModal.vue.d.ts +1 -0
  42. package/dist/runtime/components/argSearchInput.vue +36 -14
  43. package/dist/runtime/components/argSearchInput.vue.d.ts +2 -10
  44. package/dist/runtime/components/argSidebar.vue +26 -14
  45. package/dist/runtime/components/argSidebar.vue.d.ts +1 -0
  46. package/dist/runtime/components/argSourceCollapse.vue +26 -6
  47. package/dist/runtime/components/argSourceCollapse.vue.d.ts +1 -0
  48. package/dist/runtime/components/argTable.vue +42 -14
  49. package/dist/runtime/components/argTable.vue.d.ts +5 -5
  50. package/dist/runtime/components/argTipsBox.vue +27 -17
  51. package/dist/runtime/components/argTipsBox.vue.d.ts +3 -2
  52. package/dist/runtime/components/argToolbarSources.vue +29 -22
  53. package/dist/runtime/components/argToolbarSources.vue.d.ts +3 -1
  54. package/dist/runtime/components/locales/en.json +180 -1
  55. package/dist/runtime/components/locales/es.json +179 -1
  56. package/dist/runtime/components/locales/fr.json +179 -1
  57. package/dist/runtime/components/locales/jp.json +179 -2
  58. package/package.json +1 -1
  59. package/dist/runtime/components/textHighlight.vue +0 -251
  60. package/dist/runtime/components/textHighlight.vue.d.ts +0 -96
@@ -1,31 +1,20 @@
1
1
  <template>
2
2
  <div class="criteria_section">
3
3
  <p class="arg_scope_label">
4
- {{
5
- lang === "en"
6
- ? "Scope applied:"
7
- : lang === "es"
8
- ? "Scope aplicado:"
9
- : "Scope appliqué:"
10
- }}
4
+ {{ langData?.apply }}
11
5
  </p>
12
6
  <p class="arg_scope">
13
- {{
14
- selected !== null
15
- ? selected
16
- : lang === "en"
17
- ? "Custom"
18
- : lang === "es"
19
- ? "Personalizado"
20
- : "Sur mesure"
21
- }}
7
+ {{ selected !== null ? selected : langData?.custom }}
22
8
  </p>
23
9
  </div>
24
10
  </template>
25
11
 
26
12
  <script>
27
13
  import {
28
- defineComponent
14
+ ref,
15
+ watch,
16
+ defineComponent,
17
+ onBeforeMount
29
18
  } from "vue";
30
19
  export default defineComponent({
31
20
  name: "argScopeCriteriaIndicator",
@@ -38,9 +27,33 @@ export default defineComponent({
38
27
  type: String,
39
28
  default: "en",
40
29
  validator: (value) => {
41
- return ["en", "fr", "es"].includes(value);
30
+ return ["en", "fr", "es", "jp"].includes(value);
42
31
  }
43
32
  }
33
+ },
34
+ setup(props) {
35
+ const langData = ref(null);
36
+ async function setLang() {
37
+ const jsonFiles = import.meta.glob("./locales/*.json");
38
+ for (const path in jsonFiles) {
39
+ if (path.split("/")[2].includes(props.lang)) {
40
+ const json = await jsonFiles[path]();
41
+ langData.value = json.scopeIndic;
42
+ }
43
+ }
44
+ }
45
+ onBeforeMount(async () => {
46
+ setLang();
47
+ });
48
+ watch(
49
+ () => props.lang,
50
+ () => {
51
+ setLang();
52
+ }
53
+ );
54
+ return {
55
+ langData
56
+ };
44
57
  }
45
58
  });
46
59
  </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: StringConstructor;
14
16
  default: null;
@@ -3,15 +3,7 @@
3
3
  <div class="oip_row v-center gap-16">
4
4
  <arg-actions :lang="lang" action-type="cancel" @onAction="goBack()" />
5
5
  <h1 class="scope_title">
6
- {{
7
- scopeTitle !== null
8
- ? scopeTitle
9
- : lang === "en"
10
- ? "My scope"
11
- : lang === "es"
12
- ? "Mi scope"
13
- : "Mon scope"
14
- }}
6
+ {{ scopeTitle !== null ? scopeTitle : langData }}
15
7
  </h1>
16
8
  </div>
17
9
  <div class="oip_row v-center gap-16">
@@ -22,7 +14,10 @@
22
14
 
23
15
  <script>
24
16
  import {
25
- defineComponent
17
+ ref,
18
+ watch,
19
+ defineComponent,
20
+ onBeforeMount
26
21
  } from "vue";
27
22
  import { useRouter } from "vue-router";
28
23
  import argActions from "./argActions.vue";
@@ -38,7 +33,7 @@ export default defineComponent({
38
33
  type: String,
39
34
  default: "en",
40
35
  validator: (value) => {
41
- return ["en", "fr", "es"].includes(value);
36
+ return ["en", "fr", "es", "jp"].includes(value);
42
37
  }
43
38
  },
44
39
  cancelLink: {
@@ -49,6 +44,25 @@ export default defineComponent({
49
44
  },
50
45
  setup(props) {
51
46
  const router = useRouter();
47
+ const langData = ref(null);
48
+ async function setLang() {
49
+ const jsonFiles = import.meta.glob("./locales/*.json");
50
+ for (const path in jsonFiles) {
51
+ if (path.split("/")[2].includes(props.lang)) {
52
+ const json = await jsonFiles[path]();
53
+ langData.value = json.myScope;
54
+ }
55
+ }
56
+ }
57
+ onBeforeMount(async () => {
58
+ setLang();
59
+ });
60
+ watch(
61
+ () => props.lang,
62
+ () => {
63
+ setLang();
64
+ }
65
+ );
52
66
  function goBack() {
53
67
  if (props.cancelLink !== null) {
54
68
  router.push(props.cancelLink);
@@ -57,7 +71,8 @@ export default defineComponent({
57
71
  }
58
72
  return {
59
73
  router,
60
- goBack
74
+ goBack,
75
+ langData
61
76
  };
62
77
  }
63
78
  });
@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  }, {
17
17
  router: import("vue-router").Router;
18
18
  goBack: () => void;
19
+ langData: import("vue").Ref<any>;
19
20
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
20
21
  scopeTitle: {
21
22
  type: StringConstructor;
@@ -4,13 +4,7 @@
4
4
  <div class="arg_scope_manage_modal">
5
5
  <div class="arg_scope_manage_header">
6
6
  <h1>
7
- {{
8
- lang === "fr"
9
- ? "Gérer mes scopes"
10
- : lang === "es"
11
- ? "Gestionar mis scopes"
12
- : "Manage my scopes"
13
- }}
7
+ {{ langData?.title }}
14
8
  </h1>
15
9
  <div class="cursor-pointer" @click="closeManageScope()">
16
10
  <arg-icon name="X" size="16" color="var(--dark)" />
@@ -30,43 +24,25 @@
30
24
  <arg-text-btn
31
25
  text-style="warning"
32
26
  @onClick="deleteScope(scope)"
33
- >{{
34
- lang === "fr"
35
- ? "Supprimer"
36
- : lang === "es"
37
- ? "Borrar"
38
- : "Delete"
39
- }}</arg-text-btn
27
+ >{{ langData?.del }}</arg-text-btn
40
28
  >
41
29
  </div>
42
30
  <p class="oip_body">{{ scope.description }}</p>
43
31
  <p class="oip_filter_label">
44
- {{
45
- lang === "fr"
46
- ? "Créé le "
47
- : lang === "es"
48
- ? "Creado el"
49
- : "Created the "
50
- }}
32
+ <span v-if="lang !== 'jp'">{{ langData?.created }} </span>
51
33
  <span
52
34
  ><arg-date
53
35
  class="oip_filter_label"
54
36
  :raw-date="scope.createdAt"
37
+ :lang="lang"
55
38
  />
56
39
  </span>
40
+ <span v-if="lang === 'jp'">{{ langData?.created }} </span>
57
41
  </p>
58
42
  </div>
59
43
 
60
44
  <div class="arg_scope_manage_criteria">
61
- <p class="scope_criteria_title">
62
- {{
63
- lang === "es"
64
- ? "Criterio"
65
- : lang === "fr"
66
- ? "Critères"
67
- : "Criteria"
68
- }}:
69
- </p>
45
+ <p class="scope_criteria_title">{{ langData?.criteria }}:</p>
70
46
  <div class="oip_row v-center gap-8 wrap">
71
47
  <arg-tags
72
48
  v-for="(criteria, critIndex) in showAllProps === index
@@ -101,9 +77,7 @@
101
77
  full-width
102
78
  btn-style="secondary-stroke"
103
79
  @onClick="closeManageScope"
104
- >{{
105
- lang === "fr" ? "Fermer" : lang === "es" ? "Cerrar" : "Close"
106
- }}</arg-btn
80
+ >{{ langData?.close }}</arg-btn
107
81
  >
108
82
  </div>
109
83
  </div>
@@ -112,7 +86,7 @@
112
86
  </template>
113
87
 
114
88
  <script>
115
- import { ref, defineComponent } from "vue";
89
+ import { ref, defineComponent, watch, onBeforeMount } from "vue";
116
90
  import argBtn from "./argBtn.vue";
117
91
  import argDate from "./argDate.vue";
118
92
  import argIcon from "./argIcon.vue";
@@ -142,6 +116,25 @@ export default defineComponent({
142
116
  emits: ["onDelete", "onClose"],
143
117
  setup(props, { emit }) {
144
118
  const showAllProps = ref(null);
119
+ const langData = ref(null);
120
+ async function setLang() {
121
+ const jsonFiles = import.meta.glob("./locales/*.json");
122
+ for (const path in jsonFiles) {
123
+ if (path.split("/")[2].includes(props.lang)) {
124
+ const json = await jsonFiles[path]();
125
+ langData.value = json.scopeManage;
126
+ }
127
+ }
128
+ }
129
+ onBeforeMount(async () => {
130
+ setLang();
131
+ });
132
+ watch(
133
+ () => props.lang,
134
+ () => {
135
+ setLang();
136
+ }
137
+ );
145
138
  function getScopeCriteria(scope) {
146
139
  const allCriteria = [];
147
140
  const scopeCriteria = JSON.parse(scope.criteria);
@@ -162,7 +155,8 @@ export default defineComponent({
162
155
  getScopeCriteria,
163
156
  closeManageScope,
164
157
  deleteScope,
165
- showAllProps
158
+ showAllProps,
159
+ langData
166
160
  };
167
161
  }
168
162
  });
@@ -17,6 +17,7 @@ declare const _default: import("vue").DefineComponent<{
17
17
  closeManageScope: () => void;
18
18
  deleteScope: (scope: any) => void;
19
19
  showAllProps: import("vue").Ref<any>;
20
+ langData: import("vue").Ref<any>;
20
21
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClose" | "onDelete")[], "onClose" | "onDelete", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
22
  scopes: {
22
23
  type: ArrayConstructor;
@@ -4,13 +4,7 @@
4
4
  <div class="arg_save_modal">
5
5
  <div class="arg_save_header">
6
6
  <h1>
7
- {{
8
- lang === "fr"
9
- ? "Enregistrer mon scope"
10
- : lang === "es"
11
- ? "Salvar mi scope"
12
- : "Save my scope"
13
- }}
7
+ {{ langData?.title }}
14
8
  </h1>
15
9
  <div class="cursor-pointer" @click="closeSaveScope()">
16
10
  <arg-icon name="X" size="16" color="var(--dark)" />
@@ -18,72 +12,34 @@
18
12
  </div>
19
13
  <div class="arg_save_body">
20
14
  <div class="oip_filter_display scope_name_input">
21
- <p class="oip_filter_label">
22
- {{
23
- lang === "fr"
24
- ? "Nom scope"
25
- : lang === "es"
26
- ? "Scope nombre"
27
- : "Scope name"
28
- }}*
29
- </p>
15
+ <p class="oip_filter_label">{{ langData?.name }}*</p>
30
16
  <input
31
17
  v-model="scopeName"
32
18
  class="oip_simple_input"
33
19
  :class="saveFail ? 'oip_required_input' : ''"
34
- :placeholder="
35
- lang === 'fr'
36
- ? 'Nom de votre scope e.g Benchmark 2023'
37
- : lang === 'es'
38
- ? 'Nombre del scope e.g Benchmark 2023'
39
- : 'Name of your scope e.g. Benchmark 2023'
40
- "
20
+ :placeholder="langData?.namePlaceholder"
41
21
  type="text"
42
22
  :required="true"
43
23
  />
44
24
  <p v-if="saveFail" class="oip_body oip_error">
45
- {{
46
- lang === "fr"
47
- ? "Un nom est requis pour enregistrer votre scope!"
48
- : lang === "es"
49
- ? "Nombre es necesario para salvar el scope!"
50
- : "Name is required to save your scope!"
51
- }}
25
+ {{ langData?.nameError }}
52
26
  </p>
53
27
  </div>
54
28
  <div class="oip_filter_display full_width">
55
29
  <p class="oip_filter_label">
56
- {{
57
- lang === "fr"
58
- ? "Décrivez votre scope (optionnel)"
59
- : lang === "es"
60
- ? "Describe su scope (opcional)"
61
- : "Describe your scope (optional)"
62
- }}
30
+ {{ langData?.descr }}
63
31
  </p>
64
32
  <textarea
65
33
  v-model="scopeDescr"
66
34
  name="ScopeDescr"
67
35
  cols="40"
68
36
  rows="5"
69
- :placeholder="
70
- lang === 'fr'
71
- ? 'Votre description ici'
72
- : lang === 'es'
73
- ? 'Su descripción aquí'
74
- : 'Your description here'
75
- "
37
+ :placeholder="langData?.descrPlaceholder"
76
38
  />
77
39
  </div>
78
40
  <div class="oip_filter_display full_width">
79
41
  <p class="oip_filter_label">
80
- {{
81
- lang === "fr"
82
- ? "Critères"
83
- : lang === "es"
84
- ? "Criterio"
85
- : "Criteria"
86
- }}
42
+ {{ langData?.crit }}
87
43
  </p>
88
44
  <div class="scope_criteria">
89
45
  <arg-tags
@@ -103,9 +59,7 @@
103
59
  full-width
104
60
  btn-style="secondary-stroke"
105
61
  @onClick="closeSaveScope"
106
- >{{
107
- lang === "fr" ? "Annuler" : lang === "es" ? "Anular" : "Cancel"
108
- }}</arg-btn
62
+ >{{ langData?.cancel }}</arg-btn
109
63
  >
110
64
  </div>
111
65
  <div class="footer_action">
@@ -115,13 +69,7 @@
115
69
  btn-style="primary-fill"
116
70
  full-width
117
71
  @onClick="saveScope"
118
- >{{
119
- lang === "fr"
120
- ? "Enregistrer le scope et continuer"
121
- : lang === "es"
122
- ? "Salvar scope y continuar"
123
- : "Save scope and continue"
124
- }}</arg-btn
72
+ >{{ langData?.save }}</arg-btn
125
73
  >
126
74
  </div>
127
75
  </div>
@@ -137,7 +85,8 @@ import {
137
85
  onMounted,
138
86
  watch,
139
87
  computed,
140
- onUnmounted
88
+ onUnmounted,
89
+ onBeforeMount
141
90
  } from "vue";
142
91
  import argIcon from "./argIcon.vue";
143
92
  import argBtn from "./argBtn.vue";
@@ -154,12 +103,31 @@ export default defineComponent({
154
103
  type: String,
155
104
  default: "en",
156
105
  validator: (value) => {
157
- return ["en", "fr", "es"].includes(value);
106
+ return ["en", "fr", "es", "jp"].includes(value);
158
107
  }
159
108
  }
160
109
  },
161
110
  emits: ["onClose", "onSave"],
162
111
  setup(props, { emit }) {
112
+ const langData = ref(null);
113
+ async function setLang() {
114
+ const jsonFiles = import.meta.glob("./locales/*.json");
115
+ for (const path in jsonFiles) {
116
+ if (path.split("/")[2].includes(props.lang)) {
117
+ const json = await jsonFiles[path]();
118
+ langData.value = json.scopeCreate;
119
+ }
120
+ }
121
+ }
122
+ onBeforeMount(async () => {
123
+ setLang();
124
+ });
125
+ watch(
126
+ () => props.lang,
127
+ () => {
128
+ setLang();
129
+ }
130
+ );
163
131
  onMounted(() => {
164
132
  const body = document.querySelector("html");
165
133
  if (body) {
@@ -217,7 +185,8 @@ export default defineComponent({
217
185
  scopeDescr,
218
186
  nameFilled,
219
187
  saveFail,
220
- getAllCriteria
188
+ getAllCriteria,
189
+ langData
221
190
  };
222
191
  }
223
192
  });
@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  nameFilled: import("vue").Ref<boolean>;
17
17
  saveFail: import("vue").Ref<boolean>;
18
18
  getAllCriteria: import("vue").ComputedRef<never[]>;
19
+ langData: import("vue").Ref<any>;
19
20
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClose" | "onSave")[], "onClose" | "onSave", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
20
21
  scopeCriteria: {
21
22
  type: ArrayConstructor;
@@ -6,6 +6,12 @@
6
6
  @click.stop="openSugg"
7
7
  >
8
8
  <div class="search-section">
9
+ <!-- <div v-if="loadingSuggs" class="search_loader">
10
+ <div></div>
11
+ <div></div>
12
+ <div></div>
13
+ <div></div>
14
+ </div> -->
9
15
  <arg-icon
10
16
  name="MagnifyingGlass"
11
17
  color="var(--medium)"
@@ -39,7 +45,7 @@
39
45
  @click.stop
40
46
  >
41
47
  <div v-if="loadingSuggs">
42
- <p class="loading oip_body">{{ loaderText[lang] }}</p>
48
+ <p class="loading oip_body">{{ loaderText }}</p>
43
49
  </div>
44
50
  <div v-if="filterSuggestions.length > 0" class="sugg_container">
45
51
  <p
@@ -61,7 +67,7 @@
61
67
  </p>
62
68
  </div>
63
69
  <div v-else-if="!loadingSuggs" class="sugg_container">
64
- <p class="not-found oip_body">{{ notFound[lang] }}</p>
70
+ <p class="not-found oip_body">{{ notFound }}</p>
65
71
  </div>
66
72
  </div>
67
73
  </div>
@@ -75,7 +81,8 @@ import {
75
81
  computed,
76
82
  watch,
77
83
  defineComponent,
78
- onUnmounted
84
+ onUnmounted,
85
+ onBeforeMount
79
86
  } from "vue";
80
87
  export default defineComponent({
81
88
  name: "argSearchInput",
@@ -118,16 +125,31 @@ export default defineComponent({
118
125
  const searchValue = ref("");
119
126
  const suggOpen = ref(false);
120
127
  const searchBar = ref();
121
- const notFound = {
122
- fr: "Aucune suggestion n'a \xE9t\xE9 trouv\xE9e",
123
- en: "No suggestions were found",
124
- es: "No se encontraron sugerencias"
125
- };
126
- const loaderText = {
127
- fr: "Plus de suggestions en chargement",
128
- en: "Loading more suggestions",
129
- es: "cargando m\xE1s sugerencias"
130
- };
128
+ const langData = ref(null);
129
+ async function setLang() {
130
+ const jsonFiles = import.meta.glob("./locales/*.json");
131
+ for (const path in jsonFiles) {
132
+ if (path.split("/")[2].includes(props.lang)) {
133
+ const json = await jsonFiles[path]();
134
+ langData.value = json.search;
135
+ }
136
+ }
137
+ }
138
+ onBeforeMount(async () => {
139
+ setLang();
140
+ });
141
+ watch(
142
+ () => props.lang,
143
+ () => {
144
+ setLang();
145
+ }
146
+ );
147
+ const notFound = computed(() => {
148
+ return langData.value?.empty;
149
+ });
150
+ const loaderText = computed(() => {
151
+ return langData.value?.loading;
152
+ });
131
153
  const closeOnEnter = ref(false);
132
154
  const optionIndex = ref(1);
133
155
  function selectOption(isDown) {
@@ -271,5 +293,5 @@ export default defineComponent({
271
293
  });
272
294
  </script>
273
295
  <style scoped>
274
- .filters_input_search{align-items:center;background:var(--white);border:1.5px solid var(--light);border-radius:8px;display:flex;flex-direction:row;gap:12px;justify-content:space-between;min-height:40px;padding:0 12px;width:calc(100% - 24px)}.filters_input_search.no_bottom{border:1.5px solid var(--primary)!important;border-bottom:none!important;border-radius:8px 8px 0 0;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.search-section{align-items:center;display:flex;flex-direction:row;gap:12px;width:100%}.filters_input_search:not(.no_bottom):hover{border:1.5px solid rgba(33,118,255,.2)}.filters_input_search.no_bottom:hover{border-bottom:none!important}.filters_input_search:focus-within{border:1.5px solid var(--primary)!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.filters_input_search.no_bottom:focus-within{border-bottom:none!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.filters_input_search:focus-within .search-icon,.filters_input_search:hover .search-icon{color:var(--primary)!important}.filters_input_style{width:100%}.filters_input_style,.filters_input_style:focus-visible{border:none;outline:none}.filters_input_style::-moz-placeholder{color:var(--medium)}.filters_input_style::placeholder{color:var(--medium)}.close-icon{align-items:center;background:var(--light);border-radius:100%;cursor:pointer;display:flex;justify-content:center;padding:5px}.close-icon:hover svg{color:var(--primary)!important}.relative{position:relative;width:100%}.search_suggestions{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fff;border:1.5px solid var(--light);border-radius:0 0 8px 8px;left:0;max-height:200px;overflow-y:scroll;position:absolute;width:100%;z-index:99}.search_suggestions::-webkit-scrollbar{height:5px;width:5px}.search_suggestions::-webkit-scrollbar-thumb{background:var(--medium);border-radius:12px!important}.search_suggestions::-webkit-scrollbar-thumb:hover{background:var(--medium)!important}.sugg_open{border-top:1.5px solid var(--primary)!important;border:1.5px solid var(--primary)!important;border-top-color:var(--light)!important;box-shadow:2px 2px 3px rgba(33,118,255,.1),-2px 2px 3px rgba(33,118,255,.1)}.sugg_container{cursor:pointer;display:flex;flex-direction:column}.sugg_container p:not(.loading){align-items:center;display:flex;gap:8px;padding:8px 12px}.sugg_container p.selected,.sugg_container p:not(.not-found,.loading):hover{background:rgba(93,153,250,.2)}.sugg_container p.selected svg,.sugg_container p:not(.not-found,.loading):hover svg{color:var(--primary)!important}.sugg_container p:last-of-type{border-radius:0 0 8px 8px}.loading{color:var(--medium);font-style:italic;padding:8px 12px}.loading:after{animation:dots 1.3s step-end infinite;content:"";display:inline-block}@keyframes dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}to{content:""}}
296
+ .filters_input_search{align-items:center;background:var(--white);border:1.5px solid var(--light);border-radius:8px;display:flex;flex-direction:row;gap:12px;justify-content:space-between;min-height:40px;padding:0 12px;width:calc(100% - 24px)}.filters_input_search.no_bottom{border:1.5px solid var(--primary)!important;border-bottom:none!important;border-radius:8px 8px 0 0;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.search-section{align-items:center;display:flex;flex-direction:row;gap:12px;width:100%}.filters_input_search:not(.no_bottom):hover{border:1.5px solid rgba(33,118,255,.2)}.filters_input_search.no_bottom:hover{border-bottom:none!important}.filters_input_search:focus-within{border:1.5px solid var(--primary)!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.filters_input_search.no_bottom:focus-within{border-bottom:none!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.filters_input_search:focus-within .search-icon,.filters_input_search:hover .search-icon{color:var(--primary)!important}.filters_input_style{width:100%}.filters_input_style,.filters_input_style:focus-visible{border:none;outline:none}.filters_input_style::-moz-placeholder{color:var(--medium)}.filters_input_style::placeholder{color:var(--medium)}.close-icon{align-items:center;background:var(--light);border-radius:100%;cursor:pointer;display:flex;justify-content:center;padding:5px}.close-icon:hover svg{color:var(--primary)!important}.relative{position:relative;width:100%}.search_suggestions{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fff;border:1.5px solid var(--light);border-radius:0 0 8px 8px;left:0;max-height:200px;overflow-y:scroll;position:absolute;width:100%;z-index:99}.search_suggestions::-webkit-scrollbar{height:5px;width:5px}.search_suggestions::-webkit-scrollbar-thumb{background:var(--medium);border-radius:12px!important}.search_suggestions::-webkit-scrollbar-thumb:hover{background:var(--medium)!important}.sugg_open{border-top:1.5px solid var(--primary)!important;border:1.5px solid var(--primary)!important;border-top-color:var(--light)!important;box-shadow:2px 2px 3px rgba(33,118,255,.1),-2px 2px 3px rgba(33,118,255,.1)}.sugg_container{cursor:pointer;display:flex;flex-direction:column}.sugg_container p:not(.loading){align-items:center;display:flex;gap:8px;padding:8px 12px}.sugg_container p.selected,.sugg_container p:not(.not-found,.loading):hover{background:rgba(93,153,250,.2)}.sugg_container p.selected svg,.sugg_container p:not(.not-found,.loading):hover svg{color:var(--primary)!important}.sugg_container p:last-of-type{border-radius:0 0 8px 8px}.loading{color:var(--medium);font-style:italic;padding:8px 12px}.loading:after{animation:dots 1.3s step-end infinite;content:"";display:inline-block}@keyframes dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}to{content:""}}.search_loader{display:inline-block;flex-shrink:0!important;height:20px;position:relative;width:20px}.search_loader div{animation:oip-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border:2px solid var(--primary);border-color:var(--primary) transparent transparent transparent;border-radius:50%;box-sizing:border-box;display:block;height:20px;position:absolute;width:20px}.search_loader div:first-child{animation-delay:-.45s}.search_loader div:nth-child(2){animation-delay:-.3s}.search_loader div:nth-child(3){animation-delay:-.15s}@keyframes oip-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
275
297
  </style>
@@ -60,16 +60,8 @@ declare const _default: import("vue").DefineComponent<{
60
60
  selectSugg: (sugg: Suggestion) => void;
61
61
  selectOption: (isDown: boolean) => void;
62
62
  optionIndex: import("vue").Ref<number>;
63
- notFound: {
64
- fr: string;
65
- en: string;
66
- es: string;
67
- };
68
- loaderText: {
69
- fr: string;
70
- en: string;
71
- es: string;
72
- };
63
+ notFound: import("vue").ComputedRef<any>;
64
+ loaderText: import("vue").ComputedRef<any>;
73
65
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Value" | "submitSearch" | "selectSuggestion")[], "update:Value" | "submitSearch" | "selectSuggestion", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
74
66
  placeHolderValue: {
75
67
  type: StringConstructor;
@@ -20,9 +20,7 @@
20
20
  class="arg_sidebar_home"
21
21
  >
22
22
  <arg-tooltip
23
- :tooltip-text="
24
- lang === 'en' ? 'Home' : lang === 'es' ? 'Inicio' : 'Accueil'
25
- "
23
+ :tooltip-text="langData?.home"
26
24
  :disable="sidebarOpen"
27
25
  dir="right"
28
26
  :class="[
@@ -32,19 +30,11 @@
32
30
  >
33
31
  <arg-icon name="House" color="var(--primary)" />
34
32
  </arg-tooltip>
35
- <span v-if="lang === 'en' && sidebarOpen"> Home </span>
36
- <span v-else-if="lang === 'fr' && sidebarOpen"> Accueil </span>
37
- <span v-else-if="lang === 'es' && sidebarOpen"> Inicio </span>
33
+ <span v-if="sidebarOpen"> {{ langData?.home }} </span>
38
34
  </nuxt-link>
39
35
  <div class="sidebar_toggle" @click="toggleSidebar()">
40
36
  <arg-tooltip
41
- :tooltip-text="
42
- lang === 'en'
43
- ? 'Open sidebar'
44
- : lang === 'es'
45
- ? 'Abrir la barra lateral'
46
- : 'Ouvrir le menu latéral'
47
- "
37
+ :tooltip-text="langData?.open"
48
38
  :disable="sidebarOpen"
49
39
  dir="right"
50
40
  :class="[
@@ -80,7 +70,9 @@
80
70
  <script>
81
71
  import {
82
72
  onMounted,
73
+ onBeforeMount,
83
74
  ref,
75
+ watch,
84
76
  defineComponent
85
77
  } from "vue";
86
78
  import argIcon from "./argIcon.vue";
@@ -111,6 +103,25 @@ export default defineComponent({
111
103
  handleResize();
112
104
  });
113
105
  const sidebarOpen = ref(true);
106
+ const langData = ref(null);
107
+ async function setLang() {
108
+ const jsonFiles = import.meta.glob("./locales/*.json");
109
+ for (const path in jsonFiles) {
110
+ if (path.split("/")[2].includes(props.lang)) {
111
+ const json = await jsonFiles[path]();
112
+ langData.value = json.sidebar;
113
+ }
114
+ }
115
+ }
116
+ onBeforeMount(async () => {
117
+ setLang();
118
+ });
119
+ watch(
120
+ () => props.lang,
121
+ () => {
122
+ setLang();
123
+ }
124
+ );
114
125
  function handleResize() {
115
126
  if (window.innerWidth >= 1e3) {
116
127
  sidebarOpen.value = true;
@@ -126,7 +137,8 @@ export default defineComponent({
126
137
  }
127
138
  return {
128
139
  sidebarOpen,
129
- toggleSidebar
140
+ toggleSidebar,
141
+ langData
130
142
  };
131
143
  }
132
144
  });
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  }, {
20
20
  sidebarOpen: import("vue").Ref<boolean>;
21
21
  toggleSidebar: () => void;
22
+ langData: import("vue").Ref<any>;
22
23
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSidebarChange" | "update:Sidebar")[], "onSidebarChange" | "update:Sidebar", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
24
  name: {
24
25
  type: StringConstructor;