@tekkare/auriga 0.2.43 → 0.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/components/argChaptersNav.vue +24 -11
- package/dist/runtime/components/argChaptersNav.vue.d.ts +1 -0
- package/dist/runtime/components/argComplexSelect.vue +52 -51
- package/dist/runtime/components/argComplexSelect.vue.d.ts +11 -26
- package/dist/runtime/components/argDate.vue +46 -18
- package/dist/runtime/components/argDate.vue.d.ts +1 -1
- package/dist/runtime/components/argDropdownSelect.vue +25 -5
- package/dist/runtime/components/argDropdownSelect.vue.d.ts +4 -4
- package/dist/runtime/components/argFilterCard.vue +27 -34
- package/dist/runtime/components/argFilterCard.vue.d.ts +1 -0
- package/dist/runtime/components/argFooter.vue +29 -14
- package/dist/runtime/components/argFooter.vue.d.ts +3 -1
- package/dist/runtime/components/argHomeAllBlocks.vue +29 -15
- package/dist/runtime/components/argHomeAllBlocks.vue.d.ts +4 -3
- package/dist/runtime/components/argHomeHeader.vue +28 -3
- package/dist/runtime/components/argHomeHeader.vue.d.ts +3 -1
- package/dist/runtime/components/argHomeLayout.vue +1 -1
- package/dist/runtime/components/argHomeSelectedBlock.vue +29 -8
- package/dist/runtime/components/argHomeSelectedBlock.vue.d.ts +3 -1
- package/dist/runtime/components/argMainLayout.vue +1 -1
- package/dist/runtime/components/argMapsFrRegionsToDepartements.vue +31 -15
- package/dist/runtime/components/argMapsFrRegionsToDepartements.vue.d.ts +12 -2
- package/dist/runtime/components/argMultipleSelect.vue +29 -8
- package/dist/runtime/components/argMultipleSelect.vue.d.ts +5 -4
- package/dist/runtime/components/argNoSavedScope.vue +44 -38
- package/dist/runtime/components/argNoSavedScope.vue.d.ts +4 -15
- package/dist/runtime/components/argNoSelectedScope.vue +35 -31
- package/dist/runtime/components/argNoSelectedScope.vue.d.ts +2 -1
- package/dist/runtime/components/argScopeChange.vue +27 -20
- package/dist/runtime/components/argScopeChange.vue.d.ts +2 -1
- package/dist/runtime/components/argScopeCriteria.vue +33 -32
- package/dist/runtime/components/argScopeCriteria.vue.d.ts +4 -11
- package/dist/runtime/components/argScopeCriteriaIndicator.vue +31 -18
- package/dist/runtime/components/argScopeCriteriaIndicator.vue.d.ts +3 -1
- package/dist/runtime/components/argScopeHeader.vue +27 -12
- package/dist/runtime/components/argScopeHeader.vue.d.ts +1 -0
- package/dist/runtime/components/argScopeManage.vue +30 -36
- package/dist/runtime/components/argScopeManage.vue.d.ts +1 -0
- package/dist/runtime/components/argScopeModal.vue +33 -64
- package/dist/runtime/components/argScopeModal.vue.d.ts +1 -0
- package/dist/runtime/components/argSearchInput.vue +37 -15
- package/dist/runtime/components/argSearchInput.vue.d.ts +2 -10
- package/dist/runtime/components/argSidebar.vue +28 -16
- package/dist/runtime/components/argSidebar.vue.d.ts +1 -0
- package/dist/runtime/components/argSourceCollapse.vue +26 -6
- package/dist/runtime/components/argSourceCollapse.vue.d.ts +1 -0
- package/dist/runtime/components/argTable.vue +42 -14
- package/dist/runtime/components/argTable.vue.d.ts +5 -5
- package/dist/runtime/components/argTipsBox.vue +27 -17
- package/dist/runtime/components/argTipsBox.vue.d.ts +3 -2
- package/dist/runtime/components/argToolbarSources.vue +29 -22
- package/dist/runtime/components/argToolbarSources.vue.d.ts +3 -1
- package/dist/runtime/components/locales/en.json +180 -1
- package/dist/runtime/components/locales/es.json +179 -1
- package/dist/runtime/components/locales/fr.json +179 -1
- package/dist/runtime/components/locales/jp.json +179 -2
- package/package.json +1 -1
- package/dist/runtime/components/textHighlight.vue +0 -251
- package/dist/runtime/components/textHighlight.vue.d.ts +0 -96
package/dist/module.json
CHANGED
|
@@ -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({
|
|
@@ -50,7 +44,7 @@ export default defineComponent({
|
|
|
50
44
|
type: String,
|
|
51
45
|
default: "en",
|
|
52
46
|
validator: (value) => {
|
|
53
|
-
return ["en", "fr", "es"].includes(value);
|
|
47
|
+
return ["en", "fr", "es", "jp"].includes(value);
|
|
54
48
|
}
|
|
55
49
|
},
|
|
56
50
|
chaptersTitle: {
|
|
@@ -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
|
|
70
|
+
{{ getCustomText }}
|
|
77
71
|
</p>
|
|
78
|
-
<p v-else class="oip_subtitle">{{ getAddText
|
|
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
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
|
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
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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<
|
|
167
|
-
getLoaderText: import("vue").ComputedRef<
|
|
168
|
-
getPlaceholderAdd: import("vue").ComputedRef<
|
|
169
|
-
getPlaceholderDel: import("vue").ComputedRef<
|
|
170
|
-
getMaxSelectMsg: import("vue").ComputedRef<
|
|
171
|
-
getEmptyContentMsg: import("vue").ComputedRef<
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
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.
|
|
53
|
+
return props.compact ? langData.value?.compact.jan : langData.value?.full.jan;
|
|
32
54
|
}
|
|
33
55
|
if (month === 1) {
|
|
34
|
-
return props.
|
|
56
|
+
return props.compact ? langData.value?.compact.feb : langData.value?.full.feb;
|
|
35
57
|
}
|
|
36
58
|
if (month === 2) {
|
|
37
|
-
return props.
|
|
59
|
+
return props.compact ? langData.value?.compact.mar : langData.value?.full.mar;
|
|
38
60
|
}
|
|
39
61
|
if (month === 3) {
|
|
40
|
-
return props.
|
|
62
|
+
return props.compact ? langData.value?.compact.apr : langData.value?.full.apr;
|
|
41
63
|
}
|
|
42
64
|
if (month === 4) {
|
|
43
|
-
return props.
|
|
65
|
+
return props.compact ? langData.value?.compact.may : langData.value?.full.may;
|
|
44
66
|
}
|
|
45
67
|
if (month === 5) {
|
|
46
|
-
return props.
|
|
68
|
+
return props.compact ? langData.value?.compact.jun : langData.value?.full.jun;
|
|
47
69
|
}
|
|
48
70
|
if (month === 6) {
|
|
49
|
-
return props.
|
|
71
|
+
return props.compact ? langData.value?.compact.jul : langData.value?.full.jul;
|
|
50
72
|
}
|
|
51
73
|
if (month === 7) {
|
|
52
|
-
return props.
|
|
74
|
+
return props.compact ? langData.value?.compact.aug : langData.value?.full.aug;
|
|
53
75
|
}
|
|
54
76
|
if (month === 8) {
|
|
55
|
-
return props.
|
|
77
|
+
return props.compact ? langData.value?.compact.sep : langData.value?.full.sep;
|
|
56
78
|
}
|
|
57
79
|
if (month === 9) {
|
|
58
|
-
return props.
|
|
80
|
+
return props.compact ? langData.value?.compact.oct : langData.value?.full.oct;
|
|
59
81
|
}
|
|
60
82
|
if (month === 10) {
|
|
61
|
-
return props.
|
|
83
|
+
return props.compact ? langData.value?.compact.nov : langData.value?.full.nov;
|
|
62
84
|
}
|
|
63
85
|
if (month === 11) {
|
|
64
|
-
return props.
|
|
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
|
-
|
|
70
|
-
date.
|
|
71
|
-
|
|
72
|
-
|
|
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) =>
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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<
|
|
125
|
-
getLoaderText: import("vue").ComputedRef<
|
|
126
|
-
getPlaceholder: import("vue").ComputedRef<
|
|
127
|
-
getEmptyContentMsg: import("vue").ComputedRef<
|
|
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: {
|