@agrotools1/at-components 0.5.1 → 0.5.3

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 (156) hide show
  1. package/README.md +7 -7
  2. package/dist/Accordion/Accordion.vue.js +8 -8
  3. package/dist/Accordion/Accordion.vue3.js +2 -2
  4. package/dist/Avatar/Avatar.vue.js +1 -1
  5. package/dist/Avatar/Avatar.vue3.js +2 -2
  6. package/dist/Button/Button.vue.js +1 -1
  7. package/dist/Button/Button.vue3.js +2 -2
  8. package/dist/CardWithInsights/CardWithInsights.vue.js +6 -6
  9. package/dist/CardWithInsights/CardWithInsights.vue4.js +2 -2
  10. package/dist/Checkbox/Checkbox.vue.js +1 -1
  11. package/dist/Checkbox/img/checkmarck.svg.js +1 -1
  12. package/dist/ColorPicker/ColorPicker.Saturation.vue.js +10 -10
  13. package/dist/ColorPicker/ColorPicker.Saturation.vue3.js +2 -2
  14. package/dist/ColorPicker/ColorPicker.vue.js +4 -4
  15. package/dist/DataTable/Column/Column.vue.js +6 -6
  16. package/dist/DataTable/Column/imgs/filter.svg.js +1 -1
  17. package/dist/DataTable/Counters/Counters.vue.js +1 -1
  18. package/dist/DataTable/Counters/imgs/close.svg.js +1 -1
  19. package/dist/DataTable/DataTable.vue.js +46 -46
  20. package/dist/DatePicker/DatePicker.d.ts +3 -2
  21. package/dist/DatePicker/DatePicker.vue.js +35 -35
  22. package/dist/DatePicker/DatePicker.vue2.js +61 -58
  23. package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.vue.js +3 -3
  24. package/dist/DatePicker/DatePickerHeader/DatePickerHeader.scss.js +2 -2
  25. package/dist/DatePicker/DatePickerHeader/DatePickerHeader.vue.js +4 -4
  26. package/dist/DatePicker/DatePickerListSelector/DatePickerListSelector.vue.js +5 -5
  27. package/dist/DatePicker/DatePickerTime/DatePickerTime.scss.js +2 -2
  28. package/dist/DatePicker/DatePickerTime/DatePickerTime.vue.js +8 -8
  29. package/dist/Dropdown/Checklist/Dropdown.Checklist.vue.js +20 -20
  30. package/dist/Dropdown/Dropdown.core.vue.js +1 -1
  31. package/dist/Dropdown/Dropdown.core.vue3.js +2 -2
  32. package/dist/Faq/Faq.vue.js +2 -2
  33. package/dist/Filter/components/Filter.vue.js +14 -14
  34. package/dist/Illustration/Illustration.vue.js +5 -5
  35. package/dist/Illustration/images/renovabio-illustrations/biomass.svg.js +1 -1
  36. package/dist/Illustration/images/renovabio-illustrations/volume.svg.js +1 -1
  37. package/dist/Illustration/images/system-images/add-file.svg.js +1 -1
  38. package/dist/Illustration/images/system-images/cloud-connection.svg.js +1 -1
  39. package/dist/Illustration/images/system-images/cloud-download.svg.js +1 -1
  40. package/dist/Illustration/images/system-images/cloud-upload.svg.js +1 -1
  41. package/dist/Illustration/images/system-images/corrupted-file.svg.js +1 -1
  42. package/dist/Illustration/images/system-images/empty-box.svg.js +1 -1
  43. package/dist/Illustration/images/system-images/empty-folder-2.svg.js +1 -1
  44. package/dist/Illustration/images/system-images/empty-folder.svg.js +1 -1
  45. package/dist/Illustration/images/system-images/empty.svg.js +1 -1
  46. package/dist/Illustration/images/system-images/error-illustration.svg.js +1 -1
  47. package/dist/Illustration/images/system-images/file-backup-2.svg.js +1 -1
  48. package/dist/Illustration/images/system-images/file-backup.svg.js +1 -1
  49. package/dist/Illustration/images/system-images/filtering-upload.svg.js +1 -1
  50. package/dist/Illustration/images/system-images/flight.svg.js +1 -1
  51. package/dist/Illustration/images/system-images/fly.svg.js +1 -1
  52. package/dist/Illustration/images/system-images/movies.svg.js +1 -1
  53. package/dist/Illustration/images/system-images/multimedia.svg.js +1 -1
  54. package/dist/Illustration/images/system-images/notification-bell.svg.js +1 -1
  55. package/dist/Illustration/images/system-images/page-2.svg.js +1 -1
  56. package/dist/Illustration/images/system-images/page.svg.js +1 -1
  57. package/dist/Illustration/images/system-images/photos.svg.js +1 -1
  58. package/dist/Illustration/images/system-images/recycle-bin.svg.js +1 -1
  59. package/dist/Illustration/images/system-images/rocket-launch.svg.js +1 -1
  60. package/dist/Illustration/images/system-images/signal.svg.js +1 -1
  61. package/dist/Illustration/images/system-images/wrong.svg.js +1 -1
  62. package/dist/Illustration/images/tools-images/advanced-analysis.svg.js +1 -1
  63. package/dist/Illustration/images/tools-images/agriculture.svg.js +1 -1
  64. package/dist/Illustration/images/tools-images/alert-center.svg.js +1 -1
  65. package/dist/Illustration/images/tools-images/area.svg.js +1 -1
  66. package/dist/Illustration/images/tools-images/at-insights.svg.js +1 -1
  67. package/dist/Illustration/images/tools-images/conservation-unit.svg.js +1 -1
  68. package/dist/Illustration/images/tools-images/credit.svg.js +2 -2
  69. package/dist/Illustration/images/tools-images/deforestation.svg.js +1 -1
  70. package/dist/Illustration/images/tools-images/distance-proximity-rivers.svg.js +1 -1
  71. package/dist/Illustration/images/tools-images/estimated-productivity-penalty.svg.js +1 -1
  72. package/dist/Illustration/images/tools-images/extract.svg.js +1 -1
  73. package/dist/Illustration/images/tools-images/farm.svg.js +1 -1
  74. package/dist/Illustration/images/tools-images/geographical-consultation-municipalities.svg.js +1 -1
  75. package/dist/Illustration/images/tools-images/gix.svg.js +1 -1
  76. package/dist/Illustration/images/tools-images/insurance.svg.js +1 -1
  77. package/dist/Illustration/images/tools-images/land-appreciation.svg.js +1 -1
  78. package/dist/Illustration/images/tools-images/lockdown.svg.js +1 -1
  79. package/dist/Illustration/images/tools-images/map.svg.js +1 -1
  80. package/dist/Illustration/images/tools-images/pasture.svg.js +1 -1
  81. package/dist/Illustration/images/tools-images/rating-2.svg.js +1 -1
  82. package/dist/Illustration/images/tools-images/rating.svg.js +1 -1
  83. package/dist/Illustration/images/tools-images/recurrence.svg.js +1 -1
  84. package/dist/Illustration/images/tools-images/refrigerators.svg.js +1 -1
  85. package/dist/Illustration/images/tools-images/settings.svg.js +1 -1
  86. package/dist/Illustration/images/tools-images/socio-environmental-analysis.svg.js +1 -1
  87. package/dist/Illustration/images/tools-images/soil-use.svg.js +1 -1
  88. package/dist/Illustration/images/tools-images/storm.svg.js +1 -1
  89. package/dist/Illustration/images/tools-images/territory-details.svg.js +1 -1
  90. package/dist/Illustration/images/tools-images/timeline.svg.js +1 -1
  91. package/dist/Input/Input.core.vue.js +10 -10
  92. package/dist/Input/imgs/error.svg.js +2 -2
  93. package/dist/Legend/Legend.vue.js +6 -6
  94. package/dist/List/components/List.vue.js +24 -24
  95. package/dist/List/components/List.vue3.js +2 -2
  96. package/dist/Map/Map.d.ts +3 -2
  97. package/dist/Map/Map.vue2.js +43 -39
  98. package/dist/Modal/Modal.vue.js +6 -6
  99. package/dist/Modal/images/cross.svg.js +1 -1
  100. package/dist/Notifications/Notification/Notification.vue.js +4 -4
  101. package/dist/Notifications/Notifications.vue.js +4 -4
  102. package/dist/Paginator/Paginator.vue.js +2 -2
  103. package/dist/Paginator/imgs/double-left-arrow.svg.js +1 -1
  104. package/dist/Paginator/imgs/double-right-arrow.svg.js +1 -1
  105. package/dist/Paginator/imgs/left-arrow.svg.js +1 -1
  106. package/dist/Paginator/imgs/right-arrow.svg.js +1 -1
  107. package/dist/ProgressBar/ProgressBar.vue.js +2 -2
  108. package/dist/RadioButton/RadioButton.vue.js +1 -1
  109. package/dist/RadioButton/RadioButton.vue3.js +2 -2
  110. package/dist/Search/Search.vue.js +7 -6
  111. package/dist/Search/Search.vue2.js +12 -12
  112. package/dist/Select/Item/Item.vue.js +16 -16
  113. package/dist/Select/Multiple/Select.multiple.vue.js +4 -4
  114. package/dist/Select/Multiple/Select.multiple.vue2.js +35 -30
  115. package/dist/Select/Single/Select.single.vue.js +3 -3
  116. package/dist/Select/imgs/indicator.svg.js +1 -1
  117. package/dist/Stepper/Stepper.vue.js +2 -2
  118. package/dist/TableConfig/TableConfig.vue.js +4 -4
  119. package/dist/Tabs/Tab/Tab.vue.js +1 -1
  120. package/dist/Tabs/Tab/Tab.vue3.js +2 -2
  121. package/dist/Tabs/Tabs.vue.js +6 -6
  122. package/dist/Tabs/Tabs.vue2.js +23 -27
  123. package/dist/Tabs/Tabs.vue3.js +2 -2
  124. package/dist/Tag/Tag.vue.js +1 -1
  125. package/dist/Tipograph/Paragraph/Paragraph.vue.js +2 -2
  126. package/dist/Tipograph/Paragraph/Paragraph.vue3.js +2 -2
  127. package/dist/Tipograph/Title/Title.vue.js +2 -2
  128. package/dist/Toggle/Toggle.vue.js +2 -2
  129. package/dist/Tooltip/Tooltip.vue.js +5 -5
  130. package/dist/Tooltip/Tooltip.vue3.js +2 -2
  131. package/dist/Upload/MultipleUpload/MultipleUpload.d.ts +257 -0
  132. package/dist/Upload/MultipleUpload/MultipleUpload.vue.js +58 -0
  133. package/dist/Upload/MultipleUpload/MultipleUpload.vue2.js +187 -0
  134. package/dist/Upload/MultipleUpload/MultipleUpload.vue3.js +4 -0
  135. package/dist/Upload/SingleUpload/SingleUpload.d.ts +214 -0
  136. package/dist/Upload/SingleUpload/SingleUpload.vue.js +50 -0
  137. package/dist/Upload/SingleUpload/SingleUpload.vue2.js +148 -0
  138. package/dist/Upload/SingleUpload/SingleUpload.vue3.js +4 -0
  139. package/dist/Upload/Upload.d.ts +68 -53
  140. package/dist/Upload/Upload.vue.js +38 -121
  141. package/dist/Upload/Upload.vue2.js +37 -48
  142. package/dist/Upload/UploaderHeader/UploaderHeader.d.ts +68 -0
  143. package/dist/Upload/UploaderHeader/UploaderHeader.vue.js +30 -0
  144. package/dist/Upload/UploaderHeader/UploaderHeader.vue2.js +51 -0
  145. package/dist/Upload/UploaderHeader/UploaderHeader.vue3.js +4 -0
  146. package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.d.ts +44 -0
  147. package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue.js +44 -0
  148. package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue2.js +36 -0
  149. package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue3.js +4 -0
  150. package/dist/Upload/UploaderInput/UploaderInput.d.ts +79 -0
  151. package/dist/Upload/UploaderInput/UploaderInput.vue.js +57 -0
  152. package/dist/Upload/UploaderInput/UploaderInput.vue2.js +56 -0
  153. package/dist/Upload/UploaderInput/UploaderInput.vue3.js +4 -0
  154. package/dist/Upload/index.d.ts +4 -0
  155. package/dist/style.css +1 -1
  156. package/package.json +1 -1
@@ -0,0 +1,214 @@
1
+ import { type PropType } from "vue";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ warningTextUpload: {
4
+ type: StringConstructor;
5
+ required: true;
6
+ default: string;
7
+ validator: (value: string) => boolean;
8
+ };
9
+ loadingText: {
10
+ type: StringConstructor;
11
+ required: false;
12
+ default: string;
13
+ validator: (value: string) => boolean;
14
+ };
15
+ completeText: {
16
+ type: StringConstructor;
17
+ required: false;
18
+ default: string;
19
+ validator: (value: string) => boolean;
20
+ };
21
+ progressInterval: {
22
+ type: NumberConstructor;
23
+ required: false;
24
+ default: number;
25
+ validator: (value: number) => boolean;
26
+ };
27
+ interactiveTextButton: {
28
+ type: StringConstructor;
29
+ required: false;
30
+ default: string;
31
+ validator: (value: string) => boolean;
32
+ };
33
+ interactiveTexthref: {
34
+ type: StringConstructor;
35
+ required: false;
36
+ default: string;
37
+ validator: (value: string) => boolean;
38
+ };
39
+ interactiveTextDownloadName: {
40
+ type: StringConstructor;
41
+ required: false;
42
+ default: string;
43
+ validator: (value: string) => boolean;
44
+ };
45
+ warningFunction: {
46
+ type: FunctionConstructor;
47
+ required: false;
48
+ default: () => void;
49
+ };
50
+ multipleSelect: {
51
+ type: BooleanConstructor;
52
+ required: false;
53
+ default: boolean;
54
+ validator: (value: boolean) => boolean;
55
+ };
56
+ uploadText: {
57
+ type: StringConstructor;
58
+ required: false;
59
+ default: string;
60
+ validator: (value: string) => boolean;
61
+ };
62
+ uploadInteractionText: {
63
+ type: StringConstructor;
64
+ required: false;
65
+ default: string;
66
+ validator: (value: string) => boolean;
67
+ };
68
+ uploadProgress: {
69
+ type: NumberConstructor;
70
+ required: false;
71
+ default: number;
72
+ validator: (value: number) => boolean;
73
+ };
74
+ acceptTypes: {
75
+ type: PropType<string[]>;
76
+ default: () => never[];
77
+ };
78
+ acceptTypesInput: {
79
+ type: StringConstructor;
80
+ default: string;
81
+ };
82
+ maxFileSize: {
83
+ type: NumberConstructor;
84
+ required: false;
85
+ default: undefined;
86
+ validator: (value: number) => boolean;
87
+ };
88
+ }, {
89
+ handleDrop: (event: DragEvent) => void;
90
+ handleFileUpload: (event: Event) => Promise<void>;
91
+ handleRemove: () => void;
92
+ handleUpdateProgressOnParent: (newValue: number) => void;
93
+ getAcceptedFiles: (files: File[]) => File[];
94
+ isSizeAccepted: (file: File) => boolean;
95
+ file: import("vue").Ref<{
96
+ readonly lastModified: number;
97
+ readonly name: string;
98
+ readonly webkitRelativePath: string;
99
+ readonly size: number;
100
+ readonly type: string;
101
+ arrayBuffer: () => Promise<ArrayBuffer>;
102
+ slice: (start?: number | undefined, end?: number | undefined, contentType?: string | undefined) => Blob;
103
+ stream: () => ReadableStream<Uint8Array>;
104
+ text: () => Promise<string>;
105
+ } | null>;
106
+ progress: import("vue").Ref<number>;
107
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateProgress" | "updateFile" | "uploadError")[], "updateProgress" | "updateFile" | "uploadError", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
108
+ warningTextUpload: {
109
+ type: StringConstructor;
110
+ required: true;
111
+ default: string;
112
+ validator: (value: string) => boolean;
113
+ };
114
+ loadingText: {
115
+ type: StringConstructor;
116
+ required: false;
117
+ default: string;
118
+ validator: (value: string) => boolean;
119
+ };
120
+ completeText: {
121
+ type: StringConstructor;
122
+ required: false;
123
+ default: string;
124
+ validator: (value: string) => boolean;
125
+ };
126
+ progressInterval: {
127
+ type: NumberConstructor;
128
+ required: false;
129
+ default: number;
130
+ validator: (value: number) => boolean;
131
+ };
132
+ interactiveTextButton: {
133
+ type: StringConstructor;
134
+ required: false;
135
+ default: string;
136
+ validator: (value: string) => boolean;
137
+ };
138
+ interactiveTexthref: {
139
+ type: StringConstructor;
140
+ required: false;
141
+ default: string;
142
+ validator: (value: string) => boolean;
143
+ };
144
+ interactiveTextDownloadName: {
145
+ type: StringConstructor;
146
+ required: false;
147
+ default: string;
148
+ validator: (value: string) => boolean;
149
+ };
150
+ warningFunction: {
151
+ type: FunctionConstructor;
152
+ required: false;
153
+ default: () => void;
154
+ };
155
+ multipleSelect: {
156
+ type: BooleanConstructor;
157
+ required: false;
158
+ default: boolean;
159
+ validator: (value: boolean) => boolean;
160
+ };
161
+ uploadText: {
162
+ type: StringConstructor;
163
+ required: false;
164
+ default: string;
165
+ validator: (value: string) => boolean;
166
+ };
167
+ uploadInteractionText: {
168
+ type: StringConstructor;
169
+ required: false;
170
+ default: string;
171
+ validator: (value: string) => boolean;
172
+ };
173
+ uploadProgress: {
174
+ type: NumberConstructor;
175
+ required: false;
176
+ default: number;
177
+ validator: (value: number) => boolean;
178
+ };
179
+ acceptTypes: {
180
+ type: PropType<string[]>;
181
+ default: () => never[];
182
+ };
183
+ acceptTypesInput: {
184
+ type: StringConstructor;
185
+ default: string;
186
+ };
187
+ maxFileSize: {
188
+ type: NumberConstructor;
189
+ required: false;
190
+ default: undefined;
191
+ validator: (value: number) => boolean;
192
+ };
193
+ }>> & {
194
+ onUpdateProgress?: ((...args: any[]) => any) | undefined;
195
+ onUpdateFile?: ((...args: any[]) => any) | undefined;
196
+ onUploadError?: ((...args: any[]) => any) | undefined;
197
+ }, {
198
+ warningTextUpload: string;
199
+ interactiveTextButton: string;
200
+ interactiveTexthref: string;
201
+ interactiveTextDownloadName: string;
202
+ warningFunction: Function;
203
+ uploadText: string;
204
+ uploadInteractionText: string;
205
+ multipleSelect: boolean;
206
+ acceptTypes: string[];
207
+ acceptTypesInput: string;
208
+ loadingText: string;
209
+ completeText: string;
210
+ progressInterval: number;
211
+ uploadProgress: number;
212
+ maxFileSize: number;
213
+ }, {}>;
214
+ export default _default;
@@ -0,0 +1,50 @@
1
+ import i from "./SingleUpload.vue2.js";
2
+ import { resolveComponent as t, openBlock as o, createElementBlock as r, createVNode as n, createElementVNode as d, createBlock as c } from "vue";
3
+ import "./SingleUpload.vue3.js";
4
+ import u from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const m = { class: "at-uploader-single" }, f = {
6
+ key: 1,
7
+ class: "at-uploader-status-container at-uploader-loading-input-container"
8
+ };
9
+ function g(e, v, h, $, U, w) {
10
+ const p = t("UploaderHeader"), a = t("UploaderInput"), l = t("UploaderInfoProgress"), s = t("AtProgressBar");
11
+ return o(), r("div", null, [
12
+ n(p, {
13
+ "warning-text-upload": e.$props.warningTextUpload,
14
+ "interactive-text-button": e.$props.interactiveTextButton,
15
+ "interactive-texthref": e.$props.interactiveTexthref,
16
+ "interactive-text-download-name": e.$props.interactiveTextDownloadName,
17
+ "warning-function": e.$props.warningFunction
18
+ }, null, 8, ["warning-text-upload", "interactive-text-button", "interactive-texthref", "interactive-text-download-name", "warning-function"]),
19
+ d("div", m, [
20
+ e.file === null ? (o(), c(a, {
21
+ key: 0,
22
+ style: { width: "100%" },
23
+ "handle-drop": e.handleDrop,
24
+ "upload-text": e.$props.uploadText,
25
+ "upload-interaction-text": e.$props.uploadInteractionText,
26
+ "multiple-select": e.$props.multipleSelect,
27
+ "accept-types": e.$props.acceptTypes,
28
+ "accept-types-input": e.$props.acceptTypesInput,
29
+ "handle-file-upload": e.handleFileUpload
30
+ }, null, 8, ["handle-drop", "upload-text", "upload-interaction-text", "multiple-select", "accept-types", "accept-types-input", "handle-file-upload"])) : (o(), r("div", f, [
31
+ n(l, {
32
+ "complete-text": e.$props.completeText,
33
+ progress: e.progress,
34
+ "loading-text": e.$props.loadingText
35
+ }, null, 8, ["complete-text", "progress", "loading-text"]),
36
+ n(s, {
37
+ file: e.file,
38
+ "handle-remove-file": e.handleRemove,
39
+ "is-only-use": !1,
40
+ interval: e.$props.progressInterval,
41
+ onUpdateProgress: e.handleUpdateProgressOnParent
42
+ }, null, 8, ["file", "handle-remove-file", "interval", "onUpdateProgress"])
43
+ ]))
44
+ ])
45
+ ]);
46
+ }
47
+ const x = /* @__PURE__ */ u(i, [["render", g], ["__scopeId", "data-v-395d0c99"]]);
48
+ export {
49
+ x as default
50
+ };
@@ -0,0 +1,148 @@
1
+ import { defineComponent as m, ref as f } from "vue";
2
+ import y from "../../ProgressBar/ProgressBar.vue.js";
3
+ import v from "../UploaderHeader/UploaderHeader.vue.js";
4
+ import q from "../UploaderInfoProgress/UploaderInfoProgress.vue.js";
5
+ import T from "../UploaderInput/UploaderInput.vue.js";
6
+ const w = m({
7
+ name: "SingleUpload",
8
+ components: {
9
+ UploaderInfoProgress: q,
10
+ AtProgressBar: y,
11
+ UploaderHeader: v,
12
+ UploaderInput: T
13
+ },
14
+ props: {
15
+ warningTextUpload: {
16
+ type: String,
17
+ required: !0,
18
+ default: "Texto de aviso sobre o upload",
19
+ validator: (e) => typeof e == "string"
20
+ },
21
+ loadingText: {
22
+ type: String,
23
+ required: !1,
24
+ default: "Estamos analisando o arquivo, em breve, retornaremos com os resultados.",
25
+ validator: (e) => typeof e == "string"
26
+ },
27
+ completeText: {
28
+ type: String,
29
+ required: !1,
30
+ default: "O upload foi concluído.",
31
+ validator: (e) => typeof e == "string"
32
+ },
33
+ progressInterval: {
34
+ type: Number,
35
+ required: !1,
36
+ default: 1e3,
37
+ validator: (e) => typeof e == "number"
38
+ },
39
+ interactiveTextButton: {
40
+ type: String,
41
+ required: !1,
42
+ default: "",
43
+ validator: (e) => typeof e == "string"
44
+ },
45
+ interactiveTexthref: {
46
+ type: String,
47
+ required: !1,
48
+ default: "",
49
+ validator: (e) => typeof e == "string"
50
+ },
51
+ interactiveTextDownloadName: {
52
+ type: String,
53
+ required: !1,
54
+ default: "",
55
+ validator: (e) => typeof e == "string"
56
+ },
57
+ warningFunction: {
58
+ type: Function,
59
+ required: !1,
60
+ default: () => {
61
+ console.warn("This is a warning");
62
+ }
63
+ },
64
+ multipleSelect: {
65
+ type: Boolean,
66
+ required: !1,
67
+ default: !1,
68
+ validator: (e) => typeof e == "boolean"
69
+ },
70
+ uploadText: {
71
+ type: String,
72
+ required: !1,
73
+ default: "Importe seu arquivo aqui",
74
+ validator: (e) => typeof e == "string"
75
+ },
76
+ uploadInteractionText: {
77
+ type: String,
78
+ required: !1,
79
+ default: "Arraste ou clique para fazer upload do arquivo",
80
+ validator: (e) => typeof e == "string"
81
+ },
82
+ uploadProgress: {
83
+ type: Number,
84
+ required: !1,
85
+ default: 0,
86
+ validator: (e) => typeof e == "number"
87
+ },
88
+ acceptTypes: {
89
+ type: Array,
90
+ default: () => []
91
+ },
92
+ acceptTypesInput: {
93
+ type: String,
94
+ default: "*"
95
+ },
96
+ maxFileSize: {
97
+ type: Number,
98
+ required: !1,
99
+ default: void 0,
100
+ validator: (e) => typeof e == "number"
101
+ }
102
+ },
103
+ emits: ["updateFile", "updateProgress", "uploadError"],
104
+ setup(e, { emit: l }) {
105
+ const n = f(null), i = f(e.uploadProgress), c = (t) => {
106
+ if (t.preventDefault(), t.dataTransfer) {
107
+ const r = t.dataTransfer.files, a = s(Array.from(r));
108
+ a.length && (n.value = a[0], l("updateFile", n.value));
109
+ }
110
+ }, s = (t) => {
111
+ const r = [], a = t.filter((o) => {
112
+ const u = g(o), p = d(o);
113
+ return u || r.push({
114
+ file: o,
115
+ message: `O tipo (${o.type}) do arquivo ${o.name} não é suportado. `
116
+ }), p || r.push({
117
+ file: o,
118
+ message: `O tamanho do arquivo ${o.name} excedeu o limite permitido. `
119
+ }), u && p;
120
+ });
121
+ return r.length && (console.warn(r.map((o) => o.message).join(`
122
+ `)), l("uploadError", r)), a;
123
+ }, d = (t) => e.maxFileSize ? t.size < e.maxFileSize : !0, g = (t) => e.acceptTypes.length ? e.acceptTypes.map((a) => a.toLowerCase()).includes(t.type.toLowerCase()) : !0;
124
+ return {
125
+ handleDrop: c,
126
+ handleFileUpload: async (t) => {
127
+ const r = t.target.files;
128
+ if (!r)
129
+ return;
130
+ const a = s(Array.from(r));
131
+ a.length && (n.value = a[0], l("updateFile", n.value));
132
+ },
133
+ handleRemove: () => {
134
+ n.value = null, i.value = 0, l("updateFile", null), l("updateProgress", 0);
135
+ },
136
+ handleUpdateProgressOnParent: (t) => {
137
+ i.value = t, l("updateProgress", i.value);
138
+ },
139
+ getAcceptedFiles: s,
140
+ isSizeAccepted: d,
141
+ file: n,
142
+ progress: i
143
+ };
144
+ }
145
+ });
146
+ export {
147
+ w as default
148
+ };
@@ -0,0 +1,4 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };
@@ -1,3 +1,4 @@
1
+ import { type PropType } from "vue";
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  warningTextUpload: {
3
4
  type: StringConstructor;
@@ -13,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
13
14
  };
