@ramathibodi/nuxt-commons 0.1.73 → 4.0.0

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 (260) hide show
  1. package/README.md +81 -55
  2. package/dist/module.json +4 -4
  3. package/dist/module.mjs +5 -4
  4. package/dist/runtime/bridges/authentication.d.ts +21 -0
  5. package/dist/runtime/bridges/authentication.js +20 -0
  6. package/dist/runtime/bridges/graphql.d.ts +17 -0
  7. package/dist/runtime/bridges/graphql.js +45 -0
  8. package/dist/runtime/components/Alert.d.vue.ts +3 -0
  9. package/dist/runtime/components/Alert.vue +17 -22
  10. package/dist/runtime/components/Alert.vue.d.ts +3 -0
  11. package/dist/runtime/components/BarcodeReader.d.vue.ts +9 -0
  12. package/dist/runtime/components/BarcodeReader.vue +56 -73
  13. package/dist/runtime/components/BarcodeReader.vue.d.ts +9 -0
  14. package/dist/runtime/components/ExportCSV.d.vue.ts +55 -0
  15. package/dist/runtime/components/ExportCSV.vue +39 -68
  16. package/dist/runtime/components/ExportCSV.vue.d.ts +55 -0
  17. package/dist/runtime/components/FileBtn.d.vue.ts +53 -0
  18. package/dist/runtime/components/FileBtn.vue +23 -38
  19. package/dist/runtime/components/FileBtn.vue.d.ts +53 -0
  20. package/dist/runtime/components/ImportCSV.d.vue.ts +52 -0
  21. package/dist/runtime/components/ImportCSV.vue +60 -99
  22. package/dist/runtime/components/ImportCSV.vue.d.ts +52 -0
  23. package/dist/runtime/components/MrzReader.d.vue.ts +19 -0
  24. package/dist/runtime/components/MrzReader.vue +128 -0
  25. package/dist/runtime/components/MrzReader.vue.d.ts +19 -0
  26. package/dist/runtime/components/SplitterPanel.d.vue.ts +15 -0
  27. package/dist/runtime/components/SplitterPanel.vue +18 -27
  28. package/dist/runtime/components/SplitterPanel.vue.d.ts +15 -0
  29. package/dist/runtime/components/TabsGroup.d.vue.ts +19 -0
  30. package/dist/runtime/components/TabsGroup.vue +8 -12
  31. package/dist/runtime/components/TabsGroup.vue.d.ts +19 -0
  32. package/dist/runtime/components/TextBarcode.d.vue.ts +12 -0
  33. package/dist/runtime/components/TextBarcode.vue +22 -33
  34. package/dist/runtime/components/TextBarcode.vue.d.ts +12 -0
  35. package/dist/runtime/components/device/IdCardButton.d.vue.ts +57 -0
  36. package/dist/runtime/components/device/IdCardButton.vue +30 -55
  37. package/dist/runtime/components/device/IdCardButton.vue.d.ts +57 -0
  38. package/dist/runtime/components/device/IdCardWebSocket.d.vue.ts +55 -0
  39. package/dist/runtime/components/device/IdCardWebSocket.vue +104 -153
  40. package/dist/runtime/components/device/IdCardWebSocket.vue.d.ts +55 -0
  41. package/dist/runtime/components/device/Scanner.d.vue.ts +66 -0
  42. package/dist/runtime/components/device/Scanner.vue +97 -166
  43. package/dist/runtime/components/device/Scanner.vue.d.ts +66 -0
  44. package/dist/runtime/components/dialog/Confirm.d.vue.ts +37 -0
  45. package/dist/runtime/components/dialog/Confirm.vue +30 -47
  46. package/dist/runtime/components/dialog/Confirm.vue.d.ts +37 -0
  47. package/dist/runtime/components/dialog/Host.d.vue.ts +9 -0
  48. package/dist/runtime/components/dialog/Host.vue +34 -53
  49. package/dist/runtime/components/dialog/Host.vue.d.ts +9 -0
  50. package/dist/runtime/components/dialog/Index.d.vue.ts +24 -0
  51. package/dist/runtime/components/dialog/Index.vue +20 -28
  52. package/dist/runtime/components/dialog/Index.vue.d.ts +24 -0
  53. package/dist/runtime/components/dialog/Loading.d.vue.ts +21 -0
  54. package/dist/runtime/components/dialog/Loading.vue +12 -17
  55. package/dist/runtime/components/dialog/Loading.vue.d.ts +21 -0
  56. package/dist/runtime/components/dialog/default/Confirm.d.vue.ts +40 -0
  57. package/dist/runtime/components/dialog/default/Confirm.vue +29 -50
  58. package/dist/runtime/components/dialog/default/Confirm.vue.d.ts +40 -0
  59. package/dist/runtime/components/dialog/default/Loading.d.vue.ts +23 -0
  60. package/dist/runtime/components/dialog/default/Loading.vue +12 -17
  61. package/dist/runtime/components/dialog/default/Loading.vue.d.ts +23 -0
  62. package/dist/runtime/components/dialog/default/Notify.d.vue.ts +23 -0
  63. package/dist/runtime/components/dialog/default/Notify.vue +19 -36
  64. package/dist/runtime/components/dialog/default/Notify.vue.d.ts +23 -0
  65. package/dist/runtime/components/dialog/default/Printing.d.vue.ts +21 -0
  66. package/dist/runtime/components/dialog/default/Printing.vue +13 -17
  67. package/dist/runtime/components/dialog/default/Printing.vue.d.ts +21 -0
  68. package/dist/runtime/components/dialog/default/VerifyUser.d.vue.ts +29 -0
  69. package/dist/runtime/components/dialog/default/VerifyUser.vue +44 -70
  70. package/dist/runtime/components/dialog/default/VerifyUser.vue.d.ts +29 -0
  71. package/dist/runtime/components/document/Form.d.vue.ts +9 -0
  72. package/dist/runtime/components/document/Form.vue +27 -34
  73. package/dist/runtime/components/document/Form.vue.d.ts +9 -0
  74. package/dist/runtime/components/document/TemplateBuilder.d.vue.ts +24 -0
  75. package/dist/runtime/components/document/TemplateBuilder.vue +154 -182
  76. package/dist/runtime/components/document/TemplateBuilder.vue.d.ts +24 -0
  77. package/dist/runtime/components/form/ActionPad.d.vue.ts +114 -0
  78. package/dist/runtime/components/form/ActionPad.vue +48 -73
  79. package/dist/runtime/components/form/ActionPad.vue.d.ts +114 -0
  80. package/dist/runtime/components/form/Birthdate.d.vue.ts +38 -0
  81. package/dist/runtime/components/form/Birthdate.vue +44 -64
  82. package/dist/runtime/components/form/Birthdate.vue.d.ts +38 -0
  83. package/dist/runtime/components/form/CheckboxGroup.d.vue.ts +41 -0
  84. package/dist/runtime/components/form/CheckboxGroup.vue +34 -52
  85. package/dist/runtime/components/form/CheckboxGroup.vue.d.ts +41 -0
  86. package/dist/runtime/components/form/CodeEditor.d.vue.ts +25 -0
  87. package/dist/runtime/components/form/CodeEditor.vue +18 -28
  88. package/dist/runtime/components/form/CodeEditor.vue.d.ts +25 -0
  89. package/dist/runtime/components/form/Date.d.vue.ts +86 -0
  90. package/dist/runtime/components/form/Date.vue +109 -150
  91. package/dist/runtime/components/form/Date.vue.d.ts +86 -0
  92. package/dist/runtime/components/form/DateTime.d.vue.ts +36 -0
  93. package/dist/runtime/components/form/DateTime.vue +94 -131
  94. package/dist/runtime/components/form/DateTime.vue.d.ts +36 -0
  95. package/dist/runtime/components/form/Dialog.d.vue.ts +69 -0
  96. package/dist/runtime/components/form/Dialog.vue +60 -84
  97. package/dist/runtime/components/form/Dialog.vue.d.ts +69 -0
  98. package/dist/runtime/components/form/EditPad.d.vue.ts +113 -0
  99. package/dist/runtime/components/form/EditPad.vue +49 -73
  100. package/dist/runtime/components/form/EditPad.vue.d.ts +113 -0
  101. package/dist/runtime/components/form/File.d.vue.ts +65 -0
  102. package/dist/runtime/components/form/File.vue +112 -174
  103. package/dist/runtime/components/form/File.vue.d.ts +65 -0
  104. package/dist/runtime/components/form/Hidden.d.vue.ts +12 -0
  105. package/dist/runtime/components/form/Hidden.vue +17 -22
  106. package/dist/runtime/components/form/Hidden.vue.d.ts +12 -0
  107. package/dist/runtime/components/form/Iterator.d.vue.ts +279 -0
  108. package/dist/runtime/components/form/Iterator.vue +162 -240
  109. package/dist/runtime/components/form/Iterator.vue.d.ts +279 -0
  110. package/dist/runtime/components/form/Login.d.vue.ts +32 -0
  111. package/dist/runtime/components/form/Login.vue +23 -43
  112. package/dist/runtime/components/form/Login.vue.d.ts +32 -0
  113. package/dist/runtime/components/form/Pad.d.vue.ts +674 -0
  114. package/dist/runtime/components/form/Pad.vue +166 -253
  115. package/dist/runtime/components/form/Pad.vue.d.ts +674 -0
  116. package/dist/runtime/components/form/SignPad.d.vue.ts +62 -0
  117. package/dist/runtime/components/form/SignPad.vue +80 -118
  118. package/dist/runtime/components/form/SignPad.vue.d.ts +62 -0
  119. package/dist/runtime/components/form/System.d.vue.ts +34 -0
  120. package/dist/runtime/components/form/System.vue +18 -24
  121. package/dist/runtime/components/form/System.vue.d.ts +34 -0
  122. package/dist/runtime/components/form/Table.d.vue.ts +221 -0
  123. package/dist/runtime/components/form/Table.vue +123 -170
  124. package/dist/runtime/components/form/Table.vue.d.ts +221 -0
  125. package/dist/runtime/components/form/TableData.d.vue.ts +102 -0
  126. package/dist/runtime/components/form/TableData.vue +109 -127
  127. package/dist/runtime/components/form/TableData.vue.d.ts +102 -0
  128. package/dist/runtime/components/form/Time.d.vue.ts +49 -0
  129. package/dist/runtime/components/form/Time.vue +64 -87
  130. package/dist/runtime/components/form/Time.vue.d.ts +49 -0
  131. package/dist/runtime/components/form/images/Capture.d.vue.ts +96 -0
  132. package/dist/runtime/components/form/images/Capture.vue +104 -139
  133. package/dist/runtime/components/form/images/Capture.vue.d.ts +96 -0
  134. package/dist/runtime/components/form/images/Edit.d.vue.ts +29 -0
  135. package/dist/runtime/components/form/images/Edit.vue +57 -69
  136. package/dist/runtime/components/form/images/Edit.vue.d.ts +29 -0
  137. package/dist/runtime/components/form/images/Field.d.vue.ts +27 -0
  138. package/dist/runtime/components/form/images/Field.vue +136 -194
  139. package/dist/runtime/components/form/images/Field.vue.d.ts +27 -0
  140. package/dist/runtime/components/form/images/Pad.d.vue.ts +13 -0
  141. package/dist/runtime/components/form/images/Pad.vue +23 -28
  142. package/dist/runtime/components/form/images/Pad.vue.d.ts +13 -0
  143. package/dist/runtime/components/label/Date.d.vue.ts +13 -0
  144. package/dist/runtime/components/label/Date.vue +13 -21
  145. package/dist/runtime/components/label/Date.vue.d.ts +13 -0
  146. package/dist/runtime/components/label/DateAgo.d.vue.ts +20 -0
  147. package/dist/runtime/components/label/DateAgo.vue +43 -67
  148. package/dist/runtime/components/label/DateAgo.vue.d.ts +20 -0
  149. package/dist/runtime/components/label/DateCount.d.vue.ts +22 -0
  150. package/dist/runtime/components/label/DateCount.vue +58 -97
  151. package/dist/runtime/components/label/DateCount.vue.d.ts +22 -0
  152. package/dist/runtime/components/label/Field.d.vue.ts +38 -0
  153. package/dist/runtime/components/label/Field.vue +18 -32
  154. package/dist/runtime/components/label/Field.vue.d.ts +38 -0
  155. package/dist/runtime/components/label/FormatMoney.d.vue.ts +12 -0
  156. package/dist/runtime/components/label/FormatMoney.vue +12 -20
  157. package/dist/runtime/components/label/FormatMoney.vue.d.ts +12 -0
  158. package/dist/runtime/components/label/Mask.d.vue.ts +10 -0
  159. package/dist/runtime/components/label/Mask.vue +21 -30
  160. package/dist/runtime/components/label/Mask.vue.d.ts +10 -0
  161. package/dist/runtime/components/label/Object.d.vue.ts +8 -0
  162. package/dist/runtime/components/label/Object.vue +10 -12
  163. package/dist/runtime/components/label/Object.vue.d.ts +8 -0
  164. package/dist/runtime/components/master/Autocomplete.d.vue.ts +70 -0
  165. package/dist/runtime/components/master/Autocomplete.vue +25 -26
  166. package/dist/runtime/components/master/Autocomplete.vue.d.ts +70 -0
  167. package/dist/runtime/components/master/Combobox.d.vue.ts +70 -0
  168. package/dist/runtime/components/master/Combobox.vue +26 -27
  169. package/dist/runtime/components/master/Combobox.vue.d.ts +70 -0
  170. package/dist/runtime/components/master/RadioGroup.d.vue.ts +51 -0
  171. package/dist/runtime/components/master/RadioGroup.vue +44 -47
  172. package/dist/runtime/components/master/RadioGroup.vue.d.ts +51 -0
  173. package/dist/runtime/components/master/Select.d.vue.ts +68 -0
  174. package/dist/runtime/components/master/Select.vue +25 -26
  175. package/dist/runtime/components/master/Select.vue.d.ts +68 -0
  176. package/dist/runtime/components/master/label.d.vue.ts +24 -0
  177. package/dist/runtime/components/master/label.vue +22 -34
  178. package/dist/runtime/components/master/label.vue.d.ts +24 -0
  179. package/dist/runtime/components/model/Autocomplete.d.vue.ts +82 -0
  180. package/dist/runtime/components/model/Autocomplete.vue +50 -37
  181. package/dist/runtime/components/model/Autocomplete.vue.d.ts +82 -0
  182. package/dist/runtime/components/model/Combobox.d.vue.ts +82 -0
  183. package/dist/runtime/components/model/Combobox.vue +51 -37
  184. package/dist/runtime/components/model/Combobox.vue.d.ts +82 -0
  185. package/dist/runtime/components/model/Pad.d.vue.ts +72 -0
  186. package/dist/runtime/components/model/Pad.vue +50 -53
  187. package/dist/runtime/components/model/Pad.vue.d.ts +72 -0
  188. package/dist/runtime/components/model/Select.d.vue.ts +72 -0
  189. package/dist/runtime/components/model/Select.vue +42 -32
  190. package/dist/runtime/components/model/Select.vue.d.ts +72 -0
  191. package/dist/runtime/components/model/Table.d.vue.ts +272 -0
  192. package/dist/runtime/components/model/Table.vue +121 -133
  193. package/dist/runtime/components/model/Table.vue.d.ts +272 -0
  194. package/dist/runtime/components/model/iterator.d.vue.ts +321 -0
  195. package/dist/runtime/components/model/iterator.vue +148 -175
  196. package/dist/runtime/components/model/iterator.vue.d.ts +321 -0
  197. package/dist/runtime/components/model/label.d.vue.ts +26 -0
  198. package/dist/runtime/components/model/label.vue +25 -35
  199. package/dist/runtime/components/model/label.vue.d.ts +26 -0
  200. package/dist/runtime/components/pdf/Print.d.vue.ts +17 -0
  201. package/dist/runtime/components/pdf/Print.vue +27 -38
  202. package/dist/runtime/components/pdf/Print.vue.d.ts +17 -0
  203. package/dist/runtime/components/pdf/View.d.vue.ts +52 -0
  204. package/dist/runtime/components/pdf/View.vue +58 -83
  205. package/dist/runtime/components/pdf/View.vue.d.ts +52 -0
  206. package/dist/runtime/composables/alert.d.ts +4 -0
  207. package/dist/runtime/composables/api.d.ts +4 -0
  208. package/dist/runtime/composables/api.js +4 -2
  209. package/dist/runtime/composables/assetFile.js +4 -2
  210. package/dist/runtime/composables/dialog.d.ts +1 -1
  211. package/dist/runtime/composables/document/template.js +3 -3
  212. package/dist/runtime/composables/document/templateFormHidden.d.ts +4 -0
  213. package/dist/runtime/composables/document/templateFormTable.js +1 -0
  214. package/dist/runtime/composables/graphql.d.ts +2 -2
  215. package/dist/runtime/composables/graphql.js +5 -5
  216. package/dist/runtime/composables/graphqlModel.d.ts +6 -6
  217. package/dist/runtime/composables/graphqlModelItem.d.ts +4 -4
  218. package/dist/runtime/composables/graphqlModelOperation.d.ts +6 -6
  219. package/dist/runtime/composables/graphqlModelOperation.js +2 -1
  220. package/dist/runtime/composables/graphqlOperation.js +5 -1
  221. package/dist/runtime/composables/hostAgentWs.d.ts +1 -1
  222. package/dist/runtime/composables/localStorageModel.d.ts +4 -0
  223. package/dist/runtime/composables/lookupList.d.ts +4 -0
  224. package/dist/runtime/composables/lookupListMaster.js +3 -3
  225. package/dist/runtime/composables/menu.d.ts +4 -0
  226. package/dist/runtime/composables/menu.js +2 -2
  227. package/dist/runtime/composables/useMrzReader.d.ts +48 -0
  228. package/dist/runtime/composables/useMrzReader.js +423 -0
  229. package/dist/runtime/composables/useTesseract.d.ts +16 -0
  230. package/dist/runtime/composables/useTesseract.js +45 -0
  231. package/dist/runtime/composables/userPermission.d.ts +1 -1
  232. package/dist/runtime/composables/utils/fuzzy.d.ts +2 -1
  233. package/dist/runtime/labs/Calendar.d.vue.ts +35 -0
  234. package/dist/runtime/labs/Calendar.vue +47 -75
  235. package/dist/runtime/labs/Calendar.vue.d.ts +35 -0
  236. package/dist/runtime/labs/form/EditMobile.d.vue.ts +12 -0
  237. package/dist/runtime/labs/form/EditMobile.vue +19 -36
  238. package/dist/runtime/labs/form/EditMobile.vue.d.ts +12 -0
  239. package/dist/runtime/labs/form/TextFieldMask.d.vue.ts +21 -0
  240. package/dist/runtime/labs/form/TextFieldMask.vue +19 -25
  241. package/dist/runtime/labs/form/TextFieldMask.vue.d.ts +21 -0
  242. package/dist/runtime/plugins/dialogManager.js +2 -2
  243. package/dist/runtime/plugins/permission.js +3 -3
  244. package/dist/runtime/types/bridge.d.ts +14 -0
  245. package/dist/runtime/utils/asset.d.ts +2 -0
  246. package/dist/runtime/utils/asset.js +49 -0
  247. package/dist/runtime/utils/datetime.js +1 -1
  248. package/dist/types.d.mts +2 -6
  249. package/package.json +79 -57
  250. package/scripts/ci-release.mjs +125 -0
  251. package/scripts/enrich-vue-docs-from-ai.mjs +197 -0
  252. package/scripts/generate-ai-summary.mjs +321 -0
  253. package/scripts/generate-composables-md.mjs +129 -0
  254. package/scripts/release-version.mjs +68 -0
  255. package/scripts/release.mjs +49 -0
  256. package/templates/public/tesseract/mrz.traineddata.gz +0 -0
  257. package/templates/public/tesseract/ocrb.traineddata.gz +0 -0
  258. package/dist/module.cjs +0 -5
  259. package/dist/module.d.ts +0 -8
  260. package/dist/types.d.ts +0 -7
