@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.
- package/LICENSE +21 -0
- package/README.md +169 -2
- package/components.d.ts +1 -0
- package/dist/components/FormAutoComplete.vue +100 -0
- package/dist/components/FormCascadeSelect.vue +41 -0
- package/dist/components/FormCheckbox.vue +49 -0
- package/dist/components/FormColorPicker.vue +31 -0
- package/dist/components/FormDatePicker.vue +93 -0
- package/dist/components/FormInputMask.vue +67 -0
- package/dist/components/FormInputNumber.vue +72 -0
- package/dist/components/FormInputOtp.vue +40 -0
- package/dist/components/FormInputText.vue +63 -0
- package/dist/components/FormKitDataDebug.vue +25 -0
- package/dist/components/FormKitDataEdit.vue +123 -0
- package/dist/components/FormKitDataView.vue +56 -0
- package/dist/components/FormKitIcon.vue +23 -0
- package/dist/components/FormKitPrefix.vue +9 -0
- package/dist/components/FormKitSuffix.vue +9 -0
- package/dist/components/FormKnob.vue +48 -0
- package/dist/components/FormListbox.vue +482 -0
- package/dist/components/FormMultiSelect.vue +68 -0
- package/dist/components/FormOutputBoolean.vue +30 -0
- package/dist/components/FormOutputDate.vue +40 -0
- package/dist/components/FormOutputDuration.vue +24 -0
- package/dist/components/FormOutputLink.vue +39 -0
- package/dist/components/FormOutputList.vue +105 -0
- package/dist/components/FormOutputNumber.vue +47 -0
- package/dist/components/FormOutputReference.vue +52 -0
- package/dist/components/FormOutputText.vue +52 -0
- package/dist/components/FormPassword.vue +47 -0
- package/dist/components/FormRadioButton.vue +39 -0
- package/dist/components/FormRating.vue +38 -0
- package/dist/components/FormSelect.vue +69 -0
- package/dist/components/FormSelectButton.vue +42 -0
- package/dist/components/FormSlider.vue +40 -0
- package/dist/components/FormTextarea.vue +35 -0
- package/dist/components/FormToggleButton.vue +40 -0
- package/dist/components/FormToggleSwitch.vue +40 -0
- package/dist/components/FormTreeSelect.vue +46 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/index.js +167 -0
- package/dist/components/index.mjs +48 -0
- package/dist/composables/index.d.ts +9 -0
- package/dist/composables/index.js +61 -0
- package/dist/composables/index.mjs +18 -0
- package/dist/composables/useFormInputs.d.ts +3 -0
- package/dist/composables/useFormInputs.js +62 -0
- package/dist/composables/useFormInputs.mjs +53 -0
- package/dist/composables/useFormKitInput.d.ts +11 -0
- package/dist/composables/useFormKitInput.js +58 -0
- package/dist/composables/useFormKitInput.mjs +45 -0
- package/dist/composables/useFormKitRepeater.d.ts +18 -0
- package/dist/composables/useFormKitRepeater.js +74 -0
- package/dist/composables/useFormKitRepeater.mjs +54 -0
- package/dist/composables/useFormKitSchema.d.ts +36 -0
- package/dist/composables/useFormKitSchema.js +83 -0
- package/dist/composables/useFormKitSchema.mjs +58 -0
- package/dist/composables/useFormKitSection.d.ts +7 -0
- package/dist/composables/useFormKitSection.js +31 -0
- package/dist/composables/useFormKitSection.mjs +19 -0
- package/dist/composables/useInputEditor.d.ts +8 -0
- package/dist/composables/useInputEditor.js +148 -0
- package/dist/composables/useInputEditor.mjs +143 -0
- package/dist/composables/useInputEditorSchema.d.ts +163 -0
- package/dist/composables/useInputEditorSchema.js +313 -0
- package/dist/composables/useInputEditorSchema.mjs +315 -0
- package/dist/composables/useOutputDuration.d.ts +4 -0
- package/dist/composables/useOutputDuration.js +40 -0
- package/dist/composables/useOutputDuration.mjs +35 -0
- package/dist/definitions/index.d.ts +35 -0
- package/dist/definitions/index.js +44 -0
- package/dist/definitions/index.mjs +70 -0
- package/dist/definitions/input.d.ts +23 -0
- package/dist/definitions/input.js +118 -0
- package/dist/definitions/input.mjs +111 -0
- package/dist/definitions/output.d.ts +9 -0
- package/dist/definitions/output.js +46 -0
- package/dist/definitions/output.mjs +136 -0
- package/dist/definitions/repeater.d.ts +2 -0
- package/dist/definitions/repeater.js +179 -0
- package/dist/definitions/repeater.mjs +168 -0
- package/dist/index.d.ts +148 -0
- package/dist/index.js +62 -0
- package/dist/index.mjs +14 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.js +60 -0
- package/dist/plugins/index.mjs +55 -0
- package/dist/sass/formkit-openvue.scss +460 -0
- package/dist/style.css +1 -0
- package/package.json +148 -4
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { useFormKitRepeater } from "./useFormKitRepeater.mjs";
|
|
2
|
+
import { useFormKitSchema } from "./useFormKitSchema.mjs";
|
|
3
|
+
import { useInputEditor } from "./useInputEditor.mjs";
|
|
4
|
+
export function useInputEditorSchema() {
|
|
5
|
+
const { addList, addListGroup } = useFormKitSchema();
|
|
6
|
+
const { addInsertButton, addGroupButtons } = useFormKitRepeater();
|
|
7
|
+
const { formInputNames, formOutputNames } = useInputEditor();
|
|
8
|
+
function formInputOptions(list) {
|
|
9
|
+
return list.map((name) => {
|
|
10
|
+
return { label: name, value: `form${name}` };
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const selectOptions = [
|
|
14
|
+
{ label: "Base", value: "showBasic" },
|
|
15
|
+
{ label: "Display", value: "showDisplay" },
|
|
16
|
+
{ label: "Style", value: "showStyle" },
|
|
17
|
+
{ label: "Validation", value: "showValidation" },
|
|
18
|
+
{ label: "Options", value: "showOptions" },
|
|
19
|
+
{ label: "OpenVue", value: "showOpenVue" }
|
|
20
|
+
];
|
|
21
|
+
const validationOptions = [
|
|
22
|
+
{ label: "Blur", value: "blur" },
|
|
23
|
+
{ label: "Live", value: "live" },
|
|
24
|
+
{ label: "Dirty", value: "dirty" },
|
|
25
|
+
{ label: "Submit", value: "submit" }
|
|
26
|
+
];
|
|
27
|
+
function editorSchema(inputOptions = formInputOptions([...formInputNames, ...formOutputNames])) {
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
$formkit: "formSelect",
|
|
31
|
+
id: "inputSelection",
|
|
32
|
+
name: "_dollar_formkit",
|
|
33
|
+
label: "OpenVue Input",
|
|
34
|
+
value: "formInputText",
|
|
35
|
+
optionLabel: "label",
|
|
36
|
+
optionValue: "value",
|
|
37
|
+
options: inputOptions,
|
|
38
|
+
filter: true,
|
|
39
|
+
key: "schema_inputSelection",
|
|
40
|
+
outerClass: "col-6",
|
|
41
|
+
preserve: true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
$formkit: "formInputText",
|
|
45
|
+
name: "name",
|
|
46
|
+
label: "Field Name",
|
|
47
|
+
validation: "required",
|
|
48
|
+
validationVisibility: "live",
|
|
49
|
+
key: "schema_name",
|
|
50
|
+
outerClass: "col-6",
|
|
51
|
+
preserve: true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
$formkit: "formSelectButton",
|
|
55
|
+
id: "selectButton",
|
|
56
|
+
name: "selectButton",
|
|
57
|
+
options: selectOptions,
|
|
58
|
+
optionLabel: "label",
|
|
59
|
+
optionValue: "value",
|
|
60
|
+
value: "showBasic",
|
|
61
|
+
allowEmpty: false,
|
|
62
|
+
key: "schema_selectButton",
|
|
63
|
+
preserve: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
$formkit: "formInputText",
|
|
67
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
68
|
+
name: "label",
|
|
69
|
+
label: "Input Label",
|
|
70
|
+
key: "schema_label",
|
|
71
|
+
preserve: true
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
$formkit: "formInputText",
|
|
75
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
76
|
+
name: "help",
|
|
77
|
+
label: "Input Help",
|
|
78
|
+
key: "schema_help",
|
|
79
|
+
preserve: true
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
$formkit: "formInputText",
|
|
83
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
84
|
+
name: "value",
|
|
85
|
+
label: "Input Value",
|
|
86
|
+
key: "schema_value",
|
|
87
|
+
outerClass: "col-6",
|
|
88
|
+
preserve: true
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
$formkit: "formInputText",
|
|
92
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
93
|
+
name: "format",
|
|
94
|
+
label: "Value Format",
|
|
95
|
+
key: "schema_format",
|
|
96
|
+
outerClass: "col-6",
|
|
97
|
+
preserve: true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
$formkit: "formInputText",
|
|
101
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
102
|
+
name: "id",
|
|
103
|
+
label: "Input ID",
|
|
104
|
+
key: "schema_id",
|
|
105
|
+
outerClass: "col-6",
|
|
106
|
+
preserve: true
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
$formkit: "formInputText",
|
|
110
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
111
|
+
name: "key",
|
|
112
|
+
label: "Input Key",
|
|
113
|
+
key: "schema_key",
|
|
114
|
+
outerClass: "col-6",
|
|
115
|
+
preserve: true
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
$formkit: "formInputText",
|
|
119
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
120
|
+
name: "tabindex",
|
|
121
|
+
label: "Tab Index",
|
|
122
|
+
key: "schema_tabindex",
|
|
123
|
+
outerClass: "col-6",
|
|
124
|
+
preserve: true
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
$formkit: "formCheckbox",
|
|
128
|
+
if: "$get(selectButton).value === 'showBasic'",
|
|
129
|
+
name: "preserve",
|
|
130
|
+
label: "Preserve",
|
|
131
|
+
key: "schema_preserve",
|
|
132
|
+
value: false,
|
|
133
|
+
suffix: "Input Preserve",
|
|
134
|
+
outerClass: "col-3",
|
|
135
|
+
preserve: true
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
$formkit: "formInputText",
|
|
139
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
140
|
+
name: "class",
|
|
141
|
+
label: "Input StyleClass",
|
|
142
|
+
key: "schema_class",
|
|
143
|
+
outerClass: "col-6",
|
|
144
|
+
preserve: true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
$formkit: "formInputText",
|
|
148
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
149
|
+
name: "style",
|
|
150
|
+
label: "Input Style",
|
|
151
|
+
key: "schema_style",
|
|
152
|
+
outerClass: "col-6",
|
|
153
|
+
preserve: true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
$formkit: "formInputText",
|
|
157
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
158
|
+
name: "if",
|
|
159
|
+
label: "Should Render (if-Expression)",
|
|
160
|
+
key: "schema_if",
|
|
161
|
+
preserve: true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
$formkit: "formInputText",
|
|
165
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
166
|
+
name: "iconPrefix",
|
|
167
|
+
label: "Prefix Icon",
|
|
168
|
+
key: "schema_prefix_icon",
|
|
169
|
+
outerClass: "col-6",
|
|
170
|
+
preserve: true
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
$formkit: "formInputText",
|
|
174
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
175
|
+
name: "prefix",
|
|
176
|
+
label: "Prefix",
|
|
177
|
+
key: "schema_prefix",
|
|
178
|
+
outerClass: "col-6",
|
|
179
|
+
preserve: true
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
$formkit: "formInputText",
|
|
183
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
184
|
+
name: "suffix",
|
|
185
|
+
label: "Suffix",
|
|
186
|
+
key: "schema_suffix",
|
|
187
|
+
outerClass: "col-6",
|
|
188
|
+
preserve: true
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
$formkit: "formInputText",
|
|
192
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
193
|
+
name: "iconSuffix",
|
|
194
|
+
label: "Suffix Icon",
|
|
195
|
+
key: "schema_suffix_icon",
|
|
196
|
+
outerClass: "col-6",
|
|
197
|
+
preserve: true
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
$formkit: "formCheckbox",
|
|
201
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
202
|
+
name: "disabled",
|
|
203
|
+
label: "Input Disabled",
|
|
204
|
+
key: "schema_disabled",
|
|
205
|
+
value: false,
|
|
206
|
+
outerClass: "col-3",
|
|
207
|
+
preserve: true
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
$formkit: "formCheckbox",
|
|
211
|
+
if: "$get(selectButton).value === 'showDisplay'",
|
|
212
|
+
name: "readonly",
|
|
213
|
+
label: "Input Read Only",
|
|
214
|
+
key: "schema_readonly",
|
|
215
|
+
value: false,
|
|
216
|
+
outerClass: "col-3",
|
|
217
|
+
preserve: true
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
$formkit: "formInputText",
|
|
221
|
+
if: "$get(selectButton).value === 'showStyle'",
|
|
222
|
+
name: "outerClass",
|
|
223
|
+
label: "Outer Class",
|
|
224
|
+
key: "schema_outerClass",
|
|
225
|
+
preserve: true
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
$formkit: "formInputText",
|
|
229
|
+
if: "$get(selectButton).value === 'showStyle'",
|
|
230
|
+
name: "wrapperClass",
|
|
231
|
+
label: "Wrapper Class",
|
|
232
|
+
key: "schema_wrapperClass",
|
|
233
|
+
preserve: true
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
$formkit: "formInputText",
|
|
237
|
+
if: "$get(selectButton).value === 'showStyle'",
|
|
238
|
+
name: "innerClass",
|
|
239
|
+
label: "Inner Class",
|
|
240
|
+
key: "schema_innerClass",
|
|
241
|
+
preserve: true
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
$formkit: "formInputText",
|
|
245
|
+
if: "$get(selectButton).value === 'showValidation'",
|
|
246
|
+
name: "validation",
|
|
247
|
+
label: "Field Validation",
|
|
248
|
+
key: "schema_validation",
|
|
249
|
+
outerClass: "col-6",
|
|
250
|
+
preserve: true
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
$formkit: "formSelect",
|
|
254
|
+
if: "$get(selectButton).value === 'showValidation'",
|
|
255
|
+
name: "validation-visibility",
|
|
256
|
+
label: "Field Validation Visibility",
|
|
257
|
+
optionLabel: "label",
|
|
258
|
+
optionValue: "value",
|
|
259
|
+
options: validationOptions,
|
|
260
|
+
key: "schema_validation-visibility",
|
|
261
|
+
outerClass: "col-6",
|
|
262
|
+
preserve: true
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
$formkit: "formInputText",
|
|
266
|
+
if: "$get(selectButton).value === 'showValidation'",
|
|
267
|
+
name: "validation-label",
|
|
268
|
+
label: "Field Validation Label",
|
|
269
|
+
key: "schema_validation-label",
|
|
270
|
+
preserve: true
|
|
271
|
+
},
|
|
272
|
+
addList("options", [
|
|
273
|
+
addInsertButton("Add Option"),
|
|
274
|
+
addListGroup(
|
|
275
|
+
[
|
|
276
|
+
{
|
|
277
|
+
$formkit: "formInputText",
|
|
278
|
+
label: "Label",
|
|
279
|
+
name: "label",
|
|
280
|
+
outerClass: "col-4"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
$formkit: "formInputText",
|
|
284
|
+
label: "Value",
|
|
285
|
+
name: "value",
|
|
286
|
+
outerClass: "col-4"
|
|
287
|
+
},
|
|
288
|
+
addGroupButtons()
|
|
289
|
+
]
|
|
290
|
+
)
|
|
291
|
+
], true, "$get(selectButton).value === 'showOptions'", { key: "schema_options", preserve: true }),
|
|
292
|
+
addList("form", [
|
|
293
|
+
addInsertButton("Add OpenVue Attribute"),
|
|
294
|
+
addListGroup(
|
|
295
|
+
[
|
|
296
|
+
{
|
|
297
|
+
$formkit: "formInputText",
|
|
298
|
+
label: "OpenVue Key",
|
|
299
|
+
name: "form_key",
|
|
300
|
+
outerClass: "col-3"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
$formkit: "formInputText",
|
|
304
|
+
label: "Value",
|
|
305
|
+
name: "form_value",
|
|
306
|
+
outerClass: "col-3"
|
|
307
|
+
},
|
|
308
|
+
addGroupButtons()
|
|
309
|
+
]
|
|
310
|
+
)
|
|
311
|
+
], true, "$get(selectButton).value === 'showOpenVue'", { key: "schema_openvue", preserve: true })
|
|
312
|
+
];
|
|
313
|
+
}
|
|
314
|
+
return { editorSchema, formInputOptions };
|
|
315
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useOutputDuration = useOutputDuration;
|
|
7
|
+
function useOutputDuration() {
|
|
8
|
+
function durationToMinutes(duration) {
|
|
9
|
+
let hours = 0;
|
|
10
|
+
let minutes = 0;
|
|
11
|
+
const lowerDuration = duration.toLowerCase();
|
|
12
|
+
if (lowerDuration.includes(":")) {
|
|
13
|
+
const [h, m] = lowerDuration.split(":").map(part => +(part?.trim() || "0"));
|
|
14
|
+
hours = h ?? 0;
|
|
15
|
+
minutes = m ?? 0;
|
|
16
|
+
} else {
|
|
17
|
+
if (lowerDuration.includes("h")) {
|
|
18
|
+
hours = +(lowerDuration.split("h")[0]?.trim() || "0");
|
|
19
|
+
const remainder = lowerDuration.split("h")[1] || "";
|
|
20
|
+
if (remainder.includes("m")) minutes = +(remainder.split("m")[0]?.trim() || "0");else if (/^\d+$/.test(remainder)) minutes = +remainder;
|
|
21
|
+
} else if (lowerDuration.includes("m")) {
|
|
22
|
+
minutes = +(lowerDuration.split("m")[0]?.trim() || "0");
|
|
23
|
+
} else if (/^\d+$/.test(lowerDuration)) {
|
|
24
|
+
minutes = +lowerDuration;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return hours * 60 + minutes;
|
|
28
|
+
}
|
|
29
|
+
function formattedDuration(duration) {
|
|
30
|
+
const minutes = durationToMinutes(duration);
|
|
31
|
+
const hours = Math.trunc(minutes / 60);
|
|
32
|
+
const remainingMinutes = minutes % 60;
|
|
33
|
+
if (minutes === 0) return "0";
|
|
34
|
+
return `${hours > 0 ? `${hours}h` : ""}${hours > 0 && remainingMinutes > 0 ? " " : ""}${remainingMinutes > 0 ? `${remainingMinutes}m` : ""}`;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
durationToMinutes,
|
|
38
|
+
formattedDuration
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function useOutputDuration() {
|
|
2
|
+
function durationToMinutes(duration) {
|
|
3
|
+
let hours = 0;
|
|
4
|
+
let minutes = 0;
|
|
5
|
+
const lowerDuration = duration.toLowerCase();
|
|
6
|
+
if (lowerDuration.includes(":")) {
|
|
7
|
+
const [h, m] = lowerDuration.split(":").map((part) => +(part?.trim() || "0"));
|
|
8
|
+
hours = h ?? 0;
|
|
9
|
+
minutes = m ?? 0;
|
|
10
|
+
} else {
|
|
11
|
+
if (lowerDuration.includes("h")) {
|
|
12
|
+
hours = +(lowerDuration.split("h")[0]?.trim() || "0");
|
|
13
|
+
const remainder = lowerDuration.split("h")[1] || "";
|
|
14
|
+
if (remainder.includes("m"))
|
|
15
|
+
minutes = +(remainder.split("m")[0]?.trim() || "0");
|
|
16
|
+
else if (/^\d+$/.test(remainder))
|
|
17
|
+
minutes = +remainder;
|
|
18
|
+
} else if (lowerDuration.includes("m")) {
|
|
19
|
+
minutes = +(lowerDuration.split("m")[0]?.trim() || "0");
|
|
20
|
+
} else if (/^\d+$/.test(lowerDuration)) {
|
|
21
|
+
minutes = +lowerDuration;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return hours * 60 + minutes;
|
|
25
|
+
}
|
|
26
|
+
function formattedDuration(duration) {
|
|
27
|
+
const minutes = durationToMinutes(duration);
|
|
28
|
+
const hours = Math.trunc(minutes / 60);
|
|
29
|
+
const remainingMinutes = minutes % 60;
|
|
30
|
+
if (minutes === 0)
|
|
31
|
+
return "0";
|
|
32
|
+
return `${hours > 0 ? `${hours}h` : ""}${hours > 0 && remainingMinutes > 0 ? " " : ""}${remainingMinutes > 0 ? `${remainingMinutes}m` : ""}`;
|
|
33
|
+
}
|
|
34
|
+
return { durationToMinutes, formattedDuration };
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const formInputs: {
|
|
2
|
+
formAutoComplete: import("@formkit/core").FormKitTypeDefinition;
|
|
3
|
+
formInputText: import("@formkit/core").FormKitTypeDefinition;
|
|
4
|
+
formInputNumber: import("@formkit/core").FormKitTypeDefinition;
|
|
5
|
+
formInputMask: import("@formkit/core").FormKitTypeDefinition;
|
|
6
|
+
formPassword: import("@formkit/core").FormKitTypeDefinition;
|
|
7
|
+
formCheckbox: import("@formkit/core").FormKitTypeDefinition;
|
|
8
|
+
formToggleSwitch: import("@formkit/core").FormKitTypeDefinition;
|
|
9
|
+
formTextarea: import("@formkit/core").FormKitTypeDefinition;
|
|
10
|
+
formSelect: import("@formkit/core").FormKitTypeDefinition;
|
|
11
|
+
formMultiSelect: import("@formkit/core").FormKitTypeDefinition;
|
|
12
|
+
formDatePicker: import("@formkit/core").FormKitTypeDefinition;
|
|
13
|
+
formSlider: import("@formkit/core").FormKitTypeDefinition;
|
|
14
|
+
formKnob: import("@formkit/core").FormKitTypeDefinition;
|
|
15
|
+
formRating: import("@formkit/core").FormKitTypeDefinition;
|
|
16
|
+
formRadioButton: import("@formkit/core").FormKitTypeDefinition;
|
|
17
|
+
formColorPicker: import("@formkit/core").FormKitTypeDefinition;
|
|
18
|
+
formToggleButton: import("@formkit/core").FormKitTypeDefinition;
|
|
19
|
+
formListbox: import("@formkit/core").FormKitTypeDefinition;
|
|
20
|
+
formSelectButton: import("@formkit/core").FormKitTypeDefinition;
|
|
21
|
+
formCascadeSelect: import("@formkit/core").FormKitTypeDefinition;
|
|
22
|
+
formTreeSelect: import("@formkit/core").FormKitTypeDefinition;
|
|
23
|
+
formInputOtp: import("@formkit/core").FormKitTypeDefinition;
|
|
24
|
+
formRepeater: import("@formkit/core").FormKitTypeDefinition;
|
|
25
|
+
};
|
|
26
|
+
export declare const formOutputs: {
|
|
27
|
+
formOutputText: import("@formkit/core").FormKitTypeDefinition;
|
|
28
|
+
formOutputLink: import("@formkit/core").FormKitTypeDefinition;
|
|
29
|
+
formOutputReference: import("@formkit/core").FormKitTypeDefinition;
|
|
30
|
+
formOutputNumber: import("@formkit/core").FormKitTypeDefinition;
|
|
31
|
+
formOutputDate: import("@formkit/core").FormKitTypeDefinition;
|
|
32
|
+
formOutputBoolean: import("@formkit/core").FormKitTypeDefinition;
|
|
33
|
+
formOutputDuration: import("@formkit/core").FormKitTypeDefinition;
|
|
34
|
+
formOutputList: import("@formkit/core").FormKitTypeDefinition;
|
|
35
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formOutputs = exports.formInputs = void 0;
|
|
7
|
+
var _input = require("./input");
|
|
8
|
+
var _output = require("./output");
|
|
9
|
+
var _repeater = require("./repeater");
|
|
10
|
+
const formInputs = exports.formInputs = {
|
|
11
|
+
formAutoComplete: _input.formAutoCompleteDefinition,
|
|
12
|
+
formInputText: _input.formInputTextDefinition,
|
|
13
|
+
formInputNumber: _input.formInputNumberDefinition,
|
|
14
|
+
formInputMask: _input.formInputMaskDefinition,
|
|
15
|
+
formPassword: _input.formPasswordDefinition,
|
|
16
|
+
formCheckbox: _input.formCheckboxDefinition,
|
|
17
|
+
formToggleSwitch: _input.formToggleSwitchDefinition,
|
|
18
|
+
formTextarea: _input.formTextareaDefinition,
|
|
19
|
+
formSelect: _input.formSelectDefinition,
|
|
20
|
+
formMultiSelect: _input.formMultiSelectDefinition,
|
|
21
|
+
formDatePicker: _input.formDatePickerDefinition,
|
|
22
|
+
formSlider: _input.formSliderDefinition,
|
|
23
|
+
formKnob: _input.formKnobDefinition,
|
|
24
|
+
formRating: _input.formRatingDefinition,
|
|
25
|
+
formRadioButton: _input.formRadioButtonDefinition,
|
|
26
|
+
formColorPicker: _input.formColorPickerDefinition,
|
|
27
|
+
formToggleButton: _input.formToggleButtonDefinition,
|
|
28
|
+
formListbox: _input.formListboxDefinition,
|
|
29
|
+
formSelectButton: _input.formSelectButtonDefinition,
|
|
30
|
+
formCascadeSelect: _input.formCascadeSelectDefinition,
|
|
31
|
+
formTreeSelect: _input.formTreeSelectDefinition,
|
|
32
|
+
formInputOtp: _input.formInputOtpDefinition,
|
|
33
|
+
formRepeater: _repeater.formRepeaterDefinition
|
|
34
|
+
};
|
|
35
|
+
const formOutputs = exports.formOutputs = {
|
|
36
|
+
formOutputText: _output.formOutputTextDefinition,
|
|
37
|
+
formOutputLink: _output.formOutputLinkDefinition,
|
|
38
|
+
formOutputReference: _output.formOutputReferenceDefinition,
|
|
39
|
+
formOutputNumber: _output.formOutputNumberDefinition,
|
|
40
|
+
formOutputDate: _output.formOutputDateDefinition,
|
|
41
|
+
formOutputBoolean: _output.formOutputBooleanDefinition,
|
|
42
|
+
formOutputDuration: _output.formOutputDurationDefinition,
|
|
43
|
+
formOutputList: _output.formOutputListDefinition
|
|
44
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formAutoCompleteDefinition,
|
|
3
|
+
formCascadeSelectDefinition,
|
|
4
|
+
formCheckboxDefinition,
|
|
5
|
+
formColorPickerDefinition,
|
|
6
|
+
formDatePickerDefinition,
|
|
7
|
+
formInputMaskDefinition,
|
|
8
|
+
formInputNumberDefinition,
|
|
9
|
+
formInputOtpDefinition,
|
|
10
|
+
formInputTextDefinition,
|
|
11
|
+
formKnobDefinition,
|
|
12
|
+
formListboxDefinition,
|
|
13
|
+
formMultiSelectDefinition,
|
|
14
|
+
formPasswordDefinition,
|
|
15
|
+
formRadioButtonDefinition,
|
|
16
|
+
formRatingDefinition,
|
|
17
|
+
formSelectButtonDefinition,
|
|
18
|
+
formSelectDefinition,
|
|
19
|
+
formSliderDefinition,
|
|
20
|
+
formTextareaDefinition,
|
|
21
|
+
formToggleButtonDefinition,
|
|
22
|
+
formToggleSwitchDefinition,
|
|
23
|
+
formTreeSelectDefinition
|
|
24
|
+
} from "./input.mjs";
|
|
25
|
+
import {
|
|
26
|
+
formOutputBooleanDefinition,
|
|
27
|
+
formOutputDateDefinition,
|
|
28
|
+
formOutputDurationDefinition,
|
|
29
|
+
formOutputLinkDefinition,
|
|
30
|
+
formOutputListDefinition,
|
|
31
|
+
formOutputNumberDefinition,
|
|
32
|
+
formOutputReferenceDefinition,
|
|
33
|
+
formOutputTextDefinition
|
|
34
|
+
} from "./output.mjs";
|
|
35
|
+
import { formRepeaterDefinition } from "./repeater.mjs";
|
|
36
|
+
export const formInputs = {
|
|
37
|
+
formAutoComplete: formAutoCompleteDefinition,
|
|
38
|
+
formInputText: formInputTextDefinition,
|
|
39
|
+
formInputNumber: formInputNumberDefinition,
|
|
40
|
+
formInputMask: formInputMaskDefinition,
|
|
41
|
+
formPassword: formPasswordDefinition,
|
|
42
|
+
formCheckbox: formCheckboxDefinition,
|
|
43
|
+
formToggleSwitch: formToggleSwitchDefinition,
|
|
44
|
+
formTextarea: formTextareaDefinition,
|
|
45
|
+
formSelect: formSelectDefinition,
|
|
46
|
+
formMultiSelect: formMultiSelectDefinition,
|
|
47
|
+
formDatePicker: formDatePickerDefinition,
|
|
48
|
+
formSlider: formSliderDefinition,
|
|
49
|
+
formKnob: formKnobDefinition,
|
|
50
|
+
formRating: formRatingDefinition,
|
|
51
|
+
formRadioButton: formRadioButtonDefinition,
|
|
52
|
+
formColorPicker: formColorPickerDefinition,
|
|
53
|
+
formToggleButton: formToggleButtonDefinition,
|
|
54
|
+
formListbox: formListboxDefinition,
|
|
55
|
+
formSelectButton: formSelectButtonDefinition,
|
|
56
|
+
formCascadeSelect: formCascadeSelectDefinition,
|
|
57
|
+
formTreeSelect: formTreeSelectDefinition,
|
|
58
|
+
formInputOtp: formInputOtpDefinition,
|
|
59
|
+
formRepeater: formRepeaterDefinition
|
|
60
|
+
};
|
|
61
|
+
export const formOutputs = {
|
|
62
|
+
formOutputText: formOutputTextDefinition,
|
|
63
|
+
formOutputLink: formOutputLinkDefinition,
|
|
64
|
+
formOutputReference: formOutputReferenceDefinition,
|
|
65
|
+
formOutputNumber: formOutputNumberDefinition,
|
|
66
|
+
formOutputDate: formOutputDateDefinition,
|
|
67
|
+
formOutputBoolean: formOutputBooleanDefinition,
|
|
68
|
+
formOutputDuration: formOutputDurationDefinition,
|
|
69
|
+
formOutputList: formOutputListDefinition
|
|
70
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { FormKitTypeDefinition } from '@formkit/core';
|
|
2
|
+
export declare const formAutoCompleteDefinition: FormKitTypeDefinition;
|
|
3
|
+
export declare const formInputTextDefinition: FormKitTypeDefinition;
|
|
4
|
+
export declare const formInputNumberDefinition: FormKitTypeDefinition;
|
|
5
|
+
export declare const formInputMaskDefinition: FormKitTypeDefinition;
|
|
6
|
+
export declare const formPasswordDefinition: FormKitTypeDefinition;
|
|
7
|
+
export declare const formTextareaDefinition: FormKitTypeDefinition;
|
|
8
|
+
export declare const formCheckboxDefinition: FormKitTypeDefinition;
|
|
9
|
+
export declare const formToggleSwitchDefinition: FormKitTypeDefinition;
|
|
10
|
+
export declare const formInputOtpDefinition: FormKitTypeDefinition;
|
|
11
|
+
export declare const formSelectDefinition: FormKitTypeDefinition;
|
|
12
|
+
export declare const formMultiSelectDefinition: FormKitTypeDefinition;
|
|
13
|
+
export declare const formListboxDefinition: FormKitTypeDefinition;
|
|
14
|
+
export declare const formDatePickerDefinition: FormKitTypeDefinition;
|
|
15
|
+
export declare const formSliderDefinition: FormKitTypeDefinition;
|
|
16
|
+
export declare const formRatingDefinition: FormKitTypeDefinition;
|
|
17
|
+
export declare const formRadioButtonDefinition: FormKitTypeDefinition;
|
|
18
|
+
export declare const formKnobDefinition: FormKitTypeDefinition;
|
|
19
|
+
export declare const formColorPickerDefinition: FormKitTypeDefinition;
|
|
20
|
+
export declare const formToggleButtonDefinition: FormKitTypeDefinition;
|
|
21
|
+
export declare const formSelectButtonDefinition: FormKitTypeDefinition;
|
|
22
|
+
export declare const formCascadeSelectDefinition: FormKitTypeDefinition;
|
|
23
|
+
export declare const formTreeSelectDefinition: FormKitTypeDefinition;
|