14
15
  uploadInteractionText: {
15
16
  type: StringConstructor;
16
- required: true;
17
+ required: false;
17
18
  default: string;
18
19
  validator: (value: string) => boolean;
19
20
  };
@@ -52,18 +53,6 @@ declare const _default: import("vue").DefineComponent<{
52
53
  default: number;
53
54
  validator: (value: number) => boolean;
54
55
  };
55
- uploadContainerWidth: {
56
- type: StringConstructor;
57
- required: false;
58
- default: string;
59
- validator: (value: string) => boolean;
60
- };
61
- uploadContainerHeight: {
62
- type: StringConstructor;
63
- required: false;
64
- default: string;
65
- validator: (value: string) => boolean;
66
- };
67
56
  progressInterval: {
68
57
  type: NumberConstructor;
69
58
  required: false;
@@ -82,25 +71,33 @@ declare const _default: import("vue").DefineComponent<{
82
71
  default: string;
83
72
  validator: (value: string) => boolean;
84
73
  };
85
- }, {
86
- file: import("vue").Ref<{
87
- readonly lastModified: number;
88
- readonly name: string;
89
- readonly webkitRelativePath: string;
90
- readonly size: number;
91
- readonly type: string;
92
- arrayBuffer: () => Promise<ArrayBuffer>;
93
- slice: (start?: number | undefined, end?: number | undefined, contentType?: string | undefined) => Blob;
94
- stream: () => ReadableStream<Uint8Array>;
95
- text: () => Promise<string>;
96
- } | null>;
97
- progress: import("vue").Ref<number>;
98
- uploadBytes: import("vue").Ref<number>;
99
- handleFileUpload: (event: Event) => Promise<void>;
100
- handleDrop: (event: DragEvent) => void;
101
- handleRemove: () => void;
102
- handleUpdateProgressOnParent: (newValue: number) => void;
103
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateProgress" | "updateFile")[], "updateProgress" | "updateFile", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
74
+ acceptTypes: {
75
+ type: PropType<string[]>;
76
+ default: () => never[];
77
+ };
78
+ acceptTypesInput: {
79
+ type: StringConstructor;
80
+ default: string;
81
+ };
82
+ maxFileSize: {
83
+ type: NumberConstructor;
84
+ required: false;
85
+ default: undefined;
86
+ validator: (value: number) => boolean;
87
+ };
88
+ maxTotalSize: {
89
+ type: NumberConstructor;
90
+ required: false;
91
+ default: undefined;
92
+ validator: (value: number) => boolean;
93
+ };
94
+ maxFiles: {
95
+ type: NumberConstructor;
96
+ required: false;
97
+ default: undefined;
98
+ validator: (value: number) => boolean;
99
+ };
100
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateProgress" | "updateFile" | "uploadError")[], "updateProgress" | "updateFile" | "uploadError", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
104
101
  warningTextUpload: {
105
102
  type: StringConstructor;
106
103
  required: true;
@@ -115,7 +112,7 @@ declare const _default: import("vue").DefineComponent<{
115
112
  };
116
113
  uploadInteractionText: {
117
114
  type: StringConstructor;
118
- required: true;
115
+ required: false;
119
116
  default: string;
120
117
  validator: (value: string) => boolean;
121
118
  };
@@ -154,18 +151,6 @@ declare const _default: import("vue").DefineComponent<{
154
151
  default: number;
155
152
  validator: (value: number) => boolean;
156
153
  };
157
- uploadContainerWidth: {
158
- type: StringConstructor;
159
- required: false;
160
- default: string;
161
- validator: (value: string) => boolean;
162
- };
163
- uploadContainerHeight: {
164
- type: StringConstructor;
165
- required: false;
166
- default: string;
167
- validator: (value: string) => boolean;
168
- };
169
154
  progressInterval: {
170
155
  type: NumberConstructor;
171
156
  required: false;
@@ -184,23 +169,53 @@ declare const _default: import("vue").DefineComponent<{
184
169
  default: string;
185
170
  validator: (value: string) => boolean;
186
171
  };
172
+ acceptTypes: {
173
+ type: PropType<string[]>;
174
+ default: () => never[];
175
+ };
176
+ acceptTypesInput: {
177
+ type: StringConstructor;
178
+ default: string;
179
+ };
180
+ maxFileSize: {
181
+ type: NumberConstructor;
182
+ required: false;
183
+ default: undefined;
184
+ validator: (value: number) => boolean;
185
+ };
186
+ maxTotalSize: {
187
+ type: NumberConstructor;
188
+ required: false;
189
+ default: undefined;
190
+ validator: (value: number) => boolean;
191
+ };
192
+ maxFiles: {
193
+ type: NumberConstructor;
194
+ required: false;
195
+ default: undefined;
196
+ validator: (value: number) => boolean;
197
+ };
187
198
  }>> & {
188
199
  onUpdateProgress?: ((...args: any[]) => any) | undefined;
189
200
  onUpdateFile?: ((...args: any[]) => any) | undefined;
201
+ onUploadError?: ((...args: any[]) => any) | undefined;
190
202
  }, {
191
203
  warningTextUpload: string;
192
- uploadText: string;
193
- uploadInteractionText: string;
194
- multipleSelect: boolean;
195
204
  interactiveTextButton: string;
196
- warningFunction: Function;
197
205
  interactiveTexthref: string;
198
206
  interactiveTextDownloadName: string;
199
- uploadProgress: number;
200
- uploadContainerWidth: string;
201
- uploadContainerHeight: string;
202
- progressInterval: number;
207
+ warningFunction: Function;
208
+ uploadText: string;
209
+ uploadInteractionText: string;
210
+ multipleSelect: boolean;
211
+ acceptTypes: string[];
212
+ acceptTypesInput: string;
203
213
  loadingText: string;
204
214
  completeText: string;
215
+ progressInterval: number;
216
+ uploadProgress: number;
217
+ maxFileSize: number;
218
+ maxTotalSize: number;
219
+ maxFiles: number;
205
220
  }, {}>;
206
221
  export default _default;