@bildvitta/quasar-ui-asteroid 3.17.0-beta.2 → 3.17.0-beta.3
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,31 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
<component :is="component.is" v-bind="component.props">
|
|
3
|
+
<qas-header v-if="hasHeader" v-bind="props.headerProps" />
|
|
4
|
+
|
|
5
|
+
<div :class="classes">
|
|
6
|
+
<div v-for="(field, key) in fieldsByResult" :key="key" :class="getContainerClass({ key })">
|
|
7
|
+
<slot :field="field" :name="`field-${field.name}`">
|
|
8
|
+
<qas-grid-item :use-ellipsis="props.useEllipsis" :use-inline="props.useInline">
|
|
9
|
+
<template #header>
|
|
10
|
+
<slot :field="field" :name="`header-field-${field.name}`">
|
|
11
|
+
<slot :field="field" name="header">
|
|
12
|
+
<div :class="headerClass" :data-cy="`grid-generator-${field.name}-field`" :title="getTitle(field, 'label')">
|
|
13
|
+
{{ field.label }}
|
|
14
|
+
</div>
|
|
15
|
+
</slot>
|
|
12
16
|
</slot>
|
|
13
|
-
</
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<template #content>
|
|
20
|
+
<slot :field="field" :name="`content-field-${field.name}`">
|
|
21
|
+
<slot :field="field" name="content">
|
|
22
|
+
<div :class="contentClass" :data-cy="`grid-generator-${field.name}-result`" :title="getTitle(field, 'formattedResult')">
|
|
23
|
+
{{ field.formattedResult }}
|
|
24
|
+
</div>
|
|
25
|
+
</slot>
|
|
22
26
|
</slot>
|
|
23
|
-
</
|
|
24
|
-
</
|
|
25
|
-
</
|
|
26
|
-
</
|
|
27
|
+
</template>
|
|
28
|
+
</qas-grid-item>
|
|
29
|
+
</slot>
|
|
30
|
+
</div>
|
|
27
31
|
</div>
|
|
28
|
-
</
|
|
32
|
+
</component>
|
|
29
33
|
</template>
|
|
30
34
|
|
|
31
35
|
<script setup>
|
|
@@ -44,6 +48,11 @@ const screen = useScreen()
|
|
|
44
48
|
const props = defineProps({
|
|
45
49
|
...baseProps,
|
|
46
50
|
|
|
51
|
+
boxProps: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default: () => ({})
|
|
54
|
+
},
|
|
55
|
+
|
|
47
56
|
contentClass: {
|
|
48
57
|
default: '',
|
|
49
58
|
type: [Array, Object, String]
|
|
@@ -54,6 +63,11 @@ const props = defineProps({
|
|
|
54
63
|
type: [Array, Object, String]
|
|
55
64
|
},
|
|
56
65
|
|
|
66
|
+
headerProps: {
|
|
67
|
+
type: Object,
|
|
68
|
+
default: () => ({})
|
|
69
|
+
},
|
|
70
|
+
|
|
57
71
|
emptyResultText: {
|
|
58
72
|
default: '-',
|
|
59
73
|
type: String
|
|
@@ -64,6 +78,10 @@ const props = defineProps({
|
|
|
64
78
|
type: Object
|
|
65
79
|
},
|
|
66
80
|
|
|
81
|
+
useBox: {
|
|
82
|
+
type: Boolean
|
|
83
|
+
},
|
|
84
|
+
|
|
67
85
|
useEmptyResult: {
|
|
68
86
|
default: true,
|
|
69
87
|
type: Boolean
|
|
@@ -85,6 +103,7 @@ const { classes, getFieldClass } = useGenerator({ props })
|
|
|
85
103
|
// computed
|
|
86
104
|
const hasResult = computed(() => Object.keys(props.result).length)
|
|
87
105
|
const hasFields = computed(() => Object.keys(props.fields).length)
|
|
106
|
+
const hasHeader = computed(() => Object.keys(props.headerProps).length)
|
|
88
107
|
|
|
89
108
|
const contentClass = computed(() => {
|
|
90
109
|
return [
|
|
@@ -96,6 +115,13 @@ const contentClass = computed(() => {
|
|
|
96
115
|
]
|
|
97
116
|
})
|
|
98
117
|
|
|
118
|
+
const component = computed(() => {
|
|
119
|
+
return {
|
|
120
|
+
is: props.useBox ? 'qas-box' : 'div',
|
|
121
|
+
props: props.useBox ? props.boxProps : {}
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
|
|
99
125
|
const headerClass = computed(() => {
|
|
100
126
|
return [
|
|
101
127
|
props.headerClass,
|
|
@@ -4,6 +4,11 @@ meta:
|
|
|
4
4
|
desc: Componente para criação de textos dinâmicos.
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
|
+
box-props:
|
|
8
|
+
desc: Propriedades do "QasBox" que envolve o conteúdo.
|
|
9
|
+
default: {}
|
|
10
|
+
type: Object
|
|
11
|
+
|
|
7
12
|
columns:
|
|
8
13
|
desc: Colunas do grid de cada campo.
|
|
9
14
|
default: col-6
|
|
@@ -41,6 +46,11 @@ props:
|
|
|
41
46
|
default: 'text-bold'
|
|
42
47
|
type: [Array, Object, String]
|
|
43
48
|
|
|
49
|
+
header-props:
|
|
50
|
+
desc: Propriedades do "QasHeader".
|
|
51
|
+
default: {}
|
|
52
|
+
type: Object
|
|
53
|
+
|
|
44
54
|
result:
|
|
45
55
|
desc: Resultado contendo todas informações para serem exibidas na tela.
|
|
46
56
|
default: {}
|
|
@@ -52,6 +62,11 @@ props:
|
|
|
52
62
|
default: true
|
|
53
63
|
type: Boolean
|
|
54
64
|
|
|
65
|
+
use-box:
|
|
66
|
+
desc: Controla se o componente vai ter o QasBox englobando ou não.
|
|
67
|
+
default: false
|
|
68
|
+
type: Boolean
|
|
69
|
+
|
|
55
70
|
use-ellipsis:
|
|
56
71
|
desc: Adiciona a classe "ellipsis" para o elemento do conteúdo.
|
|
57
72
|
default: true
|