@sfxcode/formkit-primevue 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,14 +1,16 @@
1
1
  # Formkit - Primevue
2
2
 
3
- PrimeVue based formkit inputs for using [FormKit](https://formkit.com/) with the [PrimeVue UI Framework](https://www.primefaces.org/primevue/#/).
3
+ PrimeVue based [FormKit Inputs](https://sfxcode.github.io/formkit-primevue/guide/inputs.html) for using [FormKit](https://formkit.com/) with the [PrimeVue UI Framework](https://www.primefaces.org/primevue/#/).
4
4
 
5
5
  Main focus of this project is to provide configuration based forms with validation.
6
6
 
7
+ In addition, you can use the same pattern for **data output** from **schema** using [PrimeOutputs](https://sfxcode.github.io/formkit-primevue/guide/outputs.html).
8
+
7
9
  ## PrimeVue Versions
8
10
 
9
- Actual PrimeVue Version in the main branch is *4.x.*
11
+ Actual PrimeVue Version of the main branch is *4.x.*
10
12
 
11
- PrimeVue 3 is in the prime3 branch.
13
+ PrimeVue 3 is in the prime3 branch, but future development will only focus on PrimeVue 4
12
14
 
13
15
  ## Docs
14
16
 
@@ -30,13 +32,29 @@ app.use(plugin, defaultConfig({
30
32
  locales: { de, en },
31
33
  // Define the active locale
32
34
  locale: 'en',
33
- inputs: primeInputs,
35
+ inputs: primeInputs,
34
36
  }))
35
37
  ```
36
38
 
39
+ or if using also the output part
40
+
41
+ ```typescript
42
+ import { defaultConfig, plugin } from '@formkit/vue'
43
+ import { primeInputs, primeOutputs } from '@sfxcode/formkit-primevue'
44
+
45
+ app.use(plugin, defaultConfig({
46
+ locales: { de, en },
47
+ // Define the active locale
48
+ locale: 'en',
49
+ inputs: { ...primeInputs, ...primeOutputs },
50
+ }))
51
+ ```
52
+
53
+ Important: output elements depends on vue-i18n to style numbers, dates, ...
54
+
37
55
  ### Nuxt
38
56
 
39
- Important: use *autoimport: false* if using primevue formkit validation and include or
57
+ Important: use *autoimport: false* if using PrimeVue-FormKit validation and include or
40
58
  exclude not needed components as usual.
41
59
 
42
60
  Autoimport true prevents elements lookup correctly.
@@ -72,7 +90,7 @@ Prefixing of the PrimeVue component names is not supported.
72
90
 
73
91
  ### Basic Styling
74
92
 
75
- Basic styling is provided with the [formkit-primevue.scss](https://github.com/sfxcode/formkit-primevue/blob/main/src/sass/formkit-primevue.scss) file.
93
+ Basic styling is provided with the [formkit-primevue.scss](https://github.com/sfxcode/formkit-primevue/blob/main/src/sass/formkit-primevue.scss) file or the corresponding css file in the package.
76
94
 
77
95
  Features:
78
96
 
@@ -84,20 +102,20 @@ You can use it or take it as base for your own styling.
84
102
 
85
103
  ### Extended Styling
86
104
 
87
- - All inputs are wrapped in a div with a **p-formkit** class
88
- - Use *wrapperClass* to add additional styleclasses to wrapper div
89
- - Most Prime Components have access to class / styles attributes
90
- - Most Prime Components have access to class / styles attributes
105
+ - Styling outerClas, innerClass .... is provided by FormKit
106
+ - All inputs, outputs are wrapped in a div with a **p-formkit** class
107
+ - Most of the Prime Input Components have access to class / styles attributes
91
108
  - PT and PTOptions are available ([https://primevue.org/passthrough/](https://primevue.org/passthrough/))
92
109
  - [Styling](https://formkit-primevue.netlify.app/styling/base) and [PT](https://formkit-primevue.netlify.app/styling/passThrough) demo available
110
+ - [Grid](https://formkit-primevue.netlify.app/styling/grid) Demo of the provided grid styling (col-[1-12])
93
111
 
94
112
  ### Samples
95
113
 
96
114
  Some samples for common tasks are available
97
115
 
98
- - [Repeater](https://formkit-primevue.netlify.app/samples/repeater) (with the help of the useFormKitSchema composable)
99
- - [Grid](https://formkit-primevue.netlify.app/samples/grid)
100
- - [Input Editor](https://formkit-primevue.netlify.app/samples/inputEditor) (let you test the configurations in your schema file)
116
+ - [Repeater](https://formkit-primevue.netlify.app/samples/repeater) Use Repeater composable for using repeating values in your schema
117
+ - [Input Editor](https://formkit-primevue.netlify.app/samples/inputEditor) Edit FormKit schema on the based on a provided composable
118
+ - [Form Editor](https://formkit-primevue.netlify.app/samples/formEditor) Basic demo as starter to create Forms visually
101
119
 
102
120
  ## Showcases
103
121
 
@@ -131,7 +149,4 @@ Some samples for common tasks are available
131
149
  - ToggleSwitch
132
150
  - TreeSelect
133
151
 
134
- ## Demo
135
- [Demo/Playground](https://formkit-primevue.netlify.app/)
136
-
137
152
  ![](formkit-primevue.png)
@@ -36,13 +36,13 @@ const converted = computed(() => {
36
36
  <div class="p-formkit p-output-date">
37
37
  <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.iconPrefix" />
38
38
  <span v-if="hasPrefix" class="formkit-prefix">
39
- {{ context?.attrs?.prefix }}
39
+ {{ context?.prefix }}
40
40
  </span>
41
41
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
42
42
  {{ converted }}
43
43
  </span>
44
44
  <span v-if="hasSuffix" class="formkit-suffix">
45
- {{ context?.attrs?.suffix }}
45
+ {{ context?.suffix }}
46
46
  </span>
47
47
  <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.iconSuffix" />
48
48
  </div>
@@ -18,13 +18,13 @@ const { formattedDuration } = useOutputDuration()
18
18
  <div class="p-formkit p-output-duration">
19
19
  <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.iconPrefix" />
20
20
  <span v-if="hasPrefix" class="formkit-prefix">
21
- {{ context?.attrs?.prefix }}
21
+ {{ context?.prefix }}
22
22
  </span>
23
23
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
24
24
  {{ formattedDuration(context?._value) }}
25
25
  </span>
26
26
  <span v-if="hasSuffix" class="formkit-suffix">
27
- {{ context?.attrs?.suffix }}
27
+ {{ context?.suffix }}
28
28
  </span>
29
29
  <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.iconSuffix" />
30
30
  </div>
@@ -13,13 +13,18 @@ const props = defineProps({
13
13
  const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
14
14
 
15
15
  const url = computed(() => props.context?._value.indexOf('http') > -1 ? props.context?._value : `https://${props.context?._value}`)
16
+
17
+ const title = computed(() => {
18
+ const value = props.context?._value ?? ''
19
+ return props.context?.title ?? value
20
+ })
16
21
  </script>
17
22
 
18
23
  <template>
19
24
  <div class="p-formkit p-output-link">
20
25
  <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.iconPrefix" />
21
26
  <span v-if="hasPrefix" class="formkit-prefix">
22
- {{ context?.attrs?.prefix }}
27
+ {{ context?.prefix }}
23
28
  </span>
24
29
  <a
25
30
  :id="context?.id"
@@ -28,10 +33,10 @@ const url = computed(() => props.context?._value.indexOf('http') > -1 ? props.co
28
33
  :href="url"
29
34
  :target="context?.attrs?.target ?? '_new'"
30
35
  >
31
- {{ context?._value }}
36
+ <span>{{ title }}</span>
32
37
  </a>
33
38
  <span v-if="hasSuffix" class="formkit-suffix">
34
- {{ context?.attrs?.suffix }}
39
+ {{ context?.suffix }}
35
40
  </span>
36
41
  <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.iconSuffix" />
37
42
  </div>
@@ -17,7 +17,7 @@ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection
17
17
  <div class="p-formkit p-output-list">
18
18
  <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.iconPrefix" />
19
19
  <span v-if="hasPrefix" class="formkit-prefix">
20
- {{ context?.attrs?.prefix }}
20
+ {{ context?.prefix }}
21
21
  </span>
22
22
  <span :id="context?.id" :style="context?.attrs?.style" class="p-output-list-items" :class="context?.attrs?.class">
23
23
  <template v-for="(value, index) of context?._value" :key="index">
@@ -26,7 +26,7 @@ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection
26
26
  </template>
27
27
  </span>
28
28
  <span v-if="hasSuffix" class="formkit-suffix">
29
- {{ context?.attrs?.suffix }}
29
+ {{ context?.suffix }}
30
30
  </span>
31
31
  <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.iconSuffix" />
32
32
  </div>
@@ -44,13 +44,13 @@ const converted = computed(() => {
44
44
  <div class="p-formkit p-output-number">
45
45
  <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.iconPrefix" />
46
46
  <span v-if="hasPrefix" class="formkit-prefix">
47
- {{ context?.attrs?.prefix }}
47
+ {{ context?.prefix }}
48
48
  </span>
49
49
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
50
50
  {{ converted }}
51
51
  </span>
52
52
  <span v-if="hasSuffix" class="formkit-suffix">
53
- {{ context?.attrs?.suffix }}
53
+ {{ context?.suffix }}
54
54
  </span>
55
55
  <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.iconSuffix" />
56
56
  </div>
@@ -0,0 +1,62 @@
1
+ <script setup lang='ts'>
2
+ import { type PropType, computed } from 'vue'
3
+ import type { FormKitFrameworkContext } from '@formkit/core'
4
+ import { RouterLink } from 'vue-router'
5
+ import { useFormKitSection } from '../composables'
6
+
7
+ const props = defineProps({
8
+ context: {
9
+ type: Object as PropType<FormKitFrameworkContext>,
10
+ required: true,
11
+ },
12
+ })
13
+
14
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
15
+
16
+ const reference = computed(() => {
17
+ const value = props.context?._value ?? ''
18
+ let result = props.context?.reference ? `${props.context?.reference}` : 'reference-must-be-set'
19
+ if (!props.context?.internal && !result.includes('http'))
20
+ result = `https://${result}`
21
+ return result.replace(/\{\{.*\}\}/, value)
22
+ })
23
+
24
+ const title = computed(() => {
25
+ const value = props.context?._value ?? ''
26
+ const result = props.context?.title ?? value
27
+ return `${result}`.replace(/\{\{.*\}\}/, value)
28
+ })
29
+ </script>
30
+
31
+ <template>
32
+ <div class="p-formkit p-output-reference">
33
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.iconPrefix" />
34
+ <span v-if="hasPrefix" class="formkit-prefix">
35
+ {{ context?.prefix }}
36
+ </span>
37
+ <component
38
+ :is="context?.linkComponentName ? context?.linkComponentName : RouterLink"
39
+ v-if="context?.internal"
40
+ :style="context?.attrs?.style"
41
+ :class="context?.attrs?.class"
42
+ :to="reference"
43
+ v-bind="context?.attrs"
44
+ >
45
+ {{ title }}
46
+ </component>
47
+ <a
48
+ v-else
49
+ :id="context?.id"
50
+ :style="context?.attrs?.style"
51
+ :class="context?.attrs?.class"
52
+ :href="reference"
53
+ :target="context?.attrs?.target ?? '_new'"
54
+ >
55
+ {{ title }}
56
+ </a>
57
+ <span v-if="hasSuffix" class="formkit-suffix">
58
+ {{ context?.suffix }}
59
+ </span>
60
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.iconSuffix" />
61
+ </div>
62
+ </template>
@@ -17,17 +17,18 @@ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection
17
17
  <div class="p-formkit p-output-text">
18
18
  <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.iconPrefix" />
19
19
  <span v-if="hasPrefix" class="formkit-prefix">
20
- {{ context?.attrs?.prefix }}
20
+ {{ context?.prefix }}
21
21
  </span>
22
22
  <span
23
23
  :id="context?.id"
24
24
  :style="context?.attrs?.style"
25
25
  :class="context?.attrs?.class"
26
26
  >
27
- {{ context?._value }}
27
+ <span v-if="context?.html" v-html="context?._value" />
28
+ <span v-else v-text="context?._value" />
28
29
  </span>
29
30
  <span v-if="hasSuffix" class="formkit-suffix">
30
- {{ context?.attrs?.suffix }}
31
+ {{ context?.suffix }}
31
32
  </span>
32
33
  <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.iconSuffix" />
33
34
  </div>
@@ -7,7 +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
+ const primeOutputNames = ["OutputBoolean", "OutputDate", "OutputDuration", "OutputLink", "OutputList", "OutputNumber", "OutputReference", "OutputText"];
11
11
  function editorDataToSchema(data) {
12
12
  if (!data) return {};
13
13
  const formkitInput = data?._dollar_formkit;
@@ -32,16 +32,17 @@ function useInputEditor() {
32
32
  preserve: preserveValue
33
33
  };
34
34
  let outerClass = "";
35
- if (data.outerClassGrid && data.outerClassGrid !== "col-12") outerClass = data.outerClassGrid;
36
- if (data.outerClass) outerClass = `${outerClass} ${data.outerClass}`;
37
- if (outerClass.trim().length === 0) outerClass = void 0;
35
+ if (data.outerClass) outerClass = `${outerClass} ${data.outerClass}`.trim();
36
+ let wrapperClass = "";
37
+ if (data.wrapperClass) wrapperClass = `${wrapperClass} ${data.wrapperClass}`.trim();
38
+ let innerClass = "";
39
+ if (data.innerClass) innerClass = `${innerClass} ${data.innerClass}`.trim();
38
40
  const undefinedObject = {
39
41
  prime: void 0,
40
42
  schemaResultFormKey: void 0,
41
43
  _dollar_formkit: void 0,
42
44
  slots: void 0,
43
- selectButton: void 0,
44
- outerClassGrid: void 0
45
+ selectButton: void 0
45
46
  };
46
47
  const useOptions = primeInputWithOptionNames.map(s => `prime${s}`).includes(formkitInput);
47
48
  let result = {};
@@ -52,6 +53,8 @@ function useInputEditor() {
52
53
  ...undefinedObject,
53
54
  ...defaultObject,
54
55
  outerClass,
56
+ wrapperClass,
57
+ innerClass,
55
58
  optionLabel: "label",
56
59
  optionValue: "value"
57
60
  };else result = {
@@ -61,8 +64,16 @@ function useInputEditor() {
61
64
  ...undefinedObject,
62
65
  ...defaultObject,
63
66
  outerClass,
67
+ wrapperClass,
68
+ innerClass,
64
69
  options: void 0
65
70
  };
71
+ for (const key in result) {
72
+ const value = result[key];
73
+ if (typeof value === "string" || value instanceof String) {
74
+ if (value.trim().length === 0) result[key] = void 0;
75
+ }
76
+ }
66
77
  return result;
67
78
  }
68
79
  function dataToSchema(data) {
@@ -1,7 +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
+ const primeOutputNames = ["OutputBoolean", "OutputDate", "OutputDuration", "OutputLink", "OutputList", "OutputNumber", "OutputReference", "OutputText"];
5
5
  function editorDataToSchema(data) {
6
6
  if (!data)
7
7
  return {};
@@ -22,19 +22,28 @@ export function useInputEditor() {
22
22
  const preserveValue = data.preserve ? true : void 0;
23
23
  const defaultObject = { readonly: readonlyValue, disabled: disabledValue, preserve: preserveValue };
24
24
  let outerClass = "";
25
- if (data.outerClassGrid && data.outerClassGrid !== "col-12")
26
- outerClass = data.outerClassGrid;
27
25
  if (data.outerClass)
28
- outerClass = `${outerClass} ${data.outerClass}`;
29
- if (outerClass.trim().length === 0)
30
- outerClass = void 0;
31
- const undefinedObject = { prime: void 0, schemaResultFormKey: void 0, _dollar_formkit: void 0, slots: void 0, selectButton: void 0, outerClassGrid: void 0 };
26
+ outerClass = `${outerClass} ${data.outerClass}`.trim();
27
+ let wrapperClass = "";
28
+ if (data.wrapperClass)
29
+ wrapperClass = `${wrapperClass} ${data.wrapperClass}`.trim();
30
+ let innerClass = "";
31
+ if (data.innerClass)
32
+ innerClass = `${innerClass} ${data.innerClass}`.trim();
33
+ const undefinedObject = { prime: void 0, schemaResultFormKey: void 0, _dollar_formkit: void 0, slots: void 0, selectButton: void 0 };
32
34
  const useOptions = primeInputWithOptionNames.map((s) => `prime${s}`).includes(formkitInput);
33
35
  let result = {};
34
36
  if (useOptions)
35
- result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, outerClass, optionLabel: "label", optionValue: "value" };
37
+ result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, outerClass, wrapperClass, innerClass, optionLabel: "label", optionValue: "value" };
36
38
  else
37
- result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, outerClass, options: void 0 };
39
+ result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, outerClass, wrapperClass, innerClass, options: void 0 };
40
+ for (const key in result) {
41
+ const value = result[key];
42
+ if (typeof value === "string" || value instanceof String) {
43
+ if (value.trim().length === 0)
44
+ result[key] = void 0;
45
+ }
46
+ }
38
47
  return result;
39
48
  }
40
49
  function dataToSchema(data) {
@@ -138,7 +138,6 @@ export declare function useInputEditorSchema(): {
138
138
  $formkit: string;
139
139
  if: string;
140
140
  name: string;
141
- value: string;
142
141
  label: string;
143
142
  optionLabel: string;
144
143
  optionValue: string;
@@ -150,6 +149,7 @@ export declare function useInputEditorSchema(): {
150
149
  outerClass: string;
151
150
  preserve: boolean;
152
151
  id?: undefined;
152
+ value?: undefined;
153
153
  filter?: undefined;
154
154
  validation?: undefined;
155
155
  validationVisibility?: undefined;
@@ -60,43 +60,6 @@ function useInputEditorSchema() {
60
60
  label: "Submit",
61
61
  value: "submit"
62
62
  }];
63
- const colOptions = [{
64
- label: "Col-1",
65
- value: "col-1"
66
- }, {
67
- label: "Col-2",
68
- value: "col-2"
69
- }, {
70
- label: "Col-3",
71
- value: "col-3"
72
- }, {
73
- label: "Col-4",
74
- value: "col-4"
75
- }, {
76
- label: "Col-5",
77
- value: "col-5"
78
- }, {
79
- label: "Col-6",
80
- value: "col-6"
81
- }, {
82
- label: "Col-7",
83
- value: "col-7"
84
- }, {
85
- label: "Col-8",
86
- value: "col-8"
87
- }, {
88
- label: "Col-9",
89
- value: "col-9"
90
- }, {
91
- label: "Col-10",
92
- value: "col-10"
93
- }, {
94
- label: "Col-11",
95
- value: "col-11"
96
- }, {
97
- label: "Col-12",
98
- value: "col-12"
99
- }];
100
63
  function editorSchema(inputOptions = primeInputOptions([...primeInputNames, ...primeOutputNames])) {
101
64
  return [{
102
65
  $formkit: "primeSelect",
@@ -274,19 +237,20 @@ function useInputEditorSchema() {
274
237
  name: "outerClass",
275
238
  label: "Outer Class",
276
239
  key: "schema_outerClass",
277
- outerClass: "col-6",
278
240
  preserve: true
279
241
  }, {
280
- $formkit: "primeSelect",
242
+ $formkit: "primeInputText",
281
243
  if: "$get(selectButton).value === 'showStyle'",
282
- name: "outerClassGrid",
283
- value: "col-12",
284
- label: "Grid Options",
285
- optionLabel: "label",
286
- optionValue: "value",
287
- options: colOptions,
288
- key: "schema_outer-class-grid",
289
- outerClass: "col-6",
244
+ name: "wrapperClass",
245
+ label: "Wrapper Class",
246
+ key: "schema_wrapperClass",
247
+ preserve: true
248
+ }, {
249
+ $formkit: "primeInputText",
250
+ if: "$get(selectButton).value === 'showStyle'",
251
+ name: "innerClass",
252
+ label: "Inner Class",
253
+ key: "schema_innerClass",
290
254
  preserve: true
291
255
  }, {
292
256
  $formkit: "primeInputText",
@@ -301,7 +265,6 @@ function useInputEditorSchema() {
301
265
  if: "$get(selectButton).value === 'showValidation'",
302
266
  name: "validation-visibility",
303
267
  label: "Field Validation Visibility",
304
- value: "blur",
305
268
  optionLabel: "label",
306
269
  optionValue: "value",
307
270
  options: validationOptions,
@@ -24,20 +24,6 @@ export function useInputEditorSchema() {
24
24
  { label: "Dirty", value: "dirty" },
25
25
  { label: "Submit", value: "submit" }
26
26
  ];
27
- const colOptions = [
28
- { label: "Col-1", value: "col-1" },
29
- { label: "Col-2", value: "col-2" },
30
- { label: "Col-3", value: "col-3" },
31
- { label: "Col-4", value: "col-4" },
32
- { label: "Col-5", value: "col-5" },
33
- { label: "Col-6", value: "col-6" },
34
- { label: "Col-7", value: "col-7" },
35
- { label: "Col-8", value: "col-8" },
36
- { label: "Col-9", value: "col-9" },
37
- { label: "Col-10", value: "col-10" },
38
- { label: "Col-11", value: "col-11" },
39
- { label: "Col-12", value: "col-12" }
40
- ];
41
27
  function editorSchema(inputOptions = primeInputOptions([...primeInputNames, ...primeOutputNames])) {
42
28
  return [
43
29
  {
@@ -236,20 +222,22 @@ export function useInputEditorSchema() {
236
222
  name: "outerClass",
237
223
  label: "Outer Class",
238
224
  key: "schema_outerClass",
239
- outerClass: "col-6",
240
225
  preserve: true
241
226
  },
242
227
  {
243
- $formkit: "primeSelect",
228
+ $formkit: "primeInputText",
244
229
  if: "$get(selectButton).value === 'showStyle'",
245
- name: "outerClassGrid",
246
- value: "col-12",
247
- label: "Grid Options",
248
- optionLabel: "label",
249
- optionValue: "value",
250
- options: colOptions,
251
- key: "schema_outer-class-grid",
252
- outerClass: "col-6",
230
+ name: "wrapperClass",
231
+ label: "Wrapper Class",
232
+ key: "schema_wrapperClass",
233
+ preserve: true
234
+ },
235
+ {
236
+ $formkit: "primeInputText",
237
+ if: "$get(selectButton).value === 'showStyle'",
238
+ name: "innerClass",
239
+ label: "Inner Class",
240
+ key: "schema_innerClass",
253
241
  preserve: true
254
242
  },
255
243
  {
@@ -266,7 +254,6 @@ export function useInputEditorSchema() {
266
254
  if: "$get(selectButton).value === 'showValidation'",
267
255
  name: "validation-visibility",
268
256
  label: "Field Validation Visibility",
269
- value: "blur",
270
257
  optionLabel: "label",
271
258
  optionValue: "value",
272
259
  options: validationOptions,
@@ -26,6 +26,7 @@ export declare const primeInputs: {
26
26
  export declare const primeOutputs: {
27
27
  primeOutputText: import("@formkit/core").FormKitTypeDefinition;
28
28
  primeOutputLink: import("@formkit/core").FormKitTypeDefinition;
29
+ primeOutputReference: import("@formkit/core").FormKitTypeDefinition;
29
30
  primeOutputNumber: import("@formkit/core").FormKitTypeDefinition;
30
31
  primeOutputDate: import("@formkit/core").FormKitTypeDefinition;
31
32
  primeOutputBoolean: import("@formkit/core").FormKitTypeDefinition;
@@ -34,6 +34,7 @@ const primeInputs = exports.primeInputs = {
34
34
  const primeOutputs = exports.primeOutputs = {
35
35
  primeOutputText: _output.primeOutputTextDefinition,
36
36
  primeOutputLink: _output.primeOutputLinkDefinition,
37
+ primeOutputReference: _output.primeOutputReferenceDefinition,
37
38
  primeOutputNumber: _output.primeOutputNumberDefinition,
38
39
  primeOutputDate: _output.primeOutputDateDefinition,
39
40
  primeOutputBoolean: _output.primeOutputBooleanDefinition,
@@ -30,6 +30,7 @@ import {
30
30
  primeOutputLinkDefinition,
31
31
  primeOutputListDefinition,
32
32
  primeOutputNumberDefinition,
33
+ primeOutputReferenceDefinition,
33
34
  primeOutputTextDefinition
34
35
  } from "./output.mjs";
35
36
  export const primeInputs = {
@@ -60,6 +61,7 @@ export const primeInputs = {
60
61
  export const primeOutputs = {
61
62
  primeOutputText: primeOutputTextDefinition,
62
63
  primeOutputLink: primeOutputLinkDefinition,
64
+ primeOutputReference: primeOutputReferenceDefinition,
63
65
  primeOutputNumber: primeOutputNumberDefinition,
64
66
  primeOutputDate: primeOutputDateDefinition,
65
67
  primeOutputBoolean: primeOutputBooleanDefinition,
@@ -3,6 +3,7 @@ export declare const primeOutputTextDefinition: FormKitTypeDefinition;
3
3
  export declare const primeOutputDateDefinition: FormKitTypeDefinition;
4
4
  export declare const primeOutputNumberDefinition: FormKitTypeDefinition;
5
5
  export declare const primeOutputLinkDefinition: FormKitTypeDefinition;
6
+ export declare const primeOutputReferenceDefinition: FormKitTypeDefinition;
6
7
  export declare const primeOutputBooleanDefinition: FormKitTypeDefinition;
7
8
  export declare const primeOutputDurationDefinition: FormKitTypeDefinition;
8
9
  export declare const primeOutputListDefinition: FormKitTypeDefinition;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.primeOutputTextDefinition = exports.primeOutputNumberDefinition = exports.primeOutputListDefinition = exports.primeOutputLinkDefinition = exports.primeOutputDurationDefinition = exports.primeOutputDateDefinition = exports.primeOutputBooleanDefinition = void 0;
6
+ exports.primeOutputTextDefinition = exports.primeOutputReferenceDefinition = exports.primeOutputNumberDefinition = exports.primeOutputListDefinition = exports.primeOutputLinkDefinition = exports.primeOutputDurationDefinition = exports.primeOutputDateDefinition = exports.primeOutputBooleanDefinition = void 0;
7
7
  var _vue = require("@formkit/vue");
8
8
  var _PrimeOutputText = _interopRequireDefault(require("../components/PrimeOutputText.vue"));
9
9
  var _PrimeOutputDate = _interopRequireDefault(require("../components/PrimeOutputDate.vue"));
@@ -12,9 +12,10 @@ var _PrimeOutputLink = _interopRequireDefault(require("../components/PrimeOutput
12
12
  var _PrimeOutputBoolean = _interopRequireDefault(require("../components/PrimeOutputBoolean.vue"));
13
13
  var _PrimeOutputDuration = _interopRequireDefault(require("../components/PrimeOutputDuration.vue"));
14
14
  var _PrimeOutputList = _interopRequireDefault(require("../components/PrimeOutputList.vue"));
15
+ var _PrimeOutputReference = _interopRequireDefault(require("../components/PrimeOutputReference.vue"));
15
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
17
  const primeOutputTextDefinition = exports.primeOutputTextDefinition = (0, _vue.createInput)(_PrimeOutputText.default, {
17
- props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
18
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "html"]
18
19
  });
19
20
  const primeOutputDateDefinition = exports.primeOutputDateDefinition = (0, _vue.createInput)(_PrimeOutputDate.default, {
20
21
  props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
@@ -23,7 +24,10 @@ const primeOutputNumberDefinition = exports.primeOutputNumberDefinition = (0, _v
23
24
  props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
24
25
  });
25
26
  const primeOutputLinkDefinition = exports.primeOutputLinkDefinition = (0, _vue.createInput)(_PrimeOutputLink.default, {
26
- props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
27
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "title"]
28
+ });
29
+ const primeOutputReferenceDefinition = exports.primeOutputReferenceDefinition = (0, _vue.createInput)(_PrimeOutputReference.default, {
30
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "reference", "internal", "linkComponentName", "title"]
27
31
  });
28
32
  const primeOutputBooleanDefinition = exports.primeOutputBooleanDefinition = (0, _vue.createInput)(_PrimeOutputBoolean.default, {
29
33
  props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "trueValue", "falseValue"]
@@ -6,8 +6,9 @@ import PrimeOutputLink from "../components/PrimeOutputLink.vue";
6
6
  import PrimeOutputBoolean from "../components/PrimeOutputBoolean.vue";
7
7
  import PrimeOutputDuration from "../components/PrimeOutputDuration.vue";
8
8
  import PrimeOutputList from "../components/PrimeOutputList.vue";
9
+ import PrimeOutputReference from "../components/PrimeOutputReference.vue";
9
10
  export const primeOutputTextDefinition = createInput(PrimeOutputText, {
10
- props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
11
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "html"]
11
12
  });
12
13
  export const primeOutputDateDefinition = createInput(PrimeOutputDate, {
13
14
  props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
@@ -16,7 +17,10 @@ export const primeOutputNumberDefinition = createInput(PrimeOutputNumber, {
16
17
  props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
17
18
  });
18
19
  export const primeOutputLinkDefinition = createInput(PrimeOutputLink, {
19
- props: ["prefix", "suffix", "iconPrefix", "iconSuffix"]
20
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "title"]
21
+ });
22
+ export const primeOutputReferenceDefinition = createInput(PrimeOutputReference, {
23
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "reference", "internal", "linkComponentName", "title"]
20
24
  });
21
25
  export const primeOutputBooleanDefinition = createInput(PrimeOutputBoolean, {
22
26
  props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "trueValue", "falseValue"]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sfxcode/formkit-primevue",
3
3
  "type": "module",
4
- "version": "2.4.2",
4
+ "version": "2.4.3",
5
5
  "packageManager": "pnpm@9.4.0+sha256.b6fd0bfda555e7e584ad7e56b30c68b01d5a04f9ee93989f4b93ca8473c49c74",
6
6
  "author": {
7
7
  "name": "Tom",