@sfxcode/formkit-primevue 3.2.6 → 3.2.8

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 (113) hide show
  1. package/dist/components/FormKitDataEdit.d.vue.ts +184 -0
  2. package/dist/components/FormKitDataEdit.vue +52 -33
  3. package/dist/components/FormKitDataEdit.vue.d.ts +184 -0
  4. package/dist/components/FormKitDataView.d.vue.ts +77 -0
  5. package/dist/components/FormKitDataView.vue +34 -17
  6. package/dist/components/FormKitDataView.vue.d.ts +77 -0
  7. package/dist/components/FormKitIcon.d.vue.ts +39 -0
  8. package/dist/components/FormKitIcon.vue +13 -6
  9. package/dist/components/FormKitIcon.vue.d.ts +39 -0
  10. package/dist/components/FormKitPrefix.d.vue.ts +7 -0
  11. package/dist/components/FormKitPrefix.vue +3 -3
  12. package/dist/components/FormKitPrefix.vue.d.ts +7 -0
  13. package/dist/components/FormKitSuffix.d.vue.ts +7 -0
  14. package/dist/components/FormKitSuffix.vue +3 -3
  15. package/dist/components/FormKitSuffix.vue.d.ts +7 -0
  16. package/dist/components/PrimeAutoComplete.d.vue.ts +31 -0
  17. package/dist/components/PrimeAutoComplete.vue +98 -47
  18. package/dist/components/PrimeAutoComplete.vue.d.ts +31 -0
  19. package/dist/components/PrimeCascadeSelect.d.vue.ts +28 -0
  20. package/dist/components/PrimeCascadeSelect.vue +26 -7
  21. package/dist/components/PrimeCascadeSelect.vue.d.ts +28 -0
  22. package/dist/components/PrimeCheckbox.d.vue.ts +27 -0
  23. package/dist/components/PrimeCheckbox.vue +29 -9
  24. package/dist/components/PrimeCheckbox.vue.d.ts +27 -0
  25. package/dist/components/PrimeColorPicker.d.vue.ts +24 -0
  26. package/dist/components/PrimeColorPicker.vue +22 -7
  27. package/dist/components/PrimeColorPicker.vue.d.ts +24 -0
  28. package/dist/components/PrimeDatePicker.d.vue.ts +63 -0
  29. package/dist/components/PrimeDatePicker.vue +73 -15
  30. package/dist/components/PrimeDatePicker.vue.d.ts +63 -0
  31. package/dist/components/PrimeInputMask.d.vue.ts +28 -0
  32. package/dist/components/PrimeInputMask.vue +29 -10
  33. package/dist/components/PrimeInputMask.vue.d.ts +28 -0
  34. package/dist/components/PrimeInputNumber.d.vue.ts +36 -0
  35. package/dist/components/PrimeInputNumber.vue +56 -22
  36. package/dist/components/PrimeInputNumber.vue.d.ts +36 -0
  37. package/dist/components/PrimeInputOtp.d.vue.ts +26 -0
  38. package/dist/components/PrimeInputOtp.vue +24 -7
  39. package/dist/components/PrimeInputOtp.vue.d.ts +26 -0
  40. package/dist/components/PrimeInputText.d.vue.ts +24 -0
  41. package/dist/components/PrimeInputText.vue +25 -10
  42. package/dist/components/PrimeInputText.vue.d.ts +24 -0
  43. package/dist/components/PrimeKnob.d.vue.ts +31 -0
  44. package/dist/components/PrimeKnob.vue +37 -12
  45. package/dist/components/PrimeKnob.vue.d.ts +31 -0
  46. package/dist/components/PrimeListbox.d.vue.ts +42 -0
  47. package/dist/components/PrimeListbox.vue +39 -7
  48. package/dist/components/PrimeListbox.vue.d.ts +42 -0
  49. package/dist/components/PrimeMultiSelect.d.vue.ts +53 -0
  50. package/dist/components/PrimeMultiSelect.vue +52 -7
  51. package/dist/components/PrimeMultiSelect.vue.d.ts +53 -0
  52. package/dist/components/PrimeOutputBoolean.d.vue.ts +16 -0
  53. package/dist/components/PrimeOutputBoolean.vue +23 -16
  54. package/dist/components/PrimeOutputBoolean.vue.d.ts +16 -0
  55. package/dist/components/PrimeOutputDate.d.vue.ts +16 -0
  56. package/dist/components/PrimeOutputDate.vue +31 -21
  57. package/dist/components/PrimeOutputDate.vue.d.ts +16 -0
  58. package/dist/components/PrimeOutputDuration.d.vue.ts +16 -0
  59. package/dist/components/PrimeOutputDuration.vue +17 -11
  60. package/dist/components/PrimeOutputDuration.vue.d.ts +16 -0
  61. package/dist/components/PrimeOutputLink.d.vue.ts +16 -0
  62. package/dist/components/PrimeOutputLink.vue +24 -17
  63. package/dist/components/PrimeOutputLink.vue.d.ts +16 -0
  64. package/dist/components/PrimeOutputList.d.vue.ts +19 -0
  65. package/dist/components/PrimeOutputList.vue +29 -18
  66. package/dist/components/PrimeOutputList.vue.d.ts +19 -0
  67. package/dist/components/PrimeOutputNumber.d.vue.ts +16 -0
  68. package/dist/components/PrimeOutputNumber.vue +37 -24
  69. package/dist/components/PrimeOutputNumber.vue.d.ts +16 -0
  70. package/dist/components/PrimeOutputReference.d.vue.ts +16 -0
  71. package/dist/components/PrimeOutputReference.vue +28 -21
  72. package/dist/components/PrimeOutputReference.vue.d.ts +16 -0
  73. package/dist/components/PrimeOutputText.d.vue.ts +21 -0
  74. package/dist/components/PrimeOutputText.vue +37 -22
  75. package/dist/components/PrimeOutputText.vue.d.ts +21 -0
  76. package/dist/components/PrimePassword.d.vue.ts +33 -0
  77. package/dist/components/PrimePassword.vue +31 -7
  78. package/dist/components/PrimePassword.vue.d.ts +33 -0
  79. package/dist/components/PrimeRadioButton.d.vue.ts +28 -0
  80. package/dist/components/PrimeRadioButton.vue +23 -7
  81. package/dist/components/PrimeRadioButton.vue.d.ts +28 -0
  82. package/dist/components/PrimeRating.d.vue.ts +24 -0
  83. package/dist/components/PrimeRating.vue +22 -7
  84. package/dist/components/PrimeRating.vue.d.ts +24 -0
  85. package/dist/components/PrimeSelect.d.vue.ts +50 -0
  86. package/dist/components/PrimeSelect.vue +49 -7
  87. package/dist/components/PrimeSelect.vue.d.ts +50 -0
  88. package/dist/components/PrimeSelectButton.d.vue.ts +28 -0
  89. package/dist/components/PrimeSelectButton.vue +27 -7
  90. package/dist/components/PrimeSelectButton.vue.d.ts +28 -0
  91. package/dist/components/PrimeSlider.d.vue.ts +26 -0
  92. package/dist/components/PrimeSlider.vue +28 -10
  93. package/dist/components/PrimeSlider.vue.d.ts +26 -0
  94. package/dist/components/PrimeTextarea.d.vue.ts +25 -0
  95. package/dist/components/PrimeTextarea.vue +23 -7
  96. package/dist/components/PrimeTextarea.vue.d.ts +25 -0
  97. package/dist/components/PrimeToggleButton.d.vue.ts +26 -0
  98. package/dist/components/PrimeToggleButton.vue +25 -7
  99. package/dist/components/PrimeToggleButton.vue.d.ts +26 -0
  100. package/dist/components/PrimeToggleSwitch.d.vue.ts +23 -0
  101. package/dist/components/PrimeToggleSwitch.vue +23 -8
  102. package/dist/components/PrimeToggleSwitch.vue.d.ts +23 -0
  103. package/dist/components/PrimeTreeSelect.d.vue.ts +32 -0
  104. package/dist/components/PrimeTreeSelect.vue +30 -7
  105. package/dist/components/PrimeTreeSelect.vue.d.ts +32 -0
  106. package/dist/components/index.d.ts +1 -2
  107. package/dist/components/index.js +0 -7
  108. package/dist/components/index.mjs +0 -2
  109. package/dist/index.d.ts +2 -2
  110. package/dist/index.js +0 -6
  111. package/dist/index.mjs +1 -2
  112. package/package.json +1 -1
  113. package/dist/components/FormKitDebug.vue +0 -20
