v-sistec-features 1.23.2 → 1.25.0
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/core.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/v-sistec-features.css +1 -1
- package/dist/vDataTable.d.ts +12 -0
- package/dist/vDataTable.js +617 -590
- package/package.json +1 -1
- package/src/DatatableVue/components/VColumn.vue +8 -2
- package/src/DatatableVue/components/VDataTable.vue +153 -367
- package/src/DatatableVue/composables/useDataTableFetch.ts +2 -2
- package/src/DatatableVue/keys.ts +4 -0
- package/src/DatatableVue/style/scss/VDataTable.scss +177 -0
- package/src/DatatableVue/style/scss/_image-preview.scss +84 -0
- package/src/DatatableVue/types/v-data-table.ts +10 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
6
|
import { inject, onMounted, useSlots } from 'vue';
|
|
7
7
|
import { dataTableApiKey } from '../keys';
|
|
8
|
-
|
|
8
|
+
const column_internal_id = crypto.randomUUID();
|
|
9
9
|
defineSlots<{
|
|
10
10
|
// props para o slot body
|
|
11
11
|
body?: (props: { item: any }) => any,
|
|
@@ -31,6 +31,7 @@ interface VColumnProps {
|
|
|
31
31
|
decreasing_value?: string;
|
|
32
32
|
increasing_value?: string;
|
|
33
33
|
class_rules?: Record<string, (item: any) => boolean>;
|
|
34
|
+
start_hidden?: boolean;
|
|
34
35
|
}
|
|
35
36
|
const props = withDefaults(defineProps<VColumnProps>(), {
|
|
36
37
|
field: null,
|
|
@@ -59,6 +60,7 @@ const props = withDefaults(defineProps<VColumnProps>(), {
|
|
|
59
60
|
locked: false,
|
|
60
61
|
|
|
61
62
|
use_ordering: false,
|
|
63
|
+
start_hidden: false,
|
|
62
64
|
param_ordering: '',
|
|
63
65
|
decreasing_value: '',
|
|
64
66
|
increasing_value: '',
|
|
@@ -99,6 +101,7 @@ onMounted(() => {
|
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
parentApi.addColumn({
|
|
104
|
+
id: column_internal_id,
|
|
102
105
|
field: props.field,
|
|
103
106
|
header: props.header,
|
|
104
107
|
type: props.type,
|
|
@@ -122,8 +125,11 @@ onMounted(() => {
|
|
|
122
125
|
...(props.type === 'text' && { limite_text: Number(props.limite_text) }),
|
|
123
126
|
...(props.type === 'img' && { deactivate_img_preview: props.deactivate_img_preview }),
|
|
124
127
|
...(props.type === 'date' && { format: props.format }),
|
|
128
|
+
|
|
129
|
+
start_hidden: props.start_hidden,// se a coluna é opcional por padrão ela não é visível, mas o usuário pode escolher mostrar ela
|
|
130
|
+
visible:! props.start_hidden // Se start_hidden for true, ela não estará visível inicialmente
|
|
125
131
|
|
|
126
132
|
});
|
|
127
|
-
|
|
133
|
+
|
|
128
134
|
});
|
|
129
135
|
</script>
|