@bildvitta/quasar-ui-asteroid 3.20.0-beta.21 → 3.20.0-beta.21-alpha.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 +35 -34
- package/src/components/app-bar/QasAppBar.vue +0 -1
- package/src/components/app-menu/QasAppMenu.vue +2 -5
- package/src/components/app-user/QasAppUser.vue +2 -3
- package/src/components/date/QasDate.vue +2 -2
- package/src/components/debugger/QasDebugger.vue +2 -3
- package/src/components/field/QasField.vue +0 -1
- package/src/components/filters/QasFilters.vue +2 -2
- package/src/components/form-generator/QasFormGenerator.vue +2 -3
- package/src/components/infinite-scroll/QasInfiniteScroll.vue +1 -2
- package/src/components/profile/QasProfile.vue +1 -2
- package/src/components/signature-pad/QasSignaturePad.vue +56 -27
- package/src/components/table-generator/QasTableGenerator.vue +2 -3
- package/src/components/tabs-generator/QasTabsGenerator.vue +2 -3
- package/src/components/transfer/QasTransfer.vue +0 -1
- package/src/css/mixins/set-error-message.scss +7 -2
- package/src/css/mixins/set-typography.scss +11 -4
- package/src/helpers/filters.js +5 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bildvitta/quasar-ui-asteroid",
|
|
3
3
|
"description": "Asteroid",
|
|
4
|
-
"version": "3.20.0-beta.21",
|
|
4
|
+
"version": "3.20.0-beta.21-alpha.0",
|
|
5
5
|
"author": "Bild & Vitta <systemteam@bild.com.br>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./src/asteroid.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"src"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "npx rollup -c
|
|
15
|
+
"build": "npx rollup -c"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public",
|
|
@@ -27,45 +27,46 @@
|
|
|
27
27
|
"components"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rollup/plugin-json": "
|
|
31
|
-
"@rollup/plugin-replace": "
|
|
32
|
-
"@rollup/plugin-
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"rollup
|
|
40
|
-
"rollup-plugin-
|
|
41
|
-
"rollup-plugin-
|
|
42
|
-
"
|
|
30
|
+
"@rollup/plugin-json": "6.1.0",
|
|
31
|
+
"@rollup/plugin-replace": "6.0.3",
|
|
32
|
+
"@rollup/plugin-terser": "1.0.0",
|
|
33
|
+
"@rollup/plugin-url": "8.0.2",
|
|
34
|
+
"@vue/compiler-sfc": "3.5.32",
|
|
35
|
+
"autoprefixer": "10.5.0",
|
|
36
|
+
"core-js": "3.49.0",
|
|
37
|
+
"postcss": "8.5.10",
|
|
38
|
+
"rimraf": "6.1.3",
|
|
39
|
+
"rollup": "4.60.1",
|
|
40
|
+
"rollup-plugin-local-resolve": "1.0.7",
|
|
41
|
+
"rollup-plugin-scss": "4.0.1",
|
|
42
|
+
"rollup-plugin-vue": "6.0.0",
|
|
43
|
+
"sass": "1.99.0"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@bildvitta/composables": "
|
|
46
|
-
"@bildvitta/store-adapter": "
|
|
46
|
+
"@bildvitta/composables": "1.0.0-beta.12",
|
|
47
|
+
"@bildvitta/store-adapter": "1.0.0",
|
|
47
48
|
"autonumeric": "4.10.9",
|
|
48
|
-
"axios": "1.
|
|
49
|
-
"date-fns": "
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"pica": "
|
|
57
|
-
"signature_pad": "
|
|
49
|
+
"axios": "1.15.0",
|
|
50
|
+
"date-fns": "4.1.0",
|
|
51
|
+
"debug": "4.4.3",
|
|
52
|
+
"fuse.js": "7.3.0",
|
|
53
|
+
"gleap": "15.2.8",
|
|
54
|
+
"humps": "2.0.1",
|
|
55
|
+
"lodash-es": "4.18.1",
|
|
56
|
+
"pdfjs-dist": "4.10.38",
|
|
57
|
+
"pica": "9.0.1",
|
|
58
|
+
"signature_pad": "5.1.3",
|
|
58
59
|
"sortablejs": "1.15.7"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
|
-
"@quasar/extras": "^1.16.0",
|
|
62
|
-
"vue-router": "^4.3.2",
|
|
63
62
|
"@fawmi/vue-google-maps": "0.9.79",
|
|
64
|
-
"
|
|
65
|
-
"chart.js": "
|
|
66
|
-
"chartjs-plugin-datalabels": "
|
|
67
|
-
"chartjs-plugin-zoom": "
|
|
68
|
-
"quasar": "
|
|
63
|
+
"@quasar/extras": "1.18.0",
|
|
64
|
+
"chart.js": "4.5.1",
|
|
65
|
+
"chartjs-plugin-datalabels": "2.2.0",
|
|
66
|
+
"chartjs-plugin-zoom": "2.2.0",
|
|
67
|
+
"quasar": "2.19.3",
|
|
68
|
+
"vue-chartjs": "5.3.3",
|
|
69
|
+
"vue-router": "5.0.4"
|
|
69
70
|
},
|
|
70
71
|
"browserslist": [
|
|
71
72
|
"defaults"
|
|
@@ -136,14 +136,12 @@ defineOptions({
|
|
|
136
136
|
const props = defineProps({
|
|
137
137
|
appUserProps: {
|
|
138
138
|
type: Object,
|
|
139
|
-
required: true,
|
|
140
139
|
default: () => ({})
|
|
141
140
|
},
|
|
142
141
|
|
|
143
142
|
brand: {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
type: String
|
|
143
|
+
type: String,
|
|
144
|
+
default: ''
|
|
147
145
|
},
|
|
148
146
|
|
|
149
147
|
homeRoute: {
|
|
@@ -158,7 +156,6 @@ const props = defineProps({
|
|
|
158
156
|
|
|
159
157
|
miniBrand: {
|
|
160
158
|
type: String,
|
|
161
|
-
required: true,
|
|
162
159
|
default: ''
|
|
163
160
|
},
|
|
164
161
|
|
|
@@ -276,9 +276,9 @@ function getNormalizedYear ({ isNext, isPrevious, month, year }) {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
function getNormalizedMonth ({ month, isPrevious, isNext }) {
|
|
279
|
-
if (isPrevious) return isJanuary(month) ?
|
|
279
|
+
if (isPrevious) return isJanuary(month) ? 12 : month - 1
|
|
280
280
|
|
|
281
|
-
if (isNext) return isDecember(month) ?
|
|
281
|
+
if (isNext) return isDecember(month) ? 1 : month + 1
|
|
282
282
|
|
|
283
283
|
return month
|
|
284
284
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<qas-search-input v-model="internalSearch" :placeholder="searchPlaceholder" :use-search-on-type="useSearchOnType" @clear="clearSearch" @filter="filter()" @update:model-value="onSearch">
|
|
8
8
|
<template v-if="showFilterActions" #after-clear>
|
|
9
9
|
<slot :context="mx_context" :filter="filter" :filters="activeFilters" name="filter-button" :remove-filter="removeFilter">
|
|
10
|
-
<pv-filters-actions ref="filtersActions" v-model:
|
|
10
|
+
<pv-filters-actions ref="filtersActions" v-model:filters-button="internalFilters" v-bind="filtersActionsProps" />
|
|
11
11
|
</slot>
|
|
12
12
|
</template>
|
|
13
13
|
</qas-search-input>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<div v-else-if="showFilterActions" class="col-12">
|
|
19
19
|
<slot :context="mx_context" :filter="filter" :filters="activeFilters" name="filter-button" :remove-filter="removeFilter">
|
|
20
|
-
<pv-filters-actions ref="filtersActions" v-model:
|
|
20
|
+
<pv-filters-actions ref="filtersActions" v-model:filters-button="internalFilters" v-bind="filtersActionsProps" />
|
|
21
21
|
</slot>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div ref="signatureContainer" class="qas-signature-pad relative-position">
|
|
3
|
-
<canvas
|
|
4
|
-
|
|
3
|
+
<canvas
|
|
4
|
+
:id="canvasId"
|
|
5
|
+
class="qas-signature-pad__canvas rounded-borders vertical-bottom"
|
|
6
|
+
:height="height"
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<qas-btn
|
|
10
|
+
v-if="!empty"
|
|
11
|
+
class="absolute-bottom-right q-mb-sm q-mr-sm"
|
|
12
|
+
icon="sym_r_delete"
|
|
13
|
+
variant="primary"
|
|
14
|
+
@click="clearSignature"
|
|
15
|
+
/>
|
|
5
16
|
</div>
|
|
6
17
|
|
|
7
18
|
<div>
|
|
8
|
-
<slot
|
|
19
|
+
<slot
|
|
20
|
+
:clear-signature="clearSignature"
|
|
21
|
+
:get-signature-data="getSignatureData"
|
|
22
|
+
/>
|
|
9
23
|
</div>
|
|
10
24
|
</template>
|
|
11
25
|
|
|
12
26
|
<script>
|
|
13
27
|
import QasBtn from '../btn/QasBtn.vue'
|
|
14
|
-
|
|
15
28
|
import { uid } from 'quasar'
|
|
16
29
|
import isEqual from 'lodash-es/isEqual'
|
|
17
30
|
import SignaturePad from 'signature_pad'
|
|
@@ -19,9 +32,7 @@ import SignaturePad from 'signature_pad'
|
|
|
19
32
|
export default {
|
|
20
33
|
name: 'QasSignaturePad',
|
|
21
34
|
|
|
22
|
-
components: {
|
|
23
|
-
QasBtn
|
|
24
|
-
},
|
|
35
|
+
components: { QasBtn },
|
|
25
36
|
|
|
26
37
|
props: {
|
|
27
38
|
empty: {
|
|
@@ -30,18 +41,18 @@ export default {
|
|
|
30
41
|
},
|
|
31
42
|
|
|
32
43
|
height: {
|
|
33
|
-
|
|
34
|
-
|
|
44
|
+
type: String,
|
|
45
|
+
default: '250'
|
|
35
46
|
},
|
|
36
47
|
|
|
37
48
|
signatureOptions: {
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
type: Object,
|
|
50
|
+
default: () => ({})
|
|
40
51
|
},
|
|
41
52
|
|
|
42
53
|
type: {
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'image/png'
|
|
45
56
|
}
|
|
46
57
|
},
|
|
47
58
|
|
|
@@ -52,9 +63,7 @@ export default {
|
|
|
52
63
|
data () {
|
|
53
64
|
return {
|
|
54
65
|
canvasId: uid(),
|
|
55
|
-
|
|
56
|
-
signaturePad: null,
|
|
57
|
-
SignaturePad: null
|
|
66
|
+
signaturePad: null
|
|
58
67
|
}
|
|
59
68
|
},
|
|
60
69
|
|
|
@@ -69,45 +78,65 @@ export default {
|
|
|
69
78
|
|
|
70
79
|
mounted () {
|
|
71
80
|
window.addEventListener('resize', this.setCanvasWidth)
|
|
72
|
-
this.setCanvasWidth()
|
|
73
81
|
|
|
82
|
+
this.setCanvasWidth()
|
|
74
83
|
this.setupSignaturePad()
|
|
75
84
|
},
|
|
76
85
|
|
|
77
86
|
unmounted () {
|
|
78
87
|
window.removeEventListener('resize', this.setCanvasWidth)
|
|
79
|
-
|
|
88
|
+
|
|
89
|
+
this.destroySignaturePad()
|
|
80
90
|
},
|
|
81
91
|
|
|
82
92
|
methods: {
|
|
93
|
+
destroySignaturePad () {
|
|
94
|
+
if (!this.signaturePad) return
|
|
95
|
+
|
|
96
|
+
this.signaturePad.off()
|
|
97
|
+
this.signaturePad.onEnd = null
|
|
98
|
+
this.signaturePad = null
|
|
99
|
+
},
|
|
100
|
+
|
|
83
101
|
clearSignature () {
|
|
102
|
+
if (!this.signaturePad) return
|
|
103
|
+
|
|
84
104
|
this.signaturePad.clear()
|
|
85
105
|
this.updateEmptyModel()
|
|
86
106
|
},
|
|
87
107
|
|
|
88
108
|
getSignatureData () {
|
|
109
|
+
if (!this.signaturePad) return ''
|
|
110
|
+
|
|
89
111
|
return this.signaturePad.toDataURL(this.type)
|
|
90
112
|
},
|
|
91
113
|
|
|
92
114
|
setCanvasWidth () {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
115
|
+
const container = this.$refs.signatureContainer
|
|
116
|
+
if (!container) return
|
|
117
|
+
|
|
118
|
+
const canvas = container.querySelector('canvas')
|
|
119
|
+
if (!canvas) return
|
|
120
|
+
|
|
121
|
+
canvas.width = container.offsetWidth
|
|
96
122
|
},
|
|
97
123
|
|
|
98
124
|
setupSignaturePad () {
|
|
99
|
-
const
|
|
100
|
-
|
|
125
|
+
const canvas = document.getElementById(this.canvasId)
|
|
126
|
+
if (!canvas) return
|
|
101
127
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
128
|
+
this.destroySignaturePad()
|
|
129
|
+
|
|
130
|
+
this.signaturePad = new SignaturePad(canvas, this.signatureOptions)
|
|
131
|
+
|
|
132
|
+
this.signaturePad.onEnd = this.updateEmptyModel
|
|
105
133
|
|
|
106
|
-
this.hasEndStrokeEvent = true
|
|
107
134
|
this.clearSignature()
|
|
108
135
|
},
|
|
109
136
|
|
|
110
137
|
updateEmptyModel () {
|
|
138
|
+
if (!this.signaturePad) return
|
|
139
|
+
|
|
111
140
|
this.$emit('update:empty', this.signaturePad.isEmpty())
|
|
112
141
|
}
|
|
113
142
|
}
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
@mixin set-error-message ($important: false) {
|
|
4
4
|
@include set-typography($caption, $important);
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
@if $important {
|
|
7
|
+
padding-top: var(--qas-spacing-sm) !important;
|
|
8
|
+
color: $negative !important;
|
|
9
|
+
} @else {
|
|
10
|
+
padding-top: var(--qas-spacing-sm);
|
|
11
|
+
color: $negative;
|
|
12
|
+
}
|
|
8
13
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
|
|
3
3
|
@mixin set-typography($name, $important: false) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
@if $important {
|
|
5
|
+
font-size: map.get($name, 'size') !important;
|
|
6
|
+
font-weight: map.get($name, 'weight') !important;
|
|
7
|
+
letter-spacing: map.get($name, 'letter-spacing') !important;
|
|
8
|
+
line-height: map.get($name, 'line-height') !important;
|
|
9
|
+
} @else {
|
|
10
|
+
font-size: map.get($name, 'size');
|
|
11
|
+
font-weight: map.get($name, 'weight');
|
|
12
|
+
letter-spacing: map.get($name, 'letter-spacing');
|
|
13
|
+
line-height: map.get($name, 'line-height');
|
|
14
|
+
}
|
|
8
15
|
}
|
package/src/helpers/filters.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { format, parseISO, isMatch } from 'date-fns'
|
|
1
|
+
import { format, parseISO, isMatch, isValid } from 'date-fns'
|
|
2
2
|
import { ptBR } from 'date-fns/locale'
|
|
3
3
|
|
|
4
4
|
// Private
|
|
5
5
|
function __format (value, token, options = {}) {
|
|
6
|
-
if (!value)
|
|
7
|
-
return ''
|
|
8
|
-
}
|
|
6
|
+
if (!value) return ''
|
|
9
7
|
|
|
10
8
|
value = value instanceof Date ? value : parseISO(value)
|
|
9
|
+
|
|
10
|
+
if (!isValid(value)) return ''
|
|
11
|
+
|
|
11
12
|
return format(value, token, { locale: ptBR, ...options })
|
|
12
13
|
}
|
|
13
14
|
|