@@ -1,180 +1,145 @@
1
- <script lang="ts" setup>
2
- import {computed, defineExpose, onBeforeUnmount, onMounted, ref, useTemplateRef, watchEffect} from "vue"
3
- import {useDevicesList, useUserMedia} from "@vueuse/core"
4
- import {getBase64Strings, type ImageFormat} from 'exif-rotate-js'
5
- import {useAlert} from '../../../composables/alert'
6
- import {VInput} from 'vuetify/components/VInput'
7
-
8
- interface Props {
9
- imageFormat?: ImageFormat
10
- autoStart?: boolean
11
- fileOnly?: boolean
12
- readonly?: boolean
13
- disabled?: boolean
14
- buttonText?: string
15
- maxHeight?: string | number
16
- maxWidth?: string | number
17
- aspectRatio?: number
18
- }
19
-
20
- const props = withDefaults(defineProps<Props>(), {
21
- imageFormat: "image/jpeg",
22
- autoStart: true,
23
- fileOnly: false,
24
- readonly: false,
25
- disabled: false,
26
- buttonText: "Add Photo",
27
- maxWidth: 1024
28
- })
29
-
30
- const alert = useAlert()
31
-
32
- const imageData = defineModel<string>()
33
- const inputRef = useTemplateRef<VInput>("inputRef")
34
-
35
- const isLoading = ref<boolean>(false)
36
- const isCaptured = computed(()=>!!imageData.value)
37
- const isEditing = ref<boolean>(false)
38
-
39
- const videoScreen = ref<HTMLVideoElement>()
40
-
41
- const currentCameraId = ref<ConstrainDOMString | undefined>()
1
+ <script setup>
2
+ import { computed, onBeforeUnmount, onMounted, ref, useTemplateRef, watchEffect } from "vue";
3
+ import { useDevicesList, useUserMedia } from "@vueuse/core";
4
+ import { getBase64Strings } from "exif-rotate-js";
5
+ import { useAlert } from "../../../composables/alert";
6
+ import { VInput } from "vuetify/components/VInput";
7
+ const props = defineProps({
8
+ imageFormat: { type: String, required: false, default: "image/jpeg" },
9
+ autoStart: { type: Boolean, required: false, default: true },
10
+ fileOnly: { type: Boolean, required: false, default: false },
11
+ readonly: { type: Boolean, required: false, default: false },
12
+ disabled: { type: Boolean, required: false, default: false },
13
+ buttonText: { type: String, required: false, default: "Add Photo" },
14
+ maxHeight: { type: [String, Number], required: false },
15
+ maxWidth: { type: [String, Number], required: false, default: 1024 },
16
+ aspectRatio: { type: Number, required: false }
17
+ });
18
+ const alert = useAlert();
19
+ const imageData = defineModel({ type: String });
20
+ const inputRef = useTemplateRef("inputRef");
21
+ const isLoading = ref(false);
22
+ const isCaptured = computed(() => !!imageData.value);
23
+ const isEditing = ref(false);
24
+ const videoScreen = ref();
25
+ const currentCameraId = ref();
42
26
  const { videoInputs: cameras } = useDevicesList({
43
27
  requestPermissions: true,
44
28
  constraints: { audio: false, video: true },
45
29
  onUpdated() {
46
- if (!cameras.value.find(camera => camera.deviceId === currentCameraId.value))
47
- currentCameraId.value = cameras.value[0]?.deviceId
48
- },
49
- })
50
- const hasCamera = computed(()=>{ return !!currentCameraId.value })
51
-
30
+ if (!cameras.value.find((camera) => camera.deviceId === currentCameraId.value))
31
+ currentCameraId.value = cameras.value[0]?.deviceId;
32
+ }
33
+ });
34
+ const hasCamera = computed(() => {
35
+ return !!currentCameraId.value;
36
+ });
52
37
  const { stream, start: cameraStart, stop: cameraStop, enabled: cameraEnabled } = useUserMedia({
53
- constraints: { video: { deviceId: currentCameraId.value, width: {min: 1280}, aspectRatio: props.aspectRatio}},
54
- })
55
-
38
+ constraints: { video: { deviceId: currentCameraId.value, width: { min: 1280 }, aspectRatio: props.aspectRatio } }
39
+ });
56
40
  watchEffect(() => {
57
- if (videoScreen.value) videoScreen.value.srcObject = (stream.value) ? stream.value! : null
58
- })
59
-
41
+ if (videoScreen.value) videoScreen.value.srcObject = stream.value ? stream.value : null;
42
+ });
60
43
  function startCamera() {
61
- imageData.value = undefined
44
+ imageData.value = void 0;
62
45
  if (!cameraEnabled.value) {
63
- isLoading.value = true
64
- cameraStart().finally(()=>{
65
- isLoading.value = false
66
- })
46
+ isLoading.value = true;
47
+ cameraStart().finally(() => {
48
+ isLoading.value = false;
49
+ });
67
50
  }
68
51
  }
