@sfxcode/formkit-primevue 2.3.5 → 2.3.7

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.
Files changed (54) hide show
  1. package/dist/components/FormKitDataEdit.vue +6 -0
  2. package/dist/components/FormKitDataView.vue +5 -0
  3. package/dist/components/PrimeAutoComplete.vue +2 -3
  4. package/dist/components/PrimeCascadeSelect.vue +3 -3
  5. package/dist/components/PrimeCheckbox.vue +3 -3
  6. package/dist/components/PrimeColorPicker.vue +3 -3
  7. package/dist/components/PrimeDatePicker.vue +3 -3
  8. package/dist/components/PrimeEditor.vue +3 -3
  9. package/dist/components/PrimeInputMask.vue +5 -9
  10. package/dist/components/PrimeInputNumber.vue +3 -3
  11. package/dist/components/PrimeInputOtp.vue +3 -3
  12. package/dist/components/PrimeInputText.vue +7 -7
  13. package/dist/components/PrimeKnob.vue +3 -3
  14. package/dist/components/PrimeListbox.vue +3 -3
  15. package/dist/components/PrimeMultiSelect.vue +3 -3
  16. package/dist/components/PrimeOutputBoolean.vue +11 -6
  17. package/dist/components/PrimeOutputDate.vue +11 -6
  18. package/dist/components/PrimeOutputDuration.vue +11 -6
  19. package/dist/components/PrimeOutputLink.vue +11 -6
  20. package/dist/components/PrimeOutputList.vue +11 -6
  21. package/dist/components/PrimeOutputNumber.vue +20 -8
  22. package/dist/components/PrimeOutputText.vue +11 -6
  23. package/dist/components/PrimePassword.vue +3 -3
  24. package/dist/components/PrimeRadioButton.vue +3 -3
  25. package/dist/components/PrimeRating.vue +3 -3
  26. package/dist/components/PrimeSelect.vue +3 -3
  27. package/dist/components/PrimeSelectButton.vue +3 -3
  28. package/dist/components/PrimeSlider.vue +3 -3
  29. package/dist/components/PrimeTextarea.vue +3 -3
  30. package/dist/components/PrimeToggleButton.vue +3 -3
  31. package/dist/components/PrimeToggleSwitch.vue +3 -3
  32. package/dist/components/PrimeTreeSelect.vue +3 -3
  33. package/dist/composables/index.d.ts +2 -2
  34. package/dist/composables/index.js +5 -5
  35. package/dist/composables/index.mjs +2 -2
  36. package/dist/composables/useFormKitIcon.js +2 -3
  37. package/dist/composables/useFormKitIcon.mjs +2 -4
  38. package/dist/composables/useFormKitInput.d.ts +0 -1
  39. package/dist/composables/useFormKitInput.js +0 -4
  40. package/dist/composables/useFormKitInput.mjs +1 -4
  41. package/dist/composables/useFormKitSection.d.ts +6 -0
  42. package/dist/composables/useFormKitSection.js +27 -0
  43. package/dist/composables/useFormKitSection.mjs +16 -0
  44. package/dist/composables/useInputEditor.d.ts +1 -0
  45. package/dist/composables/useInputEditor.js +2 -0
  46. package/dist/composables/useInputEditor.mjs +2 -1
  47. package/dist/composables/useInputEditorSchema.js +34 -21
  48. package/dist/composables/useInputEditorSchema.mjs +44 -24
  49. package/dist/sass/formkit-primevue.scss +24 -21
  50. package/dist/style.css +1 -1
  51. package/package.json +1 -1
  52. package/dist/composables/useFormKitOutput.d.ts +0 -3
  53. package/dist/composables/useFormKitOutput.js +0 -15
  54. package/dist/composables/useFormKitOutput.mjs +0 -7
@@ -1,16 +1,18 @@
1
1
  <script setup lang='ts'>
2
- import { useFormKitIcon, useFormKitOutput } from '../composables'
2
+ import { useFormKitSection } from '../composables'
3
3
 
4
4
  const props = defineProps({
5
5
  context: Object,
6
6
  })
7
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-text')
8
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
7
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
9
8
  </script>
10
9
 
11
10
  <template>
