@sfxcode/formkit-primevue 3.3.0 → 3.3.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 (164) hide show
  1. package/README.md +13 -138
  2. package/dist/PrimeTreeSelect-Dksx7tL-.js +1881 -0
  3. package/dist/components/index.d.ts +2 -24
  4. package/dist/components/index.js +4 -167
  5. package/dist/components-HJnJ39cU.js +255 -0
  6. package/dist/composables/index.d.ts +2 -9
  7. package/dist/composables/index.js +2 -61
  8. package/dist/composables-CZ6f1QYe.js +820 -0
  9. package/dist/definitions/index.d.ts +37 -32
  10. package/dist/definitions/index.js +4 -42
  11. package/dist/definitions-BHwWaom7.js +1196 -0
  12. package/dist/index-Ch3MtT1C.d.ts +266 -0
  13. package/dist/index-EJ8M51RO.d.ts +917 -0
  14. package/dist/index.d.ts +146 -143
  15. package/dist/index.js +5 -62
  16. package/dist/plugins/index.d.ts +7 -3
  17. package/dist/plugins/index.js +45 -57
  18. package/dist/sass/formkit-primevue.scss +99 -101
  19. package/package.json +32 -117
  20. package/LICENSE +0 -21
  21. package/components.d.ts +0 -1
  22. package/dist/components/FormKitDataDebug.d.vue.ts +0 -24
  23. package/dist/components/FormKitDataDebug.vue +0 -23
  24. package/dist/components/FormKitDataDebug.vue.d.ts +0 -24
  25. package/dist/components/FormKitDataEdit.d.vue.ts +0 -180
  26. package/dist/components/FormKitDataEdit.vue +0 -126
  27. package/dist/components/FormKitDataEdit.vue.d.ts +0 -180
  28. package/dist/components/FormKitDataView.d.vue.ts +0 -73
  29. package/dist/components/FormKitDataView.vue +0 -58
  30. package/dist/components/FormKitDataView.vue.d.ts +0 -73
  31. package/dist/components/FormKitIcon.d.vue.ts +0 -39
  32. package/dist/components/FormKitIcon.vue +0 -25
  33. package/dist/components/FormKitIcon.vue.d.ts +0 -39
  34. package/dist/components/FormKitPrefix.d.vue.ts +0 -7
  35. package/dist/components/FormKitPrefix.vue +0 -11
  36. package/dist/components/FormKitPrefix.vue.d.ts +0 -7
  37. package/dist/components/FormKitSuffix.d.vue.ts +0 -7
  38. package/dist/components/FormKitSuffix.vue +0 -11
  39. package/dist/components/FormKitSuffix.vue.d.ts +0 -7
  40. package/dist/components/PrimeAutoComplete.d.vue.ts +0 -31
  41. package/dist/components/PrimeAutoComplete.vue +0 -140
  42. package/dist/components/PrimeAutoComplete.vue.d.ts +0 -31
  43. package/dist/components/PrimeCascadeSelect.d.vue.ts +0 -28
  44. package/dist/components/PrimeCascadeSelect.vue +0 -62
  45. package/dist/components/PrimeCascadeSelect.vue.d.ts +0 -28
  46. package/dist/components/PrimeCheckbox.d.vue.ts +0 -27
  47. package/dist/components/PrimeCheckbox.vue +0 -71
  48. package/dist/components/PrimeCheckbox.vue.d.ts +0 -27
  49. package/dist/components/PrimeColorPicker.d.vue.ts +0 -24
  50. package/dist/components/PrimeColorPicker.vue +0 -48
  51. package/dist/components/PrimeColorPicker.vue.d.ts +0 -24
  52. package/dist/components/PrimeDatePicker.d.vue.ts +0 -63
  53. package/dist/components/PrimeDatePicker.vue +0 -153
  54. package/dist/components/PrimeDatePicker.vue.d.ts +0 -63
  55. package/dist/components/PrimeInputMask.d.vue.ts +0 -28
  56. package/dist/components/PrimeInputMask.vue +0 -88
  57. package/dist/components/PrimeInputMask.vue.d.ts +0 -28
  58. package/dist/components/PrimeInputNumber.d.vue.ts +0 -36
  59. package/dist/components/PrimeInputNumber.vue +0 -110
  60. package/dist/components/PrimeInputNumber.vue.d.ts +0 -36
  61. package/dist/components/PrimeInputOtp.d.vue.ts +0 -26
  62. package/dist/components/PrimeInputOtp.vue +0 -59
  63. package/dist/components/PrimeInputOtp.vue.d.ts +0 -26
  64. package/dist/components/PrimeInputText.d.vue.ts +0 -24
  65. package/dist/components/PrimeInputText.vue +0 -80
  66. package/dist/components/PrimeInputText.vue.d.ts +0 -24
  67. package/dist/components/PrimeKnob.d.vue.ts +0 -31
  68. package/dist/components/PrimeKnob.vue +0 -75
  69. package/dist/components/PrimeKnob.vue.d.ts +0 -31
  70. package/dist/components/PrimeListbox.d.vue.ts +0 -42
  71. package/dist/components/PrimeListbox.vue +0 -86
  72. package/dist/components/PrimeListbox.vue.d.ts +0 -42
  73. package/dist/components/PrimeMultiSelect.d.vue.ts +0 -53
  74. package/dist/components/PrimeMultiSelect.vue +0 -115
  75. package/dist/components/PrimeMultiSelect.vue.d.ts +0 -53
  76. package/dist/components/PrimeOutputBoolean.d.vue.ts +0 -16
  77. package/dist/components/PrimeOutputBoolean.vue +0 -41
  78. package/dist/components/PrimeOutputBoolean.vue.d.ts +0 -16
  79. package/dist/components/PrimeOutputDate.d.vue.ts +0 -16
  80. package/dist/components/PrimeOutputDate.vue +0 -51
  81. package/dist/components/PrimeOutputDate.vue.d.ts +0 -16
  82. package/dist/components/PrimeOutputDuration.d.vue.ts +0 -16
  83. package/dist/components/PrimeOutputDuration.vue +0 -32
  84. package/dist/components/PrimeOutputDuration.vue.d.ts +0 -16
  85. package/dist/components/PrimeOutputLink.d.vue.ts +0 -16
  86. package/dist/components/PrimeOutputLink.vue +0 -50
  87. package/dist/components/PrimeOutputLink.vue.d.ts +0 -16
  88. package/dist/components/PrimeOutputList.d.vue.ts +0 -19
  89. package/dist/components/PrimeOutputList.vue +0 -75
  90. package/dist/components/PrimeOutputList.vue.d.ts +0 -19
  91. package/dist/components/PrimeOutputNumber.d.vue.ts +0 -16
  92. package/dist/components/PrimeOutputNumber.vue +0 -59
  93. package/dist/components/PrimeOutputNumber.vue.d.ts +0 -16
  94. package/dist/components/PrimeOutputReference.d.vue.ts +0 -16
  95. package/dist/components/PrimeOutputReference.vue +0 -62
  96. package/dist/components/PrimeOutputReference.vue.d.ts +0 -16
  97. package/dist/components/PrimeOutputText.d.vue.ts +0 -22
  98. package/dist/components/PrimeOutputText.vue +0 -72
  99. package/dist/components/PrimeOutputText.vue.d.ts +0 -22
  100. package/dist/components/PrimePassword.d.vue.ts +0 -33
  101. package/dist/components/PrimePassword.vue +0 -73
  102. package/dist/components/PrimePassword.vue.d.ts +0 -33
  103. package/dist/components/PrimeRadioButton.d.vue.ts +0 -28
  104. package/dist/components/PrimeRadioButton.vue +0 -58
  105. package/dist/components/PrimeRadioButton.vue.d.ts +0 -28
  106. package/dist/components/PrimeRating.d.vue.ts +0 -24
  107. package/dist/components/PrimeRating.vue +0 -55
  108. package/dist/components/PrimeRating.vue.d.ts +0 -24
  109. package/dist/components/PrimeSelect.d.vue.ts +0 -50
  110. package/dist/components/PrimeSelect.vue +0 -113
  111. package/dist/components/PrimeSelect.vue.d.ts +0 -50
  112. package/dist/components/PrimeSelectButton.d.vue.ts +0 -28
  113. package/dist/components/PrimeSelectButton.vue +0 -64
  114. package/dist/components/PrimeSelectButton.vue.d.ts +0 -28
  115. package/dist/components/PrimeSlider.d.vue.ts +0 -26
  116. package/dist/components/PrimeSlider.vue +0 -60
  117. package/dist/components/PrimeSlider.vue.d.ts +0 -26
  118. package/dist/components/PrimeTextarea.d.vue.ts +0 -25
  119. package/dist/components/PrimeTextarea.vue +0 -53
  120. package/dist/components/PrimeTextarea.vue.d.ts +0 -25
  121. package/dist/components/PrimeToggleButton.d.vue.ts +0 -26
  122. package/dist/components/PrimeToggleButton.vue +0 -60
  123. package/dist/components/PrimeToggleButton.vue.d.ts +0 -26
  124. package/dist/components/PrimeToggleSwitch.d.vue.ts +0 -23
  125. package/dist/components/PrimeToggleSwitch.vue +0 -57
  126. package/dist/components/PrimeToggleSwitch.vue.d.ts +0 -23
  127. package/dist/components/PrimeTreeSelect.d.vue.ts +0 -32
  128. package/dist/components/PrimeTreeSelect.vue +0 -71
  129. package/dist/components/PrimeTreeSelect.vue.d.ts +0 -32
  130. package/dist/components/index.mjs +0 -48
  131. package/dist/composables/index.mjs +0 -18
  132. package/dist/composables/useFormKitInput.d.ts +0 -11
  133. package/dist/composables/useFormKitInput.js +0 -58
  134. package/dist/composables/useFormKitInput.mjs +0 -45
  135. package/dist/composables/useFormKitRepeater.d.ts +0 -15
  136. package/dist/composables/useFormKitRepeater.js +0 -74
  137. package/dist/composables/useFormKitRepeater.mjs +0 -54
  138. package/dist/composables/useFormKitSchema.d.ts +0 -36
  139. package/dist/composables/useFormKitSchema.js +0 -83
  140. package/dist/composables/useFormKitSchema.mjs +0 -58
  141. package/dist/composables/useFormKitSection.d.ts +0 -7
  142. package/dist/composables/useFormKitSection.js +0 -31
  143. package/dist/composables/useFormKitSection.mjs +0 -19
  144. package/dist/composables/useInputEditor.d.ts +0 -8
  145. package/dist/composables/useInputEditor.js +0 -148
  146. package/dist/composables/useInputEditor.mjs +0 -143
  147. package/dist/composables/useInputEditorSchema.d.ts +0 -163
  148. package/dist/composables/useInputEditorSchema.js +0 -313
  149. package/dist/composables/useInputEditorSchema.mjs +0 -315
  150. package/dist/composables/useOutputDuration.d.ts +0 -4
  151. package/dist/composables/useOutputDuration.js +0 -40
  152. package/dist/composables/useOutputDuration.mjs +0 -35
  153. package/dist/composables/usePrimeInputs.d.ts +0 -3
  154. package/dist/composables/usePrimeInputs.js +0 -62
  155. package/dist/composables/usePrimeInputs.mjs +0 -53
  156. package/dist/definitions/index.mjs +0 -68
  157. package/dist/definitions/input.d.ts +0 -47
  158. package/dist/definitions/input.js +0 -142
  159. package/dist/definitions/input.mjs +0 -135
  160. package/dist/definitions/output.d.ts +0 -9
  161. package/dist/definitions/output.js +0 -46
  162. package/dist/definitions/output.mjs +0 -39
  163. package/dist/index.mjs +0 -14
  164. package/dist/plugins/index.mjs +0 -55
@@ -1,313 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useInputEditorSchema = useInputEditorSchema;
7
- var _useFormKitRepeater = require("./useFormKitRepeater");
8
- var _useFormKitSchema = require("./useFormKitSchema");
9
- var _useInputEditor = require("./useInputEditor");
10
- function useInputEditorSchema() {
11
- const {
12
- addList,
13
- addListGroup
14
- } = (0, _useFormKitSchema.useFormKitSchema)();
15
- const {
16
- addInsertButton,
17
- addGroupButtons
18
- } = (0, _useFormKitRepeater.useFormKitRepeater)();
19
- const {
20
- primeInputNames,
21
- primeOutputNames
22
- } = (0, _useInputEditor.useInputEditor)();
23
- function primeInputOptions(list) {
24
- return list.map(name => {
25
- return {
26
- label: name,
27
- value: `prime${name}`
28
- };
29
- });
30
- }
31
- const selectOptions = [{
32
- label: "Base",
33
- value: "showBasic"
34
- }, {
35
- label: "Display",
36
- value: "showDisplay"
37
- }, {
38
- label: "Style",
39
- value: "showStyle"
40
- }, {
41
- label: "Validation",
42
- value: "showValidation"
43
- }, {
44
- label: "Options",
45
- value: "showOptions"
46
- }, {
47
- label: "Prime",
48
- value: "showPrime"
49
- }];
50
- const validationOptions = [{
51
- label: "Blur",
52
- value: "blur"
53
- }, {
54
- label: "Live",
55
- value: "live"
56
- }, {
57
- label: "Dirty",
58
- value: "dirty"
59
- }, {
60
- label: "Submit",
61
- value: "submit"
62
- }];
63
- function editorSchema(inputOptions = primeInputOptions([...primeInputNames, ...primeOutputNames])) {
64
- return [{
65
- $formkit: "primeSelect",
66
- id: "inputSelection",
67
- name: "_dollar_formkit",
68
- label: "Prime Input",
69
- value: "primeInputText",
70
- optionLabel: "label",
71
- optionValue: "value",
72
- options: inputOptions,
73
- filter: true,
74
- key: "schema_inputSelection",
75
- outerClass: "col-6",
76
- preserve: true
77
- }, {
78
- $formkit: "primeInputText",
79
- name: "name",
80
- label: "Field Name",
81
- validation: "required",
82
- validationVisibility: "live",
83
- key: "schema_name",
84
- outerClass: "col-6",
85
- preserve: true
86
- }, {
87
- $formkit: "primeSelectButton",
88
- id: "selectButton",
89
- name: "selectButton",
90
- options: selectOptions,
91
- optionLabel: "label",
92
- optionValue: "value",
93
- value: "showBasic",
94
- allowEmpty: false,
95
- key: "schema_selectButton",
96
- preserve: true
97
- }, {
98
- $formkit: "primeInputText",
99
- if: "$get(selectButton).value === 'showBasic'",
100
- name: "label",
101
- label: "Input Label",
102
- key: "schema_label",
103
- preserve: true
104
- }, {
105
- $formkit: "primeInputText",
106
- if: "$get(selectButton).value === 'showBasic'",
107
- name: "help",
108
- label: "Input Help",
109
- key: "schema_help",
110
- preserve: true
111
- }, {
112
- $formkit: "primeInputText",
113
- if: "$get(selectButton).value === 'showBasic'",
114
- name: "value",
115
- label: "Input Value",
116
- key: "schema_value",
117
- outerClass: "col-6",
118
- preserve: true
119
- }, {
120
- $formkit: "primeInputText",
121
- if: "$get(selectButton).value === 'showBasic'",
122
- name: "format",
123
- label: "Value Format",
124
- key: "schema_format",
125
- outerClass: "col-6",
126
- preserve: true
127
- }, {
128
- $formkit: "primeInputText",
129
- if: "$get(selectButton).value === 'showBasic'",
130
- name: "id",
131
- label: "Input ID",
132
- key: "schema_id",
133
- outerClass: "col-6",
134
- preserve: true
135
- }, {
136
- $formkit: "primeInputText",
137
- if: "$get(selectButton).value === 'showBasic'",
138
- name: "key",
139
- label: "Input Key",
140
- key: "schema_key",
141
- outerClass: "col-6",
142
- preserve: true
143
- }, {
144
- $formkit: "primeInputText",
145
- if: "$get(selectButton).value === 'showBasic'",
146
- name: "tabindex",
147
- label: "Tab Index",
148
- key: "schema_tabindex",
149
- outerClass: "col-6",
150
- preserve: true
151
- }, {
152
- $formkit: "primeCheckbox",
153
- if: "$get(selectButton).value === 'showBasic'",
154
- name: "preserve",
155
- label: "Preserve",
156
- key: "schema_preserve",
157
- value: false,
158
- suffix: "Input Preserve",
159
- outerClass: "col-3",
160
- preserve: true
161
- }, {
162
- $formkit: "primeInputText",
163
- if: "$get(selectButton).value === 'showDisplay'",
164
- name: "class",
165
- label: "Input StyleClass",
166
- key: "schema_class",
167
- outerClass: "col-6",
168
- preserve: true
169
- }, {
170
- $formkit: "primeInputText",
171
- if: "$get(selectButton).value === 'showDisplay'",
172
- name: "style",
173
- label: "Input Style",
174
- key: "schema_style",
175
- outerClass: "col-6",
176
- preserve: true
177
- }, {
178
- $formkit: "primeInputText",
179
- if: "$get(selectButton).value === 'showDisplay'",
180
- name: "if",
181
- label: "Should Render (if-Expression)",
182
- key: "schema_if",
183
- preserve: true
184
- }, {
185
- $formkit: "primeInputText",
186
- if: "$get(selectButton).value === 'showDisplay'",
187
- name: "iconPrefix",
188
- label: "Prefix Icon",
189
- key: "schema_prefix_icon",
190
- outerClass: "col-6",
191
- preserve: true
192
- }, {
193
- $formkit: "primeInputText",
194
- if: "$get(selectButton).value === 'showDisplay'",
195
- name: "prefix",
196
- label: "Prefix",
197
- key: "schema_prefix",
198
- outerClass: "col-6",
199
- preserve: true
200
- }, {
201
- $formkit: "primeInputText",
202
- if: "$get(selectButton).value === 'showDisplay'",
203
- name: "suffix",
204
- label: "Suffix",
205
- key: "schema_suffix",
206
- outerClass: "col-6",
207
- preserve: true
208
- }, {
209
- $formkit: "primeInputText",
210
- if: "$get(selectButton).value === 'showDisplay'",
211
- name: "iconSuffix",
212
- label: "Suffix Icon",
213
- key: "schema_suffix_icon",
214
- outerClass: "col-6",
215
- preserve: true
216
- }, {
217
- $formkit: "primeCheckbox",
218
- if: "$get(selectButton).value === 'showDisplay'",
219
- name: "disabled",
220
- label: "Input Disabled",
221
- key: "schema_disabled",
222
- value: false,
223
- outerClass: "col-3",
224
- preserve: true
225
- }, {
226
- $formkit: "primeCheckbox",
227
- if: "$get(selectButton).value === 'showDisplay'",
228
- name: "readonly",
229
- label: "Input Read Only",
230
- key: "schema_readonly",
231
- value: false,
232
- outerClass: "col-3",
233
- preserve: true
234
- }, {
235
- $formkit: "primeInputText",
236
- if: "$get(selectButton).value === 'showStyle'",
237
- name: "outerClass",
238
- label: "Outer Class",
239
- key: "schema_outerClass",
240
- preserve: true
241
- }, {
242
- $formkit: "primeInputText",
243
- if: "$get(selectButton).value === 'showStyle'",
244
- name: "wrapperClass",
245
- label: "Wrapper Class",
246
- key: "schema_wrapperClass",
247
- preserve: true
248
- }, {
249
- $formkit: "primeInputText",
250
- if: "$get(selectButton).value === 'showStyle'",
251
- name: "innerClass",
252
- label: "Inner Class",
253
- key: "schema_innerClass",
254
- preserve: true
255
- }, {
256
- $formkit: "primeInputText",
257
- if: "$get(selectButton).value === 'showValidation'",
258
- name: "validation",
259
- label: "Field Validation",
260
- key: "schema_validation",
261
- outerClass: "col-6",
262
- preserve: true
263
- }, {
264
- $formkit: "primeSelect",
265
- if: "$get(selectButton).value === 'showValidation'",
266
- name: "validation-visibility",
267
- label: "Field Validation Visibility",
268
- optionLabel: "label",
269
- optionValue: "value",
270
- options: validationOptions,
271
- key: "schema_validation-visibility",
272
- outerClass: "col-6",
273
- preserve: true
274
- }, {
275
- $formkit: "primeInputText",
276
- if: "$get(selectButton).value === 'showValidation'",
277
- name: "validation-label",
278
- label: "Field Validation Label",
279
- key: "schema_validation-label",
280
- preserve: true
281
- }, addList("options", [addInsertButton("Add Option"), addListGroup([{
282
- $formkit: "primeInputText",
283
- label: "Label",
284
- name: "label",
285
- outerClass: "col-4"
286
- }, {
287
- $formkit: "primeInputText",
288
- label: "Value",
289
- name: "value",
290
- outerClass: "col-4"
291
- }, addGroupButtons()])], true, "$get(selectButton).value === 'showOptions'", {
292
- key: "schema_options",
293
- preserve: true
294
- }), addList("prime", [addInsertButton("Add PrimeVue Attribute"), addListGroup([{
295
- $formkit: "primeInputText",
296
- label: "PrimeVue Key",
297
- name: "prime_key",
298
- outerClass: "col-3"
299
- }, {
300
- $formkit: "primeInputText",
301
- label: "Value",
302
- name: "prime_value",
303
- outerClass: "col-3"
304
- }, addGroupButtons()])], true, "$get(selectButton).value === 'showPrime'", {
305
- key: "schema_prime",
306
- preserve: true
307
- })];
308
- }
309
- return {
310
- editorSchema,
311
- primeInputOptions
312
- };
313
- }
@@ -1,315 +0,0 @@
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 { primeInputNames, primeOutputNames } = useInputEditor();
8
- function primeInputOptions(list) {
9
- return list.map((name) => {
10
- return { label: name, value: `prime${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: "Prime", value: "showPrime" }
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 = primeInputOptions([...primeInputNames, ...primeOutputNames])) {
28
- return [
29
- {
30
- $formkit: "primeSelect",
31
- id: "inputSelection",
32
- name: "_dollar_formkit",
33
- label: "Prime Input",
34
- value: "primeInputText",
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: "primeInputText",
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: "primeSelectButton",
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: "primeInputText",
67
- if: "$get(selectButton).value === 'showBasic'",
68
- name: "label",
69
- label: "Input Label",
70
- key: "schema_label",
71
- preserve: true
72
- },
73
- {
74
- $formkit: "primeInputText",
75
- if: "$get(selectButton).value === 'showBasic'",
76
- name: "help",
77
- label: "Input Help",
78
- key: "schema_help",
79
- preserve: true
80
- },
81
- {
82
- $formkit: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeCheckbox",
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: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeInputText",
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: "primeCheckbox",
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: "primeCheckbox",
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: "primeInputText",
221
- if: "$get(selectButton).value === 'showStyle'",
222
- name: "outerClass",
223
- label: "Outer Class",
224
- key: "schema_outerClass",
225
- preserve: true
226
- },
227
- {
228
- $formkit: "primeInputText",
229
- if: "$get(selectButton).value === 'showStyle'",
230
- name: "wrapperClass",
231
- label: "Wrapper Class",
232
- key: "schema_wrapperClass",
233
- preserve: true
234
- },
235
- {
236
- $formkit: "primeInputText",
237
- if: "$get(selectButton).value === 'showStyle'",
238
- name: "innerClass",
239
- label: "Inner Class",
240
- key: "schema_innerClass",
241
- preserve: true
242
- },
243
- {
244
- $formkit: "primeInputText",
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: "primeSelect",
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: "primeInputText",
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: "primeInputText",
278
- label: "Label",
279
- name: "label",
280
- outerClass: "col-4"
281
- },
282
- {
283
- $formkit: "primeInputText",
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("prime", [
293
- addInsertButton("Add PrimeVue Attribute"),
294
- addListGroup(
295
- [
296
- {
297
- $formkit: "primeInputText",
298
- label: "PrimeVue Key",
299
- name: "prime_key",
300
- outerClass: "col-3"
301
- },
302
- {
303
- $formkit: "primeInputText",
304
- label: "Value",
305
- name: "prime_value",
306
- outerClass: "col-3"
307
- },
308
- addGroupButtons()
309
- ]
310
- )
311
- ], true, "$get(selectButton).value === 'showPrime'", { key: "schema_prime", preserve: true })
312
- ];
313
- }
314
- return { editorSchema, primeInputOptions };
315
- }
@@ -1,4 +0,0 @@
1
- export declare function useOutputDuration(): {
2
- durationToMinutes: (duration: string) => number;
3
- formattedDuration: (duration: string) => string;
4
- };
@@ -1,40 +0,0 @@
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
- }