@hostlink/nuxt-light 1.52.4 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/components/l-input-select.d.vue.ts +35 -0
- package/dist/runtime/components/l-input-select.vue +121 -0
- package/dist/runtime/components/l-input-select.vue.d.ts +35 -0
- package/dist/runtime/formkit/InputSelect.d.vue.ts +22 -0
- package/dist/runtime/formkit/InputSelect.vue +41 -0
- package/dist/runtime/formkit/InputSelect.vue.d.ts +22 -0
- package/dist/runtime/formkit/index.js +6 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { QSelectProps } from 'quasar';
|
|
2
|
+
export interface LInputSelectProps extends QSelectProps {
|
|
3
|
+
}
|
|
4
|
+
type __VLS_Props = LInputSelectProps;
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
modelValue?: string | null;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_11: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_11) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
dark: boolean | null;
|
|
18
|
+
rounded: boolean;
|
|
19
|
+
square: boolean;
|
|
20
|
+
dense: boolean;
|
|
21
|
+
outlined: boolean;
|
|
22
|
+
filled: boolean;
|
|
23
|
+
stackLabel: boolean;
|
|
24
|
+
standout: string | boolean;
|
|
25
|
+
hideBottomSpace: boolean;
|
|
26
|
+
inputDebounce: string | number;
|
|
27
|
+
optionsDark: boolean | null;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
name: { type: null, required: false },
|
|
5
|
+
virtualScrollHorizontal: { type: Boolean, required: false, skipCheck: true },
|
|
6
|
+
virtualScrollSliceSize: { type: null, required: false },
|
|
7
|
+
virtualScrollSliceRatioBefore: { type: null, required: false },
|
|
8
|
+
virtualScrollSliceRatioAfter: { type: null, required: false },
|
|
9
|
+
virtualScrollItemSize: { type: null, required: false },
|
|
10
|
+
virtualScrollStickySizeStart: { type: null, required: false },
|
|
11
|
+
virtualScrollStickySizeEnd: { type: null, required: false },
|
|
12
|
+
tableColspan: { type: null, required: false },
|
|
13
|
+
modelValue: { type: null, required: true },
|
|
14
|
+
error: { type: [Boolean, null], required: false, skipCheck: true },
|
|
15
|
+
errorMessage: { type: null, required: false },
|
|
16
|
+
noErrorIcon: { type: Boolean, required: false, skipCheck: true },
|
|
17
|
+
rules: { type: null, required: false },
|
|
18
|
+
reactiveRules: { type: Boolean, required: false, skipCheck: true },
|
|
19
|
+
lazyRules: { type: [Boolean, String], required: false, skipCheck: true },
|
|
20
|
+
label: { type: null, required: false },
|
|
21
|
+
stackLabel: { type: Boolean, required: false, skipCheck: true, default: void 0 },
|
|
22
|
+
hint: { type: null, required: false },
|
|
23
|
+
hideHint: { type: Boolean, required: false, skipCheck: true },
|
|
24
|
+
prefix: { type: null, required: false },
|
|
25
|
+
suffix: { type: null, required: false },
|
|
26
|
+
labelColor: { type: null, required: false },
|
|
27
|
+
color: { type: null, required: false },
|
|
28
|
+
bgColor: { type: null, required: false },
|
|
29
|
+
dark: { type: [Boolean, null], required: false, skipCheck: true, default: void 0 },
|
|
30
|
+
loading: { type: Boolean, required: false, skipCheck: true },
|
|
31
|
+
clearable: { type: Boolean, required: false, skipCheck: true },
|
|
32
|
+
clearIcon: { type: null, required: false },
|
|
33
|
+
filled: { type: Boolean, required: false, skipCheck: true, default: void 0 },
|
|
34
|
+
outlined: { type: Boolean, required: false, skipCheck: true, default: void 0 },
|
|
35
|
+
borderless: { type: Boolean, required: false, skipCheck: true },
|
|
36
|
+
standout: { type: [Boolean, String], required: false, skipCheck: true, default: void 0 },
|
|
37
|
+
labelSlot: { type: Boolean, required: false, skipCheck: true },
|
|
38
|
+
bottomSlots: { type: Boolean, required: false, skipCheck: true },
|
|
39
|
+
hideBottomSpace: { type: Boolean, required: false, skipCheck: true, default: true },
|
|
40
|
+
counter: { type: Boolean, required: false, skipCheck: true },
|
|
41
|
+
rounded: { type: Boolean, required: false, skipCheck: true, default: void 0 },
|
|
42
|
+
square: { type: Boolean, required: false, skipCheck: true, default: void 0 },
|
|
43
|
+
dense: { type: Boolean, required: false, skipCheck: true, default: void 0 },
|
|
44
|
+
itemAligned: { type: Boolean, required: false, skipCheck: true },
|
|
45
|
+
disable: { type: Boolean, required: false, skipCheck: true },
|
|
46
|
+
readonly: { type: Boolean, required: false, skipCheck: true },
|
|
47
|
+
autofocus: { type: Boolean, required: false, skipCheck: true },
|
|
48
|
+
for: { type: null, required: false },
|
|
49
|
+
multiple: { type: Boolean, required: false, skipCheck: true },
|
|
50
|
+
displayValue: { type: null, required: false },
|
|
51
|
+
displayValueHtml: { type: Boolean, required: false, skipCheck: true },
|
|
52
|
+
options: { type: null, required: false },
|
|
53
|
+
optionValue: { type: [Function, String], required: false, skipCheck: true },
|
|
54
|
+
optionLabel: { type: [Function, String], required: false, skipCheck: true },
|
|
55
|
+
optionDisable: { type: [Function, String], required: false, skipCheck: true },
|
|
56
|
+
hideSelected: { type: Boolean, required: false, skipCheck: true },
|
|
57
|
+
hideDropdownIcon: { type: Boolean, required: false, skipCheck: true },
|
|
58
|
+
dropdownIcon: { type: null, required: false },
|
|
59
|
+
maxValues: { type: null, required: false },
|
|
60
|
+
optionsDense: { type: Boolean, required: false, skipCheck: true },
|
|
61
|
+
optionsDark: { type: [Boolean, null], required: false, skipCheck: true, default: void 0 },
|
|
62
|
+
optionsSelectedClass: { type: null, required: false },
|
|
63
|
+
optionsHtml: { type: Boolean, required: false, skipCheck: true },
|
|
64
|
+
optionsCover: { type: Boolean, required: false, skipCheck: true },
|
|
65
|
+
menuShrink: { type: Boolean, required: false, skipCheck: true },
|
|
66
|
+
menuAnchor: { type: null, required: false },
|
|
67
|
+
menuSelf: { type: null, required: false },
|
|
68
|
+
menuOffset: { type: null, required: false },
|
|
69
|
+
popupContentClass: { type: null, required: false },
|
|
70
|
+
popupContentStyle: { type: null, required: false },
|
|
71
|
+
popupNoRouteDismiss: { type: Boolean, required: false, skipCheck: true },
|
|
72
|
+
useChips: { type: Boolean, required: false, skipCheck: true },
|
|
73
|
+
useInput: { type: Boolean, required: false, skipCheck: true },
|
|
74
|
+
maxlength: { type: null, required: false },
|
|
75
|
+
fillInput: { type: Boolean, required: false, skipCheck: true },
|
|
76
|
+
newValueMode: { type: null, required: false },
|
|
77
|
+
mapOptions: { type: Boolean, required: false, skipCheck: true },
|
|
78
|
+
disableTabSelection: { type: Boolean, required: false, skipCheck: true },
|
|
79
|
+
emitValue: { type: Boolean, required: false, skipCheck: true },
|
|
80
|
+
inputDebounce: { type: null, required: false, default: 0 },
|
|
81
|
+
inputClass: { type: null, required: false },
|
|
82
|
+
inputStyle: { type: null, required: false },
|
|
83
|
+
tabindex: { type: null, required: false },
|
|
84
|
+
autocomplete: { type: null, required: false },
|
|
85
|
+
transitionShow: { type: null, required: false },
|
|
86
|
+
transitionHide: { type: null, required: false },
|
|
87
|
+
transitionDuration: { type: null, required: false },
|
|
88
|
+
behavior: { type: null, required: false },
|
|
89
|
+
onVirtualScroll: { type: Function, required: false },
|
|
90
|
+
"onUpdate:modelValue": { type: Function, required: false },
|
|
91
|
+
onFocus: { type: Function, required: false },
|
|
92
|
+
onBlur: { type: Function, required: false },
|
|
93
|
+
onClear: { type: Function, required: false },
|
|
94
|
+
onInputValue: { type: Function, required: false },
|
|
95
|
+
onRemove: { type: Function, required: false },
|
|
96
|
+
onAdd: { type: Function, required: false },
|
|
97
|
+
onNewValue: { type: Function, required: false },
|
|
98
|
+
onFilter: { type: Function, required: false },
|
|
99
|
+
onFilterAbort: { type: Function, required: false },
|
|
100
|
+
onPopupShow: { type: Function, required: false },
|
|
101
|
+
onPopupHide: { type: Function, required: false }
|
|
102
|
+
});
|
|
103
|
+
const model = defineModel({ type: [String, null] });
|
|
104
|
+
const setModel = (val) => {
|
|
105
|
+
model.value = val;
|
|
106
|
+
};
|
|
107
|
+
const localOptions = ref(props.options || []);
|
|
108
|
+
const filterFn = (val, update, abort) => {
|
|
109
|
+
update(() => {
|
|
110
|
+
const needle = val.toLocaleLowerCase();
|
|
111
|
+
localOptions.value = props.options?.filter((v) => v.toLocaleLowerCase().indexOf(needle) > -1) || [];
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<template>
|
|
117
|
+
<q-select v-model="model" v-bind="$light.getInputProps($props)" :options="localOptions" use-input fill-input
|
|
118
|
+
hide-selected @filter="filterFn" @input-value="setModel">
|
|
119
|
+
<slot></slot>
|
|
120
|
+
</q-select>
|
|
121
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { QSelectProps } from 'quasar';
|
|
2
|
+
export interface LInputSelectProps extends QSelectProps {
|
|
3
|
+
}
|
|
4
|
+
type __VLS_Props = LInputSelectProps;
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
modelValue?: string | null;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_11: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_11) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
dark: boolean | null;
|
|
18
|
+
rounded: boolean;
|
|
19
|
+
square: boolean;
|
|
20
|
+
dense: boolean;
|
|
21
|
+
outlined: boolean;
|
|
22
|
+
filled: boolean;
|
|
23
|
+
stackLabel: boolean;
|
|
24
|
+
standout: string | boolean;
|
|
25
|
+
hideBottomSpace: boolean;
|
|
26
|
+
inputDebounce: string | number;
|
|
27
|
+
optionsDark: boolean | null;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare var __VLS_11: string | number, __VLS_12: any;
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
context: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
context: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { getErrorMessage } from "formkit-quasar";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
context: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const { t } = useI18n();
|
|
12
|
+
const { error, errorMessage } = getErrorMessage(props.context.node);
|
|
13
|
+
const value = computed({
|
|
14
|
+
get: () => props.context?.value,
|
|
15
|
+
set: (val) => props.context.node.input(val)
|
|
16
|
+
});
|
|
17
|
+
const onBlur = () => {
|
|
18
|
+
if (errorMessage.value) {
|
|
19
|
+
error.value = true;
|
|
20
|
+
} else {
|
|
21
|
+
error.value = false;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const label = computed(() => {
|
|
25
|
+
let l = t(props.context.label);
|
|
26
|
+
if (props.context.state.required) {
|
|
27
|
+
l = "* " + l;
|
|
28
|
+
}
|
|
29
|
+
return l;
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<l-input-select v-model="value" v-bind="context?.attrs" :label="label" :error="error" :error-message="errorMessage"
|
|
35
|
+
@blur="onBlur" :disable="context.disabled" :hint="context.help">
|
|
36
|
+
|
|
37
|
+
<template v-for="(s, name) in $slots" v-slot:[name]="props" :key="name">
|
|
38
|
+
<slot :name="name" v-bind="props ?? {}"></slot>
|
|
39
|
+
</template>
|
|
40
|
+
</l-input-select>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare var __VLS_11: string | number, __VLS_12: any;
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
context: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
context: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -16,10 +16,16 @@ import EditorVue from "./Editor.vue";
|
|
|
16
16
|
import ToggleVue from "./Toggle.vue";
|
|
17
17
|
import GroupSelect from "./GroupSelect.vue";
|
|
18
18
|
import TextareaVue from "./Textarea.vue";
|
|
19
|
+
import InputSelect from "./InputSelect.vue";
|
|
19
20
|
export const createLightPlugin = () => {
|
|
20
21
|
return (node) => {
|
|
21
22
|
let type = node.props.type + "";
|
|
22
23
|
switch (type) {
|
|
24
|
+
case "l-input-select":
|
|
25
|
+
return node.define({
|
|
26
|
+
type: "input",
|
|
27
|
+
component: InputSelect
|
|
28
|
+
});
|
|
23
29
|
case "l-editor":
|
|
24
30
|
return node.define({
|
|
25
31
|
type: "input",
|