@dimailn/vuetify 2.7.2-alpha20 → 2.7.2-alpha21

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.
Files changed (35) hide show
  1. package/dist/vuetify.js +125 -44
  2. package/dist/vuetify.js.map +1 -1
  3. package/dist/vuetify.min.js +1 -1
  4. package/es5/components/VTabs/VTabs.js +1 -1
  5. package/es5/components/VTabs/VTabs.js.map +1 -1
  6. package/es5/install.js +10 -33
  7. package/es5/install.js.map +1 -1
  8. package/es5/mixins/detachable/index.js +2 -3
  9. package/es5/mixins/detachable/index.js.map +1 -1
  10. package/es5/util/helpers.js +44 -0
  11. package/es5/util/helpers.js.map +1 -1
  12. package/es5/util/legacyEventsMixin.js +48 -0
  13. package/es5/util/legacyEventsMixin.js.map +1 -0
  14. package/lib/components/VTabs/VTabs.js +1 -1
  15. package/lib/components/VTabs/VTabs.js.map +1 -1
  16. package/lib/install.js +5 -28
  17. package/lib/install.js.map +1 -1
  18. package/lib/mixins/detachable/index.js +3 -4
  19. package/lib/mixins/detachable/index.js.map +1 -1
  20. package/lib/util/helpers.js +42 -0
  21. package/lib/util/helpers.js.map +1 -1
  22. package/lib/util/legacyEventsMixin.js +37 -0
  23. package/lib/util/legacyEventsMixin.js.map +1 -0
  24. package/package.json +1 -1
  25. package/src/components/VTabs/VTabs.ts +1 -1
  26. package/src/components/VTabs/__tests__/VTab.spec.ts +48 -37
  27. package/src/components/VTabs/__tests__/VTabs.spec.ts +134 -79
  28. package/src/components/VTabs/__tests__/VTabsBar.spec.ts +67 -26
  29. package/src/components/VTabs/__tests__/VTabsSlider.spec.ts +7 -6
  30. package/src/components/VTabs/__tests__/__snapshots__/VTabs.spec.ts.snap +1 -3
  31. package/src/install.ts +10 -32
  32. package/src/mixins/detachable/index.ts +2 -1
  33. package/src/util/__tests__/helpers.spec.ts +62 -1
  34. package/src/util/helpers.ts +42 -1
  35. package/src/util/legacyEventsMixin.ts +34 -0
package/dist/vuetify.js CHANGED
@@ -28722,7 +28722,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_10__["default"])(_
28722
28722
  nextIcon: this.nextIcon,
28723
28723
  prevIcon: this.prevIcon,
28724
28724
  showArrows: this.showArrows,
28725
- value: this.internalValue,
28725
+ modelValue: this.internalValue,
28726
28726
  'onCall:slider': this.callSlider,
28727
28727
  'onUpdate:modelValue': function onUpdateModelValue(val) {
28728
28728
  _this.internalValue = val;
@@ -35243,6 +35243,24 @@ __webpack_require__.r(__webpack_exports__);
35243
35243
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
35244
35244
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue");
35245
35245
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
35246
+ /* harmony import */ var _util_legacyEventsMixin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/legacyEventsMixin */ "./src/util/legacyEventsMixin.ts");
35247
+ var __assign = undefined && undefined.__assign || function () {
35248
+ __assign = Object.assign || function (t) {
35249
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
35250
+ s = arguments[i];
35251
+
35252
+ for (var p in s) {
35253
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
35254
+ }
35255
+ }
35256
+
35257
+ return t;
35258
+ };
35259
+
35260
+ return __assign.apply(this, arguments);
35261
+ };
35262
+
35263
+
35246
35264
 
