@dimailn/vuetify 2.7.2-alpha49 → 2.7.2-alpha50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vuetify.js +28 -10
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VPicker/VPicker.js +4 -1
- package/es5/components/VPicker/VPicker.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/picker/index.js +8 -7
- package/es5/mixins/picker/index.js.map +1 -1
- package/es5/util/helpers.js +16 -0
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VPicker/VPicker.js +6 -2
- package/lib/components/VPicker/VPicker.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/picker/index.js +7 -4
- package/lib/mixins/picker/index.js.map +1 -1
- package/lib/util/helpers.js +13 -1
- package/lib/util/helpers.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +11 -0
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +0 -16
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +0 -10
- package/src/components/VPicker/VPicker.ts +5 -2
- package/src/components/VPicker/__tests__/VPicker.spec.ts +22 -0
- package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +0 -40
- package/src/mixins/picker/index.ts +9 -8
- package/src/util/__tests__/helpers.spec.ts +62 -1
- package/src/util/helpers.ts +17 -1
package/dist/vuetify.js
CHANGED
|
@@ -23474,6 +23474,9 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
23474
23474
|
'v-picker__actions--no-title': this.noTitle
|
|
23475
23475
|
}]
|
|
23476
23476
|
}, Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getSlot"])(this, 'actions'));
|
|
23477
|
+
},
|
|
23478
|
+
hasActions: function hasActions() {
|
|
23479
|
+
return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["hasSlotContent"])(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getSlot"])(this, 'actions'));
|
|
23477
23480
|
}
|
|
23478
23481
|
},
|
|
23479
23482
|
render: function render() {
|
|
@@ -23483,7 +23486,7 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
23483
23486
|
'v-picker--landscape': this.landscape,
|
|
23484
23487
|
'v-picker--full-width': this.fullWidth
|
|
23485
23488
|
}, this.themeClasses), this.elevationClasses)]
|
|
23486
|
-
}, [this.$slots.title ? this.genTitle() : null, this.genBody(), this
|
|
23489
|
+
}, [this.$slots.title ? this.genTitle() : null, this.genBody(), this.hasActions() ? this.genActions() : null]);
|
|
23487
23490
|
}
|
|
23488
23491
|
}));
|
|
23489
23492
|
|
|
@@ -37114,7 +37117,7 @@ function () {
|
|
|
37114
37117
|
|
|
37115
37118
|
Vuetify.install = _install__WEBPACK_IMPORTED_MODULE_0__["install"];
|
|
37116
37119
|
Vuetify.installed = false;
|
|
37117
|
-
Vuetify.version = "2.7.2-
|
|
37120
|
+
Vuetify.version = "2.7.2-alpha50";
|
|
37118
37121
|
Vuetify.config = {
|
|
37119
37122
|
silent: false
|
|
37120
37123
|
};
|
|
@@ -43560,14 +43563,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
43560
43563
|
return null;
|
|
43561
43564
|
},
|
|
43562
43565
|
genPickerActionsSlot: function genPickerActionsSlot() {
|
|
43563
|
-
return this
|
|
43566
|
+
return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_5__["getSlot"])(this, 'default', {
|
|
43564
43567
|
save: this.save,
|
|
43565
43568
|
cancel: this.cancel
|
|
43566
|
-
})
|
|
43569
|
+
});
|
|
43567
43570
|
},
|
|
43568
43571
|
genPicker: function genPicker(staticClass) {
|
|
43569
|
-
var _this = this;
|
|
43570
|
-
|
|
43571
43572
|
var children = {};
|
|
43572
43573
|
|
|
43573
43574
|
if (!this.noTitle) {
|
|
@@ -43581,10 +43582,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
43581
43582
|
body && (children.default = function () {
|
|
43582
43583
|
return [body];
|
|
43583
43584
|
});
|
|
43585
|
+
var actions = this.genPickerActionsSlot();
|
|
43584
43586
|
|
|
43585
|
-
|
|
43586
|
-
|
|
43587
|
-
|
|
43587
|
+
if (Object(_util_helpers__WEBPACK_IMPORTED_MODULE_5__["hasSlotContent"])(actions)) {
|
|
43588
|
+
children.actions = function () {
|
|
43589
|
+
return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_5__["flattenSlotContent"])(actions);
|
|
43590
|
+
};
|
|
43591
|
+
}
|
|
43588
43592
|
|
|
43589
43593
|
return Object(vue__WEBPACK_IMPORTED_MODULE_6__["h"])(_components_VPicker__WEBPACK_IMPORTED_MODULE_0__["default"], {
|
|
43590
43594
|
class: staticClass,
|
|
@@ -48141,7 +48145,7 @@ function attachedRoot(node) {
|
|
|
48141
48145
|
/*!*****************************!*\
|
|
48142
48146
|
!*** ./src/util/helpers.ts ***!
|
|
48143
48147
|
\*****************************/
|
|
48144
|
-
/*! exports provided: getTagValue, createSimpleFunctional, directiveConfig, addOnceEventListener, passiveSupported, addPassiveEventListener, getNestedValue, deepEqual, getObjectValueByPath, getPropertyFromItem, createRange, getZIndex, filterObjectOnKeys, convertToUnit, kebabCase, isObject, keyCodes, remapInternalIcon, keys, camelize, arrayDiff, upperFirst, groupItems, wrapInArray, sortItems, defaultFilter, searchItems, pickSlotFunctions, getSlotType, debounce, throttle, getPrefixedScopedSlots, getSlot, clamp, padEnd, chunk, humanReadableFileSize, camelizeObjectKeys, mergeDeep, fillArray, composedPath, normalizeAttrs, normalizeClasses */
|
|
48148
|
+
/*! exports provided: getTagValue, createSimpleFunctional, directiveConfig, addOnceEventListener, passiveSupported, addPassiveEventListener, getNestedValue, deepEqual, getObjectValueByPath, getPropertyFromItem, createRange, getZIndex, filterObjectOnKeys, convertToUnit, kebabCase, isObject, keyCodes, remapInternalIcon, keys, camelize, arrayDiff, upperFirst, groupItems, wrapInArray, sortItems, defaultFilter, searchItems, pickSlotFunctions, getSlotType, debounce, throttle, getPrefixedScopedSlots, getSlot, flattenSlotContent, hasSlotContent, clamp, padEnd, chunk, humanReadableFileSize, camelizeObjectKeys, mergeDeep, fillArray, composedPath, normalizeAttrs, normalizeClasses */
|
|
48145
48149
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
48146
48150
|
|
|
48147
48151
|
"use strict";
|
|
@@ -48179,6 +48183,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48179
48183
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
|
|
48180
48184
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPrefixedScopedSlots", function() { return getPrefixedScopedSlots; });
|
|
48181
48185
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSlot", function() { return getSlot; });
|
|
48186
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flattenSlotContent", function() { return flattenSlotContent; });
|
|
48187
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSlotContent", function() { return hasSlotContent; });
|
|
48182
48188
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return clamp; });
|
|
48183
48189
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "padEnd", function() { return padEnd; });
|
|
48184
48190
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chunk", function() { return chunk; });
|
|
@@ -48715,6 +48721,18 @@ function getSlot(vm, name, data, optional) {
|
|
|
48715
48721
|
|
|
48716
48722
|
return undefined;
|
|
48717
48723
|
}
|
|
48724
|
+
function flattenSlotContent(content) {
|
|
48725
|
+
if (content == null) return [];
|
|
48726
|
+
var items = Array.isArray(content) ? content : [content];
|
|
48727
|
+
return items.flatMap(function (item) {
|
|
48728
|
+
if (item == null || item.type === vue__WEBPACK_IMPORTED_MODULE_0__["Comment"]) return [];
|
|
48729
|
+
if (Array.isArray(item)) return flattenSlotContent(item);
|
|
48730
|
+
return [item];
|
|
48731
|
+
});
|
|
48732
|
+
}
|
|
48733
|
+
function hasSlotContent(content) {
|
|
48734
|
+
return flattenSlotContent(content).length > 0;
|
|
48735
|
+
}
|
|
48718
48736
|
function clamp(value, min, max) {
|
|
48719
48737
|
if (min === void 0) {
|
|
48720
48738
|
min = 0;
|