@@ -0,0 +1,184 @@
1
+ import type { FormKitSchemaDefinition } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ declare var __VLS_16: {}, __VLS_24: {}, __VLS_32: {}, __VLS_35: {}, __VLS_43: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_16) => any;
6
+ } & {
7
+ default?: (props: typeof __VLS_24) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_32) => any;
10
+ } & {
11
+ messages?: (props: typeof __VLS_35) => any;
12
+ } & {
13
+ submit?: (props: typeof __VLS_43) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
16
+ id: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ data: {
21
+ type: ObjectConstructor;
22
+ default: null;
23
+ };
24
+ schema: {
25
+ type: PropType<FormKitSchemaDefinition>;
26
+ default: null;
27
+ };
28
+ formClass: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ actionsClass: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ submitSeverity: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ submitClass: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ submitLabel: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ submitIcon: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ showReset: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ resetSeverity: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ resetLabel: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ resetClass: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ };
68
+ resetIcon: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ debugData: {
73
+ type: BooleanConstructor;
74
+ default: boolean;
75
+ };
76
+ debugSchema: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ modelValue: {
81
+ type: PropType<any>;
82
+ };
83
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
84
+ dataSaved: (...args: any[]) => void;
85
+ onReset: (...args: any[]) => void;
86
+ "update:modelValue": (value: any) => void;
87
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
88
+ id: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ data: {
93
+ type: ObjectConstructor;
94
+ default: null;
95
+ };
96
+ schema: {
97
+ type: PropType<FormKitSchemaDefinition>;
98
+ default: null;
99
+ };
100
+ formClass: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ };
104
+ actionsClass: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ submitSeverity: {
109
+ type: StringConstructor;
110
+ default: string;
111
+ };
112
+ submitClass: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
116
+ submitLabel: {
117
+ type: StringConstructor;
118
+ default: string;
119
+ };
120
+ submitIcon: {
121
+ type: StringConstructor;
122
+ default: string;
123
+ };
124
+ showReset: {
125
+ type: BooleanConstructor;
126
+ default: boolean;
127
+ };
128
+ resetSeverity: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ resetLabel: {
133
+ type: StringConstructor;
134
+ default: string;
135
+ };
136
+ resetClass: {
137
+ type: StringConstructor;
138
+ default: string;
139
+ };
140
+ resetIcon: {
141
+ type: StringConstructor;
142
+ default: string;
143
+ };
144
+ debugData: {
145
+ type: BooleanConstructor;
146
+ default: boolean;
147
+ };
148
+ debugSchema: {
149
+ type: BooleanConstructor;
150
+ default: boolean;
151
+ };
152
+ modelValue: {
153
+ type: PropType<any>;
154
+ };
155
+ }>> & Readonly<{
156
+ onDataSaved?: ((...args: any[]) => any) | undefined;
157
+ onOnReset?: ((...args: any[]) => any) | undefined;
158
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
159
+ }>, {
160
+ id: string;
161
+ data: Record<string, any>;
162
+ schema: FormKitSchemaDefinition;
163
+ formClass: string;
164
+ actionsClass: string;
165
+ submitSeverity: string;
166
+ submitClass: string;
167
+ submitLabel: string;
168
+ submitIcon: string;
169
+ showReset: boolean;
170
+ resetSeverity: string;
171
+ resetLabel: string;
172
+ resetClass: string;
173
+ resetIcon: string;
174
+ debugData: boolean;
175
+ debugSchema: boolean;
176
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
177
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
178
+ declare const _default: typeof __VLS_export;
179
+ export default _default;
180
+ type __VLS_WithSlots<T, S> = T & {
181
+ new (): {
182
+ $slots: S;
183
+ };
184
+ };
@@ -1,86 +1,93 @@
1
- <script setup>
2
- import { reset } from "@formkit/core";
3
- import { FormKit, FormKitMessages, FormKitSchema } from "@formkit/vue";
4
- import { ref } from "vue";
5
- import FormKitDebug from "./FormKitDebug.vue";
1
+ <script setup lang='ts'>
2
+ import type { FormKitSchemaDefinition } from '@formkit/core'
3
+ import type { PropType } from 'vue'
4
+ import { reset } from '@formkit/core'
5
+ import { FormKit, FormKitMessages, FormKitSchema } from '@formkit/vue'
6
+ import { ref } from 'vue'
7
+
6
8
  const props = defineProps({
7
9
  id: {
8
10
  type: String,
9
- default: "formkit_form"
11
+ default: 'formkit_form',
10
12
  },
11
13
  data: {
12
14
  type: Object,
13
- default: null
15
+ default: null,
14
16
  },
15
17
  schema: {
16
- type: Object,
17
- default: null
18
+ type: Object as PropType<FormKitSchemaDefinition>,
19
+ default: null,
18
20
  },
19
21
  formClass: {
20
22
  type: String,
21
- default: ""
23
+ default: '',
22
24
  },
23
25
  actionsClass: {
24
26
  type: String,
25
- default: ""
27
+ default: '',
26
28
  },
27
29
  submitSeverity: {
28
30
  type: String,
29
- default: ""
31
+ default: '',
30
32
  },
31
33
  submitClass: {
32
34
  type: String,
33
- default: ""
35
+ default: '',
34
36
  },
35
37
  submitLabel: {
36
38
  type: String,
37
- default: "Save"
39
+ default: 'Save',
38
40
  },
39
41
  submitIcon: {
40
42
  type: String,
41
- default: ""
43
+ default: '',
42
44
  },
43
45
  showReset: {
44
46
  type: Boolean,
45
- default: false
47
+ default: false,
46
48
  },
47
49
  resetSeverity: {
48
50
  type: String,
49
- default: "danger"
51
+ default: 'danger',
50
52
  },
51
53
  resetLabel: {
52
54
  type: String,
53
- default: "Reset"
55
+ default: 'Reset',
54
56
  },
55
57
  resetClass: {
56
58
  type: String,
57
- default: ""
59
+ default: '',
58
60
  },
59
61
  resetIcon: {
60
62
  type: String,
61
- default: ""
63
+ default: '',
62
64
  },
63
65
  debugData: {
64
66
  type: Boolean,
65
- default: false
67
+ default: false,
66
68
  },
67
69
  debugSchema: {
68
70
  type: Boolean,
69
- default: false
70
- }
71
- });
72
- const emit = defineEmits(["dataSaved", "onReset"]);
73
- const formData = defineModel({ type: null });
71
+ default: false,
72
+ },
73
+ })
74
+ const emit = defineEmits(['dataSaved', 'onReset'])
75
+
76
+ const formData = defineModel<any>()
77
+
74
78
  if (props.data) {
75
- formData.value = props.data;
79
+ formData.value = props.data
76
80
  }
