@bildvitta/quasar-ui-asteroid 3.0.0-alpha.3 → 3.0.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/dist/api/QasBtn.json +5 -2
- package/dist/api/QasDelete.json +5 -0
- package/dist/api/QasFilters.json +4 -0
- package/dist/api/QasFormView.json +6 -4
- package/dist/api/QasInput.json +16 -1
- package/dist/api/QasPasswordInput.json +2 -1
- package/dist/api/QasSignatureUploader.json +7 -0
- package/dist/asteroid.cjs.css +1 -1
- package/dist/asteroid.cjs.js +792 -653
- package/dist/asteroid.cjs.min.js +2 -2
- package/dist/asteroid.esm.css +1 -1
- package/dist/asteroid.esm.js +794 -654
- package/dist/asteroid.esm.min.js +2 -2
- package/dist/asteroid.umd.css +1 -1
- package/dist/asteroid.umd.js +794 -654
- package/dist/asteroid.umd.min.js +2 -2
- package/dist/vetur/asteroid-attributes.json +31 -3
- package/dist/vetur/asteroid-tags.json +11 -4
- package/package.json +1 -1
- package/src/asteroid.js +1 -0
- package/src/components/actions/QasActions.vue +1 -5
- package/src/components/actions-menu/QasActionsMenu.vue +3 -5
- package/src/components/app-menu/QasAppMenu.vue +1 -4
- package/src/components/btn/QasBtn.vue +12 -11
- package/src/components/btn/QasBtn.yml +4 -1
- package/src/components/delete/QasDelete.vue +23 -1
- package/src/components/delete/QasDelete.yml +4 -0
- package/src/components/dialog/QasDialog.vue +4 -8
- package/src/components/field/QasField.vue +1 -2
- package/src/components/filters/QasFilters.vue +6 -2
- package/src/components/filters/QasFilters.yml +4 -0
- package/src/components/form-view/QasFormView.vue +14 -14
- package/src/components/form-view/QasFormView.yml +8 -3
- package/src/components/gallery/QasGallery.vue +4 -8
- package/src/components/input/QasInput.vue +43 -2
- package/src/components/input/QasInput.yml +13 -1
- package/src/components/nested-fields/QasNestedFields.vue +47 -35
- package/src/components/page-header/QasPageHeader.vue +4 -2
- package/src/components/password-input/QasPasswordInput.vue +17 -26
- package/src/components/password-input/QasPasswordInput.yml +1 -1
- package/src/components/profile/QasProfile.vue +2 -5
- package/src/components/search-box/QasSearchBox.vue +6 -1
- package/src/components/select-list/QasSelectList.vue +12 -13
- package/src/components/signature-uploader/QasSignatureUploader.vue +35 -2
- package/src/components/signature-uploader/QasSignatureUploader.yml +5 -0
- package/src/components/table-generator/QasTableGenerator.vue +3 -6
- package/src/components/text-truncate/QasTextTruncate.vue +1 -4
- package/src/components/transfer/QasTransfer.vue +12 -13
- package/src/components/uploader/QasUploader.vue +1 -2
- package/src/composables/index.js +1 -0
- package/src/composables/useForm.js +3 -0
- package/src/composables/useHistory.js +46 -0
- package/src/css/design-system/button.scss +6 -0
- package/src/css/design-system/index.scss +2 -0
- package/src/css/design-system/typography.scss +91 -0
- package/src/directives/Test.js +13 -0
- package/src/helpers/filter-list-by-handle.js +31 -0
- package/src/helpers/filter-object-to-array.js +29 -0
- package/src/helpers/filter-object.js +2 -3
- package/src/helpers/index.js +2 -0
- package/src/index.scss +4 -2
- package/src/mixins/index.js +1 -3
- package/src/mixins/view.js +2 -0
- package/src/pages/Forbidden.vue +12 -0
- package/src/pages/NotFound.vue +12 -0
- package/src/plugins/index.js +2 -0
- package/src/plugins/screen/Screen.js +35 -0
- package/src/plugins/screen/Screen.yml +16 -0
- package/src/vue-plugin.js +12 -3
- package/src/css/transitions.scss +0 -12
- package/src/mixins/screen.js +0 -34
- package/src/store/history.js +0 -43
- package/src/store/index.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<q-input ref="input" v-model="model" bottom-slots v-bind="$attrs" :mask="mask" :outlined="outlined" :unmasked-value="unmaskedValue">
|
|
3
|
+
<q-input ref="input" v-model="model" bottom-slots :error="errorData" v-bind="$attrs" :error-message="errorMessageData" :mask="mask" :outlined="outlined" :unmasked-value="unmaskedValue">
|
|
4
4
|
<template v-for="(_, name) in $slots" #[name]="context">
|
|
5
5
|
<slot :name="name" v-bind="context || {}" />
|
|
6
6
|
</template>
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
props: {
|
|
18
18
|
modelValue: {
|
|
19
19
|
default: '',
|
|
20
|
-
type: String
|
|
20
|
+
type: [String, Number]
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
unmaskedValue: {
|
|
@@ -28,11 +28,31 @@ export default {
|
|
|
28
28
|
outlined: {
|
|
29
29
|
default: true,
|
|
30
30
|
type: Boolean
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
removeErrorOnType: {
|
|
34
|
+
type: Boolean
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
error: {
|
|
38
|
+
type: Boolean
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
errorMessage: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ''
|
|
31
44
|
}
|
|
32
45
|
},
|
|
33
46
|
|
|
34
47
|
emits: ['update:modelValue'],
|
|
35
48
|
|
|
49
|
+
data () {
|
|
50
|
+
return {
|
|
51
|
+
errorData: false,
|
|
52
|
+
messageErrorData: ''
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
|
|
36
56
|
computed: {
|
|
37
57
|
hasError () {
|
|
38
58
|
return this.inputReference.hasError
|
|
@@ -65,6 +85,11 @@ export default {
|
|
|
65
85
|
},
|
|
66
86
|
|
|
67
87
|
set (value) {
|
|
88
|
+
if (this.removeErrorOnType && this.error) {
|
|
89
|
+
this.errorData = false
|
|
90
|
+
this.errorMessageData = ''
|
|
91
|
+
}
|
|
92
|
+
|
|
68
93
|
return this.$emit('update:modelValue', value)
|
|
69
94
|
}
|
|
70
95
|
}
|
|
@@ -77,6 +102,22 @@ export default {
|
|
|
77
102
|
requestAnimationFrame(() => {
|
|
78
103
|
input.selectionStart = input.value ? input.value.length : ''
|
|
79
104
|
})
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
error: {
|
|
108
|
+
handler (value) {
|
|
109
|
+
this.errorData = value
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
immediate: true
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
errorMessage: {
|
|
116
|
+
handler (value) {
|
|
117
|
+
this.errorMessageData = value
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
immediate: true
|
|
80
121
|
}
|
|
81
122
|
},
|
|
82
123
|
|
|
@@ -9,7 +9,7 @@ meta:
|
|
|
9
9
|
props:
|
|
10
10
|
model-value:
|
|
11
11
|
desc: Model do componente.
|
|
12
|
-
type: String
|
|
12
|
+
type: [String, Input]
|
|
13
13
|
examples: [v-model="value"]
|
|
14
14
|
model: true
|
|
15
15
|
|
|
@@ -23,6 +23,18 @@ props:
|
|
|
23
23
|
default: true
|
|
24
24
|
type: Boolean
|
|
25
25
|
|
|
26
|
+
error:
|
|
27
|
+
desc: Controla cor da borda do input.
|
|
28
|
+
type: Boolean
|
|
29
|
+
|
|
30
|
+
error-message:
|
|
31
|
+
desc: Controla mensagem de erro (apenas quando "error" for "true").
|
|
32
|
+
type: String
|
|
33
|
+
|
|
34
|
+
remove-error-on-type:
|
|
35
|
+
desc: Limpa os erros do campo caso os mesmos existam toda vez que o model atualiza.
|
|
36
|
+
type: Boolean
|
|
37
|
+
|
|
26
38
|
events:
|
|
27
39
|
'@update:model-value -> function (value)':
|
|
28
40
|
desc: Dispara toda vez que o model é atualizado, também utilizado para v-model.
|
|
@@ -4,46 +4,44 @@
|
|
|
4
4
|
<qas-label v-if="useSingleLabel" :label="fieldLabel" />
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
|
-
<div>
|
|
8
|
-
<component :is="componentTag"
|
|
9
|
-
<div v-for="(row, index) in nested" :id="`row-${index}`" :key="index" class="full-width">
|
|
10
|
-
<
|
|
11
|
-
<div
|
|
12
|
-
<div>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
<qas-btn v-if="showDestroyBtn" v-bind="btnDestroyProps" @click="destroy(index, row)" />
|
|
19
|
-
</div>
|
|
7
|
+
<div ref="inputContent">
|
|
8
|
+
<component :is="componentTag" v-bind="componentProps">
|
|
9
|
+
<div v-for="(row, index) in nested" :id="`row-${index}`" :key="`row-${index}`" class="full-width">
|
|
10
|
+
<div v-if="!row[destroyKey]" :key="index" class="col-12 q-mt-md">
|
|
11
|
+
<div>
|
|
12
|
+
<div class="flex items-center justify-between q-py-xs">
|
|
13
|
+
<qas-label v-if="!useSingleLabel" :label="setRowLabel(index)" />
|
|
14
|
+
|
|
15
|
+
<div v-if="!useInlineActions" class="q-gutter-x-sm">
|
|
16
|
+
<qas-btn v-if="useDuplicate" v-bind="btnDuplicateProps" @click="add(row)" />
|
|
17
|
+
<qas-btn v-if="showDestroyBtn" v-bind="btnDestroyProps" @click="destroy(index, row)" />
|
|
20
18
|
</div>
|
|
19
|
+
</div>
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</div>
|
|
21
|
+
<div ref="formGenerator" class="col-12 justify-between q-col-gutter-x-md row">
|
|
22
|
+
<slot :errors="transformedErrors" :fields="children" :index="index" name="fields" :update-value="updateValuesFromInput">
|
|
23
|
+
<qas-form-generator v-model="nested[index]" :class="formClasses" :columns="formColumns" :errors="transformedErrors[index]" :fields="children" :fields-props="fieldsProps" @update:model-value="updateValuesFromInput($event, index)">
|
|
24
|
+
<template v-for="(slot, key) in $slots" #[key]="scope">
|
|
25
|
+
<slot v-bind="scope" :errors="transformedErrors" :index="index" :name="key" />
|
|
26
|
+
</template>
|
|
27
|
+
</qas-form-generator>
|
|
28
|
+
</slot>
|
|
29
|
+
|
|
30
|
+
<div v-if="useInlineActions" class="flex items-center qas-nested-fields__actions">
|
|
31
|
+
<div class="col-auto">
|
|
32
|
+
<qas-btn v-if="useDuplicate" color="primary" flat icon="o_content_copy" round @click="add(row)" />
|
|
33
|
+
</div>
|
|
34
|
+
<div class="col-auto">
|
|
35
|
+
<qas-btn v-if="showDestroyBtn" color="negative" flat icon="o_cancel" round @click="destroy(index, row)" />
|
|
38
36
|
</div>
|
|
39
37
|
</div>
|
|
38
|
+
</div>
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</div>
|
|
40
|
+
<div class="col-12">
|
|
41
|
+
<slot :fields="children" :index="index" :model="nested[index]" name="custom-fields" :update-value="updateValuesFromInput" />
|
|
44
42
|
</div>
|
|
45
43
|
</div>
|
|
46
|
-
</
|
|
44
|
+
</div>
|
|
47
45
|
</div>
|
|
48
46
|
</component>
|
|
49
47
|
|
|
@@ -60,7 +58,7 @@
|
|
|
60
58
|
</div>
|
|
61
59
|
|
|
62
60
|
<div v-else class="q-mt-lg">
|
|
63
|
-
<qas-btn class="full-width q-py-
|
|
61
|
+
<qas-btn class="full-width q-py-md" icon="o_add" outline @click="add()">{{ addInputLabel }}</qas-btn>
|
|
64
62
|
</div>
|
|
65
63
|
</slot>
|
|
66
64
|
</div>
|
|
@@ -73,6 +71,7 @@ import QasBtn from '../btn/QasBtn.vue'
|
|
|
73
71
|
import QasFormGenerator from '../form-generator/QasFormGenerator.vue'
|
|
74
72
|
import QasInput from '../input/QasInput.vue'
|
|
75
73
|
import QasLabel from '../label/QasLabel.vue'
|
|
74
|
+
import { TransitionGroup } from 'vue'
|
|
76
75
|
|
|
77
76
|
import { constructObject } from '../../helpers'
|
|
78
77
|
import { extend } from 'quasar'
|
|
@@ -85,7 +84,10 @@ export default {
|
|
|
85
84
|
QasBtn,
|
|
86
85
|
QasFormGenerator,
|
|
87
86
|
QasInput,
|
|
88
|
-
QasLabel
|
|
87
|
+
QasLabel,
|
|
88
|
+
|
|
89
|
+
// vue
|
|
90
|
+
TransitionGroup
|
|
89
91
|
},
|
|
90
92
|
|
|
91
93
|
props: {
|
|
@@ -249,6 +251,16 @@ export default {
|
|
|
249
251
|
|
|
250
252
|
componentTag () {
|
|
251
253
|
return this.useAnimation ? 'transition-group' : 'div'
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
componentProps () {
|
|
257
|
+
if (!this.useAnimation) return {}
|
|
258
|
+
|
|
259
|
+
return {
|
|
260
|
+
tag: 'div',
|
|
261
|
+
enterActiveClass: 'animated slideInDown',
|
|
262
|
+
leaveActiveClass: 'animated slideOutUp'
|
|
263
|
+
}
|
|
252
264
|
}
|
|
253
265
|
},
|
|
254
266
|
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
<script>
|
|
18
18
|
import { castArray } from 'lodash-es'
|
|
19
|
-
import {
|
|
19
|
+
import { useHistory } from '../../composables'
|
|
20
|
+
|
|
21
|
+
const { hasPreviousRoute, history, getPreviousRoute } = useHistory()
|
|
20
22
|
|
|
21
23
|
export default {
|
|
22
24
|
name: 'QasPageHeader',
|
|
@@ -45,7 +47,7 @@ export default {
|
|
|
45
47
|
|
|
46
48
|
computed: {
|
|
47
49
|
hasPreviousRoute () {
|
|
48
|
-
return
|
|
50
|
+
return hasPreviousRoute.value
|
|
49
51
|
},
|
|
50
52
|
|
|
51
53
|
transformedBreadcrumbs () {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<qas-input v-model="model" bottom-slots v-bind="$attrs" remove-error-on-type :type="type">
|
|
4
|
+
<template #append>
|
|
5
|
+
<q-icon class="cursor-pointer" :color="iconColor" :name="icon" @click="toggle" />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<template v-for="(_, name) in $slots" #[name]="context">
|
|
9
|
+
<slot :name="name" v-bind="context || {}" />
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<template v-if="!hideStrengthChecker" #hint>
|
|
13
|
+
<qas-password-strength-checker v-bind="strengthCheckerProps" :password="model" />
|
|
14
|
+
</template>
|
|
15
|
+
</qas-input>
|
|
16
|
+
</div>
|
|
15
17
|
</template>
|
|
16
18
|
|
|
17
19
|
<script>
|
|
@@ -28,9 +30,8 @@ export default {
|
|
|
28
30
|
mixins: [passwordMixin],
|
|
29
31
|
|
|
30
32
|
props: {
|
|
31
|
-
|
|
32
|
-
type: Boolean
|
|
33
|
-
default: true
|
|
33
|
+
hideStrengthChecker: {
|
|
34
|
+
type: Boolean
|
|
34
35
|
},
|
|
35
36
|
|
|
36
37
|
iconColor: {
|
|
@@ -48,7 +49,6 @@ export default {
|
|
|
48
49
|
|
|
49
50
|
data () {
|
|
50
51
|
return {
|
|
51
|
-
key: 'error',
|
|
52
52
|
toggleType: true
|
|
53
53
|
}
|
|
54
54
|
},
|
|
@@ -78,15 +78,6 @@ export default {
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
|
|
81
|
-
watch: {
|
|
82
|
-
modelValue () {
|
|
83
|
-
if (this.$attrs.error) {
|
|
84
|
-
this.$attrs.error = false
|
|
85
|
-
this.$attrs.errorMessage = ''
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
|
|
90
81
|
methods: {
|
|
91
82
|
toggle () {
|
|
92
83
|
this.toggleType = !this.toggleType
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
|
|
26
26
|
<script>
|
|
27
27
|
import filterObject from '../../helpers/filter-object'
|
|
28
|
-
import screenMixin from '../../mixins/screen'
|
|
29
28
|
|
|
30
29
|
import QasAvatar from '../avatar/QasAvatar.vue'
|
|
31
30
|
import QasBox from '../box/QasBox.vue'
|
|
@@ -40,8 +39,6 @@ export default {
|
|
|
40
39
|
QasGridGenerator
|
|
41
40
|
},
|
|
42
41
|
|
|
43
|
-
mixins: [screenMixin],
|
|
44
|
-
|
|
45
42
|
props: {
|
|
46
43
|
columns: {
|
|
47
44
|
type: Object,
|
|
@@ -82,7 +79,7 @@ export default {
|
|
|
82
79
|
|
|
83
80
|
computed: {
|
|
84
81
|
directionClasses () {
|
|
85
|
-
return this.
|
|
82
|
+
return this.$qas.screen.untilMedium ? 'col' : 'row items-center'
|
|
86
83
|
},
|
|
87
84
|
|
|
88
85
|
userAvatarImage () {
|
|
@@ -90,7 +87,7 @@ export default {
|
|
|
90
87
|
},
|
|
91
88
|
|
|
92
89
|
avatarSize () {
|
|
93
|
-
return this.
|
|
90
|
+
return this.$qas.screen.isSmall ? '145px' : '188px'
|
|
94
91
|
}
|
|
95
92
|
},
|
|
96
93
|
|
|
@@ -125,6 +125,7 @@ export default {
|
|
|
125
125
|
this.fuse = new Fuse(value, this.defaultFuseOptions)
|
|
126
126
|
|
|
127
127
|
this.setResults(this.search)
|
|
128
|
+
this.updateResultsModel(value)
|
|
128
129
|
},
|
|
129
130
|
|
|
130
131
|
deep: true
|
|
@@ -141,7 +142,7 @@ export default {
|
|
|
141
142
|
|
|
142
143
|
searchResults: {
|
|
143
144
|
handler (value) {
|
|
144
|
-
this
|
|
145
|
+
this.updateResultsModel(value)
|
|
145
146
|
},
|
|
146
147
|
immediate: true
|
|
147
148
|
}
|
|
@@ -158,6 +159,10 @@ export default {
|
|
|
158
159
|
this.searchResults = value
|
|
159
160
|
? this.fuse.search(value)
|
|
160
161
|
: this.list
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
updateResultsModel (value) {
|
|
165
|
+
this.$emit('update:results', value.map(result => result.item || result))
|
|
161
166
|
}
|
|
162
167
|
}
|
|
163
168
|
}
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
<script>
|
|
26
26
|
import { sortBy } from 'lodash-es'
|
|
27
|
-
import { screenMixin } from '../../mixins'
|
|
28
27
|
|
|
29
28
|
import QasBtn from '../btn/QasBtn.vue'
|
|
30
29
|
import QasSearchBox from '../search-box/QasSearchBox.vue'
|
|
@@ -37,8 +36,6 @@ export default {
|
|
|
37
36
|
QasSearchBox
|
|
38
37
|
},
|
|
39
38
|
|
|
40
|
-
mixins: [screenMixin],
|
|
41
|
-
|
|
42
39
|
props: {
|
|
43
40
|
deleteOnly: {
|
|
44
41
|
type: Boolean
|
|
@@ -119,15 +116,17 @@ export default {
|
|
|
119
116
|
immediate: true
|
|
120
117
|
},
|
|
121
118
|
|
|
122
|
-
modelValue
|
|
123
|
-
|
|
119
|
+
modelValue: {
|
|
120
|
+
handler (value) {
|
|
121
|
+
this.values = [...value]
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
immediate: true
|
|
124
125
|
}
|
|
125
126
|
},
|
|
126
127
|
|
|
127
128
|
created () {
|
|
128
|
-
this.
|
|
129
|
-
|
|
130
|
-
this.handleOptions()
|
|
129
|
+
this.handleList()
|
|
131
130
|
},
|
|
132
131
|
|
|
133
132
|
methods: {
|
|
@@ -142,9 +141,9 @@ export default {
|
|
|
142
141
|
const isSelected = this.values.includes(value)
|
|
143
142
|
|
|
144
143
|
return {
|
|
145
|
-
dense: this.
|
|
144
|
+
dense: this.$qas.screen.isSmall,
|
|
146
145
|
hideLabelOnSmallScreen: true,
|
|
147
|
-
icon: !this.
|
|
146
|
+
icon: !this.$qas.screen.isSmall ? undefined : isSelected ? 'o_close' : 'o_add',
|
|
148
147
|
label: isSelected ? 'Remover' : 'Adicionar',
|
|
149
148
|
outline: isSelected,
|
|
150
149
|
size: 'sm'
|
|
@@ -155,7 +154,7 @@ export default {
|
|
|
155
154
|
return this.values.includes(item.value) ? this.remove(item) : this.add(item)
|
|
156
155
|
},
|
|
157
156
|
|
|
158
|
-
|
|
157
|
+
handleList () {
|
|
159
158
|
if (this.modelValue.length) {
|
|
160
159
|
return this.sortList()
|
|
161
160
|
}
|
|
@@ -186,8 +185,8 @@ export default {
|
|
|
186
185
|
|
|
187
186
|
sortList () {
|
|
188
187
|
this.sortedList = this.deleteOnly
|
|
189
|
-
? this.list.filter(
|
|
190
|
-
: sortBy(this.list,
|
|
188
|
+
? this.list.filter(item => this.modelValue.includes(item.value))
|
|
189
|
+
: sortBy(this.list, item => !this.modelValue.includes(item.value))
|
|
191
190
|
},
|
|
192
191
|
|
|
193
192
|
updateModel (model) {
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
</qas-uploader>
|
|
17
17
|
|
|
18
|
-
<qas-dialog v-model="isOpenedDialog">
|
|
18
|
+
<qas-dialog v-model="isOpenedDialog" v-bind="defaultDialogProps">
|
|
19
19
|
<template #header>
|
|
20
20
|
<div class="text-bold text-center">Insira sua assinatura digital no campo abaixo</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<template #description>
|
|
24
|
-
<
|
|
24
|
+
<div :style="signaturePadWidth">
|
|
25
|
+
<qas-signature-pad ref="signaturePadModal" v-model:empty="isEmpty" :height="signaturePadHeight" />
|
|
26
|
+
</div>
|
|
25
27
|
</template>
|
|
26
28
|
|
|
27
29
|
<template #actions>
|
|
@@ -49,6 +51,11 @@ export default {
|
|
|
49
51
|
},
|
|
50
52
|
|
|
51
53
|
props: {
|
|
54
|
+
dialogProps: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: () => ({})
|
|
57
|
+
},
|
|
58
|
+
|
|
52
59
|
uploadLabel: {
|
|
53
60
|
default: '',
|
|
54
61
|
type: String
|
|
@@ -97,6 +104,32 @@ export default {
|
|
|
97
104
|
|
|
98
105
|
headerClass () {
|
|
99
106
|
return `q-pa-${this.readonly ? 'md' : 'sm'}`
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
defaultDialogProps () {
|
|
110
|
+
return {
|
|
111
|
+
maxWidth: '620px',
|
|
112
|
+
...this.dialogProps
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
signaturePadWidth () {
|
|
117
|
+
const sizes = {
|
|
118
|
+
[this.$qas.screen.isSmall]: { width: '100%' },
|
|
119
|
+
[this.$qas.screen.isMedium]: { width: '570px' },
|
|
120
|
+
[this.$qas.screen.isLarge]: { width: '350px' }
|
|
121
|
+
}
|
|
122
|
+
return sizes.true
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
signaturePadHeight () {
|
|
126
|
+
const sizes = {
|
|
127
|
+
[this.$qas.screen.isSmall]: '250',
|
|
128
|
+
[this.$qas.screen.isMedium]: '400',
|
|
129
|
+
[this.$qas.screen.isLarge]: '250'
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return sizes.true
|
|
100
133
|
}
|
|
101
134
|
},
|
|
102
135
|
|
|
@@ -4,6 +4,11 @@ meta:
|
|
|
4
4
|
desc: Componente que implementa o "QasUploader" e "QasSignaturePad" para fazer upload de assinatura.
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
|
+
dialog-props:
|
|
8
|
+
desc: Repassa propriedades para o "QasDialog".
|
|
9
|
+
type: Object
|
|
10
|
+
default: { maxWidth: '620px' }
|
|
11
|
+
|
|
7
12
|
upload-label:
|
|
8
13
|
desc: Rótulo do uploader.
|
|
9
14
|
type: String
|
|
@@ -16,13 +16,10 @@
|
|
|
16
16
|
import { extend } from 'quasar'
|
|
17
17
|
import { humanize } from '../../helpers/filters'
|
|
18
18
|
import { setScrollOnGrab } from '../../helpers'
|
|
19
|
-
import screenMixin from '../../mixins/screen'
|
|
20
19
|
|
|
21
20
|
export default {
|
|
22
21
|
name: 'QasTableGenerator',
|
|
23
22
|
|
|
24
|
-
mixins: [screenMixin],
|
|
25
|
-
|
|
26
23
|
props: {
|
|
27
24
|
columns: {
|
|
28
25
|
default: () => [],
|
|
@@ -149,7 +146,7 @@ export default {
|
|
|
149
146
|
},
|
|
150
147
|
|
|
151
148
|
tableClass () {
|
|
152
|
-
return this.
|
|
149
|
+
return this.$qas.screen.isSmall && 'qas-table-generator--mobile'
|
|
153
150
|
},
|
|
154
151
|
|
|
155
152
|
hasScrollOnGrab () {
|
|
@@ -190,8 +187,8 @@ export default {
|
|
|
190
187
|
},
|
|
191
188
|
|
|
192
189
|
getFullTableWidth () {
|
|
193
|
-
const
|
|
194
|
-
return
|
|
190
|
+
const tableElement = this.getTableElement()
|
|
191
|
+
return tableElement?.getBoundingClientRect?.()?.width
|
|
195
192
|
},
|
|
196
193
|
|
|
197
194
|
getContainerTableWidth () {
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script>
|
|
21
|
-
import screenMixin from '../../mixins/screen'
|
|
22
21
|
import QasDialog from '../dialog/QasDialog.vue'
|
|
23
22
|
|
|
24
23
|
export default {
|
|
@@ -28,8 +27,6 @@ export default {
|
|
|
28
27
|
QasDialog
|
|
29
28
|
},
|
|
30
29
|
|
|
31
|
-
mixins: [screenMixin],
|
|
32
|
-
|
|
33
30
|
props: {
|
|
34
31
|
dialogProps: {
|
|
35
32
|
type: Object,
|
|
@@ -69,7 +66,7 @@ export default {
|
|
|
69
66
|
|
|
70
67
|
computed: {
|
|
71
68
|
truncateTextClass () {
|
|
72
|
-
return (this.isTruncated || this.
|
|
69
|
+
return (this.isTruncated || this.$qas.screen.isSmall) && 'ellipsis q-pr-sm'
|
|
73
70
|
},
|
|
74
71
|
|
|
75
72
|
isTruncated () {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<div class="col-12 col-sm">
|
|
5
5
|
<qas-label :label="label" :quantity="optionsList.length" />
|
|
6
6
|
|
|
7
|
-
<qas-search-box
|
|
8
|
-
<template #default
|
|
7
|
+
<qas-search-box v-model:results="firstResults" :list="optionsList" outlined v-bind="searchBoxProps">
|
|
8
|
+
<template #default>
|
|
9
9
|
<q-list separator>
|
|
10
|
-
<q-item v-for="(item, index) in
|
|
10
|
+
<q-item v-for="(item, index) in firstResults" :key="index" :class="getItemClass(item, true)" clickable @click="onSelectQueue(item, true)">
|
|
11
11
|
<slot name="item-first-column">
|
|
12
12
|
<q-item-section>{{ getItemLabel(item) }}</q-item-section>
|
|
13
13
|
</slot>
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
<div class="col-12 col-sm">
|
|
34
34
|
<qas-label label="Selecionadas" :quantity="selectedList.length" />
|
|
35
35
|
|
|
36
|
-
<qas-search-box v-bind="searchBoxProps" empty-list-height="300px"
|
|
37
|
-
<template #default
|
|
36
|
+
<qas-search-box v-model:results="secondResults" v-bind="searchBoxProps" empty-list-height="300px" label="Selecionadas" :list="selectedList" outlined>
|
|
37
|
+
<template #default>
|
|
38
38
|
<q-list separator>
|
|
39
|
-
<q-item v-for="(item, index) in
|
|
39
|
+
<q-item v-for="(item, index) in secondResults" :key="index" :class="getItemClass(item)" clickable @click="onSelectQueue(item)">
|
|
40
40
|
<slot name="item-second-column">
|
|
41
41
|
<q-item-section>{{ getItemLabel(item) }}</q-item-section>
|
|
42
42
|
</slot>
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<script>
|
|
52
|
-
import { screenMixin } from '../../mixins'
|
|
53
52
|
import { extend } from 'quasar'
|
|
54
53
|
|
|
55
54
|
import QasBtn from '../btn/QasBtn.vue'
|
|
@@ -65,8 +64,6 @@ export default {
|
|
|
65
64
|
QasSearchBox
|
|
66
65
|
},
|
|
67
66
|
|
|
68
|
-
mixins: [screenMixin],
|
|
69
|
-
|
|
70
67
|
props: {
|
|
71
68
|
emitValue: {
|
|
72
69
|
type: Boolean
|
|
@@ -116,21 +113,23 @@ export default {
|
|
|
116
113
|
firstQueue: [],
|
|
117
114
|
optionsList: [],
|
|
118
115
|
secondQueue: [],
|
|
119
|
-
selectedList: []
|
|
116
|
+
selectedList: [],
|
|
117
|
+
firstResults: [],
|
|
118
|
+
secondResults: []
|
|
120
119
|
}
|
|
121
120
|
},
|
|
122
121
|
|
|
123
122
|
computed: {
|
|
124
123
|
actionsClass () {
|
|
125
|
-
return !this.
|
|
124
|
+
return !this.$qas.screen.isSmall && 'column'
|
|
126
125
|
},
|
|
127
126
|
|
|
128
127
|
gutterClass () {
|
|
129
|
-
return `q-col-gutter-${this.
|
|
128
|
+
return `q-col-gutter-${this.$qas.screen.untilLarge ? 'md' : 'xl'}`
|
|
130
129
|
},
|
|
131
130
|
|
|
132
131
|
iconClass () {
|
|
133
|
-
return !this.
|
|
132
|
+
return !this.$qas.screen.isSmall && 'qas-transfer__icon'
|
|
134
133
|
},
|
|
135
134
|
|
|
136
135
|
searchBoxProps () {
|