quasar 2.21.4 → 2.22.0
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/README.md +1 -1
- package/dist/api/QUploader.json +1 -1
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v7-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v7.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v8.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar-TN.umd.prod.js +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/bs-BA.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de-CH.umd.prod.js +1 -1
- package/dist/lang/de-DE.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/eu.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hi.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/kk.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/lb.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +1 -1
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/mk.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/mm.umd.prod.js +1 -1
- package/dist/lang/ms-MY.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/my.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sm.umd.prod.js +1 -1
- package/dist/lang/sq.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tl.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/ur-PK.umd.prod.js +1 -1
- package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
- package/dist/lang/uz-Latn.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.client.js +572 -187
- package/dist/quasar.css +4 -0
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +5 -0
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +4 -1
- package/dist/quasar.server.prod.cjs +35 -35
- package/dist/quasar.server.prod.js +25 -25
- package/dist/quasar.umd.js +572 -187
- package/dist/quasar.umd.prod.js +30 -30
- package/dist/types/composables.d.ts +10 -5
- package/dist/types/index.d.ts +4 -4
- package/dist/web-types/web-types.json +1 -1
- package/package.json +6 -6
- package/src/components/carousel/QCarousel.js +2 -0
- package/src/components/chip/QChip.js +20 -4
- package/src/components/date/QDate.js +9 -2
- package/src/components/dialog/QDialog.js +9 -2
- package/src/components/editor/QEditor.js +18 -3
- package/src/components/expansion-item/QExpansionItem.js +6 -1
- package/src/components/input/QInput.js +42 -1
- package/src/components/input/QInput.json +7 -0
- package/src/components/input/use-mask.js +12 -4
- package/src/components/item/QItem.js +10 -1
- package/src/components/menu/QMenu.js +9 -2
- package/src/components/range/QRange.js +2 -1
- package/src/components/rating/QRating.js +27 -8
- package/src/components/rating/QRating.sass +4 -0
- package/src/components/resize-observer/QResizeObserver.js +14 -3
- package/src/components/scroll-area/QScrollArea.js +69 -17
- package/src/components/slide-item/QSlideItem.js +3 -2
- package/src/components/slider/use-slider.js +7 -3
- package/src/components/stepper/StepHeader.js +11 -2
- package/src/components/table/QTable.js +11 -9
- package/src/components/table/QTh.js +20 -1
- package/src/components/table/table-column-selection.js +9 -1
- package/src/components/table/table-pagination.js +5 -2
- package/src/components/table/table-row-selection.js +10 -10
- package/src/components/tabs/QTabs.js +5 -6
- package/src/components/time/QTime.js +35 -10
- package/src/components/tooltip/QTooltip.js +112 -6
- package/src/components/tree/QTree.js +124 -4
- package/src/components/uploader/uploader-core.js +19 -4
- package/src/components/uploader/xhr-uploader-plugin.js +93 -43
- package/src/components/uploader/xhr-uploader-plugin.json +4 -4
- package/src/composables/private.use-field/use-field.js +2 -0
- package/src/composables/private.use-file/use-file.js +21 -12
- package/src/composables/private.use-fullscreen/use-fullscreen.js +8 -3
- package/src/composables/private.use-model-toggle/use-model-toggle.js +2 -0
- package/src/composables/private.use-panel/use-panel.js +6 -2
- package/src/composables/use-interval/use-interval.js +8 -0
- package/src/composables/use-render-cache/use-render-cache.js +15 -10
- package/src/composables/use-timeout/use-timeout.js +8 -0
- package/src/directives/intersection/Intersection.js +2 -2
- package/src/directives/touch-repeat/TouchRepeat.js +3 -1
- package/src/plugins/cookies/Cookies.js +29 -13
- package/src/plugins/meta/Meta.js +57 -9
- package/src/utils/extend/extend.js +4 -0
- package/src/utils/extend/extend.test.js +29 -0
- package/src/utils/scroll/prevent-scroll.js +4 -4
package/dist/quasar.client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quasar Framework v2.
|
|
2
|
+
* Quasar Framework v2.22.0
|
|
3
3
|
* (c) 2015-present Razvan Stoenescu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1103,7 +1103,7 @@ function prepareApp(app, uiOpts, pluginOpts) {
|
|
|
1103
1103
|
};
|
|
1104
1104
|
}
|
|
1105
1105
|
var install_quasar_default = function installQuasar(parentApp, opts = {}) {
|
|
1106
|
-
const $q = { version: "2.
|
|
1106
|
+
const $q = { version: "2.22.0" };
|
|
1107
1107
|
if (!globalConfigIsFrozen) {
|
|
1108
1108
|
if (opts.config !== void 0) Object.assign(globalConfig, opts.config);
|
|
1109
1109
|
$q.config = { ...globalConfig };
|
|
@@ -2773,7 +2773,7 @@ const useModelToggleEmits = [
|
|
|
2773
2773
|
"beforeHide",
|
|
2774
2774
|
"hide"
|
|
2775
2775
|
];
|
|
2776
|
-
function useModelToggle({ showing, canShow, hideOnRouteChange, handleShow, handleHide, processOnMount }) {
|
|
2776
|
+
function useModelToggle({ showing, canShow, hideOnRouteChange, handleShow, handleHide, handleRouteChange, processOnMount }) {
|
|
2777
2777
|
const vm = getCurrentInstance();
|
|
2778
2778
|
const { props, emit, proxy } = vm;
|
|
2779
2779
|
let payload;
|
|
@@ -2826,7 +2826,10 @@ function useModelToggle({ showing, canShow, hideOnRouteChange, handleShow, handl
|
|
|
2826
2826
|
}
|
|
2827
2827
|
watch(() => props.modelValue, processModelChange);
|
|
2828
2828
|
if (hideOnRouteChange !== void 0 && vmHasRouter(vm)) watch(() => proxy.$route.fullPath, () => {
|
|
2829
|
-
if (hideOnRouteChange.value && showing.value)
|
|
2829
|
+
if (hideOnRouteChange.value && showing.value) {
|
|
2830
|
+
handleRouteChange?.();
|
|
2831
|
+
hide();
|
|
2832
|
+
}
|
|
2830
2833
|
});
|
|
2831
2834
|
if (processOnMount) onMounted(() => {
|
|
2832
2835
|
processModelChange(props.modelValue);
|
|
@@ -3627,6 +3630,7 @@ var QMenu_default = createComponent({
|
|
|
3627
3630
|
canShow,
|
|
3628
3631
|
handleShow,
|
|
3629
3632
|
handleHide,
|
|
3633
|
+
handleRouteChange,
|
|
3630
3634
|
hideOnRouteChange,
|
|
3631
3635
|
processOnMount: true
|
|
3632
3636
|
});
|
|
@@ -3702,14 +3706,20 @@ var QMenu_default = createComponent({
|
|
|
3702
3706
|
hidePortal();
|
|
3703
3707
|
anchorCleanup(true);
|
|
3704
3708
|
if (refocusTarget !== null && (evt === void 0 || !evt.qClickOutside)) {
|
|
3705
|
-
(
|
|
3709
|
+
const target = (evt?.type.indexOf("key") === 0 ? refocusTarget.closest("[tabindex]:not([tabindex^=\"-\"])") : void 0) || refocusTarget;
|
|
3706
3710
|
refocusTarget = null;
|
|
3711
|
+
addFocusFn(() => {
|
|
3712
|
+
if (target.isConnected) target.focus();
|
|
3713
|
+
});
|
|
3707
3714
|
}
|
|
3708
3715
|
registerTimeout(() => {
|
|
3709
3716
|
hidePortal(true);
|
|
3710
3717
|
emit("hide", evt);
|
|
3711
3718
|
}, props.transitionDuration);
|
|
3712
3719
|
}
|
|
3720
|
+
function handleRouteChange() {
|
|
3721
|
+
refocusTarget = null;
|
|
3722
|
+
}
|
|
3713
3723
|
function anchorCleanup(hiding) {
|
|
3714
3724
|
absoluteOffset = void 0;
|
|
3715
3725
|
if (unwatchPosition !== void 0) {
|
|
@@ -4423,7 +4433,7 @@ var TouchSwipe_default = createDirective({
|
|
|
4423
4433
|
function useRenderCache() {
|
|
4424
4434
|
let cache = Object.create(null);
|
|
4425
4435
|
return {
|
|
4426
|
-
getCache: (key, defaultValue) => cache[key]
|
|
4436
|
+
getCache: (key, defaultValue) => Object.hasOwn(cache, key) ? cache[key] : cache[key] = typeof defaultValue === "function" ? defaultValue() : defaultValue,
|
|
4427
4437
|
setCache(key, obj) {
|
|
4428
4438
|
cache[key] = obj;
|
|
4429
4439
|
},
|
|
@@ -4502,8 +4512,8 @@ function usePanel() {
|
|
|
4502
4512
|
mouse: true
|
|
4503
4513
|
}
|
|
4504
4514
|
]]);
|
|
4505
|
-
const transitionPrev = computed(() => props.transitionPrev || `slide-${props.vertical ? "down" : "right"}`);
|
|
4506
|
-
const transitionNext = computed(() => props.transitionNext || `slide-${props.vertical ? "up" : "left"}`);
|
|
4515
|
+
const transitionPrev = computed(() => props.transitionPrev || `slide-${props.vertical ? "down" : proxy.$q.lang.rtl ? "left" : "right"}`);
|
|
4516
|
+
const transitionNext = computed(() => props.transitionNext || `slide-${props.vertical ? "up" : proxy.$q.lang.rtl ? "right" : "left"}`);
|
|
4507
4517
|
const transitionStyle = computed(() => `--q-transition-duration: ${props.transitionDuration}ms`);
|
|
4508
4518
|
const contentKey = computed(() => typeof props.modelValue === "string" || typeof props.modelValue === "number" ? props.modelValue : String(props.modelValue));
|
|
4509
4519
|
const keepAliveProps = computed(() => ({
|
|
@@ -4623,7 +4633,7 @@ const useFullscreenEmits = ["update:fullscreen", "fullscreen"];
|
|
|
4623
4633
|
function useFullscreen() {
|
|
4624
4634
|
const vm = getCurrentInstance();
|
|
4625
4635
|
const { props, emit, proxy } = vm;
|
|
4626
|
-
let historyEntry, fullscreenFillerNode;
|
|
4636
|
+
let historyEntry, fullscreenFillerNode, isUnmounting = false;
|
|
4627
4637
|
const inFullscreen = ref(false);
|
|
4628
4638
|
if (vmHasRouter(vm)) watch(() => proxy.$route.fullPath, () => {
|
|
4629
4639
|
if (!props.noRouteFullscreenExit) exitFullscreen();
|
|
@@ -4660,7 +4670,7 @@ function useFullscreen() {
|
|
|
4660
4670
|
counter = Math.max(0, counter - 1);
|
|
4661
4671
|
if (counter === 0) {
|
|
4662
4672
|
document.body.classList.remove("q-body--fullscreen-mixin");
|
|
4663
|
-
if (proxy.$el.scrollIntoView !== void 0) setTimeout(() => {
|
|
4673
|
+
if (!isUnmounting && proxy.$el.scrollIntoView !== void 0) setTimeout(() => {
|
|
4664
4674
|
proxy.$el.scrollIntoView();
|
|
4665
4675
|
}, 0);
|
|
4666
4676
|
}
|
|
@@ -4671,7 +4681,10 @@ function useFullscreen() {
|
|
|
4671
4681
|
onMounted(() => {
|
|
4672
4682
|
if (props.fullscreen) setFullscreen();
|
|
4673
4683
|
});
|
|
4674
|
-
onBeforeUnmount(
|
|
4684
|
+
onBeforeUnmount(() => {
|
|
4685
|
+
isUnmounting = true;
|
|
4686
|
+
exitFullscreen();
|
|
4687
|
+
});
|
|
4675
4688
|
Object.assign(proxy, {
|
|
4676
4689
|
toggleFullscreen,
|
|
4677
4690
|
setFullscreen,
|
|
@@ -4738,7 +4751,7 @@ var QCarousel_default = createComponent({
|
|
|
4738
4751
|
const { proxy: { $q } } = getCurrentInstance();
|
|
4739
4752
|
const isDark = useDark(props, $q);
|
|
4740
4753
|
let timer = null, panelsLen;
|
|
4741
|
-
const { updatePanelsList, getPanelContent, panelDirectives, goToPanel, previousPanel, nextPanel, getEnabledPanels, panelIndex } = usePanel();
|
|
4754
|
+
const { updatePanelsList, updatePanelIndex, getPanelContent, panelDirectives, goToPanel, previousPanel, nextPanel, getEnabledPanels, panelIndex } = usePanel();
|
|
4742
4755
|
const { inFullscreen } = useFullscreen();
|
|
4743
4756
|
const style = computed(() => !inFullscreen.value && props.height !== void 0 ? { height: props.height } : {});
|
|
4744
4757
|
const direction = computed(() => props.vertical ? "vertical" : "horizontal");
|
|
@@ -4849,6 +4862,7 @@ var QCarousel_default = createComponent({
|
|
|
4849
4862
|
}
|
|
4850
4863
|
return () => {
|
|
4851
4864
|
panelsLen = updatePanelsList(slots);
|
|
4865
|
+
updatePanelIndex();
|
|
4852
4866
|
return h("div", {
|
|
4853
4867
|
class: classes.value,
|
|
4854
4868
|
style: style.value
|
|
@@ -5173,6 +5187,9 @@ var QCheckbox_default = createComponent({
|
|
|
5173
5187
|
});
|
|
5174
5188
|
//#endregion
|
|
5175
5189
|
//#region src/components/chip/QChip.js
|
|
5190
|
+
function preventSpace$3(e) {
|
|
5191
|
+
if (e.keyCode === 32) stopAndPrevent(e);
|
|
5192
|
+
}
|
|
5176
5193
|
const defaultSizes$1 = {
|
|
5177
5194
|
xs: 8,
|
|
5178
5195
|
sm: 10,
|
|
@@ -5235,7 +5252,11 @@ var QChip_default = createComponent({
|
|
|
5235
5252
|
const chip = props.disable ? {
|
|
5236
5253
|
tabindex: -1,
|
|
5237
5254
|
"aria-disabled": "true"
|
|
5238
|
-
} : {
|
|
5255
|
+
} : {
|
|
5256
|
+
tabindex: props.tabindex || 0,
|
|
5257
|
+
role: "button",
|
|
5258
|
+
"aria-pressed": props.selected ? "true" : "false"
|
|
5259
|
+
};
|
|
5239
5260
|
return {
|
|
5240
5261
|
chip,
|
|
5241
5262
|
remove: {
|
|
@@ -5247,7 +5268,10 @@ var QChip_default = createComponent({
|
|
|
5247
5268
|
};
|
|
5248
5269
|
});
|
|
5249
5270
|
function onKeyup(e) {
|
|
5250
|
-
if (e.keyCode
|
|
5271
|
+
if ([13, 32].includes(e.keyCode)) {
|
|
5272
|
+
onClick(e);
|
|
5273
|
+
stopAndPrevent(e);
|
|
5274
|
+
}
|
|
5251
5275
|
}
|
|
5252
5276
|
function onClick(e) {
|
|
5253
5277
|
if (!props.disable) {
|
|
@@ -5256,7 +5280,7 @@ var QChip_default = createComponent({
|
|
|
5256
5280
|
}
|
|
5257
5281
|
}
|
|
5258
5282
|
function onRemove(e) {
|
|
5259
|
-
if (e.keyCode === void 0 || e.keyCode
|
|
5283
|
+
if (e.keyCode === void 0 || [13, 32].includes(e.keyCode)) {
|
|
5260
5284
|
stopAndPrevent(e);
|
|
5261
5285
|
if (!props.disable) {
|
|
5262
5286
|
emit("update:modelValue", false);
|
|
@@ -5282,6 +5306,7 @@ var QChip_default = createComponent({
|
|
|
5282
5306
|
name: removeIcon.value,
|
|
5283
5307
|
...attributes.value.remove,
|
|
5284
5308
|
onClick: onRemove,
|
|
5309
|
+
onKeydown: preventSpace$3,
|
|
5285
5310
|
onKeyup: onRemove
|
|
5286
5311
|
}));
|
|
5287
5312
|
return child;
|
|
@@ -5294,6 +5319,7 @@ var QChip_default = createComponent({
|
|
|
5294
5319
|
};
|
|
5295
5320
|
if (isClickable.value) Object.assign(data, attributes.value.chip, {
|
|
5296
5321
|
onClick,
|
|
5322
|
+
onKeydown: preventSpace$3,
|
|
5297
5323
|
onKeyup
|
|
5298
5324
|
});
|
|
5299
5325
|
return hDir("div", data, getContent(), "ripple", props.ripple !== false && !props.disable, () => [[Ripple_default, props.ripple]]);
|
|
@@ -6056,16 +6082,14 @@ function useSlider({ updateValue, updatePosition, getDragging, formAttrs }) {
|
|
|
6056
6082
|
viewBox: "0 0 20 20",
|
|
6057
6083
|
"aria-hidden": "true"
|
|
6058
6084
|
}, [h("path", { d: props.thumbPath })]), h("div", { class: "q-slider__focus-ring fit" })];
|
|
6059
|
-
if (props.label || props.labelAlways) {
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
if (props.name !== void 0 && !props.disable) injectFormInput(thumbContent, "push");
|
|
6068
|
-
}
|
|
6085
|
+
if (props.label || props.labelAlways) thumbContent.push(h("div", { class: pinClass.value + " absolute fit no-pointer-events" + pinColor.value }, [h("div", {
|
|
6086
|
+
class: labelClass.value,
|
|
6087
|
+
style: { minWidth: props.thumbSize }
|
|
6088
|
+
}, [h("div", {
|
|
6089
|
+
class: textContainerClass.value,
|
|
6090
|
+
style: textContainerStyle.value
|
|
6091
|
+
}, [h("span", { class: textClass.value }, thumb.label.value)])])]));
|
|
6092
|
+
if (thumb.injectFormInput !== false && props.name !== void 0 && !props.disable) injectFormInput(thumbContent, "push");
|
|
6069
6093
|
return h("div", {
|
|
6070
6094
|
class: thumbClasses.value,
|
|
6071
6095
|
style: style.value,
|
|
@@ -6292,8 +6316,9 @@ var QResizeObserver_default = createComponent({
|
|
|
6292
6316
|
const { proxy } = getCurrentInstance();
|
|
6293
6317
|
proxy.trigger = trigger;
|
|
6294
6318
|
if (hasObserver) {
|
|
6295
|
-
let observer;
|
|
6319
|
+
let observer, isDestroyed = false;
|
|
6296
6320
|
const init = (stop) => {
|
|
6321
|
+
if (isDestroyed) return;
|
|
6297
6322
|
targetEl = proxy.$el.parentNode;
|
|
6298
6323
|
if (targetEl) {
|
|
6299
6324
|
observer = new ResizeObserver(trigger);
|
|
@@ -6307,6 +6332,7 @@ var QResizeObserver_default = createComponent({
|
|
|
6307
6332
|
init();
|
|
6308
6333
|
});
|
|
6309
6334
|
onBeforeUnmount(() => {
|
|
6335
|
+
isDestroyed = true;
|
|
6310
6336
|
if (timer !== null) clearTimeout(timer);
|
|
6311
6337
|
if (observer !== void 0) {
|
|
6312
6338
|
if (observer.disconnect !== void 0) observer.disconnect();
|
|
@@ -6316,7 +6342,7 @@ var QResizeObserver_default = createComponent({
|
|
|
6316
6342
|
return noop;
|
|
6317
6343
|
}
|
|
6318
6344
|
const { isHydrated } = useHydration();
|
|
6319
|
-
let curDocView;
|
|
6345
|
+
let curDocView, isDestroyed = false;
|
|
6320
6346
|
const cleanup = () => {
|
|
6321
6347
|
if (timer !== null) {
|
|
6322
6348
|
clearTimeout(timer);
|
|
@@ -6337,11 +6363,15 @@ var QResizeObserver_default = createComponent({
|
|
|
6337
6363
|
};
|
|
6338
6364
|
onMounted(() => {
|
|
6339
6365
|
nextTick(() => {
|
|
6366
|
+
if (isDestroyed) return;
|
|
6340
6367
|
targetEl = proxy.$el;
|
|
6341
6368
|
if (targetEl) onObjLoad();
|
|
6342
6369
|
});
|
|
6343
6370
|
});
|
|
6344
|
-
onBeforeUnmount(
|
|
6371
|
+
onBeforeUnmount(() => {
|
|
6372
|
+
isDestroyed = true;
|
|
6373
|
+
cleanup();
|
|
6374
|
+
});
|
|
6345
6375
|
return () => {
|
|
6346
6376
|
if (isHydrated.value) return h("object", {
|
|
6347
6377
|
class: "q--avoid-card-border",
|
|
@@ -6594,12 +6624,10 @@ var QTabs_default = createComponent({
|
|
|
6594
6624
|
const dirNext = keyCode === (props.vertical ? 40 : 39);
|
|
6595
6625
|
const dir = dirPrev ? -1 : dirNext ? 1 : void 0;
|
|
6596
6626
|
if (dir !== void 0) {
|
|
6597
|
-
const rtlDir = isRTL.value ? -1 : 1;
|
|
6598
|
-
const index = tabs.indexOf(fromEl) + dir * rtlDir;
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
tabs[index].focus({ preventScroll: true });
|
|
6602
|
-
}
|
|
6627
|
+
const rtlDir = props.vertical !== true && isRTL.value ? -1 : 1;
|
|
6628
|
+
const index = (tabs.indexOf(fromEl) + dir * rtlDir + len) % len;
|
|
6629
|
+
scrollToTabEl(tabs[index]);
|
|
6630
|
+
tabs[index].focus({ preventScroll: true });
|
|
6603
6631
|
return true;
|
|
6604
6632
|
}
|
|
6605
6633
|
}
|
|
@@ -6774,6 +6802,7 @@ var QTabs_default = createComponent({
|
|
|
6774
6802
|
ref: rootRef,
|
|
6775
6803
|
class: classes.value,
|
|
6776
6804
|
role: "tablist",
|
|
6805
|
+
"aria-orientation": props.vertical ? "vertical" : "horizontal",
|
|
6777
6806
|
onFocusin,
|
|
6778
6807
|
onFocusout
|
|
6779
6808
|
}, [
|
|
@@ -8730,6 +8759,7 @@ var QDate_default = createComponent({
|
|
|
8730
8759
|
const { $q } = proxy;
|
|
8731
8760
|
const isDark = useDark(props, $q);
|
|
8732
8761
|
const { getCache } = useRenderCache();
|
|
8762
|
+
const { isHydrated } = useHydration();
|
|
8733
8763
|
const { tabindex, headerClass, getLocale, getCurrentDate } = useDatetime(props, $q);
|
|
8734
8764
|
let lastEmitValue;
|
|
8735
8765
|
const injectFormInput = useFormInject(useFormAttrs(props));
|
|
@@ -9043,7 +9073,7 @@ var QDate_default = createComponent({
|
|
|
9043
9073
|
if (rangeView.value.includeFrom) res[from].editRangeFrom = true;
|
|
9044
9074
|
if (rangeView.value.includeTo) res[to].editRangeTo = true;
|
|
9045
9075
|
}
|
|
9046
|
-
if (viewModel.value.year === today.value.year && viewModel.value.month === today.value.month) res[index + today.value.day - 1].today = true;
|
|
9076
|
+
if (isHydrated.value && viewModel.value.year === today.value.year && viewModel.value.month === today.value.month) res[index + today.value.day - 1].today = true;
|
|
9047
9077
|
const left = res.length % 7;
|
|
9048
9078
|
if (left > 0) {
|
|
9049
9079
|
const afterDays = 7 - left;
|
|
@@ -9434,7 +9464,7 @@ var QDate_default = createComponent({
|
|
|
9434
9464
|
}, day.event ? () => h("div", { class: "q-date__event bg-" + day.event }) : null) : h("div", String(day.i))]))))])
|
|
9435
9465
|
])],
|
|
9436
9466
|
Months() {
|
|
9437
|
-
const currentYear = viewModel.value.year === today.value.year;
|
|
9467
|
+
const currentYear = isHydrated.value && viewModel.value.year === today.value.year;
|
|
9438
9468
|
const isDisabled = (month) => minNav.value !== null && viewModel.value.year === minNav.value.year && minNav.value.month > month || maxNav.value !== null && viewModel.value.year === maxNav.value.year && maxNav.value.month < month;
|
|
9439
9469
|
const content = innerLocale.value.monthsShort.map((month, i) => {
|
|
9440
9470
|
const active = viewModel.value.month === i + 1;
|
|
@@ -9473,7 +9503,7 @@ var QDate_default = createComponent({
|
|
|
9473
9503
|
const active = viewModel.value.year === i;
|
|
9474
9504
|
years.push(h("div", { class: "q-date__years-item flex flex-center" }, [h(QBtn_default, {
|
|
9475
9505
|
key: "yr" + i,
|
|
9476
|
-
class: today.value.year === i ? "q-date__today" : null,
|
|
9506
|
+
class: isHydrated.value && today.value.year === i ? "q-date__today" : null,
|
|
9477
9507
|
flat: !active,
|
|
9478
9508
|
label: i,
|
|
9479
9509
|
dense: true,
|
|
@@ -9634,7 +9664,7 @@ let maxScrollTop;
|
|
|
9634
9664
|
let vpPendingUpdate = false;
|
|
9635
9665
|
let bodyLeft;
|
|
9636
9666
|
let bodyTop;
|
|
9637
|
-
let
|
|
9667
|
+
let routePath;
|
|
9638
9668
|
let closeTimer = null;
|
|
9639
9669
|
function onAppleScroll(e) {
|
|
9640
9670
|
if (e.target === document) document.scrollingElement.scrollTop = document.scrollingElement.scrollTop;
|
|
@@ -9660,7 +9690,7 @@ function apply$1(action) {
|
|
|
9660
9690
|
scrollPositionY = getVerticalScrollPosition(window);
|
|
9661
9691
|
bodyLeft = body.style.left;
|
|
9662
9692
|
bodyTop = body.style.top;
|
|
9663
|
-
|
|
9693
|
+
routePath = window.location.pathname;
|
|
9664
9694
|
body.style.left = `-${scrollPositionX}px`;
|
|
9665
9695
|
body.style.top = `-${scrollPositionY}px`;
|
|
9666
9696
|
if (overflowX !== "hidden" && (overflowX === "scroll" || body.scrollWidth > window.innerWidth)) body.classList.add("q-body--force-scrollbar-x");
|
|
@@ -9683,7 +9713,7 @@ function apply$1(action) {
|
|
|
9683
9713
|
document.qScrollPrevented = false;
|
|
9684
9714
|
body.style.left = bodyLeft;
|
|
9685
9715
|
body.style.top = bodyTop;
|
|
9686
|
-
if (window.location.
|
|
9716
|
+
if (window.location.pathname === routePath) window.scrollTo(scrollPositionX, scrollPositionY);
|
|
9687
9717
|
maxScrollTop = void 0;
|
|
9688
9718
|
}
|
|
9689
9719
|
}
|
|
@@ -9800,6 +9830,7 @@ var QDialog_default = createComponent({
|
|
|
9800
9830
|
hideOnRouteChange,
|
|
9801
9831
|
handleShow,
|
|
9802
9832
|
handleHide,
|
|
9833
|
+
handleRouteChange,
|
|
9803
9834
|
processOnMount: true
|
|
9804
9835
|
});
|
|
9805
9836
|
const { addToHistory, removeFromHistory } = useHistory(showing, hide, hideOnRouteChange);
|
|
@@ -9854,8 +9885,11 @@ var QDialog_default = createComponent({
|
|
|
9854
9885
|
animating.value = true;
|
|
9855
9886
|
hidePortal();
|
|
9856
9887
|
if (refocusTarget !== null) {
|
|
9857
|
-
(
|
|
9888
|
+
const target = (evt?.type.indexOf("key") === 0 ? refocusTarget.closest("[tabindex]:not([tabindex^=\"-\"])") : void 0) || refocusTarget;
|
|
9858
9889
|
refocusTarget = null;
|
|
9890
|
+
addFocusFn(() => {
|
|
9891
|
+
if (target.isConnected) target.focus();
|
|
9892
|
+
});
|
|
9859
9893
|
}
|
|
9860
9894
|
registerTimeout(() => {
|
|
9861
9895
|
hidePortal(true);
|
|
@@ -9863,6 +9897,9 @@ var QDialog_default = createComponent({
|
|
|
9863
9897
|
emit("hide", evt);
|
|
9864
9898
|
}, props.transitionDuration);
|
|
9865
9899
|
}
|
|
9900
|
+
function handleRouteChange() {
|
|
9901
|
+
refocusTarget = null;
|
|
9902
|
+
}
|
|
9866
9903
|
function focus(selector) {
|
|
9867
9904
|
addFocusFn(() => {
|
|
9868
9905
|
let node = innerRef.value;
|
|
@@ -10590,6 +10627,7 @@ var Caret = class {
|
|
|
10590
10627
|
};
|
|
10591
10628
|
//#endregion
|
|
10592
10629
|
//#region src/components/tooltip/QTooltip.js
|
|
10630
|
+
let nonSelectableCount = 0;
|
|
10593
10631
|
var QTooltip_default = createComponent({
|
|
10594
10632
|
name: "QTooltip",
|
|
10595
10633
|
inheritAttrs: false,
|
|
@@ -10641,11 +10679,13 @@ var QTooltip_default = createComponent({
|
|
|
10641
10679
|
},
|
|
10642
10680
|
emits: [...useModelToggleEmits],
|
|
10643
10681
|
setup(props, { slots, emit, attrs }) {
|
|
10644
|
-
let unwatchPosition, observer;
|
|
10682
|
+
let unwatchPosition, observer, removeNonSelectableTimer, hasNonSelectable = false, describedBy;
|
|
10645
10683
|
const vm = getCurrentInstance();
|
|
10646
10684
|
const { proxy: { $q } } = vm;
|
|
10647
10685
|
const innerRef = ref(null);
|
|
10648
10686
|
const showing = ref(false);
|
|
10687
|
+
const targetUid = useId();
|
|
10688
|
+
const tooltipId = computed(() => attrs.id || targetUid.value);
|
|
10649
10689
|
const anchorOrigin = computed(() => parsePosition(props.anchor, $q.lang.rtl));
|
|
10650
10690
|
const selfOrigin = computed(() => parsePosition(props.self, $q.lang.rtl));
|
|
10651
10691
|
const hideOnRouteChange = computed(() => !props.persistent);
|
|
@@ -10667,7 +10707,8 @@ var QTooltip_default = createComponent({
|
|
|
10667
10707
|
});
|
|
10668
10708
|
Object.assign(anchorEvents, {
|
|
10669
10709
|
delayShow,
|
|
10670
|
-
delayHide
|
|
10710
|
+
delayHide,
|
|
10711
|
+
onFocusin
|
|
10671
10712
|
});
|
|
10672
10713
|
const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent, "tooltip");
|
|
10673
10714
|
if ($q.platform.is.mobile) {
|
|
@@ -10686,9 +10727,12 @@ var QTooltip_default = createComponent({
|
|
|
10686
10727
|
onBeforeUnmount(() => {
|
|
10687
10728
|
removeClickOutside(clickOutsideProps);
|
|
10688
10729
|
});
|
|
10689
|
-
}
|
|
10730
|
+
} else watch(() => (props.modelValue === null || props["onUpdate:modelValue"]) && showing.value === true && props.persistent !== true, (val) => {
|
|
10731
|
+
(val === true ? addEscapeKey : removeEscapeKey)(onEscapeKey);
|
|
10732
|
+
});
|
|
10690
10733
|
function handleShow(evt) {
|
|
10691
10734
|
showPortal();
|
|
10735
|
+
addAriaDescription();
|
|
10692
10736
|
registerTick(() => {
|
|
10693
10737
|
observer?.disconnect();
|
|
10694
10738
|
if (innerRef.value === null) {
|
|
@@ -10730,7 +10774,10 @@ var QTooltip_default = createComponent({
|
|
|
10730
10774
|
unwatchPosition = void 0;
|
|
10731
10775
|
}
|
|
10732
10776
|
unconfigureScrollTarget();
|
|
10777
|
+
removeEscapeKey(onEscapeKey);
|
|
10733
10778
|
cleanEvt(anchorEvents, "tooltipTemp");
|
|
10779
|
+
removeAriaDescription();
|
|
10780
|
+
setNonSelectable(false);
|
|
10734
10781
|
}
|
|
10735
10782
|
function updatePosition() {
|
|
10736
10783
|
setPosition({
|
|
@@ -10745,8 +10792,12 @@ var QTooltip_default = createComponent({
|
|
|
10745
10792
|
}
|
|
10746
10793
|
function delayShow(evt) {
|
|
10747
10794
|
if ($q.platform.is.mobile) {
|
|
10795
|
+
if (removeNonSelectableTimer !== void 0) {
|
|
10796
|
+
clearTimeout(removeNonSelectableTimer);
|
|
10797
|
+
removeNonSelectableTimer = void 0;
|
|
10798
|
+
}
|
|
10748
10799
|
clearSelection();
|
|
10749
|
-
|
|
10800
|
+
setNonSelectable(true);
|
|
10750
10801
|
const target = anchorEl.value;
|
|
10751
10802
|
const evts = [
|
|
10752
10803
|
"touchmove",
|
|
@@ -10769,14 +10820,26 @@ var QTooltip_default = createComponent({
|
|
|
10769
10820
|
if ($q.platform.is.mobile) {
|
|
10770
10821
|
cleanEvt(anchorEvents, "tooltipTemp");
|
|
10771
10822
|
clearSelection();
|
|
10772
|
-
setTimeout(() => {
|
|
10773
|
-
|
|
10823
|
+
removeNonSelectableTimer = setTimeout(() => {
|
|
10824
|
+
removeNonSelectableTimer = void 0;
|
|
10825
|
+
setNonSelectable(false);
|
|
10774
10826
|
}, 10);
|
|
10775
10827
|
}
|
|
10776
10828
|
registerTimeout(() => {
|
|
10777
10829
|
hide(evt);
|
|
10778
10830
|
}, props.hideDelay);
|
|
10779
10831
|
}
|
|
10832
|
+
function onFocusin(evt) {
|
|
10833
|
+
const el = evt.target;
|
|
10834
|
+
if (!el) return;
|
|
10835
|
+
try {
|
|
10836
|
+
if (el.matches(":focus-visible") === false) return;
|
|
10837
|
+
} catch {}
|
|
10838
|
+
delayShow(evt);
|
|
10839
|
+
}
|
|
10840
|
+
function onEscapeKey(evt) {
|
|
10841
|
+
hide(evt);
|
|
10842
|
+
}
|
|
10780
10843
|
function configureAnchorEl() {
|
|
10781
10844
|
if (props.noParentEvent || anchorEl.value === null) return;
|
|
10782
10845
|
const evts = $q.platform.is.mobile ? [[
|
|
@@ -10784,19 +10847,66 @@ var QTooltip_default = createComponent({
|
|
|
10784
10847
|
"touchstart",
|
|
10785
10848
|
"delayShow",
|
|
10786
10849
|
"passive"
|
|
10787
|
-
]] : [
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10850
|
+
]] : [
|
|
10851
|
+
[
|
|
10852
|
+
anchorEl.value,
|
|
10853
|
+
"mouseenter",
|
|
10854
|
+
"delayShow",
|
|
10855
|
+
"passive"
|
|
10856
|
+
],
|
|
10857
|
+
[
|
|
10858
|
+
anchorEl.value,
|
|
10859
|
+
"mouseleave",
|
|
10860
|
+
"delayHide",
|
|
10861
|
+
"passive"
|
|
10862
|
+
],
|
|
10863
|
+
[
|
|
10864
|
+
anchorEl.value,
|
|
10865
|
+
"focusin",
|
|
10866
|
+
"onFocusin",
|
|
10867
|
+
"passive"
|
|
10868
|
+
],
|
|
10869
|
+
[
|
|
10870
|
+
anchorEl.value,
|
|
10871
|
+
"focusout",
|
|
10872
|
+
"delayHide",
|
|
10873
|
+
"passive"
|
|
10874
|
+
]
|
|
10875
|
+
];
|
|
10798
10876
|
addEvt(anchorEvents, "anchor", evts);
|
|
10799
10877
|
}
|
|
10878
|
+
function setNonSelectable(state) {
|
|
10879
|
+
if (hasNonSelectable === state) return;
|
|
10880
|
+
hasNonSelectable = state;
|
|
10881
|
+
nonSelectableCount += state ? 1 : -1;
|
|
10882
|
+
document.body.classList.toggle("non-selectable", nonSelectableCount > 0);
|
|
10883
|
+
if (!state && removeNonSelectableTimer !== void 0) {
|
|
10884
|
+
clearTimeout(removeNonSelectableTimer);
|
|
10885
|
+
removeNonSelectableTimer = void 0;
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10888
|
+
function addAriaDescription() {
|
|
10889
|
+
const el = anchorEl.value, id = tooltipId.value;
|
|
10890
|
+
if (el === null || id === void 0) return;
|
|
10891
|
+
const ids = (el.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean);
|
|
10892
|
+
describedBy = {
|
|
10893
|
+
el,
|
|
10894
|
+
id,
|
|
10895
|
+
added: !ids.includes(id)
|
|
10896
|
+
};
|
|
10897
|
+
if (describedBy.added) {
|
|
10898
|
+
ids.push(id);
|
|
10899
|
+
el.setAttribute("aria-describedby", ids.join(" "));
|
|
10900
|
+
}
|
|
10901
|
+
}
|
|
10902
|
+
function removeAriaDescription() {
|
|
10903
|
+
if (describedBy?.added === true) {
|
|
10904
|
+
const { el, id } = describedBy, value = (el.getAttribute("aria-describedby") || "").split(/\s+/).filter((entry) => entry !== "" && entry !== id);
|
|
10905
|
+
if (value.length === 0) el.removeAttribute("aria-describedby");
|
|
10906
|
+
else el.setAttribute("aria-describedby", value.join(" "));
|
|
10907
|
+
}
|
|
10908
|
+
describedBy = void 0;
|
|
10909
|
+
}
|
|
10800
10910
|
function configureScrollTarget() {
|
|
10801
10911
|
if (anchorEl.value !== null || props.scrollTarget !== void 0) {
|
|
10802
10912
|
localScrollTarget.value = getScrollTarget(anchorEl.value, props.scrollTarget);
|
|
@@ -10807,6 +10917,7 @@ var QTooltip_default = createComponent({
|
|
|
10807
10917
|
function getTooltipContent() {
|
|
10808
10918
|
return showing.value ? h("div", {
|
|
10809
10919
|
...attrs,
|
|
10920
|
+
id: tooltipId.value,
|
|
10810
10921
|
ref: innerRef,
|
|
10811
10922
|
class: ["q-tooltip q-tooltip--style q-position-engine no-pointer-events", attrs.class],
|
|
10812
10923
|
style: [attrs.style, transitionStyle.value],
|
|
@@ -10876,6 +10987,9 @@ var QItem_default = createComponent({
|
|
|
10876
10987
|
}
|
|
10877
10988
|
emit("keyup", e);
|
|
10878
10989
|
}
|
|
10990
|
+
function onKeydown(e) {
|
|
10991
|
+
if (isClickable.value && e.keyCode === 32) stopAndPrevent(e);
|
|
10992
|
+
}
|
|
10879
10993
|
function getContent() {
|
|
10880
10994
|
const child = hUniqueSlot(slots.default, []);
|
|
10881
10995
|
if (isClickable.value) child.unshift(h("div", {
|
|
@@ -10890,8 +11004,9 @@ var QItem_default = createComponent({
|
|
|
10890
11004
|
ref: rootRef,
|
|
10891
11005
|
class: classes.value,
|
|
10892
11006
|
style: style.value,
|
|
10893
|
-
role: "listitem",
|
|
11007
|
+
role: hasLink.value ? void 0 : isClickable.value ? "button" : "listitem",
|
|
10894
11008
|
onClick,
|
|
11009
|
+
onKeydown,
|
|
10895
11010
|
onKeyup
|
|
10896
11011
|
};
|
|
10897
11012
|
if (isClickable.value) {
|
|
@@ -11154,6 +11269,7 @@ function extend(...args) {
|
|
|
11154
11269
|
i--;
|
|
11155
11270
|
}
|
|
11156
11271
|
for (; i < length; i++) if ((options = args[i]) !== null) for (name in options) {
|
|
11272
|
+
if (name === "__proto__") continue;
|
|
11157
11273
|
src = target[name];
|
|
11158
11274
|
copy = options[name];
|
|
11159
11275
|
if (target === copy) continue;
|
|
@@ -11256,8 +11372,9 @@ var QEditor_default = createComponent({
|
|
|
11256
11372
|
const editLinkUrl = ref(null);
|
|
11257
11373
|
const isViewingSource = ref(false);
|
|
11258
11374
|
const editable = computed(() => !props.readonly && !props.disable);
|
|
11259
|
-
let defaultFont, offsetBottom;
|
|
11375
|
+
let defaultFont, offsetBottom, refreshToolbarTimer = null;
|
|
11260
11376
|
let lastEmit = props.modelValue;
|
|
11377
|
+
const renderInitialContent = isRuntimeSsrPreHydration.value;
|
|
11261
11378
|
document.execCommand("defaultParagraphSeparator", false, props.paragraphTag);
|
|
11262
11379
|
defaultFont = window.getComputedStyle(document.body).fontFamily;
|
|
11263
11380
|
const toolbarBackgroundClass = computed(() => props.toolbarBg ? ` bg-${props.toolbarBg}` : "");
|
|
@@ -11688,7 +11805,9 @@ var QEditor_default = createComponent({
|
|
|
11688
11805
|
});
|
|
11689
11806
|
}
|
|
11690
11807
|
function refreshToolbar() {
|
|
11691
|
-
|
|
11808
|
+
if (refreshToolbarTimer !== null) clearTimeout(refreshToolbarTimer);
|
|
11809
|
+
refreshToolbarTimer = setTimeout(() => {
|
|
11810
|
+
refreshToolbarTimer = null;
|
|
11692
11811
|
editLinkUrl.value = null;
|
|
11693
11812
|
proxy.$forceUpdate();
|
|
11694
11813
|
}, 1);
|
|
@@ -11708,6 +11827,7 @@ var QEditor_default = createComponent({
|
|
|
11708
11827
|
document.addEventListener("selectionchange", onSelectionchange);
|
|
11709
11828
|
});
|
|
11710
11829
|
onBeforeUnmount(() => {
|
|
11830
|
+
if (refreshToolbarTimer !== null) clearTimeout(refreshToolbarTimer);
|
|
11711
11831
|
document.removeEventListener("selectionchange", onSelectionchange);
|
|
11712
11832
|
});
|
|
11713
11833
|
Object.assign(proxy, {
|
|
@@ -11745,6 +11865,7 @@ var QEditor_default = createComponent({
|
|
|
11745
11865
|
class: innerClass.value,
|
|
11746
11866
|
contenteditable: editable.value,
|
|
11747
11867
|
placeholder: props.placeholder,
|
|
11868
|
+
...renderInitialContent ? { innerHTML: props.modelValue } : {},
|
|
11748
11869
|
...splitAttrs.listeners.value,
|
|
11749
11870
|
onInput,
|
|
11750
11871
|
onKeydown,
|
|
@@ -11929,6 +12050,9 @@ var QSeparator_default = createComponent({
|
|
|
11929
12050
|
//#endregion
|
|
11930
12051
|
//#region src/components/expansion-item/QExpansionItem.js
|
|
11931
12052
|
const itemGroups = shallowReactive({});
|
|
12053
|
+
function preventSpace$2(e) {
|
|
12054
|
+
if (e.keyCode === 32) stopAndPrevent(e);
|
|
12055
|
+
}
|
|
11932
12056
|
const LINK_PROPS = Object.keys(useRouterLinkProps);
|
|
11933
12057
|
var QExpansionItem_default = createComponent({
|
|
11934
12058
|
name: "QExpansionItem",
|
|
@@ -12027,7 +12151,7 @@ var QExpansionItem_default = createComponent({
|
|
|
12027
12151
|
emit("click", e);
|
|
12028
12152
|
}
|
|
12029
12153
|
function toggleIconKeyboard(e) {
|
|
12030
|
-
if (e.keyCode
|
|
12154
|
+
if ([13, 32].includes(e.keyCode)) toggleIcon(e, true);
|
|
12031
12155
|
}
|
|
12032
12156
|
function toggleIcon(e, keyboard) {
|
|
12033
12157
|
if (!keyboard && !e.qAvoidFocus) blurTargetRef.value?.focus();
|
|
@@ -12072,6 +12196,7 @@ var QExpansionItem_default = createComponent({
|
|
|
12072
12196
|
tabindex: 0,
|
|
12073
12197
|
...toggleAriaAttrs.value,
|
|
12074
12198
|
onClick: toggleIcon,
|
|
12199
|
+
onKeydown: preventSpace$2,
|
|
12075
12200
|
onKeyup: toggleIconKeyboard
|
|
12076
12201
|
});
|
|
12077
12202
|
child.unshift(h("div", {
|
|
@@ -12707,6 +12832,7 @@ function useField(state) {
|
|
|
12707
12832
|
if (!$q.platform.is.mobile) (state.targetRef?.value || state.rootRef.value).focus();
|
|
12708
12833
|
else if (state.rootRef.value.contains(document.activeElement)) document.activeElement.blur();
|
|
12709
12834
|
if (props.type === "file") state.inputRef.value.value = null;
|
|
12835
|
+
state.onClear?.();
|
|
12710
12836
|
emit("update:modelValue", null);
|
|
12711
12837
|
if (state.changeEvent) emit("change", null);
|
|
12712
12838
|
emit("clear", props.modelValue);
|
|
@@ -12917,7 +13043,7 @@ function useFile({ editable, dnd, getFileInput, addFilesToQueue }) {
|
|
|
12917
13043
|
if (rejectedFiles.length !== 0) emit("rejected", rejectedFiles);
|
|
12918
13044
|
};
|
|
12919
13045
|
if (props.accept !== void 0 && !extensions.value.includes("*/")) {
|
|
12920
|
-
files = filterFiles(files, rejectedFiles, "accept", (file) => extensions.value.some((ext) => file.type.toUpperCase().startsWith(ext) || file.name.toUpperCase().endsWith(ext)));
|
|
13046
|
+
files = filterFiles(files, rejectedFiles, "accept", (file) => extensions.value.some((ext) => (ext.endsWith("/") ? file.type.toUpperCase().startsWith(ext) : file.type.toUpperCase() === ext) || file.name.toUpperCase().endsWith(ext)));
|
|
12921
13047
|
if (files.length === 0) return done();
|
|
12922
13048
|
}
|
|
12923
13049
|
if (props.maxFileSize !== void 0) {
|
|
@@ -12927,18 +13053,29 @@ function useFile({ editable, dnd, getFileInput, addFilesToQueue }) {
|
|
|
12927
13053
|
}
|
|
12928
13054
|
if (!props.multiple && files.length !== 0) files = [files[0]];
|
|
12929
13055
|
files.forEach((file) => {
|
|
12930
|
-
file.__key =
|
|
13056
|
+
file.__key = JSON.stringify([
|
|
13057
|
+
file.webkitRelativePath,
|
|
13058
|
+
file.lastModified,
|
|
13059
|
+
file.name,
|
|
13060
|
+
file.size
|
|
13061
|
+
]);
|
|
12931
13062
|
});
|
|
12932
13063
|
if (append) {
|
|
12933
|
-
const
|
|
12934
|
-
files = filterFiles(files, rejectedFiles, "duplicate", (file) =>
|
|
13064
|
+
const filenameSet = new Set(currentFileList.map((entry) => entry.__key));
|
|
13065
|
+
files = filterFiles(files, rejectedFiles, "duplicate", (file) => {
|
|
13066
|
+
if (filenameSet.has(file.__key)) return false;
|
|
13067
|
+
filenameSet.add(file.__key);
|
|
13068
|
+
return true;
|
|
13069
|
+
});
|
|
12935
13070
|
}
|
|
12936
13071
|
if (files.length === 0) return done();
|
|
12937
13072
|
if (props.maxTotalSize !== void 0) {
|
|
12938
13073
|
let size = append ? currentFileList.reduce((total, file) => total + file.size, 0) : 0;
|
|
12939
13074
|
files = filterFiles(files, rejectedFiles, "max-total-size", (file) => {
|
|
12940
|
-
size
|
|
12941
|
-
|
|
13075
|
+
const newSize = size + file.size;
|
|
13076
|
+
if (newSize > maxTotalSizeNumber.value) return false;
|
|
13077
|
+
size = newSize;
|
|
13078
|
+
return true;
|
|
12942
13079
|
});
|
|
12943
13080
|
if (files.length === 0) return done();
|
|
12944
13081
|
}
|
|
@@ -14106,6 +14243,9 @@ function useMask(props, emit, emitValue, inputRef) {
|
|
|
14106
14243
|
watch(() => props.unmaskedValue, () => {
|
|
14107
14244
|
if (hasMask.value) updateMaskValue(innerValue.value);
|
|
14108
14245
|
});
|
|
14246
|
+
watch(() => props.maskTokens, () => {
|
|
14247
|
+
if (hasMask.value) updateMaskValue(innerValue.value, true);
|
|
14248
|
+
}, { deep: true });
|
|
14109
14249
|
function getInitialMaskedValue() {
|
|
14110
14250
|
updateMaskInternals();
|
|
14111
14251
|
if (hasMask.value) {
|
|
@@ -14179,12 +14319,12 @@ function useMask(props, emit, emitValue, inputRef) {
|
|
|
14179
14319
|
maskReplaced = maskMarked.split(MARKER).join(fillChar);
|
|
14180
14320
|
}
|
|
14181
14321
|
function updateMaskValue(rawVal, updateMaskInternalsFlag, inputType) {
|
|
14182
|
-
const inp = inputRef.value, end = inp
|
|
14322
|
+
const inp = inputRef.value, end = inp?.selectionEnd ?? 0, endReverse = inp === null ? 0 : inp.value.length - end, unmasked = unmaskValue(rawVal);
|
|
14183
14323
|
if (updateMaskInternalsFlag === true) updateMaskInternals();
|
|
14184
14324
|
const preMasked = maskValue(unmasked, updateMaskInternalsFlag), masked = props.fillMask !== false ? fillWithMask(preMasked) : preMasked, changed = innerValue.value !== masked;
|
|
14185
|
-
if (inp.value !== masked) inp.value = masked;
|
|
14325
|
+
if (inp !== null && inp.value !== masked) inp.value = masked;
|
|
14186
14326
|
if (changed) innerValue.value = masked;
|
|
14187
|
-
if (document.activeElement === inp) nextTick(() => {
|
|
14327
|
+
if (inp !== null && document.activeElement === inp) nextTick(() => {
|
|
14188
14328
|
if (masked === maskReplaced) {
|
|
14189
14329
|
const cursor = props.reverseFillMask ? maskReplaced.length : 0;
|
|
14190
14330
|
inp.setSelectionRange(cursor, cursor, "forward");
|
|
@@ -14382,6 +14522,7 @@ var QInput_default = createComponent({
|
|
|
14382
14522
|
Number,
|
|
14383
14523
|
FileList
|
|
14384
14524
|
],
|
|
14525
|
+
modelModifiers: Object,
|
|
14385
14526
|
shadowText: String,
|
|
14386
14527
|
type: {
|
|
14387
14528
|
type: String,
|
|
@@ -14466,6 +14607,12 @@ var QInput_default = createComponent({
|
|
|
14466
14607
|
if (inputRef.value) inputRef.value.value = props.modelValue;
|
|
14467
14608
|
});
|
|
14468
14609
|
watch(() => props.modelValue, (v) => {
|
|
14610
|
+
if (emitTimer !== null) {
|
|
14611
|
+
cancelPendingValueEmission();
|
|
14612
|
+
typedNumber = false;
|
|
14613
|
+
stopValueWatcher = false;
|
|
14614
|
+
delete temp.value;
|
|
14615
|
+
}
|
|
14469
14616
|
if (hasMask.value) {
|
|
14470
14617
|
if (stopValueWatcher) {
|
|
14471
14618
|
stopValueWatcher = false;
|
|
@@ -14476,6 +14623,7 @@ var QInput_default = createComponent({
|
|
|
14476
14623
|
innerValue.value = v;
|
|
14477
14624
|
if (props.type === "number" && Object.hasOwn(temp, "value")) if (typedNumber) typedNumber = false;
|
|
14478
14625
|
else delete temp.value;
|
|
14626
|
+
if (props.modelModifiers?.trim === true && Object.hasOwn(temp, "value") && (typeof temp.value !== "string" || temp.value.trim() !== v)) delete temp.value;
|
|
14479
14627
|
}
|
|
14480
14628
|
if (props.autogrow) nextTick(adjustHeight);
|
|
14481
14629
|
});
|
|
@@ -14515,6 +14663,7 @@ var QInput_default = createComponent({
|
|
|
14515
14663
|
}
|
|
14516
14664
|
if (hasMask.value) updateMaskValue(val, false, e.inputType);
|
|
14517
14665
|
else {
|
|
14666
|
+
if (props.modelModifiers?.trim === true) temp.value = val;
|
|
14518
14667
|
emitValue(val);
|
|
14519
14668
|
if (isTypeText.value && e.target === document.activeElement) {
|
|
14520
14669
|
const { selectionStart, selectionEnd } = e.target;
|
|
@@ -14532,7 +14681,7 @@ var QInput_default = createComponent({
|
|
|
14532
14681
|
function emitValue(val, stopWatcher) {
|
|
14533
14682
|
emitValueFn = () => {
|
|
14534
14683
|
emitTimer = null;
|
|
14535
|
-
if (props.type !== "number" && Object.hasOwn(temp, "value")) delete temp.value;
|
|
14684
|
+
if (props.type !== "number" && (props.modelModifiers?.trim !== true || hasMask.value) && Object.hasOwn(temp, "value")) delete temp.value;
|
|
14536
14685
|
if (props.modelValue !== val && emitCachedValue !== val) {
|
|
14537
14686
|
emitCachedValue = val;
|
|
14538
14687
|
if (stopWatcher === true) stopValueWatcher = true;
|
|
@@ -14553,6 +14702,19 @@ var QInput_default = createComponent({
|
|
|
14553
14702
|
emitTimer = setTimeout(emitValueFn, props.debounce);
|
|
14554
14703
|
} else emitValueFn();
|
|
14555
14704
|
}
|
|
14705
|
+
function cancelPendingValueEmission() {
|
|
14706
|
+
if (emitTimer !== null) {
|
|
14707
|
+
clearTimeout(emitTimer);
|
|
14708
|
+
emitTimer = null;
|
|
14709
|
+
}
|
|
14710
|
+
emitValueFn = void 0;
|
|
14711
|
+
}
|
|
14712
|
+
function onClear() {
|
|
14713
|
+
cancelPendingValueEmission();
|
|
14714
|
+
typedNumber = false;
|
|
14715
|
+
stopValueWatcher = false;
|
|
14716
|
+
delete temp.value;
|
|
14717
|
+
}
|
|
14556
14718
|
function adjustHeight() {
|
|
14557
14719
|
requestAnimationFrame(() => {
|
|
14558
14720
|
const inp = inputRef.value;
|
|
@@ -14609,6 +14771,7 @@ var QInput_default = createComponent({
|
|
|
14609
14771
|
hasShadow: computed(() => props.type !== "file" && typeof props.shadowText === "string" && props.shadowText.length !== 0),
|
|
14610
14772
|
inputRef,
|
|
14611
14773
|
emitValue,
|
|
14774
|
+
onClear,
|
|
14612
14775
|
hasValue,
|
|
14613
14776
|
floatingLabel: computed(() => hasValue.value && (props.type !== "number" || Number.isFinite(Number(innerValue.value))) || fieldValueIsFilled(props.displayValue)),
|
|
14614
14777
|
getControl: () => h(isTextarea.value ? "textarea" : "input", {
|
|
@@ -14655,7 +14818,7 @@ function update$3(el, ctx, value) {
|
|
|
14655
14818
|
if (ctx.handler !== handler) ctx.handler = handler;
|
|
14656
14819
|
if (changed) {
|
|
14657
14820
|
ctx.cfg = cfg;
|
|
14658
|
-
ctx.observer?.
|
|
14821
|
+
ctx.observer?.disconnect();
|
|
14659
14822
|
ctx.observer = new IntersectionObserver(([entry]) => {
|
|
14660
14823
|
if (typeof ctx.handler === "function") {
|
|
14661
14824
|
if (entry.rootBounds === null && document.body.contains(el)) {
|
|
@@ -14672,7 +14835,7 @@ function update$3(el, ctx, value) {
|
|
|
14672
14835
|
function destroy$1(el) {
|
|
14673
14836
|
const ctx = el.__qvisible;
|
|
14674
14837
|
if (ctx !== void 0) {
|
|
14675
|
-
ctx.observer?.
|
|
14838
|
+
ctx.observer?.disconnect();
|
|
14676
14839
|
delete el.__qvisible;
|
|
14677
14840
|
}
|
|
14678
14841
|
}
|
|
@@ -16734,6 +16897,7 @@ var QRange_default = createComponent({
|
|
|
16734
16897
|
});
|
|
16735
16898
|
const maxEvents = computed(() => getEvents("max"));
|
|
16736
16899
|
const getMaxThumb = methods.getThumbRenderFn({
|
|
16900
|
+
injectFormInput: false,
|
|
16737
16901
|
focusValue: "max",
|
|
16738
16902
|
getNodeData: () => ({
|
|
16739
16903
|
...maxEvents.value,
|
|
@@ -16832,8 +16996,8 @@ var QRange_default = createComponent({
|
|
|
16832
16996
|
}
|
|
16833
16997
|
}
|
|
16834
16998
|
model.value = model.value.min === null || model.value.max === null ? {
|
|
16835
|
-
min: pos.min
|
|
16836
|
-
max: pos.max
|
|
16999
|
+
min: pos.min ?? props.min,
|
|
17000
|
+
max: pos.max ?? props.max
|
|
16837
17001
|
} : {
|
|
16838
17002
|
min: pos.min,
|
|
16839
17003
|
max: pos.max
|
|
@@ -16928,7 +17092,7 @@ var QRating_default = createComponent({
|
|
|
16928
17092
|
selIconLen,
|
|
16929
17093
|
selIcon: selIconLen > 0 ? props.iconSelected[selIconLen - 1] : props.iconSelected,
|
|
16930
17094
|
halfIconLen,
|
|
16931
|
-
halfIcon: halfIconLen > 0 ? props.iconHalf[
|
|
17095
|
+
halfIcon: halfIconLen > 0 ? props.iconHalf[halfIconLen - 1] : props.iconHalf,
|
|
16932
17096
|
colorLen,
|
|
16933
17097
|
color: colorLen > 0 ? props.color[colorLen - 1] : props.color,
|
|
16934
17098
|
selColorLen,
|
|
@@ -16949,14 +17113,14 @@ var QRating_default = createComponent({
|
|
|
16949
17113
|
return (i, label) => `${label} ${i}`;
|
|
16950
17114
|
});
|
|
16951
17115
|
const stars = computed(() => {
|
|
16952
|
-
const acc = [], icons = iconData.value, ceil = Math.ceil(props.modelValue),
|
|
17116
|
+
const acc = [], icons = iconData.value, ceil = Math.ceil(props.modelValue), tabIndex = Number.isInteger(props.modelValue) && props.modelValue >= 1 && props.modelValue <= props.max ? props.modelValue : 1;
|
|
16953
17117
|
const halfIndex = props.iconHalf === void 0 || ceil === props.modelValue ? -1 : ceil;
|
|
16954
17118
|
for (let i = 1; i <= props.max; i++) {
|
|
16955
17119
|
const active = mouseModel.value === 0 && props.modelValue >= i || mouseModel.value > 0 && mouseModel.value >= i, half = halfIndex === i && mouseModel.value < i, exSelected = mouseModel.value > 0 && (half ? ceil : props.modelValue) >= i && mouseModel.value < i, color = half ? i <= icons.halfColorLen ? props.colorHalf[i - 1] : icons.halfColor : icons.selColor !== void 0 && active ? i <= icons.selColorLen ? props.colorSelected[i - 1] : icons.selColor : i <= icons.colorLen ? props.color[i - 1] : icons.color, name = (half ? i <= icons.halfIconLen ? props.iconHalf[i - 1] : icons.halfIcon : icons.selIcon !== void 0 && (active || exSelected) ? i <= icons.selIconLen ? props.iconSelected[i - 1] : icons.selIcon : i <= icons.iconLen ? props.icon[i - 1] : icons.icon) || $q.iconSet.rating.icon;
|
|
16956
17120
|
acc.push({
|
|
16957
17121
|
name: (half ? i <= icons.halfIconLen ? props.iconHalf[i - 1] : icons.halfIcon : icons.selIcon !== void 0 && (active || exSelected) ? i <= icons.selIconLen ? props.iconSelected[i - 1] : icons.selIcon : i <= icons.iconLen ? props.icon[i - 1] : icons.icon) || $q.iconSet.rating.icon,
|
|
16958
17122
|
attrs: {
|
|
16959
|
-
tabindex,
|
|
17123
|
+
tabindex: editable.value ? i === tabIndex ? 0 : -1 : null,
|
|
16960
17124
|
role: "radio",
|
|
16961
17125
|
"aria-checked": props.modelValue === i ? "true" : "false",
|
|
16962
17126
|
"aria-label": iconLabel.value(i, name)
|
|
@@ -16982,17 +17146,25 @@ var QRating_default = createComponent({
|
|
|
16982
17146
|
function setHoverValue(value) {
|
|
16983
17147
|
if (editable.value) mouseModel.value = value;
|
|
16984
17148
|
}
|
|
16985
|
-
function
|
|
17149
|
+
function onKeydown(e, i) {
|
|
16986
17150
|
switch (e.keyCode) {
|
|
16987
17151
|
case 13:
|
|
16988
17152
|
case 32:
|
|
16989
17153
|
set(i);
|
|
16990
17154
|
return stopAndPrevent(e);
|
|
16991
|
-
case 37:
|
|
17155
|
+
case 37: {
|
|
17156
|
+
const index = i + ($q.lang.rtl ? 1 : -1);
|
|
17157
|
+
if (iconRefs[`rt${index}`]) iconRefs[`rt${index}`].focus();
|
|
17158
|
+
return stopAndPrevent(e);
|
|
17159
|
+
}
|
|
17160
|
+
case 39: {
|
|
17161
|
+
const index = i + ($q.lang.rtl ? -1 : 1);
|
|
17162
|
+
if (iconRefs[`rt${index}`]) iconRefs[`rt${index}`].focus();
|
|
17163
|
+
return stopAndPrevent(e);
|
|
17164
|
+
}
|
|
16992
17165
|
case 40:
|
|
16993
17166
|
if (iconRefs[`rt${i - 1}`]) iconRefs[`rt${i - 1}`].focus();
|
|
16994
17167
|
return stopAndPrevent(e);
|
|
16995
|
-
case 39:
|
|
16996
17168
|
case 38:
|
|
16997
17169
|
if (iconRefs[`rt${i + 1}`]) iconRefs[`rt${i + 1}`].focus();
|
|
16998
17170
|
return stopAndPrevent(e);
|
|
@@ -17026,8 +17198,8 @@ var QRating_default = createComponent({
|
|
|
17026
17198
|
setHoverValue(i);
|
|
17027
17199
|
},
|
|
17028
17200
|
onBlur: resetMouseModel,
|
|
17029
|
-
|
|
17030
|
-
|
|
17201
|
+
onKeydown(e) {
|
|
17202
|
+
onKeydown(e, i);
|
|
17031
17203
|
}
|
|
17032
17204
|
}, hMergeSlot(slots[`tip-${i}`], [h(QIcon_default, {
|
|
17033
17205
|
class: iconClass,
|
|
@@ -17142,11 +17314,11 @@ var QScrollArea_default = createComponent({
|
|
|
17142
17314
|
],
|
|
17143
17315
|
verticalOffset: {
|
|
17144
17316
|
type: Array,
|
|
17145
|
-
default: [0, 0]
|
|
17317
|
+
default: () => [0, 0]
|
|
17146
17318
|
},
|
|
17147
17319
|
horizontalOffset: {
|
|
17148
17320
|
type: Array,
|
|
17149
|
-
default: [0, 0]
|
|
17321
|
+
default: () => [0, 0]
|
|
17150
17322
|
},
|
|
17151
17323
|
contentStyle: [
|
|
17152
17324
|
Array,
|
|
@@ -17219,11 +17391,11 @@ var QScrollArea_default = createComponent({
|
|
|
17219
17391
|
scroll.horizontal.percentage = computed(() => {
|
|
17220
17392
|
const diff = scroll.horizontal.size.value - container.horizontal.value;
|
|
17221
17393
|
if (diff <= 0) return 0;
|
|
17222
|
-
const p = between(
|
|
17394
|
+
const p = between(getHorizontalLogicalPosition(scroll.horizontal.position.value) / diff, 0, 1);
|
|
17223
17395
|
return Math.round(p * 1e4) / 1e4;
|
|
17224
17396
|
});
|
|
17225
17397
|
scroll.horizontal.thumbHidden = computed(() => !(props.visible === null ? hover.value : props.visible) && !tempShowing.value && !panning.value || scroll.horizontal.size.value <= container.horizontal.value + 1);
|
|
17226
|
-
scroll.horizontal.thumbStart = computed(() => props.horizontalOffset[0] + scroll.horizontal.percentage.value * (container.horizontalInner.value - scroll.horizontal.thumbSize.value));
|
|
17398
|
+
scroll.horizontal.thumbStart = computed(() => props.horizontalOffset[proxy.$q.lang.rtl ? 1 : 0] + scroll.horizontal.percentage.value * (container.horizontalInner.value - scroll.horizontal.thumbSize.value));
|
|
17227
17399
|
scroll.horizontal.thumbSize = computed(() => Math.round(between(container.horizontalInner.value * container.horizontalInner.value / scroll.horizontal.size.value, getMinThumbSize(container.horizontalInner.value), container.horizontalInner.value)));
|
|
17228
17400
|
scroll.horizontal.style = computed(() => ({
|
|
17229
17401
|
...props.thumbStyle,
|
|
@@ -17299,22 +17471,28 @@ var QScrollArea_default = createComponent({
|
|
|
17299
17471
|
const data = scroll[axis];
|
|
17300
17472
|
if (e.isFirst) {
|
|
17301
17473
|
if (data.thumbHidden.value) return;
|
|
17302
|
-
panRefPos = data.position.value;
|
|
17474
|
+
panRefPos = axis === "horizontal" ? getHorizontalLogicalPosition(data.position.value) : data.position.value;
|
|
17303
17475
|
panning.value = true;
|
|
17304
17476
|
} else if (!panning.value) return;
|
|
17305
17477
|
if (e.isFinal) panning.value = false;
|
|
17306
17478
|
const dProp = dirProps[axis];
|
|
17307
17479
|
const multiplier = (data.size.value - container[axis].value) / (container[axis + "Inner"].value - data.thumbSize.value);
|
|
17308
17480
|
const distance = e.distance[dProp.dist];
|
|
17309
|
-
|
|
17481
|
+
const direction = (e.direction === dProp.dir ? 1 : -1) * (axis === "horizontal" && proxy.$q.lang.rtl ? -1 : 1);
|
|
17482
|
+
const pos = panRefPos + direction * distance * multiplier;
|
|
17483
|
+
setScroll(axis === "horizontal" ? getHorizontalNativePosition(pos) : pos, axis);
|
|
17310
17484
|
}
|
|
17311
17485
|
function onMousedown(evt, axis) {
|
|
17312
17486
|
const data = scroll[axis];
|
|
17313
17487
|
if (!data.thumbHidden.value) {
|
|
17314
|
-
const
|
|
17315
|
-
const
|
|
17488
|
+
const isHorizontalRtl = axis === "horizontal" && proxy.$q.lang.rtl;
|
|
17489
|
+
const startOffset = axis === "vertical" ? props.verticalOffset[0] : props.horizontalOffset[isHorizontalRtl ? 1 : 0];
|
|
17490
|
+
const offset = (isHorizontalRtl ? container.horizontal.value - evt.offsetX : evt[dirProps[axis].offset]) - startOffset;
|
|
17316
17491
|
const thumbStart = data.thumbStart.value - startOffset;
|
|
17317
|
-
if (offset < thumbStart || offset > thumbStart + data.thumbSize.value)
|
|
17492
|
+
if (offset < thumbStart || offset > thumbStart + data.thumbSize.value) {
|
|
17493
|
+
const percentage = between((offset - data.thumbSize.value / 2) / (container[axis + "Inner"].value - data.thumbSize.value), 0, 1);
|
|
17494
|
+
setScroll(isHorizontalRtl ? getHorizontalNativePosition(percentage * Math.max(0, data.size.value - container[axis].value)) : percentage * Math.max(0, data.size.value - container[axis].value), axis);
|
|
17495
|
+
}
|
|
17318
17496
|
if (data.ref.value !== null) data.ref.value.dispatchEvent(new MouseEvent(evt.type, evt));
|
|
17319
17497
|
}
|
|
17320
17498
|
}
|
|
@@ -17330,6 +17508,14 @@ var QScrollArea_default = createComponent({
|
|
|
17330
17508
|
function setScroll(offset, axis) {
|
|
17331
17509
|
targetRef.value[dirProps[axis].scroll] = offset;
|
|
17332
17510
|
}
|
|
17511
|
+
function getHorizontalLogicalPosition(position, rtl = proxy.$q.lang.rtl) {
|
|
17512
|
+
if (!rtl) return position;
|
|
17513
|
+
return rtlHasScrollBug ? Math.max(0, scroll.horizontal.size.value - container.horizontal.value) - position : -position;
|
|
17514
|
+
}
|
|
17515
|
+
function getHorizontalNativePosition(position, rtl = proxy.$q.lang.rtl) {
|
|
17516
|
+
if (!rtl) return position;
|
|
17517
|
+
return rtlHasScrollBug ? Math.max(0, scroll.horizontal.size.value - container.horizontal.value) - position : -position;
|
|
17518
|
+
}
|
|
17333
17519
|
let mouseEventTimer = null;
|
|
17334
17520
|
function onMouseenter() {
|
|
17335
17521
|
if (mouseEventTimer !== null) clearTimeout(mouseEventTimer);
|
|
@@ -17346,8 +17532,8 @@ var QScrollArea_default = createComponent({
|
|
|
17346
17532
|
hover.value = false;
|
|
17347
17533
|
}
|
|
17348
17534
|
let scrollPosition = null;
|
|
17349
|
-
watch(() => proxy.$q.lang.rtl, (rtl) => {
|
|
17350
|
-
if (targetRef.value !== null) setHorizontalScrollPosition(targetRef.value,
|
|
17535
|
+
watch(() => proxy.$q.lang.rtl, (rtl, oldRtl) => {
|
|
17536
|
+
if (targetRef.value !== null) setHorizontalScrollPosition(targetRef.value, getHorizontalNativePosition(getHorizontalLogicalPosition(scroll.horizontal.position.value, oldRtl), rtl));
|
|
17351
17537
|
});
|
|
17352
17538
|
onDeactivated(() => {
|
|
17353
17539
|
scrollPosition = {
|
|
@@ -17377,7 +17563,8 @@ var QScrollArea_default = createComponent({
|
|
|
17377
17563
|
}),
|
|
17378
17564
|
setScrollPosition: localSetScrollPosition,
|
|
17379
17565
|
setScrollPercentage(axis, percentage, duration) {
|
|
17380
|
-
|
|
17566
|
+
const offset = percentage * (scroll[axis].size.value - container[axis].value);
|
|
17567
|
+
localSetScrollPosition(axis, axis === "horizontal" ? getHorizontalNativePosition(offset) : offset, duration);
|
|
17381
17568
|
}
|
|
17382
17569
|
});
|
|
17383
17570
|
const store = {
|
|
@@ -18968,11 +19155,12 @@ var QSlideItem_default = createComponent({
|
|
|
18968
19155
|
if (pan.scale === 1) {
|
|
18969
19156
|
node.style.transform = `translate${pan.axis}(${pan.dir * 100}%)`;
|
|
18970
19157
|
if (timer !== null) clearTimeout(timer);
|
|
19158
|
+
const showing = pan.showing;
|
|
18971
19159
|
timer = setTimeout(() => {
|
|
18972
19160
|
timer = null;
|
|
18973
|
-
emit(
|
|
19161
|
+
emit(showing, { reset });
|
|
18974
19162
|
emit("action", {
|
|
18975
|
-
side:
|
|
19163
|
+
side: showing,
|
|
18976
19164
|
reset
|
|
18977
19165
|
});
|
|
18978
19166
|
}, 230);
|
|
@@ -19629,6 +19817,9 @@ var QSplitter_default = createComponent({
|
|
|
19629
19817
|
});
|
|
19630
19818
|
//#endregion
|
|
19631
19819
|
//#region src/components/stepper/StepHeader.js
|
|
19820
|
+
function preventSpace$1(e) {
|
|
19821
|
+
if (e.keyCode === 32) stopAndPrevent(e);
|
|
19822
|
+
}
|
|
19632
19823
|
var StepHeader_default = createComponent({
|
|
19633
19824
|
name: "StepHeader",
|
|
19634
19825
|
props: {
|
|
@@ -19690,13 +19881,19 @@ var StepHeader_default = createComponent({
|
|
|
19690
19881
|
if (!isActive.value) props.goToPanel(props.step.name);
|
|
19691
19882
|
}
|
|
19692
19883
|
function onKeyup(e) {
|
|
19693
|
-
if (
|
|
19884
|
+
if ([13, 32].includes(e.keyCode)) {
|
|
19885
|
+
if (!isActive.value) props.goToPanel(props.step.name);
|
|
19886
|
+
stopAndPrevent(e);
|
|
19887
|
+
}
|
|
19694
19888
|
}
|
|
19695
19889
|
return () => {
|
|
19696
19890
|
const data = { class: classes.value };
|
|
19697
19891
|
if (headerNav.value) {
|
|
19698
19892
|
data.onClick = onActivate;
|
|
19893
|
+
data.onKeydown = preventSpace$1;
|
|
19699
19894
|
data.onKeyup = onKeyup;
|
|
19895
|
+
data.role = "button";
|
|
19896
|
+
data["aria-current"] = isActive.value ? "step" : void 0;
|
|
19700
19897
|
Object.assign(data, isDisable.value ? {
|
|
19701
19898
|
tabindex: -1,
|
|
19702
19899
|
"aria-disabled": "true"
|
|
@@ -19879,6 +20076,13 @@ var QTh_default = createComponent({
|
|
|
19879
20076
|
const onClick = (evt) => {
|
|
19880
20077
|
emit("click", evt);
|
|
19881
20078
|
};
|
|
20079
|
+
const onKeyup = (evt, col) => {
|
|
20080
|
+
if (evt.key === "Enter" || evt.key === " ") {
|
|
20081
|
+
props.props.sort(col);
|
|
20082
|
+
onClick(evt);
|
|
20083
|
+
evt.preventDefault();
|
|
20084
|
+
}
|
|
20085
|
+
};
|
|
19882
20086
|
return () => {
|
|
19883
20087
|
if (props.props === void 0) return h("th", {
|
|
19884
20088
|
class: props.autoWidth ? "q-table--col-auto-width" : "",
|
|
@@ -19886,7 +20090,7 @@ var QTh_default = createComponent({
|
|
|
19886
20090
|
}, hSlot(slots.default));
|
|
19887
20091
|
let col, child;
|
|
19888
20092
|
const name = vm.vnode.key;
|
|
19889
|
-
if (name) {
|
|
20093
|
+
if (name !== null) {
|
|
19890
20094
|
col = props.props.colsMap[name];
|
|
19891
20095
|
if (col === void 0) return;
|
|
19892
20096
|
} else col = props.props.col;
|
|
@@ -19898,14 +20102,25 @@ var QTh_default = createComponent({
|
|
|
19898
20102
|
name: $q.iconSet.table.arrowUp
|
|
19899
20103
|
}));
|
|
19900
20104
|
} else child = hSlot(slots.default);
|
|
19901
|
-
|
|
20105
|
+
const data = {
|
|
19902
20106
|
class: col.__thClass + (props.autoWidth ? " q-table--col-auto-width" : ""),
|
|
19903
20107
|
style: col.headerStyle,
|
|
19904
20108
|
onClick: (evt) => {
|
|
19905
20109
|
if (col.sortable) props.props.sort(col);
|
|
19906
20110
|
onClick(evt);
|
|
19907
20111
|
}
|
|
19908
|
-
}
|
|
20112
|
+
};
|
|
20113
|
+
if (col.sortable) {
|
|
20114
|
+
data.tabindex = 0;
|
|
20115
|
+
data["aria-sort"] = col.__ariaSort;
|
|
20116
|
+
data.onKeydown = (evt) => {
|
|
20117
|
+
if (evt.key === " ") evt.preventDefault();
|
|
20118
|
+
};
|
|
20119
|
+
data.onKeyup = (evt) => {
|
|
20120
|
+
onKeyup(evt, col);
|
|
20121
|
+
};
|
|
20122
|
+
}
|
|
20123
|
+
return h("th", data, child);
|
|
19909
20124
|
};
|
|
19910
20125
|
}
|
|
19911
20126
|
});
|
|
@@ -20163,8 +20378,8 @@ function useTablePaginationState(vm, getCellValue) {
|
|
|
20163
20378
|
function requestServerInteraction(prop = {}) {
|
|
20164
20379
|
nextTick(() => {
|
|
20165
20380
|
emit("request", {
|
|
20166
|
-
pagination: prop.pagination
|
|
20167
|
-
filter: prop.filter
|
|
20381
|
+
pagination: prop.pagination === void 0 ? computedPagination.value : prop.pagination,
|
|
20382
|
+
filter: prop.filter === void 0 ? props.filter : prop.filter,
|
|
20168
20383
|
getCellValue
|
|
20169
20384
|
});
|
|
20170
20385
|
});
|
|
@@ -20267,21 +20482,15 @@ const useTableRowSelectionProps = {
|
|
|
20267
20482
|
};
|
|
20268
20483
|
const useTableRowSelectionEmits = ["update:selected", "selection"];
|
|
20269
20484
|
function useTableRowSelection(props, emit, computedRows, getRowKey) {
|
|
20270
|
-
const selectedKeys = computed(() =>
|
|
20271
|
-
const keys = {};
|
|
20272
|
-
props.selected.map(getRowKey.value).forEach((key) => {
|
|
20273
|
-
keys[key] = true;
|
|
20274
|
-
});
|
|
20275
|
-
return keys;
|
|
20276
|
-
});
|
|
20485
|
+
const selectedKeys = computed(() => new Set(props.selected.map(getRowKey.value)));
|
|
20277
20486
|
const hasSelectionMode = computed(() => props.selection !== "none");
|
|
20278
20487
|
const singleSelection = computed(() => props.selection === "single");
|
|
20279
20488
|
const multipleSelection = computed(() => props.selection === "multiple");
|
|
20280
|
-
const allRowsSelected = computed(() => computedRows.value.length !== 0 && computedRows.value.every((row) => selectedKeys.value
|
|
20281
|
-
const someRowsSelected = computed(() => !allRowsSelected.value && computedRows.value.some((row) => selectedKeys.value
|
|
20489
|
+
const allRowsSelected = computed(() => computedRows.value.length !== 0 && computedRows.value.every((row) => selectedKeys.value.has(getRowKey.value(row))));
|
|
20490
|
+
const someRowsSelected = computed(() => !allRowsSelected.value && computedRows.value.some((row) => selectedKeys.value.has(getRowKey.value(row))));
|
|
20282
20491
|
const rowsSelectedNumber = computed(() => props.selected.length);
|
|
20283
20492
|
function isRowSelected(key) {
|
|
20284
|
-
return selectedKeys.value
|
|
20493
|
+
return selectedKeys.value.has(key);
|
|
20285
20494
|
}
|
|
20286
20495
|
function clearSelection() {
|
|
20287
20496
|
emit("update:selected", []);
|
|
@@ -20369,6 +20578,7 @@ function useTableColumnSelection(props, computedPagination, hasSelectionMode) {
|
|
|
20369
20578
|
...col,
|
|
20370
20579
|
align,
|
|
20371
20580
|
__iconClass: `q-table__sort-icon q-table__sort-icon--${align}`,
|
|
20581
|
+
__ariaSort: col.sortable === true ? col.name === sortBy ? descending ? "descending" : "ascending" : "none" : void 0,
|
|
20372
20582
|
__thClass: alignClass + (col.headerClasses !== void 0 ? " " + col.headerClasses : "") + (col.sortable ? " sortable" : "") + (col.name === sortBy ? ` sorted ${descending ? "sort-desc" : ""}` : ""),
|
|
20373
20583
|
__tdStyle: col.style !== void 0 ? typeof col.style !== "function" ? () => col.style : col.style : () => null,
|
|
20374
20584
|
__tdClass: col.classes !== void 0 ? typeof col.classes !== "function" ? () => alignClass + " " + col.classes : (row) => alignClass + " " + col.classes(row) : () => alignClass
|
|
@@ -20379,7 +20589,7 @@ function useTableColumnSelection(props, computedPagination, hasSelectionMode) {
|
|
|
20379
20589
|
colList,
|
|
20380
20590
|
computedCols,
|
|
20381
20591
|
computedColsMap: computed(() => {
|
|
20382
|
-
const names =
|
|
20592
|
+
const names = Object.create(null);
|
|
20383
20593
|
computedCols.value.forEach((col) => {
|
|
20384
20594
|
names[col.name] = col;
|
|
20385
20595
|
});
|
|
@@ -20532,9 +20742,15 @@ var QTable_default = createComponent({
|
|
|
20532
20742
|
const cardDefaultClass = computed(() => " q-table__card" + (isDark.value ? " q-table__card--dark q-dark" : "") + (props.square ? " q-table--square" : "") + (props.flat ? " q-table--flat" : "") + (props.bordered ? " q-table--bordered" : ""));
|
|
20533
20743
|
const containerClass = computed(() => `q-table__container q-table--${props.separator}-separator column no-wrap` + (props.grid ? " q-table--grid" : cardDefaultClass.value) + (isDark.value ? " q-table--dark" : "") + (props.dense ? " q-table--dense" : "") + (props.wrapCells ? "" : " q-table--no-wrap") + (inFullscreen.value ? " fullscreen scroll" : ""));
|
|
20534
20744
|
const rootContainerClass = computed(() => containerClass.value + (props.loading ? " q-table--loading" : ""));
|
|
20535
|
-
watch(
|
|
20745
|
+
watch([
|
|
20746
|
+
() => props.tableStyle,
|
|
20747
|
+
() => props.tableClass,
|
|
20748
|
+
() => props.tableHeaderStyle,
|
|
20749
|
+
() => props.tableHeaderClass,
|
|
20750
|
+
containerClass
|
|
20751
|
+
], () => {
|
|
20536
20752
|
if (hasVirtScroll.value) virtScrollRef.value?.reset();
|
|
20537
|
-
});
|
|
20753
|
+
}, { deep: true });
|
|
20538
20754
|
const { innerPagination, computedPagination, isServerSide, requestServerInteraction, setPagination } = useTablePaginationState(vm, getCellValue);
|
|
20539
20755
|
const { computedFilterMethod } = useTableFilter(props, setPagination);
|
|
20540
20756
|
const { isRowExpanded, setExpanded, updateExpanded } = useTableRowExpand(props, emit);
|
|
@@ -20958,10 +21174,10 @@ var QTable_default = createComponent({
|
|
|
20958
21174
|
if (props.onRowClick !== void 0 || props.onRowDblclick !== void 0 || props.onRowContextmenu !== void 0) {
|
|
20959
21175
|
data.class[0] += " cursor-pointer";
|
|
20960
21176
|
if (props.onRowClick !== void 0) data.onClick = (evt) => {
|
|
20961
|
-
emit("
|
|
21177
|
+
emit("rowClick", evt, scope.row, scope.pageIndex);
|
|
20962
21178
|
};
|
|
20963
21179
|
if (props.onRowDblclick !== void 0) data.onDblclick = (evt) => {
|
|
20964
|
-
emit("
|
|
21180
|
+
emit("rowDblclick", evt, scope.row, scope.pageIndex);
|
|
20965
21181
|
};
|
|
20966
21182
|
if (props.onRowContextmenu !== void 0) data.onContextmenu = (evt) => {
|
|
20967
21183
|
emit("rowContextmenu", evt, scope.row, scope.pageIndex);
|
|
@@ -21098,6 +21314,9 @@ function getCurrentTime() {
|
|
|
21098
21314
|
millisecond: d.getMilliseconds()
|
|
21099
21315
|
};
|
|
21100
21316
|
}
|
|
21317
|
+
function preventSpace(e) {
|
|
21318
|
+
if (e.keyCode === 32) stopAndPrevent(e);
|
|
21319
|
+
}
|
|
21101
21320
|
function getWheelDist(a, b, threshold) {
|
|
21102
21321
|
const diff = Math.abs(a - b);
|
|
21103
21322
|
return Math.min(diff, threshold - diff);
|
|
@@ -21338,10 +21557,16 @@ var QTime_default = createComponent({
|
|
|
21338
21557
|
}
|
|
21339
21558
|
};
|
|
21340
21559
|
function setAmOnKey(e) {
|
|
21341
|
-
if (e.keyCode
|
|
21560
|
+
if ([13, 32].includes(e.keyCode)) {
|
|
21561
|
+
setAm();
|
|
21562
|
+
stopAndPrevent(e);
|
|
21563
|
+
}
|
|
21342
21564
|
}
|
|
21343
21565
|
function setPmOnKey(e) {
|
|
21344
|
-
if (e.keyCode
|
|
21566
|
+
if ([13, 32].includes(e.keyCode)) {
|
|
21567
|
+
setPm();
|
|
21568
|
+
stopAndPrevent(e);
|
|
21569
|
+
}
|
|
21345
21570
|
}
|
|
21346
21571
|
function onClick(evt) {
|
|
21347
21572
|
if (!shouldAbortInteraction()) {
|
|
@@ -21353,8 +21578,10 @@ var QTime_default = createComponent({
|
|
|
21353
21578
|
if (!shouldAbortInteraction()) updateClock(evt, getClockRect());
|
|
21354
21579
|
}
|
|
21355
21580
|
function onKeyupHour(e) {
|
|
21356
|
-
if (e.keyCode
|
|
21357
|
-
|
|
21581
|
+
if ([13, 32].includes(e.keyCode)) {
|
|
21582
|
+
view.value = "hour";
|
|
21583
|
+
stopAndPrevent(e);
|
|
21584
|
+
} else if ([37, 39].includes(e.keyCode)) {
|
|
21358
21585
|
const payload = e.keyCode === 37 ? -1 : 1;
|
|
21359
21586
|
if (validHours.value !== null) {
|
|
21360
21587
|
const values = computedFormat24h.value ? validHours.value.values : validHours.value[isAM.value ? "am" : "pm"].values;
|
|
@@ -21368,8 +21595,10 @@ var QTime_default = createComponent({
|
|
|
21368
21595
|
}
|
|
21369
21596
|
}
|
|
21370
21597
|
function onKeyupMinute(e) {
|
|
21371
|
-
if (e.keyCode
|
|
21372
|
-
|
|
21598
|
+
if ([13, 32].includes(e.keyCode)) {
|
|
21599
|
+
view.value = "minute";
|
|
21600
|
+
stopAndPrevent(e);
|
|
21601
|
+
} else if ([37, 39].includes(e.keyCode)) {
|
|
21373
21602
|
const payload = e.keyCode === 37 ? -1 : 1;
|
|
21374
21603
|
if (validMinutes.value !== null) {
|
|
21375
21604
|
const values = validMinutes.value.values;
|
|
@@ -21380,13 +21609,15 @@ var QTime_default = createComponent({
|
|
|
21380
21609
|
}
|
|
21381
21610
|
}
|
|
21382
21611
|
function onKeyupSecond(e) {
|
|
21383
|
-
if (e.keyCode
|
|
21384
|
-
|
|
21612
|
+
if ([13, 32].includes(e.keyCode)) {
|
|
21613
|
+
view.value = "second";
|
|
21614
|
+
stopAndPrevent(e);
|
|
21615
|
+
} else if ([37, 39].includes(e.keyCode)) {
|
|
21385
21616
|
const payload = e.keyCode === 37 ? -1 : 1;
|
|
21386
21617
|
if (validSeconds.value !== null) {
|
|
21387
21618
|
const values = validSeconds.value.values;
|
|
21388
21619
|
if (values.length === 0) return;
|
|
21389
|
-
if (innerModel.value.
|
|
21620
|
+
if (innerModel.value.second === null) setSecond(values[0]);
|
|
21390
21621
|
else setSecond(values[(values.length + values.indexOf(innerModel.value.second) + payload) % values.length]);
|
|
21391
21622
|
} else setSecond((60 + (innerModel.value.second === null ? -payload : innerModel.value.second) + payload) % 60);
|
|
21392
21623
|
}
|
|
@@ -21470,13 +21701,19 @@ var QTime_default = createComponent({
|
|
|
21470
21701
|
h("div", {
|
|
21471
21702
|
class: "q-time__link " + (view.value === "hour" ? "q-time__link--active" : "cursor-pointer"),
|
|
21472
21703
|
tabindex: tabindex.value,
|
|
21704
|
+
role: "button",
|
|
21705
|
+
"aria-pressed": view.value === "hour" ? "true" : "false",
|
|
21473
21706
|
onClick: setView.hour,
|
|
21707
|
+
onKeydown: preventSpace,
|
|
21474
21708
|
onKeyup: onKeyupHour
|
|
21475
21709
|
}, stringModel.value.hour),
|
|
21476
21710
|
h("div", ":"),
|
|
21477
21711
|
h("div", minLink.value ? {
|
|
21478
21712
|
class: "q-time__link " + (view.value === "minute" ? "q-time__link--active" : "cursor-pointer"),
|
|
21479
21713
|
tabindex: tabindex.value,
|
|
21714
|
+
role: "button",
|
|
21715
|
+
"aria-pressed": view.value === "minute" ? "true" : "false",
|
|
21716
|
+
onKeydown: preventSpace,
|
|
21480
21717
|
onKeyup: onKeyupMinute,
|
|
21481
21718
|
onClick: setView.minute
|
|
21482
21719
|
} : { class: "q-time__link" }, stringModel.value.minute)
|
|
@@ -21484,6 +21721,9 @@ var QTime_default = createComponent({
|
|
|
21484
21721
|
if (props.withSeconds) label.push(h("div", ":"), h("div", secLink.value ? {
|
|
21485
21722
|
class: "q-time__link " + (view.value === "second" ? "q-time__link--active" : "cursor-pointer"),
|
|
21486
21723
|
tabindex: tabindex.value,
|
|
21724
|
+
role: "button",
|
|
21725
|
+
"aria-pressed": view.value === "second" ? "true" : "false",
|
|
21726
|
+
onKeydown: preventSpace,
|
|
21487
21727
|
onKeyup: onKeyupSecond,
|
|
21488
21728
|
onClick: setView.second
|
|
21489
21729
|
} : { class: "q-time__link" }, stringModel.value.second));
|
|
@@ -21494,12 +21734,18 @@ var QTime_default = createComponent({
|
|
|
21494
21734
|
if (!computedFormat24h.value) child.push(h("div", { class: "q-time__header-ampm column items-between no-wrap" }, [h("div", {
|
|
21495
21735
|
class: "q-time__link " + (isAM.value ? "q-time__link--active" : "cursor-pointer"),
|
|
21496
21736
|
tabindex: tabindex.value,
|
|
21737
|
+
role: "button",
|
|
21738
|
+
"aria-pressed": isAM.value ? "true" : "false",
|
|
21497
21739
|
onClick: setAm,
|
|
21740
|
+
onKeydown: preventSpace,
|
|
21498
21741
|
onKeyup: setAmOnKey
|
|
21499
21742
|
}, "AM"), h("div", {
|
|
21500
21743
|
class: "q-time__link " + (isAM.value ? "cursor-pointer" : "q-time__link--active"),
|
|
21501
21744
|
tabindex: tabindex.value,
|
|
21745
|
+
role: "button",
|
|
21746
|
+
"aria-pressed": isAM.value ? "false" : "true",
|
|
21502
21747
|
onClick: setPm,
|
|
21748
|
+
onKeydown: preventSpace,
|
|
21503
21749
|
onKeyup: setPmOnKey
|
|
21504
21750
|
}, "PM")]));
|
|
21505
21751
|
return h("div", { class: "q-time__header flex flex-center no-wrap " + headerClass.value }, child);
|
|
@@ -21741,9 +21987,11 @@ var QTree_default = createComponent({
|
|
|
21741
21987
|
const lazy = ref({});
|
|
21742
21988
|
const innerTicked = ref(props.ticked || []);
|
|
21743
21989
|
const innerExpanded = ref(props.expanded || []);
|
|
21744
|
-
|
|
21990
|
+
const focusedKey = ref(null);
|
|
21991
|
+
let blurTargets = {}, headerTargets = {};
|
|
21745
21992
|
onBeforeUpdate(() => {
|
|
21746
21993
|
blurTargets = {};
|
|
21994
|
+
headerTargets = {};
|
|
21747
21995
|
});
|
|
21748
21996
|
const classes = computed(() => `q-tree q-tree--${props.dense ? "dense" : "standard"}` + (props.noConnectors ? " q-tree--no-connectors" : "") + (isDark.value ? " q-tree--dark" : "") + (props.color !== void 0 ? ` text-${props.color}` : ""));
|
|
21749
21997
|
const hasSelection = computed(() => props.selected !== void 0);
|
|
@@ -21816,6 +22064,25 @@ var QTree_default = createComponent({
|
|
|
21816
22064
|
props.nodes.forEach((node) => travel(node, null));
|
|
21817
22065
|
return acc;
|
|
21818
22066
|
});
|
|
22067
|
+
const focusableKeys = computed(() => {
|
|
22068
|
+
const acc = [];
|
|
22069
|
+
function travel(nodes) {
|
|
22070
|
+
nodes.forEach((node) => {
|
|
22071
|
+
const localMeta = meta.value[node[props.nodeKey]];
|
|
22072
|
+
if (props.filter && localMeta.matchesFilter !== true) return;
|
|
22073
|
+
if (localMeta.link === true) acc.push(localMeta.key);
|
|
22074
|
+
if (localMeta.expanded === true && Array.isArray(node[props.childrenKey])) travel(node[props.childrenKey]);
|
|
22075
|
+
});
|
|
22076
|
+
}
|
|
22077
|
+
travel(props.nodes);
|
|
22078
|
+
return acc;
|
|
22079
|
+
});
|
|
22080
|
+
const tabKey = computed(() => {
|
|
22081
|
+
const keys = focusableKeys.value;
|
|
22082
|
+
if (keys.includes(focusedKey.value)) return focusedKey.value;
|
|
22083
|
+
const selected = keys.find((key) => meta.value[key].selected === true);
|
|
22084
|
+
return selected !== void 0 ? selected : keys[0];
|
|
22085
|
+
});
|
|
21819
22086
|
watch(() => props.ticked, (val) => {
|
|
21820
22087
|
innerTicked.value = val;
|
|
21821
22088
|
});
|
|
@@ -21946,16 +22213,25 @@ var QTree_default = createComponent({
|
|
|
21946
22213
|
class: `q-tree__node relative-position q-tree__node--${isParent ? "parent" : "child"}`
|
|
21947
22214
|
}, [h("div", {
|
|
21948
22215
|
class: "q-tree__node-header relative-position row no-wrap items-center" + (m.link === true ? " q-tree__node--link q-hoverable q-focusable" : "") + (m.selected === true ? " q-tree__node--selected" : "") + (m.disabled === true ? " q-tree__node--disabled" : ""),
|
|
21949
|
-
|
|
21950
|
-
|
|
22216
|
+
ref: (el) => {
|
|
22217
|
+
headerTargets[m.key] = el;
|
|
22218
|
+
},
|
|
22219
|
+
tabindex: m.link === true && m.key === tabKey.value ? 0 : -1,
|
|
22220
|
+
"aria-expanded": isParent ? m.expanded ? "true" : "false" : null,
|
|
22221
|
+
"aria-selected": m.selectable ? m.selected ? "true" : "false" : null,
|
|
22222
|
+
"aria-disabled": m.disabled === true ? "true" : null,
|
|
21951
22223
|
role: "treeitem",
|
|
22224
|
+
onFocus() {
|
|
22225
|
+
if (m.link === true) focusedKey.value = m.key;
|
|
22226
|
+
},
|
|
21952
22227
|
onClick: (e) => {
|
|
21953
22228
|
onClick(node, m, e);
|
|
21954
22229
|
},
|
|
21955
|
-
|
|
22230
|
+
onKeydown(e) {
|
|
21956
22231
|
if (shouldIgnoreKey(e) !== true) {
|
|
21957
22232
|
if (e.keyCode === 13) onClick(node, m, e, true);
|
|
21958
22233
|
else if (e.keyCode === 32) onExpandClick(node, m, e, true);
|
|
22234
|
+
else if (onNavigationKey(m, e.keyCode)) stopAndPrevent(e);
|
|
21959
22235
|
}
|
|
21960
22236
|
}
|
|
21961
22237
|
}, [
|
|
@@ -22011,7 +22287,59 @@ var QTree_default = createComponent({
|
|
|
22011
22287
|
function blur(key) {
|
|
22012
22288
|
blurTargets[key]?.focus();
|
|
22013
22289
|
}
|
|
22290
|
+
function focusNode(key) {
|
|
22291
|
+
if (key !== void 0) {
|
|
22292
|
+
focusedKey.value = key;
|
|
22293
|
+
headerTargets[key]?.focus();
|
|
22294
|
+
}
|
|
22295
|
+
}
|
|
22296
|
+
function getFirstFocusableChild(children) {
|
|
22297
|
+
for (const child of children) {
|
|
22298
|
+
if (props.filter && child.matchesFilter !== true) continue;
|
|
22299
|
+
if (child.link === true) return child.key;
|
|
22300
|
+
if (child.expanded === true) {
|
|
22301
|
+
const key = getFirstFocusableChild(child.children);
|
|
22302
|
+
if (key !== void 0) return key;
|
|
22303
|
+
}
|
|
22304
|
+
}
|
|
22305
|
+
}
|
|
22306
|
+
function onNavigationKey(localMeta, keyCode) {
|
|
22307
|
+
const keys = focusableKeys.value, index = keys.indexOf(localMeta.key);
|
|
22308
|
+
if (keyCode === 36) {
|
|
22309
|
+
focusNode(keys[0]);
|
|
22310
|
+
return true;
|
|
22311
|
+
}
|
|
22312
|
+
if (keyCode === 35) {
|
|
22313
|
+
focusNode(keys.at(-1));
|
|
22314
|
+
return true;
|
|
22315
|
+
}
|
|
22316
|
+
if (keyCode === 38) {
|
|
22317
|
+
focusNode(keys[index - 1]);
|
|
22318
|
+
return true;
|
|
22319
|
+
}
|
|
22320
|
+
if (keyCode === 40) {
|
|
22321
|
+
focusNode(keys[index + 1]);
|
|
22322
|
+
return true;
|
|
22323
|
+
}
|
|
22324
|
+
if (keyCode === 39) {
|
|
22325
|
+
if (localMeta.isParent !== true && !localMeta.lazy) return true;
|
|
22326
|
+
if (localMeta.expanded !== true) setExpanded(localMeta.key, true);
|
|
22327
|
+
else focusNode(getFirstFocusableChild(localMeta.children));
|
|
22328
|
+
return true;
|
|
22329
|
+
}
|
|
22330
|
+
if (keyCode === 37) {
|
|
22331
|
+
if (localMeta.expanded === true) setExpanded(localMeta.key, false);
|
|
22332
|
+
else {
|
|
22333
|
+
let parent = localMeta.parent;
|
|
22334
|
+
while (parent !== null && parent.link !== true) parent = parent.parent;
|
|
22335
|
+
focusNode(parent?.key);
|
|
22336
|
+
}
|
|
22337
|
+
return true;
|
|
22338
|
+
}
|
|
22339
|
+
return false;
|
|
22340
|
+
}
|
|
22014
22341
|
function onClick(node, localMeta, e, keyboard) {
|
|
22342
|
+
if (localMeta.link === true) focusedKey.value = localMeta.key;
|
|
22015
22343
|
if (keyboard !== true && localMeta.selectable !== false) blur(localMeta.key);
|
|
22016
22344
|
if (hasSelection.value && localMeta.selectable) {
|
|
22017
22345
|
if (!props.noSelectionUnset) emit("update:selected", localMeta.key !== props.selected ? localMeta.key : null);
|
|
@@ -22020,6 +22348,7 @@ var QTree_default = createComponent({
|
|
|
22020
22348
|
if (typeof node.handler === "function") node.handler(node);
|
|
22021
22349
|
}
|
|
22022
22350
|
function onExpandClick(node, localMeta, e, keyboard) {
|
|
22351
|
+
if (localMeta.link === true) focusedKey.value = localMeta.key;
|
|
22023
22352
|
if (e !== void 0) stopAndPrevent(e);
|
|
22024
22353
|
if (keyboard !== true && localMeta.selectable !== false) blur(localMeta.key);
|
|
22025
22354
|
setExpanded(localMeta.key, !localMeta.expanded, node, localMeta);
|
|
@@ -22110,7 +22439,7 @@ function getRenderer(getPlugin, expose) {
|
|
|
22110
22439
|
return;
|
|
22111
22440
|
}
|
|
22112
22441
|
file.__uploaded = status === "uploaded" ? file.size : uploadedSize;
|
|
22113
|
-
file.__progress = status === "uploaded" ? 1 : Math.min(.9999, file.__uploaded / file.size);
|
|
22442
|
+
file.__progress = status === "uploaded" ? 1 : file.size === 0 ? 0 : Math.min(.9999, file.__uploaded / file.size);
|
|
22114
22443
|
file.__progressLabel = getProgressLabel(file.__progress);
|
|
22115
22444
|
proxy.$forceUpdate();
|
|
22116
22445
|
}
|
|
@@ -22167,7 +22496,9 @@ function getRenderer(getPlugin, expose) {
|
|
|
22167
22496
|
}
|
|
22168
22497
|
}
|
|
22169
22498
|
function removeUploadedFiles() {
|
|
22170
|
-
if (!props.disable) batchRemoveFiles(["uploaded"], () => {
|
|
22499
|
+
if (!props.disable) batchRemoveFiles(["uploaded"], ({ size }) => {
|
|
22500
|
+
state.uploadedSize.value -= size;
|
|
22501
|
+
uploadSize.value -= size;
|
|
22171
22502
|
state.uploadedFiles.value = [];
|
|
22172
22503
|
});
|
|
22173
22504
|
}
|
|
@@ -22198,8 +22529,12 @@ function getRenderer(getPlugin, expose) {
|
|
|
22198
22529
|
}
|
|
22199
22530
|
function removeFile(file) {
|
|
22200
22531
|
if (props.disable) return;
|
|
22201
|
-
|
|
22202
|
-
|
|
22532
|
+
const isUploading = file.__status === "uploading";
|
|
22533
|
+
if (file.__status === "uploaded") {
|
|
22534
|
+
state.uploadedSize.value -= file.size;
|
|
22535
|
+
uploadSize.value -= file.size;
|
|
22536
|
+
state.uploadedFiles.value = state.uploadedFiles.value.filter((f) => f.__key !== file.__key);
|
|
22537
|
+
} else if (isUploading) uploadSize.value -= file.size;
|
|
22203
22538
|
else uploadSize.value -= file.size;
|
|
22204
22539
|
state.files.value = state.files.value.filter((f) => {
|
|
22205
22540
|
if (f.__key !== file.__key) return true;
|
|
@@ -22207,6 +22542,7 @@ function getRenderer(getPlugin, expose) {
|
|
|
22207
22542
|
return false;
|
|
22208
22543
|
});
|
|
22209
22544
|
state.queuedFiles.value = state.queuedFiles.value.filter((f) => f.__key !== file.__key);
|
|
22545
|
+
if (isUploading) file.__abort();
|
|
22210
22546
|
emit("removed", [file]);
|
|
22211
22547
|
}
|
|
22212
22548
|
function revokeImgURLs() {
|
|
@@ -22431,6 +22767,7 @@ function injectPlugin({ props, emit, helpers }) {
|
|
|
22431
22767
|
const xhrs = ref([]);
|
|
22432
22768
|
const promises = ref([]);
|
|
22433
22769
|
const workingThreads = ref(0);
|
|
22770
|
+
const abortedPromises = /* @__PURE__ */ new WeakSet();
|
|
22434
22771
|
const xhrProps = computed(() => ({
|
|
22435
22772
|
url: getFn(props.url),
|
|
22436
22773
|
method: getFn(props.method),
|
|
@@ -22443,12 +22780,14 @@ function injectPlugin({ props, emit, helpers }) {
|
|
|
22443
22780
|
}));
|
|
22444
22781
|
const isUploading = computed(() => workingThreads.value > 0);
|
|
22445
22782
|
const isBusy = computed(() => promises.value.length !== 0);
|
|
22446
|
-
|
|
22783
|
+
const getLiveFiles = (files) => files.filter((file) => helpers.files.value.includes(file));
|
|
22447
22784
|
function abort() {
|
|
22448
22785
|
xhrs.value.forEach((x) => {
|
|
22449
22786
|
x.abort();
|
|
22450
22787
|
});
|
|
22451
|
-
|
|
22788
|
+
promises.value.forEach((promise) => {
|
|
22789
|
+
abortedPromises.add(promise);
|
|
22790
|
+
});
|
|
22452
22791
|
}
|
|
22453
22792
|
function upload() {
|
|
22454
22793
|
const queue = [...helpers.queuedFiles.value];
|
|
@@ -22460,36 +22799,57 @@ function injectPlugin({ props, emit, helpers }) {
|
|
|
22460
22799
|
}
|
|
22461
22800
|
function runFactory(files) {
|
|
22462
22801
|
workingThreads.value++;
|
|
22802
|
+
const failed = (err, promise) => {
|
|
22803
|
+
if (helpers.isAlive()) {
|
|
22804
|
+
if (promise !== void 0) promises.value = promises.value.filter((p) => p !== promise);
|
|
22805
|
+
const liveFiles = getLiveFiles(files);
|
|
22806
|
+
if (liveFiles.length !== 0) {
|
|
22807
|
+
helpers.queuedFiles.value.push(...liveFiles);
|
|
22808
|
+
liveFiles.forEach((f) => {
|
|
22809
|
+
helpers.updateFileStatus(f, "failed");
|
|
22810
|
+
});
|
|
22811
|
+
emit("factoryFailed", err, liveFiles);
|
|
22812
|
+
}
|
|
22813
|
+
workingThreads.value--;
|
|
22814
|
+
}
|
|
22815
|
+
};
|
|
22463
22816
|
if (typeof props.factory !== "function") {
|
|
22464
|
-
|
|
22817
|
+
startUpload({});
|
|
22465
22818
|
return;
|
|
22466
22819
|
}
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
|
|
22820
|
+
let res;
|
|
22821
|
+
try {
|
|
22822
|
+
res = props.factory(files);
|
|
22823
|
+
} catch (err) {
|
|
22824
|
+
failed(err);
|
|
22825
|
+
return;
|
|
22826
|
+
}
|
|
22827
|
+
if (Object(res) !== res) failed(/* @__PURE__ */ new Error("QUploader: factory() does not return properly"));
|
|
22828
|
+
else if (typeof res.catch === "function" && typeof res.then === "function") {
|
|
22472
22829
|
promises.value.push(res);
|
|
22473
|
-
const failed = (err) => {
|
|
22474
|
-
if (helpers.isAlive()) {
|
|
22475
|
-
promises.value = promises.value.filter((p) => p !== res);
|
|
22476
|
-
if (promises.value.length === 0) abortPromises = false;
|
|
22477
|
-
helpers.queuedFiles.value.push(...files);
|
|
22478
|
-
files.forEach((f) => {
|
|
22479
|
-
helpers.updateFileStatus(f, "failed");
|
|
22480
|
-
});
|
|
22481
|
-
emit("factoryFailed", err, files);
|
|
22482
|
-
workingThreads.value--;
|
|
22483
|
-
}
|
|
22484
|
-
};
|
|
22485
22830
|
res.then((factory) => {
|
|
22486
|
-
if (
|
|
22831
|
+
if (abortedPromises.has(res)) failed(/* @__PURE__ */ new Error("Aborted"), res);
|
|
22832
|
+
else if (Object(factory) !== factory) failed(/* @__PURE__ */ new Error("QUploader: factory() does not return properly"), res);
|
|
22487
22833
|
else if (helpers.isAlive()) {
|
|
22488
22834
|
promises.value = promises.value.filter((p) => p !== res);
|
|
22489
|
-
|
|
22835
|
+
startUpload(factory);
|
|
22490
22836
|
}
|
|
22491
|
-
}).catch(
|
|
22492
|
-
|
|
22837
|
+
}).catch((err) => {
|
|
22838
|
+
failed(err, res);
|
|
22839
|
+
});
|
|
22840
|
+
} else startUpload(res);
|
|
22841
|
+
function startUpload(factory) {
|
|
22842
|
+
const liveFiles = getLiveFiles(files);
|
|
22843
|
+
if (liveFiles.length === 0) {
|
|
22844
|
+
workingThreads.value--;
|
|
22845
|
+
return;
|
|
22846
|
+
}
|
|
22847
|
+
try {
|
|
22848
|
+
performUpload(liveFiles, factory);
|
|
22849
|
+
} catch (err) {
|
|
22850
|
+
failed(err);
|
|
22851
|
+
}
|
|
22852
|
+
}
|
|
22493
22853
|
}
|
|
22494
22854
|
function performUpload(files, factory) {
|
|
22495
22855
|
const form = new FormData(), xhr = new XMLHttpRequest();
|
|
@@ -22497,6 +22857,10 @@ function injectPlugin({ props, emit, helpers }) {
|
|
|
22497
22857
|
const url = getProp("url", files);
|
|
22498
22858
|
if (!url) {
|
|
22499
22859
|
console.error("q-uploader: invalid or no URL specified");
|
|
22860
|
+
helpers.queuedFiles.value.push(...files);
|
|
22861
|
+
files.forEach((f) => {
|
|
22862
|
+
helpers.updateFileStatus(f, "failed");
|
|
22863
|
+
});
|
|
22500
22864
|
workingThreads.value--;
|
|
22501
22865
|
return;
|
|
22502
22866
|
}
|
|
@@ -22513,7 +22877,7 @@ function injectPlugin({ props, emit, helpers }) {
|
|
|
22513
22877
|
let size = localUploadedSize - uploadIndexSize;
|
|
22514
22878
|
for (let i = uploadIndex; size > 0 && i < files.length; i++) {
|
|
22515
22879
|
const file = files[i];
|
|
22516
|
-
if (size
|
|
22880
|
+
if (size >= file.size) {
|
|
22517
22881
|
size -= file.size;
|
|
22518
22882
|
uploadIndex++;
|
|
22519
22883
|
uploadIndexSize += file.size;
|
|
@@ -22527,25 +22891,33 @@ function injectPlugin({ props, emit, helpers }) {
|
|
|
22527
22891
|
xhr.addEventListener("readystatechange", () => {
|
|
22528
22892
|
if (xhr.readyState < 4) return;
|
|
22529
22893
|
if (xhr.status && xhr.status < 400) {
|
|
22530
|
-
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
|
|
22534
|
-
|
|
22535
|
-
|
|
22536
|
-
|
|
22537
|
-
|
|
22894
|
+
const liveFiles = getLiveFiles(files);
|
|
22895
|
+
const liveUploadSize = liveFiles.reduce((total, file) => total + file.size, 0);
|
|
22896
|
+
helpers.uploadedSize.value += liveUploadSize - localUploadedSize;
|
|
22897
|
+
if (liveFiles.length !== 0) {
|
|
22898
|
+
helpers.uploadedFiles.value.push(...liveFiles);
|
|
22899
|
+
liveFiles.forEach((f) => {
|
|
22900
|
+
helpers.updateFileStatus(f, "uploaded");
|
|
22901
|
+
});
|
|
22902
|
+
emit("uploaded", {
|
|
22903
|
+
files: liveFiles,
|
|
22904
|
+
xhr
|
|
22905
|
+
});
|
|
22906
|
+
}
|
|
22538
22907
|
} else {
|
|
22539
22908
|
aborted = true;
|
|
22540
22909
|
helpers.uploadedSize.value -= localUploadedSize;
|
|
22541
|
-
|
|
22542
|
-
|
|
22543
|
-
helpers.
|
|
22544
|
-
|
|
22545
|
-
|
|
22546
|
-
|
|
22547
|
-
|
|
22548
|
-
|
|
22910
|
+
const liveFiles = getLiveFiles(files);
|
|
22911
|
+
if (liveFiles.length !== 0) {
|
|
22912
|
+
helpers.queuedFiles.value.push(...liveFiles);
|
|
22913
|
+
liveFiles.forEach((f) => {
|
|
22914
|
+
helpers.updateFileStatus(f, "failed");
|
|
22915
|
+
});
|
|
22916
|
+
emit("failed", {
|
|
22917
|
+
files: liveFiles,
|
|
22918
|
+
xhr
|
|
22919
|
+
});
|
|
22920
|
+
}
|
|
22549
22921
|
}
|
|
22550
22922
|
workingThreads.value--;
|
|
22551
22923
|
xhrs.value = xhrs.value.filter((x) => x !== xhr);
|
|
@@ -23820,7 +24192,7 @@ var TouchRepeat_default = createDirective({
|
|
|
23820
24192
|
if (keyRegex.test(key)) {
|
|
23821
24193
|
const parsedKey = Number.parseInt(key, 10);
|
|
23822
24194
|
const keyCode = Number.isNaN(parsedKey) ? keyCodes[key.toLowerCase()] : parsedKey;
|
|
23823
|
-
if (keyCode
|
|
24195
|
+
if (keyCode !== void 0) acc.push(...[keyCode].flat());
|
|
23824
24196
|
}
|
|
23825
24197
|
return acc;
|
|
23826
24198
|
}, []);
|
|
@@ -24386,7 +24758,11 @@ function stringifyCookieValue(value) {
|
|
|
24386
24758
|
function read(string) {
|
|
24387
24759
|
if (string === "") return string;
|
|
24388
24760
|
if (string.indexOf("\"") === 0) string = string.slice(1, -1).replaceAll(String.raw`\"`, "\"").replaceAll(String.raw`\\`, "\\");
|
|
24389
|
-
|
|
24761
|
+
try {
|
|
24762
|
+
string = decodeURIComponent(string.replaceAll("+", " "));
|
|
24763
|
+
} catch {
|
|
24764
|
+
return;
|
|
24765
|
+
}
|
|
24390
24766
|
try {
|
|
24391
24767
|
const parsed = JSON.parse(string);
|
|
24392
24768
|
if (parsed === Object(parsed) || Array.isArray(parsed)) string = parsed;
|
|
@@ -24410,15 +24786,19 @@ function parseExpireToSeconds(str) {
|
|
|
24410
24786
|
const unit = match[2];
|
|
24411
24787
|
totalSeconds += value * numberUnitMultiplierMap[unit];
|
|
24412
24788
|
}
|
|
24413
|
-
|
|
24789
|
+
if (hasMatch) return totalSeconds;
|
|
24790
|
+
const timestamp = Date.parse(str);
|
|
24791
|
+
return Number.isNaN(timestamp) ? void 0 : Math.round((timestamp - Date.now()) / 1e3);
|
|
24414
24792
|
}
|
|
24415
24793
|
function set(key, val, opts = {}, ssr) {
|
|
24416
24794
|
let maxAge;
|
|
24417
24795
|
let isDeletion = false;
|
|
24418
24796
|
if (opts.expires !== void 0) {
|
|
24419
24797
|
if (Number.isFinite(opts.expires)) maxAge = Math.round(opts.expires * 86400);
|
|
24420
|
-
else if (opts.expires instanceof Date)
|
|
24421
|
-
|
|
24798
|
+
else if (opts.expires instanceof Date) {
|
|
24799
|
+
const timestamp = opts.expires.getTime();
|
|
24800
|
+
if (Number.isFinite(timestamp)) maxAge = Math.round((timestamp - Date.now()) / 1e3);
|
|
24801
|
+
} else if (typeof opts.expires === "string") maxAge = parseExpireToSeconds(opts.expires);
|
|
24422
24802
|
if (maxAge !== void 0) isDeletion = maxAge <= 0;
|
|
24423
24803
|
}
|
|
24424
24804
|
const keyValue = `${encodeURIComponent(key)}=${stringifyCookieValue(val)}`;
|
|
@@ -24438,8 +24818,8 @@ function set(key, val, opts = {}, ssr) {
|
|
|
24438
24818
|
ssr.res.setHeader("Set-Cookie", ssr.req.qCookies);
|
|
24439
24819
|
let all = ssr.req.headers.cookie || "";
|
|
24440
24820
|
if (maxAge !== void 0 && isDeletion) {
|
|
24441
|
-
const
|
|
24442
|
-
|
|
24821
|
+
const encodedKey = encodeURIComponent(key);
|
|
24822
|
+
all = all.split("; ").filter((entry) => entry.split("=", 1)[0] !== encodedKey).join("; ");
|
|
24443
24823
|
} else all = all ? `${keyValue}; ${all}` : keyValue;
|
|
24444
24824
|
ssr.req.headers.cookie = all;
|
|
24445
24825
|
} else document.cookie = cookie;
|
|
@@ -24449,11 +24829,15 @@ function get(key, ssr) {
|
|
|
24449
24829
|
let result = key ? null : {}, i = 0, parts, name, cookie;
|
|
24450
24830
|
for (; i < l; i++) {
|
|
24451
24831
|
parts = cookies[i].split("=");
|
|
24452
|
-
|
|
24832
|
+
try {
|
|
24833
|
+
name = decodeURIComponent(parts.shift());
|
|
24834
|
+
} catch {
|
|
24835
|
+
continue;
|
|
24836
|
+
}
|
|
24453
24837
|
cookie = parts.join("=");
|
|
24454
24838
|
if (!key) result[name] = cookie;
|
|
24455
24839
|
else if (key === name) {
|
|
24456
|
-
result = read(cookie);
|
|
24840
|
+
result = read(cookie) ?? null;
|
|
24457
24841
|
break;
|
|
24458
24842
|
}
|
|
24459
24843
|
}
|
|
@@ -24852,6 +25236,7 @@ const Plugin$7 = createReactivePlugin({ isActive: false }, {
|
|
|
24852
25236
|
//#region src/plugins/meta/Meta.js
|
|
24853
25237
|
let updateId = null;
|
|
24854
25238
|
let currentClientMeta;
|
|
25239
|
+
String.raw`\u003C`, String.raw`\u003E`, String.raw`\u0026`, String.raw`\u2028`, String.raw`\u2029`;
|
|
24855
25240
|
const clientList = [];
|
|
24856
25241
|
function normalize(meta) {
|
|
24857
25242
|
if (meta.title) {
|
|
@@ -25796,7 +26181,7 @@ function runSequentialPromises(sequentialPromises, { threadsNumber = 1, abortOnF
|
|
|
25796
26181
|
//#endregion
|
|
25797
26182
|
//#region src/index.dev.js
|
|
25798
26183
|
const Quasar = {
|
|
25799
|
-
version: "2.
|
|
26184
|
+
version: "2.22.0",
|
|
25800
26185
|
install: install_quasar_default,
|
|
25801
26186
|
lang: Plugin$5,
|
|
25802
26187
|
iconSet: Plugin$4
|