69
-
70
52
  function stopCamera() {
71
- if (cameraEnabled.value) cameraStop()
53
+ if (cameraEnabled.value) cameraStop();
72
54
  }
73
-
74
55
  function captureImage() {
75
56
  if (videoScreen.value) {
76
- const canvas = document.createElement('canvas')
77
- canvas.width = videoScreen.value.videoWidth
78
- canvas.height = videoScreen.value.videoHeight
79
- const context = canvas.getContext('2d')
57
+ const canvas = document.createElement("canvas");
58
+ canvas.width = videoScreen.value.videoWidth;
59
+ canvas.height = videoScreen.value.videoHeight;
60
+ const context = canvas.getContext("2d");
80
61
  if (context) {
81
- context.drawImage(videoScreen.value, 0, 0, canvas.width, canvas.height)
82
- isEditing.value = false
83
- imageData.value = canvas.toDataURL(props.imageFormat)
84
- stopCamera()
62
+ context.drawImage(videoScreen.value, 0, 0, canvas.width, canvas.height);
63
+ isEditing.value = false;
64
+ imageData.value = canvas.toDataURL(props.imageFormat);
65
+ stopCamera();
85
66
  }
86
67
  }
87
68
  }
88
-
89
- function captureImageFile(selectedFile: File | File[] | undefined) {
69
+ function captureImageFile(selectedFile) {
90
70
  if (!selectedFile) {
91
- alert?.addAlert({ message: 'No file selected.', alertType: 'error' })
92
- return
71
+ alert?.addAlert({ message: "No file selected.", alertType: "error" });
72
+ return;
93
73
  }
94
-
95
- const scanImageSingleFile: File = Array.isArray(selectedFile) ? selectedFile[0] : selectedFile
96
-
97
- getBase64Strings([scanImageSingleFile], { maxSize: computedMaxSize.value,type: props.imageFormat,quality: 1 }).then((returnData) => {
98
- isEditing.value = false
99
- imageData.value = returnData[0]
100
- stopCamera()
101
- }).catch((e) => void e)
74
+ const scanImageSingleFile = Array.isArray(selectedFile) ? selectedFile[0] : selectedFile;
75
+ getBase64Strings([scanImageSingleFile], { maxSize: computedMaxSize.value, type: props.imageFormat, quality: 1 }).then((returnData) => {
76
+ isEditing.value = false;
77
+ imageData.value = returnData[0];
78
+ stopCamera();
79
+ }).catch((e) => void e);
102
80
  }
103
-
104
81
  onMounted(() => {
105
- if (!isCaptured.value && props.autoStart && !props.fileOnly) startCamera()
106
- })
107
-
82
+ if (!isCaptured.value && props.autoStart && !props.fileOnly) startCamera();
83
+ });
108
84
  onBeforeUnmount(() => {
109
- stopCamera()
110
- })
111
-
85
+ stopCamera();
86
+ });
112
87
  function reset() {
113
- inputRef.value?.reset()
114
- stopCamera()
115
- if (props.autoStart && !props.fileOnly) startCamera()
88
+ inputRef.value?.reset();
89
+ stopCamera();
90
+ if (props.autoStart && !props.fileOnly) startCamera();
116
91
  }
