@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,257 @@
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
+ 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
+ }, {
101
+ handleDrop: (event: DragEvent) => void;
102
+ handleFileUpload: (event: Event) => Promise<void>;
103
+ handleRemove: (fileToRemove: File) => void;
104
+ handleUpdateProgressOnParent: (newValue: number) => void;
105
+ getAcceptedFiles: (files: File[]) => File[];
106
+ isMaxTotalFilesSizeInRange: (newFiles: File[]) => boolean;
107
+ isMaxFilesInRange: (newFiles: File[]) => boolean;
108
+ isTypeAccepted: (file: File) => boolean;
109
+ isSizeAccepted: (file: File) => boolean;
110
+ files: import("vue").Ref<{
111
+ readonly lastModified: number;
112
+ readonly name: string;
113
+ readonly webkitRelativePath: string;
114
+ readonly size: number;
115
+ readonly type: string;
116
+ arrayBuffer: () => Promise<ArrayBuffer>;
117
+ slice: (start?: number | undefined, end?: number | undefined, contentType?: string | undefined) => Blob;
118
+ stream: () => ReadableStream<Uint8Array>;
119
+ text: () => Promise<string>;
120
+ }[]>;
121
+ progress: import("vue").Ref<number>;
122
+ inputStyle: import("vue").ComputedRef<{
123
+ height: string;
124
+ width: string;
125
+ } | {
126
+ width: string;
127
+ height?: undefined;
128
+ }>;
129
+ uploaderContainerStyle: import("vue").ComputedRef<{
130
+ width: string;
131
+ padding: string;
132
+ } | {
133
+ width?: undefined;
134
+ padding?: undefined;
135
+ }>;
136
+ }, 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<{
137
+ warningTextUpload: {
138
+ type: StringConstructor;
139
+ required: true;
140
+ default: string;
141
+ validator: (value: string) => boolean;
142
+ };
143
+ loadingText: {
144
+ type: StringConstructor;
145
+ required: false;
146
+ default: string;
147
+ validator: (value: string) => boolean;
148
+ };
149
+ completeText: {
150
+ type: StringConstructor;
151
+ required: false;
152
+ default: string;
153
+ validator: (value: string) => boolean;
154
+ };
155
+ progressInterval: {
156
+ type: NumberConstructor;
157
+ required: false;
158
+ default: number;
159
+ validator: (value: number) => boolean;
160
+ };
161
+ interactiveTextButton: {
162
+ type: StringConstructor;
163
+ required: false;
164
+ default: string;
165
+ validator: (value: string) => boolean;
166
+ };
167
+ interactiveTexthref: {
168
+ type: StringConstructor;
169
+ required: false;
170
+ default: string;
171
+ validator: (value: string) => boolean;
172
+ };
173
+ interactiveTextDownloadName: {
174
+ type: StringConstructor;
175
+ required: false;
176
+ default: string;
177
+ validator: (value: string) => boolean;
178
+ };
179
+ warningFunction: {
180
+ type: FunctionConstructor;
181
+ required: false;
182
+ default: () => void;
183
+ };
184
+ multipleSelect: {
185
+ type: BooleanConstructor;
186
+ required: false;
187
+ default: boolean;
188
+ validator: (value: boolean) => boolean;
189
+ };
190
+ uploadText: {
191
+ type: StringConstructor;
192
+ required: false;
193
+ default: string;
194
+ validator: (value: string) => boolean;
195
+ };
196
+ uploadInteractionText: {
197
+ type: StringConstructor;
198
+ required: false;
199
+ default: string;
200
+ validator: (value: string) => boolean;
201
+ };
202
+ uploadProgress: {
203
+ type: NumberConstructor;
204
+ required: false;
205
+ default: number;
206
+ validator: (value: number) => boolean;
207
+ };
208
+ acceptTypes: {
209
+ type: PropType<string[]>;
210
+ default: () => never[];
211
+ };
212
+ acceptTypesInput: {
213
+ type: StringConstructor;
214
+ default: string;
215
+ };
216
+ maxFileSize: {
217
+ type: NumberConstructor;
218
+ required: false;
219
+ default: undefined;
220
+ validator: (value: number) => boolean;
221
+ };
222
+ maxTotalSize: {
223
+ type: NumberConstructor;
224
+ required: false;
225
+ default: undefined;
226
+ validator: (value: number) => boolean;
227
+ };
228
+ maxFiles: {
229
+ type: NumberConstructor;
230
+ required: false;
231
+ default: undefined;
232
+ validator: (value: number) => boolean;
233
+ };
234
+ }>> & {
235
+ onUpdateProgress?: ((...args: any[]) => any) | undefined;
236
+ onUpdateFile?: ((...args: any[]) => any) | undefined;
237
+ onUploadError?: ((...args: any[]) => any) | undefined;
238
+ }, {
239
+ warningTextUpload: string;
240
+ interactiveTextButton: string;
241
+ interactiveTexthref: string;
242
+ interactiveTextDownloadName: string;
243
+ warningFunction: Function;
244
+ uploadText: string;
245
+ uploadInteractionText: string;
246
+ multipleSelect: boolean;
247
+ acceptTypes: string[];
248
+ acceptTypesInput: string;
249
+ loadingText: string;
250
+ completeText: string;
251
+ progressInterval: number;
252
+ uploadProgress: number;
253
+ maxFileSize: number;
254
+ maxTotalSize: number;
255
+ maxFiles: number;
256
+ }, {}>;
257
+ export default _default;
@@ -0,0 +1,58 @@
1
+ import c from "./MultipleUpload.vue2.js";
2
+ import { resolveComponent as p, openBlock as t, createElementBlock as o, createVNode as r, createElementVNode as n, normalizeStyle as l, Fragment as m, renderList as v, createCommentVNode as f, pushScopeId as h, popScopeId as y } from "vue";
3
+ import "./MultipleUpload.vue3.js";
4
+ import $ from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const g = (e) => (h("data-v-86b31a14"), e = e(), y(), e), w = { class: "at-uploader-multiple-input-container" }, U = {
6
+ key: 0,
7
+ class: "at-uploader-file-container"
8
+ }, I = /* @__PURE__ */ g(() => /* @__PURE__ */ n("span", null, "Arquivos", -1)), T = { class: "at-uploader-files" };
9
+ function S(e, P, B, _, b, k) {
10
+ const i = p("UploaderHeader"), s = p("UploaderInput"), d = p("AtProgressBar");
11
+ return t(), o("div", null, [
12
+ r(i, {
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
+ n("div", {
20
+ class: "at-uploader-multiple",
21
+ style: l(e.uploaderContainerStyle)
22
+ }, [
23
+ n("div", w, [
24
+ r(s, {
25
+ style: l(e.inputStyle),
26
+ "handle-drop": e.handleDrop,
27
+ "upload-text": e.$props.uploadText,
28
+ "upload-interaction-text": e.$props.uploadInteractionText,
29
+ "multiple-select": e.$props.multipleSelect,
30
+ "accept-types": e.$props.acceptTypes,
31
+ "accept-types-input": e.$props.acceptTypesInput,
32
+ "handle-file-upload": e.handleFileUpload
33
+ }, null, 8, ["style", "handle-drop", "upload-text", "upload-interaction-text", "multiple-select", "accept-types", "accept-types-input", "handle-file-upload"])
34
+ ]),
35
+ e.files && e.files.length ? (t(), o("div", U, [
36
+ I,
37
+ n("div", T, [
38
+ (t(!0), o(m, null, v(e.files, (a, u) => (t(), o("div", {
39
+ key: a.name + u,
40
+ class: "at-uploader-file"
41
+ }, [
42
+ r(d, {
43
+ file: a,
44
+ "handle-remove-file": () => e.handleRemove(a),
45
+ "is-only-use": !1,
46
+ interval: e.$props.progressInterval,
47
+ onUpdateProgress: e.handleUpdateProgressOnParent
48
+ }, null, 8, ["file", "handle-remove-file", "interval", "onUpdateProgress"])
49
+ ]))), 128))
50
+ ])
51
+ ])) : f("", !0)
52
+ ], 4)
53
+ ]);
54
+ }
55
+ const V = /* @__PURE__ */ $(c, [["render", S], ["__scopeId", "data-v-86b31a14"]]);
56
+ export {
57
+ V as default
58
+ };
@@ -0,0 +1,187 @@
1
+ import { defineComponent as h, ref as g, computed as y } from "vue";
2
+ import x from "../../ProgressBar/ProgressBar.vue.js";
3
+ import q from "../UploaderHeader/UploaderHeader.vue.js";
4
+ import T from "../UploaderInput/UploaderInput.vue.js";
5
+ const I = h({
6
+ name: "MultipleUpload",
7
+ components: {
8
+ AtProgressBar: x,
9
+ UploaderHeader: q,
10
+ UploaderInput: T
11
+ },
12
+ props: {
13
+ warningTextUpload: {
14
+ type: String,
15
+ required: !0,
16
+ default: "Texto de aviso sobre o upload",
17
+ validator: (e) => typeof e == "string"
18
+ },
19
+ loadingText: {
20
+ type: String,
21
+ required: !1,
22
+ default: "Estamos analisando o arquivo, em breve, retornaremos com os resultados.",
23
+ validator: (e) => typeof e == "string"
24
+ },
25
+ completeText: {
26
+ type: String,
27
+ required: !1,
28
+ default: "O upload foi concluído.",
29
+ validator: (e) => typeof e == "string"
30
+ },
31
+ progressInterval: {
32
+ type: Number,
33
+ required: !1,
34
+ default: 1e3,
35
+ validator: (e) => typeof e == "number"
36
+ },
37
+ interactiveTextButton: {
38
+ type: String,
39
+ required: !1,
40
+ default: "",
41
+ validator: (e) => typeof e == "string"
42
+ },
43
+ interactiveTexthref: {
44
+ type: String,
45
+ required: !1,
46
+ default: "",
47
+ validator: (e) => typeof e == "string"
48
+ },
49
+ interactiveTextDownloadName: {
50
+ type: String,
51
+ required: !1,
52
+ default: "",
53
+ validator: (e) => typeof e == "string"
54
+ },
55
+ warningFunction: {
56
+ type: Function,
57
+ required: !1,
58
+ default: () => {
59
+ console.warn("This is a warning");
60
+ }
61
+ },
62
+ multipleSelect: {
63
+ type: Boolean,
64
+ required: !1,
65
+ default: !1,
66
+ validator: (e) => typeof e == "boolean"
67
+ },
68
+ uploadText: {
69
+ type: String,
70
+ required: !1,
71
+ default: "Importe seu arquivo aqui",
72
+ validator: (e) => typeof e == "string"
73
+ },
74
+ uploadInteractionText: {
75
+ type: String,
76
+ required: !1,
77
+ default: "Arraste ou clique para fazer upload do arquivo",
78
+ validator: (e) => typeof e == "string"
79
+ },
80
+ uploadProgress: {
81
+ type: Number,
82
+ required: !1,
83
+ default: 0,
84
+ validator: (e) => typeof e == "number"
85
+ },
86
+ acceptTypes: {
87
+ type: Array,
88
+ default: () => []
89
+ },
90
+ acceptTypesInput: {
91
+ type: String,
92
+ default: "*"
93
+ },
94
+ maxFileSize: {
95
+ type: Number,
96
+ required: !1,
97
+ default: void 0,
98
+ validator: (e) => typeof e == "number"
99
+ },
100
+ maxTotalSize: {
101
+ type: Number,
102
+ required: !1,
103
+ default: void 0,
104
+ validator: (e) => typeof e == "number"
105
+ },
106
+ maxFiles: {
107
+ type: Number,
108
+ required: !1,
109
+ default: void 0,
110
+ validator: (e) => typeof e == "number"
111
+ }
112
+ },
113
+ emits: ["updateFile", "updateProgress", "uploadError"],
114
+ setup(e, { emit: l }) {
115
+ const r = g([]), u = g(e.uploadProgress), v = (t) => {
116
+ if (t.preventDefault(), t.dataTransfer) {
117
+ const a = Array.from(t.dataTransfer.files), o = d(a);
118
+ o.length && (r.value.push(...o), l("updateFile", r.value));
119
+ }
120
+ }, d = (t) => {
121
+ const a = [];
122
+ if (!c(t) || !m(t))
123
+ return [];
124
+ const o = t.filter((i) => {
125
+ const n = f(i), s = p(i);
126
+ return n || a.push({
127
+ file: i,
128
+ message: `O tipo (${i.type}) do arquivo ${i.name} não é suportado. `
129
+ }), s || a.push({
130
+ file: i,
131
+ message: `O tamanho do arquivo ${i.name} excedeu o limite permitido. `
132
+ }), n && s;
133
+ });
134
+ return a.length && (console.warn(a.map((i) => i.message).join(`
135
+ `)), l("uploadError", a)), o;
136
+ }, p = (t) => e.maxFileSize ? t.size < e.maxFileSize : !0, f = (t) => e.acceptTypes.length ? e.acceptTypes.map((o) => o.toLowerCase()).includes(t.type.toLowerCase()) : !0, c = (t) => {
137
+ const a = [], o = t.length + r.value.length;
138
+ return e.maxFiles && o > e.maxFiles ? (a.push({
139
+ file: t[0],
140
+ message: `O tamanho limite de arquivos foi excedido (${e.maxFiles})`
141
+ }), console.warn(a.map((i) => i.message).join(`
142
+ `)), l("uploadError", a), !1) : !0;
143
+ }, m = (t) => {
144
+ const a = [], o = r.value.reduce(
145
+ (n, s) => n + s.size,
146
+ 0
147
+ ), i = t.reduce(
148
+ (n, s) => n + s.size,
149
+ 0
150
+ );
151
+ return e.maxTotalSize && i + o > e.maxTotalSize ? (a.push({
152
+ file: t[0],
153
+ message: `A soma de tamanho dos arquivos foi excedida, máximo permitido: ${e.maxTotalSize} B `
154
+ }), console.warn(a.map((n) => n.message).join(`
155
+ `)), l("uploadError", a), !1) : !0;
156
+ };
157
+ return {
158
+ handleDrop: v,
159
+ handleFileUpload: async (t) => {
160
+ const a = t.target.files;
161
+ if (!a)
162
+ return;
163
+ const o = d(Array.from(a));
164
+ o.length && (r.value.push(...o), l("updateFile", r.value));
165
+ },
166
+ handleRemove: (t) => {
167
+ const a = r.value.indexOf(t);
168
+ a !== -1 && (r.value.splice(a, 1), r.value.length === 0 && (u.value = 0, l("updateProgress", 0)), l("updateFile", r.value));
169
+ },
170
+ handleUpdateProgressOnParent: (t) => {
171
+ u.value = t, l("updateProgress", u.value);
172
+ },
173
+ getAcceptedFiles: d,
174
+ isMaxTotalFilesSizeInRange: m,
175
+ isMaxFilesInRange: c,
176
+ isTypeAccepted: f,
177
+ isSizeAccepted: p,
178
+ files: r,
179
+ progress: u,
180
+ inputStyle: y(() => r.value.length > 0 ? { height: "256px", width: "256px" } : { width: "100%" }),
181
+ uploaderContainerStyle: y(() => r.value.length <= 0 ? { width: "100%", padding: "0px" } : {})
182
+ };
183
+ }
184
+ });
185
+ export {
186
+ I as default
187
+ };
@@ -0,0 +1,4 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };