@dimailn/vuetify 2.7.2-alpha22 → 2.7.2-alpha23

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 CHANGED
@@ -16141,6 +16141,7 @@ var __assign = undefined && undefined.__assign || function () {
16141
16141
 
16142
16142
 
16143
16143
 
16144
+ // Helpers
16144
16145
 
16145
16146
 
16146
16147
  /* @vue/component */
@@ -16173,39 +16174,50 @@ var __assign = undefined && undefined.__assign || function () {
16173
16174
  handler: function handler(val) {
16174
16175
  var errors = Object.values(val).includes(true);
16175
16176
  this.$emit('input', !errors);
16177
+ this.$emit('update:modelValue', !errors);
16176
16178
  },
16177
16179
  deep: true,
16178
16180
  immediate: true
16179
16181
  }
16180
16182
  },
16181
16183
  methods: {
16184
+ getInputUid: function getInputUid(input) {
16185
+ return input.$.uid;
16186
+ },
16182
16187
  watchInput: function watchInput(input) {
16183
16188
  var _this = this;
16184
16189
 
16185
- var watcher = function watcher(input) {
16186
- return input.$watch('hasError', function (val) {
16187
- _this.errorBag[input.$.uid] = val;
16188
- }, {
16189
- immediate: true
16190
- });
16190
+ var inputId = this.getInputUid(input);
16191
+
16192
+ var createErrorWatcher = function createErrorWatcher(inputComponent) {
16193
+ if (typeof inputComponent.$watch === 'function') {
16194
+ return inputComponent.$watch('hasError', function (hasError) {
16195
+ _this.errorBag[inputId] = hasError;
16196
+ }, {
16197
+ immediate: true
16198
+ });
16199
+ } else {
16200
+ // Fallback для Vue 3
16201
+ return function () {};
16202
+ }
16191
16203
  };
16192
16204
 
16193
16205
  var watchers = {
16194
- _uid: input.$.uid,
16206
+ _uid: inputId,
16195
16207
  valid: function valid() {},
16196
16208
  shouldValidate: function shouldValidate() {}
16197
16209
  };
16198
16210
 
16199
16211
  if (this.lazyValidation) {
16200
- // Only start watching inputs if we need to
16201
- watchers.shouldValidate = input.$watch('shouldValidate', function (val) {
16202
- if (!val) return; // Only watch if we're not already doing it
16203
-
16204
- if (_this.errorBag.hasOwnProperty(input.$.uid)) return;
16205
- watchers.valid = watcher(input);
16206
- });
16212
+ if (typeof input.$watch === 'function') {
16213
+ watchers.shouldValidate = input.$watch('shouldValidate', function (shouldValidate) {
16214
+ if (!shouldValidate) return;
16215
+ if (_this.errorBag.hasOwnProperty(inputId)) return;
16216
+ watchers.valid = createErrorWatcher(input);
16217
+ });
16218
+ }
16207
16219
  } else {
16208
- watchers.valid = watcher(input);
16220
+ watchers.valid = createErrorWatcher(input);
16209
16221
  }
16210
16222
 
16211
16223
  return watchers;
@@ -16248,26 +16260,29 @@ var __assign = undefined && undefined.__assign || function () {
16248
16260
  this.watchers.push(this.watchInput(input));
16249
16261
  },
16250
16262
  unregister: function unregister(input) {
16251
- var found = this.inputs.find(function (i) {
16252
- return i.$.uid === input.$.uid;
16263
+ var _this = this;
16264
+
16265
+ var inputId = this.getInputUid(input);
16266
+ var foundInput = this.inputs.find(function (inputComponent) {
16267
+ return _this.getInputUid(inputComponent) === inputId;
16253
16268
  });
16254
- if (!found) return;
16255
- var unwatch = this.watchers.find(function (i) {
16256
- return i._uid === found.$.uid;
16269
+ if (!foundInput) return;
16270
+ var inputWatcher = this.watchers.find(function (watcher) {
16271
+ return watcher._uid === inputId;
16257
16272
  });
16258
16273
 
16259
- if (unwatch) {
16260
- unwatch.valid();
16261
- unwatch.shouldValidate();
16274
+ if (inputWatcher) {
16275
+ inputWatcher.valid();
16276
+ inputWatcher.shouldValidate();
16262
16277
  }
16263
16278
 
16264
- this.watchers = this.watchers.filter(function (i) {
16265
- return i._uid !== found.$.uid;
16279
+ this.watchers = this.watchers.filter(function (watcher) {
16280
+ return watcher._uid !== inputId;
16266
16281
  });
16267
- this.inputs = this.inputs.filter(function (i) {
16268
- return i.$.uid !== found.$.uid;
16282
+ this.inputs = this.inputs.filter(function (inputComponent) {
16283
+ return _this.getInputUid(inputComponent) !== inputId;
16269
16284
  });
16270
- delete this.errorBag[found.$.uid];
16285
+ delete this.errorBag[inputId];
16271
16286
  }
16272
16287
  },
16273
16288
  render: function render() {
@@ -35224,7 +35239,7 @@ function () {
35224
35239
 
35225
35240
  Vuetify.install = _install__WEBPACK_IMPORTED_MODULE_0__["install"];
35226
35241
  Vuetify.installed = false;
35227
- Vuetify.version = "2.7.2-alpha21";
35242
+ Vuetify.version = "2.7.2-alpha22";
35228
35243
  Vuetify.config = {
35229
35244
  silent: false
35230
35245
  };
@@ -42928,7 +42943,8 @@ __webpack_require__.r(__webpack_exports__);
42928
42943
  /* harmony import */ var _registrable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../registrable */ "./src/mixins/registrable/index.ts");
42929
42944
  /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
42930
42945
  /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
42931
- /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
42946
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue */ "vue");
42947
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_5__);
42932
42948
  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); }
42933
42949
 
42934
42950
  // Mixins
@@ -42939,11 +42955,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
42939
42955
 
42940
42956
 
42941
42957
 
42942
- var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_colorable__WEBPACK_IMPORTED_MODULE_0__["default"], Object(_registrable__WEBPACK_IMPORTED_MODULE_2__["inject"])('form'), _themeable__WEBPACK_IMPORTED_MODULE_1__["default"]);
42943
42958
  /* @vue/component */
42944
42959
 
42945
- /* harmony default export */ __webpack_exports__["default"] = (baseMixins.extend({
42960
+ /* harmony default export */ __webpack_exports__["default"] = (Object(vue__WEBPACK_IMPORTED_MODULE_5__["defineComponent"])({
42946
42961
  name: 'validatable',
42962
+ extends: Object(_registrable__WEBPACK_IMPORTED_MODULE_2__["inject"])('form'),
42963
+ mixins: [_colorable__WEBPACK_IMPORTED_MODULE_0__["default"], _themeable__WEBPACK_IMPORTED_MODULE_1__["default"]],
42947
42964
  props: {
42948
42965
  disabled: {
42949
42966
  type: Boolean,
@@ -42989,6 +43006,8 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_c
42989
43006
  }
42990
43007
  },
42991
43008
  data: function data() {
43009
+ var _a;
43010
+
42992
43011
  return {
42993
43012
  errorBucket: [],
42994
43013
  hasColor: false,
@@ -42996,7 +43015,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_c
42996
43015
  hasInput: false,
42997
43016
  isFocused: false,
42998
43017
  isResetting: false,
42999
- lazyValue: this.value,
43018
+ lazyValue: (_a = this.modelValue) !== null && _a !== void 0 ? _a : null,
43000
43019
  valid: false
43001
43020
  };
43002
43021
  },
@@ -43045,6 +43064,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_c
43045
43064
  set: function set(val) {
43046
43065
  this.lazyValue = val;
43047
43066
  this.$emit('input', val);
43067
+ this.$emit('update:modelValue', val);
43048
43068
  }
43049
43069
  },
43050
43070
  isDisabled: function isDisabled() {