@sfxcode/formkit-primevue 3.3.3 → 3.3.4
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 +13 -138
- package/dist/components/FormKitDataDebug.vue +5 -9
- package/dist/components/FormKitDataEdit.vue +53 -46
- package/dist/components/FormKitDataView.vue +20 -27
- package/dist/components/FormKitIcon.vue +6 -13
- package/dist/components/FormKitPrefix.vue +3 -3
- package/dist/components/FormKitSuffix.vue +3 -3
- package/dist/components/PrimeAutoComplete.vue +41 -86
- package/dist/components/PrimeCascadeSelect.vue +7 -26
- package/dist/components/PrimeCheckbox.vue +9 -29
- package/dist/components/PrimeColorPicker.vue +7 -22
- package/dist/components/PrimeDatePicker.vue +17 -73
- package/dist/components/PrimeInputMask.vue +10 -29
- package/dist/components/PrimeInputNumber.vue +21 -56
- package/dist/components/PrimeInputOtp.vue +7 -24
- package/dist/components/PrimeInputText.vue +10 -25
- package/dist/components/PrimeKnob.vue +12 -37
- package/dist/components/PrimeListbox.vue +7 -39
- package/dist/components/PrimeMultiSelect.vue +7 -52
- package/dist/components/PrimeOutputBoolean.vue +28 -27
- package/dist/components/PrimeOutputDate.vue +33 -33
- package/dist/components/PrimeOutputDuration.vue +23 -19
- package/dist/components/PrimeOutputLink.vue +29 -27
- package/dist/components/PrimeOutputList.vue +71 -40
- package/dist/components/PrimeOutputNumber.vue +36 -39
- package/dist/components/PrimeOutputReference.vue +32 -30
- package/dist/components/PrimeOutputText.vue +53 -53
- package/dist/components/PrimePassword.vue +11 -32
- package/dist/components/PrimeRadioButton.vue +19 -29
- package/dist/components/PrimeRating.vue +7 -22
- package/dist/components/PrimeSelect.vue +7 -49
- package/dist/components/PrimeSelectButton.vue +7 -27
- package/dist/components/PrimeSlider.vue +10 -28
- package/dist/components/PrimeTextarea.vue +7 -23
- package/dist/components/PrimeToggleButton.vue +7 -25
- package/dist/components/PrimeToggleSwitch.vue +8 -23
- package/dist/components/PrimeTreeSelect.vue +7 -30
- package/dist/components/index.d.ts +23 -23
- package/dist/composables/index.d.ts +8 -8
- package/dist/composables/index.js +8 -8
- package/dist/composables/index.mjs +8 -8
- package/dist/composables/useFormKitInput.js +5 -1
- package/dist/composables/useFormKitInput.mjs +13 -1
- package/dist/composables/useFormKitRepeater.js +1 -1
- package/dist/composables/useFormKitRepeater.mjs +45 -17
- package/dist/composables/useFormKitSchema.mjs +10 -2
- package/dist/composables/useInputEditor.js +4 -4
- package/dist/composables/useInputEditor.mjs +52 -24
- package/dist/composables/useInputEditorSchema.js +3 -3
- package/dist/composables/useInputEditorSchema.mjs +25 -17
- package/dist/composables/useOutputDuration.mjs +3 -6
- package/dist/definitions/index.js +2 -2
- package/dist/definitions/index.mjs +2 -2
- package/dist/definitions/input.d.ts +1 -1
- package/dist/definitions/input.mjs +301 -15
- package/dist/definitions/output.d.ts +1 -1
- package/dist/definitions/output.js +1 -1
- package/dist/definitions/output.mjs +95 -14
- package/dist/index.d.ts +48 -48
- package/dist/index.js +12 -12
- package/dist/index.mjs +9 -3
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.mjs +31 -27
- package/dist/sass/formkit-primevue.scss +99 -101
- package/dist/vue.d.ts +5 -0
- package/package.json +51 -88
- package/LICENSE +0 -21
- package/components.d.ts +0 -1
- package/dist/components/FormKitDataDebug.d.vue.ts +0 -24
- package/dist/components/FormKitDataDebug.vue.d.ts +0 -24
- package/dist/components/FormKitDataEdit.d.vue.ts +0 -180
- package/dist/components/FormKitDataEdit.vue.d.ts +0 -180
- package/dist/components/FormKitDataView.d.vue.ts +0 -73
- package/dist/components/FormKitDataView.vue.d.ts +0 -73
- package/dist/components/FormKitIcon.d.vue.ts +0 -39
- package/dist/components/FormKitIcon.vue.d.ts +0 -39
- package/dist/components/FormKitPrefix.d.vue.ts +0 -7
- package/dist/components/FormKitPrefix.vue.d.ts +0 -7
- package/dist/components/FormKitSuffix.d.vue.ts +0 -7
- package/dist/components/FormKitSuffix.vue.d.ts +0 -7
- package/dist/components/PrimeAutoComplete.d.vue.ts +0 -31
- package/dist/components/PrimeAutoComplete.vue.d.ts +0 -31
- package/dist/components/PrimeCascadeSelect.d.vue.ts +0 -28
- package/dist/components/PrimeCascadeSelect.vue.d.ts +0 -28
- package/dist/components/PrimeCheckbox.d.vue.ts +0 -27
- package/dist/components/PrimeCheckbox.vue.d.ts +0 -27
- package/dist/components/PrimeColorPicker.d.vue.ts +0 -24
- package/dist/components/PrimeColorPicker.vue.d.ts +0 -24
- package/dist/components/PrimeDatePicker.d.vue.ts +0 -63
- package/dist/components/PrimeDatePicker.vue.d.ts +0 -63
- package/dist/components/PrimeInputMask.d.vue.ts +0 -28
- package/dist/components/PrimeInputMask.vue.d.ts +0 -28
- package/dist/components/PrimeInputNumber.d.vue.ts +0 -36
- package/dist/components/PrimeInputNumber.vue.d.ts +0 -36
- package/dist/components/PrimeInputOtp.d.vue.ts +0 -26
- package/dist/components/PrimeInputOtp.vue.d.ts +0 -26
- package/dist/components/PrimeInputText.d.vue.ts +0 -24
- package/dist/components/PrimeInputText.vue.d.ts +0 -24
- package/dist/components/PrimeKnob.d.vue.ts +0 -31
- package/dist/components/PrimeKnob.vue.d.ts +0 -31
- package/dist/components/PrimeListbox.d.vue.ts +0 -42
- package/dist/components/PrimeListbox.vue.d.ts +0 -42
- package/dist/components/PrimeMultiSelect.d.vue.ts +0 -53
- package/dist/components/PrimeMultiSelect.vue.d.ts +0 -53
- package/dist/components/PrimeOutputBoolean.d.vue.ts +0 -16
- package/dist/components/PrimeOutputBoolean.vue.d.ts +0 -16
- package/dist/components/PrimeOutputDate.d.vue.ts +0 -16
- package/dist/components/PrimeOutputDate.vue.d.ts +0 -16
- package/dist/components/PrimeOutputDuration.d.vue.ts +0 -16
- package/dist/components/PrimeOutputDuration.vue.d.ts +0 -16
- package/dist/components/PrimeOutputLink.d.vue.ts +0 -16
- package/dist/components/PrimeOutputLink.vue.d.ts +0 -16
- package/dist/components/PrimeOutputList.d.vue.ts +0 -19
- package/dist/components/PrimeOutputList.vue.d.ts +0 -19
- package/dist/components/PrimeOutputNumber.d.vue.ts +0 -16
- package/dist/components/PrimeOutputNumber.vue.d.ts +0 -16
- package/dist/components/PrimeOutputReference.d.vue.ts +0 -16
- package/dist/components/PrimeOutputReference.vue.d.ts +0 -16
- package/dist/components/PrimeOutputText.d.vue.ts +0 -22
- package/dist/components/PrimeOutputText.vue.d.ts +0 -22
- package/dist/components/PrimePassword.d.vue.ts +0 -33
- package/dist/components/PrimePassword.vue.d.ts +0 -33
- package/dist/components/PrimeRadioButton.d.vue.ts +0 -28
- package/dist/components/PrimeRadioButton.vue.d.ts +0 -28
- package/dist/components/PrimeRating.d.vue.ts +0 -24
- package/dist/components/PrimeRating.vue.d.ts +0 -24
- package/dist/components/PrimeSelect.d.vue.ts +0 -50
- package/dist/components/PrimeSelect.vue.d.ts +0 -50
- package/dist/components/PrimeSelectButton.d.vue.ts +0 -28
- package/dist/components/PrimeSelectButton.vue.d.ts +0 -28
- package/dist/components/PrimeSlider.d.vue.ts +0 -26
- package/dist/components/PrimeSlider.vue.d.ts +0 -26
- package/dist/components/PrimeTextarea.d.vue.ts +0 -25
- package/dist/components/PrimeTextarea.vue.d.ts +0 -25
- package/dist/components/PrimeToggleButton.d.vue.ts +0 -26
- package/dist/components/PrimeToggleButton.vue.d.ts +0 -26
- package/dist/components/PrimeToggleSwitch.d.vue.ts +0 -23
- package/dist/components/PrimeToggleSwitch.vue.d.ts +0 -23
- package/dist/components/PrimeTreeSelect.d.vue.ts +0 -32
- package/dist/components/PrimeTreeSelect.vue.d.ts +0 -32
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
9
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
10
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
11
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { useFormKitSection } from "../composables/index.ts";
|
|
5
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
6
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
7
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
12
8
|
const props = defineProps({
|
|
13
9
|
context: {
|
|
14
|
-
type: Object
|
|
15
|
-
required: true
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
const { d } = useI18n()
|
|
22
|
-
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
15
|
+
const { d } = useI18n();
|
|
23
16
|
const converted = computed(() => {
|
|
24
17
|
if (props?.context?._value) {
|
|
25
|
-
let result =
|
|
26
|
-
const format = props?.context?.attrs?.value?.format ? props?.context?.attrs.value.format :
|
|
18
|
+
let result = "";
|
|
19
|
+
const format = props?.context?.attrs?.value?.format ? props?.context?.attrs.value.format : "short";
|
|
27
20
|
try {
|
|
28
|
-
result = d(props?.context?._value, format)
|
|
29
|
-
}
|
|
30
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
31
|
-
catch (e) {
|
|
21
|
+
result = d(props?.context?._value, format);
|
|
22
|
+
} catch (e) {
|
|
32
23
|
}
|
|
33
|
-
return result
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return ''
|
|
24
|
+
return result;
|
|
25
|
+
} else {
|
|
26
|
+
return "";
|
|
37
27
|
}
|
|
38
|
-
})
|
|
28
|
+
});
|
|
39
29
|
</script>
|
|
40
30
|
|
|
41
31
|
<template>
|
|
42
32
|
<div class="p-formkit p-output-date">
|
|
43
|
-
<FormKitIcon
|
|
33
|
+
<FormKitIcon
|
|
34
|
+
v-if="hasPrefixIcon"
|
|
35
|
+
:icon-class="context?.iconPrefix as string"
|
|
36
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
37
|
+
position="prefix"
|
|
38
|
+
/>
|
|
44
39
|
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
45
40
|
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
46
41
|
{{ converted }}
|
|
47
42
|
</span>
|
|
48
43
|
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
49
|
-
<FormKitIcon
|
|
44
|
+
<FormKitIcon
|
|
45
|
+
v-if="hasSuffixIcon"
|
|
46
|
+
:icon-class="context?.iconSuffix as string"
|
|
47
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
48
|
+
position="suffix"
|
|
49
|
+
/>
|
|
50
50
|
</div>
|
|
51
51
|
</template>
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
7
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
8
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
9
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitSection, useOutputDuration } from "../composables/index.ts";
|
|
3
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
4
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
5
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
10
6
|
const props = defineProps({
|
|
11
7
|
context: {
|
|
12
|
-
type: Object
|
|
13
|
-
required: true
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
const { formattedDuration } = useOutputDuration()
|
|
8
|
+
type: Object,
|
|
9
|
+
required: true
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
13
|
+
const { formattedDuration } = useOutputDuration();
|
|
20
14
|
</script>
|
|
21
15
|
|
|
22
16
|
<template>
|
|
23
17
|
<div class="p-formkit p-output-duration">
|
|
24
|
-
<FormKitIcon
|
|
18
|
+
<FormKitIcon
|
|
19
|
+
v-if="hasPrefixIcon"
|
|
20
|
+
:icon-class="context?.iconPrefix as string"
|
|
21
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
22
|
+
position="prefix"
|
|
23
|
+
/>
|
|
25
24
|
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
26
25
|
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
27
26
|
{{ formattedDuration(context?._value) }}
|
|
28
27
|
</span>
|
|
29
28
|
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
30
|
-
<FormKitIcon
|
|
29
|
+
<FormKitIcon
|
|
30
|
+
v-if="hasSuffixIcon"
|
|
31
|
+
:icon-class="context?.iconSuffix as string"
|
|
32
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
33
|
+
position="suffix"
|
|
34
|
+
/>
|
|
31
35
|
</div>
|
|
32
36
|
</template>
|
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
8
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
9
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
10
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useFormKitSection } from "../composables/index.ts";
|
|
4
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
5
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
6
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
11
7
|
const props = defineProps({
|
|
12
8
|
context: {
|
|
13
|
-
type: Object
|
|
14
|
-
required: true
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
19
|
-
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
20
14
|
const url = computed(() => {
|
|
21
15
|
if (props.context?._value)
|
|
22
|
-
return props.context?._value.indexOf(
|
|
23
|
-
else
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
16
|
+
return props.context?._value.indexOf("http") > -1 ? props.context?._value : `https://${props.context?._value}`;
|
|
17
|
+
else return "";
|
|
18
|
+
});
|
|
27
19
|
const title = computed(() => {
|
|
28
|
-
const value = props.context?._value ??
|
|
29
|
-
return props.context?.title ?? value
|
|
30
|
-
})
|
|
20
|
+
const value = props.context?._value ?? "";
|
|
21
|
+
return props.context?.title ?? value;
|
|
22
|
+
});
|
|
31
23
|
</script>
|
|
32
24
|
|
|
33
25
|
<template>
|
|
34
26
|
<div class="p-formkit p-output-link">
|
|
35
|
-
<FormKitIcon
|
|
27
|
+
<FormKitIcon
|
|
28
|
+
v-if="hasPrefixIcon"
|
|
29
|
+
:icon-class="context?.iconPrefix as string"
|
|
30
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
31
|
+
position="prefix"
|
|
32
|
+
/>
|
|
36
33
|
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
37
34
|
<a
|
|
38
35
|
v-if="context?.value"
|
|
@@ -45,6 +42,11 @@ const title = computed(() => {
|
|
|
45
42
|
<span>{{ title }}</span>
|
|
46
43
|
</a>
|
|
47
44
|
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
48
|
-
<FormKitIcon
|
|
45
|
+
<FormKitIcon
|
|
46
|
+
v-if="hasSuffixIcon"
|
|
47
|
+
:icon-class="context?.iconSuffix as string"
|
|
48
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
49
|
+
position="suffix"
|
|
50
|
+
/>
|
|
49
51
|
</div>
|
|
50
52
|
</template>
|
|
@@ -1,68 +1,94 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
9
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
10
|
-
|
|
11
|
-
export interface PrimeOutputListProps {
|
|
12
|
-
convertValue?: (array: []) => []
|
|
13
|
-
}
|
|
14
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useFormKitSection } from "../composables/index.ts";
|
|
4
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
5
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
6
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
7
|
+
import { options } from "@formkit/inputs";
|
|
15
8
|
const props = defineProps({
|
|
16
9
|
context: {
|
|
17
|
-
type: Object
|
|
18
|
-
required: true
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
22
14
|
const listStyle = computed(() => {
|
|
23
|
-
return props.context?.listStyle ||
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
27
|
-
|
|
15
|
+
return props.context?.listStyle || "span";
|
|
16
|
+
});
|
|
17
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
28
18
|
const getListValues = computed(() => {
|
|
29
|
-
const values = Array.isArray(props.context?._value) ? props.context._value : []
|
|
30
|
-
if (
|
|
31
|
-
|
|
19
|
+
const values = Array.isArray(props.context?._value) ? props.context._value : [];
|
|
20
|
+
if (props.context?.options && props.context?.optionValue) {
|
|
21
|
+
const key = "" + props.context.optionValue;
|
|
22
|
+
return values.map((value) => {
|
|
23
|
+
const foundOption = props.context?.options?.find((option) => option[key] === value);
|
|
24
|
+
return foundOption ? foundOption[props.context?.optionLabel] : value;
|
|
25
|
+
});
|
|
26
|
+
} else if (typeof props.context?.convertValue === "function") {
|
|
27
|
+
return props.context.convertValue([...values]);
|
|
32
28
|
}
|
|
33
|
-
return values
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const listItemsClass = computed(() => props.context?.attrs?.class || '')
|
|
29
|
+
return values;
|
|
30
|
+
});
|
|
31
|
+
const dividerClass = computed(() => props.context?.dividerClass || "");
|
|
32
|
+
const itemClass = computed(() => props.context?.itemClass || "");
|
|
33
|
+
const listItemsClass = computed(() => props.context?.attrs?.class || "");
|
|
39
34
|
</script>
|
|
40
35
|
|
|
41
36
|
<template>
|
|
42
37
|
<div class="p-formkit p-output-list">
|
|
43
|
-
<FormKitIcon
|
|
38
|
+
<FormKitIcon
|
|
39
|
+
v-if="hasPrefixIcon"
|
|
40
|
+
:icon-class="context?.iconPrefix as string"
|
|
41
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
42
|
+
position="prefix"
|
|
43
|
+
/>
|
|
44
44
|
<FormKitPrefix v-if="hasPrefix && listStyle === 'span'" :prefix="context?.prefix as string" />
|
|
45
|
-
<span
|
|
45
|
+
<span
|
|
46
|
+
v-if="listStyle === 'span'"
|
|
47
|
+
:id="context?.id"
|
|
48
|
+
:style="context?.attrs?.style"
|
|
49
|
+
class="p-output-list-items"
|
|
50
|
+
:class="listItemsClass"
|
|
51
|
+
>
|
|
46
52
|
<template v-for="(value, index) of getListValues" :key="index">
|
|
47
|
-
<span v-if="index !== 0" class="p-output-list-divider" :class="dividerClass">{{
|
|
53
|
+
<span v-if="index !== 0" class="p-output-list-divider" :class="dividerClass">{{
|
|
54
|
+
context?.divider ?? ", "
|
|
55
|
+
}}</span>
|
|
48
56
|
<span class="p-output-list-item" :class="itemClass">{{ value }}</span>
|
|
49
57
|
</template>
|
|
50
58
|
</span>
|
|
51
|
-
<div
|
|
59
|
+
<div
|
|
60
|
+
v-if="listStyle === 'div'"
|
|
61
|
+
:id="context?.id"
|
|
62
|
+
:style="context?.attrs?.style"
|
|
63
|
+
class="p-output-list-items"
|
|
64
|
+
:class="listItemsClass"
|
|
65
|
+
>
|
|
52
66
|
<template v-for="(value, index) of getListValues" :key="index">
|
|
53
67
|
<div class="p-output-list-item" :class="itemClass">
|
|
54
68
|
{{ value }}
|
|
55
69
|
</div>
|
|
56
70
|
</template>
|
|
57
71
|
</div>
|
|
58
|
-
<ul
|
|
72
|
+
<ul
|
|
73
|
+
v-if="listStyle === 'ul'"
|
|
74
|
+
:id="context?.id"
|
|
75
|
+
:style="context?.attrs?.style"
|
|
76
|
+
class="p-output-list-items"
|
|
77
|
+
:class="listItemsClass"
|
|
78
|
+
>
|
|
59
79
|
<li v-for="(value, index) of getListValues" :key="index">
|
|
60
80
|
<span class="p-output-list-item" :class="itemClass">
|
|
61
81
|
{{ value }}
|
|
62
82
|
</span>
|
|
63
83
|
</li>
|
|
64
84
|
</ul>
|
|
65
|
-
<ol
|
|
85
|
+
<ol
|
|
86
|
+
v-if="listStyle === 'ol'"
|
|
87
|
+
:id="context?.id"
|
|
88
|
+
:style="context?.attrs?.style"
|
|
89
|
+
class="p-output-list-items"
|
|
90
|
+
:class="listItemsClass"
|
|
91
|
+
>
|
|
66
92
|
<li v-for="(value, index) of getListValues" :key="index">
|
|
67
93
|
<span class="p-output-list-item" :class="itemClass">
|
|
68
94
|
{{ value }}
|
|
@@ -70,6 +96,11 @@ const listItemsClass = computed(() => props.context?.attrs?.class || '')
|
|
|
70
96
|
</li>
|
|
71
97
|
</ol>
|
|
72
98
|
<FormKitSuffix v-if="hasSuffix && listStyle === 'span'" :suffix="context?.suffix as string" />
|
|
73
|
-
<FormKitIcon
|
|
99
|
+
<FormKitIcon
|
|
100
|
+
v-if="hasSuffixIcon"
|
|
101
|
+
:icon-class="context?.iconSuffix as string"
|
|
102
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
103
|
+
position="suffix"
|
|
104
|
+
/>
|
|
74
105
|
</div>
|
|
75
106
|
</template>
|
|
@@ -1,59 +1,56 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useFormKitSection } from '../composables'
|
|
9
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
10
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
11
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
12
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { useFormKitSection } from "../composables/index.ts";
|
|
5
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
6
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
7
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
13
8
|
const props = defineProps({
|
|
14
9
|
context: {
|
|
15
|
-
type: Object
|
|
16
|
-
required: true
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
-
const { n } = useI18n()
|
|
23
|
-
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
15
|
+
const { n } = useI18n();
|
|
24
16
|
const converted = computed(() => {
|
|
25
|
-
const value = props?.context?._value
|
|
17
|
+
const value = props?.context?._value;
|
|
26
18
|
if (value) {
|
|
27
|
-
let result =
|
|
28
|
-
const format = props?.context?.attrs?.format ? props?.context?.attrs?.format :
|
|
19
|
+
let result = "";
|
|
20
|
+
const format = props?.context?.attrs?.format ? props?.context?.attrs?.format : "short";
|
|
29
21
|
try {
|
|
30
|
-
result = n(value, format)
|
|
31
|
-
}
|
|
32
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
33
|
-
catch (e) {
|
|
22
|
+
result = n(value, format);
|
|
23
|
+
} catch (e) {
|
|
34
24
|
try {
|
|
35
|
-
result = n(+value, format)
|
|
36
|
-
}
|
|
37
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
38
|
-
catch (e) {
|
|
25
|
+
result = n(+value, format);
|
|
26
|
+
} catch (e2) {
|
|
39
27
|
}
|
|
40
28
|
}
|
|
41
|
-
return result
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return ''
|
|
29
|
+
return result;
|
|
30
|
+
} else {
|
|
31
|
+
return "";
|
|
45
32
|
}
|
|
46
|
-
})
|
|
33
|
+
});
|
|
47
34
|
</script>
|
|
48
35
|
|
|
49
36
|
<template>
|
|
50
37
|
<div class="p-formkit p-output-number">
|
|
51
|
-
<FormKitIcon
|
|
38
|
+
<FormKitIcon
|
|
39
|
+
v-if="hasPrefixIcon"
|
|
40
|
+
:icon-class="context?.iconPrefix as string"
|
|
41
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
42
|
+
position="prefix"
|
|
43
|
+
/>
|
|
52
44
|
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
53
45
|
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
54
46
|
{{ converted }}
|
|
55
47
|
</span>
|
|
56
48
|
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
57
|
-
<FormKitIcon
|
|
49
|
+
<FormKitIcon
|
|
50
|
+
v-if="hasSuffixIcon"
|
|
51
|
+
:icon-class="context?.iconSuffix as string"
|
|
52
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
53
|
+
position="suffix"
|
|
54
|
+
/>
|
|
58
55
|
</div>
|
|
59
56
|
</template>
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
8
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
9
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
10
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useFormKitSection } from "../composables/index.ts";
|
|
4
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
5
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
6
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
11
7
|
const props = defineProps({
|
|
12
8
|
context: {
|
|
13
|
-
type: Object
|
|
14
|
-
required: true
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
19
|
-
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
20
14
|
const reference = computed(() => {
|
|
21
|
-
const value = props.context?._value ??
|
|
22
|
-
let result = props.context?.reference ? `${props.context?.reference}` :
|
|
23
|
-
if (!props.context?.internal && !result.includes(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
27
|
-
|
|
15
|
+
const value = props.context?._value ?? "";
|
|
16
|
+
let result = props.context?.reference ? `${props.context?.reference}` : "reference-must-be-set";
|
|
17
|
+
if (!props.context?.internal && !result.includes("http")) result = `https://${result}`;
|
|
18
|
+
return result.replace(/\{\{.*\}\}/, value);
|
|
19
|
+
});
|
|
28
20
|
const title = computed(() => {
|
|
29
|
-
const value = props.context?._value ??
|
|
30
|
-
const result = props.context?.title ?? value
|
|
31
|
-
return `${result}`.replace(/\{\{.*\}\}/, value)
|
|
32
|
-
})
|
|
21
|
+
const value = props.context?._value ?? "";
|
|
22
|
+
const result = props.context?.title ?? value;
|
|
23
|
+
return `${result}`.replace(/\{\{.*\}\}/, value);
|
|
24
|
+
});
|
|
33
25
|
</script>
|
|
34
26
|
|
|
35
27
|
<template>
|
|
36
28
|
<div class="p-formkit p-output-reference">
|
|
37
|
-
<FormKitIcon
|
|
29
|
+
<FormKitIcon
|
|
30
|
+
v-if="hasPrefixIcon"
|
|
31
|
+
:icon-class="context?.iconPrefix as string"
|
|
32
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
33
|
+
position="prefix"
|
|
34
|
+
/>
|
|
38
35
|
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
39
36
|
<component
|
|
40
37
|
:is="context?.linkComponentName ? context?.linkComponentName : 'RouterLink'"
|
|
@@ -57,6 +54,11 @@ const title = computed(() => {
|
|
|
57
54
|
{{ title }}
|
|
58
55
|
</a>
|
|
59
56
|
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
60
|
-
<FormKitIcon
|
|
57
|
+
<FormKitIcon
|
|
58
|
+
v-if="hasSuffixIcon"
|
|
59
|
+
:icon-class="context?.iconSuffix as string"
|
|
60
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
61
|
+
position="suffix"
|
|
62
|
+
/>
|
|
61
63
|
</div>
|
|
62
64
|
</template>
|