@hostlink/nuxt-light 1.34.0 → 1.36.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-item.vue.d.ts +2 -2
- package/dist/runtime/composables/defineLightModel.d.ts +2 -0
- package/dist/runtime/formkit/Textarea.vue +47 -0
- package/dist/runtime/formkit/Textarea.vue.d.ts +22 -0
- package/dist/runtime/formkit/index.js +6 -0
- package/package.json +2 -2
package/dist/module.json
CHANGED
|
@@ -4,7 +4,7 @@ export interface LItemProps extends QItemProps {
|
|
|
4
4
|
name?: string;
|
|
5
5
|
top?: boolean;
|
|
6
6
|
labelTop?: boolean;
|
|
7
|
-
alignItems?: 'flex-start' | 'center' | 'flex-end';
|
|
7
|
+
alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch';
|
|
8
8
|
}
|
|
9
9
|
declare var __VLS_10: {}, __VLS_24: {}, __VLS_30: {};
|
|
10
10
|
type __VLS_Slots = {} & {
|
|
@@ -15,7 +15,7 @@ type __VLS_Slots = {} & {
|
|
|
15
15
|
end?: (props: typeof __VLS_30) => any;
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_component: import("vue").DefineComponent<LItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LItemProps> & Readonly<{}>, {
|
|
18
|
-
alignItems: "flex-start" | "center" | "flex-end";
|
|
18
|
+
alignItems: "flex-start" | "center" | "flex-end" | "stretch";
|
|
19
19
|
top: boolean;
|
|
20
20
|
labelTop: boolean;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,47 @@
|
|
|
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) => {
|
|
16
|
+
props.context.node.input(val);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const onBlur = () => {
|
|
20
|
+
if (errorMessage.value) {
|
|
21
|
+
error.value = true;
|
|
22
|
+
} else {
|
|
23
|
+
error.value = false;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const label = computed(() => {
|
|
27
|
+
let l = t(props.context.label);
|
|
28
|
+
if (props.context.state.required) {
|
|
29
|
+
l = "* " + l;
|
|
30
|
+
}
|
|
31
|
+
return l;
|
|
32
|
+
});
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<l-input v-model="value" v-bind="context?.attrs" :label="label" :error="error" type="textarea"
|
|
37
|
+
:error-message="errorMessage" @blur="onBlur" :disable="context.disabled">
|
|
38
|
+
|
|
39
|
+
<template v-for="(s, name) in $slots" v-slot:[name]="props" :key="name">
|
|
40
|
+
<slot :name="name" v-bind="props ?? {}"></slot>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<template v-if="context.help" #hint>
|
|
44
|
+
{{ context.help }}
|
|
45
|
+
</template>
|
|
46
|
+
</l-input>
|
|
47
|
+
</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
|
+
};
|
|
@@ -15,6 +15,7 @@ import FileUploadVue from "./FileUpload.vue";
|
|
|
15
15
|
import EditorVue from "./Editor.vue";
|
|
16
16
|
import ToggleVue from "./Toggle.vue";
|
|
17
17
|
import GroupSelect from "./GroupSelect.vue";
|
|
18
|
+
import TextareaVue from "./Textarea.vue";
|
|
18
19
|
export const createLightPlugin = () => {
|
|
19
20
|
return (node) => {
|
|
20
21
|
let type = node.props.type + "";
|
|
@@ -75,6 +76,11 @@ export const createLightPlugin = () => {
|
|
|
75
76
|
props: ["inputType", "number"],
|
|
76
77
|
component: Input
|
|
77
78
|
});
|
|
79
|
+
case "l-textarea":
|
|
80
|
+
return node.define({
|
|
81
|
+
type: "input",
|
|
82
|
+
component: TextareaVue
|
|
83
|
+
});
|
|
78
84
|
case "l-select":
|
|
79
85
|
return node.define({
|
|
80
86
|
type: "input",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@azure/msal-browser": "^3.26.1",
|
|
34
34
|
"@formkit/drag-and-drop": "^0.5.3",
|
|
35
|
-
"@hostlink/light": "^2.
|
|
35
|
+
"@hostlink/light": "^2.8.0",
|
|
36
36
|
"@nuxt/module-builder": "^1.0.1",
|
|
37
37
|
"@quasar/extras": "^1.16.11",
|
|
38
38
|
"@quasar/quasar-ui-qmarkdown": "^2.0.5",
|