@sfxcode/formkit-primevue 3.3.1 → 3.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/LICENSE +21 -0
- package/README.md +138 -13
- package/components.d.ts +1 -0
- package/dist/components/FormKitDataDebug.d.vue.ts +24 -0
- package/dist/components/FormKitDataDebug.vue +23 -0
- package/dist/components/FormKitDataDebug.vue.d.ts +24 -0
- package/dist/components/FormKitDataEdit.d.vue.ts +180 -0
- package/dist/components/FormKitDataEdit.vue +126 -0
- package/dist/components/FormKitDataEdit.vue.d.ts +180 -0
- package/dist/components/FormKitDataView.d.vue.ts +73 -0
- package/dist/components/FormKitDataView.vue +58 -0
- package/dist/components/FormKitDataView.vue.d.ts +73 -0
- package/dist/components/FormKitIcon.d.vue.ts +39 -0
- package/dist/components/FormKitIcon.vue +25 -0
- package/dist/components/FormKitIcon.vue.d.ts +39 -0
- package/dist/components/FormKitPrefix.d.vue.ts +7 -0
- package/dist/components/FormKitPrefix.vue +11 -0
- package/dist/components/FormKitPrefix.vue.d.ts +7 -0
- package/dist/components/FormKitSuffix.d.vue.ts +7 -0
- package/dist/components/FormKitSuffix.vue +11 -0
- package/dist/components/FormKitSuffix.vue.d.ts +7 -0
- package/dist/components/PrimeAutoComplete.d.vue.ts +31 -0
- package/dist/components/PrimeAutoComplete.vue +140 -0
- package/dist/components/PrimeAutoComplete.vue.d.ts +31 -0
- package/dist/components/PrimeCascadeSelect.d.vue.ts +28 -0
- package/dist/components/PrimeCascadeSelect.vue +62 -0
- package/dist/components/PrimeCascadeSelect.vue.d.ts +28 -0
- package/dist/components/PrimeCheckbox.d.vue.ts +27 -0
- package/dist/components/PrimeCheckbox.vue +71 -0
- package/dist/components/PrimeCheckbox.vue.d.ts +27 -0
- package/dist/components/PrimeColorPicker.d.vue.ts +24 -0
- package/dist/components/PrimeColorPicker.vue +48 -0
- package/dist/components/PrimeColorPicker.vue.d.ts +24 -0
- package/dist/components/PrimeDatePicker.d.vue.ts +63 -0
- package/dist/components/PrimeDatePicker.vue +153 -0
- package/dist/components/PrimeDatePicker.vue.d.ts +63 -0
- package/dist/components/PrimeInputMask.d.vue.ts +28 -0
- package/dist/components/PrimeInputMask.vue +88 -0
- package/dist/components/PrimeInputMask.vue.d.ts +28 -0
- package/dist/components/PrimeInputNumber.d.vue.ts +36 -0
- package/dist/components/PrimeInputNumber.vue +110 -0
- package/dist/components/PrimeInputNumber.vue.d.ts +36 -0
- package/dist/components/PrimeInputOtp.d.vue.ts +26 -0
- package/dist/components/PrimeInputOtp.vue +59 -0
- package/dist/components/PrimeInputOtp.vue.d.ts +26 -0
- package/dist/components/PrimeInputText.d.vue.ts +24 -0
- package/dist/components/PrimeInputText.vue +80 -0
- package/dist/components/PrimeInputText.vue.d.ts +24 -0
- package/dist/components/PrimeKnob.d.vue.ts +31 -0
- package/dist/components/PrimeKnob.vue +75 -0
- package/dist/components/PrimeKnob.vue.d.ts +31 -0
- package/dist/components/PrimeListbox.d.vue.ts +42 -0
- package/dist/components/PrimeListbox.vue +86 -0
- package/dist/components/PrimeListbox.vue.d.ts +42 -0
- package/dist/components/PrimeMultiSelect.d.vue.ts +53 -0
- package/dist/components/PrimeMultiSelect.vue +115 -0
- package/dist/components/PrimeMultiSelect.vue.d.ts +53 -0
- package/dist/components/PrimeOutputBoolean.d.vue.ts +16 -0
- package/dist/components/PrimeOutputBoolean.vue +41 -0
- package/dist/components/PrimeOutputBoolean.vue.d.ts +16 -0
- package/dist/components/PrimeOutputDate.d.vue.ts +16 -0
- package/dist/components/PrimeOutputDate.vue +51 -0
- package/dist/components/PrimeOutputDate.vue.d.ts +16 -0
- package/dist/components/PrimeOutputDuration.d.vue.ts +16 -0
- package/dist/components/PrimeOutputDuration.vue +32 -0
- package/dist/components/PrimeOutputDuration.vue.d.ts +16 -0
- package/dist/components/PrimeOutputLink.d.vue.ts +16 -0
- package/dist/components/PrimeOutputLink.vue +50 -0
- package/dist/components/PrimeOutputLink.vue.d.ts +16 -0
- package/dist/components/PrimeOutputList.d.vue.ts +19 -0
- package/dist/components/PrimeOutputList.vue +75 -0
- package/dist/components/PrimeOutputList.vue.d.ts +19 -0
- package/dist/components/PrimeOutputNumber.d.vue.ts +16 -0
- package/dist/components/PrimeOutputNumber.vue +59 -0
- package/dist/components/PrimeOutputNumber.vue.d.ts +16 -0
- package/dist/components/PrimeOutputReference.d.vue.ts +16 -0
- package/dist/components/PrimeOutputReference.vue +62 -0
- package/dist/components/PrimeOutputReference.vue.d.ts +16 -0
- package/dist/components/PrimeOutputText.d.vue.ts +22 -0
- package/dist/components/PrimeOutputText.vue +72 -0
- package/dist/components/PrimeOutputText.vue.d.ts +22 -0
- package/dist/components/PrimePassword.d.vue.ts +33 -0
- package/dist/components/PrimePassword.vue +73 -0
- package/dist/components/PrimePassword.vue.d.ts +33 -0
- package/dist/components/PrimeRadioButton.d.vue.ts +28 -0
- package/dist/components/PrimeRadioButton.vue +58 -0
- package/dist/components/PrimeRadioButton.vue.d.ts +28 -0
- package/dist/components/PrimeRating.d.vue.ts +24 -0
- package/dist/components/PrimeRating.vue +55 -0
- package/dist/components/PrimeRating.vue.d.ts +24 -0
- package/dist/components/PrimeSelect.d.vue.ts +50 -0
- package/dist/components/PrimeSelect.vue +113 -0
- package/dist/components/PrimeSelect.vue.d.ts +50 -0
- package/dist/components/PrimeSelectButton.d.vue.ts +28 -0
- package/dist/components/PrimeSelectButton.vue +64 -0
- package/dist/components/PrimeSelectButton.vue.d.ts +28 -0
- package/dist/components/PrimeSlider.d.vue.ts +26 -0
- package/dist/components/PrimeSlider.vue +60 -0
- package/dist/components/PrimeSlider.vue.d.ts +26 -0
- package/dist/components/PrimeTextarea.d.vue.ts +25 -0
- package/dist/components/PrimeTextarea.vue +53 -0
- package/dist/components/PrimeTextarea.vue.d.ts +25 -0
- package/dist/components/PrimeToggleButton.d.vue.ts +26 -0
- package/dist/components/PrimeToggleButton.vue +60 -0
- package/dist/components/PrimeToggleButton.vue.d.ts +26 -0
- package/dist/components/PrimeToggleSwitch.d.vue.ts +23 -0
- package/dist/components/PrimeToggleSwitch.vue +57 -0
- package/dist/components/PrimeToggleSwitch.vue.d.ts +23 -0
- package/dist/components/PrimeTreeSelect.d.vue.ts +32 -0
- package/dist/components/PrimeTreeSelect.vue +71 -0
- package/dist/components/PrimeTreeSelect.vue.d.ts +32 -0
- package/dist/components/index.d.ts +24 -2
- package/dist/components/index.js +167 -4
- package/dist/components/index.mjs +48 -0
- package/dist/composables/index.d.ts +9 -2
- package/dist/composables/index.js +61 -2
- package/dist/composables/index.mjs +18 -0
- package/dist/composables/useFormKitInput.d.ts +11 -0
- package/dist/composables/useFormKitInput.js +58 -0
- package/dist/composables/useFormKitInput.mjs +45 -0
- package/dist/composables/useFormKitRepeater.d.ts +15 -0
- package/dist/composables/useFormKitRepeater.js +74 -0
- package/dist/composables/useFormKitRepeater.mjs +54 -0
- package/dist/composables/useFormKitSchema.d.ts +36 -0
- package/dist/composables/useFormKitSchema.js +83 -0
- package/dist/composables/useFormKitSchema.mjs +58 -0
- package/dist/composables/useFormKitSection.d.ts +7 -0
- package/dist/composables/useFormKitSection.js +31 -0
- package/dist/composables/useFormKitSection.mjs +19 -0
- package/dist/composables/useInputEditor.d.ts +8 -0
- package/dist/composables/useInputEditor.js +148 -0
- package/dist/composables/useInputEditor.mjs +143 -0
- package/dist/composables/useInputEditorSchema.d.ts +163 -0
- package/dist/composables/useInputEditorSchema.js +313 -0
- package/dist/composables/useInputEditorSchema.mjs +315 -0
- package/dist/composables/useOutputDuration.d.ts +4 -0
- package/dist/composables/useOutputDuration.js +40 -0
- package/dist/composables/useOutputDuration.mjs +35 -0
- package/dist/composables/usePrimeInputs.d.ts +3 -0
- package/dist/composables/usePrimeInputs.js +62 -0
- package/dist/composables/usePrimeInputs.mjs +53 -0
- package/dist/definitions/index.d.ts +32 -37
- package/dist/definitions/index.js +42 -4
- package/dist/definitions/index.mjs +68 -0
- package/dist/definitions/input.d.ts +47 -0
- package/dist/definitions/input.js +142 -0
- package/dist/definitions/input.mjs +135 -0
- package/dist/definitions/output.d.ts +9 -0
- package/dist/definitions/output.js +46 -0
- package/dist/definitions/output.mjs +39 -0
- package/dist/index.d.ts +143 -146
- package/dist/index.js +62 -5
- package/dist/index.mjs +14 -0
- package/dist/plugins/index.d.ts +3 -7
- package/dist/plugins/index.js +57 -45
- package/dist/plugins/index.mjs +55 -0
- package/dist/sass/formkit-primevue.scss +101 -99
- package/package.json +115 -30
- package/dist/PrimeTreeSelect-Dksx7tL-.js +0 -1881
- package/dist/components-HJnJ39cU.js +0 -255
- package/dist/composables-CZ6f1QYe.js +0 -820
- package/dist/definitions-BHwWaom7.js +0 -1196
- package/dist/index-Ch3MtT1C.d.ts +0 -266
- package/dist/index-EJ8M51RO.d.ts +0 -917
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
import type { FormKitIconProps } from './FormKitIcon.vue'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import { useI18n } from 'vue-i18n'
|
|
7
|
+
import { useFormKitSection } from '../composables'
|
|
8
|
+
import FormKitIcon from './FormKitIcon.vue'
|
|
9
|
+
import FormKitPrefix from './FormKitPrefix.vue'
|
|
10
|
+
import FormKitSuffix from './FormKitSuffix.vue'
|
|
11
|
+
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
context: {
|
|
14
|
+
type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
20
|
+
|
|
21
|
+
const { t } = useI18n()
|
|
22
|
+
|
|
23
|
+
const translated = computed(() => {
|
|
24
|
+
if (props.context?._value)
|
|
25
|
+
return props.context?.trueValue ?? t('formkit.prime.true', 'true')
|
|
26
|
+
else
|
|
27
|
+
return props.context?.falseValue ?? t('formkit.prime.false', 'false')
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<div class="p-formkit p-output-boolean">
|
|
33
|
+
<FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
|
|
34
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
35
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
36
|
+
{{ translated }}
|
|
37
|
+
</span>
|
|
38
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
39
|
+
<FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
import type { FormKitIconProps } from './FormKitIcon.vue'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import { useI18n } from 'vue-i18n'
|
|
7
|
+
import { useFormKitSection } from '../composables'
|
|
8
|
+
import FormKitIcon from './FormKitIcon.vue'
|
|
9
|
+
import FormKitPrefix from './FormKitPrefix.vue'
|
|
10
|
+
import FormKitSuffix from './FormKitSuffix.vue'
|
|
11
|
+
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
context: {
|
|
14
|
+
type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
20
|
+
|
|
21
|
+
const { d } = useI18n()
|
|
22
|
+
|
|
23
|
+
const converted = computed(() => {
|
|
24
|
+
if (props?.context?._value) {
|
|
25
|
+
let result = ''
|
|
26
|
+
const format = props?.context?.attrs?.value?.format ? props?.context?.attrs.value.format : 'short'
|
|
27
|
+
try {
|
|
28
|
+
result = d(props?.context?._value, format)
|
|
29
|
+
}
|
|
30
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
31
|
+
catch (e) {
|
|
32
|
+
}
|
|
33
|
+
return result
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return ''
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div class="p-formkit p-output-date">
|
|
43
|
+
<FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
|
|
44
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
45
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
46
|
+
{{ converted }}
|
|
47
|
+
</span>
|
|
48
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
49
|
+
<FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
import type { FormKitIconProps } from './FormKitIcon.vue'
|
|
5
|
+
import { useFormKitSection, useOutputDuration } from '../composables'
|
|
6
|
+
import FormKitIcon from './FormKitIcon.vue'
|
|
7
|
+
import FormKitPrefix from './FormKitPrefix.vue'
|
|
8
|
+
import FormKitSuffix from './FormKitSuffix.vue'
|
|
9
|
+
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
context: {
|
|
12
|
+
type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
18
|
+
|
|
19
|
+
const { formattedDuration } = useOutputDuration()
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="p-formkit p-output-duration">
|
|
24
|
+
<FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
|
|
25
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
26
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
27
|
+
{{ formattedDuration(context?._value) }}
|
|
28
|
+
</span>
|
|
29
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
30
|
+
<FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
import type { FormKitIconProps } from './FormKitIcon.vue'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import { useFormKitSection } from '../composables'
|
|
7
|
+
import FormKitIcon from './FormKitIcon.vue'
|
|
8
|
+
import FormKitPrefix from './FormKitPrefix.vue'
|
|
9
|
+
import FormKitSuffix from './FormKitSuffix.vue'
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
context: {
|
|
13
|
+
type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
19
|
+
|
|
20
|
+
const url = computed(() => {
|
|
21
|
+
if (props.context?._value)
|
|
22
|
+
return props.context?._value.indexOf('http') > -1 ? props.context?._value : `https://${props.context?._value}`
|
|
23
|
+
else
|
|
24
|
+
return ''
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const title = computed(() => {
|
|
28
|
+
const value = props.context?._value ?? ''
|
|
29
|
+
return props.context?.title ?? value
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<div class="p-formkit p-output-link">
|
|
35
|
+
<FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
|
|
36
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
37
|
+
<a
|
|
38
|
+
v-if="context?.value"
|
|
39
|
+
:id="context?.id"
|
|
40
|
+
:style="context?.attrs?.style"
|
|
41
|
+
:class="context?.attrs?.class"
|
|
42
|
+
:href="url"
|
|
43
|
+
:target="context?.attrs?.target ?? '_new'"
|
|
44
|
+
>
|
|
45
|
+
<span>{{ title }}</span>
|
|
46
|
+
</a>
|
|
47
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
48
|
+
<FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
export interface PrimeOutputListProps {
|
|
5
|
+
convertValue?: (array: []) => [];
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
context: {
|
|
9
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps & PrimeOutputListProps;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
context: {
|
|
14
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps & PrimeOutputListProps;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
import type { FormKitIconProps } from './FormKitIcon.vue'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import { useFormKitSection } from '../composables'
|
|
7
|
+
import FormKitIcon from './FormKitIcon.vue'
|
|
8
|
+
import FormKitPrefix from './FormKitPrefix.vue'
|
|
9
|
+
import FormKitSuffix from './FormKitSuffix.vue'
|
|
10
|
+
|
|
11
|
+
export interface PrimeOutputListProps {
|
|
12
|
+
convertValue?: (array: []) => []
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
context: {
|
|
17
|
+
type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps & PrimeOutputListProps,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const listStyle = computed(() => {
|
|
23
|
+
return props.context?.listStyle || 'span'
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
27
|
+
|
|
28
|
+
const getListValues = computed(() => {
|
|
29
|
+
const values = Array.isArray(props.context?._value) ? props.context._value : []
|
|
30
|
+
if (typeof props.context?.convertValue === 'function') {
|
|
31
|
+
return props.context.convertValue([...values])
|
|
32
|
+
}
|
|
33
|
+
return values
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const dividerClass = computed(() => props.context?.dividerClass || '')
|
|
37
|
+
const itemClass = computed(() => props.context?.itemClass || '')
|
|
38
|
+
const listItemsClass = computed(() => props.context?.attrs?.class || '')
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div class="p-formkit p-output-list">
|
|
43
|
+
<FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
|
|
44
|
+
<FormKitPrefix v-if="hasPrefix && listStyle === 'span'" :prefix="context?.prefix as string" />
|
|
45
|
+
<span v-if="listStyle === 'span'" :id="context?.id" :style="context?.attrs?.style" class="p-output-list-items" :class="listItemsClass">
|
|
46
|
+
<template v-for="(value, index) of getListValues" :key="index">
|
|
47
|
+
<span v-if="index !== 0" class="p-output-list-divider" :class="dividerClass">{{ context?.divider ?? ', ' }}</span>
|
|
48
|
+
<span class="p-output-list-item" :class="itemClass">{{ value }}</span>
|
|
49
|
+
</template>
|
|
50
|
+
</span>
|
|
51
|
+
<div v-if="listStyle === 'div'" :id="context?.id" :style="context?.attrs?.style" class="p-output-list-items" :class="listItemsClass">
|
|
52
|
+
<template v-for="(value, index) of getListValues" :key="index">
|
|
53
|
+
<div class="p-output-list-item" :class="itemClass">
|
|
54
|
+
{{ value }}
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
</div>
|
|
58
|
+
<ul v-if="listStyle === 'ul'" :id="context?.id" :style="context?.attrs?.style" class="p-output-list-items" :class="listItemsClass">
|
|
59
|
+
<li v-for="(value, index) of getListValues" :key="index">
|
|
60
|
+
<span class="p-output-list-item" :class="itemClass">
|
|
61
|
+
{{ value }}
|
|
62
|
+
</span>
|
|
63
|
+
</li>
|
|
64
|
+
</ul>
|
|
65
|
+
<ol v-if="listStyle === 'ol'" :id="context?.id" :style="context?.attrs?.style" class="p-output-list-items" :class="listItemsClass">
|
|
66
|
+
<li v-for="(value, index) of getListValues" :key="index">
|
|
67
|
+
<span class="p-output-list-item" :class="itemClass">
|
|
68
|
+
{{ value }}
|
|
69
|
+
</span>
|
|
70
|
+
</li>
|
|
71
|
+
</ol>
|
|
72
|
+
<FormKitSuffix v-if="hasSuffix && listStyle === 'span'" :suffix="context?.suffix as string" />
|
|
73
|
+
<FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
export interface PrimeOutputListProps {
|
|
5
|
+
convertValue?: (array: []) => [];
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
context: {
|
|
9
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps & PrimeOutputListProps;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
context: {
|
|
14
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps & PrimeOutputListProps;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
import type { FormKitIconProps } from './FormKitIcon.vue'
|
|
5
|
+
|
|
6
|
+
import { computed } from 'vue'
|
|
7
|
+
import { useI18n } from 'vue-i18n'
|
|
8
|
+
import { useFormKitSection } from '../composables'
|
|
9
|
+
import FormKitIcon from './FormKitIcon.vue'
|
|
10
|
+
import FormKitPrefix from './FormKitPrefix.vue'
|
|
11
|
+
import FormKitSuffix from './FormKitSuffix.vue'
|
|
12
|
+
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
context: {
|
|
15
|
+
type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
21
|
+
|
|
22
|
+
const { n } = useI18n()
|
|
23
|
+
|
|
24
|
+
const converted = computed(() => {
|
|
25
|
+
const value = props?.context?._value
|
|
26
|
+
if (value) {
|
|
27
|
+
let result = ''
|
|
28
|
+
const format = props?.context?.attrs?.format ? props?.context?.attrs?.format : 'short'
|
|
29
|
+
try {
|
|
30
|
+
result = n(value, format)
|
|
31
|
+
}
|
|
32
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
33
|
+
catch (e) {
|
|
34
|
+
try {
|
|
35
|
+
result = n(+value, format)
|
|
36
|
+
}
|
|
37
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
38
|
+
catch (e) {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return result
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return ''
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<div class="p-formkit p-output-number">
|
|
51
|
+
<FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
|
|
52
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
53
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
54
|
+
{{ converted }}
|
|
55
|
+
</span>
|
|
56
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
57
|
+
<FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
import type { FormKitIconProps } from './FormKitIcon.vue'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import { useFormKitSection } from '../composables'
|
|
7
|
+
import FormKitIcon from './FormKitIcon.vue'
|
|
8
|
+
import FormKitPrefix from './FormKitPrefix.vue'
|
|
9
|
+
import FormKitSuffix from './FormKitSuffix.vue'
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
context: {
|
|
13
|
+
type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
19
|
+
|
|
20
|
+
const reference = computed(() => {
|
|
21
|
+
const value = props.context?._value ?? ''
|
|
22
|
+
let result = props.context?.reference ? `${props.context?.reference}` : 'reference-must-be-set'
|
|
23
|
+
if (!props.context?.internal && !result.includes('http'))
|
|
24
|
+
result = `https://${result}`
|
|
25
|
+
return result.replace(/\{\{.*\}\}/, value)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const title = computed(() => {
|
|
29
|
+
const value = props.context?._value ?? ''
|
|
30
|
+
const result = props.context?.title ?? value
|
|
31
|
+
return `${result}`.replace(/\{\{.*\}\}/, value)
|
|
32
|
+
})
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<div class="p-formkit p-output-reference">
|
|
37
|
+
<FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
|
|
38
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
39
|
+
<component
|
|
40
|
+
:is="context?.linkComponentName ? context?.linkComponentName : 'RouterLink'"
|
|
41
|
+
v-if="context?.internal"
|
|
42
|
+
:style="context?.attrs?.style"
|
|
43
|
+
:class="context?.attrs?.class"
|
|
44
|
+
:to="reference"
|
|
45
|
+
v-bind="context?.attrs"
|
|
46
|
+
>
|
|
47
|
+
{{ title }}
|
|
48
|
+
</component>
|
|
49
|
+
<a
|
|
50
|
+
v-else
|
|
51
|
+
:id="context?.id"
|
|
52
|
+
:style="context?.attrs?.style"
|
|
53
|
+
:class="context?.attrs?.class"
|
|
54
|
+
:href="reference"
|
|
55
|
+
:target="context?.attrs?.target ?? '_new'"
|
|
56
|
+
>
|
|
57
|
+
{{ title }}
|
|
58
|
+
</a>
|
|
59
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
60
|
+
<FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
context: {
|
|
6
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
context: {
|
|
11
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitIconProps } from './FormKitIcon.vue';
|
|
4
|
+
export interface FormKitOutputTextProps {
|
|
5
|
+
html?: boolean;
|
|
6
|
+
isTranslationKey?: boolean;
|
|
7
|
+
convertValue?: (value: string) => string;
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
11
|
+
context: {
|
|
12
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps & FormKitOutputTextProps;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
context: {
|
|
17
|
+
type: PropType<FormKitFrameworkContext> & FormKitIconProps & FormKitOutputTextProps;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|