@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
@@ -106,7 +106,7 @@
106
106
  : 'add',
107
107
  ]"
108
108
  >
109
- {{ lang === "fr" ? "Tous" : "All" }}
109
+ {{ langData?.all }}
110
110
  </div>
111
111
  </div>
112
112
  <div :class="show_all ? 'oip_select_multiple_left_margin' : ''">
@@ -239,7 +239,7 @@
239
239
  : 'more',
240
240
  ]"
241
241
  >
242
- {{ lang === "fr" ? "Tous" : "All" }}
242
+ {{ langData?.all }}
243
243
  </div>
244
244
  </div>
245
245
  <div
@@ -325,6 +325,7 @@ import {
325
325
  onMounted,
326
326
  ref,
327
327
  computed,
328
+ onBeforeMount,
328
329
  watch,
329
330
  defineComponent,
330
331
  onUnmounted
@@ -354,7 +355,7 @@ export default defineComponent({
354
355
  type: String,
355
356
  default: "en",
356
357
  validator: (value) => {
357
- return ["en", "fr", "es"].includes(value);
358
+ return ["en", "fr", "es", "jp"].includes(value);
358
359
  }
359
360
  },
360
361
  loader_text: { type: Array, default: null },
@@ -380,6 +381,25 @@ export default defineComponent({
380
381
  const selectedCats = ref([]);
381
382
  const valueFrom = ref([]);
382
383
  const element_table_copy = ref([]);
384
+ const langData = ref(null);
385
+ async function setLang() {
386
+ const jsonFiles = import.meta.glob("./locales/*.json");
387
+ for (const path in jsonFiles) {
388
+ if (path.split("/")[2].includes(props.lang)) {
389
+ const json = await jsonFiles[path]();
390
+ langData.value = json.multiple;
391
+ }
392
+ }
393
+ }
394
+ onBeforeMount(async () => {
395
+ setLang();
396
+ });
397
+ watch(
398
+ () => props.lang,
399
+ () => {
400
+ setLang();
401
+ }
402
+ );
383
403
  function openInfo() {
384
404
  emit("openInfo");
385
405
  }
@@ -419,25 +439,25 @@ export default defineComponent({
419
439
  });
420
440
  const getEmptyMsg = computed(() => {
421
441
  if (props.empty_msg === null) {
422
- return props.lang === "fr" ? "Aucune S\xE9lection" : props.lang === "es" ? "Ninguna selecci\xF3n" : "No Selection";
442
+ return langData.value?.empty;
423
443
  } else
424
444
  return props.empty_msg;
425
445
  });
426
446
  const getLoaderText = computed(() => {
427
447
  if (props.loader_text === null) {
428
- return props.lang === "fr" ? ["Chargement...", "Veuillez patienter"] : props.lang === "es" ? ["Cargando...", "Espere, por favor"] : ["Loading...", "Please wait"];
448
+ return [langData.value?.loading, langData.value?.wait];
429
449
  } else
430
450
  return props.loader_text;
431
451
  });
432
452
  const getPlaceholder = computed(() => {
433
453
  if (props.filter_placeholder === null) {
434
- return props.lang === "fr" ? "Rechercher une option..." : props.lang === "es" ? "Buscar una opci\xF3n..." : "Search options...";
454
+ return langData.value?.search;
435
455
  } else
436
456
  return props.filter_placeholder;
437
457
  });
438
458
  const getEmptyContentMsg = computed(() => {
439
459
  if (props.empty_content_msg === null) {
440
- return props.lang === "fr" ? "Aucun contenu n'a \xE9t\xE9 trouv\xE9" : props.lang === "es" ? "Ning\xFAn contenido encontrado" : "No content was found";
460
+ return langData.value?.notFound;
441
461
  } else
442
462
  return props.empty_content_msg;
443
463
  });
@@ -862,7 +882,8 @@ export default defineComponent({
862
882
  getPlaceholder,
863
883
  getEmptyContentMsg,
864
884
  element_table_copy,
865
- openInfo
885
+ openInfo,
886
+ langData
866
887
  };
867
888
  }
868
889
  });
@@ -153,12 +153,13 @@ declare const _default: import("vue").DefineComponent<{
153
153
  selected_all: import("vue").Ref<boolean>;
154
154
  selectedCats: import("vue").Ref<number[]>;
155
155
  valueFrom: import("vue").Ref<never[]>;
156
- getEmptyMsg: import("vue").ComputedRef<string>;
157
- getLoaderText: import("vue").ComputedRef<string[]>;
158
- getPlaceholder: import("vue").ComputedRef<string>;
159
- getEmptyContentMsg: import("vue").ComputedRef<string>;
156
+ getEmptyMsg: import("vue").ComputedRef<any>;
157
+ getLoaderText: import("vue").ComputedRef<any[]>;
158
+ getPlaceholder: import("vue").ComputedRef<any>;
159
+ getEmptyContentMsg: import("vue").ComputedRef<any>;
160
160
  element_table_copy: import("vue").Ref<any[]>;
161
161
  openInfo: () => void;
162
+ langData: import("vue").Ref<any>;
162
163
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClose" | "changeElement" | "update:Selection" | "openInfo" | "changeInputValue")[], "onClose" | "changeElement" | "update:Selection" | "openInfo" | "changeInputValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
163
164
  element_table: {
164
165
  type: {
@@ -1,20 +1,24 @@
1
1
  <template>
2
2
  <div>
3
3
  <div class="no_scope_text">
4
- <p>{{ noScopeText[lang] }}</p>
4
+ <p>{{ noScopeText }}</p>
5
5
  <ul>
6
6
  <li v-for="(step, index) in saveScopeSteps" :key="index">
7
- {{ step[lang] }}
7
+ {{ step }}
8
8
  </li>
9
9
  </ul>
10
- <p>{{ noScopeEnd[lang] }}</p>
10
+ <p>{{ noScopeEnd }}</p>
11
11
  </div>
12
12
  </div>
13
13
  </template>
14
14
 
15
15
  <script>
16
16
  import {
17
- defineComponent
17
+ ref,
18
+ computed,
19
+ watch,
20
+ defineComponent,
21
+ onBeforeMount
18
22
  } from "vue";
19
23
  export default defineComponent({
20
24
  name: "argNoSavedScope",
@@ -23,47 +27,49 @@ export default defineComponent({
23
27
  type: String,
24
28
  default: "en",
25
29
  validator: (value) => {
26
- return ["en", "fr", "es"].includes(value);
30
+ return ["en", "fr", "es", "jp"].includes(value);
27
31
  }
28
32
  }
29
33
  },
30
- setup() {
31
- const noScopeText = {
32
- en: `You don't have Scopes saved yet. Here's how to create a new scope:`,
33
- es: `No tienes Scopes salvados. As\xED se crea un nuevo scope: `,
34
- fr: `Vous n'avez pas encore de scope enregistr\xE9. Voici comment cr\xE9er un nouveau scope:`
35
- };
36
- const saveScopeSteps = [
37
- {
38
- en: `Switch to \u201CNew Scope Criteria\u201D`,
39
- es: `Cambiar a "Nuveo Scope Criterio"`,
40
- fr: `Choisissez l'onglet "Nouveau crit\xE8re scope"`
41
- },
42
- {
43
- en: `Select all the criteria you need`,
44
- es: `Seleccione todos los criterios que necesite`,
45
- fr: `S\xE9lectionnez les crit\xE8res dont vous avez besoin`
46
- },
47
- {
48
- en: `Click on \u201CSave and continue\u201D at the top right of your screen`,
49
- es: `Haga clic en "Salvar y continuar" en la parte superior derecha de la pantalla.`,
50
- fr: `Cliquez sur "Sauvegarder et continuer" en haut \xE0 droite de votre \xE9cran`
51
- },
52
- {
53
- en: `Fill the form with the information you need and click on \u201CSave scope and continue\u201D`,
54
- es: `Rellene el formulario con la informaci\xF3n que necesita y haga clic en "Salvar scope y continuar"`,
55
- fr: `Remplissez le formulaire avec vos informations et cliquez sur "Sauvegarder le scope et continuer"`
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.noSavedScope;
42
+ }
56
43
  }
57
- ];
58
- const noScopeEnd = {
59
- en: `And that\u2019s it ! Your scope will be saved and you will be able to recover it next time you connect !`,
60
- es: `Ya est\xE1 ! Su scope quedar\xE1 guardado y podr\xE1 recuperarlo la pr\xF3xima vez que se conecte.`,
61
- fr: `Et c'est tout ! Votre scope sera sauvegard\xE9 et vous pourrez le retrouver lors de vos prochaines connexions !`
62
- };
44
+ }
45
+ onBeforeMount(async () => {
46
+ setLang();
47
+ });
48
+ watch(
49
+ () => props.lang,
50
+ () => {
51
+ setLang();
52
+ }
53
+ );
54
+ const noScopeText = computed(() => {
55
+ return langData.value?.main;
56
+ });
57
+ const saveScopeSteps = computed(() => {
58
+ return [
59
+ langData.value?.step1,
60
+ langData.value?.step2,
61
+ langData.value?.step3,
62
+ langData.value?.step4
63
+ ];
64
+ });
65
+ const noScopeEnd = computed(() => {
66
+ return langData.value?.end;
67
+ });
63
68
  return {
64
69
  noScopeText,
65
70
  saveScopeSteps,
66
- noScopeEnd
71
+ noScopeEnd,
72
+ langData
67
73
  };
68
74
  }
69
75
  });
@@ -5,21 +5,10 @@ declare const _default: import("vue").DefineComponent<{
5
5
  validator: (value: string) => boolean;
6
6
  };
7
7
  }, {
8
- noScopeText: {
9
- en: string;
10
- es: string;
11
- fr: string;
12
- };
13
- saveScopeSteps: {
14
- en: string;
15
- es: string;
16
- fr: string;
17
- }[];
18
- noScopeEnd: {
19
- en: string;
20
- es: string;
21
- fr: string;
22
- };
8
+ noScopeText: import("vue").ComputedRef<any>;
9
+ saveScopeSteps: import("vue").ComputedRef<any[]>;
10
+ noScopeEnd: import("vue").ComputedRef<any>;
11
+ langData: import("vue").Ref<any>;
23
12
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
13
  lang: {
25
14
  type: StringConstructor;
@@ -10,13 +10,7 @@
10
10
  <div v-if="scopeArray.length > 0" class="arg_scopes_select">
11
11
  <div class="oip_row v-center justify-between full_row">
12
12
  <p class="args_select_title">
13
- {{
14
- lang === "fr"
15
- ? "Appliquer un scope existant"
16
- : lang === "es"
17
- ? "Aplicar un scope existente"
18
- : "Apply an existing scope"
19
- }}
13
+ {{ langData?.exists }}
20
14
  </p>
21
15
  <slot name="manage" />
22
16
  </div>
@@ -33,20 +27,14 @@
33
27
  size="m"
34
28
  full-width
35
29
  @onClick="selectScope"
36
- >{{
37
- lang === "fr"
38
- ? "Appliquer le scope"
39
- : lang === "es"
40
- ? "Aplicar el scope"
41
- : "Apply scope"
42
- }}</arg-btn
30
+ >{{ langData?.apply }}</arg-btn
43
31
  >
44
32
  <div
45
33
  v-if="scopeArray.length > 0"
46
34
  class="oip_row v-center gap-8 full-width"
47
35
  >
48
36
  <div class="scope_sep" />
49
- <p class="scope_sep_text">or</p>
37
+ <p class="scope_sep_text">{{ langData?.or }}</p>
50
38
  <div class="scope_sep" />
51
39
  </div>
52
40
  <arg-btn
@@ -54,13 +42,7 @@
54
42
  size="m"
55
43
  full-width
56
44
  @onClick="createNewScope"
57
- >{{
58
- lang === "fr"
59
- ? "+ Nouveau scope"
60
- : lang === "es"
61
- ? "+ Nuevo scope"
62
- : "+ New scope"
63
- }}</arg-btn
45
+ >{{ langData?.new }}</arg-btn
64
46
  >
65
47
  </div>
66
48
  </div>
@@ -70,7 +52,9 @@
70
52
  import {
71
53
  ref,
72
54
  computed,
73
- defineComponent
55
+ watch,
56
+ defineComponent,
57
+ onBeforeMount
74
58
  } from "vue";
75
59
  import argIcon from "./argIcon.vue";
76
60
  import argScopeSelect from "./argScopeSelect.vue";
@@ -83,7 +67,7 @@ export default defineComponent({
83
67
  type: String,
84
68
  default: "en",
85
69
  validator: (value) => {
86
- return ["en", "fr", "es"].includes(value);
70
+ return ["en", "fr", "es", "jp"].includes(value);
87
71
  }
88
72
  },
89
73
  scopeArray: {
@@ -94,13 +78,27 @@ export default defineComponent({
94
78
  emits: ["onSelectScope", "update:Scope", "onCreateScope"],
95
79
  setup(props, { emit }) {
96
80
  const selectedScope = ref(null);
81
+ const langData = ref(null);
82
+ async function setLang() {
83
+ const jsonFiles = import.meta.glob("./locales/*.json");
84
+ for (const path in jsonFiles) {
85
+ if (path.split("/")[2].includes(props.lang)) {
86
+ const json = await jsonFiles[path]();
87
+ langData.value = json.noScope;
88
+ }
89
+ }
90
+ }
91
+ onBeforeMount(async () => {
92
+ setLang();
93
+ });
94
+ watch(
95
+ () => props.lang,
96
+ () => {
97
+ setLang();
98
+ }
99
+ );
97
100
  const getNoScopeMsg = computed(() => {
98
- if (props.lang === "en") {
99
- return `You need to select your scope to view any results or data. Please choose one of the options below to proceed.`;
100
- } else if (props.lang === "es") {
101
- return `Debe seleccionar su scope para ver los resultados o los datos. Elija una de las opciones siguientes para continuar.`;
102
- } else
103
- return `Vous devez s\xE9lectionner votre scope pour voir les r\xE9sultats ou donn\xE9es. Veuillez choisir une des options ci-dessous pour continuer`;
101
+ return langData.value?.message;
104
102
  });
105
103
  function selectScope() {
106
104
  emit("onSelectScope", selectedScope.value);
@@ -109,7 +107,13 @@ export default defineComponent({
109
107
  function createNewScope() {
110
108
  emit("onCreateScope");
111
109
  }
112
- return { getNoScopeMsg, selectedScope, selectScope, createNewScope };
110
+ return {
111
+ getNoScopeMsg,
112
+ selectedScope,
113
+ selectScope,
114
+ createNewScope,
115
+ langData
116
+ };
113
117
  }
114
118
  });
115
119
  </script>
@@ -9,10 +9,11 @@ declare const _default: import("vue").DefineComponent<{
9
9
  default: () => never[];
10
10
  };
11
11
  }, {
12
- getNoScopeMsg: import("vue").ComputedRef<"You need to select your scope to view any results or data. Please choose one of the options below to proceed." | "Debe seleccionar su scope para ver los resultados o los datos. Elija una de las opciones siguientes para continuar." | "Vous devez sélectionner votre scope pour voir les résultats ou données. Veuillez choisir une des options ci-dessous pour continuer">;
12
+ getNoScopeMsg: import("vue").ComputedRef<any>;
13
13
  selectedScope: import("vue").Ref<any>;
14
14
  selectScope: () => void;
15
15
  createNewScope: () => void;
16
+ langData: import("vue").Ref<any>;
16
17
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSelectScope" | "update:Scope" | "onCreateScope")[], "onSelectScope" | "update:Scope" | "onCreateScope", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
18
  lang: {
18
19
  type: StringConstructor;
@@ -22,15 +22,7 @@
22
22
  full-width
23
23
  @onClick="saveScope()"
24
24
  prefix-icon="BoxArrowDown"
25
- >{{
26
- saveMsg !== null
27
- ? saveMsg
28
- : lang === "fr"
29
- ? "Sauvegarder le scope"
30
- : lang === "es"
31
- ? "Salvar scope"
32
- : "Save scope"
33
- }}</arg-btn
25
+ >{{ saveMsg !== null ? saveMsg : langData?.save }}</arg-btn
34
26
  >
35
27
  <arg-btn
36
28
  v-if="createNew"
@@ -39,13 +31,7 @@
39
31
  full-width
40
32
  @onClick="newScope()"
41
33
  prefix-icon="PlusCircle"
42
- >{{
43
- lang === "fr"
44
- ? "Nouveau scope"
45
- : lang === "es"
46
- ? "Nuevo scope"
47
- : "New scope"
48
- }}</arg-btn
34
+ >{{ langData?.new }}</arg-btn
49
35
  >
50
36
  </div>
51
37
  <div
@@ -89,6 +75,7 @@ import {
89
75
  computed,
90
76
  watch,
91
77
  defineComponent,
78
+ onBeforeMount,
92
79
  onUnmounted
93
80
  } from "vue";
94
81
  export default defineComponent({
@@ -102,7 +89,7 @@ export default defineComponent({
102
89
  type: String,
103
90
  default: "en",
104
91
  validator: (value) => {
105
- return ["en", "fr", "es"].includes(value);
92
+ return ["en", "fr", "es", "jp"].includes(value);
106
93
  }
107
94
  },
108
95
  createNew: {
@@ -134,6 +121,25 @@ export default defineComponent({
134
121
  setup(props, { emit }) {
135
122
  const isDisplay = ref(false);
136
123
  const selectedScope = ref(null);
124
+ const langData = ref(null);
125
+ async function setLang() {
126
+ const jsonFiles = import.meta.glob("./locales/*.json");
127
+ for (const path in jsonFiles) {
128
+ if (path.split("/")[2].includes(props.lang)) {
129
+ const json = await jsonFiles[path]();
130
+ langData.value = json.scopeChange;
131
+ }
132
+ }
133
+ }
134
+ onBeforeMount(async () => {
135
+ setLang();
136
+ });
137
+ watch(
138
+ () => props.lang,
139
+ () => {
140
+ setLang();
141
+ }
142
+ );
137
143
  onMounted(() => {
138
144
  if (props.active_scope !== null) {
139
145
  selectedScope.value = props.active_scope;
@@ -150,9 +156,9 @@ export default defineComponent({
150
156
  );
151
157
  const getTitle = computed(() => {
152
158
  if (props.scopes.length > 0 || props.scopes.length === 0 && props.showActions) {
153
- return props.lang === "en" ? "Change scope" : props.lang === "es" ? "Cambiar scope" : "Changer scope";
159
+ return langData.value?.change;
154
160
  } else
155
- return props.lang === "en" ? "Apply scope" : props.lang === "es" ? "Aplicar scope" : "Appliquer scope";
161
+ return langData.value?.apply;
156
162
  });
157
163
  function closeDropdown() {
158
164
  isDisplay.value = false;
@@ -194,7 +200,8 @@ export default defineComponent({
194
200
  selectScope,
195
201
  selectedScope,
196
202
  newScope,
197
- saveScope
203
+ saveScope,
204
+ langData
198
205
  };
199
206
  }
200
207
  });
@@ -58,11 +58,12 @@ declare const _default: import("vue").DefineComponent<{
58
58
  isDisplay: import("vue").Ref<boolean>;
59
59
  closeDropdown: () => void;
60
60
  changeDisplay: () => void;
61
- getTitle: import("vue").ComputedRef<"Change scope" | "Cambiar scope" | "Changer scope" | "Apply scope" | "Aplicar scope" | "Appliquer scope">;
61
+ getTitle: import("vue").ComputedRef<any>;
62
62
  selectScope: (scope: any) => void;
63
63
  selectedScope: import("vue").Ref<any>;
64
64
  newScope: () => void;
65
65
  saveScope: () => void;
66
+ langData: import("vue").Ref<any>;
66
67
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Scope" | "changeScope" | "onNewScope" | "onSave")[], "update:Scope" | "changeScope" | "onNewScope" | "onSave", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
67
68
  scopes: {
68
69
  type: {
@@ -3,21 +3,13 @@
3
3
  <arg-filter-tabs
4
4
  v-if="!onlyNew"
5
5
  v-model:Tab="activeTab"
6
- :tabs="
7
- lang === 'fr' ? frScopeTabs : lang === 'es' ? esScopeTabs : scopeTabs
8
- "
6
+ :tabs="scopeTabs"
9
7
  return-value
10
8
  />
11
9
  <div v-show="activeTab === 'new'" class="arg_scope_new">
12
10
  <div class="oip_row v-center gap-8">
13
11
  <h1>
14
- {{
15
- lang === "fr"
16
- ? "Critère scope"
17
- : lang === "es"
18
- ? "Scope criterio"
19
- : "Scope criteria"
20
- }}
12
+ {{ langData?.title }}
21
13
  </h1>
22
14
  <slot name="filtersAmount" />
23
15
  </div>
@@ -28,13 +20,7 @@
28
20
  <div v-show="!onlyNew && activeTab === 'saved'" class="arg_scope_save">
29
21
  <div class="oip_row v-center gap-8">
30
22
  <h1>
31
- {{
32
- lang === "fr"
33
- ? "Vos scopes enregistrés"
34
- : lang === "es"
35
- ? "Sus scopes guardados"
36
- : "Your saved scope"
37
- }}
23
+ {{ langData?.saved }}
38
24
  </h1>
39
25
  <slot name="scopeAmount" />
40
26
  </div>
@@ -46,8 +32,10 @@
46
32
  <script>
47
33
  import {
48
34
  ref,
35
+ computed,
49
36
  watch,
50
- defineComponent
37
+ defineComponent,
38
+ onBeforeMount
51
39
  } from "vue";
52
40
  import argFilterTabs from "./argFilterTabs.vue";
53
41
  export default defineComponent({
@@ -66,6 +54,25 @@ export default defineComponent({
66
54
  emits: ["update:Criteria", "onChangeCriteria"],
67
55
  setup(props, { emit }) {
68
56
  const activeTab = ref("new");
57
+ const langData = ref(null);
58
+ async function setLang() {
59
+ const jsonFiles = import.meta.glob("./locales/*.json");
60
+ for (const path in jsonFiles) {
61
+ if (path.split("/")[2].includes(props.lang)) {
62
+ const json = await jsonFiles[path]();
63
+ langData.value = json.scopeCriteria;
64
+ }
65
+ }
66
+ }
67
+ onBeforeMount(async () => {
68
+ setLang();
69
+ });
70
+ watch(
71
+ () => props.lang,
72
+ () => {
73
+ setLang();
74
+ }
75
+ );
69
76
  watch(
70
77
  () => activeTab.value,
71
78
  (new_active_tab) => {
@@ -73,19 +80,13 @@ export default defineComponent({
73
80
  emit("onChangeCriteria", new_active_tab);
74
81
  }
75
82
  );
76
- const scopeTabs = [
77
- { name: "New scope criteria", value: "new" },
78
- { name: "Apply an existing scope", value: "saved" }
79
- ];
80
- const frScopeTabs = [
81
- { name: "Nouveau crit\xE8re scope", value: "new" },
82
- { name: "Appliquer un scope existant", value: "saved" }
83
- ];
84
- const esScopeTabs = [
85
- { name: "Nuevo scope criterio", value: "new" },
86
- { name: "Aplicar un scope existente", value: "saved" }
87
- ];
88
- return { activeTab, scopeTabs, frScopeTabs, esScopeTabs };
83
+ const scopeTabs = computed(() => {
84
+ return [
85
+ { name: langData.value?.tabs.new, value: "new" },
86
+ { name: langData.value?.tabs.saved, value: "saved" }
87
+ ];
88
+ });
89
+ return { activeTab, scopeTabs, langData };
89
90
  }
90
91
  });
91
92
  </script>
@@ -10,18 +10,11 @@ declare const _default: import("vue").DefineComponent<{
10
10
  };
11
11
  }, {
12
12
  activeTab: import("vue").Ref<string>;
13
- scopeTabs: {
14
- name: string;
13
+ scopeTabs: import("vue").ComputedRef<{
14
+ name: any;
15
15
  value: string;
16
- }[];
17
- frScopeTabs: {
18
- name: string;
19
- value: string;
20
- }[];
21
- esScopeTabs: {
22
- name: string;
23
- value: string;
24
- }[];
16
+ }[]>;
17
+ langData: import("vue").Ref<any>;
25
18
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Criteria" | "onChangeCriteria")[], "update:Criteria" | "onChangeCriteria", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
19
  lang: {
27
20
  type: StringConstructor;