@sfxcode/formkit-openvue 0.0.0-stage → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +169 -2
  3. package/components.d.ts +1 -0
  4. package/dist/components/FormAutoComplete.vue +100 -0
  5. package/dist/components/FormCascadeSelect.vue +41 -0
  6. package/dist/components/FormCheckbox.vue +49 -0
  7. package/dist/components/FormColorPicker.vue +31 -0
  8. package/dist/components/FormDatePicker.vue +93 -0
  9. package/dist/components/FormInputMask.vue +67 -0
  10. package/dist/components/FormInputNumber.vue +72 -0
  11. package/dist/components/FormInputOtp.vue +40 -0
  12. package/dist/components/FormInputText.vue +63 -0
  13. package/dist/components/FormKitDataDebug.vue +25 -0
  14. package/dist/components/FormKitDataEdit.vue +123 -0
  15. package/dist/components/FormKitDataView.vue +56 -0
  16. package/dist/components/FormKitIcon.vue +23 -0
  17. package/dist/components/FormKitPrefix.vue +9 -0
  18. package/dist/components/FormKitSuffix.vue +9 -0
  19. package/dist/components/FormKnob.vue +48 -0
  20. package/dist/components/FormListbox.vue +482 -0
  21. package/dist/components/FormMultiSelect.vue +68 -0
  22. package/dist/components/FormOutputBoolean.vue +30 -0
  23. package/dist/components/FormOutputDate.vue +40 -0
  24. package/dist/components/FormOutputDuration.vue +24 -0
  25. package/dist/components/FormOutputLink.vue +39 -0
  26. package/dist/components/FormOutputList.vue +105 -0
  27. package/dist/components/FormOutputNumber.vue +47 -0
  28. package/dist/components/FormOutputReference.vue +52 -0
  29. package/dist/components/FormOutputText.vue +52 -0
  30. package/dist/components/FormPassword.vue +47 -0
  31. package/dist/components/FormRadioButton.vue +39 -0
  32. package/dist/components/FormRating.vue +38 -0
  33. package/dist/components/FormSelect.vue +69 -0
  34. package/dist/components/FormSelectButton.vue +42 -0
  35. package/dist/components/FormSlider.vue +40 -0
  36. package/dist/components/FormTextarea.vue +35 -0
  37. package/dist/components/FormToggleButton.vue +40 -0
  38. package/dist/components/FormToggleSwitch.vue +40 -0
  39. package/dist/components/FormTreeSelect.vue +46 -0
  40. package/dist/components/index.d.ts +24 -0
  41. package/dist/components/index.js +167 -0
  42. package/dist/components/index.mjs +48 -0
  43. package/dist/composables/index.d.ts +9 -0
  44. package/dist/composables/index.js +61 -0
  45. package/dist/composables/index.mjs +18 -0
  46. package/dist/composables/useFormInputs.d.ts +3 -0
  47. package/dist/composables/useFormInputs.js +62 -0
  48. package/dist/composables/useFormInputs.mjs +53 -0
  49. package/dist/composables/useFormKitInput.d.ts +11 -0
  50. package/dist/composables/useFormKitInput.js +58 -0
  51. package/dist/composables/useFormKitInput.mjs +45 -0
  52. package/dist/composables/useFormKitRepeater.d.ts +18 -0
  53. package/dist/composables/useFormKitRepeater.js +74 -0
  54. package/dist/composables/useFormKitRepeater.mjs +54 -0
  55. package/dist/composables/useFormKitSchema.d.ts +36 -0
  56. package/dist/composables/useFormKitSchema.js +83 -0
  57. package/dist/composables/useFormKitSchema.mjs +58 -0
  58. package/dist/composables/useFormKitSection.d.ts +7 -0
  59. package/dist/composables/useFormKitSection.js +31 -0
  60. package/dist/composables/useFormKitSection.mjs +19 -0
  61. package/dist/composables/useInputEditor.d.ts +8 -0
  62. package/dist/composables/useInputEditor.js +148 -0
  63. package/dist/composables/useInputEditor.mjs +143 -0
  64. package/dist/composables/useInputEditorSchema.d.ts +163 -0
  65. package/dist/composables/useInputEditorSchema.js +313 -0
  66. package/dist/composables/useInputEditorSchema.mjs +315 -0
  67. package/dist/composables/useOutputDuration.d.ts +4 -0
  68. package/dist/composables/useOutputDuration.js +40 -0
  69. package/dist/composables/useOutputDuration.mjs +35 -0
  70. package/dist/definitions/index.d.ts +35 -0
  71. package/dist/definitions/index.js +44 -0
  72. package/dist/definitions/index.mjs +70 -0
  73. package/dist/definitions/input.d.ts +23 -0
  74. package/dist/definitions/input.js +118 -0
  75. package/dist/definitions/input.mjs +111 -0
  76. package/dist/definitions/output.d.ts +9 -0
  77. package/dist/definitions/output.js +46 -0
  78. package/dist/definitions/output.mjs +136 -0
  79. package/dist/definitions/repeater.d.ts +2 -0
  80. package/dist/definitions/repeater.js +179 -0
  81. package/dist/definitions/repeater.mjs +168 -0
  82. package/dist/index.d.ts +148 -0
  83. package/dist/index.js +62 -0
  84. package/dist/index.mjs +14 -0
  85. package/dist/plugins/index.d.ts +3 -0
  86. package/dist/plugins/index.js +60 -0
  87. package/dist/plugins/index.mjs +55 -0
  88. package/dist/sass/formkit-openvue.scss +460 -0
  89. package/dist/style.css +1 -0
  90. package/package.json +148 -4
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formTreeSelectDefinition = exports.formToggleSwitchDefinition = exports.formToggleButtonDefinition = exports.formTextareaDefinition = exports.formSliderDefinition = exports.formSelectDefinition = exports.formSelectButtonDefinition = exports.formRatingDefinition = exports.formRadioButtonDefinition = exports.formPasswordDefinition = exports.formMultiSelectDefinition = exports.formListboxDefinition = exports.formKnobDefinition = exports.formInputTextDefinition = exports.formInputOtpDefinition = exports.formInputNumberDefinition = exports.formInputMaskDefinition = exports.formDatePickerDefinition = exports.formColorPickerDefinition = exports.formCheckboxDefinition = exports.formCascadeSelectDefinition = exports.formAutoCompleteDefinition = void 0;
7
+ var _vue = require("@formkit/vue");
8
+ var _FormAutoComplete = _interopRequireDefault(require("../components/FormAutoComplete.vue"));
9
+ var _FormCascadeSelect = _interopRequireDefault(require("../components/FormCascadeSelect.vue"));
10
+ var _FormCheckbox = _interopRequireDefault(require("../components/FormCheckbox.vue"));
11
+ var _FormColorPicker = _interopRequireDefault(require("../components/FormColorPicker.vue"));
12
+ var _FormDatePicker = _interopRequireDefault(require("../components/FormDatePicker.vue"));
13
+ var _FormInputMask = _interopRequireDefault(require("../components/FormInputMask.vue"));
14
+ var _FormInputNumber = _interopRequireDefault(require("../components/FormInputNumber.vue"));
15
+ var _FormInputOtp = _interopRequireDefault(require("../components/FormInputOtp.vue"));
16
+ var _FormInputText = _interopRequireDefault(require("../components/FormInputText.vue"));
17
+ var _FormKnob = _interopRequireDefault(require("../components/FormKnob.vue"));
18
+ var _FormListbox = _interopRequireDefault(require("../components/FormListbox.vue"));
19
+ var _FormMultiSelect = _interopRequireDefault(require("../components/FormMultiSelect.vue"));
20
+ var _FormPassword = _interopRequireDefault(require("../components/FormPassword.vue"));
21
+ var _FormRadioButton = _interopRequireDefault(require("../components/FormRadioButton.vue"));
22
+ var _FormRating = _interopRequireDefault(require("../components/FormRating.vue"));
23
+ var _FormSelect = _interopRequireDefault(require("../components/FormSelect.vue"));
24
+ var _FormSelectButton = _interopRequireDefault(require("../components/FormSelectButton.vue"));
25
+ var _FormSlider = _interopRequireDefault(require("../components/FormSlider.vue"));
26
+ var _FormTextarea = _interopRequireDefault(require("../components/FormTextarea.vue"));
27
+ var _FormToggleButton = _interopRequireDefault(require("../components/FormToggleButton.vue"));
28
+ var _FormToggleSwitch = _interopRequireDefault(require("../components/FormToggleSwitch.vue"));
29
+ var _FormTreeSelect = _interopRequireDefault(require("../components/FormTreeSelect.vue"));
30
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
31
+ const formAutoCompleteDefinition = exports.formAutoCompleteDefinition = (0, _vue.createInput)(_FormAutoComplete.default, {
32
+ props: ["pt", "ptOptions", "unstyled", "Select", "multiple", "typeahead", "optionLabel", "options", "size", "minLength", "placeholder", "fluid", "separators"],
33
+ family: "FormInput"
34
+ });
35
+ const formInputTextDefinition = exports.formInputTextDefinition = (0, _vue.createInput)(_FormInputText.default, {
36
+ props: ["pt", "ptOptions", "unstyled", "placeholder", "iconPrefix", "iconSuffix", "size", "inputType"],
37
+ family: "FormInput"
38
+ });
39
+ const formInputNumberDefinition = exports.formInputNumberDefinition = (0, _vue.createInput)(_FormInputNumber.default, {
40
+ props: ["useGrouping", "min", "max", "minFractionDigits", "maxFractionDigits", "locale", "mode", "currency", "prefix", "suffix", "showButtons", "buttonLayout", "step", "pt", "ptOptions", "unstyled", "placeholder", "size"],
41
+ family: "FormInput"
42
+ });
43
+ const formInputMaskDefinition = exports.formInputMaskDefinition = (0, _vue.createInput)(_FormInputMask.default, {
44
+ props: ["mask", "slotChar", "autoClear", "unmask", "pt", "ptOptions", "unstyled", "invalid", "variant", "iconPrefix", "iconSuffix", "size"],
45
+ family: "FormInput"
46
+ });
47
+ const formPasswordDefinition = exports.formPasswordDefinition = (0, _vue.createInput)(_FormPassword.default, {
48
+ props: ["mediumRegex", "strongRegex", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "hideIcon", "showIcon", "pt", "ptOptions", "unstyled", "placeholder", "feedback", "toggleMask", "size"],
49
+ family: "FormInput"
50
+ });
51
+ const formTextareaDefinition = exports.formTextareaDefinition = (0, _vue.createInput)(_FormTextarea.default, {
52
+ props: ["pt", "ptOptions", "unstyled", "autoResize", "rows", "placeholder", "size"],
53
+ family: "FormInput"
54
+ });
55
+ const formCheckboxDefinition = exports.formCheckboxDefinition = (0, _vue.createInput)(_FormCheckbox.default, {
56
+ props: ["binary", "trueValue", "falseValue", "pt", "ptOptions", "unstyled", "indeterminate", "variant", "prefix", "suffix", "size"],
57
+ family: "FormInput"
58
+ });
59
+ const formToggleSwitchDefinition = exports.formToggleSwitchDefinition = (0, _vue.createInput)(_FormToggleSwitch.default, {
60
+ props: ["trueValue", "falseValue", "pt", "ptOptions", "unstyled", "prefix", "suffix"],
61
+ family: "FormInput"
62
+ });
63
+ const formInputOtpDefinition = exports.formInputOtpDefinition = (0, _vue.createInput)(_FormInputOtp.default, {
64
+ props: ["length", "variant", "mask", "integerOnly", "pt", "ptOptions", "unstyled", "size"],
65
+ family: "FormInput"
66
+ });
67
+ const formSelectDefinition = exports.formSelectDefinition = (0, _vue.createInput)(_FormSelect.default, {
68
+ props: ["options", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "scrollHeight", "filter", "filterPlaceholder", "filterLocale", "filterMatchMode", "filterFields", "filterInputProps", "editable", "placeholder", "dataKey", "showClear", "panelStyle", "panelClass", "panelProps", "appendTo", "resetFilterOnHide", "virtualScrollerOptions", "autoOptionFocus", "selectOnFocus", "filterMessage", "selectionMessage", "emptySelectionMessage", "emptyFilterMessage", "emptyMessage", "pt", "ptOptions", "unstyled", "size"],
69
+ family: "FormInput"
70
+ });
71
+ const formMultiSelectDefinition = exports.formMultiSelectDefinition = (0, _vue.createInput)(_FormMultiSelect.default, {
72
+ props: ["options", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "scrollHeight", "inputProps", "closeButtonProps", "dataKey", "filter", "filterPlaceholder", "filterLocale", "filterMatchMode", "filterFields", "appendTo", "display", "maxSelectedLabels", "selectedItemsLabel", "selectionLimit", "showToggleAll", "loading", "selectAll", "resetFilterOnHide", "virtualScrollerOptions", "autoOptionFocus", "autoFilterFocus", "filterMessage", "selectionMessage", "emptySelectionMessage", "emptyFilterMessage", "emptyMessage", "pt", "placeholder", "ptOptions", "unstyled", "size"],
73
+ family: "FormInput"
74
+ });
75
+ const formListboxDefinition = exports.formListboxDefinition = (0, _vue.createInput)(_FormListbox.default, {
76
+ props: ["pt", "ptOptions", "unstyled", "options", "optionLabel", "optionValue", "multiple", "filter", "filterIcon", "filterPlaceholder", "filterLocale", "filterMatchMode", "autoOptionFocus", "selectOnFocus", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "dataKey", "metaKeySelection", "virtualScrollerOptions", "displayMode", "transferLeftHeaderText", "transferRightHeaderText", "transferHeaderClass", "transferAll", "transferButtonSeverity", "transferContainerClass", "transferListContainerClass", "transferButtonClass", "transferDragDrop"],
77
+ family: "FormInput"
78
+ });
79
+ const formDatePickerDefinition = exports.formDatePickerDefinition = (0, _vue.createInput)(_FormDatePicker.default, {
80
+ props: ["dateFormat", "placeholder", "selectionMode", "inline", "icon", "showOtherMonths", "selectOtherMonths", "showIcon", "previousIcon", "nextIcon", "incrementIcon", "decrementIcon", "numberOfMonths", "responsiveOptions", "view", "touchUI", "minDate", "maxDate", "disabledDates", "disabledDays", "maxDateCount", "showOnFocus", "autoZIndex", "baseZIndex", "showButtonBar", "showTime", "timeOnly", "shortYearCutoff", "hourFormat", "stepHour", "stepMinute", "stepSecond", "showSeconds", "hideOnDateTimeSelect", "hideOnRangeSelection", "timeSeparator", "showWeek", "manualInput", "appendTo", "panelStyle", "panelClass", "pt", "ptOptions", "unstyled", "size", "updateModelType"],
81
+ family: "FormInput"
82
+ });
83
+ const formSliderDefinition = exports.formSliderDefinition = (0, _vue.createInput)(_FormSlider.default, {
84
+ props: ["pt", "ptOptions", "unstyled", "min", "max", "step", "range", "orientation"],
85
+ family: "FormInput"
86
+ });
87
+ const formRatingDefinition = exports.formRatingDefinition = (0, _vue.createInput)(_FormRating.default, {
88
+ props: ["unstyled", "stars", "cancel", "onIcon", "offIcon", "cancelIcon", "ptOptions", "pt"],
89
+ family: "FormInput"
90
+ });
91
+ const formRadioButtonDefinition = exports.formRadioButtonDefinition = (0, _vue.createInput)(_FormRadioButton.default, {
92
+ props: ["pt", "ptOptions", "unstyled", "options", "optionsClass", "optionClass", "size"],
93
+ family: "FormInput"
94
+ });
95
+ const formKnobDefinition = exports.formKnobDefinition = (0, _vue.createInput)(_FormKnob.default, {
96
+ props: ["pt", "ptOptions", "unstyled", "min", "max", "step", "size", "strokeWidth", "showValue", "valueColor", "rangeColor", "textColor", "valueTemplate"],
97
+ family: "FormInput"
98
+ });
99
+ const formColorPickerDefinition = exports.formColorPickerDefinition = (0, _vue.createInput)(_FormColorPicker.default, {
100
+ props: ["defaultColor", "inline", "format", "pt", "ptOptions", "unstyled"],
101
+ family: "FormInput"
102
+ });
103
+ const formToggleButtonDefinition = exports.formToggleButtonDefinition = (0, _vue.createInput)(_FormToggleButton.default, {
104
+ props: ["pt", "ptOptions", "unstyled", "onLabel", "offLabel", "onIcon", "offIcon", "iconPos", "size"],
105
+ family: "FormInput"
106
+ });
107
+ const formSelectButtonDefinition = exports.formSelectButtonDefinition = (0, _vue.createInput)(_FormSelectButton.default, {
108
+ props: ["pt", "ptOptions", "unstyled", "optionLabel", "optionValue", "optionDisabled", "multiple", "unselectable", "dataKey", "options", "size"],
109
+ family: "FormInput"
110
+ });
111
+ const formCascadeSelectDefinition = exports.formCascadeSelectDefinition = (0, _vue.createInput)(_FormCascadeSelect.default, {
112
+ props: ["options", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "placeholder", "pt", "ptOptions", "unstyled", "size"],
113
+ family: "FormInput"
114
+ });
115
+ const formTreeSelectDefinition = exports.formTreeSelectDefinition = (0, _vue.createInput)(_FormTreeSelect.default, {
116
+ props: ["options", "placeholder", "selectionMode", "pt", "ptOptions", "unstyled", "emptyMessage", "display", "metaKeySelection", "appendTo", "scrollHeight", "panelClass", "variant", "size"],
117
+ family: "FormInput"
118
+ });
@@ -0,0 +1,111 @@
1
+ import { createInput } from "@formkit/vue";
2
+ import FormAutoComplete from "../components/FormAutoComplete.vue";
3
+ import FormCascadeSelect from "../components/FormCascadeSelect.vue";
4
+ import FormCheckbox from "../components/FormCheckbox.vue";
5
+ import FormColorPicker from "../components/FormColorPicker.vue";
6
+ import FormDatePicker from "../components/FormDatePicker.vue";
7
+ import FormInputMask from "../components/FormInputMask.vue";
8
+ import FormInputNumber from "../components/FormInputNumber.vue";
9
+ import FormInputOtp from "../components/FormInputOtp.vue";
10
+ import FormInputText from "../components/FormInputText.vue";
11
+ import FormKnob from "../components/FormKnob.vue";
12
+ import FormListbox from "../components/FormListbox.vue";
13
+ import FormMultiSelect from "../components/FormMultiSelect.vue";
14
+ import FormPassword from "../components/FormPassword.vue";
15
+ import FormRadioButton from "../components/FormRadioButton.vue";
16
+ import FormRating from "../components/FormRating.vue";
17
+ import FormSelect from "../components/FormSelect.vue";
18
+ import FormSelectButton from "../components/FormSelectButton.vue";
19
+ import FormSlider from "../components/FormSlider.vue";
20
+ import FormTextarea from "../components/FormTextarea.vue";
21
+ import FormToggleButton from "../components/FormToggleButton.vue";
22
+ import FormToggleSwitch from "../components/FormToggleSwitch.vue";
23
+ import FormTreeSelect from "../components/FormTreeSelect.vue";
24
+ export const formAutoCompleteDefinition = createInput(FormAutoComplete, {
25
+ props: ["pt", "ptOptions", "unstyled", "Select", "multiple", "typeahead", "optionLabel", "options", "size", "minLength", "placeholder", "fluid", "separators"],
26
+ family: "FormInput"
27
+ });
28
+ export const formInputTextDefinition = createInput(FormInputText, {
29
+ props: ["pt", "ptOptions", "unstyled", "placeholder", "iconPrefix", "iconSuffix", "size", "inputType"],
30
+ family: "FormInput"
31
+ });
32
+ export const formInputNumberDefinition = createInput(FormInputNumber, {
33
+ props: ["useGrouping", "min", "max", "minFractionDigits", "maxFractionDigits", "locale", "mode", "currency", "prefix", "suffix", "showButtons", "buttonLayout", "step", "pt", "ptOptions", "unstyled", "placeholder", "size"],
34
+ family: "FormInput"
35
+ });
36
+ export const formInputMaskDefinition = createInput(FormInputMask, {
37
+ props: ["mask", "slotChar", "autoClear", "unmask", "pt", "ptOptions", "unstyled", "invalid", "variant", "iconPrefix", "iconSuffix", "size"],
38
+ family: "FormInput"
39
+ });
40
+ export const formPasswordDefinition = createInput(FormPassword, {
41
+ props: ["mediumRegex", "strongRegex", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "hideIcon", "showIcon", "pt", "ptOptions", "unstyled", "placeholder", "feedback", "toggleMask", "size"],
42
+ family: "FormInput"
43
+ });
44
+ export const formTextareaDefinition = createInput(FormTextarea, {
45
+ props: ["pt", "ptOptions", "unstyled", "autoResize", "rows", "placeholder", "size"],
46
+ family: "FormInput"
47
+ });
48
+ export const formCheckboxDefinition = createInput(FormCheckbox, {
49
+ props: ["binary", "trueValue", "falseValue", "pt", "ptOptions", "unstyled", "indeterminate", "variant", "prefix", "suffix", "size"],
50
+ family: "FormInput"
51
+ });
52
+ export const formToggleSwitchDefinition = createInput(FormToggleSwitch, {
53
+ props: ["trueValue", "falseValue", "pt", "ptOptions", "unstyled", "prefix", "suffix"],
54
+ family: "FormInput"
55
+ });
56
+ export const formInputOtpDefinition = createInput(FormInputOtp, {
57
+ props: ["length", "variant", "mask", "integerOnly", "pt", "ptOptions", "unstyled", "size"],
58
+ family: "FormInput"
59
+ });
60
+ export const formSelectDefinition = createInput(FormSelect, {
61
+ props: ["options", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "scrollHeight", "filter", "filterPlaceholder", "filterLocale", "filterMatchMode", "filterFields", "filterInputProps", "editable", "placeholder", "dataKey", "showClear", "panelStyle", "panelClass", "panelProps", "appendTo", "resetFilterOnHide", "virtualScrollerOptions", "autoOptionFocus", "selectOnFocus", "filterMessage", "selectionMessage", "emptySelectionMessage", "emptyFilterMessage", "emptyMessage", "pt", "ptOptions", "unstyled", "size"],
62
+ family: "FormInput"
63
+ });
64
+ export const formMultiSelectDefinition = createInput(FormMultiSelect, {
65
+ props: ["options", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "scrollHeight", "inputProps", "closeButtonProps", "dataKey", "filter", "filterPlaceholder", "filterLocale", "filterMatchMode", "filterFields", "appendTo", "display", "maxSelectedLabels", "selectedItemsLabel", "selectionLimit", "showToggleAll", "loading", "selectAll", "resetFilterOnHide", "virtualScrollerOptions", "autoOptionFocus", "autoFilterFocus", "filterMessage", "selectionMessage", "emptySelectionMessage", "emptyFilterMessage", "emptyMessage", "pt", "placeholder", "ptOptions", "unstyled", "size"],
66
+ family: "FormInput"
67
+ });
68
+ export const formListboxDefinition = createInput(FormListbox, {
69
+ props: ["pt", "ptOptions", "unstyled", "options", "optionLabel", "optionValue", "multiple", "filter", "filterIcon", "filterPlaceholder", "filterLocale", "filterMatchMode", "autoOptionFocus", "selectOnFocus", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "dataKey", "metaKeySelection", "virtualScrollerOptions", "displayMode", "transferLeftHeaderText", "transferRightHeaderText", "transferHeaderClass", "transferAll", "transferButtonSeverity", "transferContainerClass", "transferListContainerClass", "transferButtonClass", "transferDragDrop"],
70
+ family: "FormInput"
71
+ });
72
+ export const formDatePickerDefinition = createInput(FormDatePicker, {
73
+ props: ["dateFormat", "placeholder", "selectionMode", "inline", "icon", "showOtherMonths", "selectOtherMonths", "showIcon", "previousIcon", "nextIcon", "incrementIcon", "decrementIcon", "numberOfMonths", "responsiveOptions", "view", "touchUI", "minDate", "maxDate", "disabledDates", "disabledDays", "maxDateCount", "showOnFocus", "autoZIndex", "baseZIndex", "showButtonBar", "showTime", "timeOnly", "shortYearCutoff", "hourFormat", "stepHour", "stepMinute", "stepSecond", "showSeconds", "hideOnDateTimeSelect", "hideOnRangeSelection", "timeSeparator", "showWeek", "manualInput", "appendTo", "panelStyle", "panelClass", "pt", "ptOptions", "unstyled", "size", "updateModelType"],
74
+ family: "FormInput"
75
+ });
76
+ export const formSliderDefinition = createInput(FormSlider, {
77
+ props: ["pt", "ptOptions", "unstyled", "min", "max", "step", "range", "orientation"],
78
+ family: "FormInput"
79
+ });
80
+ export const formRatingDefinition = createInput(FormRating, {
81
+ props: ["unstyled", "stars", "cancel", "onIcon", "offIcon", "cancelIcon", "ptOptions", "pt"],
82
+ family: "FormInput"
83
+ });
84
+ export const formRadioButtonDefinition = createInput(FormRadioButton, {
85
+ props: ["pt", "ptOptions", "unstyled", "options", "optionsClass", "optionClass", "size"],
86
+ family: "FormInput"
87
+ });
88
+ export const formKnobDefinition = createInput(FormKnob, {
89
+ props: ["pt", "ptOptions", "unstyled", "min", "max", "step", "size", "strokeWidth", "showValue", "valueColor", "rangeColor", "textColor", "valueTemplate"],
90
+ family: "FormInput"
91
+ });
92
+ export const formColorPickerDefinition = createInput(FormColorPicker, {
93
+ props: ["defaultColor", "inline", "format", "pt", "ptOptions", "unstyled"],
94
+ family: "FormInput"
95
+ });
96
+ export const formToggleButtonDefinition = createInput(FormToggleButton, {
97
+ props: ["pt", "ptOptions", "unstyled", "onLabel", "offLabel", "onIcon", "offIcon", "iconPos", "size"],
98
+ family: "FormInput"
99
+ });
100
+ export const formSelectButtonDefinition = createInput(FormSelectButton, {
101
+ props: ["pt", "ptOptions", "unstyled", "optionLabel", "optionValue", "optionDisabled", "multiple", "unselectable", "dataKey", "options", "size"],
102
+ family: "FormInput"
103
+ });
104
+ export const formCascadeSelectDefinition = createInput(FormCascadeSelect, {
105
+ props: ["options", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "placeholder", "pt", "ptOptions", "unstyled", "size"],
106
+ family: "FormInput"
107
+ });
108
+ export const formTreeSelectDefinition = createInput(FormTreeSelect, {
109
+ props: ["options", "placeholder", "selectionMode", "pt", "ptOptions", "unstyled", "emptyMessage", "display", "metaKeySelection", "appendTo", "scrollHeight", "panelClass", "variant", "size"],
110
+ family: "FormInput"
111
+ });
@@ -0,0 +1,9 @@
1
+ import type { FormKitTypeDefinition } from '@formkit/core';
2
+ export declare const formOutputTextDefinition: FormKitTypeDefinition;
3
+ export declare const formOutputDateDefinition: FormKitTypeDefinition;
4
+ export declare const formOutputNumberDefinition: FormKitTypeDefinition;
5
+ export declare const formOutputLinkDefinition: FormKitTypeDefinition;
6
+ export declare const formOutputReferenceDefinition: FormKitTypeDefinition;
7
+ export declare const formOutputBooleanDefinition: FormKitTypeDefinition;
8
+ export declare const formOutputDurationDefinition: FormKitTypeDefinition;
9
+ export declare const formOutputListDefinition: FormKitTypeDefinition;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formOutputTextDefinition = exports.formOutputReferenceDefinition = exports.formOutputNumberDefinition = exports.formOutputListDefinition = exports.formOutputLinkDefinition = exports.formOutputDurationDefinition = exports.formOutputDateDefinition = exports.formOutputBooleanDefinition = void 0;
7
+ var _vue = require("@formkit/vue");
8
+ var _FormOutputBoolean = _interopRequireDefault(require("../components/FormOutputBoolean.vue"));
9
+ var _FormOutputDate = _interopRequireDefault(require("../components/FormOutputDate.vue"));
10
+ var _FormOutputDuration = _interopRequireDefault(require("../components/FormOutputDuration.vue"));
11
+ var _FormOutputLink = _interopRequireDefault(require("../components/FormOutputLink.vue"));
12
+ var _FormOutputList = _interopRequireDefault(require("../components/FormOutputList.vue"));
13
+ var _FormOutputNumber = _interopRequireDefault(require("../components/FormOutputNumber.vue"));
14
+ var _FormOutputReference = _interopRequireDefault(require("../components/FormOutputReference.vue"));
15
+ var _FormOutputText = _interopRequireDefault(require("../components/FormOutputText.vue"));
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ const formOutputTextDefinition = exports.formOutputTextDefinition = (0, _vue.createInput)(_FormOutputText.default, {
18
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "isTranslationKey", "html", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip", "convertValue", "maxLength"]
19
+ });
20
+ const formOutputDateDefinition = exports.formOutputDateDefinition = (0, _vue.createInput)(_FormOutputDate.default, {
21
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip"]
22
+ });
23
+ const formOutputNumberDefinition = exports.formOutputNumberDefinition = (0, _vue.createInput)(_FormOutputNumber.default, {
24
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip"],
25
+ family: "FormOutput"
26
+ });
27
+ const formOutputLinkDefinition = exports.formOutputLinkDefinition = (0, _vue.createInput)(_FormOutputLink.default, {
28
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "title", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip"],
29
+ family: "FormOutput"
30
+ });
31
+ const formOutputReferenceDefinition = exports.formOutputReferenceDefinition = (0, _vue.createInput)(_FormOutputReference.default, {
32
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "reference", "internal", "linkComponentName", "title", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip"],
33
+ family: "FormOutput"
34
+ });
35
+ const formOutputBooleanDefinition = exports.formOutputBooleanDefinition = (0, _vue.createInput)(_FormOutputBoolean.default, {
36
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "trueValue", "falseValue", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip"],
37
+ family: "FormOutput"
38
+ });
39
+ const formOutputDurationDefinition = exports.formOutputDurationDefinition = (0, _vue.createInput)(_FormOutputDuration.default, {
40
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip"],
41
+ family: "FormOutput"
42
+ });
43
+ const formOutputListDefinition = exports.formOutputListDefinition = (0, _vue.createInput)(_FormOutputList.default, {
44
+ props: ["prefix", "suffix", "iconPrefix", "iconSuffix", "divider", "itemClass", "dividerClass", "listStyle", "onIconPrefixClicked", "onIconSuffixClicked", "iconPrefixTooltip", "iconSuffixTooltip", "optionLabel", "options", "optionValue", "convertValue"],
45
+ family: "FormOutput"
46
+ });
@@ -0,0 +1,136 @@
1
+ import { createInput } from "@formkit/vue";
2
+ import FormOutputBoolean from "../components/FormOutputBoolean.vue";
3
+ import FormOutputDate from "../components/FormOutputDate.vue";
4
+ import FormOutputDuration from "../components/FormOutputDuration.vue";
5
+ import FormOutputLink from "../components/FormOutputLink.vue";
6
+ import FormOutputList from "../components/FormOutputList.vue";
7
+ import FormOutputNumber from "../components/FormOutputNumber.vue";
8
+ import FormOutputReference from "../components/FormOutputReference.vue";
9
+ import FormOutputText from "../components/FormOutputText.vue";
10
+ export const formOutputTextDefinition = createInput(FormOutputText, {
11
+ props: [
12
+ "prefix",
13
+ "suffix",
14
+ "iconPrefix",
15
+ "iconSuffix",
16
+ "isTranslationKey",
17
+ "html",
18
+ "onIconPrefixClicked",
19
+ "onIconSuffixClicked",
20
+ "iconPrefixTooltip",
21
+ "iconSuffixTooltip",
22
+ "convertValue",
23
+ "maxLength"
24
+ ]
25
+ });
26
+ export const formOutputDateDefinition = createInput(FormOutputDate, {
27
+ props: [
28
+ "prefix",
29
+ "suffix",
30
+ "iconPrefix",
31
+ "iconSuffix",
32
+ "onIconPrefixClicked",
33
+ "onIconSuffixClicked",
34
+ "iconPrefixTooltip",
35
+ "iconSuffixTooltip"
36
+ ]
37
+ });
38
+ export const formOutputNumberDefinition = createInput(FormOutputNumber, {
39
+ props: [
40
+ "prefix",
41
+ "suffix",
42
+ "iconPrefix",
43
+ "iconSuffix",
44
+ "onIconPrefixClicked",
45
+ "onIconSuffixClicked",
46
+ "iconPrefixTooltip",
47
+ "iconSuffixTooltip"
48
+ ],
49
+ family: "FormOutput"
50
+ });
51
+ export const formOutputLinkDefinition = createInput(FormOutputLink, {
52
+ props: [
53
+ "prefix",
54
+ "suffix",
55
+ "iconPrefix",
56
+ "iconSuffix",
57
+ "title",
58
+ "onIconPrefixClicked",
59
+ "onIconSuffixClicked",
60
+ "iconPrefixTooltip",
61
+ "iconSuffixTooltip"
62
+ ],
63
+ family: "FormOutput"
64
+ });
65
+ export const formOutputReferenceDefinition = createInput(
66
+ FormOutputReference,
67
+ {
68
+ props: [
69
+ "prefix",
70
+ "suffix",
71
+ "iconPrefix",
72
+ "iconSuffix",
73
+ "reference",
74
+ "internal",
75
+ "linkComponentName",
76
+ "title",
77
+ "onIconPrefixClicked",
78
+ "onIconSuffixClicked",
79
+ "iconPrefixTooltip",
80
+ "iconSuffixTooltip"
81
+ ],
82
+ family: "FormOutput"
83
+ }
84
+ );
85
+ export const formOutputBooleanDefinition = createInput(FormOutputBoolean, {
86
+ props: [
87
+ "prefix",
88
+ "suffix",
89
+ "iconPrefix",
90
+ "iconSuffix",
91
+ "trueValue",
92
+ "falseValue",
93
+ "onIconPrefixClicked",
94
+ "onIconSuffixClicked",
95
+ "iconPrefixTooltip",
96
+ "iconSuffixTooltip"
97
+ ],
98
+ family: "FormOutput"
99
+ });
100
+ export const formOutputDurationDefinition = createInput(
101
+ FormOutputDuration,
102
+ {
103
+ props: [
104
+ "prefix",
105
+ "suffix",
106
+ "iconPrefix",
107
+ "iconSuffix",
108
+ "onIconPrefixClicked",
109
+ "onIconSuffixClicked",
110
+ "iconPrefixTooltip",
111
+ "iconSuffixTooltip"
112
+ ],
113
+ family: "FormOutput"
114
+ }
115
+ );
116
+ export const formOutputListDefinition = createInput(FormOutputList, {
117
+ props: [
118
+ "prefix",
119
+ "suffix",
120
+ "iconPrefix",
121
+ "iconSuffix",
122
+ "divider",
123
+ "itemClass",
124
+ "dividerClass",
125
+ "listStyle",
126
+ "onIconPrefixClicked",
127
+ "onIconSuffixClicked",
128
+ "iconPrefixTooltip",
129
+ "iconSuffixTooltip",
130
+ "optionLabel",
131
+ "options",
132
+ "optionValue",
133
+ "convertValue"
134
+ ],
135
+ family: "FormOutput"
136
+ });
@@ -0,0 +1,2 @@
1
+ import type { FormKitTypeDefinition } from '@formkit/core';
2
+ export declare const formRepeaterDefinition: FormKitTypeDefinition;
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formRepeaterDefinition = void 0;
7
+ var _vue = require("@formkit/vue");
8
+ var _composables = require("../composables");
9
+ const {
10
+ addList,
11
+ addElement,
12
+ addListGroup,
13
+ addComponent
14
+ } = (0, _composables.useFormKitSchema)();
15
+ function addButtonGroup(buttonGroupClass = "", buttonGroupItemClass = "", buttonSize, render = "true") {
16
+ const addActionButtonComponent = (onClick = "", icon = "", severity = "", render2 = "true", disabled = "false") => {
17
+ return addElement("div", [addComponent("Button", {
18
+ onClick,
19
+ icon,
20
+ severity,
21
+ disabled,
22
+ size: buttonSize
23
+ })], {
24
+ class: buttonGroupItemClass
25
+ }, render2);
26
+ };
27
+ return addElement("div", [addActionButtonComponent("$moveNodeUp($node.parent, $index)", "oi oi-arrow-up", "secondary", "$renderMoveButtons", "$index === 0"), addActionButtonComponent("$removeNode($node.parent, $index)", "oi oi-trash", "danger", "$displayDeleteButton", "$node.parent.value.length === $minItems"), addActionButtonComponent("$cloneNode($node.parent, $index)", "oi oi-clone", "", "$displayCloneButton", "$node.parent.value.length > $maxItems -1"), addActionButtonComponent("$addNode($node.parent, $index)", "oi oi-plus", "", "$displayAddButton", "$node.parent.value.length > $maxItems -1"), addActionButtonComponent("$moveNodeDown($node.parent, $index)", "oi oi-arrow-down", "secondary", "$renderMoveButtons", "$index === $node.parent.value.length -1")], {
28
+ class: buttonGroupClass
29
+ }, render);
30
+ }
31
+ function addInsertButton(label = "Add Item", icon = "i-lucide-plus", styleClass = "", buttonSize, render = "true") {
32
+ return addElement("div", [addComponent("Button", {
33
+ onClick: "$insertNode($node)",
34
+ label,
35
+ icon,
36
+ size: buttonSize,
37
+ disabled: "$node.value.length > $maxItems -1"
38
+ })], {
39
+ class: styleClass
40
+ }, render);
41
+ }
42
+ function addDragHandle(handleClass = "", iconClass = "", render = "true") {
43
+ return addElement("span", [addElement("i", [], {
44
+ class: iconClass
45
+ })], {
46
+ "class": handleClass,
47
+ "aria-label": "Drag to reorder"
48
+ }, render);
49
+ }
50
+ const formRepeaterDefinition = exports.formRepeaterDefinition = (0, _vue.createInput)(addElement("div", [addList("$listName", [addInsertButton("$insertButtonLabel", "oi oi-plus", "$insertButtonClass", "$insertButtonSize", "$node.children.length == 0 || $alwaysDisplayInsertButton"), addListGroup([addElement("div", [addDragHandle("$internalDragHandleClass", "$dragHandleIconClass", "$renderDragHandle"), {
51
+ children: "$slots.default"
52
+ }, addButtonGroup("$buttonGroupClass", "$buttonGroupItemClass", "$buttonSize", "$renderButtons")], {
53
+ id: "$getListItemId($index)",
54
+ class: "$getListItemClass($index)",
55
+ draggable: "$draggable",
56
+ onDragstart: "$dragNodeStart($node.parent, $index)",
57
+ onDragover: "$dragNodeOver($index)",
58
+ onDragleave: "$dragNodeLeave($index)",
59
+ onDrop: "$dropNode($node.parent, $index)",
60
+ onDragend: "$dragNodeEnd"
61
+ })], true, {})], true, "true", {
62
+ value: "$value"
63
+ })], {
64
+ class: "$internalListClass",
65
+ id: "$internalListId"
66
+ }, true), {
67
+ props: ["insertButtonLabel", "insertButtonClass", "insertButtonSize", "alwaysDisplayInsertButton", "newItem", "listClass", "listItemClass", "hideButtonGroup", "hideMoveButtons", "buttonGroupClass", "buttonGroupItemClass", "buttonSize", "displayCloneButton", "displayAddButton", "displayDeleteButton", "minItems", "maxItems", "displayDragHandle", "draggable", "dragHandleClass", "dragHandleIconClass"],
68
+ features: [addRepeaterHandler]
69
+ });
70
+ function addRepeaterHandler(node) {
71
+ const swapElements = (array, index1, index2) => {
72
+ array.splice(index2, 0, array.splice(index1, 1)[0]);
73
+ return array;
74
+ };
75
+ const uuid = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2);
76
+ node.on("created", () => {
77
+ if (node.context) {
78
+ let dragStartIndex = null;
79
+ let dragOverIndex = null;
80
+ const newItem = node.context.newItem || {};
81
+ node.context.listName = node.name;
82
+ node.context.renderButtons = !node.context.hideButtonGroup;
83
+ node.context.insertButtonSize = node.context.insertButtonSize ? node.context.insertButtonSize : "";
84
+ node.context.buttonSize = node.context.buttonSize ? node.context.buttonSize : "";
85
+ node.context.renderMoveButtons = !node.context.hideMoveButtons;
86
+ node.context.draggable = !!node.context.draggable;
87
+ node.context.renderDragHandle = !!node.context.displayDragHandle;
88
+ node.context.dragHandleIconClass = node.context.dragHandleIconClass || "oi oi-bars";
89
+ node.context.internalDragHandleClass = node.context.dragHandleClass ? `formkit-repeater-drag-handle ${node.context.dragHandleClass}` : "formkit-repeater-drag-handle";
90
+ node.context.internalListClass = node.context.listClass ? `formkit-items ${node.context.listClass}` : "formkit-items";
91
+ node.context.internalListItemClass = node.context.listItemClass ? `formkit-item ${node.context.listItemClass}` : "formkit-item";
92
+ node.context.internalListId = `formkit-items-${uuid}`;
93
+ node.context.getListItemClass = index => {
94
+ if (dragOverIndex === index && dragStartIndex !== index) return `${node.context?.internalListItemClass} formkit-repeater-drop-target`;
95
+ return node.context?.internalListItemClass?.toString() ?? "";
96
+ };
97
+ node.context.getListItemId = index => {
98
+ return `formkit-item-${index}-${uuid}`;
99
+ };
100
+ node.context.insertNode = parentNode => () => {
101
+ if (parentNode && Array.isArray(parentNode._value)) {
102
+ const newArray = [{
103
+ ...newItem
104
+ }, ...parentNode.value];
105
+ parentNode.input(newArray, false);
106
+ }
107
+ };
108
+ node.context.removeNode = (parentNode, index) => () => {
109
+ if (parentNode && Array.isArray(parentNode._value)) {
110
+ parentNode.input(parentNode._value.filter((_, i) => i !== index), false);
111
+ }
112
+ };
113
+ node.context.addNode = (parentNode, index) => () => {
114
+ if (parentNode && Array.isArray(parentNode._value)) {
115
+ const array = parentNode.value;
116
+ array.splice(index + 1, 0, newItem);
117
+ parentNode.input(array, false);
118
+ }
119
+ };
120
+ node.context.cloneNode = (parentNode, index) => () => {
121
+ if (parentNode && Array.isArray(parentNode._value)) {
122
+ const item = parentNode.value[index];
123
+ const array = parentNode.value;
124
+ array.splice(index + 1, 0, item);
125
+ parentNode.input(array, false);
126
+ }
127
+ };
128
+ node.context.moveNodeUp = (parentNode, index) => () => {
129
+ if (parentNode && Array.isArray(parentNode._value)) {
130
+ if (index > 0) parentNode.input(swapElements(parentNode.value, index - 1, index), false);
131
+ }
132
+ };
133
+ node.context.moveNodeDown = (parentNode, index) => () => {
134
+ if (parentNode && Array.isArray(parentNode._value)) {
135
+ if (index < parentNode.value.length - 1) parentNode.input(swapElements(parentNode.value, index, index + 1), false);
136
+ }
137
+ };
138
+ node.context.dragNodeStart = (_parentNode, index) => event => {
139
+ dragStartIndex = index;
140
+ if (event?.dataTransfer) {
141
+ event.dataTransfer.effectAllowed = "move";
142
+ event.dataTransfer.setData("text/plain", String(index));
143
+ }
144
+ };
145
+ node.context.dragNodeOver = targetIndex => event => {
146
+ event?.preventDefault();
147
+ dragOverIndex = targetIndex;
148
+ if (event?.dataTransfer) event.dataTransfer.dropEffect = "move";
149
+ };
150
+ node.context.dragNodeLeave = targetIndex => () => {
151
+ if (dragOverIndex === targetIndex) dragOverIndex = null;
152
+ };
153
+ node.context.dropNode = (parentNode, targetIndex) => event => {
154
+ event?.preventDefault();
155
+ if (!parentNode || !Array.isArray(parentNode._value)) {
156
+ dragOverIndex = null;
157
+ return;
158
+ }
159
+ const sourceFromEvent = Number.parseInt(event?.dataTransfer?.getData("text/plain") || "", 10);
160
+ const sourceIndex = Number.isInteger(sourceFromEvent) ? sourceFromEvent : dragStartIndex;
161
+ if (sourceIndex === null || sourceIndex === targetIndex) {
162
+ dragOverIndex = null;
163
+ return;
164
+ }
165
+ if (sourceIndex < 0 || sourceIndex >= parentNode.value.length) {
166
+ dragOverIndex = null;
167
+ return;
168
+ }
169
+ parentNode.input(swapElements(parentNode.value, sourceIndex, targetIndex), false);
170
+ dragStartIndex = null;
171
+ dragOverIndex = null;
172
+ };
173
+ node.context.dragNodeEnd = () => {
174
+ dragStartIndex = null;
175
+ dragOverIndex = null;
176
+ };
177
+ }
178
+ });
179
+ }