buefy 0.8.1 → 0.8.2
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/CHANGELOG.md +10 -0
- package/dist/buefy.css +40 -1
- package/dist/buefy.js +131 -40
- package/dist/buefy.min.css +1 -1
- package/dist/buefy.min.js +2 -1
- package/dist/cjs/datepicker.js +126 -23
- package/dist/cjs/slider.js +3 -15
- package/dist/components/autocomplete/index.js +2 -2
- package/dist/components/autocomplete/index.min.js +2 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/index.min.js +2 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/checkbox/index.min.js +2 -1
- package/dist/components/clockpicker/index.js +2 -2
- package/dist/components/clockpicker/index.min.js +2 -1
- package/dist/components/collapse/index.js +2 -2
- package/dist/components/collapse/index.min.js +2 -1
- package/dist/components/datepicker/index.js +128 -25
- package/dist/components/datepicker/index.min.js +2 -1
- package/dist/components/dialog/index.js +2 -2
- package/dist/components/dialog/index.min.js +2 -1
- package/dist/components/dropdown/index.js +2 -2
- package/dist/components/dropdown/index.min.js +2 -1
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/index.min.js +2 -1
- package/dist/components/icon/index.js +2 -2
- package/dist/components/icon/index.min.js +2 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/index.min.js +2 -1
- package/dist/components/loading/index.js +2 -2
- package/dist/components/loading/index.min.js +2 -1
- package/dist/components/menu/index.js +2 -2
- package/dist/components/menu/index.min.js +2 -1
- package/dist/components/message/index.js +2 -2
- package/dist/components/message/index.min.js +2 -1
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/index.min.js +2 -1
- package/dist/components/navbar/index.js +2 -2
- package/dist/components/navbar/index.min.js +2 -1
- package/dist/components/notification/index.js +2 -2
- package/dist/components/notification/index.min.js +2 -1
- package/dist/components/numberinput/index.js +2 -2
- package/dist/components/numberinput/index.min.js +2 -1
- package/dist/components/pagination/index.js +2 -2
- package/dist/components/pagination/index.min.js +2 -1
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/index.min.js +2 -1
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/index.min.js +2 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.min.js +2 -1
- package/dist/components/slider/index.js +5 -17
- package/dist/components/slider/index.min.js +2 -1
- package/dist/components/snackbar/index.js +2 -2
- package/dist/components/snackbar/index.min.js +2 -1
- package/dist/components/steps/index.js +2 -2
- package/dist/components/steps/index.min.js +2 -1
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/index.min.js +2 -1
- package/dist/components/table/index.js +2 -2
- package/dist/components/table/index.min.js +2 -1
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tabs/index.min.js +2 -1
- package/dist/components/tag/index.js +2 -2
- package/dist/components/tag/index.min.js +2 -1
- package/dist/components/taginput/index.js +2 -2
- package/dist/components/taginput/index.min.js +2 -1
- package/dist/components/timepicker/index.js +2 -2
- package/dist/components/timepicker/index.min.js +2 -1
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/index.min.js +2 -1
- package/dist/components/tooltip/index.js +2 -2
- package/dist/components/tooltip/index.min.js +2 -1
- package/dist/components/upload/index.js +2 -2
- package/dist/components/upload/index.min.js +2 -1
- package/dist/esm/datepicker.js +126 -23
- package/dist/esm/slider.js +3 -15
- package/package.json +5 -2
- package/src/components/datepicker/Datepicker.spec.js +60 -0
- package/src/components/datepicker/Datepicker.vue +29 -15
- package/src/components/datepicker/DatepickerTable.spec.js +89 -1
- package/src/components/datepicker/DatepickerTable.vue +60 -3
- package/src/components/datepicker/DatepickerTableRow.spec.js +127 -17
- package/src/components/datepicker/DatepickerTableRow.vue +46 -3
- package/src/components/slider/Slider.vue +3 -14
- package/src/scss/components/_datepicker.scss +37 -1
package/dist/cjs/datepicker.js
CHANGED
|
@@ -50,10 +50,14 @@ var __chunk_13 = require('./chunk-1b1231ce.js');
|
|
|
50
50
|
//
|
|
51
51
|
//
|
|
52
52
|
//
|
|
53
|
+
//
|
|
53
54
|
var script = {
|
|
54
55
|
name: 'BDatepickerTableRow',
|
|
55
56
|
props: {
|
|
56
|
-
selectedDate:
|
|
57
|
+
selectedDate: {
|
|
58
|
+
type: [Date, Array]
|
|
59
|
+
},
|
|
60
|
+
hoveredDateRange: Array,
|
|
57
61
|
week: {
|
|
58
62
|
type: Array,
|
|
59
63
|
required: true
|
|
@@ -220,17 +224,45 @@ var script = {
|
|
|
220
224
|
return false;
|
|
221
225
|
}
|
|
222
226
|
|
|
227
|
+
if (Array.isArray(dateTwo)) {
|
|
228
|
+
return dateTwo.some(function (date) {
|
|
229
|
+
return dateOne.getDate() === date.getDate() && dateOne.getFullYear() === date.getFullYear() && dateOne.getMonth() === date.getMonth();
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
223
233
|
return dateOne.getDate() === dateTwo.getDate() && dateOne.getFullYear() === dateTwo.getFullYear() && dateOne.getMonth() === dateTwo.getMonth();
|
|
224
234
|
}
|
|
225
235
|
|
|
236
|
+
function dateWithin(dateOne, dates) {
|
|
237
|
+
if (!Array.isArray(dates)) {
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return dateOne > dates[0] && dateOne < dates[1];
|
|
242
|
+
}
|
|
243
|
+
|
|
226
244
|
return {
|
|
227
|
-
'is-selected': dateMatch(day, this.selectedDate),
|
|
245
|
+
'is-selected': dateMatch(day, this.selectedDate) || dateWithin(day, this.selectedDate),
|
|
246
|
+
'is-first-selected': dateMatch(day, Array.isArray(this.selectedDate) && this.selectedDate[0]),
|
|
247
|
+
'is-within-selected': dateWithin(day, this.selectedDate),
|
|
248
|
+
'is-last-selected': dateMatch(day, Array.isArray(this.selectedDate) && this.selectedDate[1]),
|
|
249
|
+
'is-within-hovered-range': this.hoveredDateRange && this.hoveredDateRange.length === 2 && (dateMatch(day, this.hoveredDateRange) || dateWithin(day, this.hoveredDateRange)),
|
|
250
|
+
'is-first-hovered': dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[0]),
|
|
251
|
+
'is-within-hovered': dateWithin(day, this.hoveredDateRange),
|
|
252
|
+
'is-last-hovered': dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[1]),
|
|
228
253
|
'is-today': dateMatch(day, this.dateCreator()),
|
|
229
254
|
'is-selectable': this.selectableDate(day) && !this.disabled,
|
|
230
255
|
'is-unselectable': !this.selectableDate(day) || this.disabled,
|
|
231
256
|
'is-invisible': !this.nearbyMonthDays && day.getMonth() !== this.month,
|
|
232
257
|
'is-nearby': this.nearbySelectableMonthDays && day.getMonth() !== this.month
|
|
233
258
|
};
|
|
259
|
+
},
|
|
260
|
+
setRangeHoverEndDate: function setRangeHoverEndDate(day) {
|
|
261
|
+
var isRangeInput = Array.isArray(this.selectedDate);
|
|
262
|
+
|
|
263
|
+
if (isRangeInput) {
|
|
264
|
+
this.$emit('rangeHoverEndDate', day);
|
|
265
|
+
}
|
|
234
266
|
}
|
|
235
267
|
}
|
|
236
268
|
};
|
|
@@ -239,7 +271,7 @@ var script = {
|
|
|
239
271
|
const __vue_script__ = script;
|
|
240
272
|
|
|
241
273
|
/* template */
|
|
242
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker-row"},[(_vm.showWeekNumber)?_c('a',{staticClass:"datepicker-cell is-week-number"},[_vm._v("\n "+_vm._s(_vm.getWeekNumber(_vm.week[6]))+"\n ")]):_vm._e(),_vm._v(" "),_vm._l((_vm.week),function(day,index){return [(_vm.selectableDate(day) && !_vm.disabled)?_c('a',{key:index,staticClass:"datepicker-cell",class:[_vm.classObject(day), {'has-event': _vm.eventsDateMatch(day)}, _vm.indicators],attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.emitChosenDate(day);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);}]}},[_vm._v("\n "+_vm._s(day.getDate())+"\n "),(_vm.eventsDateMatch(day))?_c('div',{staticClass:"events"},_vm._l((_vm.eventsDateMatch(day)),function(event,index){return _c('div',{key:index,staticClass:"event",class:event.type})})):_vm._e()]):_c('div',{key:index,staticClass:"datepicker-cell",class:_vm.classObject(day)},[_vm._v("\n "+_vm._s(day.getDate())+"\n ")])]})],2)};
|
|
274
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker-row"},[(_vm.showWeekNumber)?_c('a',{staticClass:"datepicker-cell is-week-number"},[_vm._v("\n "+_vm._s(_vm.getWeekNumber(_vm.week[6]))+"\n ")]):_vm._e(),_vm._v(" "),_vm._l((_vm.week),function(day,index){return [(_vm.selectableDate(day) && !_vm.disabled)?_c('a',{key:index,staticClass:"datepicker-cell",class:[_vm.classObject(day), {'has-event': _vm.eventsDateMatch(day)}, _vm.indicators],attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.emitChosenDate(day);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);}],"mouseenter":function($event){_vm.setRangeHoverEndDate(day);}}},[_vm._v("\n "+_vm._s(day.getDate())+"\n "),(_vm.eventsDateMatch(day))?_c('div',{staticClass:"events"},_vm._l((_vm.eventsDateMatch(day)),function(event,index){return _c('div',{key:index,staticClass:"event",class:event.type})})):_vm._e()]):_c('div',{key:index,staticClass:"datepicker-cell",class:_vm.classObject(day)},[_vm._v("\n "+_vm._s(day.getDate())+"\n ")])]})],2)};
|
|
243
275
|
var __vue_staticRenderFns__ = [];
|
|
244
276
|
|
|
245
277
|
/* style */
|
|
@@ -267,11 +299,17 @@ var __vue_staticRenderFns__ = [];
|
|
|
267
299
|
undefined
|
|
268
300
|
);
|
|
269
301
|
|
|
302
|
+
var isDefined = function isDefined(d) {
|
|
303
|
+
return d !== undefined;
|
|
304
|
+
};
|
|
305
|
+
|
|
270
306
|
var script$1 = {
|
|
271
307
|
name: 'BDatepickerTable',
|
|
272
308
|
components: __chunk_1._defineProperty({}, DatepickerTableRow.name, DatepickerTableRow),
|
|
273
309
|
props: {
|
|
274
|
-
value:
|
|
310
|
+
value: {
|
|
311
|
+
type: [Date, Array]
|
|
312
|
+
},
|
|
275
313
|
dayNames: Array,
|
|
276
314
|
monthNames: Array,
|
|
277
315
|
firstDayOfWeek: Number,
|
|
@@ -298,7 +336,15 @@ var script$1 = {
|
|
|
298
336
|
default: function _default() {
|
|
299
337
|
return 4;
|
|
300
338
|
}
|
|
301
|
-
}
|
|
339
|
+
},
|
|
340
|
+
range: Boolean
|
|
341
|
+
},
|
|
342
|
+
data: function data() {
|
|
343
|
+
return {
|
|
344
|
+
selectedBeginDate: undefined,
|
|
345
|
+
selectedEndDate: undefined,
|
|
346
|
+
hoveredEndDate: undefined
|
|
347
|
+
};
|
|
302
348
|
},
|
|
303
349
|
computed: {
|
|
304
350
|
visibleDayNames: function visibleDayNames() {
|
|
@@ -373,6 +419,21 @@ var script$1 = {
|
|
|
373
419
|
}
|
|
374
420
|
|
|
375
421
|
return weeksInThisMonth;
|
|
422
|
+
},
|
|
423
|
+
hoveredDateRange: function hoveredDateRange() {
|
|
424
|
+
if (!this.range) {
|
|
425
|
+
return [];
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (!isNaN(this.selectedEndDate)) {
|
|
429
|
+
return [];
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
if (this.hoveredEndDate < this.selectedBeginDate) {
|
|
433
|
+
return [this.hoveredEndDate, this.selectedBeginDate].filter(isDefined);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
return [this.selectedBeginDate, this.hoveredEndDate].filter(isDefined);
|
|
376
437
|
}
|
|
377
438
|
},
|
|
378
439
|
methods: {
|
|
@@ -380,7 +441,34 @@ var script$1 = {
|
|
|
380
441
|
* Emit input event with selected date as payload for v-model in parent
|
|
381
442
|
*/
|
|
382
443
|
updateSelectedDate: function updateSelectedDate(date) {
|
|
383
|
-
this
|
|
444
|
+
if (!this.range) {
|
|
445
|
+
this.$emit('input', date);
|
|
446
|
+
} else {
|
|
447
|
+
this.handleSelectRangeDate(date);
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
|
|
451
|
+
/*
|
|
452
|
+
* If both begin and end dates are set, reset the end date and set the begin date.
|
|
453
|
+
* If only begin date is selected, emit an array of the begin date and the new date.
|
|
454
|
+
* If not set, only set the begin date.
|
|
455
|
+
*/
|
|
456
|
+
handleSelectRangeDate: function handleSelectRangeDate(date) {
|
|
457
|
+
if (this.selectedBeginDate && this.selectedEndDate) {
|
|
458
|
+
this.selectedBeginDate = date;
|
|
459
|
+
this.selectedEndDate = undefined;
|
|
460
|
+
} else if (this.selectedBeginDate && !this.selectedEndDate) {
|
|
461
|
+
if (this.selectedBeginDate > date) {
|
|
462
|
+
this.selectedEndDate = this.selectedBeginDate;
|
|
463
|
+
this.selectedBeginDate = date;
|
|
464
|
+
} else {
|
|
465
|
+
this.selectedEndDate = date;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
this.$emit('input', [this.selectedBeginDate, this.selectedEndDate]);
|
|
469
|
+
} else {
|
|
470
|
+
this.selectedBeginDate = date;
|
|
471
|
+
}
|
|
384
472
|
},
|
|
385
473
|
|
|
386
474
|
/*
|
|
@@ -420,6 +508,9 @@ var script$1 = {
|
|
|
420
508
|
return weekDate.getTime() === timed;
|
|
421
509
|
});
|
|
422
510
|
});
|
|
511
|
+
},
|
|
512
|
+
setRangeHoverEndDate: function setRangeHoverEndDate(day) {
|
|
513
|
+
this.hoveredEndDate = day;
|
|
423
514
|
}
|
|
424
515
|
}
|
|
425
516
|
};
|
|
@@ -428,7 +519,7 @@ var script$1 = {
|
|
|
428
519
|
const __vue_script__$1 = script$1;
|
|
429
520
|
|
|
430
521
|
/* template */
|
|
431
|
-
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"datepicker-table"},[_c('header',{staticClass:"datepicker-header"},_vm._l((_vm.visibleDayNames),function(day,index){return _c('div',{key:index,staticClass:"datepicker-cell"},[_vm._v("\n "+_vm._s(day)+"\n ")])})),_vm._v(" "),_c('div',{staticClass:"datepicker-body",class:{'has-events':_vm.hasEvents}},_vm._l((_vm.weeksInThisMonth),function(week,index){return _c('b-datepicker-table-row',{key:index,attrs:{"selected-date":_vm.value,"week":week,"month":_vm.focused.month,"min-date":_vm.minDate,"max-date":_vm.maxDate,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.eventsInThisWeek(week),"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek},on:{"select":_vm.updateSelectedDate}})}))])};
|
|
522
|
+
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"datepicker-table"},[_c('header',{staticClass:"datepicker-header"},_vm._l((_vm.visibleDayNames),function(day,index){return _c('div',{key:index,staticClass:"datepicker-cell"},[_vm._v("\n "+_vm._s(day)+"\n ")])})),_vm._v(" "),_c('div',{staticClass:"datepicker-body",class:{'has-events':_vm.hasEvents}},_vm._l((_vm.weeksInThisMonth),function(week,index){return _c('b-datepicker-table-row',{key:index,attrs:{"selected-date":_vm.value,"week":week,"month":_vm.focused.month,"min-date":_vm.minDate,"max-date":_vm.maxDate,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.eventsInThisWeek(week),"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek,"range":_vm.range,"hovered-date-range":_vm.hoveredDateRange},on:{"select":_vm.updateSelectedDate,"rangeHoverEndDate":_vm.setRangeHoverEndDate}})}))])};
|
|
432
523
|
var __vue_staticRenderFns__$1 = [];
|
|
433
524
|
|
|
434
525
|
/* style */
|
|
@@ -691,12 +782,15 @@ var __vue_staticRenderFns__$2 = [];
|
|
|
691
782
|
var _components;
|
|
692
783
|
|
|
693
784
|
var defaultDateFormatter = function defaultDateFormatter(date, vm) {
|
|
694
|
-
var
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
785
|
+
var targetDates = Array.isArray(date) ? date : [date];
|
|
786
|
+
return targetDates.map(function (date) {
|
|
787
|
+
var yyyyMMdd = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate();
|
|
788
|
+
var d = new Date(yyyyMMdd);
|
|
789
|
+
return !vm.isTypeMonth ? d.toLocaleDateString() : d.toLocaleDateString(undefined, {
|
|
790
|
+
year: 'numeric',
|
|
791
|
+
month: '2-digit'
|
|
792
|
+
});
|
|
793
|
+
}).join(' - ');
|
|
700
794
|
};
|
|
701
795
|
|
|
702
796
|
var defaultDateParser = function defaultDateParser(date, vm) {
|
|
@@ -721,7 +815,9 @@ var script$3 = {
|
|
|
721
815
|
mixins: [__chunk_4.FormElementMixin],
|
|
722
816
|
inheritAttrs: false,
|
|
723
817
|
props: {
|
|
724
|
-
value:
|
|
818
|
+
value: {
|
|
819
|
+
type: [Date, Array]
|
|
820
|
+
},
|
|
725
821
|
dayNames: {
|
|
726
822
|
type: Array,
|
|
727
823
|
default: function _default() {
|
|
@@ -845,10 +941,14 @@ var script$3 = {
|
|
|
845
941
|
default: function _default() {
|
|
846
942
|
return 4;
|
|
847
943
|
}
|
|
944
|
+
},
|
|
945
|
+
range: {
|
|
946
|
+
type: Boolean,
|
|
947
|
+
default: false
|
|
848
948
|
}
|
|
849
949
|
},
|
|
850
950
|
data: function data() {
|
|
851
|
-
var focusedDate = this.value || this.focusedDate || this.dateCreator();
|
|
951
|
+
var focusedDate = Array.isArray(this.value) ? this.value[0] : this.value || this.focusedDate || this.dateCreator();
|
|
852
952
|
return {
|
|
853
953
|
dateSelected: this.value,
|
|
854
954
|
focusedDateData: {
|
|
@@ -975,11 +1075,14 @@ var script$3 = {
|
|
|
975
1075
|
* Format date into string
|
|
976
1076
|
*/
|
|
977
1077
|
formatValue: function formatValue(value) {
|
|
978
|
-
if (
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1078
|
+
if (Array.isArray(value)) {
|
|
1079
|
+
var isArrayWithValidDates = Array.isArray(value) && value.every(function (v) {
|
|
1080
|
+
return !isNaN(v);
|
|
1081
|
+
});
|
|
1082
|
+
return isArrayWithValidDates ? this.dateFormatter(value, this) : null;
|
|
982
1083
|
}
|
|
1084
|
+
|
|
1085
|
+
return value && !isNaN(value) ? this.dateFormatter(value, this) : null;
|
|
983
1086
|
},
|
|
984
1087
|
|
|
985
1088
|
/*
|
|
@@ -1062,7 +1165,7 @@ var script$3 = {
|
|
|
1062
1165
|
this.computedValue = date ? new Date(date + ' 00:00:00') : null;
|
|
1063
1166
|
},
|
|
1064
1167
|
updateInternalState: function updateInternalState(value) {
|
|
1065
|
-
var currentDate = !value ? this.dateCreator() : value;
|
|
1168
|
+
var currentDate = Array.isArray(value) ? value[0] : !value ? this.dateCreator() : value;
|
|
1066
1169
|
this.focusedDateData = {
|
|
1067
1170
|
month: currentDate.getMonth(),
|
|
1068
1171
|
year: currentDate.getFullYear()
|
|
@@ -1114,8 +1217,8 @@ var script$3 = {
|
|
|
1114
1217
|
},
|
|
1115
1218
|
|
|
1116
1219
|
/**
|
|
1117
|
-
|
|
1118
|
-
|
|
1220
|
+
* Keypress event that is bound to the document.
|
|
1221
|
+
*/
|
|
1119
1222
|
keyPress: function keyPress(event) {
|
|
1120
1223
|
// Esc key
|
|
1121
1224
|
if (this.$refs.dropdown && this.$refs.dropdown.isActive && event.keyCode === 27) {
|
|
@@ -1139,7 +1242,7 @@ var script$3 = {
|
|
|
1139
1242
|
const __vue_script__$3 = script$3;
|
|
1140
1243
|
|
|
1141
1244
|
/* template */
|
|
1142
|
-
var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker control",class:[_vm.size, {'is-expanded': _vm.expanded}]},[(!_vm.isMobile || _vm.inline)?_c('b-dropdown',{ref:"dropdown",attrs:{"position":_vm.position,"disabled":_vm.disabled,"inline":_vm.inline}},[(!_vm.inline)?_c('b-input',_vm._b({ref:"input",attrs:{"slot":"trigger","autocomplete":"off","value":_vm.formatValue(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"rounded":_vm.rounded,"loading":_vm.loading,"disabled":_vm.disabled,"readonly":!_vm.editable,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"click":function($event){_vm.onInputClick($event);},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.togglePicker(true);},"change":function($event){_vm.onChange($event.target.value);}},slot:"trigger"},'b-input',_vm.$attrs,false)):_vm._e(),_vm._v(" "),_c('b-dropdown-item',{attrs:{"disabled":_vm.disabled,"custom":""}},[_c('header',{staticClass:"datepicker-header"},[(_vm.$slots.header !== undefined && _vm.$slots.header.length)?[_vm._t("header")]:_c('div',{staticClass:"pagination field is-centered",class:_vm.size},[_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showPrev && !_vm.disabled),expression:"!showPrev && !disabled"}],staticClass:"pagination-previous",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.prev($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-left","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showNext && !_vm.disabled),expression:"!showNext && !disabled"}],staticClass:"pagination-next",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.next($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.next($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.next($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-right","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('div',{staticClass:"pagination-list"},[_c('b-field',[(!_vm.isTypeMonth)?_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.month),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "month", $$v);},expression:"focusedDateData.month"}},_vm._l((_vm.monthNames),function(month,index){return _c('option',{key:month,domProps:{"value":index}},[_vm._v("\n "+_vm._s(month)+"\n ")])})):_vm._e(),_vm._v(" "),_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.year),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "year", $$v);},expression:"focusedDateData.year"}},_vm._l((_vm.listOfYears),function(year){return _c('option',{key:year,domProps:{"value":year}},[_vm._v("\n "+_vm._s(year)+"\n ")])}))],1)],1)])],2),_vm._v(" "),(!_vm.isTypeMonth)?_c('div',{staticClass:"datepicker-content"},[_c('b-datepicker-table',{attrs:{"day-names":_vm.dayNames,"month-names":_vm.monthNames,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"type-month":_vm.isTypeMonth,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1):_c('div',[_c('b-datepicker-month',{attrs:{"month-names":_vm.monthNames,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1),_vm._v(" "),(_vm.$slots.default !== undefined && _vm.$slots.default.length)?_c('footer',{staticClass:"datepicker-footer"},[_vm._t("default")],2):_vm._e()])],1):_c('b-input',_vm._b({ref:"input",attrs:{"type":!_vm.isTypeMonth ? 'date' : 'month',"autocomplete":"off","value":_vm.formatNative(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"loading":_vm.loading,"max":_vm.formatNative(_vm.maxDate),"min":_vm.formatNative(_vm.minDate),"disabled":_vm.disabled,"readonly":false,"show-week-number":_vm.showWeekNumber,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"change":function($event){_vm.onChangeNativePicker($event);}}},'b-input',_vm.$attrs,false))],1)};
|
|
1245
|
+
var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker control",class:[_vm.size, {'is-expanded': _vm.expanded}]},[(!_vm.isMobile || _vm.inline)?_c('b-dropdown',{ref:"dropdown",attrs:{"position":_vm.position,"disabled":_vm.disabled,"inline":_vm.inline}},[(!_vm.inline)?_c('b-input',_vm._b({ref:"input",attrs:{"slot":"trigger","autocomplete":"off","value":_vm.formatValue(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"rounded":_vm.rounded,"loading":_vm.loading,"disabled":_vm.disabled,"readonly":!_vm.editable,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"click":function($event){_vm.onInputClick($event);},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.togglePicker(true);},"change":function($event){_vm.onChange($event.target.value);}},slot:"trigger"},'b-input',_vm.$attrs,false)):_vm._e(),_vm._v(" "),_c('b-dropdown-item',{attrs:{"disabled":_vm.disabled,"custom":""}},[_c('header',{staticClass:"datepicker-header"},[(_vm.$slots.header !== undefined && _vm.$slots.header.length)?[_vm._t("header")]:_c('div',{staticClass:"pagination field is-centered",class:_vm.size},[_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showPrev && !_vm.disabled),expression:"!showPrev && !disabled"}],staticClass:"pagination-previous",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.prev($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-left","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showNext && !_vm.disabled),expression:"!showNext && !disabled"}],staticClass:"pagination-next",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.next($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.next($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.next($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-right","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('div',{staticClass:"pagination-list"},[_c('b-field',[(!_vm.isTypeMonth)?_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.month),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "month", $$v);},expression:"focusedDateData.month"}},_vm._l((_vm.monthNames),function(month,index){return _c('option',{key:month,domProps:{"value":index}},[_vm._v("\n "+_vm._s(month)+"\n ")])})):_vm._e(),_vm._v(" "),_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.year),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "year", $$v);},expression:"focusedDateData.year"}},_vm._l((_vm.listOfYears),function(year){return _c('option',{key:year,domProps:{"value":year}},[_vm._v("\n "+_vm._s(year)+"\n ")])}))],1)],1)])],2),_vm._v(" "),(!_vm.isTypeMonth)?_c('div',{staticClass:"datepicker-content"},[_c('b-datepicker-table',{attrs:{"day-names":_vm.dayNames,"month-names":_vm.monthNames,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"type-month":_vm.isTypeMonth,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber,"range":_vm.range},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1):_c('div',[_c('b-datepicker-month',{attrs:{"month-names":_vm.monthNames,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1),_vm._v(" "),(_vm.$slots.default !== undefined && _vm.$slots.default.length)?_c('footer',{staticClass:"datepicker-footer"},[_vm._t("default")],2):_vm._e()])],1):_c('b-input',_vm._b({ref:"input",attrs:{"type":!_vm.isTypeMonth ? 'date' : 'month',"autocomplete":"off","value":_vm.formatNative(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"loading":_vm.loading,"max":_vm.formatNative(_vm.maxDate),"min":_vm.formatNative(_vm.minDate),"disabled":_vm.disabled,"readonly":false,"show-week-number":_vm.showWeekNumber,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"change":function($event){_vm.onChangeNativePicker($event);}}},'b-input',_vm.$attrs,false))],1)};
|
|
1143
1246
|
var __vue_staticRenderFns__$3 = [];
|
|
1144
1247
|
|
|
1145
1248
|
/* style */
|
package/dist/cjs/slider.js
CHANGED
|
@@ -374,6 +374,9 @@ var script$2 = {
|
|
|
374
374
|
left: this.barStart
|
|
375
375
|
};
|
|
376
376
|
},
|
|
377
|
+
sliderSize: function sliderSize() {
|
|
378
|
+
return this.$refs.slider['clientWidth'];
|
|
379
|
+
},
|
|
377
380
|
rootClasses: function rootClasses() {
|
|
378
381
|
return {
|
|
379
382
|
'is-rounded': this.rounded,
|
|
@@ -453,9 +456,6 @@ var script$2 = {
|
|
|
453
456
|
|
|
454
457
|
this.emitChange();
|
|
455
458
|
},
|
|
456
|
-
setSize: function setSize() {
|
|
457
|
-
this.sliderSize = this.$refs.slider['clientWidth'];
|
|
458
|
-
},
|
|
459
459
|
emitChange: function emitChange() {
|
|
460
460
|
this.$emit('change', this.isRange ? [this.minValue, this.maxValue] : this.value1);
|
|
461
461
|
}
|
|
@@ -463,18 +463,6 @@ var script$2 = {
|
|
|
463
463
|
created: function created() {
|
|
464
464
|
this.setValues(this.value);
|
|
465
465
|
this.isThumbReversed = false;
|
|
466
|
-
},
|
|
467
|
-
mounted: function mounted() {
|
|
468
|
-
this.setSize();
|
|
469
|
-
|
|
470
|
-
if (typeof window !== 'undefined') {
|
|
471
|
-
window.addEventListener('resize', this.setSize);
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
beforeDestroy: function beforeDestroy() {
|
|
475
|
-
if (typeof window !== 'undefined') {
|
|
476
|
-
window.removeEventListener('resize', this.setSize);
|
|
477
|
-
}
|
|
478
466
|
}
|
|
479
467
|
};
|
|
480
468
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! Buefy v0.8.
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = global || self, factory(global.
|
|
5
|
+
(global = global || self, factory(global.Autocomplete = {}));
|
|
6
6
|
}(this, function (exports) { 'use strict';
|
|
7
7
|
|
|
8
8
|
function _typeof(obj) {
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).autocomplete={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var n={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipAnimated:!1,defaultTooltipDelay:0,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,3],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1},s={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return n.defaultUseHtml5Validation}},validationMessage:String},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||n.defaultIconPack}},computed:{parentField:function(){for(var e=this.$parent,t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){if(this.parentField&&this.parentField.newType){if("string"==typeof this.parentField.newType)return this.parentField.newType;for(var e in this.parentField.newType)if(this.parentField.newType[e])return e}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this;void 0!==this.$data._elementRef&&this.$nextTick(function(){var t=e.$el.querySelector(e.$data._elementRef);t&&t.focus()})},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},checkHtml5Validity:function(){var e=this;if(this.useHtml5Validation&&void 0!==this.$refs[this.$data._elementRef]){var t=this.$el.querySelector(this.$data._elementRef),i=null,n=null,s=!0;return t.checkValidity()||(i="is-danger",n=this.validationMessage||t.validationMessage,s=!1),this.isValid=s,this.$nextTick(function(){e.parentField&&(e.parentField.type||(e.parentField.newType=i),e.parentField.message||(e.parentField.newMessage=n))}),this.isValid}}}};var o=function(e,t,i,n,s,o,a,r,l,u){"boolean"!=typeof a&&(l=r,r=a,a=!1);var c,d="function"==typeof i?i.options:i;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,s&&(d.functional=!0)),n&&(d._scopeId=n),o?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=c):t&&(c=a?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return i};var a=o({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?i(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):i("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{newIcon:function(){return"mdi"===this.newPack?"".concat(this.newPack,"-").concat(this.icon):this.addFAPrefix(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||n.defaultIconPack},newType:function(){if(this.type){var e=[];if("string"==typeof this.type)e=this.type.split("-");else for(var t in this.type)if(this.type[t]){e=t.split("-");break}if(!(e.length<=1))return"has-text-".concat(e[1])}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){var e="mdi"===this.newPack?"mdi-24px":this.addFAPrefix("lg"),t="mdi"===this.newPack?"mdi-36px":this.addFAPrefix("2x"),i="mdi"===this.newPack?"mdi-48px":this.addFAPrefix("3x");switch(this.size){case"is-small":return;case"is-medium":return t;case"is-large":return i;default:return e}},useIconComponent:function(){return n.defaultIconComponent}},methods:{addFAPrefix:function(e){return this.useIconComponent?e:"fa-".concat(e)},getEquivalentIconOf:function(e){if(!this.both)return e;switch(e){case"check":return"check";case"information":return"info-circle";case"check-circle":return"check-circle";case"alert":return"exclamation-triangle";case"alert-circle":return"exclamation-circle";case"arrow-up":return"arrow-up";case"chevron-right":return"angle-right";case"chevron-left":return"angle-left";case"chevron-down":return"angle-down";case"eye":return"eye";case"eye-off":return"eye-slash";case"menu-down":return"caret-down";case"menu-up":return"caret-up";default:return e}}}},void 0,!1,void 0,void 0,void 0);var r=o({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?i("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):i("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e._v(" "),e.icon?i("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e(),e._v(" "),e.loading||!e.passwordReveal&&!e.statusTypeIcon?e._e():i("b-icon",{staticClass:"is-right",class:{"is-clickable":e.passwordReveal},attrs:{icon:e.passwordReveal?e.passwordVisibleIcon:e.statusTypeIcon,pack:e.iconPack,size:e.iconSize,type:e.passwordReveal?"is-primary":e.statusType,both:""},nativeOn:{click:function(t){e.togglePasswordVisibility(t)}}}),e._v(" "),e.maxlength&&e.hasCounter&&"number"!==e.type?i("small",{staticClass:"help counter",class:{"is-invisible":!e.isFocused}},[e._v("\n "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+"\n ")]):e._e()],1)},staticRenderFns:[]},void 0,{name:"BInput",components:i({},a.name,a),mixins:[s],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},passwordReveal:Boolean,hasCounter:{type:Boolean,default:function(){return n.defaultInputHasCounter}},customClass:{type:String,default:""}},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||n.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e),!this.isValid&&this.checkHtml5Validity()}},rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusTypeIcon},iconPosition:function(){return this.icon&&this.hasIconRight?"has-icons-left has-icons-right":!this.icon&&this.hasIconRight?"has-icons-right":this.icon?"has-icons-left":void 0},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.computedValue?this.computedValue.length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{value:function(e){this.newValue=e}},methods:{togglePasswordVisibility:function(){var e=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick(function(){e.$refs.input.focus()})},onInput:function(e){var t=this;this.$nextTick(function(){e.target&&(t.computedValue=e.target.value)})}}},void 0,!1,void 0,void 0,void 0);var l,u=o({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"autocomplete control",class:{"is-expanded":e.expanded}},[i("b-input",e._b({ref:"input",attrs:{type:"text",size:e.size,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-pack":e.iconPack,maxlength:e.maxlength,autocomplete:e.newAutocomplete,"use-html5-validation":e.useHtml5Validation},on:{input:e.onInput,focus:e.focused,blur:e.onBlur},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"esc",27,t.key))return null;t.preventDefault(),e.isActive=!1},keydown:[function(t){if(!("button"in t)&&e._k(t.keyCode,"tab",9,t.key))return null;e.tabPressed(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;t.preventDefault(),e.enterPressed(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"up",38,t.key))return null;t.preventDefault(),e.keyArrows("up")},function(t){if(!("button"in t)&&e._k(t.keyCode,"down",40,t.key))return null;t.preventDefault(),e.keyArrows("down")}]},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}},"b-input",e.$attrs,!1)),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive&&(e.data.length>0||e.hasEmptySlot||e.hasHeaderSlot),expression:"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":!e.isListInViewportVertically}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"dropdown-content"},[e.hasHeaderSlot?i("div",{staticClass:"dropdown-item"},[e._t("header")],2):e._e(),e._v(" "),e._l(e.data,function(t,n){return i("a",{key:n,staticClass:"dropdown-item",class:{"is-hovered":t===e.hovered},on:{click:function(i){e.setSelected(t)}}},[e.hasDefaultSlot?e._t("default",null,{option:t,index:n}):i("span",[e._v("\n "+e._s(e.getValue(t,!0))+"\n ")])],2)}),e._v(" "),0===e.data.length&&e.hasEmptySlot?i("div",{staticClass:"dropdown-item is-disabled"},[e._t("empty")],2):e._e(),e._v(" "),e.hasFooterSlot?i("div",{staticClass:"dropdown-item"},[e._t("footer")],2):e._e()],2)])])],1)},staticRenderFns:[]},void 0,{name:"BAutocomplete",components:i({},r.name,r),mixins:[s],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function},data:function(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",isListInViewportVertically:!0,hasFocus:!1,_isAutocomplete:!0,_elementRef:"input"}},computed:{whiteList:function(){var e=[];if(e.push(this.$refs.input.$el.querySelector("input")),e.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var t=this.$refs.dropdown.querySelectorAll("*"),i=!0,n=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done);i=!0){var r=o.value;e.push(r)}}catch(e){n=!0,s=e}finally{try{i||null==a.return||a.return()}finally{if(n)throw s}}}return e},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer}},watch:{isActive:function(e){var t=this;e?this.calcDropdownInViewportVertical():(this.$nextTick(function(){return t.setHovered(null)}),setTimeout(function(){t.calcDropdownInViewportVertical()},100))},newValue:function(e){this.$emit("input",e);var t=this.getValue(this.selected);t&&t!==e&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!e||(this.isActive=!!e)},value:function(e){this.newValue=e,!this.isValid&&this.$refs.input.checkHtml5Validity()},data:function(e){this.keepFirst&&this.selectFirstOption(e)}},methods:{setHovered:function(e){void 0!==e&&(this.hovered=e)},setSelected:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];void 0!==e&&(this.selected=e,this.$emit("select",this.selected),null!==this.selected&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected)),i&&this.$nextTick(function(){t.isActive=!1}))},selectFirstOption:function(e){var t=this;this.$nextTick(function(){e.length?(t.openOnFocus||""!==t.newValue&&t.hovered!==e[0])&&t.setHovered(e[0]):t.setHovered(null)})},enterPressed:function(){null!==this.hovered&&this.setSelected(this.hovered)},tabPressed:function(){null!==this.hovered?this.setSelected(this.hovered):this.isActive=!1},clickedOutside:function(e){this.whiteList.indexOf(e.target)<0&&(this.isActive=!1)},getValue:function(e){var i;if(e)return void 0!==this.customFormatter?this.customFormatter(e):"object"===t(e)?(i=e,this.field.split(".").reduce(function(e,t){return e[t]},i)):e},calcDropdownInViewportVertical:function(){var e=this;this.$nextTick(function(){if(void 0!==e.$refs.dropdown){var t=e.$refs.dropdown.getBoundingClientRect();e.isListInViewportVertically=t.top>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}})},keyArrows:function(e){var t="down"===e?1:-1;if(this.isActive){var i=this.data.indexOf(this.hovered)+t;i=(i=i>this.data.length-1?this.data.length:i)<0?0:i,this.setHovered(this.data[i]);var n=this.$refs.dropdown.querySelector(".dropdown-content"),s=n.querySelectorAll("a.dropdown-item:not(.is-disabled)")[i];if(!s)return;var o=n.scrollTop,a=n.scrollTop+n.clientHeight-s.clientHeight;s.offsetTop<o?n.scrollTop=s.offsetTop:s.offsetTop>=a&&(n.scrollTop=s.offsetTop-n.clientHeight+s.clientHeight)}else this.isActive=!0},focused:function(e){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.data)),this.hasFocus=!0,this.$emit("focus",e)},onBlur:function(e){this.hasFocus=!1,this.$emit("blur",e)},onInput:function(e){var t=this.getValue(this.selected);t&&t===this.newValue||this.$emit("typing",this.newValue)}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),window.addEventListener("resize",this.calcDropdownInViewportVertical))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),window.removeEventListener("resize",this.calcDropdownInViewportVertical))}},void 0,!1,void 0,void 0,void 0),c={install:function(e){!function(e,t){e.component(t.name,t)}(e,u)}};l=c,"undefined"!=typeof window&&window.Vue&&window.Vue.use(l),e.Autocomplete=u,e.default=c,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Autocomplete={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var n={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipAnimated:!1,defaultTooltipDelay:0,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,3],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1},s={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return n.defaultUseHtml5Validation}},validationMessage:String},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||n.defaultIconPack}},computed:{parentField:function(){for(var e=this.$parent,t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){if(this.parentField&&this.parentField.newType){if("string"==typeof this.parentField.newType)return this.parentField.newType;for(var e in this.parentField.newType)if(this.parentField.newType[e])return e}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this;void 0!==this.$data._elementRef&&this.$nextTick(function(){var t=e.$el.querySelector(e.$data._elementRef);t&&t.focus()})},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},checkHtml5Validity:function(){var e=this;if(this.useHtml5Validation&&void 0!==this.$refs[this.$data._elementRef]){var t=this.$el.querySelector(this.$data._elementRef),i=null,n=null,s=!0;return t.checkValidity()||(i="is-danger",n=this.validationMessage||t.validationMessage,s=!1),this.isValid=s,this.$nextTick(function(){e.parentField&&(e.parentField.type||(e.parentField.newType=i),e.parentField.message||(e.parentField.newMessage=n))}),this.isValid}}}};var o=function(e,t,i,n,s,o,a,r,l,u){"boolean"!=typeof a&&(l=r,r=a,a=!1);var c,d="function"==typeof i?i.options:i;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,s&&(d.functional=!0)),n&&(d._scopeId=n),o?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=c):t&&(c=a?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return i};var a=o({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?i(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):i("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{newIcon:function(){return"mdi"===this.newPack?"".concat(this.newPack,"-").concat(this.icon):this.addFAPrefix(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||n.defaultIconPack},newType:function(){if(this.type){var e=[];if("string"==typeof this.type)e=this.type.split("-");else for(var t in this.type)if(this.type[t]){e=t.split("-");break}if(!(e.length<=1))return"has-text-".concat(e[1])}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){var e="mdi"===this.newPack?"mdi-24px":this.addFAPrefix("lg"),t="mdi"===this.newPack?"mdi-36px":this.addFAPrefix("2x"),i="mdi"===this.newPack?"mdi-48px":this.addFAPrefix("3x");switch(this.size){case"is-small":return;case"is-medium":return t;case"is-large":return i;default:return e}},useIconComponent:function(){return n.defaultIconComponent}},methods:{addFAPrefix:function(e){return this.useIconComponent?e:"fa-".concat(e)},getEquivalentIconOf:function(e){if(!this.both)return e;switch(e){case"check":return"check";case"information":return"info-circle";case"check-circle":return"check-circle";case"alert":return"exclamation-triangle";case"alert-circle":return"exclamation-circle";case"arrow-up":return"arrow-up";case"chevron-right":return"angle-right";case"chevron-left":return"angle-left";case"chevron-down":return"angle-down";case"eye":return"eye";case"eye-off":return"eye-slash";case"menu-down":return"caret-down";case"menu-up":return"caret-up";default:return e}}}},void 0,!1,void 0,void 0,void 0);var r=o({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?i("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):i("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e._v(" "),e.icon?i("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e(),e._v(" "),e.loading||!e.passwordReveal&&!e.statusTypeIcon?e._e():i("b-icon",{staticClass:"is-right",class:{"is-clickable":e.passwordReveal},attrs:{icon:e.passwordReveal?e.passwordVisibleIcon:e.statusTypeIcon,pack:e.iconPack,size:e.iconSize,type:e.passwordReveal?"is-primary":e.statusType,both:""},nativeOn:{click:function(t){e.togglePasswordVisibility(t)}}}),e._v(" "),e.maxlength&&e.hasCounter&&"number"!==e.type?i("small",{staticClass:"help counter",class:{"is-invisible":!e.isFocused}},[e._v("\n "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+"\n ")]):e._e()],1)},staticRenderFns:[]},void 0,{name:"BInput",components:i({},a.name,a),mixins:[s],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},passwordReveal:Boolean,hasCounter:{type:Boolean,default:function(){return n.defaultInputHasCounter}},customClass:{type:String,default:""}},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||n.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e),!this.isValid&&this.checkHtml5Validity()}},rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusTypeIcon},iconPosition:function(){return this.icon&&this.hasIconRight?"has-icons-left has-icons-right":!this.icon&&this.hasIconRight?"has-icons-right":this.icon?"has-icons-left":void 0},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.computedValue?this.computedValue.length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{value:function(e){this.newValue=e}},methods:{togglePasswordVisibility:function(){var e=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick(function(){e.$refs.input.focus()})},onInput:function(e){var t=this;this.$nextTick(function(){e.target&&(t.computedValue=e.target.value)})}}},void 0,!1,void 0,void 0,void 0);var l,u=o({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"autocomplete control",class:{"is-expanded":e.expanded}},[i("b-input",e._b({ref:"input",attrs:{type:"text",size:e.size,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-pack":e.iconPack,maxlength:e.maxlength,autocomplete:e.newAutocomplete,"use-html5-validation":e.useHtml5Validation},on:{input:e.onInput,focus:e.focused,blur:e.onBlur},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"esc",27,t.key))return null;t.preventDefault(),e.isActive=!1},keydown:[function(t){if(!("button"in t)&&e._k(t.keyCode,"tab",9,t.key))return null;e.tabPressed(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;t.preventDefault(),e.enterPressed(t)},function(t){if(!("button"in t)&&e._k(t.keyCode,"up",38,t.key))return null;t.preventDefault(),e.keyArrows("up")},function(t){if(!("button"in t)&&e._k(t.keyCode,"down",40,t.key))return null;t.preventDefault(),e.keyArrows("down")}]},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}},"b-input",e.$attrs,!1)),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive&&(e.data.length>0||e.hasEmptySlot||e.hasHeaderSlot),expression:"isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":!e.isListInViewportVertically}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"dropdown-content"},[e.hasHeaderSlot?i("div",{staticClass:"dropdown-item"},[e._t("header")],2):e._e(),e._v(" "),e._l(e.data,function(t,n){return i("a",{key:n,staticClass:"dropdown-item",class:{"is-hovered":t===e.hovered},on:{click:function(i){e.setSelected(t)}}},[e.hasDefaultSlot?e._t("default",null,{option:t,index:n}):i("span",[e._v("\n "+e._s(e.getValue(t,!0))+"\n ")])],2)}),e._v(" "),0===e.data.length&&e.hasEmptySlot?i("div",{staticClass:"dropdown-item is-disabled"},[e._t("empty")],2):e._e(),e._v(" "),e.hasFooterSlot?i("div",{staticClass:"dropdown-item"},[e._t("footer")],2):e._e()],2)])])],1)},staticRenderFns:[]},void 0,{name:"BAutocomplete",components:i({},r.name,r),mixins:[s],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function},data:function(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",isListInViewportVertically:!0,hasFocus:!1,_isAutocomplete:!0,_elementRef:"input"}},computed:{whiteList:function(){var e=[];if(e.push(this.$refs.input.$el.querySelector("input")),e.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var t=this.$refs.dropdown.querySelectorAll("*"),i=!0,n=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done);i=!0){var r=o.value;e.push(r)}}catch(e){n=!0,s=e}finally{try{i||null==a.return||a.return()}finally{if(n)throw s}}}return e},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer}},watch:{isActive:function(e){var t=this;e?this.calcDropdownInViewportVertical():(this.$nextTick(function(){return t.setHovered(null)}),setTimeout(function(){t.calcDropdownInViewportVertical()},100))},newValue:function(e){this.$emit("input",e);var t=this.getValue(this.selected);t&&t!==e&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!e||(this.isActive=!!e)},value:function(e){this.newValue=e,!this.isValid&&this.$refs.input.checkHtml5Validity()},data:function(e){this.keepFirst&&this.selectFirstOption(e)}},methods:{setHovered:function(e){void 0!==e&&(this.hovered=e)},setSelected:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];void 0!==e&&(this.selected=e,this.$emit("select",this.selected),null!==this.selected&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected)),i&&this.$nextTick(function(){t.isActive=!1}))},selectFirstOption:function(e){var t=this;this.$nextTick(function(){e.length?(t.openOnFocus||""!==t.newValue&&t.hovered!==e[0])&&t.setHovered(e[0]):t.setHovered(null)})},enterPressed:function(){null!==this.hovered&&this.setSelected(this.hovered)},tabPressed:function(){null!==this.hovered?this.setSelected(this.hovered):this.isActive=!1},clickedOutside:function(e){this.whiteList.indexOf(e.target)<0&&(this.isActive=!1)},getValue:function(e){var i;if(e)return void 0!==this.customFormatter?this.customFormatter(e):"object"===t(e)?(i=e,this.field.split(".").reduce(function(e,t){return e[t]},i)):e},calcDropdownInViewportVertical:function(){var e=this;this.$nextTick(function(){if(void 0!==e.$refs.dropdown){var t=e.$refs.dropdown.getBoundingClientRect();e.isListInViewportVertically=t.top>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}})},keyArrows:function(e){var t="down"===e?1:-1;if(this.isActive){var i=this.data.indexOf(this.hovered)+t;i=(i=i>this.data.length-1?this.data.length:i)<0?0:i,this.setHovered(this.data[i]);var n=this.$refs.dropdown.querySelector(".dropdown-content"),s=n.querySelectorAll("a.dropdown-item:not(.is-disabled)")[i];if(!s)return;var o=n.scrollTop,a=n.scrollTop+n.clientHeight-s.clientHeight;s.offsetTop<o?n.scrollTop=s.offsetTop:s.offsetTop>=a&&(n.scrollTop=s.offsetTop-n.clientHeight+s.clientHeight)}else this.isActive=!0},focused:function(e){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.data)),this.hasFocus=!0,this.$emit("focus",e)},onBlur:function(e){this.hasFocus=!1,this.$emit("blur",e)},onInput:function(e){var t=this.getValue(this.selected);t&&t===this.newValue||this.$emit("typing",this.newValue)}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),window.addEventListener("resize",this.calcDropdownInViewportVertical))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),window.removeEventListener("resize",this.calcDropdownInViewportVertical))}},void 0,!1,void 0,void 0,void 0),c={install:function(e){!function(e,t){e.component(t.name,t)}(e,u)}};l=c,"undefined"!=typeof window&&window.Vue&&window.Vue.use(l),e.Autocomplete=u,e.default=c,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! Buefy v0.8.
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = global || self, factory(global.
|
|
5
|
+
(global = global || self, factory(global.Button = {}));
|
|
6
6
|
}(this, function (exports) { 'use strict';
|
|
7
7
|
|
|
8
8
|
function _defineProperty(obj, key, value) {
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Button={})}(this,function(e){"use strict";var t={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipAnimated:!1,defaultTooltipDelay:0,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,3],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1};var n=function(e,t,n,i,o,a,r,s,c,l){"boolean"!=typeof r&&(c=s,s=r,r=!1);var u,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),i&&(d._scopeId=i),a?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=u):t&&(u=r?function(){t.call(this,l(this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),u)if(d.functional){var f=d.render;d.render=function(e,t){return u.call(t),f(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,u):[u]}return n};var i,o,a,r=n({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?n(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):n("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{newIcon:function(){return"mdi"===this.newPack?"".concat(this.newPack,"-").concat(this.icon):this.addFAPrefix(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||t.defaultIconPack},newType:function(){if(this.type){var e=[];if("string"==typeof this.type)e=this.type.split("-");else for(var t in this.type)if(this.type[t]){e=t.split("-");break}if(!(e.length<=1))return"has-text-".concat(e[1])}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){var e="mdi"===this.newPack?"mdi-24px":this.addFAPrefix("lg"),t="mdi"===this.newPack?"mdi-36px":this.addFAPrefix("2x"),n="mdi"===this.newPack?"mdi-48px":this.addFAPrefix("3x");switch(this.size){case"is-small":return;case"is-medium":return t;case"is-large":return n;default:return e}},useIconComponent:function(){return t.defaultIconComponent}},methods:{addFAPrefix:function(e){return this.useIconComponent?e:"fa-".concat(e)},getEquivalentIconOf:function(e){if(!this.both)return e;switch(e){case"check":return"check";case"information":return"info-circle";case"check-circle":return"check-circle";case"alert":return"exclamation-triangle";case"alert-circle":return"exclamation-circle";case"arrow-up":return"arrow-up";case"chevron-right":return"angle-right";case"chevron-left":return"angle-left";case"chevron-down":return"angle-down";case"eye":return"eye";case"eye-off":return"eye-slash";case"menu-down":return"caret-down";case"menu-up":return"caret-up";default:return e}}}},void 0,!1,void 0,void 0,void 0);var s,c=n({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.tag,e._b({tag:"component",staticClass:"button",class:[e.size,e.type,{"is-rounded":e.rounded,"is-loading":e.loading,"is-outlined":e.outlined,"is-inverted":e.inverted,"is-focused":e.focused,"is-active":e.active,"is-hovered":e.hovered,"is-selected":e.selected}],attrs:{type:e.nativeType},on:{click:function(t){e.$emit("click",t)}}},"component",e.$attrs,!1),[e.iconLeft?n("b-icon",{attrs:{pack:e.iconPack,icon:e.iconLeft,size:e.iconSize}}):e._e(),e._v(" "),e.label?n("span",[e._v(e._s(e.label))]):e.$slots.default?n("span",[e._t("default")],2):e._e(),e._v(" "),e.iconRight?n("b-icon",{attrs:{pack:e.iconPack,icon:e.iconRight,size:e.iconSize}}):e._e()],1)},staticRenderFns:[]},void 0,{name:"BButton",components:(i={},o=r.name,a=r,o in i?Object.defineProperty(i,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[o]=a,i),inheritAttrs:!1,props:{type:[String,Object],size:String,label:String,iconPack:String,iconLeft:String,iconRight:String,rounded:Boolean,loading:Boolean,outlined:Boolean,inverted:Boolean,focused:Boolean,active:Boolean,hovered:Boolean,selected:Boolean,nativeType:{type:String,default:"button",validator:function(e){return["button","submit","reset"].indexOf(e)>=0}},tag:{type:String,default:"button",validator:function(e){return["button","a","input","router-link","nuxt-link","n-link","NuxtLink","NLink"].indexOf(e)>=0}}},computed:{iconSize:function(){return this.size&&"is-medium"!==this.size?"is-large"===this.size?"is-medium":this.size:"is-small"}}},void 0,!1,void 0,void 0,void 0),l={install:function(e){!function(e,t){e.component(t.name,t)}(e,c)}};s=l,"undefined"!=typeof window&&window.Vue&&window.Vue.use(s),e.Button=c,e.default=l,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! Buefy v0.8.
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = global || self, factory(global.
|
|
5
|
+
(global = global || self, factory(global.Checkbox = {}));
|
|
6
6
|
}(this, function (exports) { 'use strict';
|
|
7
7
|
|
|
8
8
|
//
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Checkbox={})}(this,function(e){"use strict";var t=function(e,t,n,a,i,o,u,r,c,l){"boolean"!=typeof u&&(c=r,r=u,u=!1);var s,d="function"==typeof n?n.options:n;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),a&&(d._scopeId=a),o?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=s):t&&(s=u?function(){t.call(this,l(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),s)if(d.functional){var f=d.render;d.render=function(e,t){return s.call(t),f(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,s):[s]}return n};var n=t({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{ref:"label",staticClass:"b-checkbox checkbox",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;t.preventDefault(),e.$refs.label.click()}}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"checkbox",disabled:e.disabled,required:e.required,name:e.name,"true-value":e.trueValue,"false-value":e.falseValue},domProps:{indeterminate:e.indeterminate,value:e.nativeValue,checked:Array.isArray(e.computedValue)?e._i(e.computedValue,e.nativeValue)>-1:e._q(e.computedValue,e.trueValue)},on:{click:function(e){e.stopPropagation()},change:function(t){var n=e.computedValue,a=t.target,i=a.checked?e.trueValue:e.falseValue;if(Array.isArray(n)){var o=e.nativeValue,u=e._i(n,o);a.checked?u<0&&(e.computedValue=n.concat([o])):u>-1&&(e.computedValue=n.slice(0,u).concat(n.slice(u+1)))}else e.computedValue=i}}}),e._v(" "),n("span",{staticClass:"check",class:e.type}),e._v(" "),n("span",{staticClass:"control-label"},[e._t("default")],2)])},staticRenderFns:[]},void 0,{name:"BCheckbox",props:{value:[String,Number,Boolean,Function,Object,Array],nativeValue:[String,Number,Boolean,Function,Object,Array],indeterminate:Boolean,type:String,disabled:Boolean,required:Boolean,name:String,size:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array],default:!1}},data:function(){return{newValue:this.value}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}}},watch:{value:function(e){this.newValue=e}},methods:{focus:function(){this.$refs.input.focus()}}},void 0,!1,void 0,void 0,void 0);var a,i=t({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control"},[n("label",{ref:"label",staticClass:"b-checkbox checkbox button",class:[e.checked?e.type:null,e.size,{"is-disabled":e.disabled,"is-focused":e.isFocused}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;t.preventDefault(),e.$refs.label.click()}}},[e._t("default"),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"checkbox",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:Array.isArray(e.computedValue)?e._i(e.computedValue,e.nativeValue)>-1:e.computedValue},on:{click:function(e){e.stopPropagation()},focus:function(t){e.isFocused=!0},blur:function(t){e.isFocused=!1},change:function(t){var n=e.computedValue,a=t.target,i=!!a.checked;if(Array.isArray(n)){var o=e.nativeValue,u=e._i(n,o);a.checked?u<0&&(e.computedValue=n.concat([o])):u>-1&&(e.computedValue=n.slice(0,u).concat(n.slice(u+1)))}else e.computedValue=i}}})],2)])},staticRenderFns:[]},void 0,{name:"BCheckboxButton",props:{value:[String,Number,Boolean,Function,Object,Array],nativeValue:[String,Number,Boolean,Function,Object,Array],disabled:Boolean,required:Boolean,name:String,size:String,type:{type:String,default:"is-primary"}},data:function(){return{newValue:this.value,isFocused:!1}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}},checked:function(){return Array.isArray(this.newValue)?this.newValue.indexOf(this.nativeValue)>=0:this.newValue===this.nativeValue}},watch:{value:function(e){this.newValue=e}},methods:{focus:function(){this.$refs.input.focus()}}},void 0,!1,void 0,void 0,void 0),o=function(e,t){e.component(t.name,t)},u={install:function(e){o(e,n),o(e,i)}};a=u,"undefined"!=typeof window&&window.Vue&&window.Vue.use(a),e.Checkbox=n,e.CheckboxButton=i,e.default=u,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! Buefy v0.8.
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = global || self, factory(global.
|
|
5
|
+
(global = global || self, factory(global.Clockpicker = {}));
|
|
6
6
|
}(this, function (exports) { 'use strict';
|
|
7
7
|
|
|
8
8
|
function _defineProperty(obj, key, value) {
|