117
-
118
92
  const computedMaxWidth = computed(() => {
119
- if (typeof props.maxWidth === 'number') {
120
- return `${props.maxWidth}px`
93
+ if (typeof props.maxWidth === "number") {
94
+ return `${props.maxWidth}px`;
121
95
  } else if (!isNaN(Number(props.maxWidth))) {
122
- return `${props.maxWidth}px`
96
+ return `${props.maxWidth}px`;
123
97
  }
124
- return props.maxWidth
125
- })
126
-
98
+ return props.maxWidth;
99
+ });
127
100
  const computedMaxHeight = computed(() => {
128
- if (typeof props.maxHeight === 'number') {
129
- return `${props.maxHeight}px`
101
+ if (typeof props.maxHeight === "number") {
102
+ return `${props.maxHeight}px`;
130
103
  } else if (!isNaN(Number(props.maxHeight))) {
131
- return `${props.maxHeight}px`
104
+ return `${props.maxHeight}px`;
132
105
  }
133
- return props.maxHeight
134
- })
135
-
106
+ return props.maxHeight;
107
+ });
136
108
  const computedMaxSize = computed(() => {
137
- let tmpMaxHeight : number = 1024
138
- let tmpMaxWidth : number = 1024
139
-
140
- if (typeof props.maxWidth === 'number') {
141
- tmpMaxWidth = <number>props.maxWidth
109
+ let tmpMaxHeight = 1024;
110
+ let tmpMaxWidth = 1024;
111
+ if (typeof props.maxWidth === "number") {
112
+ tmpMaxWidth = props.maxWidth;
142
113
  } else if (!isNaN(Number(props.maxWidth))) {
143
- tmpMaxWidth = Number(props.maxWidth)
114
+ tmpMaxWidth = Number(props.maxWidth);
144
115
  }
145
-
146
- if (typeof props.maxHeight === 'number') {
147
- tmpMaxHeight = <number>props.maxHeight
116
+ if (typeof props.maxHeight === "number") {
117
+ tmpMaxHeight = props.maxHeight;
148
118
  } else if (!isNaN(Number(props.maxHeight))) {
149
- tmpMaxHeight = Number(props.maxHeight)
119
+ tmpMaxHeight = Number(props.maxHeight);
150
120
  }
151
-
152
- return (tmpMaxWidth>tmpMaxHeight) ? tmpMaxWidth : tmpMaxHeight
153
- })
154
-
155
- const operation = ref({startCamera,stopCamera,reset,captureImage,captureImageFile,isLoading,isCaptured,hasCamera})
156
-
157
- const isValid = computed(()=>{
158
- return inputRef.value?.isValid
159
- })
160
-
161
- const errorMessages = computed(()=>{
162
- return inputRef.value?.errorMessages
163
- })
164
-
121
+ return tmpMaxWidth > tmpMaxHeight ? tmpMaxWidth : tmpMaxHeight;
122
+ });
123
+ const operation = ref({ startCamera, stopCamera, reset, captureImage, captureImageFile, isLoading, isCaptured, hasCamera });
124
+ const isValid = computed(() => {
125
+ return inputRef.value?.isValid;
126
+ });
127
+ const errorMessages = computed(() => {
128
+ return inputRef.value?.errorMessages;
129
+ });
165
130
  defineExpose({
166
131
  errorMessages,
167
132
  isValid,
168
133
  reset,
169
- resetValidation : ()=>inputRef.value?.resetValidation(),
170
- validate : ()=>inputRef.value?.validate(),
134
+ resetValidation: () => inputRef.value?.resetValidation(),
135
+ validate: () => inputRef.value?.validate(),
171
136
  operation
172
- })
137
+ });
173
138
  </script>
