@sfxcode/formkit-primevue 1.8.1 → 1.8.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/dist/components/PrimeAutoComplete.vue +35 -0
- package/dist/components/PrimeCalendar.vue +47 -0
- package/dist/components/PrimeCascadeSelect.vue +28 -0
- package/dist/components/PrimeCheckbox.vue +32 -0
- package/dist/components/PrimeChips.vue +29 -0
- package/dist/components/PrimeColorPicker.vue +26 -0
- package/dist/components/PrimeDropdown.vue +35 -0
- package/dist/components/PrimeEditor.vue +37 -0
- package/dist/components/PrimeInputMask.vue +29 -0
- package/dist/components/PrimeInputNumber.vue +33 -0
- package/dist/components/PrimeInputSwitch.vue +30 -0
- package/dist/components/PrimeInputText.vue +53 -0
- package/dist/components/PrimeKnob.vue +35 -0
- package/dist/components/PrimeListbox.vue +30 -0
- package/dist/components/PrimeMultiSelect.vue +29 -0
- package/dist/components/PrimePassword.vue +35 -0
- package/dist/components/PrimeRadioButton.vue +35 -0
- package/dist/components/PrimeRating.vue +32 -0
- package/dist/components/PrimeSelectButton.vue +29 -0
- package/dist/components/PrimeSlider.vue +29 -0
- package/dist/components/PrimeTextarea.vue +34 -0
- package/dist/components/PrimeToggleButton.vue +30 -0
- package/dist/components/PrimeTreeSelect.vue +29 -0
- package/dist/components/PrimeTriStateCheckbox.vue +31 -0
- package/dist/components/index.d.ts +25 -0
- package/dist/components/index.js +174 -0
- package/dist/components/index.mjs +50 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.js +12 -0
- package/dist/composables/index.mjs +4 -0
- package/dist/composables/useFormKitSchema.js +85 -0
- package/dist/composables/useFormKitSchema.mjs +74 -0
- package/dist/index.d.ts +53 -1
- package/dist/index.js +137 -0
- package/dist/index.mjs +127 -0
- package/dist/sass/formkit-primevue.scss +0 -3
- package/dist/style.css +1 -0
- package/package.json +47 -16
- package/dist/.vite/manifest.json +0 -7
- package/dist/formkit/PrimeAutoComplete.vue.d.ts +0 -6
- package/dist/formkit/PrimeCalendar.vue.d.ts +0 -6
- package/dist/formkit/PrimeCascadeSelect.vue.d.ts +0 -6
- package/dist/formkit/PrimeCheckbox.vue.d.ts +0 -6
- package/dist/formkit/PrimeChips.vue.d.ts +0 -6
- package/dist/formkit/PrimeColorPicker.vue.d.ts +0 -6
- package/dist/formkit/PrimeDropdown.vue.d.ts +0 -6
- package/dist/formkit/PrimeEditor.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputMask.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputNumber.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputSwitch.vue.d.ts +0 -6
- package/dist/formkit/PrimeInputText.vue.d.ts +0 -6
- package/dist/formkit/PrimeKnob.vue.d.ts +0 -6
- package/dist/formkit/PrimeListbox.vue.d.ts +0 -6
- package/dist/formkit/PrimeMultiSelect.vue.d.ts +0 -6
- package/dist/formkit/PrimePassword.vue.d.ts +0 -6
- package/dist/formkit/PrimeRadioButton.vue.d.ts +0 -6
- package/dist/formkit/PrimeRating.vue.d.ts +0 -6
- package/dist/formkit/PrimeSelectButton.vue.d.ts +0 -6
- package/dist/formkit/PrimeSlider.vue.d.ts +0 -6
- package/dist/formkit/PrimeTextarea.vue.d.ts +0 -6
- package/dist/formkit/PrimeToggleButton.vue.d.ts +0 -6
- package/dist/formkit/PrimeTreeSelect.vue.d.ts +0 -6
- package/dist/formkit/PrimeTriStateCheckbox.vue.d.ts +0 -6
- package/dist/formkit/index.d.ts +0 -51
- package/dist/formkit-primevue.es.js +0 -4336
- package/dist/formkit-primevue.umd.js +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/modules/formkit.d.ts +0 -3
- package/dist/modules/primevue.d.ts +0 -3
- package/dist/types.d.ts +0 -2
- /package/dist/{formkit → composables}/useFormKitSchema.d.ts +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(e)
|
|
11
|
+
context?.handlers.blur(e)
|
|
12
|
+
}
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<Slider
|
|
19
|
+
:id="context.id"
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:style="attrs.style"
|
|
25
|
+
:class="styleClass"
|
|
26
|
+
@change="handleInput"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleBlur(e: any) {
|
|
10
|
+
context?.handlers.blur(e.target.value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleInput(e: any) {
|
|
14
|
+
context?.node.input(e.target.value)
|
|
15
|
+
}
|
|
16
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div class="p-formkit">
|
|
21
|
+
<Textarea
|
|
22
|
+
:id="context.id"
|
|
23
|
+
v-model="context._value"
|
|
24
|
+
v-bind="attrs"
|
|
25
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
26
|
+
:readonly="attrs._readonly ?? false"
|
|
27
|
+
:style="attrs.style"
|
|
28
|
+
:class="styleClass"
|
|
29
|
+
:rows="context.rows ?? 3"
|
|
30
|
+
@input="handleInput"
|
|
31
|
+
@blur="handleBlur"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleChange(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div class="p-formkit">
|
|
17
|
+
<ToggleButton
|
|
18
|
+
v-model="context._value"
|
|
19
|
+
v-bind="attrs"
|
|
20
|
+
:input-id="context.id"
|
|
21
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
22
|
+
:readonly="attrs._readonly ?? false"
|
|
23
|
+
:input-style="attrs.style"
|
|
24
|
+
:input-class="styleClass"
|
|
25
|
+
:on-icon="context.onIcon ?? 'pi pi-check'"
|
|
26
|
+
:off-icon="context.offIcon ?? 'pi pi-times'"
|
|
27
|
+
@change="handleChange"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleInput(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<TreeSelect
|
|
19
|
+
v-model="context._value"
|
|
20
|
+
v-bind="attrs"
|
|
21
|
+
:input-id="context.id"
|
|
22
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
23
|
+
:readonly="attrs._readonly ?? false"
|
|
24
|
+
:input-style="attrs.style"
|
|
25
|
+
:input-class="styleClass"
|
|
26
|
+
@change="handleInput"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
context: Object,
|
|
4
|
+
})
|
|
5
|
+
|
|
6
|
+
const context = props.context
|
|
7
|
+
const attrs = computed(() => context?.attrs)
|
|
8
|
+
|
|
9
|
+
function handleChange(e: any) {
|
|
10
|
+
context?.node.input(props.context?._value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styleClass = computed(() => (context?.state.validationVisible && !context?.state.valid) ? `${attrs.value?.class} p-invalid` : attrs.value?.class)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<span v-if="context.attrs.labelLeft" class="formkit-prime-left">{{ context.attrs.labelLeft }}</span>
|
|
19
|
+
<TriStateCheckbox
|
|
20
|
+
v-model="context._value"
|
|
21
|
+
v-bind="attrs"
|
|
22
|
+
:input-id="context.id"
|
|
23
|
+
:disabled="attrs._disabled ?? !!context?.disabled"
|
|
24
|
+
:readonly="attrs._readonly ?? false"
|
|
25
|
+
:input-style="attrs.style"
|
|
26
|
+
:input-class="styleClass"
|
|
27
|
+
@change="handleChange"
|
|
28
|
+
/>
|
|
29
|
+
<span v-if="context.attrs.labelRight" class="formkit-prime-right">{{ context.attrs.labelRight }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import PrimeAutoComplete from './PrimeAutoComplete.vue';
|
|
2
|
+
import PrimeCalendar from './PrimeCalendar.vue';
|
|
3
|
+
import PrimeCascadeSelect from './PrimeCascadeSelect.vue';
|
|
4
|
+
import PrimeCheckbox from './PrimeCheckbox.vue';
|
|
5
|
+
import PrimeChips from './PrimeChips.vue';
|
|
6
|
+
import PrimeColorPicker from './PrimeColorPicker.vue';
|
|
7
|
+
import PrimeDropdown from './PrimeDropdown.vue';
|
|
8
|
+
import PrimeEditor from './PrimeEditor.vue';
|
|
9
|
+
import PrimeInputMask from './PrimeInputMask.vue';
|
|
10
|
+
import PrimeInputNumber from './PrimeInputNumber.vue';
|
|
11
|
+
import PrimeInputSwitch from './PrimeInputSwitch.vue';
|
|
12
|
+
import PrimeInputText from './PrimeInputText.vue';
|
|
13
|
+
import PrimeTextarea from './PrimeTextarea.vue';
|
|
14
|
+
import PrimeKnob from './PrimeKnob.vue';
|
|
15
|
+
import PrimeMultiSelect from './PrimeMultiSelect.vue';
|
|
16
|
+
import PrimeListbox from './PrimeListbox.vue';
|
|
17
|
+
import PrimePassword from './PrimePassword.vue';
|
|
18
|
+
import PrimeRadioButton from './PrimeRadioButton.vue';
|
|
19
|
+
import PrimeRating from './PrimeRating.vue';
|
|
20
|
+
import PrimeSlider from './PrimeSlider.vue';
|
|
21
|
+
import PrimeToggleButton from './PrimeToggleButton.vue';
|
|
22
|
+
import PrimeTreeSelect from './PrimeTreeSelect.vue';
|
|
23
|
+
import PrimeSelectButton from './PrimeSelectButton.vue';
|
|
24
|
+
import PrimeTriStateCheckbox from './PrimeTriStateCheckbox.vue';
|
|
25
|
+
export { PrimeAutoComplete, PrimeCalendar, PrimeCascadeSelect, PrimeCheckbox, PrimeChips, PrimeColorPicker, PrimeDropdown, PrimeEditor, PrimeInputMask, PrimeInputNumber, PrimeInputSwitch, PrimeInputText, PrimeTextarea, PrimeKnob, PrimeMultiSelect, PrimeListbox, PrimePassword, PrimeRadioButton, PrimeRating, PrimeSlider, PrimeToggleButton, PrimeTreeSelect, PrimeSelectButton, PrimeTriStateCheckbox, };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PrimeAutoComplete", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _PrimeAutoComplete.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PrimeCalendar", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _PrimeCalendar.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "PrimeCascadeSelect", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _PrimeCascadeSelect.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "PrimeCheckbox", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _PrimeCheckbox.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "PrimeChips", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _PrimeChips.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "PrimeColorPicker", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _PrimeColorPicker.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "PrimeDropdown", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _PrimeDropdown.default;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "PrimeEditor", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _PrimeEditor.default;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "PrimeInputMask", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _PrimeInputMask.default;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "PrimeInputNumber", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _PrimeInputNumber.default;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "PrimeInputSwitch", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _PrimeInputSwitch.default;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "PrimeInputText", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _PrimeInputText.default;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "PrimeKnob", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _PrimeKnob.default;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "PrimeListbox", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _PrimeListbox.default;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "PrimeMultiSelect", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _PrimeMultiSelect.default;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "PrimePassword", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _PrimePassword.default;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "PrimeRadioButton", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _PrimeRadioButton.default;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "PrimeRating", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _PrimeRating.default;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "PrimeSelectButton", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _PrimeSelectButton.default;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "PrimeSlider", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _PrimeSlider.default;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "PrimeTextarea", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _PrimeTextarea.default;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "PrimeToggleButton", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _PrimeToggleButton.default;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "PrimeTreeSelect", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _PrimeTreeSelect.default;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "PrimeTriStateCheckbox", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _PrimeTriStateCheckbox.default;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
var _PrimeAutoComplete = _interopRequireDefault(require("./PrimeAutoComplete.vue"));
|
|
151
|
+
var _PrimeCalendar = _interopRequireDefault(require("./PrimeCalendar.vue"));
|
|
152
|
+
var _PrimeCascadeSelect = _interopRequireDefault(require("./PrimeCascadeSelect.vue"));
|
|
153
|
+
var _PrimeCheckbox = _interopRequireDefault(require("./PrimeCheckbox.vue"));
|
|
154
|
+
var _PrimeChips = _interopRequireDefault(require("./PrimeChips.vue"));
|
|
155
|
+
var _PrimeColorPicker = _interopRequireDefault(require("./PrimeColorPicker.vue"));
|
|
156
|
+
var _PrimeDropdown = _interopRequireDefault(require("./PrimeDropdown.vue"));
|
|
157
|
+
var _PrimeEditor = _interopRequireDefault(require("./PrimeEditor.vue"));
|
|
158
|
+
var _PrimeInputMask = _interopRequireDefault(require("./PrimeInputMask.vue"));
|
|
159
|
+
var _PrimeInputNumber = _interopRequireDefault(require("./PrimeInputNumber.vue"));
|
|
160
|
+
var _PrimeInputSwitch = _interopRequireDefault(require("./PrimeInputSwitch.vue"));
|
|
161
|
+
var _PrimeInputText = _interopRequireDefault(require("./PrimeInputText.vue"));
|
|
162
|
+
var _PrimeTextarea = _interopRequireDefault(require("./PrimeTextarea.vue"));
|
|
163
|
+
var _PrimeKnob = _interopRequireDefault(require("./PrimeKnob.vue"));
|
|
164
|
+
var _PrimeMultiSelect = _interopRequireDefault(require("./PrimeMultiSelect.vue"));
|
|
165
|
+
var _PrimeListbox = _interopRequireDefault(require("./PrimeListbox.vue"));
|
|
166
|
+
var _PrimePassword = _interopRequireDefault(require("./PrimePassword.vue"));
|
|
167
|
+
var _PrimeRadioButton = _interopRequireDefault(require("./PrimeRadioButton.vue"));
|
|
168
|
+
var _PrimeRating = _interopRequireDefault(require("./PrimeRating.vue"));
|
|
169
|
+
var _PrimeSlider = _interopRequireDefault(require("./PrimeSlider.vue"));
|
|
170
|
+
var _PrimeToggleButton = _interopRequireDefault(require("./PrimeToggleButton.vue"));
|
|
171
|
+
var _PrimeTreeSelect = _interopRequireDefault(require("./PrimeTreeSelect.vue"));
|
|
172
|
+
var _PrimeSelectButton = _interopRequireDefault(require("./PrimeSelectButton.vue"));
|
|
173
|
+
var _PrimeTriStateCheckbox = _interopRequireDefault(require("./PrimeTriStateCheckbox.vue"));
|
|
174
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import PrimeAutoComplete from "./PrimeAutoComplete.vue";
|
|
2
|
+
import PrimeCalendar from "./PrimeCalendar.vue";
|
|
3
|
+
import PrimeCascadeSelect from "./PrimeCascadeSelect.vue";
|
|
4
|
+
import PrimeCheckbox from "./PrimeCheckbox.vue";
|
|
5
|
+
import PrimeChips from "./PrimeChips.vue";
|
|
6
|
+
import PrimeColorPicker from "./PrimeColorPicker.vue";
|
|
7
|
+
import PrimeDropdown from "./PrimeDropdown.vue";
|
|
8
|
+
import PrimeEditor from "./PrimeEditor.vue";
|
|
9
|
+
import PrimeInputMask from "./PrimeInputMask.vue";
|
|
10
|
+
import PrimeInputNumber from "./PrimeInputNumber.vue";
|
|
11
|
+
import PrimeInputSwitch from "./PrimeInputSwitch.vue";
|
|
12
|
+
import PrimeInputText from "./PrimeInputText.vue";
|
|
13
|
+
import PrimeTextarea from "./PrimeTextarea.vue";
|
|
14
|
+
import PrimeKnob from "./PrimeKnob.vue";
|
|
15
|
+
import PrimeMultiSelect from "./PrimeMultiSelect.vue";
|
|
16
|
+
import PrimeListbox from "./PrimeListbox.vue";
|
|
17
|
+
import PrimePassword from "./PrimePassword.vue";
|
|
18
|
+
import PrimeRadioButton from "./PrimeRadioButton.vue";
|
|
19
|
+
import PrimeRating from "./PrimeRating.vue";
|
|
20
|
+
import PrimeSlider from "./PrimeSlider.vue";
|
|
21
|
+
import PrimeToggleButton from "./PrimeToggleButton.vue";
|
|
22
|
+
import PrimeTreeSelect from "./PrimeTreeSelect.vue";
|
|
23
|
+
import PrimeSelectButton from "./PrimeSelectButton.vue";
|
|
24
|
+
import PrimeTriStateCheckbox from "./PrimeTriStateCheckbox.vue";
|
|
25
|
+
export {
|
|
26
|
+
PrimeAutoComplete,
|
|
27
|
+
PrimeCalendar,
|
|
28
|
+
PrimeCascadeSelect,
|
|
29
|
+
PrimeCheckbox,
|
|
30
|
+
PrimeChips,
|
|
31
|
+
PrimeColorPicker,
|
|
32
|
+
PrimeDropdown,
|
|
33
|
+
PrimeEditor,
|
|
34
|
+
PrimeInputMask,
|
|
35
|
+
PrimeInputNumber,
|
|
36
|
+
PrimeInputSwitch,
|
|
37
|
+
PrimeInputText,
|
|
38
|
+
PrimeTextarea,
|
|
39
|
+
PrimeKnob,
|
|
40
|
+
PrimeMultiSelect,
|
|
41
|
+
PrimeListbox,
|
|
42
|
+
PrimePassword,
|
|
43
|
+
PrimeRadioButton,
|
|
44
|
+
PrimeRating,
|
|
45
|
+
PrimeSlider,
|
|
46
|
+
PrimeToggleButton,
|
|
47
|
+
PrimeTreeSelect,
|
|
48
|
+
PrimeSelectButton,
|
|
49
|
+
PrimeTriStateCheckbox
|
|
50
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useFormKitSchema", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _useFormKitSchema.useFormKitSchema;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _useFormKitSchema = require("./useFormKitSchema");
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFormKitSchema = useFormKitSchema;
|
|
7
|
+
function useFormKitSchema() {
|
|
8
|
+
const addComponent = (component = "Button", props = {}, render = "true") => {
|
|
9
|
+
return {
|
|
10
|
+
$cmp: component,
|
|
11
|
+
if: render,
|
|
12
|
+
props
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const addElement = (element = "div", children = [], attrs = {}, render = "true") => {
|
|
16
|
+
return {
|
|
17
|
+
$el: element,
|
|
18
|
+
if: render,
|
|
19
|
+
attrs,
|
|
20
|
+
children
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
const addGroup = (name, children = [], render = "true") => {
|
|
24
|
+
return {
|
|
25
|
+
$formkit: "group",
|
|
26
|
+
if: render,
|
|
27
|
+
name,
|
|
28
|
+
children
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const addList = (name, children, dynamic = true, render = "true") => {
|
|
32
|
+
return {
|
|
33
|
+
$formkit: "list",
|
|
34
|
+
if: render,
|
|
35
|
+
name,
|
|
36
|
+
dynamic,
|
|
37
|
+
children
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const addListGroup = (children = [], render = "true") => {
|
|
41
|
+
return {
|
|
42
|
+
$formkit: "group",
|
|
43
|
+
if: render,
|
|
44
|
+
for: ["item", "index", "$items"],
|
|
45
|
+
// 👈 $items is in the slot’s scope
|
|
46
|
+
key: "$item",
|
|
47
|
+
index: "$index",
|
|
48
|
+
children
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
function addListGroupFunctions(data) {
|
|
52
|
+
const swapElements = (array, index1, index2) => {
|
|
53
|
+
array[index1] = array.splice(index2, 1, array[index1])[0];
|
|
54
|
+
return array;
|
|
55
|
+
};
|
|
56
|
+
data.addNode = node => () => {
|
|
57
|
+
const newArray = [...node.value, {}];
|
|
58
|
+
node.input(newArray, false);
|
|
59
|
+
};
|
|
60
|
+
data.removeNode = (node, index) => () => {
|
|
61
|
+
node.input(node._value.filter((_, i) => i !== index), false);
|
|
62
|
+
};
|
|
63
|
+
data.moveNodeUp = (node, index) => () => {
|
|
64
|
+
const array = [...node.value];
|
|
65
|
+
if (index > 0) node.input(swapElements(array, index - 1, index), false);
|
|
66
|
+
};
|
|
67
|
+
data.moveNodeDown = (node, index) => () => {
|
|
68
|
+
const array = [...node.value];
|
|
69
|
+
if (index < array.length - 1) node.input(swapElements(array, index, index + 1), false);
|
|
70
|
+
};
|
|
71
|
+
data.insertDuplicate = (node, index) => () => {
|
|
72
|
+
const obj = node.value[index];
|
|
73
|
+
const newArray = [...node.value, obj];
|
|
74
|
+
node.input(newArray, false);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
addComponent,
|
|
79
|
+
addElement,
|
|
80
|
+
addGroup,
|
|
81
|
+
addList,
|
|
82
|
+
addListGroup,
|
|
83
|
+
addListGroupFunctions
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export function useFormKitSchema() {
|
|
2
|
+
const addComponent = (component = "Button", props = {}, render = "true") => {
|
|
3
|
+
return {
|
|
4
|
+
$cmp: component,
|
|
5
|
+
if: render,
|
|
6
|
+
props
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
const addElement = (element = "div", children = [], attrs = {}, render = "true") => {
|
|
10
|
+
return {
|
|
11
|
+
$el: element,
|
|
12
|
+
if: render,
|
|
13
|
+
attrs,
|
|
14
|
+
children
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const addGroup = (name, children = [], render = "true") => {
|
|
18
|
+
return {
|
|
19
|
+
$formkit: "group",
|
|
20
|
+
if: render,
|
|
21
|
+
name,
|
|
22
|
+
children
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const addList = (name, children, dynamic = true, render = "true") => {
|
|
26
|
+
return {
|
|
27
|
+
$formkit: "list",
|
|
28
|
+
if: render,
|
|
29
|
+
name,
|
|
30
|
+
dynamic,
|
|
31
|
+
children
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const addListGroup = (children = [], render = "true") => {
|
|
35
|
+
return {
|
|
36
|
+
$formkit: "group",
|
|
37
|
+
if: render,
|
|
38
|
+
for: ["item", "index", "$items"],
|
|
39
|
+
// 👈 $items is in the slot’s scope
|
|
40
|
+
key: "$item",
|
|
41
|
+
index: "$index",
|
|
42
|
+
children
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
function addListGroupFunctions(data) {
|
|
46
|
+
const swapElements = (array, index1, index2) => {
|
|
47
|
+
array[index1] = array.splice(index2, 1, array[index1])[0];
|
|
48
|
+
return array;
|
|
49
|
+
};
|
|
50
|
+
data.addNode = (node) => () => {
|
|
51
|
+
const newArray = [...node.value, {}];
|
|
52
|
+
node.input(newArray, false);
|
|
53
|
+
};
|
|
54
|
+
data.removeNode = (node, index) => () => {
|
|
55
|
+
node.input(node._value.filter((_, i) => i !== index), false);
|
|
56
|
+
};
|
|
57
|
+
data.moveNodeUp = (node, index) => () => {
|
|
58
|
+
const array = [...node.value];
|
|
59
|
+
if (index > 0)
|
|
60
|
+
node.input(swapElements(array, index - 1, index), false);
|
|
61
|
+
};
|
|
62
|
+
data.moveNodeDown = (node, index) => () => {
|
|
63
|
+
const array = [...node.value];
|
|
64
|
+
if (index < array.length - 1)
|
|
65
|
+
node.input(swapElements(array, index, index + 1), false);
|
|
66
|
+
};
|
|
67
|
+
data.insertDuplicate = (node, index) => () => {
|
|
68
|
+
const obj = node.value[index];
|
|
69
|
+
const newArray = [...node.value, obj];
|
|
70
|
+
node.input(newArray, false);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return { addComponent, addElement, addGroup, addList, addListGroup, addListGroupFunctions };
|
|
74
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
import type { FormKitTypeDefinition } from '@formkit/core';
|
|
2
|
+
import { useFormKitSchema } from './composables';
|
|
3
|
+
export declare const primeAutoCompleteDefinition: FormKitTypeDefinition;
|
|
4
|
+
export declare const primeInputTextDefinition: FormKitTypeDefinition;
|
|
5
|
+
export declare const primeInputNumberDefinition: FormKitTypeDefinition;
|
|
6
|
+
export declare const primeInputMaskDefinition: FormKitTypeDefinition;
|
|
7
|
+
export declare const primePasswordDefinition: FormKitTypeDefinition;
|
|
8
|
+
export declare const primeTextareaDefinition: FormKitTypeDefinition;
|
|
9
|
+
export declare const primeCheckboxDefinition: FormKitTypeDefinition;
|
|
10
|
+
export declare const primeInputSwitchDefinition: FormKitTypeDefinition;
|
|
11
|
+
export declare const primeEditorDefinition: FormKitTypeDefinition;
|
|
12
|
+
export declare const primeDropdownDefinition: FormKitTypeDefinition;
|
|
13
|
+
export declare const primeMultiSelectDefinition: FormKitTypeDefinition;
|
|
14
|
+
export declare const primeListboxDefinition: FormKitTypeDefinition;
|
|
15
|
+
export declare const primeCalendarDefinition: FormKitTypeDefinition;
|
|
16
|
+
export declare const primeSliderDefinition: FormKitTypeDefinition;
|
|
17
|
+
export declare const primeRatingDefinition: FormKitTypeDefinition;
|
|
18
|
+
export declare const primeRadioButtonDefinition: FormKitTypeDefinition;
|
|
19
|
+
export declare const primeChipsDefinition: FormKitTypeDefinition;
|
|
20
|
+
export declare const primeKnobDefinition: FormKitTypeDefinition;
|
|
21
|
+
export declare const primeColorPickerDefinition: FormKitTypeDefinition;
|
|
22
|
+
export declare const primeToggleButtonDefinition: FormKitTypeDefinition;
|
|
23
|
+
export declare const primeSelectButtonDefinition: FormKitTypeDefinition;
|
|
24
|
+
export declare const primeTriStateCheckboxDefinition: FormKitTypeDefinition;
|
|
25
|
+
export declare const primeCascadeSelectDefinition: FormKitTypeDefinition;
|
|
26
|
+
export declare const primeTreeSelectDefinition: FormKitTypeDefinition;
|
|
27
|
+
export declare const primeInputs: {
|
|
28
|
+
primeAutoComplete: FormKitTypeDefinition;
|
|
29
|
+
primeInputText: FormKitTypeDefinition;
|
|
30
|
+
primeInputNumber: FormKitTypeDefinition;
|
|
31
|
+
primeInputMask: FormKitTypeDefinition;
|
|
32
|
+
primePassword: FormKitTypeDefinition;
|
|
33
|
+
primeCheckbox: FormKitTypeDefinition;
|
|
34
|
+
primeInputSwitch: FormKitTypeDefinition;
|
|
35
|
+
primeTextarea: FormKitTypeDefinition;
|
|
36
|
+
primeEditor: FormKitTypeDefinition;
|
|
37
|
+
primeDropdown: FormKitTypeDefinition;
|
|
38
|
+
primeMultiSelect: FormKitTypeDefinition;
|
|
39
|
+
primeCalendar: FormKitTypeDefinition;
|
|
40
|
+
primeSlider: FormKitTypeDefinition;
|
|
41
|
+
primeChips: FormKitTypeDefinition;
|
|
42
|
+
primeKnob: FormKitTypeDefinition;
|
|
43
|
+
primeRating: FormKitTypeDefinition;
|
|
44
|
+
primeRadioButton: FormKitTypeDefinition;
|
|
45
|
+
primeColorPicker: FormKitTypeDefinition;
|
|
46
|
+
primeToggleButton: FormKitTypeDefinition;
|
|
47
|
+
primeListbox: FormKitTypeDefinition;
|
|
48
|
+
primeSelectButton: FormKitTypeDefinition;
|
|
49
|
+
primeTriStateCheckbox: FormKitTypeDefinition;
|
|
50
|
+
primeCascadeSelect: FormKitTypeDefinition;
|
|
51
|
+
primeTreeSelect: FormKitTypeDefinition;
|
|
52
|
+
};
|
|
53
|
+
export { useFormKitSchema, };
|