77
- const formSchema = ref(props.schema);
81
+
82
+ const formSchema = ref(props.schema)
83
+
78
84
  function handleSave() {
79
- emit("dataSaved", formData.value);
85
+ emit('dataSaved', formData.value)
80
86
  }
87
+
81
88
  function handleReset() {
82
- reset(props.id);
83
- emit("onReset");
89
+ reset(props.id)
90
+ emit('onReset')
84
91
  }
85
92
  </script>
86
93
 
@@ -96,8 +103,16 @@ function handleReset() {
96
103
  <template #default>
97
104
  <FormKitSchema v-if="formSchema" :schema="formSchema" :data="formData" />
98
105
  <slot />
99
- <FormKitDebug v-if="debugData" :data="formData" header="Debug Mode - Data" />
100
- <FormKitDebug v-if="debugSchema" :data="formSchema as object" header="Debug Mode - Schema" />
106
+ <Fieldset class="p-formkit-data-debug" legend="Debug Mode - Data" :toggleable="true" :collapsed="true">
107
+ <slot />
108
+ <pre v-if="data">{{ data }}</pre>
109
+ <span v-else>No Data available</span>
110
+ </Fieldset>
111
+ <Fieldset class="p-formkit-data-debug" legend="Debug Mode - Schema" :toggleable="true" :collapsed="true">
112
+ <slot />
113
+ <pre v-if="formSchema">{{ formSchema }}</pre>
114
+ <span v-else>No Data available</span>
115
+ </Fieldset>
101
116
  </template>
102
117
  <template #messages>
103
118
  <slot name="messages">
@@ -112,3 +127,7 @@ function handleReset() {
112
127
  </template>
113
128
  </FormKit>
114
129
  </template>
130
+
131
+ <style scoped>
132
+
133
+ </style>
@@ -0,0 +1,184 @@
1
+ import type { FormKitSchemaDefinition } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ declare var __VLS_16: {}, __VLS_24: {}, __VLS_32: {}, __VLS_35: {}, __VLS_43: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_16) => any;
6
+ } & {
7
+ default?: (props: typeof __VLS_24) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_32) => any;
10
+ } & {
11
+ messages?: (props: typeof __VLS_35) => any;
12
+ } & {
13
+ submit?: (props: typeof __VLS_43) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
16
+ id: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ data: {
21
+ type: ObjectConstructor;
22
+ default: null;
23
+ };
24
+ schema: {
25
+ type: PropType<FormKitSchemaDefinition>;
26
+ default: null;
27
+ };
28
+ formClass: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ actionsClass: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ submitSeverity: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ submitClass: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ submitLabel: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ submitIcon: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ showReset: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ resetSeverity: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ resetLabel: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ resetClass: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ };
68
+ resetIcon: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ debugData: {
73
+ type: BooleanConstructor;
74
+ default: boolean;
75
+ };
76
+ debugSchema: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ modelValue: {
81
+ type: PropType<any>;
82
+ };
83
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
84
+ dataSaved: (...args: any[]) => void;
85
+ onReset: (...args: any[]) => void;
86
+ "update:modelValue": (value: any) => void;
87
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
88
+ id: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ data: {
93
+ type: ObjectConstructor;
94
+ default: null;
95
+ };
96
+ schema: {
97
+ type: PropType<FormKitSchemaDefinition>;
98
+ default: null;
99
+ };
100
+ formClass: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ };
104
+ actionsClass: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ submitSeverity: {
109
+ type: StringConstructor;
110
+ default: string;
111
+ };
112
+ submitClass: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
116
+ submitLabel: {
117
+ type: StringConstructor;
118
+ default: string;
119
+ };
120
+ submitIcon: {
121
+ type: StringConstructor;
122
+ default: string;
123
+ };
124
+ showReset: {
125
+ type: BooleanConstructor;
126
+ default: boolean;
127
+ };
128
+ resetSeverity: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ resetLabel: {
133
+ type: StringConstructor;
134
+ default: string;
135
+ };
136
+ resetClass: {
137
+ type: StringConstructor;
138
+ default: string;
139
+ };
140
+ resetIcon: {
141
+ type: StringConstructor;
142
+ default: string;
143
+ };
144
+ debugData: {
145
+ type: BooleanConstructor;
146
+ default: boolean;
147
+ };
148
+ debugSchema: {
149
+ type: BooleanConstructor;
150
+ default: boolean;
151
+ };
152
+ modelValue: {
153
+ type: PropType<any>;
154
+ };
155
+ }>> & Readonly<{
156
+ onDataSaved?: ((...args: any[]) => any) | undefined;
157
+ onOnReset?: ((...args: any[]) => any) | undefined;
158
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
159
+ }>, {
160
+ id: string;
161
+ data: Record<string, any>;
162
+ schema: FormKitSchemaDefinition;
163
+ formClass: string;
164
+ actionsClass: string;
165
+ submitSeverity: string;
166
+ submitClass: string;
167
+ submitLabel: string;
168
+ submitIcon: string;
169
+ showReset: boolean;
170
+ resetSeverity: string;
171
+ resetLabel: string;
172
+ resetClass: string;
173
+ resetIcon: string;
174
+ debugData: boolean;
175
+ debugSchema: boolean;
176
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
177
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
178
+ declare const _default: typeof __VLS_export;
179
+ export default _default;
180
+ type __VLS_WithSlots<T, S> = T & {
181
+ new (): {
182
+ $slots: S;
183
+ };
184
+ };
@@ -0,0 +1,77 @@
1
+ import type { FormKitSchemaDefinition } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ declare var __VLS_13: {}, __VLS_21: {}, __VLS_29: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_13) => any;
6
+ } & {
7
+ default?: (props: typeof __VLS_21) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_29) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
+ data: {
13
+ type: ObjectConstructor;
14
+ default: null;
15
+ };
16
+ schema: {
17
+ type: PropType<FormKitSchemaDefinition>;
18
+ default: null;
19
+ };
20
+ formClass: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ debugData: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ debugSchema: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ };
32
+ modelValue: {
33
+ type: PropType<any>;
34
+ };
35
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ "update:modelValue": (value: any) => any;
37
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
+ data: {
39
+ type: ObjectConstructor;
40
+ default: null;
41
+ };
42
+ schema: {
43
+ type: PropType<FormKitSchemaDefinition>;
44
+ default: null;
45
+ };
46
+ formClass: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ debugData: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ debugSchema: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ modelValue: {
59
+ type: PropType<any>;
60
+ };
61
+ }>> & Readonly<{
62
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
63
+ }>, {
64
+ data: Record<string, any>;
65
+ schema: FormKitSchemaDefinition;
66
+ formClass: string;
67
+ debugData: boolean;
68
+ debugSchema: boolean;
69
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
70
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
71
+ declare const _default: typeof __VLS_export;
72
+ export default _default;
73
+ type __VLS_WithSlots<T, S> = T & {
74
+ new (): {
75
+ $slots: S;
76
+ };
77
+ };
@@ -1,33 +1,38 @@
1
- <script setup>
2
- import { FormKit, FormKitSchema } from "@formkit/vue";
3
- import { ref } from "vue";
4
- import FormKitDebug from "./FormKitDebug.vue";
1
+ <script setup lang='ts'>
2
+ import type { FormKitSchemaDefinition } from '@formkit/core'
3
+ import type { PropType } from 'vue'
4
+ import { FormKit, FormKitSchema } from '@formkit/vue'
5
+ import { ref } from 'vue'
6
+
5
7
  const props = defineProps({
6
8
  data: {
7
9
  type: Object,
8
- default: null
10
+ default: null,
9
11
  },
10
12
  schema: {
11
- type: Object,
12
- default: null
13
+ type: Object as PropType<FormKitSchemaDefinition>,
14
+ default: null,
13
15
  },
14
16
  formClass: {
15
17
  type: String,
16
- default: ""
18
+ default: '',
17
19
  },
18
20
  debugData: {
19
21
  type: Boolean,
20
- default: false
22
+ default: false,
21
23
  },
22
24
  debugSchema: {
23
25
  type: Boolean,
24
- default: false
25
- }
26
- });
27
- const formSchema = ref(props.schema);
28
- const formData = defineModel({ type: null });
26
+ default: false,
27
+ },
28
+ })
29
+
30
+ const formSchema = ref(props.schema)
31
+
32
+ const formData = defineModel<any>()
33
+
29
34
  if (props.data) {
30
- formData.value = props.data;
35
+ formData.value = props.data
31
36
  }
32
37
  </script>
33
38
 
@@ -41,7 +46,19 @@ if (props.data) {
41
46
  >
42
47
  <FormKitSchema v-if="schema" :schema="formSchema" :data="formData" />
43
48
  <slot />
44
- <FormKitDebug v-if="debugData" :data="formData" header="Debug Mode - Data" />
45
- <FormKitDebug v-if="debugSchema" :data="formSchema as object" header="Debug Mode - Schema" />
49
+ <Fieldset class="p-formkit-data-debug" legend="Debug Mode - Data" :toggleable="true" :collapsed="true">
50
+ <slot />
51
+ <pre v-if="data">{{ data }}</pre>
52
+ <span v-else>No Data available</span>
53
+ </Fieldset>
54
+ <Fieldset class="p-formkit-data-debug" legend="Debug Mode - Schema" :toggleable="true" :collapsed="true">
55
+ <slot />
56
+ <pre v-if="formSchema">{{ formSchema }}</pre>
57
+ <span v-else>No Data available</span>
58
+ </Fieldset>
46
59
  </FormKit>
47
60
  </template>
61
+
62
+ <style scoped>
63
+
64
+ </style>