@merkaly/nuxt 0.7.4 → 0.7.5
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/input/InputAddress.d.vue.ts +1 -1
- package/dist/runtime/components/input/InputAddress.vue.d.ts +1 -1
- package/dist/runtime/components/input/InputSelect.d.vue.ts +2 -0
- package/dist/runtime/components/input/InputSelect.vue +6 -4
- package/dist/runtime/components/input/InputSelect.vue.d.ts +2 -0
- package/dist/runtime/components/table/TableDatagrid.d.vue.ts +1 -1
- package/dist/runtime/components/table/TableDatagrid.vue +21 -4
- package/dist/runtime/components/table/TableDatagrid.vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -81,8 +81,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
}>, {
|
|
82
82
|
mode: PlaceTypes;
|
|
83
83
|
disabled: boolean;
|
|
84
|
-
placeholder: string;
|
|
85
84
|
countries: string[];
|
|
85
|
+
placeholder: string;
|
|
86
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
87
|
declare const _default: typeof __VLS_export;
|
|
88
88
|
export default _default;
|
|
@@ -81,8 +81,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
}>, {
|
|
82
82
|
mode: PlaceTypes;
|
|
83
83
|
disabled: boolean;
|
|
84
|
-
placeholder: string;
|
|
85
84
|
countries: string[];
|
|
85
|
+
placeholder: string;
|
|
86
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
87
|
declare const _default: typeof __VLS_export;
|
|
88
88
|
export default _default;
|
|
@@ -83,6 +83,8 @@ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNull
|
|
|
83
83
|
text: string;
|
|
84
84
|
selectedOption: boolean;
|
|
85
85
|
}) => any;
|
|
86
|
+
} & {
|
|
87
|
+
'no-options'?: (props: any) => any;
|
|
86
88
|
};
|
|
87
89
|
emit: ((e: "request:selected" | "search", v: string) => unknown) & ((event: "update:modelValue", value: any) => void);
|
|
88
90
|
}>) => import("vue").VNode & {
|
|
@@ -120,10 +120,12 @@ const isRequired = computed(() => {
|
|
|
120
120
|
<BSpinner v-if="isLoading" class="spinner" variant="primary" />
|
|
121
121
|
</template>
|
|
122
122
|
|
|
123
|
-
<template #no-options="
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
<template #no-options="scope">
|
|
124
|
+
<slot name="no-options" v-bind="scope">
|
|
125
|
+
<span v-if="scope.loading">Searching for "{{ scope.search }}"</span>
|
|
126
|
+
<span v-else-if="scope.searching">No results for "{{ scope.search }}"</span>
|
|
127
|
+
<span v-else>Type to search</span>
|
|
128
|
+
</slot>
|
|
127
129
|
</template>
|
|
128
130
|
|
|
129
131
|
<template #open-indicator="{ attributes }">
|
|
@@ -83,6 +83,8 @@ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNull
|
|
|
83
83
|
text: string;
|
|
84
84
|
selectedOption: boolean;
|
|
85
85
|
}) => any;
|
|
86
|
+
} & {
|
|
87
|
+
'no-options'?: (props: any) => any;
|
|
86
88
|
};
|
|
87
89
|
emit: ((e: "request:selected" | "search", v: string) => unknown) & ((event: "update:modelValue", value: any) => void);
|
|
88
90
|
}>) => import("vue").VNode & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { sentenceCase } from "change-case";
|
|
3
3
|
import { computed, getCurrentInstance, useSlots } from "vue";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
4
5
|
import DropdownIcon from "../dropdown/DropdownIcon.vue";
|
|
5
6
|
import FormatIcon from "../format/FormatIcon.vue";
|
|
6
7
|
import FormatText from "../format/FormatText.vue";
|
|
@@ -8,13 +9,14 @@ import InputSearch from "../input/InputSearch.vue";
|
|
|
8
9
|
const emit = defineEmits(["fetch", "toggle:item"]);
|
|
9
10
|
const slots = useSlots();
|
|
10
11
|
const props = defineProps({
|
|
11
|
-
emptyText: { type: String, default:
|
|
12
|
+
emptyText: { type: String, default: void 0 },
|
|
12
13
|
hideHeader: { type: Boolean, default: false },
|
|
13
14
|
hideFooter: { type: Boolean, default: false },
|
|
14
15
|
hidePagination: { type: Boolean, default: false },
|
|
15
16
|
hideSelect: { type: Boolean, default: false }
|
|
16
17
|
});
|
|
17
18
|
const $datagrid = defineModel({ type: Object, ...{ type: Object, required: true } });
|
|
19
|
+
const { t } = useI18n({ useScope: "local" });
|
|
18
20
|
const instance = getCurrentInstance();
|
|
19
21
|
const canFetch = Boolean(instance?.vnode?.props?.onFetch);
|
|
20
22
|
const canFilter = Boolean(slots.filters);
|
|
@@ -39,7 +41,7 @@ const paginationText = computed(() => {
|
|
|
39
41
|
}
|
|
40
42
|
const end = Math.min(page * limit, total);
|
|
41
43
|
return {
|
|
42
|
-
template: "
|
|
44
|
+
template: t("pagination"),
|
|
43
45
|
values: {
|
|
44
46
|
current: start,
|
|
45
47
|
final: end,
|
|
@@ -216,7 +218,7 @@ function getRowAttrs(item, idx) {
|
|
|
216
218
|
<BTbody v-if="!visibleItems.length">
|
|
217
219
|
<BTd :colspan="tableColspan">
|
|
218
220
|
<slot name="empty">
|
|
219
|
-
<div class="text-center text-muted" v-text="props.emptyText" />
|
|
221
|
+
<div class="text-center text-muted" v-text="props.emptyText ?? t('empty')" />
|
|
220
222
|
</slot>
|
|
221
223
|
</BTd>
|
|
222
224
|
</BTbody>
|
|
@@ -249,7 +251,7 @@ function getRowAttrs(item, idx) {
|
|
|
249
251
|
</template>
|
|
250
252
|
|
|
251
253
|
<BTd v-if="hasActionsSlot" class="text-end px-3">
|
|
252
|
-
<DropdownIcon icon="caret-down" text="
|
|
254
|
+
<DropdownIcon icon="caret-down" :text="t('actions')" toggle-class="py-1 px-3" variant="light-dark">
|
|
253
255
|
<slot :index="idx" :item="item" name="actions" />
|
|
254
256
|
</DropdownIcon>
|
|
255
257
|
</BTd>
|
|
@@ -327,3 +329,18 @@ thead:before {
|
|
|
327
329
|
background: rgb(var(--bs-primary-rgb), 0.05);
|
|
328
330
|
}
|
|
329
331
|
</style>
|
|
332
|
+
|
|
333
|
+
<i18n lang="json">
|
|
334
|
+
{
|
|
335
|
+
"en": {
|
|
336
|
+
"empty": "No items found",
|
|
337
|
+
"actions": "Actions",
|
|
338
|
+
"pagination": "Showing :current: to :final: of :total: items"
|
|
339
|
+
},
|
|
340
|
+
"pt": {
|
|
341
|
+
"empty": "Nenhum item encontrado",
|
|
342
|
+
"actions": "Ações",
|
|
343
|
+
"pagination": "Mostrando :current: a :final: de :total: itens"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
</i18n>
|