@sfxcode/formkit-primevue 2.3.7 → 2.3.9
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/FormKitDataEdit.vue +10 -2
- package/dist/components/FormKitDataView.vue +1 -3
- package/dist/components/PrimeCheckbox.vue +9 -6
- package/dist/components/PrimeOutputBoolean.vue +9 -4
- package/dist/components/PrimeOutputDate.vue +6 -2
- package/dist/components/PrimeOutputDuration.vue +6 -2
- package/dist/components/PrimeOutputLink.vue +7 -2
- package/dist/components/PrimeOutputList.vue +7 -1
- package/dist/components/PrimeOutputNumber.vue +6 -2
- package/dist/components/PrimeOutputText.vue +7 -1
- package/dist/components/PrimeRadioButton.vue +4 -5
- package/dist/components/PrimeToggleSwitch.vue +9 -6
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +5 -5
- package/dist/composables/index.mjs +2 -2
- package/dist/composables/useFormKitRepeater.d.ts +15 -0
- package/dist/composables/useFormKitRepeater.js +71 -0
- package/dist/composables/useFormKitRepeater.mjs +51 -0
- package/dist/composables/useFormKitSchema.d.ts +6 -1
- package/dist/composables/useFormKitSchema.js +20 -29
- package/dist/composables/useFormKitSchema.mjs +8 -29
- package/dist/composables/useFormKitSection.js +2 -2
- package/dist/composables/useFormKitSection.mjs +2 -2
- package/dist/composables/useInputEditor.js +8 -1
- package/dist/composables/useInputEditor.mjs +10 -3
- package/dist/composables/useInputEditorSchema.d.ts +107 -7
- package/dist/composables/useInputEditorSchema.js +129 -84
- package/dist/composables/useInputEditorSchema.mjs +232 -207
- package/dist/definitions/input.js +23 -23
- package/dist/definitions/input.mjs +26 -49
- package/dist/definitions/output.js +7 -7
- package/dist/definitions/output.mjs +7 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -0
- package/dist/index.mjs +2 -1
- package/dist/sass/formkit-primevue.scss +139 -115
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/composables/useFormKitIcon.d.ts +0 -5
- package/dist/composables/useFormKitIcon.js +0 -23
- package/dist/composables/useFormKitIcon.mjs +0 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
export function useFormKitSection(context) {
|
|
3
3
|
const hasPrefix = computed(() => {
|
|
4
|
-
return context?.
|
|
4
|
+
return context?.prefix && context?.prefix.length > 0;
|
|
5
5
|
});
|
|
6
6
|
const hasPrefixIcon = computed(() => {
|
|
7
7
|
return context?.prefixIcon && context?.prefixIcon.length > 0;
|
|
@@ -10,7 +10,7 @@ export function useFormKitSection(context) {
|
|
|
10
10
|
return context?.suffixIcon && context?.suffixIcon.length > 0;
|
|
11
11
|
});
|
|
12
12
|
const hasSuffix = computed(() => {
|
|
13
|
-
return context?.
|
|
13
|
+
return context?.suffix && context?.suffix.length > 0;
|
|
14
14
|
});
|
|
15
15
|
return { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon };
|
|
16
16
|
}
|
|
@@ -34,12 +34,17 @@ function useInputEditor() {
|
|
|
34
34
|
disabled: disabledValue,
|
|
35
35
|
preserve: preserveValue
|
|
36
36
|
};
|
|
37
|
+
let outerClass = "";
|
|
38
|
+
if (data.outerClassGrid && data.outerClassGrid !== "col-12") outerClass = `${outerClass} ${data.outerClassGrid}`;
|
|
39
|
+
if (data.outerClass) outerClass = outerClass + data.outerClass;
|
|
40
|
+
if (outerClass.trim().length === 0) outerClass = void 0;
|
|
37
41
|
const undefinedObject = {
|
|
38
42
|
prime: void 0,
|
|
39
43
|
schemaResultFormKey: void 0,
|
|
40
44
|
_dollar_formkit: void 0,
|
|
41
45
|
slots: void 0,
|
|
42
|
-
selectButton: void 0
|
|
46
|
+
selectButton: void 0,
|
|
47
|
+
outerClassGrid: void 0
|
|
43
48
|
};
|
|
44
49
|
const useOptions = primeInputWithOptionNames.map(s => `prime${s}`).includes(formkitInput);
|
|
45
50
|
let result = {};
|
|
@@ -49,6 +54,7 @@ function useInputEditor() {
|
|
|
49
54
|
...tempData,
|
|
50
55
|
...undefinedObject,
|
|
51
56
|
...defaultObject,
|
|
57
|
+
outerClass,
|
|
52
58
|
optionLabel: "label",
|
|
53
59
|
optionValue: "value"
|
|
54
60
|
};else result = {
|
|
@@ -57,6 +63,7 @@ function useInputEditor() {
|
|
|
57
63
|
...tempData,
|
|
58
64
|
...undefinedObject,
|
|
59
65
|
...defaultObject,
|
|
66
|
+
outerClass,
|
|
60
67
|
options: void 0
|
|
61
68
|
};
|
|
62
69
|
return result;
|
|
@@ -24,13 +24,20 @@ export function useInputEditor() {
|
|
|
24
24
|
const disabledValue = data.disabled ? true : void 0;
|
|
25
25
|
const preserveValue = data.preserve ? true : void 0;
|
|
26
26
|
const defaultObject = { readonly: readonlyValue, disabled: disabledValue, preserve: preserveValue };
|
|
27
|
-
|
|
27
|
+
let outerClass = "";
|
|
28
|
+
if (data.outerClassGrid && data.outerClassGrid !== "col-12")
|
|
29
|
+
outerClass = `${outerClass} ${data.outerClassGrid}`;
|
|
30
|
+
if (data.outerClass)
|
|
31
|
+
outerClass = outerClass + data.outerClass;
|
|
32
|
+
if (outerClass.trim().length === 0)
|
|
33
|
+
outerClass = void 0;
|
|
34
|
+
const undefinedObject = { prime: void 0, schemaResultFormKey: void 0, _dollar_formkit: void 0, slots: void 0, selectButton: void 0, outerClassGrid: void 0 };
|
|
28
35
|
const useOptions = primeInputWithOptionNames.map((s) => `prime${s}`).includes(formkitInput);
|
|
29
36
|
let result = {};
|
|
30
37
|
if (useOptions)
|
|
31
|
-
result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, optionLabel: "label", optionValue: "value" };
|
|
38
|
+
result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, outerClass, optionLabel: "label", optionValue: "value" };
|
|
32
39
|
else
|
|
33
|
-
result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, options: void 0 };
|
|
40
|
+
result = { ...data, $formkit: formkitInput, ...tempData, ...undefinedObject, ...defaultObject, outerClass, options: void 0 };
|
|
34
41
|
return result;
|
|
35
42
|
}
|
|
36
43
|
function dataToSchema(data) {
|
|
@@ -1,15 +1,46 @@
|
|
|
1
1
|
export declare function useInputEditorSchema(): {
|
|
2
2
|
editorSchema: (inputOptions?: any[]) => ({
|
|
3
|
-
$el: string;
|
|
4
|
-
if: string;
|
|
5
|
-
attrs: object;
|
|
6
|
-
children: string | any[];
|
|
7
|
-
} | {
|
|
8
3
|
$formkit: string;
|
|
9
4
|
if: string;
|
|
10
5
|
name: string;
|
|
11
6
|
dynamic: boolean;
|
|
12
7
|
children: object[];
|
|
8
|
+
} | {
|
|
9
|
+
$formkit: string;
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
optionLabel: string;
|
|
15
|
+
optionValue: string;
|
|
16
|
+
options: any[];
|
|
17
|
+
filter: boolean;
|
|
18
|
+
key: string;
|
|
19
|
+
outerClass: string;
|
|
20
|
+
preserve: boolean;
|
|
21
|
+
validation?: undefined;
|
|
22
|
+
validationVisibility?: undefined;
|
|
23
|
+
allowEmpty?: undefined;
|
|
24
|
+
if?: undefined;
|
|
25
|
+
suffix?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
$formkit: string;
|
|
28
|
+
name: string;
|
|
29
|
+
label: string;
|
|
30
|
+
validation: string;
|
|
31
|
+
validationVisibility: string;
|
|
32
|
+
key: string;
|
|
33
|
+
outerClass: string;
|
|
34
|
+
preserve: boolean;
|
|
35
|
+
id?: undefined;
|
|
36
|
+
value?: undefined;
|
|
37
|
+
optionLabel?: undefined;
|
|
38
|
+
optionValue?: undefined;
|
|
39
|
+
options?: undefined;
|
|
40
|
+
filter?: undefined;
|
|
41
|
+
allowEmpty?: undefined;
|
|
42
|
+
if?: undefined;
|
|
43
|
+
suffix?: undefined;
|
|
13
44
|
} | {
|
|
14
45
|
$formkit: string;
|
|
15
46
|
id: string;
|
|
@@ -24,8 +55,13 @@ export declare function useInputEditorSchema(): {
|
|
|
24
55
|
allowEmpty: boolean;
|
|
25
56
|
key: string;
|
|
26
57
|
preserve: boolean;
|
|
27
|
-
if?: undefined;
|
|
28
58
|
label?: undefined;
|
|
59
|
+
filter?: undefined;
|
|
60
|
+
outerClass?: undefined;
|
|
61
|
+
validation?: undefined;
|
|
62
|
+
validationVisibility?: undefined;
|
|
63
|
+
if?: undefined;
|
|
64
|
+
suffix?: undefined;
|
|
29
65
|
} | {
|
|
30
66
|
$formkit: string;
|
|
31
67
|
if: string;
|
|
@@ -34,17 +70,76 @@ export declare function useInputEditorSchema(): {
|
|
|
34
70
|
key: string;
|
|
35
71
|
preserve: boolean;
|
|
36
72
|
id?: undefined;
|
|
37
|
-
|
|
73
|
+
value?: undefined;
|
|
38
74
|
optionLabel?: undefined;
|
|
39
75
|
optionValue?: undefined;
|
|
76
|
+
options?: undefined;
|
|
77
|
+
filter?: undefined;
|
|
78
|
+
outerClass?: undefined;
|
|
79
|
+
validation?: undefined;
|
|
80
|
+
validationVisibility?: undefined;
|
|
81
|
+
allowEmpty?: undefined;
|
|
82
|
+
suffix?: undefined;
|
|
83
|
+
} | {
|
|
84
|
+
$formkit: string;
|
|
85
|
+
if: string;
|
|
86
|
+
name: string;
|
|
87
|
+
label: string;
|
|
88
|
+
key: string;
|
|
89
|
+
outerClass: string;
|
|
90
|
+
preserve: boolean;
|
|
91
|
+
id?: undefined;
|
|
40
92
|
value?: undefined;
|
|
93
|
+
optionLabel?: undefined;
|
|
94
|
+
optionValue?: undefined;
|
|
95
|
+
options?: undefined;
|
|
96
|
+
filter?: undefined;
|
|
97
|
+
validation?: undefined;
|
|
98
|
+
validationVisibility?: undefined;
|
|
99
|
+
allowEmpty?: undefined;
|
|
100
|
+
suffix?: undefined;
|
|
101
|
+
} | {
|
|
102
|
+
$formkit: string;
|
|
103
|
+
if: string;
|
|
104
|
+
name: string;
|
|
105
|
+
label: string;
|
|
106
|
+
key: string;
|
|
107
|
+
value: boolean;
|
|
108
|
+
suffix: string;
|
|
109
|
+
outerClass: string;
|
|
110
|
+
preserve: boolean;
|
|
111
|
+
id?: undefined;
|
|
112
|
+
optionLabel?: undefined;
|
|
113
|
+
optionValue?: undefined;
|
|
114
|
+
options?: undefined;
|
|
115
|
+
filter?: undefined;
|
|
116
|
+
validation?: undefined;
|
|
117
|
+
validationVisibility?: undefined;
|
|
41
118
|
allowEmpty?: undefined;
|
|
42
119
|
} | {
|
|
43
120
|
$formkit: string;
|
|
44
121
|
if: string;
|
|
45
122
|
name: string;
|
|
46
123
|
label: string;
|
|
124
|
+
key: string;
|
|
125
|
+
value: boolean;
|
|
126
|
+
outerClass: string;
|
|
127
|
+
preserve: boolean;
|
|
128
|
+
id?: undefined;
|
|
129
|
+
optionLabel?: undefined;
|
|
130
|
+
optionValue?: undefined;
|
|
131
|
+
options?: undefined;
|
|
132
|
+
filter?: undefined;
|
|
133
|
+
validation?: undefined;
|
|
134
|
+
validationVisibility?: undefined;
|
|
135
|
+
allowEmpty?: undefined;
|
|
136
|
+
suffix?: undefined;
|
|
137
|
+
} | {
|
|
138
|
+
$formkit: string;
|
|
139
|
+
if: string;
|
|
140
|
+
name: string;
|
|
47
141
|
value: string;
|
|
142
|
+
label: string;
|
|
48
143
|
optionLabel: string;
|
|
49
144
|
optionValue: string;
|
|
50
145
|
options: {
|
|
@@ -52,9 +147,14 @@ export declare function useInputEditorSchema(): {
|
|
|
52
147
|
value: string;
|
|
53
148
|
}[];
|
|
54
149
|
key: string;
|
|
150
|
+
outerClass: string;
|
|
55
151
|
preserve: boolean;
|
|
56
152
|
id?: undefined;
|
|
153
|
+
filter?: undefined;
|
|
154
|
+
validation?: undefined;
|
|
155
|
+
validationVisibility?: undefined;
|
|
57
156
|
allowEmpty?: undefined;
|
|
157
|
+
suffix?: undefined;
|
|
58
158
|
})[];
|
|
59
159
|
primeInputOptions: (list: string[]) => {
|
|
60
160
|
label: string;
|
|
@@ -6,46 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useInputEditorSchema = useInputEditorSchema;
|
|
7
7
|
var _useFormKitSchema = require("./useFormKitSchema");
|
|
8
8
|
var _useInputEditor = require("./useInputEditor");
|
|
9
|
+
var _useFormKitRepeater = require("./useFormKitRepeater");
|
|
9
10
|
function useInputEditorSchema() {
|
|
10
11
|
const {
|
|
11
|
-
addElement,
|
|
12
12
|
addList,
|
|
13
|
-
addListGroup
|
|
14
|
-
addComponent
|
|
13
|
+
addListGroup
|
|
15
14
|
} = (0, _useFormKitSchema.useFormKitSchema)();
|
|
15
|
+
const {
|
|
16
|
+
addInsertButton,
|
|
17
|
+
addGroupButtons
|
|
18
|
+
} = (0, _useFormKitRepeater.useFormKitRepeater)();
|
|
16
19
|
const {
|
|
17
20
|
primeInputNames,
|
|
18
21
|
primeOutputNames
|
|
19
22
|
} = (0, _useInputEditor.useInputEditor)();
|
|
20
|
-
function addFlexElement(children) {
|
|
21
|
-
return addElement("div", children, {
|
|
22
|
-
style: "max-width: 40rem;display: flex;gap: 1rem;"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function addGridElement(children) {
|
|
26
|
-
return addElement("div", children, {
|
|
27
|
-
style: "display: grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap: 1rem;"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function addGroupButtons() {
|
|
31
|
-
const addButtonComponent = (onClick = "", label = "", icon = "", severity = "", render = "true", styleClass = "p-button-sm", style = "margin-left: 0.5rem;") => {
|
|
32
|
-
return addComponent("Button", {
|
|
33
|
-
onClick,
|
|
34
|
-
label,
|
|
35
|
-
icon,
|
|
36
|
-
class: styleClass,
|
|
37
|
-
style,
|
|
38
|
-
severity
|
|
39
|
-
}, render);
|
|
40
|
-
};
|
|
41
|
-
return addElement("div", [addButtonComponent("$removeNode($node, $index)", "", "pi pi-times", "danger"), addButtonComponent("$copyNode($node, $index)", "", "pi pi-plus"), addButtonComponent("$moveNodeUp($node, $index)", "", "pi pi-arrow-up", "secondary", "$index != 0"), addElement("span", [], {
|
|
42
|
-
style: "margin-left: 0.5rem;margin-right: 2.5rem;"
|
|
43
|
-
}, "$index == 0"), addButtonComponent("$moveNodeDown($node, $index)", "", "pi pi-arrow-down", "secondary", "$index < $node.value.length -1"), addElement("span", [], {
|
|
44
|
-
style: "margin-left: 0.5rem;margin-right: 2.5rem;"
|
|
45
|
-
}, "$index == $node.value.length -1")], {
|
|
46
|
-
style: "padding-top: 1.5rem;"
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
23
|
function primeInputOptions(list) {
|
|
50
24
|
return list.map(name => {
|
|
51
25
|
return {
|
|
@@ -60,6 +34,9 @@ function useInputEditorSchema() {
|
|
|
60
34
|
}, {
|
|
61
35
|
label: "Display",
|
|
62
36
|
value: "showDisplay"
|
|
37
|
+
}, {
|
|
38
|
+
label: "Style",
|
|
39
|
+
value: "showStyle"
|
|
63
40
|
}, {
|
|
64
41
|
label: "Validation",
|
|
65
42
|
value: "showValidation"
|
|
@@ -83,8 +60,45 @@ function useInputEditorSchema() {
|
|
|
83
60
|
label: "Submit",
|
|
84
61
|
value: "submit"
|
|
85
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
|
+
}];
|
|
86
100
|
function editorSchema(inputOptions = primeInputOptions([...primeInputNames, ...primeOutputNames])) {
|
|
87
|
-
return [
|
|
101
|
+
return [{
|
|
88
102
|
$formkit: "primeSelect",
|
|
89
103
|
id: "inputSelection",
|
|
90
104
|
name: "_dollar_formkit",
|
|
@@ -95,6 +109,7 @@ function useInputEditorSchema() {
|
|
|
95
109
|
options: inputOptions,
|
|
96
110
|
filter: true,
|
|
97
111
|
key: "schema_inputSelection",
|
|
112
|
+
outerClass: "col-6",
|
|
98
113
|
preserve: true
|
|
99
114
|
}, {
|
|
100
115
|
$formkit: "primeInputText",
|
|
@@ -103,8 +118,9 @@ function useInputEditorSchema() {
|
|
|
103
118
|
validation: "required",
|
|
104
119
|
validationVisibility: "live",
|
|
105
120
|
key: "schema_name",
|
|
121
|
+
outerClass: "col-6",
|
|
106
122
|
preserve: true
|
|
107
|
-
}
|
|
123
|
+
}, {
|
|
108
124
|
$formkit: "primeSelectButton",
|
|
109
125
|
id: "selectButton",
|
|
110
126
|
name: "selectButton",
|
|
@@ -129,12 +145,13 @@ function useInputEditorSchema() {
|
|
|
129
145
|
label: "Input Help",
|
|
130
146
|
key: "schema_help",
|
|
131
147
|
preserve: true
|
|
132
|
-
},
|
|
148
|
+
}, {
|
|
133
149
|
$formkit: "primeInputText",
|
|
134
150
|
if: "$get(selectButton).value === 'showBasic'",
|
|
135
151
|
name: "value",
|
|
136
152
|
label: "Input Value",
|
|
137
153
|
key: "schema_value",
|
|
154
|
+
outerClass: "col-6",
|
|
138
155
|
preserve: true
|
|
139
156
|
}, {
|
|
140
157
|
$formkit: "primeInputText",
|
|
@@ -142,13 +159,15 @@ function useInputEditorSchema() {
|
|
|
142
159
|
name: "format",
|
|
143
160
|
label: "Value Format",
|
|
144
161
|
key: "schema_format",
|
|
162
|
+
outerClass: "col-6",
|
|
145
163
|
preserve: true
|
|
146
|
-
}
|
|
164
|
+
}, {
|
|
147
165
|
$formkit: "primeInputText",
|
|
148
166
|
if: "$get(selectButton).value === 'showBasic'",
|
|
149
167
|
name: "id",
|
|
150
168
|
label: "Input ID",
|
|
151
169
|
key: "schema_id",
|
|
170
|
+
outerClass: "col-6",
|
|
152
171
|
preserve: true
|
|
153
172
|
}, {
|
|
154
173
|
$formkit: "primeInputText",
|
|
@@ -156,6 +175,7 @@ function useInputEditorSchema() {
|
|
|
156
175
|
name: "key",
|
|
157
176
|
label: "Input Key",
|
|
158
177
|
key: "schema_key",
|
|
178
|
+
outerClass: "col-6",
|
|
159
179
|
preserve: true
|
|
160
180
|
}, {
|
|
161
181
|
$formkit: "primeInputText",
|
|
@@ -163,46 +183,25 @@ function useInputEditorSchema() {
|
|
|
163
183
|
name: "tabindex",
|
|
164
184
|
label: "Tab Index",
|
|
165
185
|
key: "schema_tabindex",
|
|
186
|
+
outerClass: "col-6",
|
|
166
187
|
preserve: true
|
|
167
188
|
}, {
|
|
168
189
|
$formkit: "primeCheckbox",
|
|
169
190
|
if: "$get(selectButton).value === 'showBasic'",
|
|
170
191
|
name: "preserve",
|
|
171
|
-
label: "
|
|
192
|
+
label: "Preserve",
|
|
172
193
|
key: "schema_preserve",
|
|
173
194
|
value: false,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
$formkit: "primeInputText",
|
|
177
|
-
if: "$get(selectButton).value === 'showValidation'",
|
|
178
|
-
name: "validation",
|
|
179
|
-
label: "Field Validation",
|
|
180
|
-
key: "schema_validation",
|
|
181
|
-
preserve: true
|
|
182
|
-
}, {
|
|
183
|
-
$formkit: "primeSelect",
|
|
184
|
-
if: "$get(selectButton).value === 'showValidation'",
|
|
185
|
-
name: "validation-visibility",
|
|
186
|
-
label: "Field Validation Visibility",
|
|
187
|
-
value: "blur",
|
|
188
|
-
optionLabel: "label",
|
|
189
|
-
optionValue: "value",
|
|
190
|
-
options: validationOptions,
|
|
191
|
-
key: "schema_validation-visibility",
|
|
195
|
+
suffix: "Input Preserve",
|
|
196
|
+
outerClass: "col-3",
|
|
192
197
|
preserve: true
|
|
193
198
|
}, {
|
|
194
|
-
$formkit: "primeInputText",
|
|
195
|
-
if: "$get(selectButton).value === 'showValidation'",
|
|
196
|
-
name: "validation-label",
|
|
197
|
-
label: "Field Validation Label",
|
|
198
|
-
key: "schema_validation-label",
|
|
199
|
-
preserve: true
|
|
200
|
-
}, addGridElement([{
|
|
201
199
|
$formkit: "primeInputText",
|
|
202
200
|
if: "$get(selectButton).value === 'showDisplay'",
|
|
203
201
|
name: "class",
|
|
204
202
|
label: "Input StyleClass",
|
|
205
203
|
key: "schema_class",
|
|
204
|
+
outerClass: "col-6",
|
|
206
205
|
preserve: true
|
|
207
206
|
}, {
|
|
208
207
|
$formkit: "primeInputText",
|
|
@@ -210,20 +209,22 @@ function useInputEditorSchema() {
|
|
|
210
209
|
name: "style",
|
|
211
210
|
label: "Input Style",
|
|
212
211
|
key: "schema_style",
|
|
212
|
+
outerClass: "col-6",
|
|
213
213
|
preserve: true
|
|
214
|
-
}
|
|
214
|
+
}, {
|
|
215
215
|
$formkit: "primeInputText",
|
|
216
216
|
if: "$get(selectButton).value === 'showDisplay'",
|
|
217
217
|
name: "if",
|
|
218
218
|
label: "Should Render (if-Expression)",
|
|
219
219
|
key: "schema_if",
|
|
220
220
|
preserve: true
|
|
221
|
-
},
|
|
221
|
+
}, {
|
|
222
222
|
$formkit: "primeInputText",
|
|
223
223
|
if: "$get(selectButton).value === 'showDisplay'",
|
|
224
224
|
name: "prefixIcon",
|
|
225
225
|
label: "Prefix Icon",
|
|
226
226
|
key: "schema_prefix_icon",
|
|
227
|
+
outerClass: "col-6",
|
|
227
228
|
preserve: true
|
|
228
229
|
}, {
|
|
229
230
|
$formkit: "primeInputText",
|
|
@@ -231,6 +232,7 @@ function useInputEditorSchema() {
|
|
|
231
232
|
name: "prefix",
|
|
232
233
|
label: "Prefix",
|
|
233
234
|
key: "schema_prefix",
|
|
235
|
+
outerClass: "col-6",
|
|
234
236
|
preserve: true
|
|
235
237
|
}, {
|
|
236
238
|
$formkit: "primeInputText",
|
|
@@ -238,6 +240,7 @@ function useInputEditorSchema() {
|
|
|
238
240
|
name: "suffix",
|
|
239
241
|
label: "Suffix",
|
|
240
242
|
key: "schema_suffix",
|
|
243
|
+
outerClass: "col-6",
|
|
241
244
|
preserve: true
|
|
242
245
|
}, {
|
|
243
246
|
$formkit: "primeInputText",
|
|
@@ -245,6 +248,7 @@ function useInputEditorSchema() {
|
|
|
245
248
|
name: "suffixIcon",
|
|
246
249
|
label: "Suffix Icon",
|
|
247
250
|
key: "schema_suffix_icon",
|
|
251
|
+
outerClass: "col-6",
|
|
248
252
|
preserve: true
|
|
249
253
|
}, {
|
|
250
254
|
$formkit: "primeCheckbox",
|
|
@@ -253,6 +257,7 @@ function useInputEditorSchema() {
|
|
|
253
257
|
label: "Input Disabled",
|
|
254
258
|
key: "schema_disabled",
|
|
255
259
|
value: false,
|
|
260
|
+
outerClass: "col-3",
|
|
256
261
|
preserve: true
|
|
257
262
|
}, {
|
|
258
263
|
$formkit: "primeCheckbox",
|
|
@@ -261,39 +266,79 @@ function useInputEditorSchema() {
|
|
|
261
266
|
label: "Input Read Only",
|
|
262
267
|
key: "schema_readonly",
|
|
263
268
|
value: false,
|
|
269
|
+
outerClass: "col-3",
|
|
264
270
|
preserve: true
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
271
|
+
}, {
|
|
272
|
+
$formkit: "primeInputText",
|
|
273
|
+
if: "$get(selectButton).value === 'showStyle'",
|
|
274
|
+
name: "outerClass",
|
|
275
|
+
label: "Outer Class",
|
|
276
|
+
key: "schema_outerClass",
|
|
277
|
+
outerClass: "col-6",
|
|
278
|
+
preserve: true
|
|
279
|
+
}, {
|
|
280
|
+
$formkit: "primeSelect",
|
|
281
|
+
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",
|
|
290
|
+
preserve: true
|
|
291
|
+
}, {
|
|
292
|
+
$formkit: "primeInputText",
|
|
293
|
+
if: "$get(selectButton).value === 'showValidation'",
|
|
294
|
+
name: "validation",
|
|
295
|
+
label: "Field Validation",
|
|
296
|
+
key: "schema_validation",
|
|
297
|
+
outerClass: "col-6",
|
|
298
|
+
preserve: true
|
|
299
|
+
}, {
|
|
300
|
+
$formkit: "primeSelect",
|
|
301
|
+
if: "$get(selectButton).value === 'showValidation'",
|
|
302
|
+
name: "validation-visibility",
|
|
303
|
+
label: "Field Validation Visibility",
|
|
304
|
+
value: "blur",
|
|
305
|
+
optionLabel: "label",
|
|
306
|
+
optionValue: "value",
|
|
307
|
+
options: validationOptions,
|
|
308
|
+
key: "schema_validation-visibility",
|
|
309
|
+
outerClass: "col-6",
|
|
310
|
+
preserve: true
|
|
311
|
+
}, {
|
|
312
|
+
$formkit: "primeInputText",
|
|
313
|
+
if: "$get(selectButton).value === 'showValidation'",
|
|
314
|
+
name: "validation-label",
|
|
315
|
+
label: "Field Validation Label",
|
|
316
|
+
key: "schema_validation-label",
|
|
317
|
+
preserve: true
|
|
318
|
+
}, addList("options", [addInsertButton("Add Option"), addListGroup([{
|
|
272
319
|
$formkit: "primeInputText",
|
|
273
320
|
label: "Label",
|
|
274
|
-
name: "label"
|
|
321
|
+
name: "label",
|
|
322
|
+
outerClass: "col-4"
|
|
275
323
|
}, {
|
|
276
324
|
$formkit: "primeInputText",
|
|
277
325
|
label: "Value",
|
|
278
|
-
name: "value"
|
|
279
|
-
|
|
326
|
+
name: "value",
|
|
327
|
+
outerClass: "col-4"
|
|
328
|
+
}, addGroupButtons()])], true, "$get(selectButton).value === 'showOptions'", {
|
|
280
329
|
key: "schema_options",
|
|
281
330
|
preserve: true
|
|
282
|
-
}), addList("prime", [
|
|
283
|
-
onClick: "$addNode($node)",
|
|
284
|
-
label: "Add PrimeVue Attribute",
|
|
285
|
-
class: "p-button-sm",
|
|
286
|
-
style: "margin-bottom: 2rem;",
|
|
287
|
-
icon: "pi pi-plus"
|
|
288
|
-
}, "$node.value.length == 0")]), addListGroup([addFlexElement([{
|
|
331
|
+
}), addList("prime", [addInsertButton("Add PrimeVue Attribute"), addListGroup([{
|
|
289
332
|
$formkit: "primeInputText",
|
|
290
333
|
label: "PrimeVue Property",
|
|
291
|
-
name: "prime_key"
|
|
334
|
+
name: "prime_key",
|
|
335
|
+
outerClass: "col-3"
|
|
292
336
|
}, {
|
|
293
337
|
$formkit: "primeInputText",
|
|
294
338
|
label: "Value",
|
|
295
|
-
name: "prime_value"
|
|
296
|
-
|
|
339
|
+
name: "prime_value",
|
|
340
|
+
outerClass: "col-3"
|
|
341
|
+
}, addGroupButtons()])], true, "$get(selectButton).value === 'showPrime'", {
|
|
297
342
|
key: "schema_prime",
|
|
298
343
|
preserve: true
|
|
299
344
|
})];
|