@sfxcode/formkit-primevue 3.3.1 → 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/dist/components/FormKitDataDebug.vue +19 -0
- package/dist/components/FormKitDataEdit.vue +133 -0
- package/dist/components/FormKitDataView.vue +51 -0
- package/dist/components/FormKitIcon.vue +18 -0
- package/dist/components/FormKitPrefix.vue +11 -0
- package/dist/components/FormKitSuffix.vue +11 -0
- package/dist/components/PrimeAutoComplete.vue +95 -0
- package/dist/components/PrimeCascadeSelect.vue +43 -0
- package/dist/components/PrimeCheckbox.vue +51 -0
- package/dist/components/PrimeColorPicker.vue +33 -0
- package/dist/components/PrimeDatePicker.vue +97 -0
- package/dist/components/PrimeInputMask.vue +69 -0
- package/dist/components/PrimeInputNumber.vue +75 -0
- package/dist/components/PrimeInputOtp.vue +42 -0
- package/dist/components/PrimeInputText.vue +65 -0
- package/dist/components/PrimeKnob.vue +50 -0
- package/dist/components/PrimeListbox.vue +54 -0
- package/dist/components/PrimeMultiSelect.vue +70 -0
- package/dist/components/PrimeOutputBoolean.vue +42 -0
- package/dist/components/PrimeOutputDate.vue +51 -0
- package/dist/components/PrimeOutputDuration.vue +36 -0
- package/dist/components/PrimeOutputLink.vue +52 -0
- package/dist/components/PrimeOutputList.vue +106 -0
- package/dist/components/PrimeOutputNumber.vue +56 -0
- package/dist/components/PrimeOutputReference.vue +64 -0
- package/dist/components/PrimeOutputText.vue +72 -0
- package/dist/components/PrimePassword.vue +52 -0
- package/dist/components/PrimeRadioButton.vue +48 -0
- package/dist/components/PrimeRating.vue +40 -0
- package/dist/components/PrimeSelect.vue +71 -0
- package/dist/components/PrimeSelectButton.vue +44 -0
- package/dist/components/PrimeSlider.vue +42 -0
- package/dist/components/PrimeTextarea.vue +37 -0
- package/dist/components/PrimeToggleButton.vue +42 -0
- package/dist/components/PrimeToggleSwitch.vue +42 -0
- package/dist/components/PrimeTreeSelect.vue +48 -0
- package/dist/components/index.d.ts +24 -2
- package/dist/components/index.js +167 -4
- package/dist/components/index.mjs +48 -0
- package/dist/composables/index.d.ts +9 -2
- package/dist/composables/index.js +61 -2
- package/dist/composables/index.mjs +18 -0
- package/dist/composables/useFormKitInput.d.ts +11 -0
- package/dist/composables/useFormKitInput.js +62 -0
- package/dist/composables/useFormKitInput.mjs +57 -0
- package/dist/composables/useFormKitRepeater.d.ts +15 -0
- package/dist/composables/useFormKitRepeater.js +74 -0
- package/dist/composables/useFormKitRepeater.mjs +82 -0
- package/dist/composables/useFormKitSchema.d.ts +36 -0
- package/dist/composables/useFormKitSchema.js +83 -0
- package/dist/composables/useFormKitSchema.mjs +66 -0
- package/dist/composables/useFormKitSection.d.ts +7 -0
- package/dist/composables/useFormKitSection.js +31 -0
- package/dist/composables/useFormKitSection.mjs +19 -0
- package/dist/composables/useInputEditor.d.ts +8 -0
- package/dist/composables/useInputEditor.js +148 -0
- package/dist/composables/useInputEditor.mjs +171 -0
- package/dist/composables/useInputEditorSchema.d.ts +163 -0
- package/dist/composables/useInputEditorSchema.js +313 -0
- package/dist/composables/useInputEditorSchema.mjs +323 -0
- package/dist/composables/useOutputDuration.d.ts +4 -0
- package/dist/composables/useOutputDuration.js +40 -0
- package/dist/composables/useOutputDuration.mjs +32 -0
- package/dist/composables/usePrimeInputs.d.ts +3 -0
- package/dist/composables/usePrimeInputs.js +62 -0
- package/dist/composables/usePrimeInputs.mjs +53 -0
- package/dist/definitions/index.d.ts +32 -37
- package/dist/definitions/index.js +42 -4
- package/dist/definitions/index.mjs +68 -0
- package/dist/definitions/input.d.ts +47 -0
- package/dist/definitions/input.js +142 -0
- package/dist/definitions/input.mjs +421 -0
- package/dist/definitions/output.d.ts +9 -0
- package/dist/definitions/output.js +46 -0
- package/dist/definitions/output.mjs +120 -0
- package/dist/index.d.ts +142 -145
- package/dist/index.js +62 -5
- package/dist/index.mjs +20 -0
- package/dist/plugins/index.d.ts +3 -7
- package/dist/plugins/index.js +57 -45
- package/dist/plugins/index.mjs +59 -0
- package/dist/vue.d.ts +5 -0
- package/package.json +88 -40
- package/dist/PrimeTreeSelect-Dksx7tL-.js +0 -1881
- package/dist/components-HJnJ39cU.js +0 -255
- package/dist/composables-CZ6f1QYe.js +0 -820
- package/dist/definitions-BHwWaom7.js +0 -1196
- package/dist/index-Ch3MtT1C.d.ts +0 -266
- package/dist/index-EJ8M51RO.d.ts +0 -917
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, ref, renderSlot, resolveComponent, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
2
|
-
import { reset } from "@formkit/core";
|
|
3
|
-
import { FormKit, FormKitMessages, FormKitSchema } from "@formkit/vue";
|
|
4
|
-
//#region src/components/FormKitDataDebug.vue
|
|
5
|
-
const _hoisted_1 = { key: 0 };
|
|
6
|
-
const _hoisted_2 = { key: 1 };
|
|
7
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "FormKitDataDebug",
|
|
9
|
-
props: {
|
|
10
|
-
data: {
|
|
11
|
-
type: Object,
|
|
12
|
-
default: null
|
|
13
|
-
},
|
|
14
|
-
header: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: "Debug"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
setup(__props) {
|
|
20
|
-
return (_ctx, _cache) => {
|
|
21
|
-
const _component_Fieldset = resolveComponent("Fieldset");
|
|
22
|
-
return openBlock(), createBlock(_component_Fieldset, {
|
|
23
|
-
class: "p-formkit-data-debug",
|
|
24
|
-
legend: __props.header,
|
|
25
|
-
toggleable: true,
|
|
26
|
-
collapsed: true
|
|
27
|
-
}, {
|
|
28
|
-
default: withCtx(() => [__props.data ? (openBlock(), createElementBlock("pre", _hoisted_1, toDisplayString(__props.data), 1)) : (openBlock(), createElementBlock("span", _hoisted_2, "No Data available"))]),
|
|
29
|
-
_: 1
|
|
30
|
-
}, 8, ["legend"]);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/components/FormKitDataEdit.vue
|
|
36
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
37
|
-
__name: "FormKitDataEdit",
|
|
38
|
-
props: /* @__PURE__ */ mergeModels({
|
|
39
|
-
id: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: "formkit_form"
|
|
42
|
-
},
|
|
43
|
-
data: {
|
|
44
|
-
type: Object,
|
|
45
|
-
default: null
|
|
46
|
-
},
|
|
47
|
-
schema: {
|
|
48
|
-
type: Object,
|
|
49
|
-
default: null
|
|
50
|
-
},
|
|
51
|
-
formClass: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: ""
|
|
54
|
-
},
|
|
55
|
-
actionsClass: {
|
|
56
|
-
type: String,
|
|
57
|
-
default: ""
|
|
58
|
-
},
|
|
59
|
-
submitSeverity: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: ""
|
|
62
|
-
},
|
|
63
|
-
submitClass: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: ""
|
|
66
|
-
},
|
|
67
|
-
submitLabel: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: "Save"
|
|
70
|
-
},
|
|
71
|
-
submitIcon: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: ""
|
|
74
|
-
},
|
|
75
|
-
showReset: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: false
|
|
78
|
-
},
|
|
79
|
-
resetSeverity: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: "danger"
|
|
82
|
-
},
|
|
83
|
-
resetLabel: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: "Reset"
|
|
86
|
-
},
|
|
87
|
-
resetClass: {
|
|
88
|
-
type: String,
|
|
89
|
-
default: ""
|
|
90
|
-
},
|
|
91
|
-
resetIcon: {
|
|
92
|
-
type: String,
|
|
93
|
-
default: ""
|
|
94
|
-
},
|
|
95
|
-
debugData: {
|
|
96
|
-
type: Boolean,
|
|
97
|
-
default: false
|
|
98
|
-
},
|
|
99
|
-
debugSchema: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
default: false
|
|
102
|
-
}
|
|
103
|
-
}, {
|
|
104
|
-
"modelValue": {},
|
|
105
|
-
"modelModifiers": {}
|
|
106
|
-
}),
|
|
107
|
-
emits: /* @__PURE__ */ mergeModels(["dataSaved", "onReset"], ["update:modelValue"]),
|
|
108
|
-
setup(__props, { emit: __emit }) {
|
|
109
|
-
const props = __props;
|
|
110
|
-
const emit = __emit;
|
|
111
|
-
const formData = useModel(__props, "modelValue");
|
|
112
|
-
if (props.data) formData.value = props.data;
|
|
113
|
-
const formSchema = ref(props.schema);
|
|
114
|
-
function handleSave() {
|
|
115
|
-
emit("dataSaved", formData.value);
|
|
116
|
-
}
|
|
117
|
-
function handleReset() {
|
|
118
|
-
reset(props.id);
|
|
119
|
-
emit("onReset");
|
|
120
|
-
}
|
|
121
|
-
return (_ctx, _cache) => {
|
|
122
|
-
const _component_Button = resolveComponent("Button");
|
|
123
|
-
return openBlock(), createBlock(unref(FormKit), {
|
|
124
|
-
id: __props.id,
|
|
125
|
-
modelValue: formData.value,
|
|
126
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value = $event),
|
|
127
|
-
"actions-class": __props.actionsClass,
|
|
128
|
-
"form-class": `p-formkit-data-edit ${__props.formClass}`,
|
|
129
|
-
type: "form",
|
|
130
|
-
onSubmit: handleSave
|
|
131
|
-
}, {
|
|
132
|
-
default: withCtx(() => [
|
|
133
|
-
formSchema.value ? (openBlock(), createBlock(unref(FormKitSchema), {
|
|
134
|
-
key: 0,
|
|
135
|
-
schema: formSchema.value,
|
|
136
|
-
data: formData.value
|
|
137
|
-
}, null, 8, ["schema", "data"])) : createCommentVNode("v-if", true),
|
|
138
|
-
renderSlot(_ctx.$slots, "default"),
|
|
139
|
-
__props.debugData ? (openBlock(), createBlock(_sfc_main$2, {
|
|
140
|
-
key: 1,
|
|
141
|
-
data: formData.value,
|
|
142
|
-
header: "Debug Mode - Data"
|
|
143
|
-
}, null, 8, ["data"])) : createCommentVNode("v-if", true),
|
|
144
|
-
__props.debugSchema ? (openBlock(), createBlock(_sfc_main$2, {
|
|
145
|
-
key: 2,
|
|
146
|
-
data: formSchema.value,
|
|
147
|
-
header: "Debug Mode - Schema"
|
|
148
|
-
}, null, 8, ["data"])) : createCommentVNode("v-if", true)
|
|
149
|
-
]),
|
|
150
|
-
messages: withCtx(() => [renderSlot(_ctx.$slots, "messages", {}, () => [createVNode(unref(FormKitMessages), { class: "p-formkit-data-edit-messages" })])]),
|
|
151
|
-
submit: withCtx(() => [renderSlot(_ctx.$slots, "submit", {}, () => [createVNode(_component_Button, {
|
|
152
|
-
icon: __props.submitIcon,
|
|
153
|
-
type: "submit",
|
|
154
|
-
label: __props.submitLabel,
|
|
155
|
-
class: normalizeClass(__props.submitClass),
|
|
156
|
-
severity: __props.submitSeverity,
|
|
157
|
-
onSubmit: handleSave
|
|
158
|
-
}, null, 8, [
|
|
159
|
-
"icon",
|
|
160
|
-
"label",
|
|
161
|
-
"class",
|
|
162
|
-
"severity"
|
|
163
|
-
]), __props.showReset ? (openBlock(), createBlock(_component_Button, {
|
|
164
|
-
key: 0,
|
|
165
|
-
type: "reset",
|
|
166
|
-
icon: __props.resetIcon,
|
|
167
|
-
label: __props.resetLabel,
|
|
168
|
-
class: normalizeClass(__props.resetClass),
|
|
169
|
-
severity: __props.resetSeverity,
|
|
170
|
-
onClick: handleReset
|
|
171
|
-
}, null, 8, [
|
|
172
|
-
"icon",
|
|
173
|
-
"label",
|
|
174
|
-
"class",
|
|
175
|
-
"severity"
|
|
176
|
-
])) : createCommentVNode("v-if", true)])]),
|
|
177
|
-
_: 3
|
|
178
|
-
}, 8, [
|
|
179
|
-
"id",
|
|
180
|
-
"modelValue",
|
|
181
|
-
"actions-class",
|
|
182
|
-
"form-class"
|
|
183
|
-
]);
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
//#endregion
|
|
188
|
-
//#region src/components/FormKitDataView.vue
|
|
189
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
190
|
-
__name: "FormKitDataView",
|
|
191
|
-
props: /* @__PURE__ */ mergeModels({
|
|
192
|
-
data: {
|
|
193
|
-
type: Object,
|
|
194
|
-
default: null
|
|
195
|
-
},
|
|
196
|
-
schema: {
|
|
197
|
-
type: Object,
|
|
198
|
-
default: null
|
|
199
|
-
},
|
|
200
|
-
formClass: {
|
|
201
|
-
type: String,
|
|
202
|
-
default: ""
|
|
203
|
-
},
|
|
204
|
-
debugData: {
|
|
205
|
-
type: Boolean,
|
|
206
|
-
default: false
|
|
207
|
-
},
|
|
208
|
-
debugSchema: {
|
|
209
|
-
type: Boolean,
|
|
210
|
-
default: false
|
|
211
|
-
}
|
|
212
|
-
}, {
|
|
213
|
-
"modelValue": {},
|
|
214
|
-
"modelModifiers": {}
|
|
215
|
-
}),
|
|
216
|
-
emits: ["update:modelValue"],
|
|
217
|
-
setup(__props) {
|
|
218
|
-
const props = __props;
|
|
219
|
-
const formSchema = ref(props.schema);
|
|
220
|
-
const formData = useModel(__props, "modelValue");
|
|
221
|
-
if (props.data) formData.value = props.data;
|
|
222
|
-
return (_ctx, _cache) => {
|
|
223
|
-
return openBlock(), createBlock(unref(FormKit), {
|
|
224
|
-
modelValue: formData.value,
|
|
225
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value = $event),
|
|
226
|
-
actions: false,
|
|
227
|
-
"form-class": `p-formkit-data-view ${__props.formClass}`,
|
|
228
|
-
class: "p-formkit-data-view",
|
|
229
|
-
type: "form"
|
|
230
|
-
}, {
|
|
231
|
-
default: withCtx(() => [
|
|
232
|
-
__props.schema ? (openBlock(), createBlock(unref(FormKitSchema), {
|
|
233
|
-
key: 0,
|
|
234
|
-
schema: formSchema.value,
|
|
235
|
-
data: formData.value
|
|
236
|
-
}, null, 8, ["schema", "data"])) : createCommentVNode("v-if", true),
|
|
237
|
-
renderSlot(_ctx.$slots, "default"),
|
|
238
|
-
__props.debugData ? (openBlock(), createBlock(_sfc_main$2, {
|
|
239
|
-
key: 1,
|
|
240
|
-
data: formData.value,
|
|
241
|
-
header: "Debug Mode - Data"
|
|
242
|
-
}, null, 8, ["data"])) : createCommentVNode("v-if", true),
|
|
243
|
-
__props.debugSchema ? (openBlock(), createBlock(_sfc_main$2, {
|
|
244
|
-
key: 2,
|
|
245
|
-
data: formSchema.value,
|
|
246
|
-
header: "Debug Mode - Schema"
|
|
247
|
-
}, null, 8, ["data"])) : createCommentVNode("v-if", true)
|
|
248
|
-
]),
|
|
249
|
-
_: 3
|
|
250
|
-
}, 8, ["modelValue", "form-class"]);
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
//#endregion
|
|
255
|
-
export { _sfc_main$1 as n, _sfc_main as t };
|