@sfxcode/formkit-primevue 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/components/FormKitDataEdit.vue +58 -0
- package/dist/components/FormKitDataView.vue +45 -0
- package/dist/components/FormKitDebug.vue +25 -0
- package/dist/components/PrimeInputText.vue +6 -38
- package/dist/components/PrimeOutputBoolean.vue +28 -0
- package/dist/components/PrimeOutputDate.vue +38 -0
- package/dist/components/PrimeOutputDuration.vue +22 -0
- package/dist/components/PrimeOutputLink.vue +28 -0
- package/dist/components/PrimeOutputList.vue +29 -0
- package/dist/components/PrimeOutputNumber.vue +38 -0
- package/dist/components/PrimeOutputText.vue +23 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +21 -0
- package/dist/components/index.mjs +6 -0
- package/dist/composables/index.d.ts +4 -1
- package/dist/composables/index.js +22 -1
- package/dist/composables/index.mjs +7 -1
- package/dist/composables/useFormKitIcon.d.ts +5 -0
- package/dist/composables/useFormKitIcon.js +24 -0
- package/dist/composables/useFormKitIcon.mjs +15 -0
- package/dist/composables/useFormKitOutput.d.ts +3 -0
- package/dist/composables/useFormKitOutput.js +15 -0
- package/dist/composables/useFormKitOutput.mjs +7 -0
- package/dist/composables/useOutputDuration.d.ts +4 -0
- package/dist/composables/useOutputDuration.js +40 -0
- package/dist/composables/useOutputDuration.mjs +37 -0
- package/dist/definitions/index.d.ts +32 -47
- package/dist/definitions/index.js +35 -118
- package/dist/definitions/index.mjs +43 -436
- package/dist/definitions/input.d.ts +49 -0
- package/dist/definitions/input.js +125 -0
- package/dist/definitions/input.mjs +461 -0
- package/dist/definitions/output.d.ts +8 -0
- package/dist/definitions/output.js +36 -0
- package/dist/definitions/output.mjs +29 -0
- package/dist/sass/formkit-primevue.scss +25 -0
- package/dist/style.css +1 -1
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -22,7 +22,6 @@ PrimeVue 3 is in the prime3 branch.
|
|
|
22
22
|
|
|
23
23
|
Add *formkit.config.ts*
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
```typescript
|
|
27
26
|
import { defaultConfig, plugin } from '@formkit/vue'
|
|
28
27
|
import { primeInputs } from '@sfxcode/formkit-primevue'
|
|
@@ -40,7 +39,7 @@ app.use(plugin, defaultConfig({
|
|
|
40
39
|
Important: use *autoimport: false* if using primevue formkit validation and include or
|
|
41
40
|
exclude not needed components as usual.
|
|
42
41
|
|
|
43
|
-
Autoimport true prevents elements lookup correctly.
|
|
42
|
+
Autoimport true prevents elements lookup correctly.
|
|
44
43
|
|
|
45
44
|
Example:
|
|
46
45
|
```typescript
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import FormKitDebug from './FormKitDebug.vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
data: {
|
|
6
|
+
type: Object,
|
|
7
|
+
default: null,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: null,
|
|
12
|
+
},
|
|
13
|
+
debugData: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
debugSchema: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
submitLabel: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'Save',
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits(['dataSaved'])
|
|
28
|
+
|
|
29
|
+
const formSchema = ref(props.schema)
|
|
30
|
+
const formData = ref(props.data)
|
|
31
|
+
|
|
32
|
+
function handleSave() {
|
|
33
|
+
emit('dataSaved', props.data)
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<div class="p-formkit-data-edit">
|
|
39
|
+
<FormKit
|
|
40
|
+
id="form"
|
|
41
|
+
v-model="formData"
|
|
42
|
+
type="form"
|
|
43
|
+
:submit-label="submitLabel"
|
|
44
|
+
:submit-attrs="{
|
|
45
|
+
inputClass: 'p-button p-component p-formkit-button',
|
|
46
|
+
}"
|
|
47
|
+
@submit="handleSave"
|
|
48
|
+
>
|
|
49
|
+
<FormKitSchema :schema="formSchema" :data="formData" />
|
|
50
|
+
</FormKit>
|
|
51
|
+
<FormKitDebug v-if="debugData" :data="formData" header="Data" />
|
|
52
|
+
<FormKitDebug v-if="debugSchema" :data="formSchema" header="Schema" />
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<style scoped>
|
|
57
|
+
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import FormKitDebug from './FormKitDebug.vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
data: {
|
|
6
|
+
type: Object,
|
|
7
|
+
default: null,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: null,
|
|
12
|
+
},
|
|
13
|
+
debugData: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
debugSchema: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const formSchema = ref(props.schema)
|
|
24
|
+
const formData = ref(props.data)
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div class="p-formkit-data-view">
|
|
29
|
+
<FormKit
|
|
30
|
+
v-model="formData"
|
|
31
|
+
type="form"
|
|
32
|
+
:submit-attrs="{
|
|
33
|
+
style: 'display: none;',
|
|
34
|
+
}"
|
|
35
|
+
>
|
|
36
|
+
<FormKitSchema :schema="formSchema" :data="formData" />
|
|
37
|
+
</FormKit>
|
|
38
|
+
<FormKitDebug v-if="debugData" :data="formData" header="Data" />
|
|
39
|
+
<FormKitDebug v-if="debugSchema" :data="formSchema" header="Schema" />
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
defineProps({
|
|
3
|
+
data: {
|
|
4
|
+
type: Object,
|
|
5
|
+
default: null,
|
|
6
|
+
},
|
|
7
|
+
header: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'Debug',
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="p-formkit-data-debug">
|
|
16
|
+
<h3>{{ header }}</h3>
|
|
17
|
+
<slot />
|
|
18
|
+
<pre v-if="data" class="text-xs">{{ data }}</pre>
|
|
19
|
+
<span v-else class="text-xs">No Data available</span>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
|
|
25
|
+
</style>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang='ts'>
|
|
2
|
-
import {
|
|
2
|
+
import type { PropType } from 'vue'
|
|
3
3
|
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
4
4
|
|
|
5
5
|
import IconField from 'primevue/iconfield'
|
|
6
6
|
import InputIcon from 'primevue/inputicon'
|
|
7
7
|
import type { InputTextProps } from 'primevue/inputtext'
|
|
8
|
-
import { useFormKitInput } from '../composables'
|
|
8
|
+
import { useFormKitIcon, useFormKitInput } from '../composables'
|
|
9
9
|
|
|
10
10
|
export interface FormKitPrimeInputTextProps {
|
|
11
11
|
pt?: InputTextProps['pt']
|
|
@@ -24,27 +24,13 @@ const props = defineProps({
|
|
|
24
24
|
})
|
|
25
25
|
|
|
26
26
|
const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
27
|
-
|
|
28
|
-
const hasIcon = computed(() => {
|
|
29
|
-
if (props.context?.icon && props.context?.icon.length > 0)
|
|
30
|
-
return true
|
|
31
|
-
|
|
32
|
-
return props.context?.attrs?.icon && props.context?.attrs?.icon.length > 0
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
const icon = computed(() => {
|
|
36
|
-
return props.context?.icon ?? props.context?.attrs?.icon
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
const iconPosition = computed(() => {
|
|
40
|
-
return props.context?.attrs?.iconPosition ?? undefined
|
|
41
|
-
})
|
|
27
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
42
28
|
</script>
|
|
43
29
|
|
|
44
30
|
<template>
|
|
45
31
|
<div :class="wrapperClass">
|
|
46
|
-
<IconField
|
|
47
|
-
<InputIcon :class="icon" />
|
|
32
|
+
<IconField>
|
|
33
|
+
<InputIcon v-if="hasIcon && iconPosition === 'left'" :class="icon" />
|
|
48
34
|
<InputText
|
|
49
35
|
:id="context.id"
|
|
50
36
|
v-model="context._value"
|
|
@@ -63,25 +49,7 @@ const iconPosition = computed(() => {
|
|
|
63
49
|
@input="handleInput"
|
|
64
50
|
@blur="handleBlur"
|
|
65
51
|
/>
|
|
52
|
+
<InputIcon v-if="hasIcon && iconPosition === 'right'" :class="icon" />
|
|
66
53
|
</IconField>
|
|
67
|
-
<InputText
|
|
68
|
-
v-else
|
|
69
|
-
:id="context.id"
|
|
70
|
-
v-model="context._value"
|
|
71
|
-
v-bind="context?.attrs"
|
|
72
|
-
:disabled="!!context?.disabled"
|
|
73
|
-
:readonly="context?.attrs.readonly ?? false"
|
|
74
|
-
:style="context?.attrs.style"
|
|
75
|
-
:class="styleClass"
|
|
76
|
-
:tabindex="context?.attrs.tabindex"
|
|
77
|
-
:aria-label="context?.attrs.ariaLabel"
|
|
78
|
-
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
79
|
-
:placeholder="context.placeholder"
|
|
80
|
-
:pt="context.pt"
|
|
81
|
-
:pt-options="context.ptOptions"
|
|
82
|
-
:unstyled="context.unstyled ?? false"
|
|
83
|
-
@input="handleInput"
|
|
84
|
-
@blur="handleBlur"
|
|
85
|
-
/>
|
|
86
54
|
</div>
|
|
87
55
|
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { useFormKitIcon, useFormKitOutput } from '../composables'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
const { wrapperClass } = useFormKitOutput(props.context, 'p-output-boolean')
|
|
8
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
9
|
+
|
|
10
|
+
const { t } = useI18n()
|
|
11
|
+
|
|
12
|
+
const translated = computed(() => {
|
|
13
|
+
if (props.context?._value)
|
|
14
|
+
return t('formkit.prime.true', 'true')
|
|
15
|
+
else
|
|
16
|
+
return t('formkit.prime.false', 'false')
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div :class="wrapperClass">
|
|
22
|
+
<i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
|
|
23
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
24
|
+
{{ translated }}
|
|
25
|
+
</span>
|
|
26
|
+
<i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { useFormKitIcon, useFormKitOutput } from '../composables'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
const { wrapperClass } = useFormKitOutput(props.context, 'p-output-date')
|
|
8
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
9
|
+
|
|
10
|
+
const { d } = useI18n()
|
|
11
|
+
|
|
12
|
+
const converted = computed(() => {
|
|
13
|
+
if (props?.context?._value) {
|
|
14
|
+
let result = ''
|
|
15
|
+
const format = props?.context?.attrs?.value?.format ? props?.context?.attrs.value.format : 'short'
|
|
16
|
+
try {
|
|
17
|
+
result = d(props?.context?._value, format)
|
|
18
|
+
}
|
|
19
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
20
|
+
catch (e) {
|
|
21
|
+
}
|
|
22
|
+
return result
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return ''
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div :class="wrapperClass">
|
|
32
|
+
<i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
|
|
33
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
34
|
+
{{ converted }}
|
|
35
|
+
</span>
|
|
36
|
+
<i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { useFormKitIcon, useFormKitOutput, useOutputDuration } from '../composables'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
const { wrapperClass } = useFormKitOutput(props.context, 'p-output-duration')
|
|
9
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
10
|
+
|
|
11
|
+
const { formattedDuration } = useOutputDuration()
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div :class="wrapperClass">
|
|
16
|
+
<i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
|
|
17
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
18
|
+
{{ formattedDuration(context?._value) }}
|
|
19
|
+
</span>
|
|
20
|
+
<i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { useFormKitIcon, useFormKitOutput } from '../composables'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
context: Object,
|
|
7
|
+
})
|
|
8
|
+
const { wrapperClass } = useFormKitOutput(props.context, 'p-output-link')
|
|
9
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
10
|
+
|
|
11
|
+
const url = computed(() => props.context?._value.indexOf('http') > -1 ? props.context?._value : `https://${props.context?._value}`)
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div :class="wrapperClass">
|
|
16
|
+
<i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
|
|
17
|
+
<a
|
|
18
|
+
:id="context?.id"
|
|
19
|
+
:style="context?.attrs?.style"
|
|
20
|
+
:class="context?.attrs?.class"
|
|
21
|
+
:href="url"
|
|
22
|
+
:target="context?.attrs?.target ?? '_new'"
|
|
23
|
+
>
|
|
24
|
+
{{ context?._value }}
|
|
25
|
+
</a>
|
|
26
|
+
<i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { useFormKitIcon, useFormKitOutput } from '../composables'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
const { wrapperClass } = useFormKitOutput(props.context, 'p-output-list')
|
|
8
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
9
|
+
|
|
10
|
+
function listValue(index: number, value: string): string {
|
|
11
|
+
const divider = props.context?.attrs?.divider || ', '
|
|
12
|
+
if (index === 0)
|
|
13
|
+
return value
|
|
14
|
+
else
|
|
15
|
+
return `${divider}${value}`
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div :class="wrapperClass">
|
|
21
|
+
<i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
|
|
22
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
23
|
+
<template v-for="(value, index) of context?._value" :key="index">
|
|
24
|
+
<span class="p-output-list-item">{{ listValue(index, value) }}</span>
|
|
25
|
+
</template>
|
|
26
|
+
</span>
|
|
27
|
+
<i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { useFormKitIcon, useFormKitOutput } from '../composables'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
const { wrapperClass } = useFormKitOutput(props.context, 'p-output-number')
|
|
8
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
9
|
+
|
|
10
|
+
const { n } = useI18n()
|
|
11
|
+
|
|
12
|
+
const converted = computed(() => {
|
|
13
|
+
if (props?.context?._value) {
|
|
14
|
+
let result = ''
|
|
15
|
+
const format = props?.context?.attrs?.format ? props?.context?.attrs?.format : 'short'
|
|
16
|
+
try {
|
|
17
|
+
result = n(props?.context?._value, format)
|
|
18
|
+
}
|
|
19
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
20
|
+
catch (e) {
|
|
21
|
+
}
|
|
22
|
+
return result
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return ''
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div :class="wrapperClass">
|
|
32
|
+
<i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
|
|
33
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
34
|
+
{{ converted }}
|
|
35
|
+
</span>
|
|
36
|
+
<i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { useFormKitIcon, useFormKitOutput } from '../composables'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: Object,
|
|
6
|
+
})
|
|
7
|
+
const { wrapperClass } = useFormKitOutput(props.context, 'p-output-text')
|
|
8
|
+
const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div :class="wrapperClass">
|
|
13
|
+
<i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
|
|
14
|
+
<span
|
|
15
|
+
:id="context?.id"
|
|
16
|
+
:style="context?.attrs?.style"
|
|
17
|
+
:class="context?.attrs?.class"
|
|
18
|
+
>
|
|
19
|
+
{{ context?._value }}
|
|
20
|
+
</span>
|
|
21
|
+
<i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
@@ -20,4 +20,7 @@ import PrimeSlider from './PrimeSlider.vue';
|
|
|
20
20
|
import PrimeToggleButton from './PrimeToggleButton.vue';
|
|
21
21
|
import PrimeTreeSelect from './PrimeTreeSelect.vue';
|
|
22
22
|
import PrimeSelectButton from './PrimeSelectButton.vue';
|
|
23
|
-
|
|
23
|
+
import FormKitDataDebug from './FormKitDebug.vue';
|
|
24
|
+
import FormKitDataView from './FormKitDataView.vue';
|
|
25
|
+
import FormKitDataEdit from './FormKitDataEdit.vue';
|
|
26
|
+
export { FormKitDataDebug, FormKitDataEdit, FormKitDataView, PrimeAutoComplete, PrimeDatePicker, PrimeCascadeSelect, PrimeCheckbox, PrimeColorPicker, PrimeSelect, PrimeEditor, PrimeInputMask, PrimeInputNumber, PrimeInputSwitch, PrimeInputText, PrimeTextarea, PrimeKnob, PrimeMultiSelect, PrimeListbox, PrimePassword, PrimeRadioButton, PrimeRating, PrimeSlider, PrimeToggleButton, PrimeTreeSelect, PrimeSelectButton, };
|
package/dist/components/index.js
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "FormKitDataDebug", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _FormKitDebug.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "FormKitDataEdit", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _FormKitDataEdit.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "FormKitDataView", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _FormKitDataView.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
6
24
|
Object.defineProperty(exports, "PrimeAutoComplete", {
|
|
7
25
|
enumerable: true,
|
|
8
26
|
get: function () {
|
|
@@ -157,4 +175,7 @@ var _PrimeSlider = _interopRequireDefault(require("./PrimeSlider.vue"));
|
|
|
157
175
|
var _PrimeToggleButton = _interopRequireDefault(require("./PrimeToggleButton.vue"));
|
|
158
176
|
var _PrimeTreeSelect = _interopRequireDefault(require("./PrimeTreeSelect.vue"));
|
|
159
177
|
var _PrimeSelectButton = _interopRequireDefault(require("./PrimeSelectButton.vue"));
|
|
178
|
+
var _FormKitDebug = _interopRequireDefault(require("./FormKitDebug.vue"));
|
|
179
|
+
var _FormKitDataView = _interopRequireDefault(require("./FormKitDataView.vue"));
|
|
180
|
+
var _FormKitDataEdit = _interopRequireDefault(require("./FormKitDataEdit.vue"));
|
|
160
181
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -20,7 +20,13 @@ import PrimeSlider from "./PrimeSlider.vue";
|
|
|
20
20
|
import PrimeToggleButton from "./PrimeToggleButton.vue";
|
|
21
21
|
import PrimeTreeSelect from "./PrimeTreeSelect.vue";
|
|
22
22
|
import PrimeSelectButton from "./PrimeSelectButton.vue";
|
|
23
|
+
import FormKitDataDebug from "./FormKitDebug.vue";
|
|
24
|
+
import FormKitDataView from "./FormKitDataView.vue";
|
|
25
|
+
import FormKitDataEdit from "./FormKitDataEdit.vue";
|
|
23
26
|
export {
|
|
27
|
+
FormKitDataDebug,
|
|
28
|
+
FormKitDataEdit,
|
|
29
|
+
FormKitDataView,
|
|
24
30
|
PrimeAutoComplete,
|
|
25
31
|
PrimeDatePicker,
|
|
26
32
|
PrimeCascadeSelect,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { useFormKitIcon } from './useFormKitIcon';
|
|
1
2
|
import { useFormKitInput } from './useFormKitInput';
|
|
3
|
+
import { useFormKitOutput } from './useFormKitOutput';
|
|
2
4
|
import { useFormKitSchema } from './useFormKitSchema';
|
|
3
5
|
import { useInputEditor } from './useInputEditor';
|
|
4
6
|
import { useInputEditorSchema } from './useInputEditorSchema';
|
|
5
|
-
|
|
7
|
+
import { useOutputDuration } from './useOutputDuration';
|
|
8
|
+
export { useFormKitIcon, useFormKitInput, useFormKitOutput, useFormKitSchema, useInputEditor, useInputEditorSchema, useOutputDuration, };
|
|
@@ -3,12 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "useFormKitIcon", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _useFormKitIcon.useFormKitIcon;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "useFormKitInput", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
9
15
|
return _useFormKitInput.useFormKitInput;
|
|
10
16
|
}
|
|
11
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "useFormKitOutput", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _useFormKitOutput.useFormKitOutput;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
12
24
|
Object.defineProperty(exports, "useFormKitSchema", {
|
|
13
25
|
enumerable: true,
|
|
14
26
|
get: function () {
|
|
@@ -27,7 +39,16 @@ Object.defineProperty(exports, "useInputEditorSchema", {
|
|
|
27
39
|
return _useInputEditorSchema.useInputEditorSchema;
|
|
28
40
|
}
|
|
29
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "useOutputDuration", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _useOutputDuration.useOutputDuration;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var _useFormKitIcon = require("./useFormKitIcon");
|
|
30
49
|
var _useFormKitInput = require("./useFormKitInput");
|
|
50
|
+
var _useFormKitOutput = require("./useFormKitOutput");
|
|
31
51
|
var _useFormKitSchema = require("./useFormKitSchema");
|
|
32
52
|
var _useInputEditor = require("./useInputEditor");
|
|
33
|
-
var _useInputEditorSchema = require("./useInputEditorSchema");
|
|
53
|
+
var _useInputEditorSchema = require("./useInputEditorSchema");
|
|
54
|
+
var _useOutputDuration = require("./useOutputDuration");
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import { useFormKitIcon } from "./useFormKitIcon.mjs";
|
|
1
2
|
import { useFormKitInput } from "./useFormKitInput.mjs";
|
|
3
|
+
import { useFormKitOutput } from "./useFormKitOutput.mjs";
|
|
2
4
|
import { useFormKitSchema } from "./useFormKitSchema.mjs";
|
|
3
5
|
import { useInputEditor } from "./useInputEditor.mjs";
|
|
4
6
|
import { useInputEditorSchema } from "./useInputEditorSchema.mjs";
|
|
7
|
+
import { useOutputDuration } from "./useOutputDuration.mjs";
|
|
5
8
|
export {
|
|
9
|
+
useFormKitIcon,
|
|
6
10
|
useFormKitInput,
|
|
11
|
+
useFormKitOutput,
|
|
7
12
|
useFormKitSchema,
|
|
8
13
|
useInputEditor,
|
|
9
|
-
useInputEditorSchema
|
|
14
|
+
useInputEditorSchema,
|
|
15
|
+
useOutputDuration
|
|
10
16
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFormKitIcon = useFormKitIcon;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
function useFormKitIcon(context) {
|
|
9
|
+
const hasIcon = (0, _vue.computed)(() => {
|
|
10
|
+
if (context?.icon && context?.icon.length > 0) return true;
|
|
11
|
+
return context?.attrs?.icon && context?.attrs?.icon.length > 0;
|
|
12
|
+
});
|
|
13
|
+
const icon = (0, _vue.computed)(() => {
|
|
14
|
+
return context?.icon ?? context?.attrs?.icon;
|
|
15
|
+
});
|
|
16
|
+
const iconPosition = (0, _vue.computed)(() => {
|
|
17
|
+
return context?.iconPosition ?? context?.attrs?.iconPosition;
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
hasIcon,
|
|
21
|
+
icon,
|
|
22
|
+
iconPosition
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
export function useFormKitIcon(context) {
|
|
3
|
+
const hasIcon = computed(() => {
|
|
4
|
+
if (context?.icon && context?.icon.length > 0)
|
|
5
|
+
return true;
|
|
6
|
+
return context?.attrs?.icon && context?.attrs?.icon.length > 0;
|
|
7
|
+
});
|
|
8
|
+
const icon = computed(() => {
|
|
9
|
+
return context?.icon ?? context?.attrs?.icon;
|
|
10
|
+
});
|
|
11
|
+
const iconPosition = computed(() => {
|
|
12
|
+
return context?.iconPosition ?? context?.attrs?.iconPosition;
|
|
13
|
+
});
|
|
14
|
+
return { hasIcon, icon, iconPosition };
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFormKitOutput = useFormKitOutput;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
function useFormKitOutput(context, componentClass = "") {
|
|
9
|
+
const wrapperClass = (0, _vue.computed)(() => {
|
|
10
|
+
return context?.wrapperClass ? `p-formkit ${componentClass} ${context?.wrapperClass}` : `p-formkit ${componentClass}`;
|
|
11
|
+
});
|
|
12
|
+
return {
|
|
13
|
+
wrapperClass
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
export function useFormKitOutput(context, componentClass = "") {
|
|
3
|
+
const wrapperClass = computed(() => {
|
|
4
|
+
return context?.wrapperClass ? `p-formkit ${componentClass} ${context?.wrapperClass}` : `p-formkit ${componentClass}`;
|
|
5
|
+
});
|
|
6
|
+
return { wrapperClass };
|
|
7
|
+
}
|