@fastkit/vui 0.16.79 → 0.16.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vui.d.ts +465 -686
- package/dist/vui.mjs +680 -652
- package/dist/vui.mjs.map +1 -1
- package/package.json +23 -23
- package/src/components/VCheckbox/VCheckbox.tsx +36 -29
- package/src/components/VForm/VForm.tsx +12 -24
- package/src/components/VFormControl/VFormControl.tsx +7 -4
- package/src/components/VFormGroup/VFormGroup.tsx +45 -0
- package/src/components/VFormGroup/index.ts +1 -0
- package/src/components/VOption/VOption.tsx +12 -18
- package/src/components/VOptionGroup/VOptionGroup.tsx +13 -14
- package/src/components/VRadio/VRadio.tsx +25 -28
- package/src/components/VSelect/VSelect.tsx +185 -174
- package/src/components/VSwitch/VSwitch.tsx +36 -33
- package/src/components/VTextField/VTextField.tsx +54 -44
- package/src/components/VTextarea/VTextarea.tsx +53 -47
- package/src/components/index.ts +1 -0
- package/src/composables/form-selector.tsx +80 -77
- package/src/injections.ts +1 -0
- package/src/plugin.tsx +18 -1
package/dist/vui.mjs
CHANGED
|
@@ -20,9 +20,9 @@ import { VAppContainer, VueAppLayout, VAppLayout, installVueAppLayout } from '@f
|
|
|
20
20
|
export * from '@fastkit/vue-app-layout';
|
|
21
21
|
import { colorSchemeProps, useColorClasses, useScopeColorClass, toScopeColorClass, useInjectTheme, VueColorSchemePlugin } from '@fastkit/vue-color-scheme';
|
|
22
22
|
export * from '@fastkit/vue-color-scheme';
|
|
23
|
-
import { createFormControlSettings, useFormControl, useParentFormNode, createFormSelectorItemSettings, useFormSelectorItemControl, createFormSelectorItemGroupProps, useFormSelectorItemGroupControl, createFormSelectorSettings, createFormControlProps, useFormSelectorControl, createTextInputSettings, useTextInputControl, createTextareaSettings, useTextareaControl, createFormSettings, useForm, installVueFormPlugin } from '@fastkit/vue-form-control';
|
|
23
|
+
import { createFormControlSettings, useFormControl, useParentFormNode, createFormSelectorItemSettings, useFormSelectorItemControl, createFormSelectorItemGroupProps, useFormSelectorItemGroupControl, createFormSelectorSettings, createFormControlProps, useFormSelectorControl, createTextInputSettings, useTextInputControl, createTextareaSettings, useTextareaControl, createFormGroupSettings, useFormGroup, createFormSettings, useForm, installVueFormPlugin } from '@fastkit/vue-form-control';
|
|
24
24
|
export * from '@fastkit/vue-form-control';
|
|
25
|
-
import {
|
|
25
|
+
import { VScroller, getDocumentScroller } from '@fastkit/vue-scroller';
|
|
26
26
|
export * from '@fastkit/vue-scroller';
|
|
27
27
|
import { defineMenuComponent, defineDialogComponent, createStackActionProps, useStackAction, defineSnackbarComponent, createStackableDefine, useStackControl, VDynamicStacks, BUILTIN_ACTION_HANDLERS, installVueStackPlugin } from '@fastkit/vue-stack';
|
|
28
28
|
export * from '@fastkit/vue-stack';
|
|
@@ -33,7 +33,7 @@ import { createPropsOptions, defineSlots, renderSlotOrEmpty, isFragment, resolve
|
|
|
33
33
|
export * from '@fastkit/vue-utils';
|
|
34
34
|
import * as vue_loading_star from '@fastkit/vue-loading';
|
|
35
35
|
export * from '@fastkit/vue-loading';
|
|
36
|
-
import { defineComponent, computed, createVNode, mergeProps, ref, watch, onMounted, onBeforeUnmount, Fragment, isVNode, cloneVNode, withDirectives, vShow, onBeforeUpdate,
|
|
36
|
+
import { defineComponent, computed, createVNode, mergeProps, ref, watch, onMounted, onBeforeUnmount, Fragment, isVNode, cloneVNode, withDirectives, vShow, onBeforeUpdate, Transition, inject, provide, createTextVNode, reactive, nextTick, vModelSelect } from 'vue';
|
|
37
37
|
import { loadImage } from '@fastkit/dom';
|
|
38
38
|
import { useRouter, useRoute, RouterLink, useLink } from 'vue-router';
|
|
39
39
|
import { resizeDirectiveArgument, installResizeDirective } from '@fastkit/vue-resize';
|
|
@@ -68,7 +68,7 @@ __export(src_exports, {
|
|
|
68
68
|
CONTROL_LOADING_SPINNER_SIZES: () => CONTROL_LOADING_SPINNER_SIZES,
|
|
69
69
|
CONTROL_SIZES: () => CONTROL_SIZES,
|
|
70
70
|
ICON_NAMES: () => ICON_NAMES,
|
|
71
|
-
|
|
71
|
+
KEYBOARD_EVENT_TYPES: () => KEYBOARD_EVENT_TYPES,
|
|
72
72
|
PAGINATION_ALIGNS: () => PAGINATION_ALIGNS,
|
|
73
73
|
VApp: () => VApp,
|
|
74
74
|
VAvatar: () => VAvatar,
|
|
@@ -89,6 +89,7 @@ __export(src_exports, {
|
|
|
89
89
|
VDrawerLayout: () => VDrawerLayout,
|
|
90
90
|
VForm: () => VForm,
|
|
91
91
|
VFormControl: () => VFormControl,
|
|
92
|
+
VFormGroup: () => VFormGroup,
|
|
92
93
|
VGridContainer: () => VGridContainer,
|
|
93
94
|
VGridItem: () => VGridItem,
|
|
94
95
|
VHero: () => VHero,
|
|
@@ -122,6 +123,7 @@ __export(src_exports, {
|
|
|
122
123
|
VTooltip: () => VTooltip,
|
|
123
124
|
VUI_CHECKBOX_GROUP_SYMBOL: () => VUI_CHECKBOX_GROUP_SYMBOL,
|
|
124
125
|
VUI_CHECKBOX_SYMBOL: () => VUI_CHECKBOX_SYMBOL,
|
|
126
|
+
VUI_FORM_GROUP_SYMBOL: () => VUI_FORM_GROUP_SYMBOL,
|
|
125
127
|
VUI_FORM_SYMBOL: () => VUI_FORM_SYMBOL,
|
|
126
128
|
VUI_OPTION_SYMBOL: () => VUI_OPTION_SYMBOL,
|
|
127
129
|
VUI_RADIO_GROUP_SYMBOL: () => VUI_RADIO_GROUP_SYMBOL,
|
|
@@ -151,8 +153,10 @@ __export(src_exports, {
|
|
|
151
153
|
createPaperBaseProps: () => createPaperBaseProps,
|
|
152
154
|
createPaperProps: () => createPaperProps,
|
|
153
155
|
createRequiredChipRenderer: () => createRequiredChipRenderer,
|
|
156
|
+
createVFormGroupProps: () => createVFormGroupProps,
|
|
154
157
|
createVFormProps: () => createVFormProps,
|
|
155
158
|
defineFormSelectorComponent: () => defineFormSelectorComponent,
|
|
159
|
+
formGroupSlots: () => formGroupSlots,
|
|
156
160
|
formSlots: () => formSlots,
|
|
157
161
|
iconProps: () => iconProps,
|
|
158
162
|
installVuiPlugin: () => installVuiPlugin,
|
|
@@ -199,6 +203,7 @@ var VUI_RADIO_GROUP_SYMBOL = "vui-radio-group";
|
|
|
199
203
|
var VUI_RADIO_SYMBOL = "vui-radio";
|
|
200
204
|
var VUI_SWITCH_GROUP_SYMBOL = "vui-switch-group";
|
|
201
205
|
var VUI_SWITCH_SYMBOL = "vui-switch";
|
|
206
|
+
var VUI_FORM_GROUP_SYMBOL = "vui-form-group";
|
|
202
207
|
var VUI_FORM_SYMBOL = "vui-form";
|
|
203
208
|
function useVui() {
|
|
204
209
|
const vui = inject(VuiInjectionKey);
|
|
@@ -241,11 +246,11 @@ function createControlProps() {
|
|
|
241
246
|
loading: Boolean
|
|
242
247
|
});
|
|
243
248
|
}
|
|
244
|
-
function useControl(
|
|
249
|
+
function useControl(props12, opts = {}) {
|
|
245
250
|
const { defaultSize = "md" } = opts;
|
|
246
251
|
const parentControl = inject(VuiControlInjectionKey, null);
|
|
247
252
|
const size = computed(() => {
|
|
248
|
-
const psize =
|
|
253
|
+
const psize = props12.size;
|
|
249
254
|
return psize ? psize : parentControl ? parentControl.size.value : defaultSize;
|
|
250
255
|
});
|
|
251
256
|
const classes = computed(() => {
|
|
@@ -271,11 +276,11 @@ function createControlFieldProviderProps() {
|
|
|
271
276
|
}
|
|
272
277
|
});
|
|
273
278
|
}
|
|
274
|
-
function useControlField(
|
|
279
|
+
function useControlField(props12, opts = {}) {
|
|
275
280
|
const { defaultVariant = "flat" } = opts;
|
|
276
281
|
const parentControlField = inject(VuiControlFieldInjectionKey, null);
|
|
277
282
|
const variant = computed(() => {
|
|
278
|
-
const pvariant =
|
|
283
|
+
const pvariant = props12.variant;
|
|
279
284
|
return pvariant ? pvariant : parentControlField ? parentControlField.variant.value : defaultVariant;
|
|
280
285
|
});
|
|
281
286
|
const provider = {
|
|
@@ -311,8 +316,8 @@ var VIcon = defineComponent({
|
|
|
311
316
|
...iconProps
|
|
312
317
|
},
|
|
313
318
|
emits: {},
|
|
314
|
-
setup(
|
|
315
|
-
const iconName = computed(() =>
|
|
319
|
+
setup(props12, ctx) {
|
|
320
|
+
const iconName = computed(() => props12.name);
|
|
316
321
|
const clickable = computed(() => typeof ctx.attrs.onClick !== "undefined");
|
|
317
322
|
const classes = computed(() => [{
|
|
318
323
|
"v-icon--clickable": clickable.value
|
|
@@ -321,7 +326,7 @@ var VIcon = defineComponent({
|
|
|
321
326
|
const bodyStyles = computed(() => {
|
|
322
327
|
const {
|
|
323
328
|
rotate
|
|
324
|
-
} =
|
|
329
|
+
} = props12;
|
|
325
330
|
if (!rotate)
|
|
326
331
|
return;
|
|
327
332
|
return {
|
|
@@ -396,14 +401,14 @@ var {
|
|
|
396
401
|
props,
|
|
397
402
|
emits
|
|
398
403
|
} = createFormControlSettings();
|
|
399
|
-
function createRequiredChipRenderer(required,
|
|
404
|
+
function createRequiredChipRenderer(required, props12, vui = useVui()) {
|
|
400
405
|
return () => {
|
|
401
406
|
if (!required())
|
|
402
407
|
return;
|
|
403
408
|
let chip;
|
|
404
409
|
const {
|
|
405
410
|
requiredChip
|
|
406
|
-
} =
|
|
411
|
+
} = props12;
|
|
407
412
|
if (requiredChip === false)
|
|
408
413
|
return;
|
|
409
414
|
if (requiredChip) {
|
|
@@ -429,9 +434,9 @@ var VFormControl = defineComponent({
|
|
|
429
434
|
},
|
|
430
435
|
slots,
|
|
431
436
|
emits,
|
|
432
|
-
setup(
|
|
437
|
+
setup(props12, ctx) {
|
|
433
438
|
const vui = useVui();
|
|
434
|
-
const control = useFormControl(
|
|
439
|
+
const control = useFormControl(props12, ctx, {
|
|
435
440
|
hinttipPrepend: () => createVNode(VIcon, {
|
|
436
441
|
"class": "v-form-control__label__hinttip__icon",
|
|
437
442
|
"name": vui.icon("hinttip")
|
|
@@ -449,9 +454,11 @@ var VFormControl = defineComponent({
|
|
|
449
454
|
}
|
|
450
455
|
return hinttipDelay2;
|
|
451
456
|
});
|
|
452
|
-
ctx.expose(
|
|
457
|
+
ctx.expose({
|
|
458
|
+
control
|
|
459
|
+
});
|
|
453
460
|
const colorProvider = useVuiColorProvider();
|
|
454
|
-
const classes = computed(() => [{
|
|
461
|
+
const classes = computed(() => ["v-form-control", {
|
|
455
462
|
"v-form-control--validating": control.validating,
|
|
456
463
|
"v-form-control--pending": control.pending,
|
|
457
464
|
"v-form-control--focused": control.focused,
|
|
@@ -463,8 +470,8 @@ var VFormControl = defineComponent({
|
|
|
463
470
|
"v-form-control--untouched": control.untouched,
|
|
464
471
|
"v-form-control--invalid": control.invalid,
|
|
465
472
|
"v-form-control--valid": control.valid
|
|
466
|
-
}, colorProvider.className(
|
|
467
|
-
const getRequiredChip = createRequiredChipRenderer(() => control.required,
|
|
473
|
+
}, colorProvider.className(props12.error ? "error" : control.invalid && !control.readonly ? "error" : "primary")]);
|
|
474
|
+
const getRequiredChip = createRequiredChipRenderer(() => control.required, props12, vui);
|
|
468
475
|
const handleClick = (ev) => ctx.emit("clickLabel", ev, control);
|
|
469
476
|
return () => {
|
|
470
477
|
const label = control.renderLabel();
|
|
@@ -473,7 +480,7 @@ var VFormControl = defineComponent({
|
|
|
473
480
|
const hinttip = control.renderHinttip();
|
|
474
481
|
const _hinttipDelay = hinttipDelay.value;
|
|
475
482
|
return createVNode("div", {
|
|
476
|
-
"class":
|
|
483
|
+
"class": classes.value
|
|
477
484
|
}, [label && createVNode("label", {
|
|
478
485
|
"class": "v-form-control__label",
|
|
479
486
|
"onClick": handleClick
|
|
@@ -485,13 +492,13 @@ var VFormControl = defineComponent({
|
|
|
485
492
|
default: () => [createVNode("div", {
|
|
486
493
|
"class": "v-form-control__label__hinttip__hint"
|
|
487
494
|
}, [hinttip.hint])],
|
|
488
|
-
activator: (
|
|
495
|
+
activator: (tooltip) => createVNode("a", mergeProps({
|
|
489
496
|
"class": "v-form-control__label__hinttip",
|
|
490
497
|
"href": "javascript:void(0)"
|
|
491
|
-
},
|
|
498
|
+
}, tooltip.attrs), [hinttip.tip])
|
|
492
499
|
})]), createVNode("div", {
|
|
493
500
|
"class": "v-form-control__body"
|
|
494
|
-
}, [ctx.slots.default?.(control), !
|
|
501
|
+
}, [ctx.slots.default?.(control), !props12.hiddenInfo && createVNode("div", {
|
|
495
502
|
"class": "v-form-control__info"
|
|
496
503
|
}, [!!message && createVNode("div", {
|
|
497
504
|
"class": "v-form-control__message"
|
|
@@ -516,15 +523,15 @@ function defineFormSelectorComponent(opts) {
|
|
|
516
523
|
className
|
|
517
524
|
} = opts;
|
|
518
525
|
const {
|
|
519
|
-
props:
|
|
520
|
-
emits:
|
|
526
|
+
props: props12,
|
|
527
|
+
emits: emits12
|
|
521
528
|
} = createFormSelectorSettings({
|
|
522
529
|
defaultMultiple
|
|
523
530
|
});
|
|
524
531
|
return defineComponent({
|
|
525
532
|
name: opts.name,
|
|
526
533
|
props: {
|
|
527
|
-
...
|
|
534
|
+
...props12,
|
|
528
535
|
...createFormControlProps(),
|
|
529
536
|
...createControlProps(),
|
|
530
537
|
stacked: {
|
|
@@ -538,61 +545,40 @@ function defineFormSelectorComponent(opts) {
|
|
|
538
545
|
...slots2()
|
|
539
546
|
},
|
|
540
547
|
slots: slots2,
|
|
541
|
-
emits:
|
|
542
|
-
setup(
|
|
543
|
-
const selectorControl = useFormSelectorControl(
|
|
548
|
+
emits: emits12,
|
|
549
|
+
setup(props13, ctx) {
|
|
550
|
+
const selectorControl = useFormSelectorControl(props13, ctx, {
|
|
544
551
|
nodeType,
|
|
545
552
|
defaultMultiple
|
|
546
553
|
});
|
|
547
|
-
const control = useControl(
|
|
554
|
+
const control = useControl(props13);
|
|
555
|
+
const classes = computed(() => ["v-form-selector", className, {
|
|
556
|
+
...control.classes.value,
|
|
557
|
+
"v-form-selector--stacked": props13.stacked
|
|
558
|
+
}]);
|
|
548
559
|
const vui = useVui();
|
|
549
560
|
const loadingMessageRef = computed(() => {
|
|
550
|
-
const slot = resolveVNodeChildOrSlots(
|
|
561
|
+
const slot = resolveVNodeChildOrSlots(props13.loadingMessage, vui.setting("loadingMessage"), "Loading...");
|
|
551
562
|
return slot && slot(vui);
|
|
552
563
|
});
|
|
553
564
|
const failedToLoadItemsMessageRef = computed(() => {
|
|
554
|
-
const slot = resolveVNodeChildOrSlots(
|
|
565
|
+
const slot = resolveVNodeChildOrSlots(props13.failedToLoadItemsMessage, vui.setting("failedToLoadDataMessage"), "Failed to load data.");
|
|
555
566
|
return slot && slot(vui);
|
|
556
567
|
});
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
...control,
|
|
560
|
-
loadingMessageRef,
|
|
561
|
-
failedToLoadItemsMessageRef
|
|
562
|
-
};
|
|
563
|
-
},
|
|
564
|
-
render() {
|
|
565
|
-
const {
|
|
566
|
-
selectorControl
|
|
567
|
-
} = this;
|
|
568
|
-
return createVNode(VFormControl, {
|
|
569
|
-
"nodeControl": this.nodeControl,
|
|
570
|
-
"focused": this.nodeControl.focused,
|
|
571
|
-
"hiddenInfo": this.hiddenInfo,
|
|
572
|
-
"class": ["v-form-selector", className, {
|
|
573
|
-
...this.classes,
|
|
574
|
-
"v-form-selector--stacked": this.stacked
|
|
575
|
-
}],
|
|
576
|
-
"label": this.label,
|
|
577
|
-
"hint": this.hint,
|
|
578
|
-
"hinttip": this.hinttip,
|
|
579
|
-
"requiredChip": this.requiredChip,
|
|
580
|
-
"error": selectorControl.itemsLoadFailed
|
|
581
|
-
}, {
|
|
582
|
-
...this.$slots,
|
|
583
|
-
default: () => createVNode("div", {
|
|
568
|
+
const defaultSlot = () => {
|
|
569
|
+
return createVNode("div", {
|
|
584
570
|
"class": "v-form-selector__body"
|
|
585
571
|
}, [selectorControl.itemsLoadFailed && createVNode("div", {
|
|
586
572
|
"key": "failed",
|
|
587
573
|
"class": "v-form-selector__placeholder v-form-selector__placeholder--error"
|
|
588
|
-
}, [
|
|
574
|
+
}, [failedToLoadItemsMessageRef.value]), selectorControl.itemsLoading && createVNode("div", {
|
|
589
575
|
"key": "loading",
|
|
590
576
|
"class": "v-form-selector__placeholder"
|
|
591
577
|
}, [createVNode(loading_exports.VProgressCircular, {
|
|
592
578
|
"indeterminate": true,
|
|
593
579
|
"class": "mr-1",
|
|
594
|
-
"size": CONTROL_LOADING_SPINNER_SIZES[
|
|
595
|
-
}, null),
|
|
580
|
+
"size": CONTROL_LOADING_SPINNER_SIZES[control.size.value || "md"]
|
|
581
|
+
}, null), loadingMessageRef.value]), selectorControl.propGroups.map((group) => {
|
|
596
582
|
const {
|
|
597
583
|
items
|
|
598
584
|
} = group;
|
|
@@ -607,12 +593,31 @@ function defineFormSelectorComponent(opts) {
|
|
|
607
593
|
key: attrs.value
|
|
608
594
|
},
|
|
609
595
|
slots: {
|
|
610
|
-
default: () => attrs.label(
|
|
596
|
+
default: () => attrs.label(selectorControl)
|
|
611
597
|
}
|
|
612
598
|
});
|
|
613
599
|
})]);
|
|
614
|
-
}),
|
|
600
|
+
}), ctx.slots.default?.()]);
|
|
601
|
+
};
|
|
602
|
+
ctx.expose({
|
|
603
|
+
control: selectorControl
|
|
615
604
|
});
|
|
605
|
+
return () => {
|
|
606
|
+
return createVNode(VFormControl, {
|
|
607
|
+
"nodeControl": selectorControl,
|
|
608
|
+
"focused": selectorControl.focused,
|
|
609
|
+
"hiddenInfo": props13.hiddenInfo,
|
|
610
|
+
"class": classes.value,
|
|
611
|
+
"label": props13.label,
|
|
612
|
+
"hint": props13.hint,
|
|
613
|
+
"hinttip": props13.hinttip,
|
|
614
|
+
"requiredChip": props13.requiredChip,
|
|
615
|
+
"error": selectorControl.itemsLoadFailed
|
|
616
|
+
}, {
|
|
617
|
+
...ctx.slots,
|
|
618
|
+
default: defaultSlot
|
|
619
|
+
});
|
|
620
|
+
};
|
|
616
621
|
}
|
|
617
622
|
});
|
|
618
623
|
}
|
|
@@ -621,9 +626,9 @@ function createElevationProps() {
|
|
|
621
626
|
elevation: Number
|
|
622
627
|
});
|
|
623
628
|
}
|
|
624
|
-
function useElevation(
|
|
629
|
+
function useElevation(props12, opts = {}) {
|
|
625
630
|
const elevationValue = computed(
|
|
626
|
-
() =>
|
|
631
|
+
() => props12.elevation == null ? opts.defaultValue : props12.elevation
|
|
627
632
|
);
|
|
628
633
|
const elevationClassName = computed(() => {
|
|
629
634
|
const v = elevationValue.value;
|
|
@@ -644,7 +649,7 @@ __export(components_exports, {
|
|
|
644
649
|
CHIP_SIZES: () => CHIP_SIZES,
|
|
645
650
|
CHOICE_KEY_TYPES: () => CHOICE_KEY_TYPES,
|
|
646
651
|
ICON_NAMES: () => ICON_NAMES,
|
|
647
|
-
|
|
652
|
+
KEYBOARD_EVENT_TYPES: () => KEYBOARD_EVENT_TYPES,
|
|
648
653
|
PAGINATION_ALIGNS: () => PAGINATION_ALIGNS,
|
|
649
654
|
VApp: () => VApp,
|
|
650
655
|
VAvatar: () => VAvatar,
|
|
@@ -665,6 +670,7 @@ __export(components_exports, {
|
|
|
665
670
|
VDrawerLayout: () => VDrawerLayout,
|
|
666
671
|
VForm: () => VForm,
|
|
667
672
|
VFormControl: () => VFormControl,
|
|
673
|
+
VFormGroup: () => VFormGroup,
|
|
668
674
|
VGridContainer: () => VGridContainer,
|
|
669
675
|
VGridItem: () => VGridItem,
|
|
670
676
|
VHero: () => VHero,
|
|
@@ -706,7 +712,9 @@ __export(components_exports, {
|
|
|
706
712
|
createPaperBaseProps: () => createPaperBaseProps,
|
|
707
713
|
createPaperProps: () => createPaperProps,
|
|
708
714
|
createRequiredChipRenderer: () => createRequiredChipRenderer,
|
|
715
|
+
createVFormGroupProps: () => createVFormGroupProps,
|
|
709
716
|
createVFormProps: () => createVFormProps,
|
|
717
|
+
formGroupSlots: () => formGroupSlots,
|
|
710
718
|
formSlots: () => formSlots,
|
|
711
719
|
iconProps: () => iconProps,
|
|
712
720
|
listTileEmits: () => listTileEmits,
|
|
@@ -731,11 +739,11 @@ var VDialog = defineDialogComponent({
|
|
|
731
739
|
},
|
|
732
740
|
setup(ctx) {
|
|
733
741
|
const {
|
|
734
|
-
props:
|
|
742
|
+
props: props12,
|
|
735
743
|
control
|
|
736
744
|
} = ctx;
|
|
737
745
|
const vui = useVui();
|
|
738
|
-
const actionControl = useStackAction(
|
|
746
|
+
const actionControl = useStackAction(props12, control, {
|
|
739
747
|
resolver: (actions) => {
|
|
740
748
|
if (actions.length === 0) {
|
|
741
749
|
return [vui.stackAction("close")];
|
|
@@ -744,7 +752,7 @@ var VDialog = defineDialogComponent({
|
|
|
744
752
|
}
|
|
745
753
|
}
|
|
746
754
|
});
|
|
747
|
-
const color = useColorClasses(
|
|
755
|
+
const color = useColorClasses(props12, {
|
|
748
756
|
useRootThemeDefault: true
|
|
749
757
|
});
|
|
750
758
|
return (children) => {
|
|
@@ -752,7 +760,7 @@ var VDialog = defineDialogComponent({
|
|
|
752
760
|
$actions
|
|
753
761
|
} = actionControl;
|
|
754
762
|
return createVNode("div", {
|
|
755
|
-
"class": ["v-dialog", color.colorClasses.value,
|
|
763
|
+
"class": ["v-dialog", color.colorClasses.value, props12.dense && "v-dialog--dense"]
|
|
756
764
|
}, [createVNode("div", {
|
|
757
765
|
"class": "v-dialog__body"
|
|
758
766
|
}, [children]), $actions.length > 0 && createVNode("div", {
|
|
@@ -770,11 +778,11 @@ var VSnackbar = defineSnackbarComponent({
|
|
|
770
778
|
},
|
|
771
779
|
setup(ctx) {
|
|
772
780
|
const {
|
|
773
|
-
props:
|
|
781
|
+
props: props12,
|
|
774
782
|
control
|
|
775
783
|
} = ctx;
|
|
776
784
|
const vui = useVui();
|
|
777
|
-
const actionControl = useStackAction(
|
|
785
|
+
const actionControl = useStackAction(props12, control, {
|
|
778
786
|
resolver: (actions) => {
|
|
779
787
|
if (actions.length === 0) {
|
|
780
788
|
return [vui.stackAction("close")];
|
|
@@ -783,7 +791,7 @@ var VSnackbar = defineSnackbarComponent({
|
|
|
783
791
|
}
|
|
784
792
|
}
|
|
785
793
|
});
|
|
786
|
-
const color = useColorClasses(
|
|
794
|
+
const color = useColorClasses(props12, {
|
|
787
795
|
useRootThemeDefault: true
|
|
788
796
|
});
|
|
789
797
|
return (children) => {
|
|
@@ -822,8 +830,8 @@ var VSheetModal = defineComponent({
|
|
|
822
830
|
inheritAttrs: false,
|
|
823
831
|
props: sheetModalProps,
|
|
824
832
|
emits: emits2,
|
|
825
|
-
setup(
|
|
826
|
-
const stackControl = useStackControl(
|
|
833
|
+
setup(props12, ctx) {
|
|
834
|
+
const stackControl = useStackControl(props12, ctx, {
|
|
827
835
|
stackType: SHEET_STACK_TYPE
|
|
828
836
|
});
|
|
829
837
|
const hasActiveChild = computed(() => {
|
|
@@ -869,9 +877,9 @@ var VSkeltonLoaderBone = defineComponent({
|
|
|
869
877
|
default: "div"
|
|
870
878
|
}
|
|
871
879
|
},
|
|
872
|
-
setup(
|
|
880
|
+
setup(props12, ctx) {
|
|
873
881
|
return () => {
|
|
874
|
-
const TagName =
|
|
882
|
+
const TagName = props12.tag;
|
|
875
883
|
return createVNode(TagName, mergeProps(ctx.attrs, {
|
|
876
884
|
"class": "v-skelton-loader-bone"
|
|
877
885
|
}), {
|
|
@@ -920,15 +928,15 @@ var VBusyImage = defineComponent({
|
|
|
920
928
|
error: (ev) => true
|
|
921
929
|
},
|
|
922
930
|
slots: slots3,
|
|
923
|
-
setup(
|
|
924
|
-
const loadStateRef = ref(
|
|
931
|
+
setup(props12, ctx) {
|
|
932
|
+
const loadStateRef = ref(props12.cover && isAvailableSrc(ctx.attrs.src) ? "loading" : "pending");
|
|
925
933
|
const attrsRef = computed(() => splitAttrs(ctx.attrs));
|
|
926
934
|
const isPendingRef = computed(() => loadStateRef.value === "pending");
|
|
927
935
|
const isLoadingRef = computed(() => loadStateRef.value === "loading");
|
|
928
936
|
const isLoadedRef = computed(() => loadStateRef.value === "loaded");
|
|
929
937
|
const isErrorRef = computed(() => loadStateRef.value === "error");
|
|
930
938
|
const classesRef = computed(() => [`v-busy-image--${loadStateRef.value}`, {
|
|
931
|
-
"v-busy-image--cover":
|
|
939
|
+
"v-busy-image--cover": props12.cover,
|
|
932
940
|
"v-busy-image--clickable": typeof ctx.attrs.onClick === "function"
|
|
933
941
|
}]);
|
|
934
942
|
const nodeRef = ref();
|
|
@@ -938,11 +946,11 @@ var VBusyImage = defineComponent({
|
|
|
938
946
|
const main = {};
|
|
939
947
|
const {
|
|
940
948
|
cover
|
|
941
|
-
} =
|
|
949
|
+
} = props12;
|
|
942
950
|
let {
|
|
943
951
|
width,
|
|
944
952
|
height
|
|
945
|
-
} =
|
|
953
|
+
} = props12;
|
|
946
954
|
if (height == null && cover) {
|
|
947
955
|
height = DEFAULT_HEIGHT;
|
|
948
956
|
}
|
|
@@ -985,7 +993,7 @@ var VBusyImage = defineComponent({
|
|
|
985
993
|
coverImageRef.value = void 0;
|
|
986
994
|
if (isAvailableSrc(value)) {
|
|
987
995
|
loadStateRef.value = "loading";
|
|
988
|
-
if (
|
|
996
|
+
if (props12.cover) {
|
|
989
997
|
loadImage(value).then((image) => {
|
|
990
998
|
coverImageRef.value = image;
|
|
991
999
|
setManualState("load");
|
|
@@ -1009,7 +1017,7 @@ var VBusyImage = defineComponent({
|
|
|
1009
1017
|
ctx.emit(loadType, ev);
|
|
1010
1018
|
};
|
|
1011
1019
|
onMounted(() => {
|
|
1012
|
-
if (booted ||
|
|
1020
|
+
if (booted || props12.cover)
|
|
1013
1021
|
return;
|
|
1014
1022
|
const image = nodeRef.value;
|
|
1015
1023
|
if (!image)
|
|
@@ -1050,7 +1058,7 @@ var VBusyImage = defineComponent({
|
|
|
1050
1058
|
"class": ["v-busy-image", classesRef.value]
|
|
1051
1059
|
}, elAttrs, {
|
|
1052
1060
|
"style": styles
|
|
1053
|
-
}), [!
|
|
1061
|
+
}), [!props12.cover && createVNode("img", mergeProps({
|
|
1054
1062
|
"key": "img",
|
|
1055
1063
|
"ref": nodeRef,
|
|
1056
1064
|
"class": "v-busy-image__node"
|
|
@@ -1096,7 +1104,7 @@ var VGridItem = defineComponent({
|
|
|
1096
1104
|
justify: void 0,
|
|
1097
1105
|
order: void 0
|
|
1098
1106
|
},
|
|
1099
|
-
setup(
|
|
1107
|
+
setup(props12, ctx) {
|
|
1100
1108
|
const data = computed(() => {
|
|
1101
1109
|
const classes = [];
|
|
1102
1110
|
const attrs = {
|
|
@@ -1107,7 +1115,7 @@ var VGridItem = defineComponent({
|
|
|
1107
1115
|
align,
|
|
1108
1116
|
justify,
|
|
1109
1117
|
order
|
|
1110
|
-
} =
|
|
1118
|
+
} = props12;
|
|
1111
1119
|
delete attrs.size;
|
|
1112
1120
|
delete attrs.align;
|
|
1113
1121
|
delete attrs.justify;
|
|
@@ -1122,7 +1130,7 @@ var VGridItem = defineComponent({
|
|
|
1122
1130
|
};
|
|
1123
1131
|
});
|
|
1124
1132
|
return () => {
|
|
1125
|
-
const TagName =
|
|
1133
|
+
const TagName = props12.tag;
|
|
1126
1134
|
const {
|
|
1127
1135
|
classes,
|
|
1128
1136
|
attrs
|
|
@@ -1156,7 +1164,7 @@ var VGridContainer = defineComponent({
|
|
|
1156
1164
|
alignContent: void 0,
|
|
1157
1165
|
justifyContent: void 0
|
|
1158
1166
|
},
|
|
1159
|
-
setup(
|
|
1167
|
+
setup(props12, ctx) {
|
|
1160
1168
|
const data = computed(() => {
|
|
1161
1169
|
const classes = [];
|
|
1162
1170
|
const attrs = {
|
|
@@ -1170,7 +1178,7 @@ var VGridContainer = defineComponent({
|
|
|
1170
1178
|
wrap,
|
|
1171
1179
|
alignContent,
|
|
1172
1180
|
justifyContent
|
|
1173
|
-
} =
|
|
1181
|
+
} = props12;
|
|
1174
1182
|
const wrapperClass = attrs.class;
|
|
1175
1183
|
const wrapperStyle = attrs.style;
|
|
1176
1184
|
delete attrs.class;
|
|
@@ -1197,8 +1205,8 @@ var VGridContainer = defineComponent({
|
|
|
1197
1205
|
};
|
|
1198
1206
|
});
|
|
1199
1207
|
return () => {
|
|
1200
|
-
const WrapperTag =
|
|
1201
|
-
const TagName =
|
|
1208
|
+
const WrapperTag = props12.wrapperTag;
|
|
1209
|
+
const TagName = props12.tag;
|
|
1202
1210
|
const {
|
|
1203
1211
|
wrapperClass,
|
|
1204
1212
|
wrapperStyle,
|
|
@@ -1243,20 +1251,20 @@ var VPaper = defineComponent({
|
|
|
1243
1251
|
inheritAttrs: false,
|
|
1244
1252
|
props: createPaperProps(),
|
|
1245
1253
|
slots: paperBaseSlots,
|
|
1246
|
-
setup(
|
|
1247
|
-
const tag = computed(() =>
|
|
1248
|
-
const elevation = useElevation(
|
|
1254
|
+
setup(props12, ctx) {
|
|
1255
|
+
const tag = computed(() => props12.tag);
|
|
1256
|
+
const elevation = useElevation(props12, {
|
|
1249
1257
|
defaultValue: 1
|
|
1250
1258
|
});
|
|
1251
|
-
const scope = useScopeColorClass(
|
|
1259
|
+
const scope = useScopeColorClass(props12);
|
|
1252
1260
|
const classes = computed(() => [elevation.elevationClassName.value, scope.value.className, {
|
|
1253
1261
|
"v-paper--plain": !scope.value.value,
|
|
1254
1262
|
"v-paper--has-color": !!scope.value.value || !!ctx.attrs.disabled,
|
|
1255
|
-
"v-paper--square":
|
|
1263
|
+
"v-paper--square": props12.square
|
|
1256
1264
|
}]);
|
|
1257
|
-
const headerProps = computed(() =>
|
|
1258
|
-
const bodyProps = computed(() =>
|
|
1259
|
-
const footerProps = computed(() =>
|
|
1265
|
+
const headerProps = computed(() => props12.headerProps);
|
|
1266
|
+
const bodyProps = computed(() => props12.bodyProps);
|
|
1267
|
+
const footerProps = computed(() => props12.footerProps);
|
|
1260
1268
|
return () => {
|
|
1261
1269
|
const TagName = tag.value;
|
|
1262
1270
|
const header = renderSlotOrEmpty(ctx.slots, "header");
|
|
@@ -1265,7 +1273,7 @@ var VPaper = defineComponent({
|
|
|
1265
1273
|
"class": ["v-paper", classes.value]
|
|
1266
1274
|
}, ctx.attrs), {
|
|
1267
1275
|
default: () => [createVNode("div", {
|
|
1268
|
-
"class": ["v-paper__inner",
|
|
1276
|
+
"class": ["v-paper__inner", props12.innerClass]
|
|
1269
1277
|
}, [header && createVNode("div", mergeProps({
|
|
1270
1278
|
"class": "v-paper__header"
|
|
1271
1279
|
}, headerProps.value), [header]), createVNode("div", mergeProps({
|
|
@@ -1296,26 +1304,26 @@ var VAvatar = defineComponent({
|
|
|
1296
1304
|
name: "VAvatar",
|
|
1297
1305
|
inheritAttrs: false,
|
|
1298
1306
|
props: createAvatarProps(),
|
|
1299
|
-
setup(
|
|
1307
|
+
setup(props12, ctx) {
|
|
1300
1308
|
const vui = useVui();
|
|
1301
1309
|
const defaults = vui.setting("buttonDefault");
|
|
1302
1310
|
const color = useColorClasses({
|
|
1303
|
-
color: () =>
|
|
1304
|
-
variant: () =>
|
|
1311
|
+
color: () => props12.color || defaults.color,
|
|
1312
|
+
variant: () => props12.variant || defaults.variant
|
|
1305
1313
|
});
|
|
1306
1314
|
const classes = computed(() => {
|
|
1307
1315
|
const {
|
|
1308
1316
|
size
|
|
1309
|
-
} =
|
|
1317
|
+
} = props12;
|
|
1310
1318
|
return [{
|
|
1311
|
-
"v-avatar--tile":
|
|
1312
|
-
"v-avatar--rounded":
|
|
1319
|
+
"v-avatar--tile": props12.tile,
|
|
1320
|
+
"v-avatar--rounded": props12.rounded
|
|
1313
1321
|
}, typeof size === "string" && `v-avatar--${size}`];
|
|
1314
1322
|
});
|
|
1315
1323
|
const styles = computed(() => {
|
|
1316
1324
|
const {
|
|
1317
1325
|
size
|
|
1318
|
-
} =
|
|
1326
|
+
} = props12;
|
|
1319
1327
|
if (typeof size !== "number")
|
|
1320
1328
|
return;
|
|
1321
1329
|
return {
|
|
@@ -1333,7 +1341,7 @@ var VAvatar = defineComponent({
|
|
|
1333
1341
|
return () => {
|
|
1334
1342
|
const {
|
|
1335
1343
|
src
|
|
1336
|
-
} =
|
|
1344
|
+
} = props12;
|
|
1337
1345
|
return actionable.render(!!src && createVNode(VBusyImage, {
|
|
1338
1346
|
"class": "v-avatar__image",
|
|
1339
1347
|
"src": src,
|
|
@@ -1379,27 +1387,27 @@ var VChip = defineComponent({
|
|
|
1379
1387
|
name: "VChip",
|
|
1380
1388
|
inheritAttrs: false,
|
|
1381
1389
|
props: createChipProps(),
|
|
1382
|
-
setup(
|
|
1390
|
+
setup(props12, ctx) {
|
|
1383
1391
|
const vui = useVui();
|
|
1384
1392
|
const defaults = vui.setting("buttonDefault");
|
|
1385
1393
|
const color = useColorClasses({
|
|
1386
|
-
color: () =>
|
|
1387
|
-
variant: () =>
|
|
1394
|
+
color: () => props12.color || defaults.color,
|
|
1395
|
+
variant: () => props12.variant || defaults.variant
|
|
1388
1396
|
});
|
|
1389
1397
|
const startIcon = computed(() => {
|
|
1390
|
-
const _icon = resolveRawVChipIcon(
|
|
1398
|
+
const _icon = resolveRawVChipIcon(props12.startIcon, "start");
|
|
1391
1399
|
return _icon && _icon();
|
|
1392
1400
|
});
|
|
1393
1401
|
const endIcon = computed(() => {
|
|
1394
|
-
const _icon = resolveRawVChipIcon(
|
|
1402
|
+
const _icon = resolveRawVChipIcon(props12.endIcon, "end");
|
|
1395
1403
|
return _icon && _icon();
|
|
1396
1404
|
});
|
|
1397
1405
|
const classes = computed(() => {
|
|
1398
1406
|
const {
|
|
1399
1407
|
size
|
|
1400
|
-
} =
|
|
1408
|
+
} = props12;
|
|
1401
1409
|
return [{
|
|
1402
|
-
"v-chip--label":
|
|
1410
|
+
"v-chip--label": props12.label
|
|
1403
1411
|
}, typeof size === "string" && `v-chip--${size}`];
|
|
1404
1412
|
});
|
|
1405
1413
|
const actionable = useActionable(ctx, {
|
|
@@ -1425,8 +1433,8 @@ var VCard = defineComponent({
|
|
|
1425
1433
|
name: "VCard",
|
|
1426
1434
|
inheritAttrs: false,
|
|
1427
1435
|
props: createCardProps(),
|
|
1428
|
-
setup(
|
|
1429
|
-
const _props = computed(() =>
|
|
1436
|
+
setup(props12, ctx) {
|
|
1437
|
+
const _props = computed(() => props12);
|
|
1430
1438
|
const data = computed(() => {
|
|
1431
1439
|
const hasLink = !!ctx.attrs.href || !!ctx.attrs.to;
|
|
1432
1440
|
const attrs = {
|
|
@@ -1435,7 +1443,7 @@ var VCard = defineComponent({
|
|
|
1435
1443
|
class: ["v-card", ctx.attrs.class, typeof ctx.attrs.onClick === "function" && "clickable"],
|
|
1436
1444
|
tag: hasLink ? VAction : "div"
|
|
1437
1445
|
};
|
|
1438
|
-
if (
|
|
1446
|
+
if (props12.disabled) {
|
|
1439
1447
|
attrs.disabled = "disabled";
|
|
1440
1448
|
delete attrs.onClick;
|
|
1441
1449
|
delete attrs.href;
|
|
@@ -1504,38 +1512,38 @@ var VButton = defineComponent({
|
|
|
1504
1512
|
name: "VButton",
|
|
1505
1513
|
inheritAttrs: false,
|
|
1506
1514
|
props: vueButtonProps,
|
|
1507
|
-
setup(
|
|
1515
|
+
setup(props12, ctx) {
|
|
1508
1516
|
const vui = useVui();
|
|
1509
|
-
const control = useControl(
|
|
1517
|
+
const control = useControl(props12);
|
|
1510
1518
|
const defaults = vui.setting("buttonDefault");
|
|
1511
1519
|
const icon = computed(() => {
|
|
1512
|
-
const _icon = resolveRawVButtonIcon(
|
|
1520
|
+
const _icon = resolveRawVButtonIcon(props12.icon);
|
|
1513
1521
|
return _icon && _icon();
|
|
1514
1522
|
});
|
|
1515
1523
|
const startIcon = computed(() => {
|
|
1516
|
-
const _icon = resolveRawVButtonIcon(
|
|
1524
|
+
const _icon = resolveRawVButtonIcon(props12.startIcon, "start");
|
|
1517
1525
|
return _icon && _icon();
|
|
1518
1526
|
});
|
|
1519
1527
|
const endIcon = computed(() => {
|
|
1520
|
-
const _icon = resolveRawVButtonIcon(
|
|
1528
|
+
const _icon = resolveRawVButtonIcon(props12.endIcon, "end");
|
|
1521
1529
|
return _icon && _icon();
|
|
1522
1530
|
});
|
|
1523
1531
|
const color = useColorClasses({
|
|
1524
|
-
color: () =>
|
|
1525
|
-
variant: () =>
|
|
1532
|
+
color: () => props12.color || defaults.color,
|
|
1533
|
+
variant: () => props12.variant || (icon.value ? vui.setting("plainVariant") : defaults.variant)
|
|
1526
1534
|
});
|
|
1527
1535
|
const isPlain = computed(() => color.variant.value.value === vui.setting("plainVariant") && color.color.value.value === defaults.color);
|
|
1528
|
-
const isLoading = computed(() =>
|
|
1536
|
+
const isLoading = computed(() => props12.loading);
|
|
1529
1537
|
const spacer = computed(() => {
|
|
1530
|
-
const _spacer =
|
|
1538
|
+
const _spacer = props12.spacer;
|
|
1531
1539
|
if (!_spacer)
|
|
1532
1540
|
return;
|
|
1533
1541
|
return _spacer === true ? "left" : _spacer;
|
|
1534
1542
|
});
|
|
1535
|
-
const classes = computed(() => [color.colorClasses.value, spacer.value ? `v-button--spacer-${spacer.value}` : void 0, `v-button--${control.size.value}`, `v-button--align-${
|
|
1543
|
+
const classes = computed(() => [color.colorClasses.value, spacer.value ? `v-button--spacer-${spacer.value}` : void 0, `v-button--${control.size.value}`, `v-button--align-${props12.align}`, {
|
|
1536
1544
|
"v-button--loading": isLoading.value,
|
|
1537
1545
|
"v-button--icon": !!icon.value,
|
|
1538
|
-
"v-button--rounded":
|
|
1546
|
+
"v-button--rounded": props12.rounded,
|
|
1539
1547
|
"v-button--plain": isPlain.value
|
|
1540
1548
|
}]);
|
|
1541
1549
|
return () => {
|
|
@@ -1561,7 +1569,7 @@ var VButtonGroup = defineComponent({
|
|
|
1561
1569
|
...createControlProps(),
|
|
1562
1570
|
disabled: Boolean
|
|
1563
1571
|
},
|
|
1564
|
-
setup(
|
|
1572
|
+
setup(props12, ctx) {
|
|
1565
1573
|
return () => {
|
|
1566
1574
|
let hasIcon = false;
|
|
1567
1575
|
let buttonLength = 0;
|
|
@@ -1593,7 +1601,7 @@ var VButtonGroup = defineComponent({
|
|
|
1593
1601
|
const hasRight = buttonIndex < buttonLength;
|
|
1594
1602
|
const childProps = child.node.props;
|
|
1595
1603
|
return cloneVNode(child.node, {
|
|
1596
|
-
...
|
|
1604
|
+
...props12,
|
|
1597
1605
|
...childProps,
|
|
1598
1606
|
rouded: false,
|
|
1599
1607
|
class: ["v-button-group__item", {
|
|
@@ -1661,7 +1669,7 @@ var VPagination = defineComponent({
|
|
|
1661
1669
|
change: (page) => true,
|
|
1662
1670
|
"update:modelValue": (page) => true
|
|
1663
1671
|
},
|
|
1664
|
-
setup(
|
|
1672
|
+
setup(props12, ctx) {
|
|
1665
1673
|
const vui = useVui();
|
|
1666
1674
|
const elRef = ref(null);
|
|
1667
1675
|
const router = useRouter();
|
|
@@ -1675,15 +1683,15 @@ var VPagination = defineComponent({
|
|
|
1675
1683
|
return Math.floor(containerWidth.value / _itemSize);
|
|
1676
1684
|
});
|
|
1677
1685
|
const colorScope = useScopeColorClass({
|
|
1678
|
-
color: () =>
|
|
1686
|
+
color: () => props12.color || vui.setting("primaryScope")
|
|
1679
1687
|
});
|
|
1680
|
-
const computedLength = computed(() => resolveNumberish(
|
|
1681
|
-
const computedTotalVisible = computed(() => resolveNumberish(
|
|
1688
|
+
const computedLength = computed(() => resolveNumberish(props12.length));
|
|
1689
|
+
const computedTotalVisible = computed(() => resolveNumberish(props12.totalVisible));
|
|
1682
1690
|
const computedNumbersLength = computed(() => capacityLength.value - 2 - 2);
|
|
1683
1691
|
const computedPage = computed(() => {
|
|
1684
1692
|
const {
|
|
1685
1693
|
routeQuery
|
|
1686
|
-
} =
|
|
1694
|
+
} = props12;
|
|
1687
1695
|
if (routeQuery) {
|
|
1688
1696
|
return vui.location.getQuery(routeQuery, Number, 1);
|
|
1689
1697
|
}
|
|
@@ -1727,14 +1735,14 @@ var VPagination = defineComponent({
|
|
|
1727
1735
|
const isTransitioning = computed(() => {
|
|
1728
1736
|
const {
|
|
1729
1737
|
routeQuery
|
|
1730
|
-
} =
|
|
1738
|
+
} = props12;
|
|
1731
1739
|
return vui.location.isQueryOnlyTransitioning(routeQuery);
|
|
1732
1740
|
});
|
|
1733
|
-
const isDisabled = computed(() =>
|
|
1741
|
+
const isDisabled = computed(() => props12.disabled || isTransitioning.value);
|
|
1734
1742
|
const classes = computed(() => [{
|
|
1735
1743
|
"v-pagination--disabled": isDisabled.value,
|
|
1736
|
-
"v-pagination--dense":
|
|
1737
|
-
[`v-pagination--${
|
|
1744
|
+
"v-pagination--dense": props12.dense,
|
|
1745
|
+
[`v-pagination--${props12.align}`]: true
|
|
1738
1746
|
}, colorScope.value.className]);
|
|
1739
1747
|
async function setPage(value) {
|
|
1740
1748
|
if (isDisabled.value)
|
|
@@ -1742,7 +1750,7 @@ var VPagination = defineComponent({
|
|
|
1742
1750
|
const {
|
|
1743
1751
|
beforeChange,
|
|
1744
1752
|
routeQuery
|
|
1745
|
-
} =
|
|
1753
|
+
} = props12;
|
|
1746
1754
|
const newPage = resolveNumberish(value);
|
|
1747
1755
|
if (computedPage.value === newPage)
|
|
1748
1756
|
return;
|
|
@@ -1835,7 +1843,7 @@ var VPagination = defineComponent({
|
|
|
1835
1843
|
const key = `${source}-${index}`;
|
|
1836
1844
|
const {
|
|
1837
1845
|
routeQuery
|
|
1838
|
-
} =
|
|
1846
|
+
} = props12;
|
|
1839
1847
|
if (page !== void 0 && routeQuery) {
|
|
1840
1848
|
const to = createRoutableLocationByPage(page, routeQuery);
|
|
1841
1849
|
return createVNode(RouterLink, {
|
|
@@ -1855,7 +1863,7 @@ var VPagination = defineComponent({
|
|
|
1855
1863
|
}, [children]);
|
|
1856
1864
|
}
|
|
1857
1865
|
}
|
|
1858
|
-
watch(() =>
|
|
1866
|
+
watch(() => props12.modelValue, (modelValue) => {
|
|
1859
1867
|
internalValue.value = resolveNumberish(modelValue);
|
|
1860
1868
|
}, {
|
|
1861
1869
|
immediate: true
|
|
@@ -1910,16 +1918,16 @@ var VListTile = defineComponent({
|
|
|
1910
1918
|
emits: {
|
|
1911
1919
|
...listTileEmits
|
|
1912
1920
|
},
|
|
1913
|
-
setup(
|
|
1921
|
+
setup(props12, ctx) {
|
|
1914
1922
|
const vui = useVui();
|
|
1915
1923
|
const startIcon = computed(() => {
|
|
1916
|
-
let icon = resolveRawIconProp(false,
|
|
1917
|
-
if (!icon &&
|
|
1924
|
+
let icon = resolveRawIconProp(false, props12.startIcon);
|
|
1925
|
+
if (!icon && props12.startIconEmptySpace) {
|
|
1918
1926
|
icon = resolveRawIconProp(false, "$empty");
|
|
1919
1927
|
}
|
|
1920
1928
|
return icon;
|
|
1921
1929
|
});
|
|
1922
|
-
const endIcon = computed(() => resolveRawIconProp(false,
|
|
1930
|
+
const endIcon = computed(() => resolveRawIconProp(false, props12.endIcon));
|
|
1923
1931
|
const hasTo = computed(() => !!ctx.attrs.to);
|
|
1924
1932
|
const link = vui.useLink({
|
|
1925
1933
|
to: ctx.attrs.to || ""
|
|
@@ -1927,9 +1935,9 @@ var VListTile = defineComponent({
|
|
|
1927
1935
|
const isActive = computed(() => {
|
|
1928
1936
|
if (!hasTo.value)
|
|
1929
1937
|
return false;
|
|
1930
|
-
return
|
|
1938
|
+
return props12.exactMatch ? link.isExactActive.value : link.isActive.value;
|
|
1931
1939
|
});
|
|
1932
|
-
const color = useScopeColorClass(
|
|
1940
|
+
const color = useScopeColorClass(props12);
|
|
1933
1941
|
const classes = computed(() => {
|
|
1934
1942
|
const _color = color.value;
|
|
1935
1943
|
const hasColor = !!_color.value;
|
|
@@ -1968,11 +1976,11 @@ var VDrawerLayout = defineComponent({
|
|
|
1968
1976
|
...createPaperBaseProps()
|
|
1969
1977
|
},
|
|
1970
1978
|
slots: paperBaseSlots,
|
|
1971
|
-
setup(
|
|
1979
|
+
setup(props12, ctx) {
|
|
1972
1980
|
return () => {
|
|
1973
1981
|
const paperProps = computed(() => ({
|
|
1974
|
-
color:
|
|
1975
|
-
tag:
|
|
1982
|
+
color: props12.color,
|
|
1983
|
+
tag: props12.tag
|
|
1976
1984
|
}));
|
|
1977
1985
|
return createVNode(VPaper, mergeProps({
|
|
1978
1986
|
"class": "v-drawer-layout",
|
|
@@ -2011,16 +2019,16 @@ var VHero = defineComponent({
|
|
|
2011
2019
|
...slots4()
|
|
2012
2020
|
},
|
|
2013
2021
|
slots: slots4,
|
|
2014
|
-
setup(
|
|
2022
|
+
setup(props12, ctx) {
|
|
2015
2023
|
return () => {
|
|
2016
|
-
const TagName =
|
|
2017
|
-
const HTagName =
|
|
2024
|
+
const TagName = props12.tag;
|
|
2025
|
+
const HTagName = props12.hTag;
|
|
2018
2026
|
const adornment = ctx.slots.adornment?.();
|
|
2019
2027
|
return createVNode(VAppContainer, {
|
|
2020
2028
|
"pulled": true
|
|
2021
2029
|
}, {
|
|
2022
2030
|
default: () => [createVNode(TagName, {
|
|
2023
|
-
"class": ["v-hero", toScopeColorClass(
|
|
2031
|
+
"class": ["v-hero", toScopeColorClass(props12.color)]
|
|
2024
2032
|
}, {
|
|
2025
2033
|
default: () => [createVNode(HTagName, {
|
|
2026
2034
|
"class": "v-hero__title"
|
|
@@ -2055,25 +2063,25 @@ function createNavigationItemProps() {
|
|
|
2055
2063
|
}
|
|
2056
2064
|
function resolveNavigationItemInput(input) {
|
|
2057
2065
|
let label = input.label;
|
|
2058
|
-
const
|
|
2066
|
+
const props12 = {
|
|
2059
2067
|
...input
|
|
2060
2068
|
};
|
|
2061
2069
|
if (typeof label === "function") {
|
|
2062
2070
|
label = label();
|
|
2063
2071
|
}
|
|
2064
|
-
delete
|
|
2072
|
+
delete props12.label;
|
|
2065
2073
|
return {
|
|
2066
2074
|
label,
|
|
2067
|
-
props:
|
|
2075
|
+
props: props12
|
|
2068
2076
|
};
|
|
2069
2077
|
}
|
|
2070
2078
|
function renderNavigationItemInput(input, extraProps) {
|
|
2071
2079
|
const {
|
|
2072
2080
|
label,
|
|
2073
|
-
props:
|
|
2081
|
+
props: props12
|
|
2074
2082
|
} = resolveNavigationItemInput(input);
|
|
2075
2083
|
return createVNode(VNavigationItem, {
|
|
2076
|
-
...
|
|
2084
|
+
...props12,
|
|
2077
2085
|
...extraProps
|
|
2078
2086
|
}, _isSlot2(label) ? label : {
|
|
2079
2087
|
default: () => [label]
|
|
@@ -2093,18 +2101,18 @@ var VNavigationItem = defineComponent({
|
|
|
2093
2101
|
emits: {
|
|
2094
2102
|
...listTileEmits
|
|
2095
2103
|
},
|
|
2096
|
-
setup(
|
|
2104
|
+
setup(props12, ctx) {
|
|
2097
2105
|
const vui = useVui();
|
|
2098
2106
|
const opened = ref(false);
|
|
2099
2107
|
const children = computed(() => {
|
|
2100
|
-
const c =
|
|
2108
|
+
const c = props12.children;
|
|
2101
2109
|
return c && c.length ? c : void 0;
|
|
2102
2110
|
});
|
|
2103
2111
|
const to = computed(() => ctx.attrs.to);
|
|
2104
2112
|
const match = computed(() => {
|
|
2105
2113
|
const {
|
|
2106
2114
|
match: match2
|
|
2107
|
-
} =
|
|
2115
|
+
} = props12;
|
|
2108
2116
|
const {
|
|
2109
2117
|
to: to2
|
|
2110
2118
|
} = ctx.attrs;
|
|
@@ -2120,7 +2128,7 @@ var VNavigationItem = defineComponent({
|
|
|
2120
2128
|
});
|
|
2121
2129
|
const classes = computed(() => [{
|
|
2122
2130
|
"v-navigation-item--opened": opened.value,
|
|
2123
|
-
[`v-navigation-item--depth-${
|
|
2131
|
+
[`v-navigation-item--depth-${props12.depth}`]: props12.depth > 0
|
|
2124
2132
|
}]);
|
|
2125
2133
|
const route = useRoute();
|
|
2126
2134
|
watch(() => route.path, (newPath) => {
|
|
@@ -2142,7 +2150,7 @@ var VNavigationItem = defineComponent({
|
|
|
2142
2150
|
const c = children.value;
|
|
2143
2151
|
let {
|
|
2144
2152
|
endIcon
|
|
2145
|
-
} =
|
|
2153
|
+
} = props12;
|
|
2146
2154
|
if (c && !endIcon) {
|
|
2147
2155
|
endIcon = vui.icon("navigationExpand");
|
|
2148
2156
|
if (typeof endIcon === "string") {
|
|
@@ -2156,7 +2164,7 @@ var VNavigationItem = defineComponent({
|
|
|
2156
2164
|
}
|
|
2157
2165
|
}
|
|
2158
2166
|
const __props = {
|
|
2159
|
-
...
|
|
2167
|
+
...props12,
|
|
2160
2168
|
endIcon
|
|
2161
2169
|
};
|
|
2162
2170
|
delete __props.children;
|
|
@@ -2204,11 +2212,11 @@ var VNavigationItem = defineComponent({
|
|
|
2204
2212
|
default: () => [withDirectives(createVNode("div", {
|
|
2205
2213
|
"class": "v-navigation-item__expand"
|
|
2206
2214
|
}, [_children.map((child) => renderNavigationItemInput({
|
|
2207
|
-
color:
|
|
2215
|
+
color: props12.color,
|
|
2208
2216
|
...child
|
|
2209
2217
|
}, {
|
|
2210
2218
|
startIconEmptySpace: _props.value.startIconEmptySpace,
|
|
2211
|
-
depth:
|
|
2219
|
+
depth: props12.nested ? props12.depth + 1 : props12.depth
|
|
2212
2220
|
// onClick,
|
|
2213
2221
|
// onChangeActive,
|
|
2214
2222
|
}))]), [[vShow, opened.value]])]
|
|
@@ -2233,13 +2241,13 @@ function createNavigationProps() {
|
|
|
2233
2241
|
var VNavigation = defineComponent({
|
|
2234
2242
|
name: "VNavigation",
|
|
2235
2243
|
props: createNavigationProps(),
|
|
2236
|
-
setup(
|
|
2237
|
-
const items = computed(() =>
|
|
2238
|
-
const color = useScopeColorClass(
|
|
2244
|
+
setup(props12, ctx) {
|
|
2245
|
+
const items = computed(() => props12.items);
|
|
2246
|
+
const color = useScopeColorClass(props12);
|
|
2239
2247
|
const classes = computed(() => [color.value.className]);
|
|
2240
|
-
const startIconEmptySpace = computed(() =>
|
|
2248
|
+
const startIconEmptySpace = computed(() => props12.startIconEmptySpace);
|
|
2241
2249
|
const caption = computed(() => {
|
|
2242
|
-
const c =
|
|
2250
|
+
const c = props12.caption;
|
|
2243
2251
|
return typeof c === "function" ? c() : c;
|
|
2244
2252
|
});
|
|
2245
2253
|
const itemsRef = ref([]);
|
|
@@ -2312,40 +2320,40 @@ var VControlField = defineComponent({
|
|
|
2312
2320
|
emits: {
|
|
2313
2321
|
click: (ev) => true
|
|
2314
2322
|
},
|
|
2315
|
-
setup(
|
|
2323
|
+
setup(props12, ctx) {
|
|
2316
2324
|
const parentNode = useParentFormNode();
|
|
2317
|
-
const control = useControl(
|
|
2318
|
-
const inputBox = useControlField(
|
|
2325
|
+
const control = useControl(props12);
|
|
2326
|
+
const inputBox = useControlField(props12);
|
|
2319
2327
|
const hostElRef = ref(null);
|
|
2320
2328
|
const disabled = computed(() => !!parentNode && parentNode.isDisabled);
|
|
2321
2329
|
const invalid = computed(() => !!parentNode && parentNode.invalid);
|
|
2322
|
-
const autoHeight = computed(() =>
|
|
2330
|
+
const autoHeight = computed(() => props12.autoHeight);
|
|
2323
2331
|
const readonly = computed(() => !!parentNode && parentNode.isReadonly);
|
|
2324
2332
|
const colorProvider = useVuiColorProvider();
|
|
2325
2333
|
const classes = computed(() => {
|
|
2326
2334
|
const classes2 = ["v-control-field", `v-control-field--${inputBox.variant.value}`, {
|
|
2327
2335
|
"v-control-field--disabled": disabled.value,
|
|
2328
|
-
"v-control-field--invalid": invalid.value ||
|
|
2336
|
+
"v-control-field--invalid": invalid.value || props12.error,
|
|
2329
2337
|
"v-control-field--readonly": readonly.value,
|
|
2330
|
-
"v-control-field--focused":
|
|
2338
|
+
"v-control-field--focused": props12.focused,
|
|
2331
2339
|
"v-control-field--auto-height": autoHeight.value
|
|
2332
|
-
}, control.classes.value, colorProvider.className(
|
|
2340
|
+
}, control.classes.value, colorProvider.className(props12.error ? "error" : invalid.value && !readonly.value ? "error" : "primary")];
|
|
2333
2341
|
return classes2;
|
|
2334
2342
|
});
|
|
2335
2343
|
const resolvedSlots = computed(() => {
|
|
2336
2344
|
const slots13 = {};
|
|
2337
2345
|
ADORNMENT_POSITIONS.forEach((position) => {
|
|
2338
2346
|
const key = `${position}Adornment`;
|
|
2339
|
-
slots13[position] = resolveVNodeChildOrSlots(
|
|
2347
|
+
slots13[position] = resolveVNodeChildOrSlots(props12[key], ctx.slots[key]);
|
|
2340
2348
|
});
|
|
2341
2349
|
return slots13;
|
|
2342
2350
|
});
|
|
2343
2351
|
const renderAdornment = (position) => {
|
|
2344
2352
|
let child;
|
|
2345
|
-
if (position === "end" &&
|
|
2353
|
+
if (position === "end" && props12.loading) {
|
|
2346
2354
|
child = createVNode(loading_exports.VProgressCircular, {
|
|
2347
2355
|
"indeterminate": true,
|
|
2348
|
-
"size": CONTROL_LOADING_SPINNER_SIZES[
|
|
2356
|
+
"size": CONTROL_LOADING_SPINNER_SIZES[props12.size || "md"]
|
|
2349
2357
|
}, null);
|
|
2350
2358
|
} else {
|
|
2351
2359
|
child = resolvedSlots.value[position]?.();
|
|
@@ -2398,12 +2406,12 @@ var VCheckable = defineComponent({
|
|
|
2398
2406
|
// autoWidth: Boolean,
|
|
2399
2407
|
},
|
|
2400
2408
|
slots: slots6,
|
|
2401
|
-
setup(
|
|
2409
|
+
setup(props12, ctx) {
|
|
2402
2410
|
const colorProvider = useVuiColorProvider();
|
|
2403
|
-
const invalid = computed(() =>
|
|
2404
|
-
const disabled = computed(() =>
|
|
2405
|
-
const readonly = computed(() =>
|
|
2406
|
-
const checked = computed(() =>
|
|
2411
|
+
const invalid = computed(() => props12.invalid);
|
|
2412
|
+
const disabled = computed(() => props12.disabled);
|
|
2413
|
+
const readonly = computed(() => props12.readonly);
|
|
2414
|
+
const checked = computed(() => props12.checked);
|
|
2407
2415
|
const classes = computed(() => {
|
|
2408
2416
|
return [{
|
|
2409
2417
|
"v-checkable--invalid": invalid.value,
|
|
@@ -2439,42 +2447,43 @@ var VCheckbox = defineComponent({
|
|
|
2439
2447
|
indeterminate: Boolean
|
|
2440
2448
|
},
|
|
2441
2449
|
emits: emits3,
|
|
2442
|
-
setup(
|
|
2443
|
-
const nodeControl = useFormSelectorItemControl(
|
|
2450
|
+
setup(props12, ctx) {
|
|
2451
|
+
const nodeControl = useFormSelectorItemControl(props12, ctx, {
|
|
2444
2452
|
nodeType: VUI_CHECKBOX_SYMBOL,
|
|
2445
2453
|
parentNodeType: VUI_CHECKBOX_GROUP_SYMBOL
|
|
2446
2454
|
});
|
|
2447
|
-
const control = useControl(
|
|
2448
|
-
const isIndeterminate = computed(() =>
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
"v-checkbox--indeterminate": isIndeterminate
|
|
2464
|
-
}, this.classes],
|
|
2465
|
-
"checked": this.selected || isIndeterminate,
|
|
2466
|
-
"invalid": this.invalid,
|
|
2467
|
-
"disabled": this.isDisabled,
|
|
2468
|
-
"readonly": this.isReadonly
|
|
2469
|
-
}, {
|
|
2470
|
-
input: () => selectorItemControl.createInputElement({
|
|
2455
|
+
const control = useControl(props12);
|
|
2456
|
+
const isIndeterminate = computed(() => props12.indeterminate);
|
|
2457
|
+
const classes = computed(() => ["v-checkbox", {
|
|
2458
|
+
"v-checkbox--selected": nodeControl.selected,
|
|
2459
|
+
"v-checkbox--indeterminate": isIndeterminate.value
|
|
2460
|
+
}, control.classes.value]);
|
|
2461
|
+
const api = nodeControl.extend({
|
|
2462
|
+
get isIndeterminate() {
|
|
2463
|
+
return isIndeterminate.value;
|
|
2464
|
+
}
|
|
2465
|
+
});
|
|
2466
|
+
ctx.expose({
|
|
2467
|
+
control: api
|
|
2468
|
+
});
|
|
2469
|
+
const slots13 = {
|
|
2470
|
+
input: () => nodeControl.createInputElement({
|
|
2471
2471
|
type: "checkbox"
|
|
2472
2472
|
}),
|
|
2473
2473
|
faux: () => createVNode("span", {
|
|
2474
2474
|
"class": "v-checkbox__faux"
|
|
2475
2475
|
}, null),
|
|
2476
|
-
label: () =>
|
|
2477
|
-
}
|
|
2476
|
+
label: () => ctx.slots.default?.()
|
|
2477
|
+
};
|
|
2478
|
+
return () => {
|
|
2479
|
+
return createVNode(VCheckable, {
|
|
2480
|
+
"class": classes.value,
|
|
2481
|
+
"checked": nodeControl.selected || isIndeterminate.value,
|
|
2482
|
+
"invalid": nodeControl.invalid,
|
|
2483
|
+
"disabled": nodeControl.isDisabled,
|
|
2484
|
+
"readonly": nodeControl.isReadonly
|
|
2485
|
+
}, slots13);
|
|
2486
|
+
};
|
|
2478
2487
|
}
|
|
2479
2488
|
});
|
|
2480
2489
|
function _isSlot3(s) {
|
|
@@ -2503,38 +2512,33 @@ var VRadio = defineComponent({
|
|
|
2503
2512
|
...createControlProps()
|
|
2504
2513
|
},
|
|
2505
2514
|
emits: emits4,
|
|
2506
|
-
setup(
|
|
2507
|
-
const nodeControl = useFormSelectorItemControl(
|
|
2515
|
+
setup(props12, ctx) {
|
|
2516
|
+
const nodeControl = useFormSelectorItemControl(props12, ctx, {
|
|
2508
2517
|
nodeType: VUI_RADIO_SYMBOL,
|
|
2509
2518
|
parentNodeType: VUI_RADIO_GROUP_SYMBOL
|
|
2510
2519
|
});
|
|
2511
|
-
const control = useControl(
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
render() {
|
|
2518
|
-
const {
|
|
2519
|
-
selectorItemControl
|
|
2520
|
-
} = this;
|
|
2521
|
-
return createVNode(VCheckable, {
|
|
2522
|
-
"class": ["v-radio", {
|
|
2523
|
-
"v-radio--selected": selectorItemControl.selected
|
|
2524
|
-
}, this.classes],
|
|
2525
|
-
"checked": this.selected,
|
|
2526
|
-
"invalid": this.invalid,
|
|
2527
|
-
"disabled": this.isDisabled,
|
|
2528
|
-
"readonly": this.isReadonly
|
|
2529
|
-
}, {
|
|
2530
|
-
input: () => selectorItemControl.createInputElement({
|
|
2520
|
+
const control = useControl(props12);
|
|
2521
|
+
const classes = computed(() => ["v-radio", {
|
|
2522
|
+
"v-radio--selected": nodeControl.selected
|
|
2523
|
+
}, control.classes.value]);
|
|
2524
|
+
const slots13 = {
|
|
2525
|
+
input: () => nodeControl.createInputElement({
|
|
2531
2526
|
type: "radio"
|
|
2532
2527
|
}),
|
|
2533
2528
|
faux: () => createVNode("span", {
|
|
2534
2529
|
"class": "v-radio__faux"
|
|
2535
2530
|
}, null),
|
|
2536
|
-
label: () =>
|
|
2537
|
-
}
|
|
2531
|
+
label: () => ctx.slots.default?.()
|
|
2532
|
+
};
|
|
2533
|
+
return () => {
|
|
2534
|
+
return createVNode(VCheckable, {
|
|
2535
|
+
"class": classes.value,
|
|
2536
|
+
"checked": nodeControl.selected,
|
|
2537
|
+
"invalid": nodeControl.invalid,
|
|
2538
|
+
"disabled": nodeControl.isDisabled,
|
|
2539
|
+
"readonly": nodeControl.isReadonly
|
|
2540
|
+
}, slots13);
|
|
2541
|
+
};
|
|
2538
2542
|
}
|
|
2539
2543
|
});
|
|
2540
2544
|
function _isSlot4(s) {
|
|
@@ -2562,36 +2566,22 @@ var VSwitch = defineComponent({
|
|
|
2562
2566
|
...createControlProps()
|
|
2563
2567
|
},
|
|
2564
2568
|
emits: emits5,
|
|
2565
|
-
setup(
|
|
2566
|
-
const nodeControl = useFormSelectorItemControl(
|
|
2569
|
+
setup(props12, ctx) {
|
|
2570
|
+
const nodeControl = useFormSelectorItemControl(props12, ctx, {
|
|
2567
2571
|
nodeType: VUI_SWITCH_SYMBOL,
|
|
2568
2572
|
parentNodeType: VUI_SWITCH_GROUP_SYMBOL
|
|
2569
2573
|
});
|
|
2570
|
-
const control = useControl(
|
|
2574
|
+
const control = useControl(props12);
|
|
2571
2575
|
if (typeof window !== "undefined") {
|
|
2572
2576
|
window.yy = {};
|
|
2573
2577
|
window.yy[String(Date.now())] = nodeControl;
|
|
2574
2578
|
}
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
};
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
const {
|
|
2582
|
-
selectorItemControl
|
|
2583
|
-
} = this;
|
|
2584
|
-
return createVNode(VCheckable, {
|
|
2585
|
-
"class": ["v-switch", {
|
|
2586
|
-
"v-switch--selected": selectorItemControl.selected,
|
|
2587
|
-
"v-switch--disabled": selectorItemControl.isDisabled
|
|
2588
|
-
}, this.classes],
|
|
2589
|
-
"checked": this.selected,
|
|
2590
|
-
"invalid": this.invalid,
|
|
2591
|
-
"disabled": this.isDisabled,
|
|
2592
|
-
"readonly": this.isReadonly
|
|
2593
|
-
}, {
|
|
2594
|
-
input: () => selectorItemControl.createInputElement({
|
|
2579
|
+
const classes = computed(() => ["v-switch", {
|
|
2580
|
+
"v-switch--selected": nodeControl.selected,
|
|
2581
|
+
"v-switch--disabled": nodeControl.isDisabled
|
|
2582
|
+
}, control.classes.value]);
|
|
2583
|
+
const slots13 = {
|
|
2584
|
+
input: () => nodeControl.createInputElement({
|
|
2595
2585
|
type: "checkbox"
|
|
2596
2586
|
}),
|
|
2597
2587
|
icon: () => createVNode("span", {
|
|
@@ -2599,8 +2589,20 @@ var VSwitch = defineComponent({
|
|
|
2599
2589
|
}, [createVNode("span", {
|
|
2600
2590
|
"class": "v-switch__faux__pin"
|
|
2601
2591
|
}, null)]),
|
|
2602
|
-
label: () =>
|
|
2592
|
+
label: () => ctx.slots.default?.()
|
|
2593
|
+
};
|
|
2594
|
+
ctx.expose({
|
|
2595
|
+
control: nodeControl
|
|
2603
2596
|
});
|
|
2597
|
+
return () => {
|
|
2598
|
+
return createVNode(VCheckable, {
|
|
2599
|
+
"class": classes.value,
|
|
2600
|
+
"checked": nodeControl.selected,
|
|
2601
|
+
"invalid": nodeControl.invalid,
|
|
2602
|
+
"disabled": nodeControl.isDisabled,
|
|
2603
|
+
"readonly": nodeControl.isReadonly
|
|
2604
|
+
}, slots13);
|
|
2605
|
+
};
|
|
2604
2606
|
}
|
|
2605
2607
|
});
|
|
2606
2608
|
function _isSlot5(s) {
|
|
@@ -2629,12 +2631,12 @@ var VOption = defineComponent({
|
|
|
2629
2631
|
...createControlProps()
|
|
2630
2632
|
},
|
|
2631
2633
|
emits: emits6,
|
|
2632
|
-
setup(
|
|
2633
|
-
const nodeControl = useFormSelectorItemControl(
|
|
2634
|
+
setup(props12, ctx) {
|
|
2635
|
+
const nodeControl = useFormSelectorItemControl(props12, ctx, {
|
|
2634
2636
|
nodeType: VUI_OPTION_SYMBOL,
|
|
2635
2637
|
parentNodeType: VUI_SELECT_SYMBOL
|
|
2636
2638
|
});
|
|
2637
|
-
const control = useControl(
|
|
2639
|
+
const control = useControl(props12);
|
|
2638
2640
|
const classes = computed(() => {
|
|
2639
2641
|
return ["v-option", {
|
|
2640
2642
|
"v-option--selected": nodeControl.selected,
|
|
@@ -2642,26 +2644,17 @@ var VOption = defineComponent({
|
|
|
2642
2644
|
"v-option--disabled": nodeControl.isDisabled
|
|
2643
2645
|
}, control.classes.value];
|
|
2644
2646
|
});
|
|
2645
|
-
return {
|
|
2646
|
-
|
|
2647
|
-
|
|
2647
|
+
return () => {
|
|
2648
|
+
return createVNode("label", {
|
|
2649
|
+
"class": classes.value,
|
|
2650
|
+
"onClick": nodeControl.handleClickElement,
|
|
2651
|
+
"tabindex": nodeControl.tabindex,
|
|
2652
|
+
"data-value": nodeControl.propValue,
|
|
2653
|
+
"aria-disabled": nodeControl.isDisabled
|
|
2654
|
+
}, [createVNode("span", {
|
|
2655
|
+
"class": "v-option__label"
|
|
2656
|
+
}, [ctx.slots.default?.()])]);
|
|
2648
2657
|
};
|
|
2649
|
-
},
|
|
2650
|
-
render() {
|
|
2651
|
-
const {
|
|
2652
|
-
selectorItemControl,
|
|
2653
|
-
classes
|
|
2654
|
-
} = this;
|
|
2655
|
-
return createVNode("label", mergeProps({
|
|
2656
|
-
"class": classes,
|
|
2657
|
-
"onClick": selectorItemControl.handleClickElement,
|
|
2658
|
-
"tabindex": selectorItemControl.tabindex,
|
|
2659
|
-
"data-value": selectorItemControl.propValue
|
|
2660
|
-
}, {
|
|
2661
|
-
"aria-disabled": selectorItemControl.isDisabled
|
|
2662
|
-
}), [createVNode("span", {
|
|
2663
|
-
"class": "v-option__label"
|
|
2664
|
-
}, [this.$slots.default?.()])]);
|
|
2665
2658
|
}
|
|
2666
2659
|
});
|
|
2667
2660
|
var slots7 = defineSlots();
|
|
@@ -2674,36 +2667,29 @@ var VOptionGroup = defineComponent({
|
|
|
2674
2667
|
...slots7()
|
|
2675
2668
|
},
|
|
2676
2669
|
slots: slots7,
|
|
2677
|
-
setup(
|
|
2678
|
-
const groupControl = useFormSelectorItemGroupControl(
|
|
2670
|
+
setup(props12, ctx) {
|
|
2671
|
+
const groupControl = useFormSelectorItemGroupControl(props12, ctx, {
|
|
2679
2672
|
parentNodeType: VUI_SELECT_SYMBOL
|
|
2680
2673
|
});
|
|
2681
2674
|
const labelSlot = computed(() => {
|
|
2682
|
-
return resolveVNodeChildOrSlots(
|
|
2675
|
+
return resolveVNodeChildOrSlots(props12.label, ctx.slots.label);
|
|
2683
2676
|
});
|
|
2684
2677
|
const classes = computed(() => {
|
|
2685
2678
|
return ["v-option-group", {
|
|
2686
2679
|
"v-option-group--disabled": groupControl.isDisabled
|
|
2687
2680
|
}];
|
|
2688
2681
|
});
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2682
|
+
ctx.expose({
|
|
2683
|
+
control: groupControl
|
|
2684
|
+
});
|
|
2685
|
+
return () => {
|
|
2686
|
+
const label = labelSlot.value?.(groupControl);
|
|
2687
|
+
return createVNode("div", {
|
|
2688
|
+
"class": classes
|
|
2689
|
+
}, [!!label && createVNode("div", {
|
|
2690
|
+
"class": "v-option-group__label"
|
|
2691
|
+
}, [label]), ctx.slots.default?.()]);
|
|
2693
2692
|
};
|
|
2694
|
-
},
|
|
2695
|
-
render() {
|
|
2696
|
-
const {
|
|
2697
|
-
labelSlot,
|
|
2698
|
-
classes,
|
|
2699
|
-
groupControl
|
|
2700
|
-
} = this;
|
|
2701
|
-
const label = labelSlot ? labelSlot(groupControl) : void 0;
|
|
2702
|
-
return createVNode("div", {
|
|
2703
|
-
"class": classes
|
|
2704
|
-
}, [!!label && createVNode("div", {
|
|
2705
|
-
"class": "v-option-group__label"
|
|
2706
|
-
}, [label]), this.$slots.default?.()]);
|
|
2707
2693
|
}
|
|
2708
2694
|
});
|
|
2709
2695
|
function _isSlot6(s) {
|
|
@@ -2711,11 +2697,13 @@ function _isSlot6(s) {
|
|
|
2711
2697
|
}
|
|
2712
2698
|
var ARROW_KEY_TYPES = useKeyboard.Key(["ArrowUp", "ArrowDown"]);
|
|
2713
2699
|
var CHOICE_KEY_TYPES = useKeyboard.Key(["Enter", " "]);
|
|
2714
|
-
var
|
|
2700
|
+
var KEYBOARD_EVENT_TYPES = useKeyboard.Key([...ARROW_KEY_TYPES, ...CHOICE_KEY_TYPES]);
|
|
2715
2701
|
var {
|
|
2716
2702
|
props: props7,
|
|
2717
2703
|
emits: emits7
|
|
2718
|
-
} = createFormSelectorSettings(
|
|
2704
|
+
} = createFormSelectorSettings({
|
|
2705
|
+
defaultValidateTiming: "blur"
|
|
2706
|
+
});
|
|
2719
2707
|
var slots8 = defineSlots();
|
|
2720
2708
|
var VSelect = defineComponent({
|
|
2721
2709
|
name: "VSelect",
|
|
@@ -2735,7 +2723,7 @@ var VSelect = defineComponent({
|
|
|
2735
2723
|
},
|
|
2736
2724
|
slots: slots8,
|
|
2737
2725
|
emits: emits7,
|
|
2738
|
-
setup(
|
|
2726
|
+
setup(props12, ctx) {
|
|
2739
2727
|
const menuRef = ref(null);
|
|
2740
2728
|
const menuOpened = ref(false);
|
|
2741
2729
|
const showMenu = () => {
|
|
@@ -2744,23 +2732,23 @@ var VSelect = defineComponent({
|
|
|
2744
2732
|
const closeMenu = () => {
|
|
2745
2733
|
menuOpened.value = false;
|
|
2746
2734
|
};
|
|
2747
|
-
const inputControl = useFormSelectorControl(
|
|
2735
|
+
const inputControl = useFormSelectorControl(props12, ctx, {
|
|
2748
2736
|
nodeType: VUI_SELECT_SYMBOL,
|
|
2749
2737
|
onSelectItem: (item) => {
|
|
2750
2738
|
closeMenu();
|
|
2751
2739
|
}
|
|
2752
2740
|
});
|
|
2753
|
-
const control = useControl(
|
|
2754
|
-
useControlField(
|
|
2741
|
+
const control = useControl(props12);
|
|
2742
|
+
useControlField(props12);
|
|
2755
2743
|
const vui = useVui();
|
|
2756
2744
|
const iconName = vui.icon("menuDown");
|
|
2757
2745
|
const fieldRef = ref(null);
|
|
2758
2746
|
const loadingMessageRef = computed(() => {
|
|
2759
|
-
const slot = resolveVNodeChildOrSlots(
|
|
2747
|
+
const slot = resolveVNodeChildOrSlots(props12.loadingMessage, vui.setting("loadingMessage"), "Loading...");
|
|
2760
2748
|
return slot && slot(vui);
|
|
2761
2749
|
});
|
|
2762
2750
|
const failedToLoadItemsMessageRef = computed(() => {
|
|
2763
|
-
const slot = resolveVNodeChildOrSlots(
|
|
2751
|
+
const slot = resolveVNodeChildOrSlots(props12.failedToLoadItemsMessage, vui.setting("failedToLoadDataMessage"), "Failed to load data.");
|
|
2764
2752
|
return slot && slot(vui);
|
|
2765
2753
|
});
|
|
2766
2754
|
const focus = (opts) => {
|
|
@@ -2788,10 +2776,10 @@ var VSelect = defineComponent({
|
|
|
2788
2776
|
}) : item.renderDefaultSlot();
|
|
2789
2777
|
children.push(child);
|
|
2790
2778
|
});
|
|
2791
|
-
} else if (
|
|
2779
|
+
} else if (props12.placeholder != null) {
|
|
2792
2780
|
children.push(createVNode("span", {
|
|
2793
2781
|
"class": "v-select__placeholder"
|
|
2794
|
-
}, [
|
|
2782
|
+
}, [props12.placeholder]));
|
|
2795
2783
|
}
|
|
2796
2784
|
return children;
|
|
2797
2785
|
};
|
|
@@ -2894,94 +2882,110 @@ var VSelect = defineComponent({
|
|
|
2894
2882
|
return choiceKeyHandler(ev);
|
|
2895
2883
|
};
|
|
2896
2884
|
useKeyboard([{
|
|
2897
|
-
key:
|
|
2885
|
+
key: KEYBOARD_EVENT_TYPES,
|
|
2898
2886
|
handler: keyboardEventHandler
|
|
2899
2887
|
}], {
|
|
2900
2888
|
autorun: true
|
|
2901
2889
|
});
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
...control,
|
|
2905
|
-
iconName,
|
|
2906
|
-
menuOpened,
|
|
2907
|
-
fieldRef: () => fieldRef,
|
|
2890
|
+
ctx.expose({
|
|
2891
|
+
control: inputControl,
|
|
2908
2892
|
focus,
|
|
2909
2893
|
showMenu,
|
|
2910
|
-
closeMenu
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2894
|
+
closeMenu
|
|
2895
|
+
});
|
|
2896
|
+
const handleClickLabel = (ev) => {
|
|
2897
|
+
focus();
|
|
2914
2898
|
};
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
default: () => item.label(selectorControl)
|
|
2937
|
-
}))) ? _slot : {
|
|
2938
|
-
default: () => [_slot]
|
|
2899
|
+
return () => {
|
|
2900
|
+
const children = ctx.slots.default?.() || [];
|
|
2901
|
+
const propGroups = inputControl.propGroups.map((group) => {
|
|
2902
|
+
let _slot2;
|
|
2903
|
+
return createVNode(VOptionGroup, {
|
|
2904
|
+
"key": group.id,
|
|
2905
|
+
"groupId": group.id,
|
|
2906
|
+
"label": group.label(inputControl),
|
|
2907
|
+
"disabled": group.disabled
|
|
2908
|
+
}, _isSlot6(_slot2 = group.items.map((item) => {
|
|
2909
|
+
let _slot;
|
|
2910
|
+
return createVNode(VOption, {
|
|
2911
|
+
"disabled": item.disabled,
|
|
2912
|
+
"value": item.value,
|
|
2913
|
+
"key": item.value
|
|
2914
|
+
}, _isSlot6(_slot = item.label(inputControl)) ? _slot : {
|
|
2915
|
+
default: () => [_slot]
|
|
2916
|
+
});
|
|
2917
|
+
})) ? _slot2 : {
|
|
2918
|
+
default: () => [_slot2]
|
|
2919
|
+
});
|
|
2939
2920
|
});
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
"
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
"
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2921
|
+
const classes = computed(() => ["v-select", control.classes.value, {
|
|
2922
|
+
"v-select--multiple": inputControl.multiple
|
|
2923
|
+
}]);
|
|
2924
|
+
const controlDefaultSlot = () => {
|
|
2925
|
+
return [withDirectives(createVNode("select", {
|
|
2926
|
+
"class": "v-select__input__element",
|
|
2927
|
+
"name": inputControl.name,
|
|
2928
|
+
"tabindex": inputControl.tabindex,
|
|
2929
|
+
"disabled": inputControl.isDisabled,
|
|
2930
|
+
"multiple": inputControl.multiple,
|
|
2931
|
+
"onFocus": inputControl.focusHandler,
|
|
2932
|
+
"onBlur": inputControl.blurHandler,
|
|
2933
|
+
"onUpdate:modelValue": ($event) => inputControl.value = $event
|
|
2934
|
+
}, [inputControl.items.map((item) => {
|
|
2935
|
+
return createVNode("option", {
|
|
2936
|
+
"value": item.propValue,
|
|
2937
|
+
"key": item.propValue
|
|
2938
|
+
}, [item.renderDefaultSlot()]);
|
|
2939
|
+
})]), [[vModelSelect, inputControl.value]]), createVNode("div", {
|
|
2940
|
+
"class": "v-select__selections"
|
|
2941
|
+
}, [createVNode("div", {
|
|
2942
|
+
"class": "v-select__selections__inner"
|
|
2943
|
+
}, [renderSelections(inputControl.selectedItems)])])];
|
|
2944
|
+
};
|
|
2945
|
+
const endAdornmentSlot = () => {
|
|
2946
|
+
if (inputControl.itemsLoadFailed) {
|
|
2947
|
+
return createVNode(VButton, {
|
|
2948
|
+
"key": "reload",
|
|
2949
|
+
"icon": vui.icon("reload"),
|
|
2950
|
+
"rounded": true,
|
|
2951
|
+
"onClick": (ev) => {
|
|
2952
|
+
ev.stopPropagation();
|
|
2953
|
+
inputControl.loadItems();
|
|
2954
|
+
}
|
|
2955
|
+
}, null);
|
|
2956
|
+
}
|
|
2957
|
+
if (props12.clearable && inputControl.value != null) {
|
|
2958
|
+
return createVNode(VButton, {
|
|
2959
|
+
"key": "clear",
|
|
2960
|
+
"icon": vui.icon("clear"),
|
|
2961
|
+
"rounded": true,
|
|
2962
|
+
"onClick": (ev) => {
|
|
2963
|
+
ev.stopPropagation();
|
|
2964
|
+
inputControl.clear();
|
|
2965
|
+
}
|
|
2966
|
+
}, null);
|
|
2967
|
+
}
|
|
2968
|
+
return createVNode(VIcon, {
|
|
2969
|
+
"key": "icon",
|
|
2970
|
+
"name": iconName,
|
|
2971
|
+
"rotate": menuOpened.value ? 180 : 0
|
|
2972
|
+
}, null);
|
|
2973
|
+
};
|
|
2974
|
+
const menuActivatorSlot = ({
|
|
2975
|
+
control: menu
|
|
2976
|
+
}) => {
|
|
2977
|
+
return createVNode(VControlField, {
|
|
2974
2978
|
"class": "v-select__input",
|
|
2975
|
-
"ref":
|
|
2976
|
-
"loading":
|
|
2977
|
-
"error":
|
|
2978
|
-
"startAdornment":
|
|
2979
|
-
"endAdornment":
|
|
2980
|
-
"size":
|
|
2981
|
-
"focused":
|
|
2982
|
-
"autoHeight":
|
|
2979
|
+
"ref": fieldRef,
|
|
2980
|
+
"loading": inputControl.itemsLoading,
|
|
2981
|
+
"error": inputControl.itemsLoadFailed,
|
|
2982
|
+
"startAdornment": props12.startAdornment,
|
|
2983
|
+
"endAdornment": props12.endAdornment,
|
|
2984
|
+
"size": control.size.value,
|
|
2985
|
+
"focused": menuOpened.value,
|
|
2986
|
+
"autoHeight": inputControl.multiple,
|
|
2983
2987
|
"onClick": (ev) => {
|
|
2984
|
-
if (
|
|
2988
|
+
if (inputControl.canOperation && !menu.isActive) {
|
|
2985
2989
|
let t = ev.target;
|
|
2986
2990
|
const count = 0;
|
|
2987
2991
|
let hit = false;
|
|
@@ -2992,62 +2996,48 @@ var VSelect = defineComponent({
|
|
|
2992
2996
|
}
|
|
2993
2997
|
t = t.parentElement;
|
|
2994
2998
|
}
|
|
2995
|
-
|
|
2999
|
+
menu.setActivator(hit ? t : ev).show();
|
|
2996
3000
|
}
|
|
2997
3001
|
}
|
|
2998
3002
|
}, {
|
|
2999
|
-
...
|
|
3000
|
-
default:
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
ev.stopPropagation();
|
|
3038
|
-
this.nodeControl.clear();
|
|
3039
|
-
}
|
|
3040
|
-
}, null);
|
|
3041
|
-
}
|
|
3042
|
-
return createVNode(VIcon, {
|
|
3043
|
-
"key": "icon",
|
|
3044
|
-
"name": this.iconName,
|
|
3045
|
-
"rotate": this.menuOpened ? 180 : 0
|
|
3046
|
-
}, null);
|
|
3047
|
-
}
|
|
3048
|
-
})]
|
|
3049
|
-
})
|
|
3050
|
-
});
|
|
3003
|
+
...ctx.slots,
|
|
3004
|
+
default: controlDefaultSlot,
|
|
3005
|
+
endAdornment: endAdornmentSlot
|
|
3006
|
+
});
|
|
3007
|
+
};
|
|
3008
|
+
const menuSlots = {
|
|
3009
|
+
activator: menuActivatorSlot,
|
|
3010
|
+
default: () => createVNode("div", {
|
|
3011
|
+
"class": ["v-select__body", control.classes.value]
|
|
3012
|
+
}, [children, propGroups])
|
|
3013
|
+
};
|
|
3014
|
+
const defaultSlot = () => {
|
|
3015
|
+
return createVNode(VMenu, {
|
|
3016
|
+
"width": "fit",
|
|
3017
|
+
"maxWidth": "fit",
|
|
3018
|
+
"closeOnNavigation": props12.closeOnNavigation,
|
|
3019
|
+
"distance": 0,
|
|
3020
|
+
"alwaysRender": true,
|
|
3021
|
+
"modelValue": menuOpened.value,
|
|
3022
|
+
"onUpdate:modelValue": ($event) => menuOpened.value = $event,
|
|
3023
|
+
"ref": menuRef,
|
|
3024
|
+
"onClose": clearKeyFocused
|
|
3025
|
+
}, menuSlots);
|
|
3026
|
+
};
|
|
3027
|
+
return createVNode(VFormControl, {
|
|
3028
|
+
"nodeControl": inputControl,
|
|
3029
|
+
"class": classes.value,
|
|
3030
|
+
"label": props12.label,
|
|
3031
|
+
"hint": props12.hint,
|
|
3032
|
+
"hinttip": props12.hinttip,
|
|
3033
|
+
"hiddenInfo": props12.hiddenInfo,
|
|
3034
|
+
"requiredChip": props12.requiredChip,
|
|
3035
|
+
"onClickLabel": handleClickLabel
|
|
3036
|
+
}, {
|
|
3037
|
+
...ctx.slots,
|
|
3038
|
+
default: defaultSlot
|
|
3039
|
+
});
|
|
3040
|
+
};
|
|
3051
3041
|
}
|
|
3052
3042
|
});
|
|
3053
3043
|
var {
|
|
@@ -3070,52 +3060,57 @@ var VTextField = defineComponent({
|
|
|
3070
3060
|
props: createTextFieldProps(),
|
|
3071
3061
|
emits: emits8,
|
|
3072
3062
|
slots: slots9,
|
|
3073
|
-
setup(
|
|
3074
|
-
const inputControl = useTextInputControl(
|
|
3063
|
+
setup(props12, ctx) {
|
|
3064
|
+
const inputControl = useTextInputControl(props12, ctx, {
|
|
3075
3065
|
nodeType: VUI_TEXT_FIELD_SYMBOL
|
|
3076
3066
|
});
|
|
3077
|
-
const control = useControl(
|
|
3078
|
-
useControlField(
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3067
|
+
const control = useControl(props12);
|
|
3068
|
+
useControlField(props12);
|
|
3069
|
+
const classes = computed(() => ["v-text-field", control.classes.value]);
|
|
3070
|
+
const handleClickLabel = (ev) => {
|
|
3071
|
+
inputControl.focus();
|
|
3082
3072
|
};
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
return createVNode(VFormControl, {
|
|
3086
|
-
"nodeControl": this.nodeControl,
|
|
3087
|
-
"focused": this.nodeControl.focused,
|
|
3088
|
-
"hiddenInfo": this.hiddenInfo,
|
|
3089
|
-
"class": ["v-text-field", this.classes],
|
|
3090
|
-
"label": this.label,
|
|
3091
|
-
"hint": this.hint,
|
|
3092
|
-
"hinttip": this.hinttip,
|
|
3093
|
-
"requiredChip": this.requiredChip,
|
|
3094
|
-
"onClickLabel": (ev) => {
|
|
3095
|
-
this.focus();
|
|
3096
|
-
}
|
|
3097
|
-
}, {
|
|
3098
|
-
...this.$slots,
|
|
3099
|
-
default: () => createVNode(VControlField, {
|
|
3073
|
+
const defaultSlot = () => {
|
|
3074
|
+
return createVNode(VControlField, {
|
|
3100
3075
|
"class": "v-text-field__input",
|
|
3101
|
-
"startAdornment":
|
|
3102
|
-
"endAdornment":
|
|
3103
|
-
"size":
|
|
3076
|
+
"startAdornment": props12.startAdornment,
|
|
3077
|
+
"endAdornment": props12.endAdornment,
|
|
3078
|
+
"size": control.size.value
|
|
3104
3079
|
}, {
|
|
3105
|
-
...
|
|
3106
|
-
default: () =>
|
|
3080
|
+
...ctx.slots,
|
|
3081
|
+
default: () => inputControl.createInputElement({
|
|
3107
3082
|
class: "v-text-field__input__element"
|
|
3108
3083
|
})
|
|
3109
|
-
})
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
return
|
|
3117
|
-
|
|
3084
|
+
});
|
|
3085
|
+
};
|
|
3086
|
+
const infoAppendsSlot = () => {
|
|
3087
|
+
const {
|
|
3088
|
+
counterResult
|
|
3089
|
+
} = inputControl;
|
|
3090
|
+
if (!counterResult)
|
|
3091
|
+
return;
|
|
3092
|
+
return createVNode(VTextCounter, counterResult, null);
|
|
3093
|
+
};
|
|
3094
|
+
ctx.expose({
|
|
3095
|
+
control: inputControl
|
|
3118
3096
|
});
|
|
3097
|
+
return () => {
|
|
3098
|
+
return createVNode(VFormControl, {
|
|
3099
|
+
"nodeControl": inputControl,
|
|
3100
|
+
"focused": inputControl.focused,
|
|
3101
|
+
"hiddenInfo": props12.hiddenInfo,
|
|
3102
|
+
"class": classes.value,
|
|
3103
|
+
"label": props12.label,
|
|
3104
|
+
"hint": props12.hint,
|
|
3105
|
+
"hinttip": props12.hinttip,
|
|
3106
|
+
"requiredChip": props12.requiredChip,
|
|
3107
|
+
"onClickLabel": handleClickLabel
|
|
3108
|
+
}, {
|
|
3109
|
+
...ctx.slots,
|
|
3110
|
+
default: defaultSlot,
|
|
3111
|
+
infoAppends: infoAppendsSlot
|
|
3112
|
+
});
|
|
3113
|
+
};
|
|
3119
3114
|
}
|
|
3120
3115
|
});
|
|
3121
3116
|
var toString = (value) => {
|
|
@@ -3146,7 +3141,7 @@ var VNumberField = defineComponent({
|
|
|
3146
3141
|
"update:modelValue": (value) => true,
|
|
3147
3142
|
change: (value) => true
|
|
3148
3143
|
},
|
|
3149
|
-
setup(
|
|
3144
|
+
setup(props12, ctx) {
|
|
3150
3145
|
const hasNumberMask = computed(() => {
|
|
3151
3146
|
const {
|
|
3152
3147
|
mask
|
|
@@ -3172,7 +3167,7 @@ var VNumberField = defineComponent({
|
|
|
3172
3167
|
"type": hasNumberMask.value ? "text" : "number",
|
|
3173
3168
|
"inputmode": inputmode.value,
|
|
3174
3169
|
"maskModel": "typed",
|
|
3175
|
-
"modelValue": toString(
|
|
3170
|
+
"modelValue": toString(props12.modelValue),
|
|
3176
3171
|
"onUpdate:modelValue": onUpdateModelValue,
|
|
3177
3172
|
"onChange": onChange
|
|
3178
3173
|
}), ctx.slots);
|
|
@@ -3195,87 +3190,111 @@ var VTextarea = defineComponent({
|
|
|
3195
3190
|
...slots10()
|
|
3196
3191
|
},
|
|
3197
3192
|
emits: emits9,
|
|
3198
|
-
setup(
|
|
3193
|
+
setup(props12, ctx) {
|
|
3199
3194
|
const vui = useVui();
|
|
3200
|
-
const inputControl = useTextareaControl(
|
|
3195
|
+
const inputControl = useTextareaControl(props12, ctx, {
|
|
3201
3196
|
nodeType: VUI_TEXTAREA_SYMBOL,
|
|
3202
3197
|
defaultRows: vui.textareaRows
|
|
3203
3198
|
});
|
|
3204
|
-
const control = useControl(
|
|
3205
|
-
useControlField(
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
render() {
|
|
3212
|
-
return createVNode(VFormControl, {
|
|
3213
|
-
"nodeControl": this.nodeControl,
|
|
3214
|
-
"focused": this.nodeControl.focused,
|
|
3215
|
-
"class": ["v-textarea", this.classes],
|
|
3216
|
-
"label": this.label,
|
|
3217
|
-
"hint": this.hint,
|
|
3218
|
-
"hinttip": this.hinttip,
|
|
3219
|
-
"hiddenInfo": this.hiddenInfo,
|
|
3220
|
-
"requiredChip": this.requiredChip,
|
|
3221
|
-
"onClickLabel": (ev) => {
|
|
3222
|
-
this.focus();
|
|
3223
|
-
}
|
|
3224
|
-
}, {
|
|
3225
|
-
...this.$slots,
|
|
3226
|
-
default: () => createVNode(VControlField, {
|
|
3199
|
+
const control = useControl(props12);
|
|
3200
|
+
useControlField(props12);
|
|
3201
|
+
ctx.expose({
|
|
3202
|
+
control: inputControl
|
|
3203
|
+
});
|
|
3204
|
+
const defaultSlot = () => {
|
|
3205
|
+
return createVNode(VControlField, {
|
|
3227
3206
|
"class": "v-textarea__input",
|
|
3228
|
-
"size":
|
|
3207
|
+
"size": control.size.value,
|
|
3229
3208
|
"autoHeight": true,
|
|
3230
|
-
"startAdornment":
|
|
3231
|
-
"endAdornment":
|
|
3209
|
+
"startAdornment": props12.startAdornment,
|
|
3210
|
+
"endAdornment": props12.endAdornment
|
|
3232
3211
|
}, {
|
|
3233
|
-
...
|
|
3234
|
-
default: () =>
|
|
3212
|
+
...ctx.slots,
|
|
3213
|
+
default: () => inputControl.createInputElement({
|
|
3235
3214
|
class: "v-textarea__input__element"
|
|
3236
3215
|
})
|
|
3237
|
-
})
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
return
|
|
3245
|
-
|
|
3246
|
-
}
|
|
3216
|
+
});
|
|
3217
|
+
};
|
|
3218
|
+
const infoAppendsSlot = () => {
|
|
3219
|
+
const {
|
|
3220
|
+
counterResult
|
|
3221
|
+
} = inputControl;
|
|
3222
|
+
if (!counterResult)
|
|
3223
|
+
return;
|
|
3224
|
+
return createVNode(VTextCounter, counterResult, null);
|
|
3225
|
+
};
|
|
3226
|
+
return () => {
|
|
3227
|
+
return createVNode(VFormControl, {
|
|
3228
|
+
"nodeControl": inputControl,
|
|
3229
|
+
"focused": inputControl.focused,
|
|
3230
|
+
"class": ["v-textarea", control.classes.value],
|
|
3231
|
+
"label": props12.label,
|
|
3232
|
+
"hint": props12.hint,
|
|
3233
|
+
"hinttip": props12.hinttip,
|
|
3234
|
+
"hiddenInfo": props12.hiddenInfo,
|
|
3235
|
+
"requiredChip": props12.requiredChip,
|
|
3236
|
+
"onClickLabel": (ev) => {
|
|
3237
|
+
inputControl.focus();
|
|
3238
|
+
}
|
|
3239
|
+
}, {
|
|
3240
|
+
...ctx.slots,
|
|
3241
|
+
default: defaultSlot,
|
|
3242
|
+
infoAppends: infoAppendsSlot
|
|
3243
|
+
});
|
|
3244
|
+
};
|
|
3247
3245
|
}
|
|
3248
3246
|
});
|
|
3249
3247
|
var {
|
|
3250
3248
|
props: props10,
|
|
3251
3249
|
emits: emits10
|
|
3250
|
+
} = createFormGroupSettings();
|
|
3251
|
+
var formGroupSlots = defineSlots();
|
|
3252
|
+
function createVFormGroupProps() {
|
|
3253
|
+
return {
|
|
3254
|
+
...props10,
|
|
3255
|
+
...createControlProps(),
|
|
3256
|
+
...formGroupSlots()
|
|
3257
|
+
};
|
|
3258
|
+
}
|
|
3259
|
+
var VFormGroup = defineComponent({
|
|
3260
|
+
name: "VFormGroup",
|
|
3261
|
+
inheritAttrs: false,
|
|
3262
|
+
props: createVFormGroupProps(),
|
|
3263
|
+
emits: emits10,
|
|
3264
|
+
slots: formGroupSlots,
|
|
3265
|
+
setup(props12, ctx) {
|
|
3266
|
+
const nodeControl = useFormGroup(props12, ctx, {
|
|
3267
|
+
nodeType: VUI_FORM_GROUP_SYMBOL
|
|
3268
|
+
});
|
|
3269
|
+
useControl(props12);
|
|
3270
|
+
ctx.expose({
|
|
3271
|
+
control: nodeControl
|
|
3272
|
+
});
|
|
3273
|
+
return () => ctx.slots.default?.(nodeControl);
|
|
3274
|
+
}
|
|
3275
|
+
});
|
|
3276
|
+
var {
|
|
3277
|
+
props: props11,
|
|
3278
|
+
emits: emits11
|
|
3252
3279
|
} = createFormSettings({
|
|
3253
3280
|
nodeType: VUI_FORM_SYMBOL
|
|
3254
3281
|
});
|
|
3255
3282
|
var formSlots = defineSlots();
|
|
3256
3283
|
function createVFormProps() {
|
|
3257
3284
|
return {
|
|
3258
|
-
...
|
|
3285
|
+
...props11,
|
|
3259
3286
|
...createControlProps(),
|
|
3260
3287
|
...formSlots()
|
|
3261
|
-
// disableAutoScroll: Boolean,
|
|
3262
3288
|
};
|
|
3263
3289
|
}
|
|
3264
3290
|
var VForm = defineComponent({
|
|
3265
3291
|
name: "VForm",
|
|
3266
3292
|
props: createVFormProps(),
|
|
3267
|
-
emits:
|
|
3293
|
+
emits: emits11,
|
|
3268
3294
|
slots: formSlots,
|
|
3269
|
-
setup(
|
|
3270
|
-
const
|
|
3271
|
-
|
|
3272
|
-
nodeType: VUI_FORM_SYMBOL,
|
|
3273
|
-
scrollToElement: (el) => {
|
|
3274
|
-
const scroller = getDocumentScroller();
|
|
3275
|
-
return scroller.toElement(el, {
|
|
3276
|
-
offset: vui.getAutoScrollToElementOffsetTop()
|
|
3277
|
-
});
|
|
3278
|
-
}
|
|
3295
|
+
setup(props12, ctx) {
|
|
3296
|
+
const nodeControl = useForm(props12, ctx, {
|
|
3297
|
+
nodeType: VUI_FORM_SYMBOL
|
|
3279
3298
|
});
|
|
3280
3299
|
const classes = computed(() => {
|
|
3281
3300
|
return ["v-form", {
|
|
@@ -3287,23 +3306,17 @@ var VForm = defineComponent({
|
|
|
3287
3306
|
"v-form--sending": nodeControl.sending
|
|
3288
3307
|
}];
|
|
3289
3308
|
});
|
|
3290
|
-
useControl(
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
"ref": this.formRef(),
|
|
3302
|
-
"class": this.classes,
|
|
3303
|
-
"action": this.nativeAction,
|
|
3304
|
-
"spellcheck": this.spellcheck,
|
|
3305
|
-
"onSubmit": form.handleSubmit
|
|
3306
|
-
}, [this.$slots.default?.(form)]);
|
|
3309
|
+
useControl(props12);
|
|
3310
|
+
ctx.expose({
|
|
3311
|
+
control: nodeControl
|
|
3312
|
+
});
|
|
3313
|
+
return () => createVNode("form", {
|
|
3314
|
+
"ref": nodeControl.formRef(),
|
|
3315
|
+
"class": classes.value,
|
|
3316
|
+
"action": nodeControl.nativeAction,
|
|
3317
|
+
"spellcheck": nodeControl.spellcheck,
|
|
3318
|
+
"onSubmit": nodeControl.handleSubmit
|
|
3319
|
+
}, [ctx.slots.default?.(nodeControl)]);
|
|
3307
3320
|
}
|
|
3308
3321
|
});
|
|
3309
3322
|
function _isSlot7(s) {
|
|
@@ -3323,13 +3336,13 @@ var VTab = defineComponent({
|
|
|
3323
3336
|
emits: {
|
|
3324
3337
|
click: (ev) => true
|
|
3325
3338
|
},
|
|
3326
|
-
setup(
|
|
3339
|
+
setup(props12, ctx) {
|
|
3327
3340
|
const classesRef = computed(() => ({
|
|
3328
|
-
"v-tab--active":
|
|
3341
|
+
"v-tab--active": props12.active
|
|
3329
3342
|
}));
|
|
3330
3343
|
const exposeValues = {
|
|
3331
|
-
value:
|
|
3332
|
-
active:
|
|
3344
|
+
value: props12.value,
|
|
3345
|
+
active: props12.active
|
|
3333
3346
|
};
|
|
3334
3347
|
ctx.expose(exposeValues);
|
|
3335
3348
|
return () => {
|
|
@@ -3338,7 +3351,7 @@ var VTab = defineComponent({
|
|
|
3338
3351
|
value,
|
|
3339
3352
|
icon,
|
|
3340
3353
|
active
|
|
3341
|
-
} =
|
|
3354
|
+
} = props12;
|
|
3342
3355
|
const classes = ["v-tab", classesRef.value];
|
|
3343
3356
|
const children = createVNode("span", {
|
|
3344
3357
|
"class": "v-tab__content"
|
|
@@ -3407,7 +3420,7 @@ var VTabs = defineComponent({
|
|
|
3407
3420
|
change: (newValue) => true
|
|
3408
3421
|
},
|
|
3409
3422
|
slots: slots11,
|
|
3410
|
-
setup(
|
|
3423
|
+
setup(props12, ctx) {
|
|
3411
3424
|
const vui = useVui();
|
|
3412
3425
|
const internalValueRef = ref(null);
|
|
3413
3426
|
const ScrollerRef = VScroller.$ref();
|
|
@@ -3425,15 +3438,15 @@ var VTabs = defineComponent({
|
|
|
3425
3438
|
}
|
|
3426
3439
|
});
|
|
3427
3440
|
const colorScope = useScopeColorClass({
|
|
3428
|
-
color: () =>
|
|
3441
|
+
color: () => props12.color || vui.setting("tabDefault").color
|
|
3429
3442
|
});
|
|
3430
3443
|
const classes = computed(() => [colorScope.value.className]);
|
|
3431
3444
|
const computedItemsRef = computed(() => {
|
|
3432
3445
|
const current = currentRef.value;
|
|
3433
3446
|
const {
|
|
3434
3447
|
router
|
|
3435
|
-
} =
|
|
3436
|
-
return
|
|
3448
|
+
} = props12;
|
|
3449
|
+
return props12.items.map((item) => {
|
|
3437
3450
|
const {
|
|
3438
3451
|
value
|
|
3439
3452
|
} = item;
|
|
@@ -3458,9 +3471,9 @@ var VTabs = defineComponent({
|
|
|
3458
3471
|
tabRefs.value.push(ref10);
|
|
3459
3472
|
};
|
|
3460
3473
|
function setupInternalValue(routable) {
|
|
3461
|
-
let value =
|
|
3474
|
+
let value = props12.modelValue;
|
|
3462
3475
|
if (value == null || value === "") {
|
|
3463
|
-
const firstItem =
|
|
3476
|
+
const firstItem = props12.items[0];
|
|
3464
3477
|
if (!firstItem)
|
|
3465
3478
|
return;
|
|
3466
3479
|
value = firstItem.value;
|
|
@@ -3470,7 +3483,7 @@ var VTabs = defineComponent({
|
|
|
3470
3483
|
if (routable) {
|
|
3471
3484
|
const {
|
|
3472
3485
|
router
|
|
3473
|
-
} =
|
|
3486
|
+
} = props12;
|
|
3474
3487
|
if (!router)
|
|
3475
3488
|
return;
|
|
3476
3489
|
const hit = computedItemsRef.value.find((item) => item.value === value);
|
|
@@ -3488,7 +3501,7 @@ var VTabs = defineComponent({
|
|
|
3488
3501
|
if (route.fullPath === vui.location.currentRoute.fullPath)
|
|
3489
3502
|
return;
|
|
3490
3503
|
vui.router[to2.replace ? "replace" : "push"](to2);
|
|
3491
|
-
} else if (!
|
|
3504
|
+
} else if (!props12.router && props12.modelValue !== value) {
|
|
3492
3505
|
ctx.emit("update:modelValue", value);
|
|
3493
3506
|
ctx.emit("change", value);
|
|
3494
3507
|
}
|
|
@@ -3503,7 +3516,7 @@ var VTabs = defineComponent({
|
|
|
3503
3516
|
}
|
|
3504
3517
|
const {
|
|
3505
3518
|
onBeforeChange
|
|
3506
|
-
} =
|
|
3519
|
+
} = props12;
|
|
3507
3520
|
if (onBeforeChange) {
|
|
3508
3521
|
let result = onBeforeChange(value, currentRef.value);
|
|
3509
3522
|
if (isPromise(result)) {
|
|
@@ -3531,15 +3544,15 @@ var VTabs = defineComponent({
|
|
|
3531
3544
|
const $tab = tab.$el;
|
|
3532
3545
|
if (!$tab)
|
|
3533
3546
|
return;
|
|
3534
|
-
const
|
|
3535
|
-
if (!
|
|
3547
|
+
const scroller2 = ScrollerRef.instance;
|
|
3548
|
+
if (!scroller2)
|
|
3536
3549
|
return;
|
|
3537
|
-
const container =
|
|
3550
|
+
const container = scroller2.scroller.element();
|
|
3538
3551
|
if (!container)
|
|
3539
3552
|
return;
|
|
3540
3553
|
const {
|
|
3541
3554
|
autoScrollOffset
|
|
3542
|
-
} =
|
|
3555
|
+
} = props12;
|
|
3543
3556
|
const tabLeft = $tab.offsetLeft;
|
|
3544
3557
|
const tabWidth = $tab.offsetWidth;
|
|
3545
3558
|
const tabRight = tabLeft + tabWidth;
|
|
@@ -3564,22 +3577,22 @@ var VTabs = defineComponent({
|
|
|
3564
3577
|
}
|
|
3565
3578
|
if (Math.abs(scrollAmount) > 0) {
|
|
3566
3579
|
cancelScroll();
|
|
3567
|
-
scrollResult =
|
|
3580
|
+
scrollResult = scroller2.scroller.by(scrollAmount, 0, {
|
|
3568
3581
|
duration: 150
|
|
3569
3582
|
});
|
|
3570
3583
|
}
|
|
3571
3584
|
}
|
|
3572
|
-
watch(() =>
|
|
3573
|
-
watch(() =>
|
|
3585
|
+
watch(() => props12.modelValue, () => setupInternalValue(true));
|
|
3586
|
+
watch(() => props12.items, () => setupInternalValue(), {
|
|
3574
3587
|
deep: true
|
|
3575
3588
|
});
|
|
3576
3589
|
watch(() => internalValueRef.value, (newValue) => {
|
|
3577
3590
|
scrollToTab(newValue);
|
|
3578
3591
|
});
|
|
3579
3592
|
vui.location.watchRoute((route) => {
|
|
3580
|
-
if (!
|
|
3593
|
+
if (!props12.router)
|
|
3581
3594
|
return;
|
|
3582
|
-
const path =
|
|
3595
|
+
const path = props12.withQuery ? route.fullPath : route.path;
|
|
3583
3596
|
const hit = computedItemsRef.value.find(({
|
|
3584
3597
|
location
|
|
3585
3598
|
}) => {
|
|
@@ -3662,10 +3675,10 @@ var VBreadcrumbs = defineComponent({
|
|
|
3662
3675
|
},
|
|
3663
3676
|
divider: [String, Function]
|
|
3664
3677
|
},
|
|
3665
|
-
setup(
|
|
3678
|
+
setup(props12, ctx) {
|
|
3666
3679
|
const vui = useVui();
|
|
3667
3680
|
const computedItemsRef = computed(() => {
|
|
3668
|
-
const items =
|
|
3681
|
+
const items = props12.items.map((rawItem) => {
|
|
3669
3682
|
return typeof rawItem === "string" ? {
|
|
3670
3683
|
text: rawItem
|
|
3671
3684
|
} : rawItem;
|
|
@@ -3695,7 +3708,7 @@ var VBreadcrumbs = defineComponent({
|
|
|
3695
3708
|
if (lengthRef.value < 1)
|
|
3696
3709
|
return;
|
|
3697
3710
|
let dividerSlot;
|
|
3698
|
-
const propDivider =
|
|
3711
|
+
const propDivider = props12.divider;
|
|
3699
3712
|
if (propDivider) {
|
|
3700
3713
|
dividerSlot = typeof propDivider === "function" ? propDivider : () => propDivider;
|
|
3701
3714
|
} else {
|
|
@@ -3767,12 +3780,12 @@ var VContentSwitcher = defineComponent({
|
|
|
3767
3780
|
emits: {
|
|
3768
3781
|
"update:modelValue": (modelValue) => true
|
|
3769
3782
|
},
|
|
3770
|
-
setup(
|
|
3783
|
+
setup(props12, ctx) {
|
|
3771
3784
|
const internalValueRef = ref("");
|
|
3772
3785
|
const transitionRef = ref("");
|
|
3773
3786
|
const elRef = ref(null);
|
|
3774
3787
|
const anchorRef = ref(null);
|
|
3775
|
-
const computedOrderRef = computed(() =>
|
|
3788
|
+
const computedOrderRef = computed(() => props12.order.map((row) => {
|
|
3776
3789
|
return typeof row === "string" ? row : row.value;
|
|
3777
3790
|
}));
|
|
3778
3791
|
const currentRef = computed({
|
|
@@ -3787,7 +3800,7 @@ var VContentSwitcher = defineComponent({
|
|
|
3787
3800
|
const autotopSettingsRef = computed(() => {
|
|
3788
3801
|
let {
|
|
3789
3802
|
autotop: settings
|
|
3790
|
-
} =
|
|
3803
|
+
} = props12;
|
|
3791
3804
|
if (settings === true)
|
|
3792
3805
|
settings = {};
|
|
3793
3806
|
if (!settings)
|
|
@@ -3812,7 +3825,7 @@ var VContentSwitcher = defineComponent({
|
|
|
3812
3825
|
}
|
|
3813
3826
|
return el;
|
|
3814
3827
|
}
|
|
3815
|
-
watch(() =>
|
|
3828
|
+
watch(() => props12.modelValue, (value, beforeValue) => {
|
|
3816
3829
|
if (value == null)
|
|
3817
3830
|
return;
|
|
3818
3831
|
internalValueRef.value = value;
|
|
@@ -3834,7 +3847,7 @@ var VContentSwitcher = defineComponent({
|
|
|
3834
3847
|
});
|
|
3835
3848
|
watch(currentRef, () => {
|
|
3836
3849
|
const autotopSettings = autotopSettingsRef.value;
|
|
3837
|
-
if (autotopSettings &&
|
|
3850
|
+
if (autotopSettings && props12.modelValue != null) {
|
|
3838
3851
|
seeTop(autotopSettings);
|
|
3839
3852
|
}
|
|
3840
3853
|
});
|
|
@@ -3993,27 +4006,27 @@ var VDataTable = defineComponent({
|
|
|
3993
4006
|
emits: {
|
|
3994
4007
|
input: (selectedValues) => true
|
|
3995
4008
|
},
|
|
3996
|
-
setup(
|
|
4009
|
+
setup(props12, ctx) {
|
|
3997
4010
|
const vui = useVui();
|
|
3998
4011
|
const bootedRef = ref(false);
|
|
3999
4012
|
const footerHeightRef = ref(0);
|
|
4000
|
-
const internalValues = ref(
|
|
4013
|
+
const internalValues = ref(props12.modelValue.slice());
|
|
4001
4014
|
const rowSettings = computed(() => {
|
|
4002
4015
|
const {
|
|
4003
4016
|
rowSettings: rowSettings2
|
|
4004
|
-
} =
|
|
4017
|
+
} = props12;
|
|
4005
4018
|
if (!rowSettings2)
|
|
4006
4019
|
return () => ({});
|
|
4007
4020
|
return typeof rowSettings2 === "function" ? rowSettings2 : () => rowSettings2;
|
|
4008
4021
|
});
|
|
4009
4022
|
const containedVariant = vui.setting("containedVariant");
|
|
4010
|
-
const sortedItemKeysRef = computed(() =>
|
|
4011
|
-
const isEmptyRef = computed(() =>
|
|
4023
|
+
const sortedItemKeysRef = computed(() => props12.items.map((item) => item[props12.itemKey]));
|
|
4024
|
+
const isEmptyRef = computed(() => props12.items.length === 0);
|
|
4012
4025
|
const headersRef = computed(() => {
|
|
4013
4026
|
const {
|
|
4014
4027
|
headers,
|
|
4015
4028
|
selectable
|
|
4016
|
-
} =
|
|
4029
|
+
} = props12;
|
|
4017
4030
|
const ret = [];
|
|
4018
4031
|
if (selectable) {
|
|
4019
4032
|
ret.push({
|
|
@@ -4028,7 +4041,7 @@ var VDataTable = defineComponent({
|
|
|
4028
4041
|
const searchQueryValues = computed(() => {
|
|
4029
4042
|
let {
|
|
4030
4043
|
searchQuery
|
|
4031
|
-
} =
|
|
4044
|
+
} = props12;
|
|
4032
4045
|
if (!searchQuery) {
|
|
4033
4046
|
return [];
|
|
4034
4047
|
}
|
|
@@ -4051,14 +4064,14 @@ var VDataTable = defineComponent({
|
|
|
4051
4064
|
const emptyMessage = computed(() => {
|
|
4052
4065
|
let message;
|
|
4053
4066
|
if (searchQueryValues.value.length) {
|
|
4054
|
-
message =
|
|
4067
|
+
message = props12.noResultsMessage || vui.setting("noResultsMessage") || "No search results found.";
|
|
4055
4068
|
} else {
|
|
4056
|
-
message =
|
|
4069
|
+
message = props12.noDataMessage || vui.setting("noDataMessage") || "No data was available.";
|
|
4057
4070
|
}
|
|
4058
4071
|
return typeof message === "function" ? message(vui) : message;
|
|
4059
4072
|
});
|
|
4060
4073
|
const classesRef = computed(() => [{
|
|
4061
|
-
"v-data-table--fixed-header":
|
|
4074
|
+
"v-data-table--fixed-header": props12.fixedHeader
|
|
4062
4075
|
}]);
|
|
4063
4076
|
const layout = VueAppLayout.use();
|
|
4064
4077
|
const bodyInnerStylesRef = computed(() => {
|
|
@@ -4067,7 +4080,7 @@ var VDataTable = defineComponent({
|
|
|
4067
4080
|
const {
|
|
4068
4081
|
fixedHeader,
|
|
4069
4082
|
maxHeight
|
|
4070
|
-
} =
|
|
4083
|
+
} = props12;
|
|
4071
4084
|
const footerHeight = footerHeightRef.value;
|
|
4072
4085
|
const _maxHeight = maxHeight || (fixedHeader ? "100%" : maxHeight);
|
|
4073
4086
|
if (!_maxHeight) {
|
|
@@ -4077,28 +4090,28 @@ var VDataTable = defineComponent({
|
|
|
4077
4090
|
maxHeight: layout.calculateViewHeight(_maxHeight, -footerHeight - 100, 200)
|
|
4078
4091
|
};
|
|
4079
4092
|
});
|
|
4080
|
-
const defaultOrderQueryRef = computed(() =>
|
|
4093
|
+
const defaultOrderQueryRef = computed(() => props12.defaultOrder === props12.ascQueryValue ? props12.ascQueryValue : props12.descQueryValue);
|
|
4081
4094
|
const isTransitioningRef = computed(() => {
|
|
4082
|
-
return vui.location.isQueryOnlyTransitioning([
|
|
4095
|
+
return vui.location.isQueryOnlyTransitioning([props12.pageQuery, props12.sortQuery, props12.orderQuery, props12.limitQuery]);
|
|
4083
4096
|
});
|
|
4084
|
-
const pageRef = computed(() => vui.location.getQuery(
|
|
4085
|
-
const needShowHeaderControlRef = computed(() =>
|
|
4097
|
+
const pageRef = computed(() => vui.location.getQuery(props12.pageQuery, Number, 1));
|
|
4098
|
+
const needShowHeaderControlRef = computed(() => props12.items.length > props12.controlThreshold);
|
|
4086
4099
|
const sortByRef = computed({
|
|
4087
4100
|
get: () => {
|
|
4088
|
-
return vui.location.getQuery(
|
|
4101
|
+
return vui.location.getQuery(props12.sortQuery);
|
|
4089
4102
|
},
|
|
4090
4103
|
set(value) {
|
|
4091
4104
|
vui.location.pushQuery({
|
|
4092
|
-
[
|
|
4093
|
-
[
|
|
4105
|
+
[props12.sortQuery]: value || null,
|
|
4106
|
+
[props12.pageQuery]: 1
|
|
4094
4107
|
});
|
|
4095
4108
|
}
|
|
4096
4109
|
});
|
|
4097
|
-
const ordersRef = computed(() => [
|
|
4098
|
-
const usePagingRef = computed(() =>
|
|
4110
|
+
const ordersRef = computed(() => [props12.ascQueryValue, props12.descQueryValue]);
|
|
4111
|
+
const usePagingRef = computed(() => props12.limits.length > 0);
|
|
4099
4112
|
const orderByRef = computed({
|
|
4100
4113
|
get: () => {
|
|
4101
|
-
const value = vui.location.getQuery(
|
|
4114
|
+
const value = vui.location.getQuery(props12.orderQuery);
|
|
4102
4115
|
if (typeof value !== "string" || !ordersRef.value.includes(value)) {
|
|
4103
4116
|
return;
|
|
4104
4117
|
}
|
|
@@ -4106,33 +4119,33 @@ var VDataTable = defineComponent({
|
|
|
4106
4119
|
},
|
|
4107
4120
|
set(value) {
|
|
4108
4121
|
vui.location.pushQuery({
|
|
4109
|
-
[
|
|
4110
|
-
[
|
|
4122
|
+
[props12.orderQuery]: value || null,
|
|
4123
|
+
[props12.pageQuery]: 1
|
|
4111
4124
|
});
|
|
4112
4125
|
}
|
|
4113
4126
|
});
|
|
4114
4127
|
const offsetRef = computed(() => (pageRef.value - 1) * limitRef.value);
|
|
4115
4128
|
const limitRef = computed({
|
|
4116
|
-
get: () => vui.location.getQuery(
|
|
4129
|
+
get: () => vui.location.getQuery(props12.limitQuery, Number, props12.limitDefault),
|
|
4117
4130
|
set: (value) => {
|
|
4118
4131
|
const page = Math.floor(offsetRef.value / value) + 1;
|
|
4119
4132
|
vui.location.pushQuery({
|
|
4120
|
-
[
|
|
4121
|
-
[
|
|
4133
|
+
[props12.limitQuery]: value,
|
|
4134
|
+
[props12.pageQuery]: page
|
|
4122
4135
|
});
|
|
4123
4136
|
}
|
|
4124
4137
|
});
|
|
4125
4138
|
const pageLengthRef = computed(() => {
|
|
4126
4139
|
const {
|
|
4127
4140
|
total
|
|
4128
|
-
} =
|
|
4141
|
+
} = props12;
|
|
4129
4142
|
const _limit = limitRef.value;
|
|
4130
4143
|
if (!total)
|
|
4131
4144
|
return 0;
|
|
4132
4145
|
return Math.ceil(total / _limit);
|
|
4133
4146
|
});
|
|
4134
|
-
const lengthRef = computed(() =>
|
|
4135
|
-
const isASCRef = computed(() => orderByRef.value ===
|
|
4147
|
+
const lengthRef = computed(() => props12.items.length);
|
|
4148
|
+
const isASCRef = computed(() => orderByRef.value === props12.ascQueryValue);
|
|
4136
4149
|
const sortIconRef = computed(() => {
|
|
4137
4150
|
let icon = vui.icon("sort");
|
|
4138
4151
|
if (typeof icon === "string") {
|
|
@@ -4162,21 +4175,21 @@ var VDataTable = defineComponent({
|
|
|
4162
4175
|
return;
|
|
4163
4176
|
const queries = {};
|
|
4164
4177
|
if (sort) {
|
|
4165
|
-
queries[
|
|
4178
|
+
queries[props12.sortQuery] = sort;
|
|
4166
4179
|
}
|
|
4167
4180
|
if (order) {
|
|
4168
|
-
queries[
|
|
4181
|
+
queries[props12.orderQuery] = order;
|
|
4169
4182
|
}
|
|
4170
4183
|
vui.location.pushQuery({
|
|
4171
4184
|
...queries,
|
|
4172
4185
|
...usePagingRef.value ? {
|
|
4173
|
-
[
|
|
4186
|
+
[props12.pageQuery]: 1
|
|
4174
4187
|
} : void 0
|
|
4175
4188
|
});
|
|
4176
4189
|
}
|
|
4177
4190
|
function toggleOrderBy() {
|
|
4178
4191
|
return setSort({
|
|
4179
|
-
order: orderByRef.value ===
|
|
4192
|
+
order: orderByRef.value === props12.ascQueryValue ? props12.descQueryValue : props12.ascQueryValue
|
|
4180
4193
|
});
|
|
4181
4194
|
}
|
|
4182
4195
|
function isSelected(key) {
|
|
@@ -4242,7 +4255,7 @@ var VDataTable = defineComponent({
|
|
|
4242
4255
|
"class": "v-data-table__pagination",
|
|
4243
4256
|
"dense": true,
|
|
4244
4257
|
"align": "right",
|
|
4245
|
-
"routeQuery":
|
|
4258
|
+
"routeQuery": props12.pageQuery,
|
|
4246
4259
|
"modelValue": pageRef.value,
|
|
4247
4260
|
"length": pageLengthRef.value
|
|
4248
4261
|
}, null);
|
|
@@ -4250,7 +4263,7 @@ var VDataTable = defineComponent({
|
|
|
4250
4263
|
function genControls() {
|
|
4251
4264
|
const {
|
|
4252
4265
|
total
|
|
4253
|
-
} =
|
|
4266
|
+
} = props12;
|
|
4254
4267
|
const offset = offsetRef.value;
|
|
4255
4268
|
const length = lengthRef.value;
|
|
4256
4269
|
return createVNode("div", {
|
|
@@ -4268,7 +4281,7 @@ var VDataTable = defineComponent({
|
|
|
4268
4281
|
"size": "sm",
|
|
4269
4282
|
"hiddenInfo": true,
|
|
4270
4283
|
"disabled": isTransitioningRef.value,
|
|
4271
|
-
"items":
|
|
4284
|
+
"items": props12.limits.map((limit) => {
|
|
4272
4285
|
return {
|
|
4273
4286
|
label: `${limit}\u4EF6`,
|
|
4274
4287
|
value: limit
|
|
@@ -4287,7 +4300,7 @@ var VDataTable = defineComponent({
|
|
|
4287
4300
|
const {
|
|
4288
4301
|
defaultOrder,
|
|
4289
4302
|
ascQueryValue
|
|
4290
|
-
} =
|
|
4303
|
+
} = props12;
|
|
4291
4304
|
const children = headersRef.value.map((header) => {
|
|
4292
4305
|
const {
|
|
4293
4306
|
label,
|
|
@@ -4436,7 +4449,7 @@ var VDataTable = defineComponent({
|
|
|
4436
4449
|
const {
|
|
4437
4450
|
items,
|
|
4438
4451
|
itemKey
|
|
4439
|
-
} =
|
|
4452
|
+
} = props12;
|
|
4440
4453
|
const {
|
|
4441
4454
|
item: itemSlot = defaultItemSlot
|
|
4442
4455
|
} = ctx.slots;
|
|
@@ -4453,10 +4466,10 @@ var VDataTable = defineComponent({
|
|
|
4453
4466
|
"class": "v-data-table__table__body"
|
|
4454
4467
|
}, [children]);
|
|
4455
4468
|
}
|
|
4456
|
-
watch(() =>
|
|
4469
|
+
watch(() => props12.modelValue, (modelValue) => {
|
|
4457
4470
|
internalValues.value = modelValue.slice();
|
|
4458
4471
|
});
|
|
4459
|
-
watch(() =>
|
|
4472
|
+
watch(() => props12.items, (items) => {
|
|
4460
4473
|
internalValues.value = internalValues.value.filter((key) => {
|
|
4461
4474
|
return sortedItemKeysRef.value.includes(key);
|
|
4462
4475
|
});
|
|
@@ -4520,15 +4533,15 @@ var VToolbar = defineComponent({
|
|
|
4520
4533
|
...colorSchemeProps(),
|
|
4521
4534
|
dense: Boolean
|
|
4522
4535
|
},
|
|
4523
|
-
setup(
|
|
4536
|
+
setup(props12, ctx) {
|
|
4524
4537
|
const vui = useVui();
|
|
4525
|
-
const elevation = useElevation(
|
|
4538
|
+
const elevation = useElevation(props12, {
|
|
4526
4539
|
defaultValue: 4
|
|
4527
4540
|
});
|
|
4528
|
-
const dense = computed(() =>
|
|
4541
|
+
const dense = computed(() => props12.dense);
|
|
4529
4542
|
const color = useColorClasses({
|
|
4530
|
-
color: () =>
|
|
4531
|
-
variant: () =>
|
|
4543
|
+
color: () => props12.color,
|
|
4544
|
+
variant: () => props12.variant || vui.setting("containedVariant")
|
|
4532
4545
|
});
|
|
4533
4546
|
const classes = computed(() => {
|
|
4534
4547
|
return [elevation.elevationClassName.value, color.colorClasses.value, {
|
|
@@ -4547,11 +4560,11 @@ var VToolbarMenu = defineComponent({
|
|
|
4547
4560
|
name: "VToolbarMenu",
|
|
4548
4561
|
inheritAttrs: false,
|
|
4549
4562
|
props: {},
|
|
4550
|
-
setup(
|
|
4563
|
+
setup(props12, ctx) {
|
|
4551
4564
|
const vui = useVui();
|
|
4552
4565
|
const plain = vui.setting("plainVariant");
|
|
4553
4566
|
return () => {
|
|
4554
|
-
const variant =
|
|
4567
|
+
const variant = props12.variant || plain;
|
|
4555
4568
|
return createVNode(VButton, mergeProps(ctx.attrs, {
|
|
4556
4569
|
"variant": variant,
|
|
4557
4570
|
"class": ["v-toolbar-menu"]
|
|
@@ -4569,8 +4582,8 @@ var VToolbarEdge = defineComponent({
|
|
|
4569
4582
|
required: true
|
|
4570
4583
|
}
|
|
4571
4584
|
},
|
|
4572
|
-
setup(
|
|
4573
|
-
const edge = computed(() =>
|
|
4585
|
+
setup(props12, ctx) {
|
|
4586
|
+
const edge = computed(() => props12.edge);
|
|
4574
4587
|
return () => {
|
|
4575
4588
|
const children = renderSlotOrEmpty(ctx.slots, "default");
|
|
4576
4589
|
const hasChildren = !!children && children.length > 0;
|
|
@@ -4593,8 +4606,8 @@ var VToolbarTitle = defineComponent({
|
|
|
4593
4606
|
...slots12()
|
|
4594
4607
|
},
|
|
4595
4608
|
slots: slots12,
|
|
4596
|
-
setup(
|
|
4597
|
-
const _TagName = computed(() =>
|
|
4609
|
+
setup(props12, ctx) {
|
|
4610
|
+
const _TagName = computed(() => props12.tag);
|
|
4598
4611
|
return () => {
|
|
4599
4612
|
const TagName = _TagName.value;
|
|
4600
4613
|
return createVNode(TagName, {
|
|
@@ -4699,26 +4712,26 @@ var VuiService = class {
|
|
|
4699
4712
|
})
|
|
4700
4713
|
};
|
|
4701
4714
|
this.dialog = stackService.createLauncher(VDialog);
|
|
4702
|
-
this.alert = stackService.createLauncher(VDialog, (
|
|
4703
|
-
const actions = [...
|
|
4715
|
+
this.alert = stackService.createLauncher(VDialog, (props12) => {
|
|
4716
|
+
const actions = [...props12?.actions || []];
|
|
4704
4717
|
if (!actions.length) {
|
|
4705
4718
|
actions.push(this.stackAction("ok"));
|
|
4706
4719
|
}
|
|
4707
|
-
const backdrop =
|
|
4720
|
+
const backdrop = props12?.backdrop == null ? true : props12?.backdrop;
|
|
4708
4721
|
return {
|
|
4709
|
-
...
|
|
4722
|
+
...props12,
|
|
4710
4723
|
backdrop,
|
|
4711
4724
|
actions
|
|
4712
4725
|
};
|
|
4713
4726
|
});
|
|
4714
|
-
this.confirm = stackService.createLauncher(VDialog, (
|
|
4715
|
-
const actions = [...
|
|
4727
|
+
this.confirm = stackService.createLauncher(VDialog, (props12) => {
|
|
4728
|
+
const actions = [...props12?.actions || []];
|
|
4716
4729
|
if (!actions.length) {
|
|
4717
4730
|
actions.push(this.stackAction("cancel"), this.stackAction("ok"));
|
|
4718
4731
|
}
|
|
4719
|
-
const backdrop =
|
|
4732
|
+
const backdrop = props12?.backdrop == null ? true : props12?.backdrop;
|
|
4720
4733
|
return {
|
|
4721
|
-
...
|
|
4734
|
+
...props12,
|
|
4722
4735
|
backdrop,
|
|
4723
4736
|
actions
|
|
4724
4737
|
};
|
|
@@ -4855,6 +4868,7 @@ var VuiService = class {
|
|
|
4855
4868
|
return action;
|
|
4856
4869
|
}
|
|
4857
4870
|
};
|
|
4871
|
+
var scroller = getDocumentScroller();
|
|
4858
4872
|
function mergeVuiPluginOptions(base, override) {
|
|
4859
4873
|
if (!override)
|
|
4860
4874
|
return base;
|
|
@@ -4883,7 +4897,21 @@ var VuiPlugin = class {
|
|
|
4883
4897
|
const vueColorSchemePlugin = new VueColorSchemePlugin(colorScheme);
|
|
4884
4898
|
app.use(vueColorSchemePlugin);
|
|
4885
4899
|
installVueStackPlugin(app, stack);
|
|
4886
|
-
installVueFormPlugin(app,
|
|
4900
|
+
installVueFormPlugin(app, {
|
|
4901
|
+
scroll: {
|
|
4902
|
+
options: {
|
|
4903
|
+
behavior: "smooth"
|
|
4904
|
+
},
|
|
4905
|
+
fn: (el, opts2) => {
|
|
4906
|
+
const duration = opts2?.behavior === "smooth" ? void 0 : 0;
|
|
4907
|
+
return scroller.toElement(el, {
|
|
4908
|
+
offset: $vui.getAutoScrollToElementOffsetTop(),
|
|
4909
|
+
duration
|
|
4910
|
+
});
|
|
4911
|
+
}
|
|
4912
|
+
},
|
|
4913
|
+
...form
|
|
4914
|
+
});
|
|
4887
4915
|
installVueAppLayout(app);
|
|
4888
4916
|
installBodyScrollLockDirective(app);
|
|
4889
4917
|
installClickOutsideDirective(app);
|
|
@@ -4900,6 +4928,6 @@ function installVuiPlugin(app, opts) {
|
|
|
4900
4928
|
return app.use(VuiPlugin, opts);
|
|
4901
4929
|
}
|
|
4902
4930
|
|
|
4903
|
-
export { ARROW_KEY_TYPES, AVATAR_SIZES, BUTTON_ALIGNS, CHIP_SIZES, CHOICE_KEY_TYPES, CONTROL_FIELD_VARIANTS, CONTROL_LOADING_SPINNER_SIZES, CONTROL_SIZES,
|
|
4931
|
+
export { ARROW_KEY_TYPES, AVATAR_SIZES, BUTTON_ALIGNS, CHIP_SIZES, CHOICE_KEY_TYPES, CONTROL_FIELD_VARIANTS, CONTROL_LOADING_SPINNER_SIZES, CONTROL_SIZES, KEYBOARD_EVENT_TYPES, PAGINATION_ALIGNS, VApp, VAvatar, VBreadcrumbs, VBusyImage, VButton, VButtonGroup, VCard, VCardActions, VCardContent, VCheckbox, VCheckboxGroup, VChip, VContentSwitcher, VControlField, VDataTable, VDialog, VDrawerLayout, VForm, VFormControl, VFormGroup, VGridContainer, VGridItem, VHero, VIcon, VListTile, VMenu, VNavigation, VNavigationItem, VNumberField, VOption, VOptionGroup, VPagination, VPaper, VRadio, VRadioGroup, VSelect, VSheetModal, VSkeltonLoaderBone, VSnackbar, VSwitch, VSwitchGroup, VTabs, VTextCounter, VTextField, VTextarea, VToolbar, VToolbarEdge, VToolbarMenu, VToolbarTitle, VTooltip, VUI_CHECKBOX_GROUP_SYMBOL, VUI_CHECKBOX_SYMBOL, VUI_FORM_GROUP_SYMBOL, VUI_FORM_SYMBOL, VUI_OPTION_SYMBOL, VUI_RADIO_GROUP_SYMBOL, VUI_RADIO_SYMBOL, VUI_SELECT_SYMBOL, VUI_SWITCH_GROUP_SYMBOL, VUI_SWITCH_SYMBOL, VUI_TEXTAREA_SYMBOL, VUI_TEXT_FIELD_SYMBOL, VuiColorProviderInjectionKey, VuiControlFieldInjectionKey, VuiControlInjectionKey, VuiInjectionKey, VuiPlugin, VuiService, configureDataTableDefaults, createAvatarProps, createCardProps, createChipProps, createControlFieldProps, createControlFieldProviderProps, createControlProps, createElevationProps, createListTileProps, createNavigationItemProps, createNavigationProps, createPaperBaseProps, createPaperProps, createRequiredChipRenderer, createVFormGroupProps, createVFormProps, defineFormSelectorComponent, formGroupSlots, formSlots, iconProps, installVuiPlugin, listTileEmits, mergeVuiPluginOptions, mergeVuiServiceIconSettings, mergeVuiServiceOptions, mergeVuiServiceUISettings, paginationProps, paperBaseSlots, rawIconProp, renderNavigationItemInput, resolveNavigationItemInput, resolveRawIconProp, sheetModalProps, splitAttrs, useControl, useControlField, useElevation, useVui, useVuiColorProvider, vueButtonProps };
|
|
4904
4932
|
//# sourceMappingURL=out.js.map
|
|
4905
4933
|
//# sourceMappingURL=vui.mjs.map
|