vuetify 3.7.15 → 3.7.17
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/json/attributes.json +3529 -3525
- package/dist/json/importMap-labs.json +12 -12
- package/dist/json/importMap.json +164 -164
- package/dist/json/tags.json +3 -2
- package/dist/json/web-types.json +6568 -6536
- package/dist/vuetify-labs.css +3153 -3152
- package/dist/vuetify-labs.d.ts +438 -200
- package/dist/vuetify-labs.esm.js +165 -141
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +164 -140
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +3426 -3425
- package/dist/vuetify.d.ts +387 -207
- package/dist/vuetify.esm.js +110 -83
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +109 -82
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +471 -470
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/index.d.mts +15 -6
- package/lib/components/VAutocomplete/index.d.mts +23 -8
- package/lib/components/VBadge/VBadge.mjs +2 -2
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.mjs +6 -3
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.mts +15 -6
- package/lib/components/VCard/VCard.mjs +12 -3
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +11 -4
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/index.d.mts +75 -30
- package/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VChip/VChip.mjs +6 -3
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/index.d.mts +15 -6
- package/lib/components/VCombobox/index.d.mts +23 -8
- package/lib/components/VDataIterator/index.d.mts +2 -2
- package/lib/components/VDataTable/composables/headers.mjs +3 -1
- package/lib/components/VDataTable/composables/headers.mjs.map +1 -1
- package/lib/components/VDataTable/composables/paginate.mjs +2 -2
- package/lib/components/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +34 -34
- package/lib/components/VDataTable/types.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.mjs +5 -5
- package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +12 -21
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VDatePicker/index.d.mts +3 -3
- package/lib/components/VDialog/__test__/VDialog.spec.browser.mjs +50 -0
- package/lib/components/VDialog/__test__/VDialog.spec.browser.mjs.map +1 -0
- package/lib/components/VDialog/index.d.mts +21 -6
- package/lib/components/VFab/index.d.mts +15 -6
- package/lib/components/VField/VField.mjs +1 -6
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.mjs +2 -2
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +11 -5
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +32 -14
- package/lib/components/VMenu/index.d.mts +21 -6
- package/lib/components/VOverlay/VOverlay.mjs +10 -1
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +6 -0
- package/lib/components/VPagination/VPagination.mjs +3 -3
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VParallax/VParallax.mjs +1 -1
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VRating/VRating.mjs +1 -1
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +23 -8
- package/lib/components/VSlider/slider.mjs +1 -1
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.mts +21 -6
- package/lib/components/VSparkline/VBarline.mjs +1 -1
- package/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/lib/components/VTabs/index.d.mts +39 -24
- package/lib/components/VTextField/VTextField.mjs +2 -2
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.mjs +4 -4
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.css +1 -0
- package/lib/components/VToolbar/VToolbar.sass +1 -0
- package/lib/components/VTooltip/index.d.mts +21 -6
- package/lib/components/index.d.mts +333 -153
- package/lib/composables/stack.mjs +2 -2
- package/lib/composables/stack.mjs.map +1 -1
- package/lib/composables/theme.mjs +1 -1
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/validation.mjs +2 -2
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +54 -54
- package/lib/labs/VDateInput/VDateInput.mjs +4 -3
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VDateInput/index.d.mts +10 -10
- package/lib/labs/VFileUpload/VFileUpload.mjs +3 -2
- package/lib/labs/VFileUpload/VFileUpload.mjs.map +1 -1
- package/lib/labs/VFileUpload/index.d.mts +32 -14
- package/lib/labs/VNumberInput/VNumberInput.mjs +5 -5
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VSnackbarQueue/index.d.mts +21 -6
- package/lib/labs/VTimePicker/VTimePicker.mjs +30 -31
- package/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs +14 -13
- package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +35 -13
- package/lib/labs/VTimePicker/shared.mjs +2 -0
- package/lib/labs/VTimePicker/shared.mjs.map +1 -0
- package/lib/labs/VTreeview/index.d.mts +32 -14
- package/lib/labs/components.d.mts +128 -55
- package/lib/locale/adapters/vuetify.mjs +1 -1
- package/lib/locale/adapters/vuetify.mjs.map +1 -1
- package/lib/util/animation.mjs +8 -8
- package/lib/util/animation.mjs.map +1 -1
- package/lib/util/helpers.mjs +6 -4
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +0 -39
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +0 -1
- package/lib/labs/VTimePicker/SelectingTimes.mjs +0 -10
- package/lib/labs/VTimePicker/SelectingTimes.mjs.map +0 -1
package/dist/vuetify-labs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.7.
|
|
2
|
+
* Vuetify v3.7.17
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -155,12 +155,14 @@
|
|
|
155
155
|
let unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'px';
|
|
156
156
|
if (str == null || str === '') {
|
|
157
157
|
return undefined;
|
|
158
|
-
}
|
|
158
|
+
}
|
|
159
|
+
const num = Number(str);
|
|
160
|
+
if (isNaN(num)) {
|
|
159
161
|
return String(str);
|
|
160
|
-
} else if (!isFinite(
|
|
162
|
+
} else if (!isFinite(num)) {
|
|
161
163
|
return undefined;
|
|
162
164
|
} else {
|
|
163
|
-
return `${
|
|
165
|
+
return `${num}${unit}`;
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
168
|
function isObject(obj) {
|
|
@@ -694,16 +696,16 @@
|
|
|
694
696
|
let ta, sx, sy, dx, dy;
|
|
695
697
|
if (tx.startsWith('matrix3d(')) {
|
|
696
698
|
ta = tx.slice(9, -1).split(/, /);
|
|
697
|
-
sx =
|
|
698
|
-
sy =
|
|
699
|
-
dx =
|
|
700
|
-
dy =
|
|
699
|
+
sx = Number(ta[0]);
|
|
700
|
+
sy = Number(ta[5]);
|
|
701
|
+
dx = Number(ta[12]);
|
|
702
|
+
dy = Number(ta[13]);
|
|
701
703
|
} else if (tx.startsWith('matrix(')) {
|
|
702
704
|
ta = tx.slice(7, -1).split(/, /);
|
|
703
|
-
sx =
|
|
704
|
-
sy =
|
|
705
|
-
dx =
|
|
706
|
-
dy =
|
|
705
|
+
sx = Number(ta[0]);
|
|
706
|
+
sy = Number(ta[3]);
|
|
707
|
+
dx = Number(ta[4]);
|
|
708
|
+
dy = Number(ta[5]);
|
|
707
709
|
} else {
|
|
708
710
|
return new Box(rect);
|
|
709
711
|
}
|
|
@@ -2079,7 +2081,7 @@
|
|
|
2079
2081
|
const LANG_PREFIX = '$vuetify.';
|
|
2080
2082
|
const replace = (str, params) => {
|
|
2081
2083
|
return str.replace(/\{(\d+)\}/g, (match, index) => {
|
|
2082
|
-
return String(params[
|
|
2084
|
+
return String(params[Number(index)]);
|
|
2083
2085
|
});
|
|
2084
2086
|
};
|
|
2085
2087
|
const createTranslateFunction = (current, fallback, messages) => {
|
|
@@ -2449,7 +2451,7 @@
|
|
|
2449
2451
|
function getHead() {
|
|
2450
2452
|
return {
|
|
2451
2453
|
style: [{
|
|
2452
|
-
|
|
2454
|
+
textContent: styles.value,
|
|
2453
2455
|
id: 'vuetify-theme-stylesheet',
|
|
2454
2456
|
nonce: parsedOptions.cspNonce || false
|
|
2455
2457
|
}]
|
|
@@ -5576,7 +5578,10 @@
|
|
|
5576
5578
|
type: [Boolean, Object],
|
|
5577
5579
|
default: true
|
|
5578
5580
|
},
|
|
5579
|
-
text:
|
|
5581
|
+
text: {
|
|
5582
|
+
type: [String, Number, Boolean],
|
|
5583
|
+
default: undefined
|
|
5584
|
+
},
|
|
5580
5585
|
...makeBorderProps(),
|
|
5581
5586
|
...makeComponentProps(),
|
|
5582
5587
|
...makeDensityProps(),
|
|
@@ -5732,7 +5737,7 @@
|
|
|
5732
5737
|
}
|
|
5733
5738
|
}
|
|
5734
5739
|
}, {
|
|
5735
|
-
default: () => [slots.default?.() ?? props.text]
|
|
5740
|
+
default: () => [slots.default?.() ?? vue.toDisplayString(props.text)]
|
|
5736
5741
|
})]), !props.icon && hasAppend && vue.createVNode("span", {
|
|
5737
5742
|
"key": "append",
|
|
5738
5743
|
"class": "v-btn__append"
|
|
@@ -6740,7 +6745,7 @@
|
|
|
6740
6745
|
const isPristine = vue.shallowRef(true);
|
|
6741
6746
|
const isDirty = vue.computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));
|
|
6742
6747
|
const errorMessages = vue.computed(() => {
|
|
6743
|
-
return props.errorMessages?.length ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0,
|
|
6748
|
+
return props.errorMessages?.length ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, Number(props.maxErrors))) : internalErrorMessages.value;
|
|
6744
6749
|
});
|
|
6745
6750
|
const validateOn = vue.computed(() => {
|
|
6746
6751
|
let value = (props.validateOn ?? form.validateOn?.value) || 'input';
|
|
@@ -6831,7 +6836,7 @@
|
|
|
6831
6836
|
const results = [];
|
|
6832
6837
|
isValidating.value = true;
|
|
6833
6838
|
for (const rule of props.rules) {
|
|
6834
|
-
if (results.length >=
|
|
6839
|
+
if (results.length >= Number(props.maxErrors ?? 1)) {
|
|
6835
6840
|
break;
|
|
6836
6841
|
}
|
|
6837
6842
|
const handler = typeof rule === 'function' ? rule : () => rule;
|
|
@@ -7892,7 +7897,10 @@
|
|
|
7892
7897
|
type: [Boolean, Object],
|
|
7893
7898
|
default: true
|
|
7894
7899
|
},
|
|
7895
|
-
text:
|
|
7900
|
+
text: {
|
|
7901
|
+
type: [String, Number, Boolean],
|
|
7902
|
+
default: undefined
|
|
7903
|
+
},
|
|
7896
7904
|
modelValue: {
|
|
7897
7905
|
type: Boolean,
|
|
7898
7906
|
default: true
|
|
@@ -8061,7 +8069,7 @@
|
|
|
8061
8069
|
toggle: group?.toggle,
|
|
8062
8070
|
value: group?.value.value,
|
|
8063
8071
|
disabled: props.disabled
|
|
8064
|
-
}) ?? props.text]), hasAppend && vue.createVNode("div", {
|
|
8072
|
+
}) ?? vue.toDisplayString(props.text)]), hasAppend && vue.createVNode("div", {
|
|
8065
8073
|
"key": "append",
|
|
8066
8074
|
"class": "v-chip__append"
|
|
8067
8075
|
}, [!slots.append ? vue.createVNode(vue.Fragment, null, [props.appendIcon && vue.createVNode(VIcon, {
|
|
@@ -8940,8 +8948,14 @@
|
|
|
8940
8948
|
default: true
|
|
8941
8949
|
},
|
|
8942
8950
|
slim: Boolean,
|
|
8943
|
-
subtitle:
|
|
8944
|
-
|
|
8951
|
+
subtitle: {
|
|
8952
|
+
type: [String, Number, Boolean],
|
|
8953
|
+
default: undefined
|
|
8954
|
+
},
|
|
8955
|
+
title: {
|
|
8956
|
+
type: [String, Number, Boolean],
|
|
8957
|
+
default: undefined
|
|
8958
|
+
},
|
|
8945
8959
|
value: null,
|
|
8946
8960
|
onClick: EventProp(),
|
|
8947
8961
|
onClickOnce: EventProp(),
|
|
@@ -9134,13 +9148,13 @@
|
|
|
9134
9148
|
}, {
|
|
9135
9149
|
default: () => [slots.title?.({
|
|
9136
9150
|
title: props.title
|
|
9137
|
-
}) ?? props.title]
|
|
9151
|
+
}) ?? vue.toDisplayString(props.title)]
|
|
9138
9152
|
}), hasSubtitle && vue.createVNode(VListItemSubtitle, {
|
|
9139
9153
|
"key": "subtitle"
|
|
9140
9154
|
}, {
|
|
9141
9155
|
default: () => [slots.subtitle?.({
|
|
9142
9156
|
subtitle: props.subtitle
|
|
9143
|
-
}) ?? props.subtitle]
|
|
9157
|
+
}) ?? vue.toDisplayString(props.subtitle)]
|
|
9144
9158
|
}), slots.default?.(slotProps.value)]), hasAppend && vue.createVNode("div", {
|
|
9145
9159
|
"key": "append",
|
|
9146
9160
|
"class": "v-list-item__append"
|
|
@@ -10741,10 +10755,10 @@
|
|
|
10741
10755
|
activeChildren: new Set()
|
|
10742
10756
|
});
|
|
10743
10757
|
vue.provide(StackSymbol, stack);
|
|
10744
|
-
const _zIndex = vue.shallowRef(
|
|
10758
|
+
const _zIndex = vue.shallowRef(Number(zIndex.value));
|
|
10745
10759
|
useToggleScope(isActive, () => {
|
|
10746
10760
|
const lastZIndex = globalStack.at(-1)?.[1];
|
|
10747
|
-
_zIndex.value = lastZIndex ? lastZIndex + 10 :
|
|
10761
|
+
_zIndex.value = lastZIndex ? lastZIndex + 10 : Number(zIndex.value);
|
|
10748
10762
|
if (createStackEntry) {
|
|
10749
10763
|
globalStack.push([vm.uid, _zIndex.value]);
|
|
10750
10764
|
}
|
|
@@ -10953,6 +10967,7 @@
|
|
|
10953
10967
|
emits: {
|
|
10954
10968
|
'click:outside': e => true,
|
|
10955
10969
|
'update:modelValue': value => true,
|
|
10970
|
+
keydown: e => true,
|
|
10956
10971
|
afterEnter: () => true,
|
|
10957
10972
|
afterLeave: () => true
|
|
10958
10973
|
},
|
|
@@ -11065,6 +11080,9 @@
|
|
|
11065
11080
|
});
|
|
11066
11081
|
function onKeydown(e) {
|
|
11067
11082
|
if (e.key === 'Escape' && globalTop.value) {
|
|
11083
|
+
if (!contentEl.value?.contains(document.activeElement)) {
|
|
11084
|
+
emit('keydown', e);
|
|
11085
|
+
}
|
|
11068
11086
|
if (!props.persistent) {
|
|
11069
11087
|
isActive.value = false;
|
|
11070
11088
|
if (contentEl.value?.contains(document.activeElement)) {
|
|
@@ -11073,6 +11091,10 @@
|
|
|
11073
11091
|
} else animateClick();
|
|
11074
11092
|
}
|
|
11075
11093
|
}
|
|
11094
|
+
function onKeydownSelf(e) {
|
|
11095
|
+
if (e.key === 'Escape' && !globalTop.value) return;
|
|
11096
|
+
emit('keydown', e);
|
|
11097
|
+
}
|
|
11076
11098
|
const router = useRouter();
|
|
11077
11099
|
useToggleScope(() => props.closeOnBack, () => {
|
|
11078
11100
|
useBackButton(router, next => {
|
|
@@ -11135,7 +11157,8 @@
|
|
|
11135
11157
|
'--v-overlay-opacity': props.opacity,
|
|
11136
11158
|
top: convertToUnit(top.value)
|
|
11137
11159
|
}, props.style],
|
|
11138
|
-
"ref": root
|
|
11160
|
+
"ref": root,
|
|
11161
|
+
"onKeydown": onKeydownSelf
|
|
11139
11162
|
}, scopeId, attrs), [vue.createVNode(Scrim, vue.mergeProps({
|
|
11140
11163
|
"color": scrimColor,
|
|
11141
11164
|
"modelValue": isActive.value && !!props.scrim,
|
|
@@ -11806,11 +11829,6 @@
|
|
|
11806
11829
|
};
|
|
11807
11830
|
}
|
|
11808
11831
|
});
|
|
11809
|
-
// TODO: this is kinda slow, might be better to implicitly inherit props instead
|
|
11810
|
-
function filterFieldProps(attrs) {
|
|
11811
|
-
const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style');
|
|
11812
|
-
return pick(attrs, keys);
|
|
11813
|
-
}
|
|
11814
11832
|
|
|
11815
11833
|
// Types
|
|
11816
11834
|
|
|
@@ -11918,7 +11936,7 @@
|
|
|
11918
11936
|
modelValue: _,
|
|
11919
11937
|
...inputProps
|
|
11920
11938
|
} = VInput.filterProps(props);
|
|
11921
|
-
const fieldProps =
|
|
11939
|
+
const fieldProps = VField.filterProps(props);
|
|
11922
11940
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
11923
11941
|
"ref": vInputRef,
|
|
11924
11942
|
"modelValue": model.value,
|
|
@@ -13526,11 +13544,11 @@
|
|
|
13526
13544
|
locationStyles
|
|
13527
13545
|
} = useLocation(props, true, side => {
|
|
13528
13546
|
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
|
|
13529
|
-
return base + (['top', 'bottom'].includes(side) ?
|
|
13547
|
+
return base + (['top', 'bottom'].includes(side) ? Number(props.offsetY ?? 0) : ['left', 'right'].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
|
13530
13548
|
});
|
|
13531
13549
|
useRender(() => {
|
|
13532
13550
|
const value = Number(props.content);
|
|
13533
|
-
const content = !props.max || isNaN(value) ? props.content : value <=
|
|
13551
|
+
const content = !props.max || isNaN(value) ? props.content : value <= Number(props.max) ? value : `${props.max}+`;
|
|
13534
13552
|
const [badgeAttrs, attrs] = pickWithRest(ctx.attrs, ['aria-atomic', 'aria-label', 'aria-live', 'role', 'title']);
|
|
13535
13553
|
return vue.createVNode(props.tag, vue.mergeProps({
|
|
13536
13554
|
"class": ['v-badge', {
|
|
@@ -14229,8 +14247,14 @@
|
|
|
14229
14247
|
appendIcon: IconValue,
|
|
14230
14248
|
prependAvatar: String,
|
|
14231
14249
|
prependIcon: IconValue,
|
|
14232
|
-
subtitle:
|
|
14233
|
-
|
|
14250
|
+
subtitle: {
|
|
14251
|
+
type: [String, Number, Boolean],
|
|
14252
|
+
default: undefined
|
|
14253
|
+
},
|
|
14254
|
+
title: {
|
|
14255
|
+
type: [String, Number, Boolean],
|
|
14256
|
+
default: undefined
|
|
14257
|
+
},
|
|
14234
14258
|
...makeComponentProps(),
|
|
14235
14259
|
...makeDensityProps()
|
|
14236
14260
|
}, 'VCardItem');
|
|
@@ -14280,11 +14304,11 @@
|
|
|
14280
14304
|
}, [hasTitle && vue.createVNode(VCardTitle, {
|
|
14281
14305
|
"key": "title"
|
|
14282
14306
|
}, {
|
|
14283
|
-
default: () => [slots.title?.() ?? props.title]
|
|
14307
|
+
default: () => [slots.title?.() ?? vue.toDisplayString(props.title)]
|
|
14284
14308
|
}), hasSubtitle && vue.createVNode(VCardSubtitle, {
|
|
14285
14309
|
"key": "subtitle"
|
|
14286
14310
|
}, {
|
|
14287
|
-
default: () => [slots.subtitle?.() ?? props.subtitle]
|
|
14311
|
+
default: () => [slots.subtitle?.() ?? vue.toDisplayString(props.subtitle)]
|
|
14288
14312
|
}), slots.default?.()]), hasAppend && vue.createVNode("div", {
|
|
14289
14313
|
"key": "append",
|
|
14290
14314
|
"class": "v-card-item__append"
|
|
@@ -14356,9 +14380,18 @@
|
|
|
14356
14380
|
type: [Boolean, Object],
|
|
14357
14381
|
default: true
|
|
14358
14382
|
},
|
|
14359
|
-
subtitle:
|
|
14360
|
-
|
|
14361
|
-
|
|
14383
|
+
subtitle: {
|
|
14384
|
+
type: [String, Number, Boolean],
|
|
14385
|
+
default: undefined
|
|
14386
|
+
},
|
|
14387
|
+
text: {
|
|
14388
|
+
type: [String, Number, Boolean],
|
|
14389
|
+
default: undefined
|
|
14390
|
+
},
|
|
14391
|
+
title: {
|
|
14392
|
+
type: [String, Number, Boolean],
|
|
14393
|
+
default: undefined
|
|
14394
|
+
},
|
|
14362
14395
|
...makeBorderProps(),
|
|
14363
14396
|
...makeComponentProps(),
|
|
14364
14397
|
...makeDensityProps(),
|
|
@@ -14827,7 +14860,7 @@
|
|
|
14827
14860
|
vue.onMounted(startTimeout);
|
|
14828
14861
|
function startTimeout() {
|
|
14829
14862
|
if (!props.cycle || !windowRef.value) return;
|
|
14830
|
-
slideTimeout = window.setTimeout(windowRef.value.group.next,
|
|
14863
|
+
slideTimeout = window.setTimeout(windowRef.value.group.next, Number(props.interval) > 0 ? Number(props.interval) : 6000);
|
|
14831
14864
|
}
|
|
14832
14865
|
function restartTimeout() {
|
|
14833
14866
|
window.clearTimeout(slideTimeout);
|
|
@@ -15553,7 +15586,7 @@
|
|
|
15553
15586
|
const useSteps = props => {
|
|
15554
15587
|
const min = vue.computed(() => parseFloat(props.min));
|
|
15555
15588
|
const max = vue.computed(() => parseFloat(props.max));
|
|
15556
|
-
const step = vue.computed(() =>
|
|
15589
|
+
const step = vue.computed(() => Number(props.step) > 0 ? parseFloat(props.step) : 0);
|
|
15557
15590
|
const decimals = vue.computed(() => Math.max(getDecimals(step.value), getDecimals(min.value)));
|
|
15558
15591
|
function roundValue(value) {
|
|
15559
15592
|
value = parseFloat(value);
|
|
@@ -18508,8 +18541,8 @@
|
|
|
18508
18541
|
}, 'DataTable-paginate');
|
|
18509
18542
|
const VDataTablePaginationSymbol = Symbol.for('vuetify:data-table-pagination');
|
|
18510
18543
|
function createPagination(props) {
|
|
18511
|
-
const page = useProxiedModel(props, 'page', undefined, value =>
|
|
18512
|
-
const itemsPerPage = useProxiedModel(props, 'itemsPerPage', undefined, value =>
|
|
18544
|
+
const page = useProxiedModel(props, 'page', undefined, value => Number(value ?? 1));
|
|
18545
|
+
const itemsPerPage = useProxiedModel(props, 'itemsPerPage', undefined, value => Number(value ?? 10));
|
|
18513
18546
|
return {
|
|
18514
18547
|
page,
|
|
18515
18548
|
itemsPerPage
|
|
@@ -19298,7 +19331,7 @@
|
|
|
19298
19331
|
const minButtons = props.showFirstLastPage ? 5 : 3;
|
|
19299
19332
|
return Math.max(0, Math.floor(
|
|
19300
19333
|
// Round to two decimal places to avoid floating point errors
|
|
19301
|
-
|
|
19334
|
+
Number(((totalWidth - itemWidth * minButtons) / itemWidth).toFixed(2))));
|
|
19302
19335
|
}
|
|
19303
19336
|
const range = vue.computed(() => {
|
|
19304
19337
|
if (length.value <= 0 || isNaN(length.value) || length.value > Number.MAX_SAFE_INTEGER) return [];
|
|
@@ -19369,7 +19402,7 @@
|
|
|
19369
19402
|
ref,
|
|
19370
19403
|
ellipsis: false,
|
|
19371
19404
|
icon: true,
|
|
19372
|
-
disabled: !!props.disabled ||
|
|
19405
|
+
disabled: !!props.disabled || Number(props.length) < 2,
|
|
19373
19406
|
color: isActive ? props.activeColor : props.color,
|
|
19374
19407
|
'aria-current': isActive,
|
|
19375
19408
|
'aria-label': t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
|
|
@@ -19418,7 +19451,7 @@
|
|
|
19418
19451
|
refs.value[currentIndex]?.$el.focus();
|
|
19419
19452
|
}
|
|
19420
19453
|
function onKeydown(e) {
|
|
19421
|
-
if (e.key === keyValues.left && !props.disabled && page.value >
|
|
19454
|
+
if (e.key === keyValues.left && !props.disabled && page.value > Number(props.start)) {
|
|
19422
19455
|
page.value = page.value - 1;
|
|
19423
19456
|
vue.nextTick(updateFocus);
|
|
19424
19457
|
} else if (e.key === keyValues.right && !props.disabled && page.value < start.value + length.value - 1) {
|
|
@@ -19751,8 +19784,10 @@
|
|
|
19751
19784
|
} else {
|
|
19752
19785
|
if (!seenFixed) {
|
|
19753
19786
|
item.lastFixed = true;
|
|
19754
|
-
} else if (isNaN(
|
|
19787
|
+
} else if (isNaN(Number(item.width))) {
|
|
19755
19788
|
consoleError(`Multiple fixed columns should have a static width (key: ${item.key})`);
|
|
19789
|
+
} else {
|
|
19790
|
+
item.minWidth = Math.max(Number(item.width) || 0, Number(item.minWidth) || 0);
|
|
19756
19791
|
}
|
|
19757
19792
|
seenFixed = true;
|
|
19758
19793
|
}
|
|
@@ -21515,30 +21550,30 @@
|
|
|
21515
21550
|
"class": ['v-date-picker-controls']
|
|
21516
21551
|
}, [vue.createVNode(VBtn, {
|
|
21517
21552
|
"class": "v-date-picker-controls__month-btn",
|
|
21553
|
+
"data-testid": "month-btn",
|
|
21518
21554
|
"disabled": disableMonth.value,
|
|
21519
21555
|
"text": props.text,
|
|
21520
21556
|
"variant": "text",
|
|
21521
21557
|
"rounded": true,
|
|
21522
21558
|
"onClick": onClickMonth
|
|
21523
21559
|
}, null), vue.createVNode(VBtn, {
|
|
21524
|
-
"key": "mode-btn",
|
|
21525
21560
|
"class": "v-date-picker-controls__mode-btn",
|
|
21561
|
+
"data-testid": "year-btn",
|
|
21526
21562
|
"disabled": disableYear.value,
|
|
21527
21563
|
"density": "comfortable",
|
|
21528
21564
|
"icon": props.modeIcon,
|
|
21529
21565
|
"variant": "text",
|
|
21530
21566
|
"onClick": onClickYear
|
|
21531
|
-
}, null), vue.createVNode(VSpacer, {
|
|
21532
|
-
"key": "mode-spacer"
|
|
21533
|
-
}, null), vue.createVNode("div", {
|
|
21534
|
-
"key": "month-buttons",
|
|
21567
|
+
}, null), vue.createVNode(VSpacer, null, null), vue.createVNode("div", {
|
|
21535
21568
|
"class": "v-date-picker-controls__month"
|
|
21536
21569
|
}, [vue.createVNode(VBtn, {
|
|
21570
|
+
"data-testid": "prev-month",
|
|
21537
21571
|
"disabled": disablePrev.value,
|
|
21538
21572
|
"icon": props.prevIcon,
|
|
21539
21573
|
"variant": "text",
|
|
21540
21574
|
"onClick": onClickPrev
|
|
21541
21575
|
}, null), vue.createVNode(VBtn, {
|
|
21576
|
+
"data-testid": "next-month",
|
|
21542
21577
|
"disabled": disableNext.value,
|
|
21543
21578
|
"icon": props.nextIcon,
|
|
21544
21579
|
"variant": "text",
|
|
@@ -21885,7 +21920,7 @@
|
|
|
21885
21920
|
model.value = [value];
|
|
21886
21921
|
}
|
|
21887
21922
|
}
|
|
21888
|
-
|
|
21923
|
+
useRender(() => vue.createVNode("div", {
|
|
21889
21924
|
"class": "v-date-picker-month"
|
|
21890
21925
|
}, [props.showWeek && vue.createVNode("div", {
|
|
21891
21926
|
"key": "weeks",
|
|
@@ -21907,6 +21942,13 @@
|
|
|
21907
21942
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
|
21908
21943
|
const slotProps = {
|
|
21909
21944
|
props: {
|
|
21945
|
+
class: 'v-date-picker-month__day-btn',
|
|
21946
|
+
color: (item.isSelected || item.isToday) && !item.isDisabled ? props.color : undefined,
|
|
21947
|
+
disabled: item.isDisabled,
|
|
21948
|
+
icon: true,
|
|
21949
|
+
ripple: false,
|
|
21950
|
+
text: item.localized,
|
|
21951
|
+
variant: item.isDisabled ? item.isToday ? 'outlined' : 'text' : item.isToday && !item.isSelected ? 'outlined' : 'flat',
|
|
21910
21952
|
onClick: () => onClick(item.date)
|
|
21911
21953
|
},
|
|
21912
21954
|
item,
|
|
@@ -21924,24 +21966,9 @@
|
|
|
21924
21966
|
'v-date-picker-month__day--week-start': item.isWeekStart
|
|
21925
21967
|
}],
|
|
21926
21968
|
"data-v-date": !item.isDisabled ? item.isoDate : undefined
|
|
21927
|
-
}, [(props.showAdjacentMonths || !item.isAdjacent) && vue.createVNode(
|
|
21928
|
-
"defaults": {
|
|
21929
|
-
VBtn: {
|
|
21930
|
-
class: 'v-date-picker-month__day-btn',
|
|
21931
|
-
color: (item.isSelected || item.isToday) && !item.isDisabled ? props.color : undefined,
|
|
21932
|
-
disabled: item.isDisabled,
|
|
21933
|
-
icon: true,
|
|
21934
|
-
ripple: false,
|
|
21935
|
-
text: item.localized,
|
|
21936
|
-
variant: item.isDisabled ? item.isToday ? 'outlined' : 'text' : item.isToday && !item.isSelected ? 'outlined' : 'flat',
|
|
21937
|
-
onClick: () => onClick(item.date)
|
|
21938
|
-
}
|
|
21939
|
-
}
|
|
21940
|
-
}, {
|
|
21941
|
-
default: () => [slots.day?.(slotProps) ?? vue.createVNode(VBtn, slotProps.props, null)]
|
|
21942
|
-
})]);
|
|
21969
|
+
}, [(props.showAdjacentMonths || !item.isAdjacent) && (slots.day?.(slotProps) ?? vue.createVNode(VBtn, slotProps.props, null))]);
|
|
21943
21970
|
})])]
|
|
21944
|
-
})]);
|
|
21971
|
+
})]));
|
|
21945
21972
|
}
|
|
21946
21973
|
});
|
|
21947
21974
|
|
|
@@ -23079,7 +23106,7 @@
|
|
|
23079
23106
|
modelValue: _,
|
|
23080
23107
|
...inputProps
|
|
23081
23108
|
} = VInput.filterProps(props);
|
|
23082
|
-
const fieldProps =
|
|
23109
|
+
const fieldProps = VField.filterProps(props);
|
|
23083
23110
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
23084
23111
|
"ref": vInputRef,
|
|
23085
23112
|
"modelValue": props.multiple ? model.value : model.value[0],
|
|
@@ -24698,7 +24725,7 @@
|
|
|
24698
24725
|
vue.watch(displayHeight, onScroll);
|
|
24699
24726
|
vue.watch(() => contentRect.value?.height, onScroll);
|
|
24700
24727
|
const scale = vue.computed(() => {
|
|
24701
|
-
return 1 - clamp(
|
|
24728
|
+
return 1 - clamp(Number(props.scale));
|
|
24702
24729
|
});
|
|
24703
24730
|
let frame = -1;
|
|
24704
24731
|
function onScroll() {
|
|
@@ -25119,7 +25146,7 @@
|
|
|
25119
25146
|
themeClasses
|
|
25120
25147
|
} = provideTheme(props);
|
|
25121
25148
|
const rating = useProxiedModel(props, 'modelValue');
|
|
25122
|
-
const normalizedValue = vue.computed(() => clamp(parseFloat(rating.value), 0,
|
|
25149
|
+
const normalizedValue = vue.computed(() => clamp(parseFloat(rating.value), 0, Number(props.length)));
|
|
25123
25150
|
const range = vue.computed(() => createRange(Number(props.length), 1));
|
|
25124
25151
|
const increments = vue.computed(() => range.value.flatMap(v => props.halfIncrements ? [v - 0.5, v] : [v]));
|
|
25125
25152
|
const hoverIndex = vue.shallowRef(-1);
|
|
@@ -25730,7 +25757,7 @@
|
|
|
25730
25757
|
const height = Math.abs(gridY * value);
|
|
25731
25758
|
return {
|
|
25732
25759
|
x: minX + index * gridX,
|
|
25733
|
-
y: horizonY - height +
|
|
25760
|
+
y: horizonY - height + Number(value < 0) * height,
|
|
25734
25761
|
height,
|
|
25735
25762
|
value
|
|
25736
25763
|
};
|
|
@@ -27168,10 +27195,10 @@
|
|
|
27168
27195
|
}
|
|
27169
27196
|
}
|
|
27170
27197
|
const sizerRef = vue.ref();
|
|
27171
|
-
const rows = vue.ref(
|
|
27198
|
+
const rows = vue.ref(Number(props.rows));
|
|
27172
27199
|
const isPlainOrUnderlined = vue.computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
27173
27200
|
vue.watchEffect(() => {
|
|
27174
|
-
if (!props.autoGrow) rows.value =
|
|
27201
|
+
if (!props.autoGrow) rows.value = Number(props.rows);
|
|
27175
27202
|
});
|
|
27176
27203
|
function calculateInputHeight() {
|
|
27177
27204
|
if (!props.autoGrow) return;
|
|
@@ -27214,7 +27241,7 @@
|
|
|
27214
27241
|
modelValue: _,
|
|
27215
27242
|
...inputProps
|
|
27216
27243
|
} = VInput.filterProps(props);
|
|
27217
|
-
const fieldProps =
|
|
27244
|
+
const fieldProps = VField.filterProps(props);
|
|
27218
27245
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
27219
27246
|
"ref": vInputRef,
|
|
27220
27247
|
"modelValue": model.value,
|
|
@@ -28218,8 +28245,8 @@
|
|
|
28218
28245
|
prependIcon: '$calendar'
|
|
28219
28246
|
}),
|
|
28220
28247
|
...omit(makeVDatePickerProps({
|
|
28221
|
-
|
|
28222
|
-
|
|
28248
|
+
hideHeader: true,
|
|
28249
|
+
showAdjacentMonths: true
|
|
28223
28250
|
}), ['active', 'location', 'rounded'])
|
|
28224
28251
|
}, 'VDateInput');
|
|
28225
28252
|
const VDateInput = genericComponent()({
|
|
@@ -28265,7 +28292,7 @@
|
|
|
28265
28292
|
return;
|
|
28266
28293
|
}
|
|
28267
28294
|
const target = e.target;
|
|
28268
|
-
model.value = target.value;
|
|
28295
|
+
model.value = target.value === '' ? null : target.value;
|
|
28269
28296
|
}
|
|
28270
28297
|
function onClick(e) {
|
|
28271
28298
|
e.preventDefault();
|
|
@@ -28303,6 +28330,7 @@
|
|
|
28303
28330
|
"onUpdate:modelValue": $event => menu.value = $event,
|
|
28304
28331
|
"activator": "parent",
|
|
28305
28332
|
"min-width": "0",
|
|
28333
|
+
"eager": isFocused.value,
|
|
28306
28334
|
"location": props.location,
|
|
28307
28335
|
"closeOnContentClick": false,
|
|
28308
28336
|
"openOnClick": false
|
|
@@ -28542,8 +28570,9 @@
|
|
|
28542
28570
|
inputRef.value?.click();
|
|
28543
28571
|
}
|
|
28544
28572
|
function onClickRemove(index) {
|
|
28545
|
-
|
|
28546
|
-
|
|
28573
|
+
const newValue = model.value.filter((_, i) => i !== index);
|
|
28574
|
+
model.value = newValue;
|
|
28575
|
+
if (newValue.length > 0 || !inputRef.value) return;
|
|
28547
28576
|
inputRef.value.value = '';
|
|
28548
28577
|
}
|
|
28549
28578
|
useRender(() => {
|
|
@@ -28754,7 +28783,7 @@
|
|
|
28754
28783
|
return isFocused.value ? Number(fixed).toString() // trim zeros
|
|
28755
28784
|
: fixed;
|
|
28756
28785
|
}
|
|
28757
|
-
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(
|
|
28786
|
+
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
|
28758
28787
|
const _inputText = vue.shallowRef(null);
|
|
28759
28788
|
vue.watchEffect(() => {
|
|
28760
28789
|
if (isFocused.value && !controlsDisabled.value) ; else if (model.value == null) {
|
|
@@ -28769,8 +28798,8 @@
|
|
|
28769
28798
|
if (val === null || val === '') {
|
|
28770
28799
|
model.value = null;
|
|
28771
28800
|
_inputText.value = null;
|
|
28772
|
-
} else if (!isNaN(
|
|
28773
|
-
model.value =
|
|
28801
|
+
} else if (!isNaN(Number(val)) && Number(val) <= props.max && Number(val) >= props.min) {
|
|
28802
|
+
model.value = Number(val);
|
|
28774
28803
|
_inputText.value = val;
|
|
28775
28804
|
}
|
|
28776
28805
|
}
|
|
@@ -28894,8 +28923,8 @@
|
|
|
28894
28923
|
if (controlsDisabled.value) return;
|
|
28895
28924
|
if (!vTextFieldRef.value) return;
|
|
28896
28925
|
const actualText = vTextFieldRef.value.value;
|
|
28897
|
-
if (actualText && !isNaN(
|
|
28898
|
-
inputText.value = correctPrecision(clamp(
|
|
28926
|
+
if (actualText && !isNaN(Number(actualText))) {
|
|
28927
|
+
inputText.value = correctPrecision(clamp(Number(actualText), props.min, props.max));
|
|
28899
28928
|
} else {
|
|
28900
28929
|
inputText.value = null;
|
|
28901
28930
|
}
|
|
@@ -29769,14 +29798,7 @@
|
|
|
29769
29798
|
}
|
|
29770
29799
|
});
|
|
29771
29800
|
|
|
29772
|
-
//
|
|
29773
|
-
/* eslint-disable */
|
|
29774
|
-
var SelectingTimes = /*#__PURE__*/function (SelectingTimes) {
|
|
29775
|
-
SelectingTimes[SelectingTimes["Hour"] = 1] = "Hour";
|
|
29776
|
-
SelectingTimes[SelectingTimes["Minute"] = 2] = "Minute";
|
|
29777
|
-
SelectingTimes[SelectingTimes["Second"] = 3] = "Second";
|
|
29778
|
-
return SelectingTimes;
|
|
29779
|
-
}(SelectingTimes || {});
|
|
29801
|
+
// Types
|
|
29780
29802
|
|
|
29781
29803
|
const makeVTimePickerControlsProps = propsFactory({
|
|
29782
29804
|
ampm: Boolean,
|
|
@@ -29790,15 +29812,15 @@
|
|
|
29790
29812
|
period: String,
|
|
29791
29813
|
readonly: Boolean,
|
|
29792
29814
|
useSeconds: Boolean,
|
|
29793
|
-
|
|
29794
|
-
|
|
29815
|
+
value: Number,
|
|
29816
|
+
viewMode: String
|
|
29795
29817
|
}, 'VTimePickerControls');
|
|
29796
29818
|
const VTimePickerControls = genericComponent()({
|
|
29797
29819
|
name: 'VTimePickerControls',
|
|
29798
29820
|
props: makeVTimePickerControlsProps(),
|
|
29799
29821
|
emits: {
|
|
29800
29822
|
'update:period': data => true,
|
|
29801
|
-
'update:
|
|
29823
|
+
'update:viewMode': data => true
|
|
29802
29824
|
},
|
|
29803
29825
|
setup(props, _ref) {
|
|
29804
29826
|
let {
|
|
@@ -29821,8 +29843,8 @@
|
|
|
29821
29843
|
'v-time-picker-controls__time--with-seconds': props.useSeconds
|
|
29822
29844
|
}
|
|
29823
29845
|
}, [vue.createVNode(VBtn, {
|
|
29824
|
-
"active": props.
|
|
29825
|
-
"color": props.
|
|
29846
|
+
"active": props.viewMode === 'hour',
|
|
29847
|
+
"color": props.viewMode === 'hour' ? props.color : undefined,
|
|
29826
29848
|
"disabled": props.disabled,
|
|
29827
29849
|
"variant": "tonal",
|
|
29828
29850
|
"class": {
|
|
@@ -29831,24 +29853,24 @@
|
|
|
29831
29853
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29832
29854
|
},
|
|
29833
29855
|
"text": props.hour == null ? '--' : pad(`${hour}`),
|
|
29834
|
-
"onClick": () => emit('update:
|
|
29856
|
+
"onClick": () => emit('update:viewMode', 'hour')
|
|
29835
29857
|
}, null), vue.createVNode("span", {
|
|
29836
29858
|
"class": ['v-time-picker-controls__time__separator', {
|
|
29837
29859
|
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
|
29838
29860
|
}]
|
|
29839
29861
|
}, [vue.createTextVNode(":")]), vue.createVNode(VBtn, {
|
|
29840
|
-
"active": props.
|
|
29841
|
-
"color": props.
|
|
29862
|
+
"active": props.viewMode === 'minute',
|
|
29863
|
+
"color": props.viewMode === 'minute' ? props.color : undefined,
|
|
29842
29864
|
"class": {
|
|
29843
29865
|
'v-time-picker-controls__time__btn': true,
|
|
29844
|
-
'v-time-picker-controls__time__btn__active': props.
|
|
29866
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'minute',
|
|
29845
29867
|
'v-time-picker-controls__time--with-ampm__btn': props.ampm,
|
|
29846
29868
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29847
29869
|
},
|
|
29848
29870
|
"disabled": props.disabled,
|
|
29849
29871
|
"variant": "tonal",
|
|
29850
29872
|
"text": props.minute == null ? '--' : pad(props.minute),
|
|
29851
|
-
"onClick": () => emit('update:
|
|
29873
|
+
"onClick": () => emit('update:viewMode', 'minute')
|
|
29852
29874
|
}, null), props.useSeconds && vue.createVNode("span", {
|
|
29853
29875
|
"class": ['v-time-picker-controls__time__separator', {
|
|
29854
29876
|
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
|
@@ -29856,11 +29878,13 @@
|
|
|
29856
29878
|
"key": "secondsDivider"
|
|
29857
29879
|
}, [vue.createTextVNode(":")]), props.useSeconds && vue.createVNode(VBtn, {
|
|
29858
29880
|
"key": "secondsVal",
|
|
29881
|
+
"active": props.viewMode === 'second',
|
|
29882
|
+
"color": props.viewMode === 'second' ? props.color : undefined,
|
|
29859
29883
|
"variant": "tonal",
|
|
29860
|
-
"onClick": () => emit('update:
|
|
29884
|
+
"onClick": () => emit('update:viewMode', 'second'),
|
|
29861
29885
|
"class": {
|
|
29862
29886
|
'v-time-picker-controls__time__btn': true,
|
|
29863
|
-
'v-time-picker-controls__time__btn__active': props.
|
|
29887
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'second',
|
|
29864
29888
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29865
29889
|
},
|
|
29866
29890
|
"disabled": props.disabled,
|
|
@@ -29905,11 +29929,6 @@
|
|
|
29905
29929
|
const rangeHours12am = createRange(12);
|
|
29906
29930
|
const rangeHours12pm = rangeHours12am.map(v => v + 12);
|
|
29907
29931
|
createRange(60);
|
|
29908
|
-
const selectingNames = {
|
|
29909
|
-
1: 'hour',
|
|
29910
|
-
2: 'minute',
|
|
29911
|
-
3: 'second'
|
|
29912
|
-
};
|
|
29913
29932
|
const makeVTimePickerProps = propsFactory({
|
|
29914
29933
|
allowedHours: [Function, Array],
|
|
29915
29934
|
allowedMinutes: [Function, Array],
|
|
@@ -29922,6 +29941,10 @@
|
|
|
29922
29941
|
},
|
|
29923
29942
|
max: String,
|
|
29924
29943
|
min: String,
|
|
29944
|
+
viewMode: {
|
|
29945
|
+
type: String,
|
|
29946
|
+
default: 'hour'
|
|
29947
|
+
},
|
|
29925
29948
|
modelValue: null,
|
|
29926
29949
|
readonly: Boolean,
|
|
29927
29950
|
scrollable: Boolean,
|
|
@@ -29938,7 +29961,8 @@
|
|
|
29938
29961
|
'update:minute': val => true,
|
|
29939
29962
|
'update:period': val => true,
|
|
29940
29963
|
'update:second': val => true,
|
|
29941
|
-
'update:modelValue': val => true
|
|
29964
|
+
'update:modelValue': val => true,
|
|
29965
|
+
'update:viewMode': val => true
|
|
29942
29966
|
},
|
|
29943
29967
|
setup(props, _ref) {
|
|
29944
29968
|
let {
|
|
@@ -29955,7 +29979,7 @@
|
|
|
29955
29979
|
const lazyInputMinute = vue.ref(null);
|
|
29956
29980
|
const lazyInputSecond = vue.ref(null);
|
|
29957
29981
|
const period = vue.ref('am');
|
|
29958
|
-
const
|
|
29982
|
+
const viewMode = useProxiedModel(props, 'viewMode', 'hour');
|
|
29959
29983
|
const controlsRef = vue.ref(null);
|
|
29960
29984
|
const clockRef = vue.ref(null);
|
|
29961
29985
|
const isAllowedHourCb = vue.computed(() => {
|
|
@@ -29969,7 +29993,7 @@
|
|
|
29969
29993
|
const minHour = props.min ? Number(props.min.split(':')[0]) : 0;
|
|
29970
29994
|
const maxHour = props.max ? Number(props.max.split(':')[0]) : 23;
|
|
29971
29995
|
return val => {
|
|
29972
|
-
return val >= minHour
|
|
29996
|
+
return val >= Number(minHour) && val <= Number(maxHour) && (!cb || cb(val));
|
|
29973
29997
|
};
|
|
29974
29998
|
});
|
|
29975
29999
|
const isAllowedMinuteCb = vue.computed(() => {
|
|
@@ -29985,8 +30009,8 @@
|
|
|
29985
30009
|
}
|
|
29986
30010
|
const [minHour, minMinute] = props.min ? props.min.split(':').map(Number) : [0, 0];
|
|
29987
30011
|
const [maxHour, maxMinute] = props.max ? props.max.split(':').map(Number) : [23, 59];
|
|
29988
|
-
const minTime = minHour * 60 + minMinute
|
|
29989
|
-
const maxTime = maxHour * 60 + maxMinute
|
|
30012
|
+
const minTime = minHour * 60 + Number(minMinute);
|
|
30013
|
+
const maxTime = maxHour * 60 + Number(maxMinute);
|
|
29990
30014
|
return val => {
|
|
29991
30015
|
const time = 60 * inputHour.value + val;
|
|
29992
30016
|
return time >= minTime && time <= maxTime && isHourAllowed && (!cb || cb(val));
|
|
@@ -30006,8 +30030,8 @@
|
|
|
30006
30030
|
}
|
|
30007
30031
|
const [minHour, minMinute, minSecond] = props.min ? props.min.split(':').map(Number) : [0, 0, 0];
|
|
30008
30032
|
const [maxHour, maxMinute, maxSecond] = props.max ? props.max.split(':').map(Number) : [23, 59, 59];
|
|
30009
|
-
const minTime = minHour * 3600 + minMinute * 60 + (minSecond || 0)
|
|
30010
|
-
const maxTime = maxHour * 3600 + maxMinute * 60 + (maxSecond || 0)
|
|
30033
|
+
const minTime = minHour * 3600 + minMinute * 60 + Number(minSecond || 0);
|
|
30034
|
+
const maxTime = maxHour * 3600 + maxMinute * 60 + Number(maxSecond || 0);
|
|
30011
30035
|
return val => {
|
|
30012
30036
|
const time = 3600 * inputHour.value + 60 * inputMinute.value + val;
|
|
30013
30037
|
return time >= minTime && time <= maxTime && isMinuteAllowed && (!cb || cb(val));
|
|
@@ -30073,16 +30097,16 @@
|
|
|
30073
30097
|
return true;
|
|
30074
30098
|
}
|
|
30075
30099
|
function onInput(value) {
|
|
30076
|
-
if (
|
|
30100
|
+
if (viewMode.value === 'hour') {
|
|
30077
30101
|
inputHour.value = isAmPm.value ? convert12to24(value, period.value) : value;
|
|
30078
|
-
} else if (
|
|
30102
|
+
} else if (viewMode.value === 'minute') {
|
|
30079
30103
|
inputMinute.value = value;
|
|
30080
30104
|
} else {
|
|
30081
30105
|
inputSecond.value = value;
|
|
30082
30106
|
}
|
|
30083
30107
|
}
|
|
30084
30108
|
function onChange(value) {
|
|
30085
|
-
switch (
|
|
30109
|
+
switch (viewMode.value || 'hour') {
|
|
30086
30110
|
case 'hour':
|
|
30087
30111
|
emit('update:hour', value);
|
|
30088
30112
|
break;
|
|
@@ -30094,10 +30118,10 @@
|
|
|
30094
30118
|
break;
|
|
30095
30119
|
}
|
|
30096
30120
|
const emitChange = inputHour.value !== null && inputMinute.value !== null && (props.useSeconds ? inputSecond.value !== null : true);
|
|
30097
|
-
if (
|
|
30098
|
-
|
|
30099
|
-
} else if (props.useSeconds &&
|
|
30100
|
-
|
|
30121
|
+
if (viewMode.value === 'hour') {
|
|
30122
|
+
viewMode.value = 'minute';
|
|
30123
|
+
} else if (props.useSeconds && viewMode.value === 'minute') {
|
|
30124
|
+
viewMode.value = 'second';
|
|
30101
30125
|
}
|
|
30102
30126
|
if (inputHour.value === lazyInputHour.value && inputMinute.value === lazyInputMinute.value && (!props.useSeconds || inputSecond.value === lazyInputSecond.value)) return;
|
|
30103
30127
|
const time = genValue();
|
|
@@ -30126,20 +30150,20 @@
|
|
|
30126
30150
|
"minute": inputMinute.value,
|
|
30127
30151
|
"period": period.value,
|
|
30128
30152
|
"second": inputSecond.value,
|
|
30129
|
-
"
|
|
30153
|
+
"viewMode": viewMode.value,
|
|
30130
30154
|
"onUpdate:period": val => setPeriod(val),
|
|
30131
|
-
"onUpdate:
|
|
30155
|
+
"onUpdate:viewMode": value => viewMode.value = value,
|
|
30132
30156
|
"ref": controlsRef
|
|
30133
30157
|
}), null),
|
|
30134
30158
|
default: () => vue.createVNode(VTimePickerClock, vue.mergeProps(timePickerClockProps, {
|
|
30135
|
-
"allowedValues":
|
|
30136
|
-
"double":
|
|
30137
|
-
"format":
|
|
30138
|
-
"max":
|
|
30139
|
-
"min":
|
|
30159
|
+
"allowedValues": viewMode.value === 'hour' ? isAllowedHourCb.value : viewMode.value === 'minute' ? isAllowedMinuteCb.value : isAllowedSecondCb.value,
|
|
30160
|
+
"double": viewMode.value === 'hour' && !isAmPm.value,
|
|
30161
|
+
"format": viewMode.value === 'hour' ? isAmPm.value ? convert24to12 : val => val : val => pad(val, 2),
|
|
30162
|
+
"max": viewMode.value === 'hour' ? isAmPm.value && period.value === 'am' ? 11 : 23 : 59,
|
|
30163
|
+
"min": viewMode.value === 'hour' && isAmPm.value && period.value === 'pm' ? 12 : 0,
|
|
30140
30164
|
"size": 20,
|
|
30141
|
-
"step":
|
|
30142
|
-
"modelValue":
|
|
30165
|
+
"step": viewMode.value === 'hour' ? 1 : 5,
|
|
30166
|
+
"modelValue": viewMode.value === 'hour' ? inputHour.value : viewMode.value === 'minute' ? inputMinute.value : inputSecond.value,
|
|
30143
30167
|
"onChange": onChange,
|
|
30144
30168
|
"onInput": onInput,
|
|
30145
30169
|
"ref": clockRef
|
|
@@ -31052,7 +31076,7 @@
|
|
|
31052
31076
|
goTo
|
|
31053
31077
|
};
|
|
31054
31078
|
}
|
|
31055
|
-
const version$1 = "3.7.
|
|
31079
|
+
const version$1 = "3.7.17";
|
|
31056
31080
|
createVuetify$1.version = version$1;
|
|
31057
31081
|
|
|
31058
31082
|
// Vue's inject() can only be used in setup
|
|
@@ -31305,7 +31329,7 @@
|
|
|
31305
31329
|
|
|
31306
31330
|
/* eslint-disable local-rules/sort-imports */
|
|
31307
31331
|
|
|
31308
|
-
const version = "3.7.
|
|
31332
|
+
const version = "3.7.17";
|
|
31309
31333
|
|
|
31310
31334
|
/* eslint-disable local-rules/sort-imports */
|
|
31311
31335
|
|