@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
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.2.43"
7
+ "version": "0.2.44"
8
8
  }
@@ -2,15 +2,7 @@
2
2
  <div id="chapter_menu" class="arg_chapters_menu">
3
3
  <div class="arg_menu_wrapper" :style="`top: ${headerHeight}px`">
4
4
  <p class="arg_menu_title">
5
- {{
6
- chaptersTitle !== null
7
- ? chaptersTitle
8
- : lang === "en"
9
- ? "Chapters"
10
- : lang === "fr"
11
- ? "Chapitres"
12
- : "Capítulos"
13
- }}
5
+ {{ chaptersTitle !== null ? chaptersTitle : langData }}
14
6
  </p>
15
7
  <ul class="arg_nav_list">
16
8
  <li v-for="(chapter, index) in chaptersList" :key="index">
@@ -36,7 +28,9 @@ import {
36
28
  onMounted,
37
29
  ref,
38
30
  computed,
31
+ watch,
39
32
  defineComponent,
33
+ onBeforeMount,
40
34
  onUnmounted
41
35
  } from "vue";
42
36
  export default defineComponent({
@@ -66,6 +60,25 @@ export default defineComponent({
66
60
  setup(props, { emit }) {
67
61
  const activeChapter = ref(null);
68
62
  const headerHeight = ref(0);
63
+ const langData = ref(null);
64
+ async function setLang() {
65
+ const jsonFiles = import.meta.glob("./locales/*.json");
66
+ for (const path in jsonFiles) {
67
+ if (path.split("/")[2].includes(props.lang)) {
68
+ const json = await jsonFiles[path]();
69
+ langData.value = json.chapters;
70
+ }
71
+ }
72
+ }
73
+ onBeforeMount(async () => {
74
+ setLang();
75
+ });
76
+ watch(
77
+ () => props.lang,
78
+ () => {
79
+ setLang();
80
+ }
81
+ );
69
82
  const getChaptersInPage = computed(() => {
70
83
  const HTMLChapters = ref([]);
71
84
  props.chaptersList.forEach((elem) => {
@@ -135,7 +148,7 @@ export default defineComponent({
135
148
  }
136
149
  }
137
150
  }
138
- return { selectChapter, activeChapter, headerHeight };
151
+ return { selectChapter, activeChapter, headerHeight, langData };
139
152
  }
140
153
  });
141
154
  </script>
@@ -20,6 +20,7 @@ declare const _default: import("vue").DefineComponent<{
20
20
  selectChapter: (index: number, anchorId: string) => void;
21
21
  activeChapter: import("vue").Ref<any>;
22
22
  headerHeight: import("vue").Ref<number>;
23
+ langData: import("vue").Ref<any>;
23
24
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onClose"[], "onClose", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
25
  chaptersList: {
25
26
  type: ArrayConstructor;
@@ -46,13 +46,7 @@
46
46
  class="oip_select_complex_smart"
47
47
  >
48
48
  <h2 class="oip_select_complex_smart_title">
49
- {{
50
- lang === "fr"
51
- ? "Sélection rapide"
52
- : lang === "es"
53
- ? "Selección rápida"
54
- : "Quick selection"
55
- }}
49
+ {{ langData?.quick }}
56
50
  </h2>
57
51
  <div class="oip_select_complex_smart_selection">
58
52
  <arg-pills
@@ -73,15 +67,15 @@
73
67
  <div class="oip_select_complex_add_all">
74
68
  <div class="oip_row v-center gap-8">
75
69
  <p v-if="smart_selection_table !== null" class="oip_subtitle">
76
- {{ getCustomText[lang] }}
70
+ {{ getCustomText }}
77
71
  </p>
78
- <p v-else class="oip_subtitle">{{ getAddText[lang] }}</p>
72
+ <p v-else class="oip_subtitle">{{ getAddText }}</p>
79
73
  <p
80
74
  v-if="max_amount === null"
81
75
  class="add_all_action"
82
76
  @click="add_all_element()"
83
77
  >
84
- {{ getAddAllText[lang] }}
78
+ {{ getAddAllText }}
85
79
  </p>
86
80
  <p class="oip_body" v-else>(Maximum: {{ max_amount }})</p>
87
81
  </div>
@@ -151,15 +145,11 @@
151
145
  <div class="oip_select_complex_del_selection">
152
146
  <div class="oip_row v-center space-between full_stretch">
153
147
  <p class="oip_subtitle">
154
- {{
155
- lang === "fr"
156
- ? "Sélection en cours"
157
- : lang === "es"
158
- ? "Selección en curso"
159
- : "Current selection"
160
- }}
148
+ {{ langData?.current }}
149
+ </p>
150
+ <p class="del_all_action" @click="del_all_element()">
151
+ {{ langData?.clear }}
161
152
  </p>
162
- <p class="del_all_action" @click="del_all_element()">Clear</p>
163
153
  </div>
164
154
  <div class="complex_search">
165
155
  <arg-icon name="MagnifyingGlass" color="var(--medium)" size="14" />
@@ -178,7 +168,7 @@
178
168
  </div>
179
169
  <div class="oip_select_complex_options">
180
170
  <p class="oip_body" v-if="del_table.length === 0">
181
- {{ noSelectionMsg[lang] }}
171
+ {{ noSelectionMsg }}
182
172
  </p>
183
173
  <p class="oip_body" v-else-if="filterNameDel.length === 0">
184
174
  {{ getEmptyContentMsg }}
@@ -204,7 +194,7 @@
204
194
  </div>
205
195
  </div>
206
196
  </div>
207
- <div
197
+ <!-- <div
208
198
  v-if="need_apply"
209
199
  class="oip_row v-center gap-8"
210
200
  style="margin-top: auto; align-self: flex-end"
@@ -215,7 +205,7 @@
215
205
  <arg-btn @click="apply_function()" btnStyle="primary-fill">{{
216
206
  lang === "fr" ? "Apply" : lang === "es" ? "Aplicar" : "Appliquer"
217
207
  }}</arg-btn>
218
- </div>
208
+ </div> -->
219
209
  </div>
220
210
  </div>
221
211
  </div>
@@ -223,12 +213,12 @@
223
213
  <script>
224
214
  import { useFuse } from "@vueuse/integrations/useFuse";
225
215
  import argSimpleLabel from "./argSimpleLabel.vue";
226
- import argBtn from "./argBtn.vue";
227
216
  import argIcon from "./argIcon.vue";
228
217
  import argPills from "./argPills.vue";
229
218
  import argDataLoader from "./argDataLoader.vue";
230
219
  import {
231
220
  onMounted,
221
+ onBeforeMount,
232
222
  ref,
233
223
  computed,
234
224
  watch,
@@ -239,7 +229,6 @@ export default defineComponent({
239
229
  name: "argComplexSelect",
240
230
  components: {
241
231
  argSimpleLabel,
242
- argBtn,
243
232
  argIcon,
244
233
  argDataLoader,
245
234
  argPills
@@ -276,7 +265,7 @@ export default defineComponent({
276
265
  type: String,
277
266
  default: "en",
278
267
  validator: (value) => {
279
- return ["en", "fr", "es"].includes(value);
268
+ return ["en", "fr", "es", "jp"].includes(value);
280
269
  }
281
270
  },
282
271
  loader_text: { type: Array, default: null },
@@ -305,26 +294,37 @@ export default defineComponent({
305
294
  const hoverRemove = ref(null);
306
295
  const reachMax = ref(false);
307
296
  const getLeft = ref("0");
308
- const getCustomText = {
309
- en: "Or custom selection",
310
- fr: "Ou s\xE9lection sur mesure",
311
- es: "O selecci\xF3n personalizada"
312
- };
313
- const getAddText = {
314
- en: "Custom selection",
315
- fr: "S\xE9lection sur mesure",
316
- es: "Selecci\xF3n personalizada"
317
- };
318
- const getAddAllText = {
319
- en: "Select all",
320
- fr: "Tout s\xE9lectionner",
321
- es: "Seleccionar todo"
322
- };
323
- const noSelectionMsg = {
324
- en: "No selection yet",
325
- fr: "Aucune s\xE9lection",
326
- es: "Ninguna selecci\xF3n"
327
- };
297
+ const langData = ref(null);
298
+ async function setLang() {
299
+ const jsonFiles = import.meta.glob("./locales/*.json");
300
+ for (const path in jsonFiles) {
301
+ if (path.split("/")[2].includes(props.lang)) {
302
+ const json = await jsonFiles[path]();
303
+ langData.value = json.complex;
304
+ }
305
+ }
306
+ }
307
+ onBeforeMount(async () => {
308
+ setLang();
309
+ });
310
+ watch(
311
+ () => props.lang,
312
+ () => {
313
+ setLang();
314
+ }
315
+ );
316
+ const getCustomText = computed(() => {
317
+ return langData.value?.orCustom;
318
+ });
319
+ const getAddText = computed(() => {
320
+ return langData.value?.custom;
321
+ });
322
+ const getAddAllText = computed(() => {
323
+ return langData.value?.all;
324
+ });
325
+ const noSelectionMsg = computed(() => {
326
+ return langData.value?.noSelection;
327
+ });
328
328
  function openInfo() {
329
329
  emit("openInfo");
330
330
  }
@@ -390,37 +390,37 @@ export default defineComponent({
390
390
  );
391
391
  const getEmptyMsg = computed(() => {
392
392
  if (props.empty_msg === null) {
393
- return props.lang === "fr" ? "Aucune S\xE9lection" : props.lang === "es" ? "Ninguna selecci\xF3n" : "No Selection";
393
+ return langData.value?.empty;
394
394
  } else
395
395
  return props.empty_msg;
396
396
  });
397
397
  const getLoaderText = computed(() => {
398
398
  if (props.loader_text === null) {
399
- return props.lang === "fr" ? ["Chargement...", "Veuillez patienter"] : props.lang === "es" ? ["Cargando...", "Espere, por favor"] : ["Loading...", "Please wait"];
399
+ return [langData.value?.loading, langData.value?.wait];
400
400
  } else
401
401
  return props.loader_text;
402
402
  });
403
403
  const getPlaceholderAdd = computed(() => {
404
404
  if (props.search_placeholder_add === null) {
405
- return props.lang === "fr" ? "Rechercher une option..." : props.lang === "es" ? "Buscar una opci\xF3n..." : "Search options...";
405
+ return langData.value?.search;
406
406
  } else
407
407
  return props.search_placeholder_add;
408
408
  });
409
409
  const getPlaceholderDel = computed(() => {
410
410
  if (props.search_placeholder_del === null) {
411
- return props.lang === "fr" ? "Rechercher parmi les options selection\xE9es..." : props.lang === "es" ? "Buscar opciones seleccionadas..." : "Search selected options...";
411
+ return langData.value?.searchSelect;
412
412
  } else
413
413
  return props.search_placeholder_del;
414
414
  });
415
415
  const getMaxSelectMsg = computed(() => {
416
416
  if (props.reach_max_msg === null) {
417
- return props.lang === "fr" ? "Maximum de s\xE9lection atteint" : props.lang === "es" ? "Selecci\xF3n m\xE1xima alcanzada" : "Maximum selection reached";
417
+ return langData.value?.max;
418
418
  } else
419
419
  return props.reach_max_msg;
420
420
  });
421
421
  const getEmptyContentMsg = computed(() => {
422
422
  if (props.empty_content_msg === null) {
423
- return props.lang === "fr" ? "Aucun contenu n'a \xE9t\xE9 trouv\xE9" : props.lang === "es" ? "Ning\xFAn contenido encontrado" : "No content was found";
423
+ return langData.value?.notFound;
424
424
  } else
425
425
  return props.empty_content_msg;
426
426
  });
@@ -660,7 +660,8 @@ export default defineComponent({
660
660
  getAddAllText,
661
661
  noSelectionMsg,
662
662
  getAddText,
663
- openInfo
663
+ openInfo,
664
+ langData
664
665
  };
665
666
  }
666
667
  });
@@ -163,34 +163,19 @@ declare const _default: import("vue").DefineComponent<{
163
163
  change_save_table: () => void;
164
164
  getAllSelect: import("vue").ComputedRef<string>;
165
165
  reachMax: import("vue").Ref<boolean>;
166
- getEmptyMsg: import("vue").ComputedRef<string>;
167
- getLoaderText: import("vue").ComputedRef<string[]>;
168
- getPlaceholderAdd: import("vue").ComputedRef<string>;
169
- getPlaceholderDel: import("vue").ComputedRef<string>;
170
- getMaxSelectMsg: import("vue").ComputedRef<string>;
171
- getEmptyContentMsg: import("vue").ComputedRef<string>;
166
+ getEmptyMsg: import("vue").ComputedRef<any>;
167
+ getLoaderText: import("vue").ComputedRef<any[]>;
168
+ getPlaceholderAdd: import("vue").ComputedRef<any>;
169
+ getPlaceholderDel: import("vue").ComputedRef<any>;
170
+ getMaxSelectMsg: import("vue").ComputedRef<any>;
171
+ getEmptyContentMsg: import("vue").ComputedRef<any>;
172
172
  getLeft: import("vue").Ref<string>;
173
- getCustomText: {
174
- en: string;
175
- fr: string;
176
- es: string;
177
- };
178
- getAddAllText: {
179
- en: string;
180
- fr: string;
181
- es: string;
182
- };
183
- noSelectionMsg: {
184
- en: string;
185
- fr: string;
186
- es: string;
187
- };
188
- getAddText: {
189
- en: string;
190
- fr: string;
191
- es: string;
192
- };
173
+ getCustomText: import("vue").ComputedRef<any>;
174
+ getAddAllText: import("vue").ComputedRef<any>;
175
+ noSelectionMsg: import("vue").ComputedRef<any>;
176
+ getAddText: import("vue").ComputedRef<any>;
193
177
  openInfo: () => void;
178
+ langData: import("vue").Ref<any>;
194
179
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeElement" | "changeAddInputValue" | "update:Selection" | "openInfo")[], "changeElement" | "changeAddInputValue" | "update:Selection" | "openInfo", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
195
180
  element_table: {
196
181
  type: {
@@ -4,7 +4,10 @@
4
4
 
5
5
  <script>
6
6
  import {
7
- defineComponent
7
+ ref,
8
+ defineComponent,
9
+ onBeforeMount,
10
+ watch
8
11
  } from "vue";
9
12
  export default defineComponent({
10
13
  name: "argDate",
@@ -17,7 +20,7 @@ export default defineComponent({
17
20
  type: String,
18
21
  default: "en",
19
22
  validator: (value) => {
20
- return ["en", "fr"].includes(value);
23
+ return ["en", "fr", "es", "jp"].includes(value);
21
24
  }
22
25
  },
23
26
  compact: {
@@ -26,50 +29,75 @@ export default defineComponent({
26
29
  }
27
30
  },
28
31
  setup(props) {
32
+ const langData = ref(null);
33
+ async function setLang() {
34
+ const jsonFiles = import.meta.glob("./locales/*.json");
35
+ for (const path in jsonFiles) {
36
+ if (path.split("/")[2].includes(props.lang)) {
37
+ const json = await jsonFiles[path]();
38
+ langData.value = json.date;
39
+ }
40
+ }
41
+ }
42
+ onBeforeMount(async () => {
43
+ setLang();
44
+ });
45
+ watch(
46
+ () => props.lang,
47
+ () => {
48
+ setLang();
49
+ }
50
+ );
29
51
  function monthToString(month) {
30
52
  if (month === 0) {
31
- return props.lang === "fr" ? props.compact ? "Jan." : "Janvier" : props.lang === "es" ? props.compact ? "Ene." : "Enero" : props.compact ? "Jan" : "January";
53
+ return props.compact ? langData.value?.compact.jan : langData.value?.full.jan;
32
54
  }
33
55
  if (month === 1) {
34
- return props.lang === "fr" ? props.compact ? "F\xE9v." : "F\xE9vrier" : props.lang === "es" ? props.compact ? "Feb." : "Febrero" : props.compact ? "Feb." : "February";
56
+ return props.compact ? langData.value?.compact.feb : langData.value?.full.feb;
35
57
  }
36
58
  if (month === 2) {
37
- return props.lang === "fr" ? props.compact ? "Mar." : "Mars" : props.lang === "es" ? props.compact ? "Mar." : "Marzo" : props.compact ? "Mar." : "March";
59
+ return props.compact ? langData.value?.compact.mar : langData.value?.full.mar;
38
60
  }
39
61
  if (month === 3) {
40
- return props.lang === "fr" ? props.compact ? "Avr." : "Avril" : props.lang === "es" ? props.compact ? "Abr." : "Abril" : props.compact ? "Apr." : "April";
62
+ return props.compact ? langData.value?.compact.apr : langData.value?.full.apr;
41
63
  }
42
64
  if (month === 4) {
43
- return props.lang === "fr" ? "Mai" : props.lang === "es" ? props.compact ? "May." : "Mayo" : "May";
65
+ return props.compact ? langData.value?.compact.may : langData.value?.full.may;
44
66
  }
45
67
  if (month === 5) {
46
- return props.lang === "fr" ? "Juin" : props.compact ? "Jun." : props.lang === "es" ? props.compact ? "Jun." : "Junio" : "June";
68
+ return props.compact ? langData.value?.compact.jun : langData.value?.full.jun;
47
69
  }
48
70
  if (month === 6) {
49
- return props.lang === "fr" ? props.compact ? "Juil." : "Juillet" : props.lang === "es" ? props.compact ? "Jul." : "Julio" : props.compact ? "Jul." : "July";
71
+ return props.compact ? langData.value?.compact.jul : langData.value?.full.jul;
50
72
  }
51
73
  if (month === 7) {
52
- return props.lang === "fr" ? props.compact ? "Ao\xFB." : "Ao\xFBt" : props.lang === "es" ? props.compact ? "Ago." : "Agosto" : props.compact ? "Aug." : "August";
74
+ return props.compact ? langData.value?.compact.aug : langData.value?.full.aug;
53
75
  }
54
76
  if (month === 8) {
55
- return props.lang === "fr" ? props.compact ? "Sep." : "Septembre" : props.lang === "es" ? props.compact ? "Sep." : "Septiembre" : props.compact ? "Sep." : "September";
77
+ return props.compact ? langData.value?.compact.sep : langData.value?.full.sep;
56
78
  }
57
79
  if (month === 9) {
58
- return props.lang === "fr" ? props.compact ? "Oct." : "Octobre" : props.lang === "es" ? props.compact ? "Oct." : "Octubre" : props.compact ? "Oct." : "October";
80
+ return props.compact ? langData.value?.compact.oct : langData.value?.full.oct;
59
81
  }
60
82
  if (month === 10) {
61
- return props.lang === "fr" ? props.compact ? "Nov." : "Novembre" : props.lang === "es" ? props.compact ? "Nov." : "Noviembre" : props.compact ? "Nov." : "November";
83
+ return props.compact ? langData.value?.compact.nov : langData.value?.full.nov;
62
84
  }
63
85
  if (month === 11) {
64
- return props.lang === "fr" ? props.compact ? "D\xE9c." : "D\xE9cembre" : props.lang === "es" ? props.compact ? "Dic." : "Diciembre" : props.compact ? "Dec." : "December";
86
+ return props.compact ? langData.value?.compact.dec : langData.value?.full.dec;
65
87
  }
66
88
  }
67
89
  function formatDate(str) {
68
90
  const date = new Date(str);
69
- const fullDate = `${date.getDate()} ${monthToString(
70
- date.getMonth()
71
- )}, ${date.getFullYear()}`;
72
- return fullDate;
91
+ if (props.lang === "jp") {
92
+ return `${date.getFullYear()}\u5E74${monthToString(
93
+ date.getMonth()
94
+ )}${date.getDate()}\u65E5`;
95
+ } else {
96
+ const fullDate = `${date.getDate()} ${monthToString(
97
+ date.getMonth()
98
+ )}, ${date.getFullYear()}`;
99
+ return fullDate;
100
+ }
73
101
  }
74
102
  return {
75
103
  formatDate,
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  };
15
15
  }, {
16
16
  formatDate: (str: string | number) => string;
17
- monthToString: (month: number) => "Jan." | "Janvier" | "Ene." | "Enero" | "Jan" | "January" | "Fév." | "Février" | "Feb." | "Febrero" | "February" | "Mar." | "Mars" | "Marzo" | "March" | "Avr." | "Avril" | "Abr." | "Abril" | "Apr." | "April" | "Mai" | "May." | "Mayo" | "May" | "Juin" | "Jun." | "Junio" | "June" | "Juil." | "Juillet" | "Jul." | "Julio" | "July" | "Aoû." | "Août" | "Ago." | "Agosto" | "Aug." | "August" | "Sep." | "Septembre" | "Septiembre" | "September" | "Oct." | "Octobre" | "Octubre" | "October" | "Nov." | "Novembre" | "Noviembre" | "November" | "Déc." | "Décembre" | "Dic." | "Diciembre" | "Dec." | "December" | undefined;
17
+ monthToString: (month: number) => any;
18
18
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
19
  rawDate: {
20
20
  type: (StringConstructor | NumberConstructor)[];
@@ -137,6 +137,7 @@ import {
137
137
  computed,
138
138
  watch,
139
139
  defineComponent,
140
+ onBeforeMount,
140
141
  onUnmounted,
141
142
  onUpdated
142
143
  } from "vue";
@@ -164,7 +165,7 @@ export default defineComponent({
164
165
  type: String,
165
166
  default: "en",
166
167
  validator: (value) => {
167
- return ["en", "fr", "es"].includes(value);
168
+ return ["en", "fr", "es", "jp"].includes(value);
168
169
  }
169
170
  },
170
171
  loader_text: { type: Array, default: null },
@@ -185,6 +186,25 @@ export default defineComponent({
185
186
  const selected_item = ref(null);
186
187
  const selected_number = ref(null);
187
188
  const getSepPositions = ref([]);
189
+ const langData = ref(null);
190
+ async function setLang() {
191
+ const jsonFiles = import.meta.glob("./locales/*.json");
192
+ for (const path in jsonFiles) {
193
+ if (path.split("/")[2].includes(props.lang)) {
194
+ const json = await jsonFiles[path]();
195
+ langData.value = json.dropdown;
196
+ }
197
+ }
198
+ }
199
+ onBeforeMount(async () => {
200
+ setLang();
201
+ });
202
+ watch(
203
+ () => props.lang,
204
+ () => {
205
+ setLang();
206
+ }
207
+ );
188
208
  onMounted(() => {
189
209
  table_values.value = props.element_table;
190
210
  selected_item.value = props.default_select !== null ? props.element_table[props.default_select] : null;
@@ -251,25 +271,25 @@ export default defineComponent({
251
271
  );
252
272
  const getEmptyMsg = computed(() => {
253
273
  if (props.empty_msg === null) {
254
- return props.lang === "fr" ? "Aucune S\xE9lection" : props.lang === "es" ? "Ninguna selecci\xF3n" : "No Selection";
274
+ return langData.value?.empty;
255
275
  } else
256
276
  return props.empty_msg;
257
277
  });
258
278
  const getLoaderText = computed(() => {
259
279
  if (props.loader_text === null) {
260
- return props.lang === "fr" ? ["Chargement...", "Veuillez patienter"] : props.lang === "es" ? ["Cargando...", "Espera, por favor"] : ["Loading...", "Please wait"];
280
+ return [langData.value?.loading, langData.value?.wait];
261
281
  } else
262
282
  return props.loader_text;
263
283
  });
264
284
  const getPlaceholder = computed(() => {
265
285
  if (props.filter_placeholder === null) {
266
- return props.lang === "fr" ? "Rechercher une option..." : props.lang === "es" ? "Buscar opciones" : "Search options...";
286
+ return langData.value?.search;
267
287
  } else
268
288
  return props.filter_placeholder;
269
289
  });
270
290
  const getEmptyContentMsg = computed(() => {
271
291
  if (props.empty_content_msg === null) {
272
- return props.lang === "fr" ? "Aucun contenu n'a \xE9t\xE9 trouv\xE9" : props.lang === "es" ? "Ning\xFAn contenido encontrado" : "No content was found";
292
+ return langData.value?.notFound;
273
293
  } else
274
294
  return props.empty_content_msg;
275
295
  });
@@ -121,10 +121,10 @@ declare const _default: import("vue").DefineComponent<{
121
121
  filterName: import("vue").ComputedRef<string[]>;
122
122
  changeDisplay: () => void;
123
123
  changeInput: () => void;
124
- getEmptyMsg: import("vue").ComputedRef<string>;
125
- getLoaderText: import("vue").ComputedRef<string[]>;
126
- getPlaceholder: import("vue").ComputedRef<string>;
127
- getEmptyContentMsg: import("vue").ComputedRef<string>;
124
+ getEmptyMsg: import("vue").ComputedRef<any>;
125
+ getLoaderText: import("vue").ComputedRef<any[]>;
126
+ getPlaceholder: import("vue").ComputedRef<any>;
127
+ getEmptyContentMsg: import("vue").ComputedRef<any>;
128
128
  getSepPositions: import("vue").Ref<any>;
129
129
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeElement" | "update:Selection" | "changeInputValue")[], "changeElement" | "update:Selection" | "changeInputValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
130
130
  element_table: {