@vuetify/nightly 3.8.4-master.2025-05-12 → 3.8.4-master.2025-05-13
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 +15 -3
- package/dist/json/attributes.json +3567 -3559
- package/dist/json/importMap-labs.json +28 -28
- package/dist/json/importMap.json +166 -166
- package/dist/json/tags.json +2 -0
- package/dist/json/web-types.json +6513 -6483
- package/dist/vuetify-labs.cjs +82 -8
- package/dist/vuetify-labs.css +4320 -4320
- package/dist/vuetify-labs.d.ts +80 -62
- package/dist/vuetify-labs.esm.js +82 -8
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +82 -8
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +3 -3
- package/dist/vuetify.css +4776 -4776
- package/dist/vuetify.d.ts +62 -62
- package/dist/vuetify.esm.js +3 -3
- package/dist/vuetify.js +3 -3
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +3 -3
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +62 -62
- package/lib/framework.js +1 -1
- package/lib/labs/VDateInput/VDateInput.d.ts +28 -0
- package/lib/labs/VDateInput/VDateInput.js +79 -5
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/package.json +1 -1
package/dist/vuetify-labs.cjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.4-master.2025-05-
|
2
|
+
* Vuetify v3.8.4-master.2025-05-13
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
@@ -29080,10 +29080,12 @@
|
|
29080
29080
|
|
29081
29081
|
const makeVDateInputProps = propsFactory({
|
29082
29082
|
displayFormat: [Function, String],
|
29083
|
+
inputFormat: [Function, String],
|
29083
29084
|
location: {
|
29084
29085
|
type: String,
|
29085
29086
|
default: 'bottom start'
|
29086
29087
|
},
|
29088
|
+
menu: Boolean,
|
29087
29089
|
updateOn: {
|
29088
29090
|
type: Array,
|
29089
29091
|
default: () => ['blur', 'enter']
|
@@ -29110,7 +29112,8 @@
|
|
29110
29112
|
emits: {
|
29111
29113
|
save: value => true,
|
29112
29114
|
cancel: () => true,
|
29113
|
-
'update:modelValue': val => true
|
29115
|
+
'update:modelValue': val => true,
|
29116
|
+
'update:menu': val => true
|
29114
29117
|
},
|
29115
29118
|
setup(props, _ref) {
|
29116
29119
|
let {
|
@@ -29131,7 +29134,7 @@
|
|
29131
29134
|
} = useFocus(props);
|
29132
29135
|
const emptyModelValue = () => props.multiple ? [] : null;
|
29133
29136
|
const model = useProxiedModel(props, 'modelValue', emptyModelValue(), val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val, val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val);
|
29134
|
-
const menu =
|
29137
|
+
const menu = useProxiedModel(props, 'menu');
|
29135
29138
|
const isEditingInput = vue.shallowRef(false);
|
29136
29139
|
const vTextFieldRef = vue.ref();
|
29137
29140
|
const disabledActions = vue.ref(['save']);
|
@@ -29141,6 +29144,79 @@
|
|
29141
29144
|
}
|
29142
29145
|
return adapter.format(date, props.displayFormat ?? 'keyboardDate');
|
29143
29146
|
}
|
29147
|
+
function parseDateString(dateString, format) {
|
29148
|
+
function countConsecutiveChars(str, startIndex) {
|
29149
|
+
const char = str[startIndex];
|
29150
|
+
let count = 0;
|
29151
|
+
while (str[startIndex + count] === char) count++;
|
29152
|
+
return count;
|
29153
|
+
}
|
29154
|
+
function parseDateParts(dateString, format) {
|
29155
|
+
const dateParts = {};
|
29156
|
+
let stringIndex = 0;
|
29157
|
+
const upperFormat = format.toUpperCase();
|
29158
|
+
for (let formatIndex = 0; formatIndex < upperFormat.length;) {
|
29159
|
+
const formatChar = upperFormat[formatIndex];
|
29160
|
+
const charCount = countConsecutiveChars(upperFormat, formatIndex);
|
29161
|
+
const dateValue = dateString.slice(stringIndex, stringIndex + charCount);
|
29162
|
+
if (['Y', 'M', 'D'].includes(formatChar)) {
|
29163
|
+
const numValue = parseInt(dateValue);
|
29164
|
+
if (isNaN(numValue)) return null;
|
29165
|
+
dateParts[formatChar] = numValue;
|
29166
|
+
}
|
29167
|
+
formatIndex += charCount;
|
29168
|
+
stringIndex += charCount;
|
29169
|
+
}
|
29170
|
+
return dateParts;
|
29171
|
+
}
|
29172
|
+
function validateDateParts(dateParts) {
|
29173
|
+
const {
|
29174
|
+
Y: year,
|
29175
|
+
M: month,
|
29176
|
+
D: day
|
29177
|
+
} = dateParts;
|
29178
|
+
if (!year || !month || !day) return null;
|
29179
|
+
if (month < 1 || month > 12) return null;
|
29180
|
+
if (day < 1 || day > 31) return null;
|
29181
|
+
return {
|
29182
|
+
year,
|
29183
|
+
month,
|
29184
|
+
day
|
29185
|
+
};
|
29186
|
+
}
|
29187
|
+
const dateParts = parseDateParts(dateString, format);
|
29188
|
+
if (!dateParts) return null;
|
29189
|
+
const validatedParts = validateDateParts(dateParts);
|
29190
|
+
if (!validatedParts) return null;
|
29191
|
+
const {
|
29192
|
+
year,
|
29193
|
+
month,
|
29194
|
+
day
|
29195
|
+
} = validatedParts;
|
29196
|
+
return {
|
29197
|
+
year,
|
29198
|
+
month,
|
29199
|
+
day
|
29200
|
+
};
|
29201
|
+
}
|
29202
|
+
function parseUserInput(value) {
|
29203
|
+
if (typeof props.inputFormat === 'function') {
|
29204
|
+
return props.inputFormat(value);
|
29205
|
+
}
|
29206
|
+
if (typeof props.inputFormat === 'string') {
|
29207
|
+
const formattedDate = parseDateString(value, props.inputFormat);
|
29208
|
+
if (!formattedDate) {
|
29209
|
+
return model.value;
|
29210
|
+
}
|
29211
|
+
const {
|
29212
|
+
year,
|
29213
|
+
month,
|
29214
|
+
day
|
29215
|
+
} = formattedDate;
|
29216
|
+
return adapter.parseISO(`${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`);
|
29217
|
+
}
|
29218
|
+
return adapter.isValid(value) ? adapter.date(value) : model.value;
|
29219
|
+
}
|
29144
29220
|
const display = vue.computed(() => {
|
29145
29221
|
const value = wrapInArray(model.value);
|
29146
29222
|
if (!value.length) return null;
|
@@ -29174,7 +29250,6 @@
|
|
29174
29250
|
if (e.key !== 'Enter') return;
|
29175
29251
|
if (!menu.value || !isFocused.value) {
|
29176
29252
|
menu.value = true;
|
29177
|
-
return;
|
29178
29253
|
}
|
29179
29254
|
if (props.updateOn.includes('enter')) {
|
29180
29255
|
onUserInput(e.target);
|
@@ -29218,8 +29293,7 @@
|
|
29218
29293
|
let {
|
29219
29294
|
value
|
29220
29295
|
} = _ref2;
|
29221
|
-
|
29222
|
-
model.value = !value ? emptyModelValue() : value;
|
29296
|
+
model.value = !value ? emptyModelValue() : parseUserInput(value);
|
29223
29297
|
}
|
29224
29298
|
useRender(() => {
|
29225
29299
|
const confirmEditProps = VConfirmEdit.filterProps(props);
|
@@ -31669,7 +31743,7 @@
|
|
31669
31743
|
};
|
31670
31744
|
});
|
31671
31745
|
}
|
31672
|
-
const version$1 = "3.8.4-master.2025-05-
|
31746
|
+
const version$1 = "3.8.4-master.2025-05-13";
|
31673
31747
|
createVuetify$1.version = version$1;
|
31674
31748
|
|
31675
31749
|
// Vue's inject() can only be used in setup
|
@@ -31967,7 +32041,7 @@
|
|
31967
32041
|
|
31968
32042
|
/* eslint-disable local-rules/sort-imports */
|
31969
32043
|
|
31970
|
-
const version = "3.8.4-master.2025-05-
|
32044
|
+
const version = "3.8.4-master.2025-05-13";
|
31971
32045
|
|
31972
32046
|
/* eslint-disable local-rules/sort-imports */
|
31973
32047
|
|