vueless 0.0.102 → 0.0.103
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/package.json +1 -1
- package/ui.container-modal-confirm/index.vue +2 -1
- package/ui.data-list/index.vue +2 -1
- package/ui.data-table/index.vue +2 -1
- package/ui.dropdown-list/index.vue +2 -1
- package/ui.form-calendar/index.vue +10 -7
- package/ui.form-date-picker/index.vue +5 -4
- package/ui.form-date-picker-range/index.vue +11 -7
- package/ui.form-input-file/index.vue +2 -1
- package/ui.form-select/index.vue +2 -1
- package/ui.form-switch/index.vue +2 -1
- package/ui.notify/index.vue +2 -1
- package/web-types.json +1 -1
package/package.json
CHANGED
|
@@ -169,7 +169,8 @@ const isShownModal = computed({
|
|
|
169
169
|
set: (value) => emit("update:modelValue", value),
|
|
170
170
|
});
|
|
171
171
|
|
|
172
|
-
const
|
|
172
|
+
const i18nGlobal = tm(UModalConfirm);
|
|
173
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
173
174
|
|
|
174
175
|
function closeModal() {
|
|
175
176
|
isShownModal.value = false;
|
package/ui.data-list/index.vue
CHANGED
|
@@ -218,7 +218,8 @@ const {
|
|
|
218
218
|
} = useAttrs(props);
|
|
219
219
|
const { tm } = useLocale();
|
|
220
220
|
|
|
221
|
-
const
|
|
221
|
+
const i18nGlobal = tm(UDataListName);
|
|
222
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
222
223
|
|
|
223
224
|
function onDragMove(event) {
|
|
224
225
|
const isDisabledNestingItem = event.draggedContext.element.isDisabledNesting;
|
package/ui.data-table/index.vue
CHANGED
|
@@ -427,7 +427,8 @@ const isFooterSticky = computed(
|
|
|
427
427
|
isCheckedMoreOneTableItems.value,
|
|
428
428
|
);
|
|
429
429
|
|
|
430
|
-
const
|
|
430
|
+
const i18nGlobal = tm(UTable);
|
|
431
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
431
432
|
|
|
432
433
|
const normalizedColumns = computed(() => TableService.normalizeColumns(props.columns));
|
|
433
434
|
|
|
@@ -242,7 +242,8 @@ const { tm } = useLocale();
|
|
|
242
242
|
|
|
243
243
|
defineExpose({ pointerSet, pointerBackward, pointerForward, pointerReset, addPointerElement });
|
|
244
244
|
|
|
245
|
-
const
|
|
245
|
+
const i18nGlobal = tm(UDropdownList);
|
|
246
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
246
247
|
|
|
247
248
|
const addOptionKeyCombination = computed(() => {
|
|
248
249
|
return isMac ? "(⌘ + Enter)" : "(Ctrl + Enter)";
|
|
@@ -348,7 +348,8 @@ const isCurrentView = computed(() => ({
|
|
|
348
348
|
year: currentView.value === VIEW.year,
|
|
349
349
|
}));
|
|
350
350
|
|
|
351
|
-
const
|
|
351
|
+
const i18nGlobal = tm(UCalendar);
|
|
352
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
352
353
|
|
|
353
354
|
const locale = computed(() => {
|
|
354
355
|
const { months, weekdays } = currentLocale.value;
|
|
@@ -370,13 +371,15 @@ const locale = computed(() => {
|
|
|
370
371
|
const userFormatLocale = computed(() => {
|
|
371
372
|
const { months, weekdays } = currentLocale.value;
|
|
372
373
|
|
|
373
|
-
const monthsLonghand =
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
const monthsLonghand =
|
|
375
|
+
Boolean(props.config.i18n?.months?.userFormat) || Boolean(i18nGlobal?.months?.userFormat)
|
|
376
|
+
? months.userFormat
|
|
377
|
+
: months.longhand;
|
|
376
378
|
|
|
377
|
-
const weekdaysLonghand =
|
|
378
|
-
|
|
379
|
-
|
|
379
|
+
const weekdaysLonghand =
|
|
380
|
+
Boolean(props.config.i18n?.weekdays?.userFormat) || Boolean(i18nGlobal?.weekdays?.userFormat)
|
|
381
|
+
? weekdays.userFormat
|
|
382
|
+
: weekdays.longhand;
|
|
380
383
|
|
|
381
384
|
// formatted locale
|
|
382
385
|
return {
|
|
@@ -259,7 +259,8 @@ function onBlur(event) {
|
|
|
259
259
|
function formatUserDate(data) {
|
|
260
260
|
if (props.dateFormat !== STANDARD_USER_FORMAT) return data;
|
|
261
261
|
|
|
262
|
-
const
|
|
262
|
+
const i18nGlobal = tm(UDatePicker);
|
|
263
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
263
264
|
|
|
264
265
|
let prefix = "";
|
|
265
266
|
const formattedDate = data.charAt(0).toUpperCase() + data.toLowerCase().slice(1);
|
|
@@ -273,15 +274,15 @@ function formatUserDate(data) {
|
|
|
273
274
|
const isTomorrow = isSameDay(addDays(today, 1), selectedDate);
|
|
274
275
|
|
|
275
276
|
if (isToday) {
|
|
276
|
-
prefix = currentLocale.today;
|
|
277
|
+
prefix = currentLocale.value.today;
|
|
277
278
|
}
|
|
278
279
|
|
|
279
280
|
if (isYesterday) {
|
|
280
|
-
prefix = currentLocale.yesterday;
|
|
281
|
+
prefix = currentLocale.value.yesterday;
|
|
281
282
|
}
|
|
282
283
|
|
|
283
284
|
if (isTomorrow) {
|
|
284
|
-
prefix = currentLocale.tomorrow;
|
|
285
|
+
prefix = currentLocale.value.tomorrow;
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
return prefix ? `${prefix}, ${formattedDateWithoutDay}` : formattedDate;
|
|
@@ -432,8 +432,10 @@ const localValue = computed({
|
|
|
432
432
|
});
|
|
433
433
|
|
|
434
434
|
const { isMobileBreakpoint } = useBreakpoint();
|
|
435
|
+
const i18nGlobal = tm(UDatePickerRange);
|
|
436
|
+
|
|
435
437
|
const rangeInputName = computed(() => `rangeInput-${props.id}`);
|
|
436
|
-
const currentLocale = computed(() => merge(
|
|
438
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
437
439
|
|
|
438
440
|
const locale = computed(() => {
|
|
439
441
|
const { months, weekdays } = currentLocale.value;
|
|
@@ -455,13 +457,15 @@ const locale = computed(() => {
|
|
|
455
457
|
const userFormatLocale = computed(() => {
|
|
456
458
|
const { months, weekdays } = currentLocale.value;
|
|
457
459
|
|
|
458
|
-
const monthsLonghand =
|
|
459
|
-
|
|
460
|
-
|
|
460
|
+
const monthsLonghand =
|
|
461
|
+
Boolean(props.config.i18n?.months?.userFormat) || Boolean(i18nGlobal?.months?.userFormat)
|
|
462
|
+
? months.userFormat
|
|
463
|
+
: months.longhand;
|
|
461
464
|
|
|
462
|
-
const weekdaysLonghand =
|
|
463
|
-
|
|
464
|
-
|
|
465
|
+
const weekdaysLonghand =
|
|
466
|
+
Boolean(props.config.i18n?.weekdays?.userFormat) || Boolean(i18nGlobal?.weekdays?.userFormat)
|
|
467
|
+
? weekdays.userFormat
|
|
468
|
+
: weekdays.longhand;
|
|
465
469
|
|
|
466
470
|
// formatted locale
|
|
467
471
|
return {
|
|
@@ -184,7 +184,8 @@ const {
|
|
|
184
184
|
inputAttrs,
|
|
185
185
|
} = useAttrs(props);
|
|
186
186
|
|
|
187
|
-
const
|
|
187
|
+
const i18nGlobal = tm(UInputFile);
|
|
188
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
188
189
|
|
|
189
190
|
const currentFiles = computed({
|
|
190
191
|
get: () => props.modelValue,
|
package/ui.form-select/index.vue
CHANGED
|
@@ -500,7 +500,8 @@ const {
|
|
|
500
500
|
dropdownListAttrs,
|
|
501
501
|
} = useAttrs(props, { isTop, isOpen, selectedLabel });
|
|
502
502
|
|
|
503
|
-
const
|
|
503
|
+
const i18nGlobal = tm(USelect);
|
|
504
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
504
505
|
|
|
505
506
|
const inputPlaceholder = computed(() => {
|
|
506
507
|
const message = currentLocale.value.addMore;
|
package/ui.form-switch/index.vue
CHANGED
|
@@ -158,7 +158,8 @@ const emit = defineEmits(["update:modelValue"]);
|
|
|
158
158
|
|
|
159
159
|
const { tm } = useLocale();
|
|
160
160
|
|
|
161
|
-
const
|
|
161
|
+
const i18nGlobal = tm(USwitch);
|
|
162
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
162
163
|
|
|
163
164
|
const checkedValue = computed({
|
|
164
165
|
get: () => props.modelValue,
|
package/ui.notify/index.vue
CHANGED
|
@@ -142,7 +142,8 @@ const notifyPositionStyles = ref({});
|
|
|
142
142
|
|
|
143
143
|
const notificationsWrapperRef = ref(null);
|
|
144
144
|
|
|
145
|
-
const
|
|
145
|
+
const i18nGlobal = tm(UNotify);
|
|
146
|
+
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
146
147
|
|
|
147
148
|
onMounted(() => {
|
|
148
149
|
window.addEventListener("resize", setPosition, { passive: true });
|