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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "v-sistec-features",
3
3
  "private": false,
4
- "version": "1.23.2",
4
+ "version": "1.25.0",
5
5
  "author": "Márlon Bento Azevedo (https://github.com/marlon-bento)",
6
6
  "repository": {
7
7
  "type": "git",
@@ -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>