@bildvitta/quasar-ui-asteroid 3.10.0-beta.0 → 3.10.0-beta.10
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 +21 -23
- package/src/components/date/QasDate.vue +302 -71
- package/src/components/date/QasDate.yml +6 -1
- package/src/components/date-time-input/QasDateTimeInput.vue +1 -1
- package/src/components/empty-result-text/QasEmptyResultText.vue +20 -0
- package/src/components/empty-result-text/QasEmptyResultText.yml +14 -0
- package/src/components/filters/QasFilters.vue +50 -21
- package/src/components/filters/QasFilters.yml +7 -0
- package/src/components/gallery/QasGallery.vue +0 -1
- package/src/components/grid-generator/QasGridGenerator.vue +35 -30
- package/src/components/list-view/QasListView.vue +1 -3
- package/src/components/nested-fields/QasNestedFields.vue +17 -6
- package/src/components/search-box/QasSearchBox.vue +6 -13
- package/src/components/search-box/QasSearchBox.yml +1 -6
- package/src/components/select/QasSelect.vue +71 -4
- package/src/components/select/QasSelect.yml +1 -1
- package/src/components/single-view/QasSingleView.vue +1 -4
- package/src/components/uploader/QasUploader.vue +9 -7
- package/src/css/variables/typography.scss +12 -12
- package/src/mixins/search-filter.js +41 -12
- package/src/shared/fuse-config.js +4 -0
- package/src/vue-plugin.js +3 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bildvitta/quasar-ui-asteroid",
|
|
3
3
|
"description": "Asteroid",
|
|
4
|
-
"version": "3.10.0-beta.
|
|
4
|
+
"version": "3.10.0-beta.10",
|
|
5
5
|
"author": "Bild & Vitta <systemteam@bild.com.br>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/asteroid.cjs.min.js",
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"src"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "npx rollup -c"
|
|
16
|
-
"dev": "cd dev && npm i && npm run dev && cd .."
|
|
15
|
+
"build": "npx rollup -c --bundleConfigAsCjs"
|
|
17
16
|
},
|
|
18
17
|
"publishConfig": {
|
|
19
18
|
"access": "public",
|
|
@@ -28,34 +27,33 @@
|
|
|
28
27
|
"components"
|
|
29
28
|
],
|
|
30
29
|
"devDependencies": {
|
|
31
|
-
"@rollup/plugin-json": "^
|
|
32
|
-
"@rollup/plugin-replace": "^
|
|
33
|
-
"@rollup/plugin-url": "^
|
|
34
|
-
"@vue/compiler-sfc": "^3.
|
|
35
|
-
"autoprefixer": "^10.4.
|
|
36
|
-
"core-js": "^3.
|
|
37
|
-
"postcss": "^8.4.
|
|
38
|
-
"quasar": "^2.
|
|
39
|
-
"rimraf": "^
|
|
40
|
-
"rollup": "^
|
|
30
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
31
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
32
|
+
"@rollup/plugin-url": "^8.0.1",
|
|
33
|
+
"@vue/compiler-sfc": "^3.3.4",
|
|
34
|
+
"autoprefixer": "^10.4.14",
|
|
35
|
+
"core-js": "^3.30.2",
|
|
36
|
+
"postcss": "^8.4.24",
|
|
37
|
+
"quasar": "^2.12.0",
|
|
38
|
+
"rimraf": "^5.0.1",
|
|
39
|
+
"rollup": "^3.23.1",
|
|
41
40
|
"rollup-plugin-local-resolve": "^1.0.7",
|
|
42
|
-
"rollup-plugin-scss": "^
|
|
43
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
41
|
+
"rollup-plugin-scss": "^4.0.0",
|
|
44
42
|
"rollup-plugin-vue": "^6.0.0",
|
|
45
|
-
"sass": "^1.
|
|
43
|
+
"sass": "^1.62.1"
|
|
46
44
|
},
|
|
47
45
|
"dependencies": {
|
|
48
46
|
"@bildvitta/store-adapter": "^1.0.0",
|
|
49
|
-
"@fawmi/vue-google-maps": "^0.9.
|
|
50
|
-
"autonumeric": "^4.
|
|
51
|
-
"axios": "^
|
|
52
|
-
"date-fns": "^2.
|
|
53
|
-
"fuse.js": "^6.
|
|
47
|
+
"@fawmi/vue-google-maps": "^0.9.79",
|
|
48
|
+
"autonumeric": "^4.9.0",
|
|
49
|
+
"axios": "^1.4.0",
|
|
50
|
+
"date-fns": "^2.30.0",
|
|
51
|
+
"fuse.js": "^6.6.2",
|
|
54
52
|
"humps": "^2.0.1",
|
|
55
53
|
"lodash-es": "^4.17.21",
|
|
56
54
|
"pica": "^9.0.1",
|
|
57
|
-
"signature_pad": "^4.
|
|
58
|
-
"sortablejs": "^1.
|
|
55
|
+
"signature_pad": "^4.1.5",
|
|
56
|
+
"sortablejs": "^1.15.0"
|
|
59
57
|
},
|
|
60
58
|
"browserslist": [
|
|
61
59
|
"defaults"
|
|
@@ -27,6 +27,11 @@ export default {
|
|
|
27
27
|
default: () => []
|
|
28
28
|
},
|
|
29
29
|
|
|
30
|
+
eventColor: {
|
|
31
|
+
type: [String, Function],
|
|
32
|
+
default: ''
|
|
33
|
+
},
|
|
34
|
+
|
|
30
35
|
mask: {
|
|
31
36
|
type: String,
|
|
32
37
|
default: MaskOptions.Dash,
|
|
@@ -79,7 +84,9 @@ export default {
|
|
|
79
84
|
|
|
80
85
|
data () {
|
|
81
86
|
return {
|
|
82
|
-
currentDate: {}
|
|
87
|
+
currentDate: {},
|
|
88
|
+
dateElement: null,
|
|
89
|
+
dateObserver: undefined
|
|
83
90
|
}
|
|
84
91
|
},
|
|
85
92
|
|
|
@@ -95,7 +102,6 @@ export default {
|
|
|
95
102
|
return {
|
|
96
103
|
class: this.classes,
|
|
97
104
|
color: 'primary',
|
|
98
|
-
events: this.normalizedEvents,
|
|
99
105
|
mask: this.mask,
|
|
100
106
|
minimal: true,
|
|
101
107
|
multiple: this.multiple,
|
|
@@ -103,7 +109,6 @@ export default {
|
|
|
103
109
|
ref: 'date',
|
|
104
110
|
style: this.styles,
|
|
105
111
|
textColor: 'white',
|
|
106
|
-
eventColor: this.getEventColor,
|
|
107
112
|
|
|
108
113
|
// events
|
|
109
114
|
onNavigation: this.onNavigation,
|
|
@@ -116,14 +121,18 @@ export default {
|
|
|
116
121
|
return ['qas-date', 'shadow-2', { 'qas-date--inative': this.useInactiveDates }]
|
|
117
122
|
},
|
|
118
123
|
|
|
119
|
-
hasEvents () {
|
|
120
|
-
return !!Object.keys(this.events)?.length
|
|
121
|
-
},
|
|
122
|
-
|
|
123
124
|
hasModelValue () {
|
|
124
125
|
return this.multiple ? !!this.modelValue.length : !!this.modelValue
|
|
125
126
|
},
|
|
126
127
|
|
|
128
|
+
isEventsCallback () {
|
|
129
|
+
return typeof this.events === 'function'
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
isEventColorCallback () {
|
|
133
|
+
return typeof this.eventColor === 'function'
|
|
134
|
+
},
|
|
135
|
+
|
|
127
136
|
model: {
|
|
128
137
|
get () {
|
|
129
138
|
return this.modelValue
|
|
@@ -140,10 +149,6 @@ export default {
|
|
|
140
149
|
}
|
|
141
150
|
},
|
|
142
151
|
|
|
143
|
-
normalizedEvents () {
|
|
144
|
-
return this.useUnmaskEvents ? this.getUnmaskedList(this.events) : this.events
|
|
145
|
-
},
|
|
146
|
-
|
|
147
152
|
normalizedOptions () {
|
|
148
153
|
return this.useUnmaskOptions ? this.getUnmaskedList(this.options) : this.options
|
|
149
154
|
}
|
|
@@ -151,20 +156,70 @@ export default {
|
|
|
151
156
|
|
|
152
157
|
watch: {
|
|
153
158
|
events () {
|
|
154
|
-
|
|
159
|
+
this.setEvents(this.currentDate)
|
|
155
160
|
}
|
|
156
161
|
},
|
|
157
162
|
|
|
158
163
|
mounted () {
|
|
164
|
+
this.dateElement = this.$refs.date.$el
|
|
165
|
+
|
|
166
|
+
// muda estilo da navegação
|
|
159
167
|
this.setNewNavigatorDisplay()
|
|
160
168
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
169
|
+
// observa as mudanças no DOM do QDate > .q-date__content
|
|
170
|
+
this.setObserveDate()
|
|
171
|
+
|
|
172
|
+
// seta data atual de acordo com a view do mês atual
|
|
173
|
+
this.setCurrentDate()
|
|
174
|
+
|
|
175
|
+
// seta os eventos, ativos e inativos
|
|
176
|
+
this.setEvents(this.currentDate)
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
unmounted () {
|
|
180
|
+
this.dateObserver.disconnect()
|
|
165
181
|
},
|
|
166
182
|
|
|
167
183
|
methods: {
|
|
184
|
+
createActiveEventElement (dayElement, eventElement) {
|
|
185
|
+
const buttonElement = dayElement.querySelector('.q-btn__content')
|
|
186
|
+
|
|
187
|
+
buttonElement?.appendChild?.(eventElement)
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
createCounterInactiveEventElement (dayElement, eventElement) {
|
|
191
|
+
const spanElement = document.createElement('span')
|
|
192
|
+
const [child] = dayElement.children
|
|
193
|
+
|
|
194
|
+
spanElement.setAttribute('data-event', true)
|
|
195
|
+
dayElement.setAttribute('data-has-inactive-event', true)
|
|
196
|
+
|
|
197
|
+
spanElement.classList.add('flex', 'items-center', 'justify-center', 'text-center')
|
|
198
|
+
|
|
199
|
+
child.setAttribute('data-day-content', child.textContent)
|
|
200
|
+
|
|
201
|
+
spanElement.appendChild(child)
|
|
202
|
+
spanElement.appendChild(eventElement)
|
|
203
|
+
dayElement.appendChild(spanElement)
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
createPointerEventElement (isInactive, currentColor, eventElement) {
|
|
207
|
+
const eventPointerElement = document.createElement('div')
|
|
208
|
+
|
|
209
|
+
eventPointerElement.classList.add(
|
|
210
|
+
'qas-date__event-pointer',
|
|
211
|
+
`bg-${isInactive ? 'grey-4' : currentColor || 'primary'}`
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
eventElement.appendChild(eventPointerElement)
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
getCurrentColor (date, color) {
|
|
218
|
+
return (
|
|
219
|
+
(this.isEventColorCallback ? this.eventColor(date) : this.eventColor) || color
|
|
220
|
+
)
|
|
221
|
+
},
|
|
222
|
+
|
|
168
223
|
getCurrentDate () {
|
|
169
224
|
const modelDate = this.multiple ? this.modelValue[0] : this.modelValue
|
|
170
225
|
const extractedDate = this.hasModelValue ? date.extractDate(modelDate, this.mask) : new Date()
|
|
@@ -172,6 +227,10 @@ export default {
|
|
|
172
227
|
return this.getDate(extractedDate)
|
|
173
228
|
},
|
|
174
229
|
|
|
230
|
+
getCurrentEvent (date) {
|
|
231
|
+
return this.events.find(event => event.date === date)
|
|
232
|
+
},
|
|
233
|
+
|
|
175
234
|
getDate (date) {
|
|
176
235
|
return {
|
|
177
236
|
year: date.getFullYear(),
|
|
@@ -193,6 +252,18 @@ export default {
|
|
|
193
252
|
return extractedModel.includes(currentDate) ? 'white' : 'primary'
|
|
194
253
|
},
|
|
195
254
|
|
|
255
|
+
getEventClasses (currentColor, hasCounter, isInactive) {
|
|
256
|
+
return [
|
|
257
|
+
'qas-date__event',
|
|
258
|
+
|
|
259
|
+
isInactive ? 'qas-date__event--inactive' : 'qas-date__event--active',
|
|
260
|
+
|
|
261
|
+
`text-${currentColor || (isInactive ? 'grey-4' : 'primary')}`,
|
|
262
|
+
|
|
263
|
+
hasCounter ? 'qas-date__event--counter' : 'qas-date__event--pointer'
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
|
|
196
267
|
getISODate (value) {
|
|
197
268
|
if (!value || (this.multiple && !value.length)) return value
|
|
198
269
|
|
|
@@ -206,53 +277,145 @@ export default {
|
|
|
206
277
|
|
|
207
278
|
return invalidTypes.includes(typeof list)
|
|
208
279
|
? list
|
|
209
|
-
: list.map(
|
|
280
|
+
: list.map(item => asteroidDate(item, 'yyyy/MM/dd'))
|
|
210
281
|
},
|
|
211
282
|
|
|
212
|
-
|
|
213
|
-
|
|
283
|
+
getStatusDay ({ currentDay, index }) {
|
|
284
|
+
const status = {
|
|
285
|
+
isPrevious: false,
|
|
286
|
+
isNext: false,
|
|
287
|
+
isActiveMonthDay: false
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (currentDay > index) {
|
|
291
|
+
status.isPrevious = true
|
|
292
|
+
|
|
293
|
+
return status
|
|
294
|
+
}
|
|
214
295
|
|
|
215
|
-
|
|
296
|
+
if (index - 7 > currentDay) {
|
|
297
|
+
status.isNext = true
|
|
216
298
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
299
|
+
return status
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
status.isActiveMonthDay = true
|
|
303
|
+
|
|
304
|
+
return status
|
|
305
|
+
},
|
|
220
306
|
|
|
221
|
-
|
|
307
|
+
getNormalizedYear ({ isNext, isPrevious, month, year }) {
|
|
308
|
+
if (isPrevious && month === 1) return year - 1
|
|
222
309
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
310
|
+
if (isNext && month === 12) return year + 1
|
|
311
|
+
|
|
312
|
+
return year
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
getNormalizedMonth ({ month, isPrevious, isNext }) {
|
|
316
|
+
if (isPrevious) return month === 1 ? (month = 12) : month - 1
|
|
317
|
+
|
|
318
|
+
if (isNext) return month === 12 ? (month = 1) : month + 1
|
|
319
|
+
|
|
320
|
+
return month
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
resetInactiveEvents () {
|
|
324
|
+
const inactiveElementsToRemove = this.dateElement.querySelectorAll('[data-has-inactive-event]')
|
|
325
|
+
|
|
326
|
+
inactiveElementsToRemove.forEach(inactiveElement => {
|
|
327
|
+
const [element] = inactiveElement.children
|
|
328
|
+
|
|
329
|
+
const hasDayContent = element.querySelector('[data-day-content]')
|
|
330
|
+
|
|
331
|
+
if (hasDayContent) inactiveElement.append(hasDayContent)
|
|
332
|
+
})
|
|
333
|
+
},
|
|
334
|
+
|
|
335
|
+
resetEvents () {
|
|
336
|
+
if (this.useInactiveDates) this.resetInactiveEvents()
|
|
337
|
+
|
|
338
|
+
this.resetActiveEvents()
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
resetActiveEvents () {
|
|
342
|
+
const elementsToRemove = this.dateElement.querySelectorAll('[data-event]')
|
|
343
|
+
|
|
344
|
+
elementsToRemove.forEach(nodeElement => nodeElement.remove())
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
setCurrentDate (date) {
|
|
348
|
+
this.currentDate = date || this.getCurrentDate()
|
|
349
|
+
},
|
|
350
|
+
|
|
351
|
+
setEventClasses (currentColor, eventElement, hasCounter, isInactive) {
|
|
352
|
+
const classes = this.getEventClasses(currentColor, hasCounter, isInactive)
|
|
353
|
+
|
|
354
|
+
eventElement.classList.add(...classes)
|
|
355
|
+
},
|
|
356
|
+
|
|
357
|
+
setEvents ({ year, month }) {
|
|
358
|
+
this.resetEvents()
|
|
359
|
+
|
|
360
|
+
if (!this.events.length || !year || !month) return
|
|
361
|
+
|
|
362
|
+
const daysElement = this.dateElement.querySelectorAll('.q-date__calendar-days .q-date__calendar-item')
|
|
363
|
+
const daysElementList = Array.from(daysElement)
|
|
364
|
+
|
|
365
|
+
daysElementList.forEach((dayElement, index) => {
|
|
366
|
+
const [child] = dayElement.children
|
|
367
|
+
|
|
368
|
+
const day = child.textContent
|
|
369
|
+
|
|
370
|
+
const { isActiveMonthDay, isNext, isPrevious } = this.getStatusDay({ currentDay: day, index: index + 1 })
|
|
371
|
+
|
|
372
|
+
const normalizedYear = this.getNormalizedYear({ isNext, month, isPrevious, year })
|
|
373
|
+
const normalizedMonth = this.getNormalizedMonth({ isNext, isPrevious, month })
|
|
374
|
+
const newDate = date.buildDate({ year: normalizedYear, month: normalizedMonth, day })
|
|
375
|
+
const normalizedDate = asteroidDate(newDate, 'yyyy-MM-dd')
|
|
376
|
+
|
|
377
|
+
const currentEvent = this.isEventsCallback ? this.events(normalizedDate) : this.getCurrentEvent(normalizedDate)
|
|
378
|
+
|
|
379
|
+
const hasDisabledClass = dayElement.classList.contains('q-date__calendar-item--out')
|
|
380
|
+
const isInactive = !isActiveMonthDay || hasDisabledClass
|
|
227
381
|
|
|
228
382
|
/*
|
|
229
|
-
* Se
|
|
230
|
-
*
|
|
231
|
-
*
|
|
383
|
+
* Se não tiver evento para o dia atual no loop ou
|
|
384
|
+
* a opção de eventos inativos estiver desabilitada e o dia atual do loop
|
|
385
|
+
* for referente ao mês anterior ou ao mês posterior, então retorna
|
|
232
386
|
*/
|
|
233
|
-
if (
|
|
234
|
-
|
|
235
|
-
|
|
387
|
+
if (!currentEvent || (!this.useInactiveDates && !isActiveMonthDay)) return
|
|
388
|
+
|
|
389
|
+
const hasCounter = currentEvent.counter
|
|
390
|
+
|
|
391
|
+
const currentColor = this.getCurrentColor(normalizedDate, currentEvent?.color)
|
|
236
392
|
|
|
237
|
-
const
|
|
238
|
-
const newDate = date.buildDate({ year, month: normalizedMonth, day: inactiveDay })
|
|
239
|
-
const normalizedDate = asteroidDate(newDate, 'yyyy/MM/dd')
|
|
393
|
+
const eventElement = document.createElement('div')
|
|
240
394
|
|
|
241
|
-
|
|
242
|
-
|
|
395
|
+
eventElement.setAttribute('data-event', true)
|
|
396
|
+
|
|
397
|
+
dayElement.classList.add('qas-date__calendar-item-event')
|
|
398
|
+
|
|
399
|
+
this.setEventClasses(currentColor, eventElement, hasCounter, isInactive)
|
|
400
|
+
|
|
401
|
+
if (hasCounter) {
|
|
402
|
+
this.setTextCountEvent(eventElement, currentEvent)
|
|
403
|
+
} else {
|
|
404
|
+
this.createPointerEventElement(isInactive, currentColor, eventElement)
|
|
405
|
+
}
|
|
243
406
|
|
|
244
|
-
if (
|
|
245
|
-
|
|
246
|
-
divElement.classList.add('q-date__event', 'qas-date__event-inactive')
|
|
407
|
+
if (isInactive) {
|
|
408
|
+
this.createCounterInactiveEventElement(dayElement, eventElement)
|
|
247
409
|
|
|
248
|
-
|
|
410
|
+
return
|
|
249
411
|
}
|
|
412
|
+
|
|
413
|
+
this.createActiveEventElement(dayElement, eventElement)
|
|
250
414
|
})
|
|
251
415
|
},
|
|
252
416
|
|
|
253
417
|
setNewNavigatorDisplay () {
|
|
254
|
-
const
|
|
255
|
-
const navigationElement = dateElement.querySelector('.q-date__navigation')
|
|
418
|
+
const navigationElement = this.dateElement.querySelector('.q-date__navigation')
|
|
256
419
|
const navigationChildren = navigationElement?.children || []
|
|
257
420
|
|
|
258
421
|
const nodesList = Array.from(navigationChildren)
|
|
@@ -275,27 +438,40 @@ export default {
|
|
|
275
438
|
this.$nextTick(() => secondList.forEach(node => newSecondElement.appendChild(node)))
|
|
276
439
|
},
|
|
277
440
|
|
|
278
|
-
|
|
279
|
-
this
|
|
441
|
+
setObserveDate () {
|
|
442
|
+
const element = this.dateElement.querySelector('.q-date__content')
|
|
443
|
+
const config = { childList: true, subtree: true }
|
|
280
444
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
* do componente QDate para assegurar que esta logica não quebre.
|
|
285
|
-
*/
|
|
286
|
-
if (this.useInactiveDates) setTimeout(() => { this.setInactiveEvents(date) }, 350)
|
|
445
|
+
const callback = mutationList => {
|
|
446
|
+
mutationList.forEach(({ removedNodes, target }) => {
|
|
447
|
+
const [removedNode] = removedNodes
|
|
287
448
|
|
|
288
|
-
|
|
289
|
-
},
|
|
449
|
+
if (!removedNode) return
|
|
290
450
|
|
|
291
|
-
|
|
292
|
-
|
|
451
|
+
const hasCalendarDaysContainer = target.classList.contains('q-date__calendar-days-container')
|
|
452
|
+
const hasContent = target.classList.contains('q-date__content')
|
|
453
|
+
const hasMonths = removedNode.classList.contains('q-date__months')
|
|
293
454
|
|
|
294
|
-
|
|
295
|
-
|
|
455
|
+
if (hasCalendarDaysContainer || (hasContent && hasMonths)) {
|
|
456
|
+
this.setEvents(this.currentDate)
|
|
457
|
+
}
|
|
458
|
+
})
|
|
296
459
|
}
|
|
297
460
|
|
|
298
|
-
|
|
461
|
+
this.dateObserver = new MutationObserver(callback)
|
|
462
|
+
this.dateObserver.observe(element, config)
|
|
463
|
+
},
|
|
464
|
+
|
|
465
|
+
setTextCountEvent (eventElement, currentEvent) {
|
|
466
|
+
eventElement.innerText = `(${currentEvent.counter})`
|
|
467
|
+
},
|
|
468
|
+
|
|
469
|
+
async onNavigation (date) {
|
|
470
|
+
this.$emit('navigation', date)
|
|
471
|
+
|
|
472
|
+
this.setCurrentDate(date)
|
|
473
|
+
|
|
474
|
+
this.$nextTick(() => this.setNewNavigatorDisplay())
|
|
299
475
|
}
|
|
300
476
|
}
|
|
301
477
|
}
|
|
@@ -307,18 +483,67 @@ export default {
|
|
|
307
483
|
min-width: 100%;
|
|
308
484
|
width: 100%;
|
|
309
485
|
|
|
310
|
-
&__event
|
|
311
|
-
|
|
312
|
-
|
|
486
|
+
&__event {
|
|
487
|
+
@include set-typography($caption);
|
|
488
|
+
|
|
489
|
+
bottom: -6px;
|
|
490
|
+
color: $primary;
|
|
491
|
+
font-size: 10px !important;
|
|
492
|
+
height: 20px;
|
|
493
|
+
left: 50%;
|
|
494
|
+
position: absolute;
|
|
495
|
+
transform: translateX(-50%);
|
|
496
|
+
width: 100%;
|
|
497
|
+
|
|
498
|
+
&--pointer {
|
|
499
|
+
bottom: -6px;
|
|
500
|
+
display: flex;
|
|
501
|
+
justify-content: center;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
&__event-pointer {
|
|
506
|
+
border-radius: 100%;
|
|
507
|
+
display: flex;
|
|
508
|
+
height: 6px;
|
|
509
|
+
justify-content: center;
|
|
510
|
+
margin-top: var(--qas-spacing-xs);
|
|
511
|
+
width: 6px;
|
|
313
512
|
}
|
|
314
513
|
|
|
315
514
|
&--inative {
|
|
316
515
|
.q-date {
|
|
516
|
+
&__calendar-item--out,
|
|
317
517
|
&__calendar-item--fill {
|
|
318
518
|
@include set-typography($subtitle2);
|
|
319
519
|
|
|
320
520
|
color: $grey-4;
|
|
321
521
|
visibility: unset;
|
|
522
|
+
|
|
523
|
+
span {
|
|
524
|
+
height: 36px;
|
|
525
|
+
padding: var(--qas-spacing-xs);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.qas-date__event--inactive.qas-date__event--counter {
|
|
531
|
+
color: $grey-4 !important;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
&__calendar-item-event {
|
|
536
|
+
.q-btn {
|
|
537
|
+
&.bg-primary span {
|
|
538
|
+
padding-bottom: 4px;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
&.bg-primary .qas-date__event {
|
|
542
|
+
bottom: -2px;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
&.bg-primary .qas-date__event--pointer {
|
|
546
|
+
bottom: -2px;
|
|
322
547
|
}
|
|
323
548
|
}
|
|
324
549
|
}
|
|
@@ -358,12 +583,6 @@ export default {
|
|
|
358
583
|
opacity: 1;
|
|
359
584
|
}
|
|
360
585
|
|
|
361
|
-
&__event {
|
|
362
|
-
bottom: -1;
|
|
363
|
-
height: 6px;
|
|
364
|
-
width: 6px;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
586
|
&__months,
|
|
368
587
|
&__years {
|
|
369
588
|
.q-btn {
|
|
@@ -387,9 +606,9 @@ export default {
|
|
|
387
606
|
|
|
388
607
|
.q-btn {
|
|
389
608
|
border: 0;
|
|
609
|
+
border-radius: $generic-border-radius;
|
|
390
610
|
box-shadow: none;
|
|
391
|
-
|
|
392
|
-
height: 30px !important;
|
|
611
|
+
height: 36px !important;
|
|
393
612
|
min-height: 30px;
|
|
394
613
|
min-width: 30px;
|
|
395
614
|
transition: color var(--qas-generic-transition);
|
|
@@ -400,6 +619,14 @@ export default {
|
|
|
400
619
|
display: none !important;
|
|
401
620
|
}
|
|
402
621
|
|
|
622
|
+
&.bg-primary .qas-date__event--active {
|
|
623
|
+
color: white !important;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
&.bg-primary .qas-date__event--active .qas-date__event-pointer {
|
|
627
|
+
background-color: white !important;
|
|
628
|
+
}
|
|
629
|
+
|
|
403
630
|
&:hover {
|
|
404
631
|
color: var(--q-primary-contrast);
|
|
405
632
|
}
|
|
@@ -407,6 +634,10 @@ export default {
|
|
|
407
634
|
@include set-typography($subtitle2);
|
|
408
635
|
}
|
|
409
636
|
}
|
|
637
|
+
|
|
638
|
+
&__today {
|
|
639
|
+
color: $primary;
|
|
640
|
+
}
|
|
410
641
|
}
|
|
411
642
|
}
|
|
412
643
|
</style>
|
|
@@ -5,10 +5,15 @@ meta:
|
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
7
|
events:
|
|
8
|
-
desc: Marcador de eventos do calendário
|
|
8
|
+
desc: Marcador de eventos do calendário.
|
|
9
9
|
default: []
|
|
10
10
|
type: [Array, Function]
|
|
11
11
|
|
|
12
|
+
event-color:
|
|
13
|
+
desc: Define a cor dos eventos.
|
|
14
|
+
default: ''
|
|
15
|
+
type: [String, Function]
|
|
16
|
+
|
|
12
17
|
mask:
|
|
13
18
|
desc: Máscara do model (repassada para o quasar).
|
|
14
19
|
default: YYYY-MM-DD
|
|
@@ -233,7 +233,7 @@ export default {
|
|
|
233
233
|
if (this.useDateOnly) return this.validateDateOnly(value)
|
|
234
234
|
if (this.useTimeOnly) return this.validateTimeOnly(value)
|
|
235
235
|
|
|
236
|
-
const [date, time] = value?.split(' ')
|
|
236
|
+
const [date, time] = value?.split(' ') || []
|
|
237
237
|
|
|
238
238
|
return this.validateDateOnly(date) || this.validateTimeOnly(time)
|
|
239
239
|
},
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="text-body1 text-grey-8">
|
|
3
|
+
<slot>
|
|
4
|
+
{{ text }}
|
|
5
|
+
</slot>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'QasEmptyResultText',
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
text: {
|
|
15
|
+
default: 'Não há itens para serem exibidos.',
|
|
16
|
+
type: String
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Componente de texto em casos de resultados vazio após filtros.
|
|
5
|
+
|
|
6
|
+
props:
|
|
7
|
+
text:
|
|
8
|
+
desc: Texto a ser exibido.
|
|
9
|
+
default: Não há itens para serem exibidos.
|
|
10
|
+
type: String
|
|
11
|
+
|
|
12
|
+
slots:
|
|
13
|
+
default:
|
|
14
|
+
desc: Slot que substitui a propriedade "text".
|