35247
35265
  function install(Vue, args) {
35248
35266
  // if ((install as any).installed) return
@@ -35286,6 +35304,7 @@ function install(Vue, args) {
35286
35304
  if (Vue.$_vuetify_installed) return;
35287
35305
  Vue.$_vuetify_installed = true;
35288
35306
  Vue.mixin({
35307
+ computed: __assign({}, _util_legacyEventsMixin__WEBPACK_IMPORTED_MODULE_1__["legacyEventsMixin"].computed),
35289
35308
  beforeCreate: function beforeCreate() {
35290
35309
  var options = this.$options;
35291
35310
 
@@ -35312,39 +35331,7 @@ function install(Vue, args) {
35312
35331
  this.$vuetify.breakpoint.update();
35313
35332
  }
35314
35333
  },
35315
- methods: {
35316
- $emitLegacy: function $emitLegacy(eventName, args) {
35317
- if (!this.eventsLegacy || !this.eventsLegacy[eventName]) return;
35318
- this.eventsLegacy[eventName].forEach(function (listener) {
35319
- return listener(args);
35320
- });
35321
- },
35322
- $on: function $on(eventName, listener) {
35323
- var _a;
35324
-
35325
- this.eventsLegacy || (this.eventsLegacy = {});
35326
- (_a = this.eventsLegacy)[eventName] || (_a[eventName] = []);
35327
- this.eventsLegacy[eventName].push(listener); // console.warn("$on is not available")
35328
- },
35329
- $off: function $off(eventName, listener) {
35330
- this.eventsLegacy[eventName] = this.eventsLegacy[eventName].filter(function (_listener) {
35331
- return _listener !== listener;
35332
- }); // console.warn('$off is not available')
35333
- }
35334
- },
35335
- computed: {
35336
- $listeners: function $listeners() {
35337
- var _this = this;
35338
-
35339
- var names = Object.keys(this.$attrs).filter(function (name) {
35340
- return name.startsWith('on');
35341
- });
35342
- return names.reduce(function (listeners, name) {
35343
- listeners[name] = _this.$attrs[name];
35344
- return listeners;
35345
- }, {});
35346
- }
35347
- }
35334
+ methods: __assign({}, _util_legacyEventsMixin__WEBPACK_IMPORTED_MODULE_1__["legacyEventsMixin"].methods)
35348
35335
  });
35349
35336
  }
35350
35337
 
@@ -40096,14 +40083,11 @@ function searchChildren(children) {
40096
40083
  "use strict";
40097
40084
  __webpack_require__.r(__webpack_exports__);
40098
40085
  /* harmony import */ var _bootable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bootable */ "./src/mixins/bootable/index.ts");
40099
- /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
40100
- /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
40101
- /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
40086
+ /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
40087
+ /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
40102
40088
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
40103
40089
 
40104
40090
  // Mixins
40105
- // Utilities
40106
-
40107
40091
 
40108
40092
 
40109
40093
 
@@ -40123,7 +40107,7 @@ function removeActivator(activator) {
40123
40107
  /* @vue/component */
40124
40108
 
40125
40109
 
40126
- /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_2__["default"])(_bootable__WEBPACK_IMPORTED_MODULE_0__["default"]).extend({
40110
+ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_1__["default"])(_bootable__WEBPACK_IMPORTED_MODULE_0__["default"]).extend({
40127
40111
  name: 'detachable',
40128
40112
  props: {
40129
40113
  attach: {
@@ -40205,9 +40189,10 @@ function removeActivator(activator) {
40205
40189
  },
40206
40190
  methods: {
40207
40191
  getScopeIdAttrs: function getScopeIdAttrs() {
40208
- var _a;
40192
+ var _a; // В Vue 3 $vnode больше не существует, используем современный способ
40193
+
40209
40194
 
40210
- var scopeId = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["getObjectValueByPath"])(this.$vnode, 'context.$options._scopeId');
40195
+ var scopeId = this.$options._scopeId || this.$options.__scopeId;
40211
40196
  return scopeId && (_a = {}, _a[scopeId] = '', _a);
40212
40197
  },
40213
40198
  initDetach: function initDetach() {
@@ -40231,7 +40216,7 @@ function removeActivator(activator) {
40231
40216
  }
40232
40217
 
40233
40218
  if (!target) {
40234
- Object(_util_console__WEBPACK_IMPORTED_MODULE_3__["consoleWarn"])("Unable to locate target " + (this.attach || '[data-app]'), this);
40219
+ Object(_util_console__WEBPACK_IMPORTED_MODULE_2__["consoleWarn"])("Unable to locate target " + (this.attach || '[data-app]'), this);
40235
40220
  return;
40236
40221
  }
40237
40222
 
@@ -46057,7 +46042,7 @@ function attachedRoot(node) {
46057
46042
  /*!*****************************!*\
46058
46043
  !*** ./src/util/helpers.ts ***!
46059
46044
  \*****************************/
46060
- /*! exports provided: 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, getSlotType, debounce, throttle, getPrefixedScopedSlots, getSlot, clamp, padEnd, chunk, humanReadableFileSize, camelizeObjectKeys, mergeDeep, fillArray, composedPath, normalizeAttrs */
46045
+ /*! exports provided: 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, getSlotType, debounce, throttle, getPrefixedScopedSlots, getSlot, clamp, padEnd, chunk, humanReadableFileSize, camelizeObjectKeys, mergeDeep, fillArray, composedPath, normalizeAttrs, normalizeClasses */
46061
46046
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
46062
46047
 
46063
46048
  "use strict";
@@ -46102,6 +46087,7 @@ __webpack_require__.r(__webpack_exports__);
46102
46087
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fillArray", function() { return fillArray; });
46103
46088
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "composedPath", function() { return composedPath; });
46104
46089
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeAttrs", function() { return normalizeAttrs; });
46090
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeClasses", function() { return normalizeClasses; });
46105
46091
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue");
46106
46092
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
46107
46093
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
@@ -46697,6 +46683,101 @@ function normalizeAttrs(attrs) {
46697
46683
 
46698
46684
  return obj;
46699
46685
  }
46686
+ /**
46687
+ * Нормализует классы из различных форматов в объект
46688
+ * @param classes - классы в виде строки, объекта или массива
46689
+ * @returns объект с нормализованными классами
46690
+ */
46691
+
46692
+ function normalizeClasses(classes) {
46693
+ if (!classes) return {};
46694
+
46695
+ if (_typeof(classes) === 'object' && !Array.isArray(classes)) {
46696
+ return classes;
46697
+ }
46698
+
46699
+ if (typeof classes === 'string') {
46700
+ var trimmed = classes.trim();
46701
+ if (!trimmed) return {};
46702
+ return trimmed.split(/\s+/).reduce(function (acc, cls) {
46703
+ acc[cls] = true;
46704
+ return acc;
46705
+ }, {});
46706
+ }
46707
+
46708
+ if (Array.isArray(classes)) {
46709
+ return classes.reduce(function (acc, cls) {
46710
+ if (typeof cls === 'string') {
46711
+ var trimmed = cls.trim();
46712
+
46713
+ if (trimmed) {
46714
+ trimmed.split(/\s+/).forEach(function (className) {
46715
+ acc[className] = true;
46716
+ });
46717
+ }
46718
+ } else if (cls && _typeof(cls) === 'object') {
46719
+ Object.assign(acc, cls);
46720
+ }
46721
+
46722
+ return acc;
46723
+ }, {});
46724
+ }
46725
+
46726
+ return {};
46727
+ }
46728
+
46729
+ /***/ }),
46730
+
46731
+ /***/ "./src/util/legacyEventsMixin.ts":
46732
+ /*!***************************************!*\
46733
+ !*** ./src/util/legacyEventsMixin.ts ***!
46734
+ \***************************************/
46735
+ /*! exports provided: legacyEventsMixin */
46736
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
46737
+
46738
+ "use strict";
46739
+ __webpack_require__.r(__webpack_exports__);
46740
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "legacyEventsMixin", function() { return legacyEventsMixin; });
46741
+ // Legacy events mixin for Vue 3 migration
46742
+ // Provides $on, $off, and $emitLegacy methods to maintain compatibility with Vue 2 code
46743
+ var legacyEventsMixin = {
46744
+ methods: {
46745
+ $emitLegacy: function $emitLegacy(eventName, args) {
46746
+ if (!this.eventsLegacy || !this.eventsLegacy[eventName]) return;
46747
+ this.eventsLegacy[eventName].forEach(function (listener) {
46748
+ return listener(args);
46749
+ });
46750
+ },
46751
+ $on: function $on(eventName, listener) {
46752
+ var _a;
46753
+
46754
+ this.eventsLegacy || (this.eventsLegacy = {});
46755
+ (_a = this.eventsLegacy)[eventName] || (_a[eventName] = []);
46756
+ this.eventsLegacy[eventName].push(listener); // console.warn("$on is not available")
46757
+ },
46758
+ $off: function $off(eventName, listener) {
46759
+ if (this.eventsLegacy && this.eventsLegacy[eventName]) {
46760
+ this.eventsLegacy[eventName] = this.eventsLegacy[eventName].filter(function (_listener) {
46761
+ return _listener !== listener;
46762
+ });
46763
+ } // console.warn('$off is not available')
46764
+
46765
+ }
46766
+ },
46767
+ computed: {
46768
+ $listeners: function $listeners() {
46769
+ var _this = this;
46770
+
46771
+ var names = Object.keys(this.$attrs).filter(function (name) {
46772
+ return name.startsWith('on');
46773
+ });
46774
+ return names.reduce(function (listeners, name) {
46775
+ listeners[name] = _this.$attrs[name];
46776
+ return listeners;
46777
+ }, {});
46778
+ }
46779
+ }
46780
+ };
46700
46781
 
46701
46782
  /***/ }),
46702
46783