@sfxcode/formkit-primevue 3.3.5 → 3.3.6
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/LICENSE +21 -0
- package/README.md +138 -13
- package/components.d.ts +1 -0
- package/dist/components/FormKitDataDebug.d.vue.ts +24 -0
- package/dist/components/FormKitDataDebug.vue +9 -5
- package/dist/components/FormKitDataDebug.vue.d.ts +24 -0
- package/dist/components/FormKitDataEdit.d.vue.ts +180 -0
- package/dist/components/FormKitDataEdit.vue +46 -53
- package/dist/components/FormKitDataEdit.vue.d.ts +180 -0
- package/dist/components/FormKitDataView.d.vue.ts +73 -0
- package/dist/components/FormKitDataView.vue +27 -20
- package/dist/components/FormKitDataView.vue.d.ts +73 -0
- package/dist/components/FormKitIcon.d.vue.ts +39 -0
- package/dist/components/FormKitIcon.vue +13 -6
- package/dist/components/FormKitIcon.vue.d.ts +39 -0
- package/dist/components/FormKitPrefix.d.vue.ts +7 -0
- package/dist/components/FormKitPrefix.vue +3 -3
- package/dist/components/FormKitPrefix.vue.d.ts +7 -0
- package/dist/components/FormKitSuffix.d.vue.ts +7 -0
- package/dist/components/FormKitSuffix.vue +3 -3
- package/dist/components/FormKitSuffix.vue.d.ts +7 -0
- package/dist/components/PrimeAutoComplete.d.vue.ts +31 -0
- package/dist/components/PrimeAutoComplete.vue +86 -41
- package/dist/components/PrimeAutoComplete.vue.d.ts +31 -0
- package/dist/components/PrimeCascadeSelect.d.vue.ts +28 -0
- package/dist/components/PrimeCascadeSelect.vue +26 -7
- package/dist/components/PrimeCascadeSelect.vue.d.ts +28 -0
- package/dist/components/PrimeCheckbox.d.vue.ts +27 -0
- package/dist/components/PrimeCheckbox.vue +29 -9
- package/dist/components/PrimeCheckbox.vue.d.ts +27 -0
- package/dist/components/PrimeColorPicker.d.vue.ts +24 -0
- package/dist/components/PrimeColorPicker.vue +22 -7
- package/dist/components/PrimeColorPicker.vue.d.ts +24 -0
- package/dist/components/PrimeDatePicker.d.vue.ts +63 -0
- package/dist/components/PrimeDatePicker.vue +73 -17
- package/dist/components/PrimeDatePicker.vue.d.ts +63 -0
- package/dist/components/PrimeInputMask.d.vue.ts +28 -0
- package/dist/components/PrimeInputMask.vue +29 -10
- package/dist/components/PrimeInputMask.vue.d.ts +28 -0
- package/dist/components/PrimeInputNumber.d.vue.ts +36 -0
- package/dist/components/PrimeInputNumber.vue +56 -21
- package/dist/components/PrimeInputNumber.vue.d.ts +36 -0
- package/dist/components/PrimeInputOtp.d.vue.ts +26 -0
- package/dist/components/PrimeInputOtp.vue +24 -7
- package/dist/components/PrimeInputOtp.vue.d.ts +26 -0
- package/dist/components/PrimeInputText.d.vue.ts +24 -0
- package/dist/components/PrimeInputText.vue +25 -10
- package/dist/components/PrimeInputText.vue.d.ts +24 -0
- package/dist/components/PrimeKnob.d.vue.ts +31 -0
- package/dist/components/PrimeKnob.vue +37 -12
- package/dist/components/PrimeKnob.vue.d.ts +31 -0
- package/dist/components/PrimeListbox.d.vue.ts +42 -0
- package/dist/components/PrimeListbox.vue +39 -7
- package/dist/components/PrimeListbox.vue.d.ts +42 -0
- package/dist/components/PrimeMultiSelect.d.vue.ts +53 -0
- package/dist/components/PrimeMultiSelect.vue +52 -7
- package/dist/components/PrimeMultiSelect.vue.d.ts +53 -0
- package/dist/components/PrimeOutputBoolean.d.vue.ts +16 -0
- package/dist/components/PrimeOutputBoolean.vue +27 -28
- package/dist/components/PrimeOutputBoolean.vue.d.ts +16 -0
- package/dist/components/PrimeOutputDate.d.vue.ts +16 -0
- package/dist/components/PrimeOutputDate.vue +33 -33
- package/dist/components/PrimeOutputDate.vue.d.ts +16 -0
- package/dist/components/PrimeOutputDuration.d.vue.ts +16 -0
- package/dist/components/PrimeOutputDuration.vue +19 -23
- package/dist/components/PrimeOutputDuration.vue.d.ts +16 -0
- package/dist/components/PrimeOutputLink.d.vue.ts +16 -0
- package/dist/components/PrimeOutputLink.vue +27 -29
- package/dist/components/PrimeOutputLink.vue.d.ts +16 -0
- package/dist/components/PrimeOutputList.d.vue.ts +19 -0
- package/dist/components/PrimeOutputList.vue +40 -71
- package/dist/components/PrimeOutputList.vue.d.ts +19 -0
- package/dist/components/PrimeOutputNumber.d.vue.ts +16 -0
- package/dist/components/PrimeOutputNumber.vue +39 -36
- package/dist/components/PrimeOutputNumber.vue.d.ts +16 -0
- package/dist/components/PrimeOutputReference.d.vue.ts +16 -0
- package/dist/components/PrimeOutputReference.vue +30 -32
- package/dist/components/PrimeOutputReference.vue.d.ts +16 -0
- package/dist/components/PrimeOutputText.d.vue.ts +22 -0
- package/dist/components/PrimeOutputText.vue +53 -53
- package/dist/components/PrimeOutputText.vue.d.ts +22 -0
- package/dist/components/PrimePassword.d.vue.ts +33 -0
- package/dist/components/PrimePassword.vue +32 -11
- package/dist/components/PrimePassword.vue.d.ts +33 -0
- package/dist/components/PrimeRadioButton.d.vue.ts +28 -0
- package/dist/components/PrimeRadioButton.vue +29 -19
- package/dist/components/PrimeRadioButton.vue.d.ts +28 -0
- package/dist/components/PrimeRating.d.vue.ts +24 -0
- package/dist/components/PrimeRating.vue +22 -7
- package/dist/components/PrimeRating.vue.d.ts +24 -0
- package/dist/components/PrimeSelect.d.vue.ts +50 -0
- package/dist/components/PrimeSelect.vue +49 -7
- package/dist/components/PrimeSelect.vue.d.ts +50 -0
- package/dist/components/PrimeSelectButton.d.vue.ts +28 -0
- package/dist/components/PrimeSelectButton.vue +27 -7
- package/dist/components/PrimeSelectButton.vue.d.ts +28 -0
- package/dist/components/PrimeSlider.d.vue.ts +26 -0
- package/dist/components/PrimeSlider.vue +28 -10
- package/dist/components/PrimeSlider.vue.d.ts +26 -0
- package/dist/components/PrimeTextarea.d.vue.ts +25 -0
- package/dist/components/PrimeTextarea.vue +23 -7
- package/dist/components/PrimeTextarea.vue.d.ts +25 -0
- package/dist/components/PrimeToggleButton.d.vue.ts +26 -0
- package/dist/components/PrimeToggleButton.vue +25 -7
- package/dist/components/PrimeToggleButton.vue.d.ts +26 -0
- package/dist/components/PrimeToggleSwitch.d.vue.ts +23 -0
- package/dist/components/PrimeToggleSwitch.vue +23 -8
- package/dist/components/PrimeToggleSwitch.vue.d.ts +23 -0
- package/dist/components/PrimeTreeSelect.d.vue.ts +32 -0
- package/dist/components/PrimeTreeSelect.vue +30 -7
- package/dist/components/PrimeTreeSelect.vue.d.ts +32 -0
- package/dist/components/index.d.ts +23 -23
- package/dist/composables/index.d.ts +8 -8
- package/dist/composables/index.js +8 -8
- package/dist/composables/index.mjs +8 -8
- package/dist/composables/useFormKitInput.js +1 -5
- package/dist/composables/useFormKitInput.mjs +1 -13
- package/dist/composables/useFormKitRepeater.js +1 -1
- package/dist/composables/useFormKitRepeater.mjs +17 -45
- package/dist/composables/useFormKitSchema.mjs +2 -10
- package/dist/composables/useInputEditor.js +4 -4
- package/dist/composables/useInputEditor.mjs +24 -52
- package/dist/composables/useInputEditorSchema.js +3 -3
- package/dist/composables/useInputEditorSchema.mjs +17 -25
- package/dist/composables/useOutputDuration.mjs +6 -3
- package/dist/definitions/index.js +2 -2
- package/dist/definitions/index.mjs +2 -2
- package/dist/definitions/input.d.ts +1 -1
- package/dist/definitions/input.mjs +15 -301
- package/dist/definitions/output.d.ts +1 -1
- package/dist/definitions/output.js +1 -1
- package/dist/definitions/output.mjs +14 -95
- package/dist/index.d.ts +48 -48
- package/dist/index.js +12 -12
- package/dist/index.mjs +3 -9
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.mjs +27 -31
- package/dist/sass/formkit-primevue.scss +101 -99
- package/package.json +80 -45
- package/dist/vue.d.ts +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
import type { FormKitBaseSlots, FormKitInputs } from
|
|
2
|
-
import type { AutoCompleteSlots, CascadeSelectSlots, CheckboxSlots, ColorPickerSlots, DatePickerSlots, InputMaskSlots, InputNumberSlots, InputOtpSlots, InputTextSlots, KnobSlots, ListboxSlots, MultiSelectSlots, PasswordSlots, RadioButtonSlots, RatingSlots, SelectButtonSlots, SelectSlots, SliderSlots, TextareaSlots, ToggleButtonSlots, ToggleSwitchSlots, TreeSelectSlots } from
|
|
3
|
-
import type { CascadeSelectProps } from
|
|
4
|
-
import type { ListboxProps } from
|
|
5
|
-
import type { MultiSelectProps } from
|
|
6
|
-
import type { SelectProps } from
|
|
7
|
-
import type { SelectButtonProps } from
|
|
8
|
-
import type { TreeSelectProps } from
|
|
9
|
-
import { FormKitDataEdit, FormKitDataView } from
|
|
10
|
-
import { useFormKitRepeater, useFormKitSchema, useInputEditor, useInputEditorSchema, usePrimeInputs } from
|
|
11
|
-
import { primeInputs, primeOutputs } from
|
|
1
|
+
import type { FormKitBaseSlots, FormKitInputs } from '@formkit/inputs';
|
|
2
|
+
import type { AutoCompleteSlots, CascadeSelectSlots, CheckboxSlots, ColorPickerSlots, DatePickerSlots, InputMaskSlots, InputNumberSlots, InputOtpSlots, InputTextSlots, KnobSlots, ListboxSlots, MultiSelectSlots, PasswordSlots, RadioButtonSlots, RatingSlots, SelectButtonSlots, SelectSlots, SliderSlots, TextareaSlots, ToggleButtonSlots, ToggleSwitchSlots, TreeSelectSlots } from 'primevue';
|
|
3
|
+
import type { CascadeSelectProps } from 'primevue/cascadeselect';
|
|
4
|
+
import type { ListboxProps } from 'primevue/listbox';
|
|
5
|
+
import type { MultiSelectProps } from 'primevue/multiselect';
|
|
6
|
+
import type { SelectProps } from 'primevue/select';
|
|
7
|
+
import type { SelectButtonProps } from 'primevue/selectbutton';
|
|
8
|
+
import type { TreeSelectProps } from 'primevue/treeselect';
|
|
9
|
+
import { FormKitDataEdit, FormKitDataView } from './components';
|
|
10
|
+
import { useFormKitRepeater, useFormKitSchema, useInputEditor, useInputEditorSchema, usePrimeInputs } from './composables';
|
|
11
|
+
import { primeInputs, primeOutputs } from './definitions';
|
|
12
12
|
export { FormKitDataEdit, FormKitDataView, primeInputs, primeOutputs, useFormKitRepeater, useFormKitSchema, useInputEditor, useInputEditorSchema, usePrimeInputs, };
|
|
13
13
|
/**
|
|
14
14
|
* Keeps all slots from 1st argument, add any slots from 2nd type which do not collide with the 1st's names.
|
|
15
15
|
*/
|
|
16
16
|
type MergeSlots<A, B> = A & Omit<B, keyof A>;
|
|
17
|
-
declare module
|
|
17
|
+
declare module '@formkit/inputs' {
|
|
18
18
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
|
19
19
|
primeAutoComplete: {
|
|
20
|
-
type:
|
|
20
|
+
type: 'primeAutoComplete';
|
|
21
21
|
};
|
|
22
22
|
primeInputText: {
|
|
23
|
-
type:
|
|
23
|
+
type: 'primeInputText';
|
|
24
24
|
};
|
|
25
25
|
primeInputNumber: {
|
|
26
|
-
type:
|
|
26
|
+
type: 'primeInputNumber';
|
|
27
27
|
};
|
|
28
28
|
primeInputMask: {
|
|
29
|
-
type:
|
|
29
|
+
type: 'primeInputMask';
|
|
30
30
|
};
|
|
31
31
|
primePassword: {
|
|
32
|
-
type:
|
|
32
|
+
type: 'primePassword';
|
|
33
33
|
};
|
|
34
34
|
primeCheckbox: {
|
|
35
|
-
type:
|
|
35
|
+
type: 'primeCheckbox';
|
|
36
36
|
};
|
|
37
37
|
primeToggleSwitch: {
|
|
38
|
-
type:
|
|
38
|
+
type: 'primeToggleSwitch';
|
|
39
39
|
};
|
|
40
40
|
primeTextarea: {
|
|
41
|
-
type:
|
|
41
|
+
type: 'primeTextarea';
|
|
42
42
|
};
|
|
43
43
|
primeSelect: {
|
|
44
|
-
type:
|
|
45
|
-
options?: SelectProps[
|
|
44
|
+
type: 'primeSelect';
|
|
45
|
+
options?: SelectProps['options'];
|
|
46
46
|
};
|
|
47
47
|
primeMultiSelect: {
|
|
48
|
-
type:
|
|
49
|
-
options?: MultiSelectProps[
|
|
48
|
+
type: 'primeMultiSelect';
|
|
49
|
+
options?: MultiSelectProps['options'];
|
|
50
50
|
};
|
|
51
51
|
primeDatePicker: {
|
|
52
|
-
type:
|
|
52
|
+
type: 'primeDatePicker';
|
|
53
53
|
};
|
|
54
54
|
primeSlider: {
|
|
55
|
-
type:
|
|
55
|
+
type: 'primeSlider';
|
|
56
56
|
};
|
|
57
57
|
primeKnob: {
|
|
58
|
-
type:
|
|
58
|
+
type: 'primeKnob';
|
|
59
59
|
};
|
|
60
60
|
primeRating: {
|
|
61
|
-
type:
|
|
61
|
+
type: 'primeRating';
|
|
62
62
|
};
|
|
63
63
|
primeRadioButton: {
|
|
64
|
-
type:
|
|
64
|
+
type: 'primeRadioButton';
|
|
65
65
|
};
|
|
66
66
|
primeColorPicker: {
|
|
67
|
-
type:
|
|
67
|
+
type: 'primeColorPicker';
|
|
68
68
|
};
|
|
69
69
|
primeToggleButton: {
|
|
70
|
-
type:
|
|
70
|
+
type: 'primeToggleButton';
|
|
71
71
|
};
|
|
72
72
|
primeListbox: {
|
|
73
|
-
type:
|
|
74
|
-
options?: ListboxProps[
|
|
73
|
+
type: 'primeListbox';
|
|
74
|
+
options?: ListboxProps['options'];
|
|
75
75
|
};
|
|
76
76
|
primeSelectButton: {
|
|
77
|
-
type:
|
|
78
|
-
options?: SelectButtonProps[
|
|
77
|
+
type: 'primeSelectButton';
|
|
78
|
+
options?: SelectButtonProps['options'];
|
|
79
79
|
};
|
|
80
80
|
primeCascadeSelect: {
|
|
81
|
-
type:
|
|
82
|
-
options?: CascadeSelectProps[
|
|
81
|
+
type: 'primeCascadeSelect';
|
|
82
|
+
options?: CascadeSelectProps['options'];
|
|
83
83
|
};
|
|
84
84
|
primeTreeSelect: {
|
|
85
|
-
type:
|
|
86
|
-
options?: TreeSelectProps[
|
|
85
|
+
type: 'primeTreeSelect';
|
|
86
|
+
options?: TreeSelectProps['options'];
|
|
87
87
|
};
|
|
88
88
|
primeInputOtp: {
|
|
89
|
-
type:
|
|
89
|
+
type: 'primeInputOtp';
|
|
90
90
|
};
|
|
91
91
|
primeOutputText: {
|
|
92
|
-
type:
|
|
92
|
+
type: 'primeOutputText';
|
|
93
93
|
};
|
|
94
94
|
primeOutputLink: {
|
|
95
|
-
type:
|
|
95
|
+
type: 'primeOutputLink';
|
|
96
96
|
};
|
|
97
97
|
primeOutputReference: {
|
|
98
|
-
type:
|
|
98
|
+
type: 'primeOutputReference';
|
|
99
99
|
};
|
|
100
100
|
primeOutputNumber: {
|
|
101
|
-
type:
|
|
101
|
+
type: 'primeOutputNumber';
|
|
102
102
|
};
|
|
103
103
|
primeOutputDate: {
|
|
104
|
-
type:
|
|
104
|
+
type: 'primeOutputDate';
|
|
105
105
|
};
|
|
106
106
|
primeOutputBoolean: {
|
|
107
|
-
type:
|
|
107
|
+
type: 'primeOutputBoolean';
|
|
108
108
|
};
|
|
109
109
|
primeOutputDuration: {
|
|
110
|
-
type:
|
|
110
|
+
type: 'primeOutputDuration';
|
|
111
111
|
};
|
|
112
112
|
primeOutputList: {
|
|
113
|
-
type:
|
|
113
|
+
type: 'primeOutputList';
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
interface FormKitInputSlots<Props extends FormKitInputs<Props>> {
|
package/dist/index.js
CHANGED
|
@@ -6,57 +6,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "FormKitDataEdit", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _components.FormKitDataEdit;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "FormKitDataView", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _components.FormKitDataView;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "primeInputs", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _definitions.primeInputs;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "primeOutputs", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _definitions.primeOutputs;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "useFormKitRepeater", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function () {
|
|
33
|
-
return
|
|
33
|
+
return _composables.useFormKitRepeater;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "useFormKitSchema", {
|
|
37
37
|
enumerable: true,
|
|
38
38
|
get: function () {
|
|
39
|
-
return
|
|
39
|
+
return _composables.useFormKitSchema;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "useInputEditor", {
|
|
43
43
|
enumerable: true,
|
|
44
44
|
get: function () {
|
|
45
|
-
return
|
|
45
|
+
return _composables.useInputEditor;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "useInputEditorSchema", {
|
|
49
49
|
enumerable: true,
|
|
50
50
|
get: function () {
|
|
51
|
-
return
|
|
51
|
+
return _composables.useInputEditorSchema;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "usePrimeInputs", {
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function () {
|
|
57
|
-
return
|
|
57
|
+
return _composables.usePrimeInputs;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
60
|
+
var _components = require("./components");
|
|
61
|
+
var _composables = require("./composables");
|
|
62
|
+
var _definitions = require("./definitions");
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { FormKitDataEdit, FormKitDataView } from "./components/index.
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
useFormKitSchema,
|
|
5
|
-
useInputEditor,
|
|
6
|
-
useInputEditorSchema,
|
|
7
|
-
usePrimeInputs
|
|
8
|
-
} from "./composables/index.ts";
|
|
9
|
-
import { primeInputs, primeOutputs } from "./definitions/index.ts";
|
|
1
|
+
import { FormKitDataEdit, FormKitDataView } from "./components/index.mjs";
|
|
2
|
+
import { useFormKitRepeater, useFormKitSchema, useInputEditor, useInputEditorSchema, usePrimeInputs } from "./composables/index.mjs";
|
|
3
|
+
import { primeInputs, primeOutputs } from "./definitions/index.mjs";
|
|
10
4
|
export {
|
|
11
5
|
FormKitDataEdit,
|
|
12
6
|
FormKitDataView,
|
package/dist/plugins/index.d.ts
CHANGED
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
export function addPrimeAsteriskPlugin(node) {
|
|
2
|
-
if (!node.props.type.startsWith("prime") || node.props.type.startsWith("primeOutput"))
|
|
2
|
+
if (!node.props.type.startsWith("prime") || node.props.type.startsWith("primeOutput"))
|
|
3
|
+
return;
|
|
3
4
|
node.on("created", () => {
|
|
4
5
|
if (node.props.definition?.schema) {
|
|
5
6
|
const schemaFn = node.props.definition?.schema;
|
|
6
7
|
node.props.definition.schema = (sectionsSchema = {}) => {
|
|
7
8
|
sectionsSchema.label = {
|
|
8
|
-
children: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
children: ["*"]
|
|
17
|
-
}
|
|
18
|
-
]
|
|
9
|
+
children: ["$label", {
|
|
10
|
+
$el: "span",
|
|
11
|
+
if: "$state.required",
|
|
12
|
+
attrs: {
|
|
13
|
+
class: "p-formkit-asterisk"
|
|
14
|
+
},
|
|
15
|
+
children: ["*"]
|
|
16
|
+
}]
|
|
19
17
|
};
|
|
20
18
|
return schemaFn(sectionsSchema);
|
|
21
19
|
};
|
|
@@ -23,31 +21,29 @@ export function addPrimeAsteriskPlugin(node) {
|
|
|
23
21
|
});
|
|
24
22
|
}
|
|
25
23
|
export function addLabelPlugin(node) {
|
|
26
|
-
if (!node.props.type.startsWith("prime"))
|
|
24
|
+
if (!node.props.type.startsWith("prime"))
|
|
25
|
+
return;
|
|
27
26
|
node.on("created", () => {
|
|
28
27
|
if (node.props.definition?.schema) {
|
|
29
28
|
const schemaFn = node.props.definition?.schema;
|
|
30
29
|
node.props.definition.schema = (sectionsSchema = {}) => {
|
|
31
30
|
sectionsSchema.label = {
|
|
32
|
-
children: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
children: [{
|
|
32
|
+
$el: "span",
|
|
33
|
+
attrs: {
|
|
34
|
+
title: "$help",
|
|
35
|
+
class: "p-formkit-label"
|
|
36
|
+
},
|
|
37
|
+
children: ["$label"]
|
|
38
|
+
}, {
|
|
39
|
+
$el: "span",
|
|
40
|
+
if: "$state.required",
|
|
41
|
+
attrs: {
|
|
42
|
+
class: "p-formkit-required",
|
|
43
|
+
title: "$help"
|
|
40
44
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if: "$state.required",
|
|
44
|
-
attrs: {
|
|
45
|
-
class: "p-formkit-required",
|
|
46
|
-
title: "$help"
|
|
47
|
-
},
|
|
48
|
-
children: ["*"]
|
|
49
|
-
}
|
|
50
|
-
]
|
|
45
|
+
children: ["*"]
|
|
46
|
+
}]
|
|
51
47
|
};
|
|
52
48
|
sectionsSchema.help = {
|
|
53
49
|
children: []
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use 'sass:map';
|
|
3
3
|
|
|
4
4
|
$gutter-width: 0.5rem;
|
|
5
5
|
|
|
6
6
|
// Breakpoints e.g. https://tailwindcss.com/docs/responsive-design
|
|
7
7
|
$grid-breakpoints: (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
sm: 640px,
|
|
9
|
+
md: 768px,
|
|
10
|
+
lg: 1024px,
|
|
11
|
+
xl: 1280px,
|
|
12
|
+
xxl: 1536px
|
|
13
13
|
) !default;
|
|
14
14
|
|
|
15
15
|
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
|
@@ -69,12 +69,7 @@ $grid-breakpoints: (
|
|
|
69
69
|
width: 100%;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.p-inputtext,
|
|
73
|
-
.p-textarea,
|
|
74
|
-
.p-password,
|
|
75
|
-
.p-multiselect,
|
|
76
|
-
.p-select,
|
|
77
|
-
.p-editor {
|
|
72
|
+
.p-inputtext, .p-textarea, .p-password, .p-multiselect, .p-select, .p-editor {
|
|
78
73
|
box-sizing: border-box;
|
|
79
74
|
width: 100%;
|
|
80
75
|
|
|
@@ -82,6 +77,7 @@ $grid-breakpoints: (
|
|
|
82
77
|
width: 2rem;
|
|
83
78
|
}
|
|
84
79
|
}
|
|
80
|
+
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
83
|
|
|
@@ -90,6 +86,7 @@ $grid-breakpoints: (
|
|
|
90
86
|
font-size: 0.8rem;
|
|
91
87
|
color: var(--text-color-secondary);
|
|
92
88
|
}
|
|
89
|
+
|
|
93
90
|
}
|
|
94
91
|
|
|
95
92
|
// Label for single form element
|
|
@@ -106,8 +103,7 @@ $grid-breakpoints: (
|
|
|
106
103
|
> * {
|
|
107
104
|
margin-right: 0.5rem;
|
|
108
105
|
|
|
109
|
-
&:last-child,
|
|
110
|
-
&:only-child {
|
|
106
|
+
&:last-child, &:only-child {
|
|
111
107
|
margin-right: 0;
|
|
112
108
|
}
|
|
113
109
|
}
|
|
@@ -119,7 +115,7 @@ $grid-breakpoints: (
|
|
|
119
115
|
flex-wrap: wrap;
|
|
120
116
|
gap: 0.5rem;
|
|
121
117
|
|
|
122
|
-
.p-formkit-option
|
|
118
|
+
.p-formkit-option {
|
|
123
119
|
display: flex;
|
|
124
120
|
align-items: center;
|
|
125
121
|
label {
|
|
@@ -159,9 +155,10 @@ $grid-breakpoints: (
|
|
|
159
155
|
button {
|
|
160
156
|
margin-right: 0.5rem;
|
|
161
157
|
}
|
|
158
|
+
|
|
162
159
|
}
|
|
163
160
|
|
|
164
|
-
.p-action-buttons
|
|
161
|
+
.p-action-buttons {
|
|
165
162
|
margin-top: 0.25rem;
|
|
166
163
|
.p-button {
|
|
167
164
|
margin-right: 0.5rem;
|
|
@@ -184,117 +181,117 @@ $grid-breakpoints: (
|
|
|
184
181
|
|
|
185
182
|
// data view only
|
|
186
183
|
.p-formkit-data-view {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
.formkit-outer {
|
|
185
|
+
padding-bottom: 0.5rem;
|
|
186
|
+
}
|
|
190
187
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
&.form-horizontal {
|
|
189
|
+
padding-bottom: 0.8rem;
|
|
190
|
+
}
|
|
194
191
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
192
|
+
.formkit-help {
|
|
193
|
+
padding-top: 0.25rem;
|
|
194
|
+
margin: 0;
|
|
195
|
+
}
|
|
199
196
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
197
|
+
ul, ol {
|
|
198
|
+
padding-inline-start: 1rem;
|
|
199
|
+
margin-block-start: 0;
|
|
200
|
+
margin-block-end: 0;
|
|
201
|
+
}
|
|
206
202
|
}
|
|
207
203
|
|
|
208
204
|
// data edit only
|
|
209
205
|
.p-formkit-data-edit {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
206
|
+
.formkit-label {
|
|
207
|
+
//font-weight: normal;
|
|
208
|
+
}
|
|
213
209
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
210
|
+
// specific checkbox stylings
|
|
211
|
+
.formkit-outer[data-type="primeCheckbox"] {
|
|
212
|
+
//padding-left: 0;
|
|
217
213
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
.formkit-wrapper {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-wrap: wrap;
|
|
221
217
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
218
|
+
.formkit-inner {
|
|
219
|
+
width: auto !important;
|
|
220
|
+
}
|
|
225
221
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
label {
|
|
223
|
+
width: auto;
|
|
224
|
+
order: 2;
|
|
225
|
+
padding: 0.125rem 0;
|
|
230
226
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
227
|
+
&:after {
|
|
228
|
+
content: "";
|
|
229
|
+
}
|
|
234
230
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
231
|
+
// styling of output when label is used in schema
|
|
232
|
+
+ .formkit-inner {
|
|
233
|
+
margin-left: 0 !important;
|
|
234
|
+
order: 1;
|
|
235
|
+
flex-basis: 2rem;
|
|
236
|
+
flex-grow: 0;
|
|
237
|
+
flex-shrink: 0;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
// styling of suffix when suffix is used in addition to label
|
|
240
|
+
&:has( label) {
|
|
241
|
+
flex-grow: 1;
|
|
242
|
+
flex-basis: 100%;
|
|
243
|
+
}
|
|
247
244
|
}
|
|
248
245
|
}
|
|
249
|
-
}
|
|
250
246
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
247
|
+
// styling when both prefix and suffix are used in schema
|
|
248
|
+
label:first-child:nth-last-child(3), label:first-child:nth-last-child(3) ~ label {
|
|
249
|
+
width: auto;
|
|
250
|
+
}
|
|
256
251
|
|
|
257
|
-
|
|
258
|
-
|
|
252
|
+
label:first-child:nth-last-child(3) {
|
|
253
|
+
order: 1;
|
|
259
254
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
255
|
+
+ div.p-checkbox {
|
|
256
|
+
order: 2;
|
|
257
|
+
width: auto;
|
|
258
|
+
}
|
|
263
259
|
}
|
|
264
|
-
}
|
|
265
260
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
261
|
+
label:first-child:nth-last-child(3) ~ label {
|
|
262
|
+
order: 3
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// end styling when both prefix and suffix are used in schema
|
|
269
266
|
|
|
270
|
-
// end styling when both prefix and suffix are used in schema
|
|
271
267
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
268
|
+
// styling of output when only suffix is used in schema
|
|
269
|
+
.formkit-inner:first-child {
|
|
270
|
+
margin-left: 0 !important;
|
|
275
271
|
|
|
276
|
-
|
|
277
|
-
|
|
272
|
+
.p-formkit {
|
|
273
|
+
display: flex;
|
|
274
|
+
}
|
|
278
275
|
}
|
|
279
|
-
}
|
|
280
276
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
277
|
+
.p-checkbox:not(:only-child) {
|
|
278
|
+
width: 2rem;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
}
|
|
284
281
|
}
|
|
285
|
-
}
|
|
286
282
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
283
|
+
.formkit-help {
|
|
284
|
+
width: auto !important;
|
|
285
|
+
//padding-left: 2rem;
|
|
286
|
+
}
|
|
290
287
|
}
|
|
291
|
-
}
|
|
292
288
|
}
|
|
293
289
|
|
|
290
|
+
|
|
291
|
+
|
|
294
292
|
// Debug
|
|
295
293
|
.p-formkit-data-debug {
|
|
296
|
-
pre,
|
|
297
|
-
span {
|
|
294
|
+
pre, span {
|
|
298
295
|
font-size: 0.75rem;
|
|
299
296
|
line-height: 1rem;
|
|
300
297
|
}
|
|
@@ -325,7 +322,9 @@ $grid-breakpoints: (
|
|
|
325
322
|
|
|
326
323
|
@include media-breakpoint-up(md) {
|
|
327
324
|
.formkit-form {
|
|
325
|
+
|
|
328
326
|
&.form-horizontal {
|
|
327
|
+
|
|
329
328
|
.formkit-wrapper {
|
|
330
329
|
display: flex;
|
|
331
330
|
|
|
@@ -347,6 +346,7 @@ $grid-breakpoints: (
|
|
|
347
346
|
}
|
|
348
347
|
}
|
|
349
348
|
}
|
|
349
|
+
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
.p-formkit-data-view & {
|
|
@@ -358,7 +358,9 @@ $grid-breakpoints: (
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
.p-formkit-data-edit & {
|
|
361
|
+
|
|
361
362
|
&.form-horizontal {
|
|
363
|
+
|
|
362
364
|
.formkit-outer {
|
|
363
365
|
width: 100%;
|
|
364
366
|
|
|
@@ -378,7 +380,7 @@ $grid-breakpoints: (
|
|
|
378
380
|
margin-left: auto;
|
|
379
381
|
|
|
380
382
|
.p-formkit {
|
|
381
|
-
display: flex
|
|
383
|
+
display: flex
|
|
382
384
|
}
|
|
383
385
|
|
|
384
386
|
label {
|
|
@@ -388,8 +390,7 @@ $grid-breakpoints: (
|
|
|
388
390
|
}
|
|
389
391
|
}
|
|
390
392
|
|
|
391
|
-
.formkit-help,
|
|
392
|
-
.formkit-messages {
|
|
393
|
+
.formkit-help, .formkit-messages {
|
|
393
394
|
width: calc((8 / 12) * 100%);
|
|
394
395
|
margin-left: auto;
|
|
395
396
|
}
|
|
@@ -397,3 +398,4 @@ $grid-breakpoints: (
|
|
|
397
398
|
}
|
|
398
399
|
}
|
|
399
400
|
}
|
|
401
|
+
|