12
- <div :class="wrapperClass">
13
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
11
+ <div class="p-formkit p-output-text">
12
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
13
+ <span v-if="hasPrefix" class="formkit-prefix">
14
+ {{ context?.attrs?.prefix }}
15
+ </span>
14
16
  <span
15
17
  :id="context?.id"
16
18
  :style="context?.attrs?.style"
@@ -18,6 +20,9 @@ const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
18
20
  >
19
21
  {{ context?._value }}
20
22
  </span>
21
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
23
+ <span v-if="hasSuffix" class="formkit-suffix">
24
+ {{ context?.attrs?.suffix }}
25
+ </span>
26
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
22
27
  </div>
23
28
  </template>
@@ -20,7 +20,7 @@ export interface FormKitPrimePasswordProps {
20
20
  placeholder?: PasswordProps['placeholder']
21
21
  feedback?: PasswordProps['feedback']
22
22
  toggleMask?: PasswordProps['toggleMask']
23
- wrapperClass?: string
23
+
24
24
  }
25
25
 
26
26
  const props = defineProps({
@@ -30,11 +30,11 @@ const props = defineProps({
30
30
  },
31
31
  })
32
32
 
33
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
33
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
34
34
  </script>
35
35
 
36
36
  <template>
37
- <div :class="wrapperClass">
37
+ <div class="p-formkit">
38
38
  <Password
39
39
  v-model="context._value"
40
40
  v-bind="context?.attrs"
@@ -12,7 +12,7 @@ export interface FormKitPrimeRadioButtonProps {
12
12
  options?: { label: string, value: any }[]
13
13
  optionClass?: string
14
14
  labelClass?: string
15
- wrapperClass?: string
15
+
16
16
  }
17
17
 
18
18
  const props = defineProps({
@@ -22,11 +22,11 @@ const props = defineProps({
22
22
  },
23
23
  })
24
24
 
25
- const { styleClass, wrapperClass, handleChange, handleBlur } = useFormKitInput(props.context)
25
+ const { styleClass, handleChange, handleBlur } = useFormKitInput(props.context)
26
26
  </script>
27
27
 
28
28
  <template>
29
- <div :class="wrapperClass">
29
+ <div class="p-formkit">
30
30
  <div v-for="option in context.options" :key="option.value" :class="context.optionClass">
31
31
  <RadioButton
32
32
  :id="context.id"
@@ -12,7 +12,7 @@ export interface FormKitPrimeRatingProps {
12
12
  offIcon?: RatingProps['offIcon']
13
13
  ptOptions?: RatingProps['ptOptions']
14
14
  pt?: RatingProps['pt']
15
- wrapperClass?: string
15
+
16
16
  }
17
17
 
18
18
  const props = defineProps({
@@ -22,11 +22,11 @@ const props = defineProps({
22
22
  },
23
23
  })
24
24
 
25
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
25
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
26
26
  </script>
27
27
 
28
28
  <template>
29
- <div :class="wrapperClass">
29
+ <div class="p-formkit">
30
30
  <Rating
31
31
  :id="context.id"
32
32
  v-model="context._value"
@@ -37,7 +37,7 @@ export interface FormKitPrimeSelectProps {
37
37
  pt?: SelectProps['pt']
38
38
  ptOptions?: SelectProps['ptOptions']
39
39
  unstyled?: SelectProps['unstyled']
40
- wrapperClass?: string
40
+
41
41
  }
42
42
 
43
43
  const props = defineProps({
@@ -47,11 +47,11 @@ const props = defineProps({
47
47
  },
48
48
  })
49
49
 
50
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
50
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
51
51
  </script>
52
52
 
53
53
  <template>
54
- <div :class="wrapperClass">
54
+ <div class="p-formkit">
55
55
  <Select
56
56
  v-model="context._value"
57
57
  v-bind="context?.attrs"
@@ -15,7 +15,7 @@ export interface FormKitPrimeSelectButtonProps {
15
15
  multiple?: SelectButtonProps['multiple']
16
16
  dataKey?: SelectButtonProps['dataKey']
17
17
  options?: SelectButtonProps['options']
18
- wrapperClass?: string
18
+
19
19
  }
20
20
 
21
21
  const props = defineProps({
@@ -25,11 +25,11 @@ const props = defineProps({
25
25
  },
26
26
  })
27
27
 
28
- const { styleClass, wrapperClass, handleChange, handleBlur } = useFormKitInput(props.context)
28
+ const { styleClass, handleChange, handleBlur } = useFormKitInput(props.context)
29
29
  </script>
30
30
 
31
31
  <template>
32
- <div :class="wrapperClass">
32
+ <div class="p-formkit">
33
33
  <SelectButton
34
34
  :id="context.id"
35
35
  v-model="context._value"
@@ -14,7 +14,7 @@ export interface FormKitPrimeSliderProps {
14
14
  step?: SliderProps['step']
15
15
  range?: SliderProps['range']
16
16
  orientation?: SliderProps['orientation']
17
- wrapperClass?: string
17
+
18
18
  }
19
19
 
20
20
  const props = defineProps({
@@ -24,7 +24,7 @@ const props = defineProps({
24
24
  },
25
25
  })
26
26
 
27
- const { styleClass, wrapperClass, handleBlur } = useFormKitInput(props.context)
27
+ const { styleClass, handleBlur } = useFormKitInput(props.context)
28
28
 
29
29
  function handleInput(e: any) {
30
30
  props.context?.node.input(e)
@@ -33,7 +33,7 @@ function handleInput(e: any) {
33
33
  </script>
34
34
 
35
35
  <template>
36
- <div :class="wrapperClass">
36
+ <div class="p-formkit">
37
37
  <Slider
38
38
  :id="context.id"
39
39
  v-model="context._value"
@@ -12,7 +12,7 @@ export interface FormKitPrimeTextareaProps {
12
12
  autoResize?: TextareaProps['autoResize']
13
13
  rows?: TextareaProps['rows']
14
14
  placeholder?: TextareaProps['placeholder']
15
- wrapperClass?: string
15
+
16
16
  }
17
17
 
18
18
  const props = defineProps({
@@ -22,11 +22,11 @@ const props = defineProps({
22
22
  },
23
23
  })
24
24
 
25
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
25
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
26
26
  </script>
27
27
 
28
28
  <template>
29
- <div :class="wrapperClass">
29
+ <div class="p-formkit">
30
30
  <Textarea
31
31
  :id="context.id"
32
32
  v-model="context._value"
@@ -14,7 +14,7 @@ export interface FormKitPrimeToggleButtonProps {
14
14
  onIcon?: ToggleButtonProps['onIcon']
15
15
  offIcon?: ToggleButtonProps['offIcon']
16
16
  iconPos?: ToggleButtonProps['iconPos']
17
- wrapperClass?: string
17
+
18
18
  }
19
19
 
20
20
  const props = defineProps({
@@ -24,11 +24,11 @@ const props = defineProps({
24
24
  },
25
25
  })
26
26
 
27
- const { styleClass, wrapperClass, handleChange, handleBlur } = useFormKitInput(props.context)
27
+ const { styleClass, handleChange, handleBlur } = useFormKitInput(props.context)
28
28
  </script>
29
29
 
30
30
  <template>
31
- <div :class="wrapperClass">
31
+ <div class="p-formkit">
32
32
  <ToggleButton
33
33
  v-model="context._value"
34
34
  v-bind="context?.attrs"
@@ -13,7 +13,7 @@ export interface FormKitPrimeToggleSwitchProps {
13
13
  unstyled?: ToggleSwitchProps['unstyled']
14
14
  labelLeft?: string
15
15
  labelRight?: string
16
- wrapperClass?: string
16
+
17
17
  }
18
18
 
19
19
  const props = defineProps({
@@ -23,11 +23,11 @@ const props = defineProps({
23
23
  },
24
24
  })
25
25
 
26
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
26
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
27
27
  </script>
28
28
 
29
29
  <template>
30
- <div :class="wrapperClass">
30
+ <div class="p-formkit">
31
31
  <span v-if="context.labelLeft" class="formkit-prime-left">{{ context.labelLeft }}</span>
32
32
  <ToggleSwitch
33
33
  v-model="context._value"
@@ -19,7 +19,7 @@ export interface FormKitPrimeTreeSelectProps {
19
19
  scrollHeight?: TreeSelectProps['scrollHeight']
20
20
  panelClass?: TreeSelectProps['panelClass']
21
21
  variant?: TreeSelectProps['variant']
22
- wrapperClass?: string
22
+
23
23
  }
24
24
 
25
25
  const props = defineProps({
@@ -29,11 +29,11 @@ const props = defineProps({
29
29
  },
30
30
  })
31
31
 
32
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
32
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
33
33
  </script>
34
34
 
35
35
  <template>
36
- <div :class="wrapperClass">
36
+ <div class="p-formkit">
37
37
  <TreeSelect
38
38
  v-model="context._value"
39
39
  v-bind="context?.attrs"
@@ -1,8 +1,8 @@
1
1
  import { useFormKitIcon } from './useFormKitIcon';
2
2
  import { useFormKitInput } from './useFormKitInput';
3
- import { useFormKitOutput } from './useFormKitOutput';
4
3
  import { useFormKitSchema } from './useFormKitSchema';
4
+ import { useFormKitSection } from './useFormKitSection';
5
5
  import { useInputEditor } from './useInputEditor';
6
6
  import { useInputEditorSchema } from './useInputEditorSchema';
7
7
  import { useOutputDuration } from './useOutputDuration';
8
- export { useFormKitIcon, useFormKitInput, useFormKitOutput, useFormKitSchema, useInputEditor, useInputEditorSchema, useOutputDuration, };
8
+ export { useFormKitIcon, useFormKitInput, useFormKitSchema, useFormKitSection, useInputEditor, useInputEditorSchema, useOutputDuration, };
@@ -15,16 +15,16 @@ Object.defineProperty(exports, "useFormKitInput", {
15
15
  return _useFormKitInput.useFormKitInput;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "useFormKitOutput", {
18
+ Object.defineProperty(exports, "useFormKitSchema", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _useFormKitOutput.useFormKitOutput;
21
+ return _useFormKitSchema.useFormKitSchema;
22
22
  }
23
23
  });
24
- Object.defineProperty(exports, "useFormKitSchema", {
24
+ Object.defineProperty(exports, "useFormKitSection", {
25
25
  enumerable: true,
26
26
  get: function () {
27
- return _useFormKitSchema.useFormKitSchema;
27
+ return _useFormKitSection.useFormKitSection;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "useInputEditor", {
@@ -47,8 +47,8 @@ Object.defineProperty(exports, "useOutputDuration", {
47
47
  });
48
48
  var _useFormKitIcon = require("./useFormKitIcon");
49
49
  var _useFormKitInput = require("./useFormKitInput");
50
- var _useFormKitOutput = require("./useFormKitOutput");
51
50
  var _useFormKitSchema = require("./useFormKitSchema");
51
+ var _useFormKitSection = require("./useFormKitSection");
52
52
  var _useInputEditor = require("./useInputEditor");
53
53
  var _useInputEditorSchema = require("./useInputEditorSchema");
54
54
  var _useOutputDuration = require("./useOutputDuration");
@@ -1,15 +1,15 @@
1
1
  import { useFormKitIcon } from "./useFormKitIcon.mjs";
2
2
  import { useFormKitInput } from "./useFormKitInput.mjs";
3
- import { useFormKitOutput } from "./useFormKitOutput.mjs";
4
3
  import { useFormKitSchema } from "./useFormKitSchema.mjs";
4
+ import { useFormKitSection } from "./useFormKitSection.mjs";
5
5
  import { useInputEditor } from "./useInputEditor.mjs";
6
6
  import { useInputEditorSchema } from "./useInputEditorSchema.mjs";
7
7
  import { useOutputDuration } from "./useOutputDuration.mjs";
8
8
  export {
9
9
  useFormKitIcon,
10
10
  useFormKitInput,
11
- useFormKitOutput,
12
11
  useFormKitSchema,
12
+ useFormKitSection,
13
13
  useInputEditor,
14
14
  useInputEditorSchema,
15
15
  useOutputDuration
@@ -7,14 +7,13 @@ exports.useFormKitIcon = useFormKitIcon;
7
7
  var _vue = require("vue");
8
8
  function useFormKitIcon(context) {
9
9
  const hasIcon = (0, _vue.computed)(() => {
10
- if (context?.icon && context?.icon.length > 0) return true;
11
10
  return context?.attrs?.icon && context?.attrs?.icon.length > 0;
12
11
  });
13
12
  const icon = (0, _vue.computed)(() => {
14
- return context?.icon ?? context?.attrs?.icon;
13
+ return context?.attrs?.icon;
15
14
  });
16
15
  const iconPosition = (0, _vue.computed)(() => {
17
- return context?.iconPosition ?? context?.attrs?.iconPosition;
16
+ return context?.attrs?.iconPosition;
18
17
  });
19
18
  return {
20
19
  hasIcon,
@@ -1,15 +1,13 @@
1
1
  import { computed } from "vue";
2
2
  export function useFormKitIcon(context) {
3
3
  const hasIcon = computed(() => {
4
- if (context?.icon && context?.icon.length > 0)
5
- return true;
6
4
  return context?.attrs?.icon && context?.attrs?.icon.length > 0;
7
5
  });
8
6
  const icon = computed(() => {
9
- return context?.icon ?? context?.attrs?.icon;
7
+ return context?.attrs?.icon;
10
8
  });
11
9
  const iconPosition = computed(() => {
12
- return context?.iconPosition ?? context?.attrs?.iconPosition;
10
+ return context?.attrs?.iconPosition;
13
11
  });
14
12
  return { hasIcon, icon, iconPosition };
15
13
  }
@@ -1,6 +1,5 @@
1
1
  export declare function useFormKitInput(context: any): {
2
2
  styleClass: import("vue").ComputedRef<any>;
3
- wrapperClass: import("vue").ComputedRef<string>;
4
3
  handleBlur: (event: Event) => void;
5
4
  handleChange: (_: any) => void;
6
5
  handleInput: (_: any) => void;
@@ -9,9 +9,6 @@ function useFormKitInput(context) {
9
9
  const styleClass = (0, _vue.computed)(() => {
10
10
  return context?.state.validationVisible && !context?.state.valid ? `${context?.attrs?.class} p-invalid` : context?.attrs?.class;
11
11
  });
12
- const wrapperClass = (0, _vue.computed)(() => {
13
- return context?.wrapperClass ? `p-formkit ${context?.wrapperClass}` : "p-formkit ";
14
- });
15
12
  function handleBlur(event) {
16
13
  context?.handlers.blur(event);
17
14
  }
@@ -26,7 +23,6 @@ function useFormKitInput(context) {
26
23
  }
27
24
  return {
28
25
  styleClass,
29
- wrapperClass,
30
26
  handleBlur,
31
27
  handleChange,
32
28
  handleInput,
@@ -3,9 +3,6 @@ export function useFormKitInput(context) {
3
3
  const styleClass = computed(() => {
4
4
  return context?.state.validationVisible && !context?.state.valid ? `${context?.attrs?.class} p-invalid` : context?.attrs?.class;
5
5
  });
6
- const wrapperClass = computed(() => {
7
- return context?.wrapperClass ? `p-formkit ${context?.wrapperClass}` : "p-formkit ";
8
- });
9
6
  function handleBlur(event) {
10
7
  context?.handlers.blur(event);
11
8
  }
@@ -18,5 +15,5 @@ export function useFormKitInput(context) {
18
15
  function handleSelect(e) {
19
16
  context?.node.input(e);
20
17
  }
21
- return { styleClass, wrapperClass, handleBlur, handleChange, handleInput, handleSelect };
18
+ return { styleClass, handleBlur, handleChange, handleInput, handleSelect };
22
19
  }
@@ -0,0 +1,6 @@
1
+ export declare function useFormKitSection(context: any): {
2
+ hasPrefix: import("vue").ComputedRef<any>;
3
+ hasPrefixIcon: import("vue").ComputedRef<any>;
4
+ hasSuffix: import("vue").ComputedRef<any>;
5
+ hasSuffixIcon: import("vue").ComputedRef<any>;
6
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useFormKitSection = useFormKitSection;
7
+ var _vue = require("vue");
8
+ function useFormKitSection(context) {
9
+ const hasPrefix = (0, _vue.computed)(() => {
10
+ return context?.attrs?.prefix && context?.attrs?.prefix.length > 0;
11
+ });
12
+ const hasPrefixIcon = (0, _vue.computed)(() => {
13
+ return context?.prefixIcon && context?.prefixIcon.length > 0;
14
+ });
15
+ const hasSuffixIcon = (0, _vue.computed)(() => {
16
+ return context?.suffixIcon && context?.suffixIcon.length > 0;
17
+ });
18
+ const hasSuffix = (0, _vue.computed)(() => {
19
+ return context?.attrs?.suffix && context?.attrs?.suffix.length > 0;
20
+ });
21
+ return {
22
+ hasPrefix,
23
+ hasPrefixIcon,
24
+ hasSuffix,
25
+ hasSuffixIcon
26
+ };
27
+ }
@@ -0,0 +1,16 @@
1
+ import { computed } from "vue";
2
+ export function useFormKitSection(context) {
3
+ const hasPrefix = computed(() => {
4
+ return context?.attrs?.prefix && context?.attrs?.prefix.length > 0;
5
+ });
6
+ const hasPrefixIcon = computed(() => {
7
+ return context?.prefixIcon && context?.prefixIcon.length > 0;
8
+ });
9
+ const hasSuffixIcon = computed(() => {
10
+ return context?.suffixIcon && context?.suffixIcon.length > 0;
11
+ });
12
+ const hasSuffix = computed(() => {
13
+ return context?.attrs?.suffix && context?.attrs?.suffix.length > 0;
14
+ });
15
+ return { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon };
16
+ }
@@ -1,5 +1,6 @@
1
1
  export declare function useInputEditor(): {
2
2
  primeInputNames: string[];
3
+ primeOutputNames: string[];
3
4
  generateSchemaItemId: () => string;
4
5
  editorDataToSchema: (data: any) => any;
5
6
  editorDataToJson: (data: any) => string;
@@ -7,6 +7,7 @@ exports.useInputEditor = useInputEditor;
7
7
  function useInputEditor() {
8
8
  const primeInputWithOptionNames = ["CascadeSelect", "Listbox", "MultiSelect", "RadioButton", "Select", "SelectButton", "TreeSelect"];
9
9
  const primeInputNames = [...primeInputWithOptionNames, "AutoComplete", "Checkbox", "ColorPicker", "DatePicker", "Editor", "InputMask", "InputNumber", "InputOtp", "InputText", "Knob", "Password", "Rating", "Slider", "Textarea", "ToggleButton", "ToggleSwitch"].sort();
10
+ const primeOutputNames = ["OutputBoolean", "OutputDate", "OutputDuration", "OutputLink", "OutputList", "OutputNumber", "OutputText"];
10
11
  function generateSchemaItemId() {
11
12
  return `id-${Math.random().toString(36).substring(2, 15)}`;
12
13
  }
@@ -100,6 +101,7 @@ function useInputEditor() {
100
101
  }
101
102
  return {
102
103
  primeInputNames,
104
+ primeOutputNames,
103
105
  generateSchemaItemId,
104
106
  editorDataToSchema,
105
107
  editorDataToJson,
@@ -1,6 +1,7 @@
1
1
  export function useInputEditor() {
2
2
  const primeInputWithOptionNames = ["CascadeSelect", "Listbox", "MultiSelect", "RadioButton", "Select", "SelectButton", "TreeSelect"];
3
3
  const primeInputNames = [...primeInputWithOptionNames, "AutoComplete", "Checkbox", "ColorPicker", "DatePicker", "Editor", "InputMask", "InputNumber", "InputOtp", "InputText", "Knob", "Password", "Rating", "Slider", "Textarea", "ToggleButton", "ToggleSwitch"].sort();
4
+ const primeOutputNames = ["OutputBoolean", "OutputDate", "OutputDuration", "OutputLink", "OutputList", "OutputNumber", "OutputText"];
4
5
  function generateSchemaItemId() {
5
6
  return `id-${Math.random().toString(36).substring(2, 15)}`;
6
7
  }
@@ -64,5 +65,5 @@ export function useInputEditor() {
64
65
  const formkitInput = schema?.$formkit;
65
66
  return { ...schema, _dollar_formkit: formkitInput };
66
67
  }
67
- return { primeInputNames, generateSchemaItemId, editorDataToSchema, editorDataToJson, editorDataToCode: editorDataToObject, schemaToEditorData };
68
+ return { primeInputNames, primeOutputNames, generateSchemaItemId, editorDataToSchema, editorDataToJson, editorDataToCode: editorDataToObject, schemaToEditorData };
68
69
  }
@@ -14,7 +14,8 @@ function useInputEditorSchema() {
14
14
  addComponent
15
15
  } = (0, _useFormKitSchema.useFormKitSchema)();
16
16
  const {
17
- primeInputNames
17
+ primeInputNames,
18
+ primeOutputNames
18
19
  } = (0, _useInputEditor.useInputEditor)();
19
20
  function addFlexElement(children) {
20
21
  return addElement("div", children, {
@@ -82,14 +83,7 @@ function useInputEditorSchema() {
82
83
  label: "Submit",
83
84
  value: "submit"
84
85
  }];
85
- const positionOptions = [{
86
- label: "Left",
87
- value: "left"
88
- }, {
89
- label: "Right",
90
- value: "right"
91
- }];
92
- function editorSchema(inputOptions = primeInputOptions(primeInputNames)) {
86
+ function editorSchema(inputOptions = primeInputOptions([...primeInputNames, ...primeOutputNames])) {
93
87
  return [addGridElement([{
94
88
  $formkit: "primeSelect",
95
89
  id: "inputSelection",
@@ -99,6 +93,7 @@ function useInputEditorSchema() {
99
93
  optionLabel: "label",
100
94
  optionValue: "value",
101
95
  options: inputOptions,
96
+ filter: true,
102
97
  key: "schema_inputSelection",
103
98
  preserve: true
104
99
  }, {
@@ -134,14 +129,21 @@ function useInputEditorSchema() {
134
129
  label: "Input Help",
135
130
  key: "schema_help",
136
131
  preserve: true
137
- }, {
132
+ }, addGridElement([{
138
133
  $formkit: "primeInputText",
139
134
  if: "$get(selectButton).value === 'showBasic'",
140
135
  name: "value",
141
136
  label: "Input Value",
142
137
  key: "schema_value",
143
138
  preserve: true
144
- }, addGridElement([{
139
+ }, {
140
+ $formkit: "primeInputText",
141
+ if: "$get(selectButton).value === 'showBasic'",
142
+ name: "format",
143
+ label: "Value Format",
144
+ key: "schema_format",
145
+ preserve: true
146
+ }]), addGridElement([{
145
147
  $formkit: "primeInputText",
146
148
  if: "$get(selectButton).value === 'showBasic'",
147
149
  name: "id",
@@ -219,19 +221,30 @@ function useInputEditorSchema() {
219
221
  }, addGridElement([{
220
222
  $formkit: "primeInputText",
221
223
  if: "$get(selectButton).value === 'showDisplay'",
222
- name: "icon",
223
- label: "Icon",
224
- key: "schema_icon",
224
+ name: "prefixIcon",
225
+ label: "Prefix Icon",
226
+ key: "schema_prefix_icon",
225
227
  preserve: true
226
228
  }, {
227
- $formkit: "primeSelect",
229
+ $formkit: "primeInputText",
228
230
  if: "$get(selectButton).value === 'showDisplay'",
229
- name: "iconPosition",
230
- label: "Icon Position",
231
- optionLabel: "label",
232
- optionValue: "value",
233
- options: positionOptions,
234
- key: "schema_iconPosition",
231
+ name: "prefix",
232
+ label: "Prefix",
233
+ key: "schema_prefix",
234
+ preserve: true
235
+ }, {
236
+ $formkit: "primeInputText",
237
+ if: "$get(selectButton).value === 'showDisplay'",
238
+ name: "suffix",
239
+ label: "Suffix",
240
+ key: "schema_suffix",
241
+ preserve: true
242
+ }, {
243
+ $formkit: "primeInputText",
244
+ if: "$get(selectButton).value === 'showDisplay'",
245
+ name: "suffixIcon",
246
+ label: "Suffix Icon",
247
+ key: "schema_suffix_icon",
235
248
  preserve: true
236
249
  }, {
237
250
  $formkit: "primeCheckbox",