174
139
 
175
140
  <template>
176
141
  <v-input v-model="imageData" v-bind="$attrs" ref="inputRef">
177
- <template #default="{isReadonly,isDisabled}">
142
+ <template #default="{ isReadonly, isDisabled }">
178
143
  <v-container fluid class="ma-0 pa-0">
179
144
  <v-card>
180
145
  <v-card-text class="d-flex justify-center text-center" v-if="!isLoading && !isCaptured">
@@ -191,8 +156,8 @@ defineExpose({
191
156
  </FileBtn>
192
157
  </template>
193
158
  <template v-else>
194
- <div style="position: relative; display: inline-block; width: 100%;" :style="{maxWidth:computedMaxWidth,maxHeight:computedMaxHeight}">
195
- <video autoplay ref="videoScreen" width="100%" :style="{maxWidth:computedMaxWidth,maxHeight:computedMaxHeight}"></video>
159
+ <div style="position: relative; display: inline-block; width: 100%;" :style="{ maxWidth: computedMaxWidth, maxHeight: computedMaxHeight }">
160
+ <video autoplay ref="videoScreen" width="100%" :style="{ maxWidth: computedMaxWidth, maxHeight: computedMaxHeight }"></video>
196
161
  <div style="position: absolute; bottom: 10px; right: 10px; z-index: 2000;">
197
162
  <FileBtn
198
163
  accept="image/*"
@@ -206,18 +171,18 @@ defineExpose({
206
171
  </template>
207
172
  </v-card-text>
208
173
  <v-card-text class="d-flex justify-center" v-if="isCaptured">
209
- <div style="position: relative; display: inline-block; width: 100%;" :style="{maxWidth:computedMaxWidth,maxHeight:computedMaxHeight}" v-if="!isEditing">
174
+ <div style="position: relative; display: inline-block; width: 100%;" :style="{ maxWidth: computedMaxWidth, maxHeight: computedMaxHeight }" v-if="!isEditing">
210
175
  <v-img :src="imageData" :max-height="maxHeight" :max-width="maxWidth" contain></v-img>
211
176
  <div style="position: absolute; bottom: 10px; right: 10px; z-index: 2000;">
212
177
  <v-btn
213
178
  icon="mdi mdi-image-edit"
214
179
  icon-only
215
- @click="isEditing=true"
180
+ @click="isEditing = true"
216
181
  :disabled="disabled || readonly || (isReadonly.value || isDisabled.value)"
217
182
  />
218
183
  </div>
219
184
  </div>
220
- <form-images-edit v-model="imageData" :aspect-ratio="aspectRatio" :image-format="imageFormat" @update:model-value="isEditing=false" @close="isEditing=false" v-else></form-images-edit>
185
+ <form-images-edit v-model="imageData" :aspect-ratio="aspectRatio" :image-format="imageFormat" @update:model-value="isEditing = false" @close="isEditing = false" v-else></form-images-edit>
221
186
  </v-card-text>
222
187
  <v-card-text class="d-flex justify-center" v-if="isLoading">
223
188
  <v-progress-circular indeterminate></v-progress-circular>
@@ -225,7 +190,7 @@ defineExpose({
225
190
  <v-card-actions v-if="!readonly && (!fileOnly || isCaptured) && !isEditing && !(isReadonly.value || isDisabled.value)">
226
191
  <slot name="actions" :operation="operation">
227
192
  <v-spacer></v-spacer>
228
- <v-btn color="primary" variant="flat" @click="startCamera" v-if="!cameraEnabled && hasCamera && !fileOnly" :disabled="disabled">{{ (isCaptured) ? "Retake" : "Start" }}</v-btn>
193
+ <v-btn color="primary" variant="flat" @click="startCamera" v-if="!cameraEnabled && hasCamera && !fileOnly" :disabled="disabled">{{ isCaptured ? "Retake" : "Start" }}</v-btn>
229
194
  <v-btn color="primary" variant="flat" @click="captureImage" v-if="cameraEnabled" :disabled="disabled">Capture</v-btn>
230
195
  <v-btn color="primary" variant="flat" @click="reset" :disabled="disabled">Reset</v-btn>
231
196
  <v-spacer></v-spacer>
@@ -235,4 +200,4 @@ defineExpose({
235
200
  </v-container>
236
201
  </template>
237
202
  </v-input>
238
- </template>
203
+ </template>
@@ -0,0 +1,96 @@
1
+ import { type ImageFormat } from 'exif-rotate-js';
2
+ interface Props {
3
+ imageFormat?: ImageFormat;
4
+ autoStart?: boolean;
5
+ fileOnly?: boolean;
6
+ readonly?: boolean;
7
+ disabled?: boolean;
8
+ buttonText?: string;
9
+ maxHeight?: string | number;
10
+ maxWidth?: string | number;
11
+ aspectRatio?: number;
12
+ }
13
+ /**
14
+ * Public props accepted by FormImagesCapture.
15
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
16
+ */
17
+ type __VLS_Props = Props;
18
+ declare function startCamera(): void;
19
+ declare function stopCamera(): void;
20
+ declare function captureImage(): void;
21
+ declare function captureImageFile(selectedFile: File | File[] | undefined): void;
22
+ declare function reset(): void;
23
+ type __VLS_ModelProps = {
24
+ modelValue?: string;
25
+ };
26
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
27
+ declare var __VLS_92: {
28
+ operation: {
29
+ startCamera: typeof startCamera;
30
+ stopCamera: typeof stopCamera;
31
+ reset: typeof reset;
32
+ captureImage: typeof captureImage;
33
+ captureImageFile: typeof captureImageFile;
34
+ isLoading: boolean;
35
+ isCaptured: boolean;
36
+ hasCamera: boolean;
37
+ };
38
+ };
39
+ type __VLS_Slots = {} & {
40
+ actions?: (props: typeof __VLS_92) => any;
41
+ };
42
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
43
+ errorMessages: import("vue").ComputedRef<(string & string[]) | (readonly string[] & string[]) | undefined>;
44
+ isValid: import("vue").ComputedRef<boolean | null | undefined>;
45
+ reset: typeof reset;
46
+ resetValidation: () => Promise<void> | undefined;
47
+ validate: () => Promise<string[]> | undefined;
48
+ operation: import("vue").Ref<{
49
+ startCamera: typeof startCamera;
50
+ stopCamera: typeof stopCamera;
51
+ reset: typeof reset;
52
+ captureImage: typeof captureImage;
53
+ captureImageFile: typeof captureImageFile;
54
+ isLoading: boolean;
55
+ isCaptured: boolean;
56
+ hasCamera: boolean;
57
+ }, {
58
+ startCamera: typeof startCamera;
59
+ stopCamera: typeof stopCamera;
60
+ reset: typeof reset;
61
+ captureImage: typeof captureImage;
62
+ captureImageFile: typeof captureImageFile;
63
+ isLoading: import("vue").Ref<boolean, boolean>;
64
+ isCaptured: import("vue").ComputedRef<boolean>;
65
+ hasCamera: import("vue").ComputedRef<boolean>;
66
+ } | {
67
+ startCamera: typeof startCamera;
68
+ stopCamera: typeof stopCamera;
69
+ reset: typeof reset;
70
+ captureImage: typeof captureImage;
71
+ captureImageFile: typeof captureImageFile;
72
+ isLoading: boolean;
73
+ isCaptured: boolean;
74
+ hasCamera: boolean;
75
+ }>;
76
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
77
+ "update:modelValue": (value: string | undefined) => any;
78
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
79
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
80
+ }>, {
81
+ disabled: boolean;
82
+ maxWidth: string | number;
83
+ readonly: boolean;
84
+ buttonText: string;
85
+ imageFormat: ImageFormat;
86
+ autoStart: boolean;
87
+ fileOnly: boolean;
88
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
89
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
90
+ declare const _default: typeof __VLS_export;
91
+ export default _default;
92
+ type __VLS_WithSlots<T, S> = T & {
93
+ new (): {
94
+ $slots: S;
95
+ };
96
+ };
@@ -0,0 +1,29 @@
1
+ import 'cropperjs/dist/cropper.css';
2
+ import type { ImageFormat } from "exif-rotate-js";
3
+ interface Props {
4
+ imageFormat?: ImageFormat;
5
+ maxHeight?: string | number;
6
+ maxWidth?: string | number;
7
+ aspectRatio?: number;
8
+ }
9
+ /**
10
+ * Public props accepted by FormImagesEdit.
11
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
12
+ */
13
+ type __VLS_Props = Props;
14
+ type __VLS_ModelProps = {
15
+ modelValue?: string;
16
+ };
17
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ close: (...args: any[]) => void;
20
+ "update:modelValue": (value: string | undefined) => void;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
23
+ onClose?: ((...args: any[]) => any) | undefined;
24
+ }>, {
25
+ maxWidth: string | number;
26
+ imageFormat: ImageFormat;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -1,87 +1,74 @@
1
- <script lang="ts" setup>
2
- import {computed, ref} from 'vue'
3
- import Cropper from 'cropperjs'
4
- import 'cropperjs/dist/cropper.css'
5
- import type {ImageFormat} from "exif-rotate-js"
6
-
7
- interface Props {
8
- imageFormat?: ImageFormat
9
- maxHeight?: string | number
10
- maxWidth?: string | number
11
- aspectRatio?: number
12
- }
13
-
14
- const props = withDefaults(defineProps<Props>(), {
15
- imageFormat: "image/jpeg",
16
- maxWidth: 1024
17
- })
18
-
19
- const imageData = defineModel<string>()
20
- const emit = defineEmits(['close'])
21
-
22
- const cropper = ref<Cropper>()
23
- const imageRef = ref<HTMLImageElement>()
24
- const dragMode = ref<string>("none")
25
-
1
+ <script setup>
2
+ import { computed, ref } from "vue";
3
+ import Cropper from "cropperjs";
4
+ import "cropperjs/dist/cropper.css";
5
+ const props = defineProps({
6
+ imageFormat: { type: String, required: false, default: "image/jpeg" },
7
+ maxHeight: { type: [String, Number], required: false },
8
+ maxWidth: { type: [String, Number], required: false, default: 1024 },
9
+ aspectRatio: { type: Number, required: false }
10
+ });
11
+ const imageData = defineModel({ type: String });
12
+ const emit = defineEmits(["close"]);
13
+ const cropper = ref();
14
+ const imageRef = ref();
15
+ const dragMode = ref("none");
26
16
  function loadCropper() {
27
- if (cropper.value) cropper.value?.destroy()
17
+ if (cropper.value) cropper.value?.destroy();
28
18
  if (imageRef.value) {
29
- cropper.value = new Cropper(<HTMLImageElement>imageRef.value,{
19
+ cropper.value = new Cropper(imageRef.value, {
30
20
  aspectRatio: props.aspectRatio,
31
- autoCrop:false,
32
- autoCropArea:1,
33
- })
21
+ autoCrop: false,
22
+ autoCropArea: 1
23
+ });
34
24
  }
35
25
  }
36
-
37
- const setDragMode = (mode: "none"|"crop"|"move") => {
38
- cropper.value?.setDragMode(mode)
39
- }
40
-
41
- const rotateLeft90 = () => cropper.value?.rotate(-90)
42
- const rotateLeft = () => cropper.value?.rotate(-5)
43
- const rotateRight = () => cropper.value?.rotate(5)
44
- const rotateRight90 = () => cropper.value?.rotate(90)
45
- const flipHorizontal = () => cropper.value?.scaleX(cropper.value.getData().scaleX * -1)
46
- const flipVertical = () => cropper.value?.scaleY(cropper.value.getData().scaleY * -1)
47
- const zoomIn = () => cropper.value?.zoom(0.1)
48
- const zoomOut = () => cropper.value?.zoom(-0.1)
49
- const moveUp = () => cropper.value?.move(0, -10)
50
- const moveDown = () => cropper.value?.move(0, 10)
51
- const moveLeft = () => cropper.value?.move(-10, 0)
52
- const moveRight = () => cropper.value?.move(10, 0)
26
+ const setDragMode = (mode) => {
27
+ cropper.value?.setDragMode(mode);
28
+ };
29
+ const rotateLeft90 = () => cropper.value?.rotate(-90);
30
+ const rotateLeft = () => cropper.value?.rotate(-5);
31
+ const rotateRight = () => cropper.value?.rotate(5);
32
+ const rotateRight90 = () => cropper.value?.rotate(90);
33
+ const flipHorizontal = () => cropper.value?.scaleX(cropper.value.getData().scaleX * -1);
34
+ const flipVertical = () => cropper.value?.scaleY(cropper.value.getData().scaleY * -1);
35
+ const zoomIn = () => cropper.value?.zoom(0.1);
36
+ const zoomOut = () => cropper.value?.zoom(-0.1);
37
+ const moveUp = () => cropper.value?.move(0, -10);
38
+ const moveDown = () => cropper.value?.move(0, 10);
39
+ const moveLeft = () => cropper.value?.move(-10, 0);
40
+ const moveRight = () => cropper.value?.move(10, 0);
53
41
  const accept = () => {
54
- const croppedCanvas = cropper.value?.getCroppedCanvas()
55
- imageData.value = croppedCanvas?.toDataURL(props.imageFormat,1)
56
- }
42
+ const croppedCanvas = cropper.value?.getCroppedCanvas();
43
+ imageData.value = croppedCanvas?.toDataURL(props.imageFormat, 1);
44
+ };
57
45
  const close = () => {
58
- emit('close');
59
- }
46
+ emit("close");
47
+ };
60
48
  const reset = () => {
61
- cropper.value?.reset()
62
- cropper.value?.clear()
63
- }
64
-
49
+ cropper.value?.reset();
50
+ cropper.value?.clear();
51
+ };
65
52
  const computedMaxWidth = computed(() => {
66
- if (typeof props.maxWidth === 'number') {
67
- return `${props.maxWidth}px`
53
+ if (typeof props.maxWidth === "number") {
54
+ return `${props.maxWidth}px`;
68
55
  } else if (!isNaN(Number(props.maxWidth))) {
69
- return `${props.maxWidth}px`
56
+ return `${props.maxWidth}px`;
70
57
  }
71
- return props.maxWidth
72
- })
73
-
58
+ return props.maxWidth;
59
+ });
74
60
  const computedMaxHeight = computed(() => {
75
- if (typeof props.maxHeight === 'number') {
76
- return `${props.maxHeight}px`
61
+ if (typeof props.maxHeight === "number") {
62
+ return `${props.maxHeight}px`;
77
63
  } else if (!isNaN(Number(props.maxHeight))) {
78
- return `${props.maxHeight}px`
64
+ return `${props.maxHeight}px`;
79
65
  }
80
- return props.maxHeight
81
- })
66
+ return props.maxHeight;
67
+ });
82
68
  </script>
69
+
83
70
  <template>
84
- <div :style="{maxWidth:computedMaxWidth,maxHeight:computedMaxHeight}">
71
+ <div :style="{ maxWidth: computedMaxWidth, maxHeight: computedMaxHeight }">
85
72
  <v-card>
86
73
  <v-toolbar color="primary" dark>
87
74
  <v-btn-toggle v-model="dragMode" class="ml-1">
@@ -119,6 +106,7 @@ const computedMaxHeight = computed(() => {
119
106
  </v-card>
120
107
  </div>
121
108
  </template>
109
+
122
110
  <style>
123
111
  .cropper-bg{background-repeat:repeat!important}
124
- </style>
112
+ </style>
@@ -0,0 +1,29 @@
1
+ import 'cropperjs/dist/cropper.css';
2
+ import type { ImageFormat } from "exif-rotate-js";
3
+ interface Props {
4
+ imageFormat?: ImageFormat;
5
+ maxHeight?: string | number;
6
+ maxWidth?: string | number;
7
+ aspectRatio?: number;
8
+ }
9
+ /**
10
+ * Public props accepted by FormImagesEdit.
11
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
12
+ */
13
+ type __VLS_Props = Props;
14
+ type __VLS_ModelProps = {
15
+ modelValue?: string;
16
+ };
17
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ close: (...args: any[]) => void;
20
+ "update:modelValue": (value: string | undefined) => void;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
23
+ onClose?: ((...args: any[]) => any) | undefined;
24
+ }>, {
25
+ maxWidth: string | number;
26
+ imageFormat: ImageFormat;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { type Base64Image } from '../../../composables/assetFile.js';
2
+ interface Props {
3
+ modelValue?: Base64Image[];
4
+ readonly?: boolean;
5
+ label?: string;
6
+ accept?: string;
7
+ autoHydrate?: boolean;
8
+ maxFileSize?: number;
9
+ }
10
+ declare const __VLS_export: import("vue").DefineComponent<Props, {
11
+ errorMessages: import("vue").ComputedRef<(string & string[]) | (readonly string[] & string[]) | undefined>;
12
+ isValid: import("vue").ComputedRef<boolean | null | undefined>;
13
+ reset: () => Promise<void> | undefined;
14
+ resetValidation: () => Promise<void> | undefined;
15
+ validate: () => Promise<string[]> | undefined;
16
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
+ "update:modelValue": (value: Base64Image[]) => any;
18
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: Base64Image[]) => any) | undefined;
20
+ }>, {
21
+ modelValue: Base64Image[];
22
+ accept: string;
23
+ autoHydrate: boolean;
24
+ maxFileSize: number;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;