@sfxcode/formkit-primevue 1.8.1 → 1.8.2
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/components/PrimeAutoComplete.vue +35 -0
- package/dist/components/PrimeCalendar.vue +47 -0
- package/dist/components/PrimeCascadeSelect.vue +28 -0
- package/dist/components/PrimeCheckbox.vue +32 -0
- package/dist/components/PrimeChips.vue +29 -0
- package/dist/components/PrimeColorPicker.vue +26 -0
- package/dist/components/PrimeDropdown.vue +35 -0
- package/dist/components/PrimeEditor.vue +37 -0
- package/dist/components/PrimeInputMask.vue +29 -0
- package/dist/components/PrimeInputNumber.vue +33 -0
- package/dist/components/PrimeInputSwitch.vue +30 -0
- package/dist/components/PrimeInputText.vue +53 -0
- package/dist/components/PrimeKnob.vue +35 -0
- package/dist/components/PrimeListbox.vue +30 -0
- package/dist/components/PrimeMultiSelect.vue +29 -0
- package/dist/components/PrimePassword.vue +35 -0
- package/dist/components/PrimeRadioButton.vue +35 -0
- package/dist/components/PrimeRating.vue +32 -0
- package/dist/components/PrimeSelectButton.vue +29 -0
- package/dist/components/PrimeSlider.vue +29 -0
- package/dist/components/PrimeTextarea.vue +34 -0
- package/dist/components/PrimeToggleButton.vue +30 -0
- package/dist/components/PrimeTreeSelect.vue +29 -0
- package/dist/components/PrimeTriStateCheckbox.vue +31 -0
- package/dist/components/index.d.ts +25 -0
- package/dist/components/index.js +174 -0
- package/dist/components/index.mjs +50 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.js +12 -0
- package/dist/composables/index.mjs +4 -0
- package/dist/composables/useFormKitSchema.js +85 -0
- package/dist/composables/useFormKitSchema.mjs +74 -0
- package/dist/index.d.ts +53 -1
- package/dist/index.js +137 -0
- package/dist/index.mjs +127 -0
- package/dist/sass/formkit-primevue.scss +0 -3
- package/dist/style.css +1 -0
- package/package.json +41 -19
- package/dist/.vite/manifest.json +0 -7
- package/dist/formkit/PrimeAutoComplete.vue.d.ts +0 -6
- package/dist/formkit/PrimeCalendar.vue.d.ts +0 -6
- package/dist/formkit/PrimeCascadeSelect.vue.d.ts +0 -6
- package/dist/formkit/PrimeCheckbox.vue.d.ts +0 -6
- package/dist/formkit/PrimeChips.vue.d.ts +0 -6
- package/dist/formkit/PrimeColorPicker.vue.d.ts +0 -6
- package/dist/formkit/PrimeDropdown.vue.d.ts +0 -6
- package/dist/formkit/PrimeEditor.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputMask.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputNumber.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputSwitch.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputText.vue.d.ts +0 -6
- package/dist/formkit/PrimeKnob.vue.d.ts +0 -6
- package/dist/formkit/PrimeListbox.vue.d.ts +0 -6
- package/dist/formkit/PrimeMultiSelect.vue.d.ts +0 -6
- package/dist/formkit/PrimePassword.vue.d.ts +0 -6
- package/dist/formkit/PrimeRadioButton.vue.d.ts +0 -6
- package/dist/formkit/PrimeRating.vue.d.ts +0 -6
- package/dist/formkit/PrimeSelectButton.vue.d.ts +0 -6
- package/dist/formkit/PrimeSlider.vue.d.ts +0 -6
- package/dist/formkit/PrimeTextarea.vue.d.ts +0 -6
- package/dist/formkit/PrimeToggleButton.vue.d.ts +0 -6
- package/dist/formkit/PrimeTreeSelect.vue.d.ts +0 -6
- package/dist/formkit/PrimeTriStateCheckbox.vue.d.ts +0 -6
- package/dist/formkit/index.d.ts +0 -51
- package/dist/formkit-primevue.es.js +0 -4336
- package/dist/formkit-primevue.umd.js +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/modules/formkit.d.ts +0 -3
- package/dist/modules/primevue.d.ts +0 -3
- package/dist/types.d.ts +0 -2
- /package/dist/{formkit → composables}/useFormKitSchema.d.ts +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
const suggestions = ref([])
|
|
10
|
+
|
|
11
|
+
function search(event) {
|
|
12
|
+
suggestions.value = attrs.value.complete(event.query)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function handleInput(e: any) {
|
|
16
|
+
context?.node.input(props.context?._value)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="p-formkit">
|
|
24
|
+
<AutoComplete
|
|
25
|
+
:id="context.id"
|
|
26
|
+
v-model="context._value"
|
|
27
|
+
v-bind="attrs"
|
|
28
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
29
|
+
:class="styleClass"
|
|
30
|
+
:suggestions="suggestions"
|
|
31
|
+
@complete="search"
|
|
32
|
+
@change="handleInput"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { CalendarBlurEvent } from 'primevue/calendar'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
const context = props.context
|
|
9
|
+
const attrs = computed(() => context?.attrs)
|
|
10
|
+
|
|
11
|
+
function handleInput(e: any) {
|
|
12
|
+
context?.node.input(context?._value)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function handleSelect(e: any) {
|
|
16
|
+
context?.node.input(e)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function handleBlur(e: CalendarBlurEvent) {
|
|
20
|
+
context?.handlers.blur(e.value)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function handleClearClick() {
|
|
24
|
+
context?.node.input(null)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div class="p-formkit">
|
|
32
|
+
<Calendar
|
|
33
|
+
v-model="context._value"
|
|
34
|
+
v-bind="attrs"
|
|
35
|
+
:input-id="props.context.id"
|
|
36
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
37
|
+
:readonly="attrs._readonly ?? false"
|
|
38
|
+
:input-style="attrs.style"
|
|
39
|
+
:input-class="styleClass"
|
|
40
|
+
:show-icon="context.showIcon"
|
|
41
|
+
@date-select="handleSelect"
|
|
42
|
+
@input="handleInput"
|
|
43
|
+
@blur="handleBlur"
|
|
44
|
+
@clear-click="handleClearClick"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<CascadeSelect
|
|
19
|
+
:id="context.id"
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:class="styleClass"
|
|
25
|
+
@change="handleInput"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<span v-if="context.attrs.labelLeft" class="formkit-prime-left">{{ context.attrs.labelLeft }}</span>
|
|
19
|
+
<Checkbox
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:input-id="context.id"
|
|
23
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
24
|
+
:readonly="attrs._readonly ?? false"
|
|
25
|
+
:input-style="attrs.style"
|
|
26
|
+
:input-class="styleClass"
|
|
27
|
+
:binary="attrs.binary ?? true"
|
|
28
|
+
@change="handleInput"
|
|
29
|
+
/>
|
|
30
|
+
<span v-if="context.attrs.labelRight" class="formkit-prime-right">{{ context.attrs.labelRight }}</span>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div class="p-formkit">
|
|
17
|
+
<Chips
|
|
18
|
+
v-model="context._value"
|
|
19
|
+
v-bind="attrs"
|
|
20
|
+
:input-id="context.id"
|
|
21
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
22
|
+
:readonly="attrs._readonly ?? false"
|
|
23
|
+
:input-style="attrs.style"
|
|
24
|
+
:input-class="styleClass"
|
|
25
|
+
@add="handleInput"
|
|
26
|
+
@remove="handleInput"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleChange(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="p-formkit">
|
|
16
|
+
<ColorPicker
|
|
17
|
+
v-model="context._value"
|
|
18
|
+
v-bind="attrs"
|
|
19
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
20
|
+
:readonly="attrs._readonly ?? false"
|
|
21
|
+
:style="attrs.style"
|
|
22
|
+
:panel-class="attrs.class"
|
|
23
|
+
@change="handleChange"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleBlur(e: any) {
|
|
10
|
+
context?.handlers.blur(e.value)
|
|
11
|
+
}
|
|
12
|
+
function handleInput(e: any) {
|
|
13
|
+
context?.node.input(e.value)
|
|
14
|
+
}
|
|
15
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="p-formkit">
|
|
20
|
+
<Dropdown
|
|
21
|
+
v-model="context._value"
|
|
22
|
+
v-bind="attrs"
|
|
23
|
+
:input-id="context.id"
|
|
24
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
25
|
+
:readonly="attrs._readonly ?? false"
|
|
26
|
+
:style="attrs.style"
|
|
27
|
+
:class="styleClass"
|
|
28
|
+
:input-style="attrs.style"
|
|
29
|
+
:input-class="styleClass"
|
|
30
|
+
:input-props="attrs.inputProps"
|
|
31
|
+
@change="handleInput"
|
|
32
|
+
@blur="handleBlur"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { EditorSelectionChangeEvent } from 'primevue/editor'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
const context = props.context
|
|
9
|
+
const attrs = computed(() => context?.attrs)
|
|
10
|
+
|
|
11
|
+
function handleInput(e: any) {
|
|
12
|
+
context?.node.input(e.htmlValue)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function handleSelection(e: EditorSelectionChangeEvent) {
|
|
16
|
+
if (e.range === null)
|
|
17
|
+
context?.handlers.blur(e.htmlValue)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div class="p-formkit">
|
|
25
|
+
<Editor
|
|
26
|
+
:id="context.id"
|
|
27
|
+
v-model="context._value"
|
|
28
|
+
v-bind="attrs"
|
|
29
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
30
|
+
:readonly="attrs._readonly ?? false"
|
|
31
|
+
:editor-style="attrs.style"
|
|
32
|
+
:class="styleClass"
|
|
33
|
+
@text-change="handleInput"
|
|
34
|
+
@selection-change="handleSelection"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
context?.handlers.blur(props.context?._value)
|
|
12
|
+
}
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<InputMask
|
|
19
|
+
:id="context.id"
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:editor-style="attrs.style"
|
|
25
|
+
:class="styleClass"
|
|
26
|
+
@blur="handleInput"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleBlur(e: any) {
|
|
10
|
+
context?.handlers.blur(e.value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleInput(e: any) {
|
|
14
|
+
context?.node.input(e.value)
|
|
15
|
+
}
|
|
16
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div class="p-formkit">
|
|
21
|
+
<InputNumber
|
|
22
|
+
v-model="context._value"
|
|
23
|
+
v-bind="attrs"
|
|
24
|
+
:input-id="context.id"
|
|
25
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
26
|
+
:readonly="attrs._readonly ?? false"
|
|
27
|
+
:input-style="attrs.style"
|
|
28
|
+
:input-class="styleClass"
|
|
29
|
+
@input="handleInput"
|
|
30
|
+
@blur="handleBlur"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div :class="attrs.option_class" class="p-formkit">
|
|
17
|
+
<span v-if="context.attrs.labelLeft" class="formkit-prime-left">{{ context.attrs.labelLeft }}</span>
|
|
18
|
+
<InputSwitch
|
|
19
|
+
v-model="context._value"
|
|
20
|
+
v-bind="attrs"
|
|
21
|
+
:input-id="context.id"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:input-style="attrs.style"
|
|
25
|
+
:input-class="styleClass"
|
|
26
|
+
@change="handleInput"
|
|
27
|
+
/>
|
|
28
|
+
<span v-if="context.attrs.labelRight" class="formkit-prime-right">{{ context.attrs.labelRight }}</span>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function hasIcon() {
|
|
10
|
+
return context?.icon && context?.icon.length > 0
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleBlur(e: any) {
|
|
14
|
+
context?.handlers.blur(e.target.value)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function handleInput(e: any) {
|
|
18
|
+
context?.node.input(e.target.value)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div class="p-formkit">
|
|
26
|
+
<IconField v-if="hasIcon()" :icon-position="attrs.iconPosition">
|
|
27
|
+
<InputIcon :class="context.icon" />
|
|
28
|
+
<InputText
|
|
29
|
+
:id="context.id"
|
|
30
|
+
v-model="context._value"
|
|
31
|
+
v-bind="attrs"
|
|
32
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
33
|
+
:readonly="attrs._readonly ?? false"
|
|
34
|
+
:style="attrs.style"
|
|
35
|
+
:class="styleClass"
|
|
36
|
+
@input="handleInput"
|
|
37
|
+
@blur="handleBlur"
|
|
38
|
+
/>
|
|
39
|
+
</IconField>
|
|
40
|
+
<InputText
|
|
41
|
+
v-else
|
|
42
|
+
:id="context.id"
|
|
43
|
+
v-model="context._value"
|
|
44
|
+
v-bind="attrs"
|
|
45
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
46
|
+
:readonly="attrs._readonly ?? false"
|
|
47
|
+
:style="attrs.style"
|
|
48
|
+
:class="styleClass"
|
|
49
|
+
@input="handleInput"
|
|
50
|
+
@blur="handleBlur"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(e)
|
|
11
|
+
context?.handlers.blur(e)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function updateValue(n: number) {
|
|
15
|
+
context?.node.input(n)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div class="p-formkit">
|
|
23
|
+
<Knob
|
|
24
|
+
:id="context.id"
|
|
25
|
+
v-model="context._value"
|
|
26
|
+
v-bind="attrs"
|
|
27
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
28
|
+
:readonly="attrs._readonly ?? false"
|
|
29
|
+
:style="attrs.style"
|
|
30
|
+
:class="styleClass"
|
|
31
|
+
@change="handleInput"
|
|
32
|
+
@update:model-value="updateValue"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<Listbox
|
|
19
|
+
:id="context.id"
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:list-style="attrs.style"
|
|
25
|
+
:class="styleClass"
|
|
26
|
+
:unstyled="attrs.unstyled ?? false"
|
|
27
|
+
@change="handleInput"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleChange(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<MultiSelect
|
|
19
|
+
v-model="context._value"
|
|
20
|
+
v-bind="attrs"
|
|
21
|
+
:input-id="context.id"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:list-style="attrs.style"
|
|
25
|
+
:class="styleClass"
|
|
26
|
+
@change="handleChange"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleBlur(e: any) {
|
|
10
|
+
context?.handlers.blur(e.target.value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleInput(e: any) {
|
|
14
|
+
context?.node.input(e.target.value)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="p-formkit">
|
|
22
|
+
<Password
|
|
23
|
+
v-model="context._value"
|
|
24
|
+
v-bind="attrs"
|
|
25
|
+
:input-id="context.id"
|
|
26
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
27
|
+
:readonly="attrs._readonly ?? false"
|
|
28
|
+
:input-style="attrs.style"
|
|
29
|
+
:input-class="styleClass"
|
|
30
|
+
:feedback="context.feedback ?? false"
|
|
31
|
+
@input="handleInput"
|
|
32
|
+
@blur="handleBlur"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleChange(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div :class="attrs.options_class" class="p-formkit">
|
|
18
|
+
<div v-for="option in attrs.options" :key="option.value" :class="attrs.option_class">
|
|
19
|
+
<RadioButton
|
|
20
|
+
:id="context.id"
|
|
21
|
+
v-model="context._value"
|
|
22
|
+
v-bind="attrs"
|
|
23
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
24
|
+
:readonly="attrs._readonly ?? false"
|
|
25
|
+
:name="attrs.name"
|
|
26
|
+
:value="option.value"
|
|
27
|
+
:input-style="attrs.style"
|
|
28
|
+
:input-class="styleClass"
|
|
29
|
+
@click="handleChange"
|
|
30
|
+
@change="handleChange"
|
|
31
|
+
/>
|
|
32
|
+
<label :for="option.value">{{ option.label }}</label>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<Rating
|
|
19
|
+
:id="context.id"
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:style="attrs.style"
|
|
25
|
+
:class="styleClass"
|
|
26
|
+
:on-icon="attrs.onIcon ?? 'pi pi-star-fill'"
|
|
27
|
+
:off-icon="attrs.offIcon ?? 'pi pi-star'"
|
|
28
|
+
:cancel="attrs.cancel ?? false"
|
|
29
|
+
@change="handleInput"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleChange(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<SelectButton
|
|
19
|
+
:id="context.id"
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:style="attrs.style"
|
|
25
|
+
:class="styleClass"
|
|
26
|
+
@change="handleChange"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|