@agrotools1/at-components1 1.1.1 → 1.1.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/README.md +71 -71
  2. package/dist/Accordion/Accordion.vue.js +81 -0
  3. package/dist/Accordion/Accordion.vue2.js +72 -0
  4. package/dist/Avatar/Avatar.vue.js +26 -0
  5. package/dist/Avatar/Avatar.vue2.js +58 -0
  6. package/dist/Button/Button.vue.js +30 -0
  7. package/dist/Button/Button.vue2.js +43 -0
  8. package/dist/CardWithInsights/CardWithInsights.vue.js +60 -0
  9. package/dist/CardWithInsights/CardWithInsights.vue2.js +32 -0
  10. package/dist/Checkbox/Checkbox.vue.js +38 -0
  11. package/dist/Checkbox/Checkbox.vue2.js +73 -0
  12. package/dist/Checkbox/img/checkmarck.svg.js +4 -0
  13. package/dist/ColorPicker/ColorPicker.Saturation.vue.js +30 -0
  14. package/dist/ColorPicker/ColorPicker.Saturation.vue2.js +82 -0
  15. package/dist/ColorPicker/ColorPicker.vue.js +88 -0
  16. package/dist/ColorPicker/ColorPicker.vue2.js +180 -0
  17. package/dist/DataTable/Column/Column.vue.js +37 -0
  18. package/dist/DataTable/Column/Column.vue2.js +40 -0
  19. package/dist/DataTable/Column/imgs/filter.svg.js +4 -0
  20. package/dist/DataTable/Counters/Counters.vue.js +44 -0
  21. package/dist/DataTable/Counters/Counters.vue2.js +70 -0
  22. package/dist/DataTable/Counters/imgs/close.svg.js +4 -0
  23. package/dist/DataTable/DataTable.vue.js +130 -0
  24. package/dist/DataTable/DataTable.vue2.js +189 -0
  25. package/dist/DataTable/index.js +11 -0
  26. package/dist/DatePicker/DatePicker.helper.js +99 -0
  27. package/dist/DatePicker/DatePicker.vue.js +123 -0
  28. package/dist/DatePicker/DatePicker.vue2.js +237 -0
  29. package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.helper.js +58 -0
  30. package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.vue.js +34 -0
  31. package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.vue2.js +59 -0
  32. package/dist/DatePicker/DatePickerHeader/DatePickerHeader.vue.js +50 -0
  33. package/dist/DatePicker/DatePickerHeader/DatePickerHeader.vue2.js +47 -0
  34. package/dist/DatePicker/DatePickerListSelector/DatePickerListSelector.vue.js +20 -0
  35. package/dist/DatePicker/DatePickerListSelector/DatePickerListSelector.vue2.js +89 -0
  36. package/dist/DatePicker/DatePickerTime/DatePickerTime.vue.d.ts +2 -0
  37. package/dist/DatePicker/DatePickerTime/DatePickerTime.vue.d.ts.map +1 -1
  38. package/dist/DatePicker/DatePickerTime/DatePickerTime.vue.js +73 -0
  39. package/dist/DatePicker/DatePickerTime/DatePickerTime.vue2.js +71 -0
  40. package/dist/Dropdown/Checklist/Dropdown.Checklist.vue.d.ts +16 -16
  41. package/dist/Dropdown/Checklist/Dropdown.Checklist.vue.js +151 -0
  42. package/dist/Dropdown/Checklist/Dropdown.Checklist.vue2.js +84 -0
  43. package/dist/Dropdown/Checklist/draggable.js +68 -0
  44. package/dist/Dropdown/Dropdown.core.vue.js +47 -0
  45. package/dist/Dropdown/Dropdown.core.vue2.js +112 -0
  46. package/dist/Dropdown/DropdownContent/DropdownContent.vue.js +10 -0
  47. package/dist/Dropdown/DropdownContent/DropdownContent.vue2.js +9 -0
  48. package/dist/Faq/Faq.vue.js +41 -0
  49. package/dist/Faq/Faq.vue2.js +41 -0
  50. package/dist/Faq/FaqItem/FaqItem.vue.js +56 -0
  51. package/dist/Faq/FaqItem/FaqItem.vue2.js +32 -0
  52. package/dist/Filter/Filter.vue.js +222 -0
  53. package/dist/Filter/Filter.vue2.js +129 -0
  54. package/dist/Icons/icons.d.ts +2 -0
  55. package/dist/Icons/icons.d.ts.map +1 -1
  56. package/dist/Icons/icons.js +26 -0
  57. package/dist/Illustration/Illustration.js +127 -0
  58. package/dist/Illustration/Illustration.vue.js +17 -0
  59. package/dist/Illustration/Illustration.vue2.js +32 -0
  60. package/dist/Input/Input.core.vue.d.ts +2 -0
  61. package/dist/Input/Input.core.vue.d.ts.map +1 -1
  62. package/dist/Input/Input.core.vue.js +120 -0
  63. package/dist/Input/Input.core.vue2.js +239 -0
  64. package/dist/Input/Text-area.vue.d.ts +2 -0
  65. package/dist/Input/Text-area.vue.d.ts.map +1 -1
  66. package/dist/Input/Text-area.vue.js +16 -0
  67. package/dist/Input/Text-area.vue2.js +14 -0
  68. package/dist/Input/imgs/error.svg.js +4 -0
  69. package/dist/Input/index.d.ts +4 -0
  70. package/dist/Input/index.d.ts.map +1 -1
  71. package/dist/Input/index.js +9 -0
  72. package/dist/Legend/Legend.vue.js +60 -0
  73. package/dist/Legend/Legend.vue2.js +51 -0
  74. package/dist/List/components/List.vue.d.ts +4 -4
  75. package/dist/List/components/List.vue.js +86 -0
  76. package/dist/List/components/List.vue2.js +92 -0
  77. package/dist/Loading/Loading.vue.js +21 -0
  78. package/dist/Loading/Loading.vue2.js +16 -0
  79. package/dist/Menu/Menu.vue.d.ts +8 -4
  80. package/dist/Menu/Menu.vue.d.ts.map +1 -1
  81. package/dist/Menu/Menu.vue.js +185 -0
  82. package/dist/Menu/Menu.vue2.js +85 -0
  83. package/dist/Menu/assets/agrotools.svg.js +4 -0
  84. package/dist/Menu/assets/at.svg.js +4 -0
  85. package/dist/Modal/Modal.vue.js +127 -0
  86. package/dist/Modal/Modal.vue2.js +77 -0
  87. package/dist/Modal/images/cross.svg.js +4 -0
  88. package/dist/Notifications/Notification/Notification.vue.js +59 -0
  89. package/dist/Notifications/Notification/Notification.vue2.js +78 -0
  90. package/dist/Notifications/Notifications.vue.js +55 -0
  91. package/dist/Notifications/Notifications.vue2.js +56 -0
  92. package/dist/Paginator/Paginator.vue.js +119 -0
  93. package/dist/Paginator/Paginator.vue2.js +110 -0
  94. package/dist/Paginator/imgs/double-left-arrow.svg.js +4 -0
  95. package/dist/Paginator/imgs/double-right-arrow.svg.js +4 -0
  96. package/dist/Paginator/imgs/left-arrow.svg.js +4 -0
  97. package/dist/Paginator/imgs/right-arrow.svg.js +4 -0
  98. package/dist/ProgressBar/ProgressBar.vue.js +84 -0
  99. package/dist/ProgressBar/ProgressBar.vue2.js +83 -0
  100. package/dist/RadioButton/RadioButton.vue.js +46 -0
  101. package/dist/RadioButton/RadioButton.vue2.js +57 -0
  102. package/dist/Search/Search.vue.d.ts +6 -4
  103. package/dist/Search/Search.vue.d.ts.map +1 -1
  104. package/dist/Search/Search.vue.js +53 -0
  105. package/dist/Search/Search.vue2.js +144 -0
  106. package/dist/Select/Item/Item.vue.js +52 -0
  107. package/dist/Select/Item/Item.vue2.js +62 -0
  108. package/dist/Select/Multiple/Select.multiple.vue.d.ts +2 -0
  109. package/dist/Select/Multiple/Select.multiple.vue.d.ts.map +1 -1
  110. package/dist/Select/Multiple/Select.multiple.vue.js +59 -0
  111. package/dist/Select/Multiple/Select.multiple.vue2.js +137 -0
  112. package/dist/Select/Select.core.vue.d.ts +2 -0
  113. package/dist/Select/Select.core.vue.d.ts.map +1 -1
  114. package/dist/Select/Select.core.vue.js +52 -0
  115. package/dist/Select/Select.core.vue2.js +140 -0
  116. package/dist/Select/Single/Select.single.vue.d.ts +2 -0
  117. package/dist/Select/Single/Select.single.vue.d.ts.map +1 -1
  118. package/dist/Select/Single/Select.single.vue.js +74 -0
  119. package/dist/Select/Single/Select.single.vue2.js +160 -0
  120. package/dist/Select/imgs/indicator.svg.js +4 -0
  121. package/dist/Select/index.d.ts +4 -0
  122. package/dist/Select/index.d.ts.map +1 -1
  123. package/dist/Select/index.js +9 -0
  124. package/dist/Skeleton/Skeleton.vue.js +16 -0
  125. package/dist/Skeleton/Skeleton.vue2.js +19 -0
  126. package/dist/Stepper/Stepper.vue.js +110 -0
  127. package/dist/Stepper/Stepper.vue2.js +109 -0
  128. package/dist/TableConfig/TableConfig.vue.d.ts +20 -20
  129. package/dist/TableConfig/TableConfig.vue.js +72 -0
  130. package/dist/TableConfig/TableConfig.vue2.js +108 -0
  131. package/dist/Tabs/Tab/Tab.vue.d.ts +1 -1
  132. package/dist/Tabs/Tab/Tab.vue.js +7 -0
  133. package/dist/Tabs/Tab/Tab.vue2.js +62 -0
  134. package/dist/Tabs/Tabs.vue.d.ts +1 -1
  135. package/dist/Tabs/Tabs.vue.js +44 -0
  136. package/dist/Tabs/Tabs.vue2.js +63 -0
  137. package/dist/Tag/Tag.vue.js +37 -0
  138. package/dist/Tag/Tag.vue2.js +86 -0
  139. package/dist/Tipograph/Paragraph/Paragraph.vue.js +18 -0
  140. package/dist/Tipograph/Paragraph/Paragraph.vue2.js +21 -0
  141. package/dist/Tipograph/Title/Title.vue.js +18 -0
  142. package/dist/Tipograph/Title/Title.vue2.js +21 -0
  143. package/dist/Tipograph/index.js +9 -0
  144. package/dist/Toggle/Toggle.vue.js +30 -0
  145. package/dist/Toggle/Toggle.vue2.js +53 -0
  146. package/dist/Tooltip/Tooltip.vue.js +66 -0
  147. package/dist/Tooltip/Tooltip.vue2.js +234 -0
  148. package/dist/Upload/MultipleUpload/MultipleUpload.vue.d.ts.map +1 -1
  149. package/dist/Upload/MultipleUpload/MultipleUpload.vue.js +58 -0
  150. package/dist/Upload/MultipleUpload/MultipleUpload.vue2.js +198 -0
  151. package/dist/Upload/SingleUpload/SingleUpload.vue.d.ts.map +1 -1
  152. package/dist/Upload/SingleUpload/SingleUpload.vue.js +51 -0
  153. package/dist/Upload/SingleUpload/SingleUpload.vue2.js +156 -0
  154. package/dist/Upload/Upload.vue.d.ts.map +1 -1
  155. package/dist/Upload/Upload.vue.js +57 -0
  156. package/dist/Upload/Upload.vue2.js +118 -0
  157. package/dist/Upload/UploaderHeader/UploaderHeader.vue.js +30 -0
  158. package/dist/Upload/UploaderHeader/UploaderHeader.vue2.js +51 -0
  159. package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue.js +31 -0
  160. package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue2.js +34 -0
  161. package/dist/Upload/UploaderInput/UploaderInput.vue.js +63 -0
  162. package/dist/Upload/UploaderInput/UploaderInput.vue2.js +63 -0
  163. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  164. package/dist/assets/illustrations/renovabio/biomass.svg.js +4 -0
  165. package/dist/assets/illustrations/renovabio/volume.svg.js +4 -0
  166. package/dist/assets/illustrations/system/add-file.svg.js +4 -0
  167. package/dist/assets/illustrations/system/cloud-connection.svg.js +4 -0
  168. package/dist/assets/illustrations/system/cloud-download.svg.js +4 -0
  169. package/dist/assets/illustrations/system/cloud-upload.svg.js +4 -0
  170. package/dist/assets/illustrations/system/corrupted-file.svg.js +4 -0
  171. package/dist/assets/illustrations/system/dynamic-production.svg.js +4 -0
  172. package/dist/assets/illustrations/system/empty-box.svg.js +4 -0
  173. package/dist/assets/illustrations/system/empty-folder-2.svg.js +4 -0
  174. package/dist/assets/illustrations/system/empty-folder.svg.js +4 -0
  175. package/dist/assets/illustrations/system/empty.svg.js +4 -0
  176. package/dist/assets/illustrations/system/error-illustration.svg.js +4 -0
  177. package/dist/assets/illustrations/system/error.svg.js +4 -0
  178. package/dist/assets/illustrations/system/file-backup-2.svg.js +4 -0
  179. package/dist/assets/illustrations/system/file-backup.svg.js +4 -0
  180. package/dist/assets/illustrations/system/filtering-upload.svg.js +4 -0
  181. package/dist/assets/illustrations/system/flight.svg.js +4 -0
  182. package/dist/assets/illustrations/system/fly.svg.js +4 -0
  183. package/dist/assets/illustrations/system/movies.svg.js +4 -0
  184. package/dist/assets/illustrations/system/multimedia.svg.js +4 -0
  185. package/dist/assets/illustrations/system/notification-bell.svg.js +4 -0
  186. package/dist/assets/illustrations/system/page-2.svg.js +4 -0
  187. package/dist/assets/illustrations/system/page.svg.js +4 -0
  188. package/dist/assets/illustrations/system/photos.svg.js +4 -0
  189. package/dist/assets/illustrations/system/recycle-bin.svg.js +4 -0
  190. package/dist/assets/illustrations/system/rocket-launch.svg.js +4 -0
  191. package/dist/assets/illustrations/system/search-territory.svg.js +4 -0
  192. package/dist/assets/illustrations/system/signal.svg.js +4 -0
  193. package/dist/assets/illustrations/system/siren.svg.js +4 -0
  194. package/dist/assets/illustrations/system/wrong.svg.js +4 -0
  195. package/dist/assets/illustrations/tools/advanced-analysis.svg.js +4 -0
  196. package/dist/assets/illustrations/tools/agriculture.svg.js +4 -0
  197. package/dist/assets/illustrations/tools/alert-center.svg.js +4 -0
  198. package/dist/assets/illustrations/tools/area.svg.js +4 -0
  199. package/dist/assets/illustrations/tools/at-insights.svg.js +4 -0
  200. package/dist/assets/illustrations/tools/conservation-unit.svg.js +4 -0
  201. package/dist/assets/illustrations/tools/credit.svg.js +4 -0
  202. package/dist/assets/illustrations/tools/deforestation.svg.js +4 -0
  203. package/dist/assets/illustrations/tools/distance-proximity-rivers.svg.js +4 -0
  204. package/dist/assets/illustrations/tools/estimated-productivity-penalty.svg.js +4 -0
  205. package/dist/assets/illustrations/tools/extract.svg.js +4 -0
  206. package/dist/assets/illustrations/tools/farm.svg.js +4 -0
  207. package/dist/assets/illustrations/tools/geographical-consultation-municipalities.svg.js +4 -0
  208. package/dist/assets/illustrations/tools/gix.svg.js +4 -0
  209. package/dist/assets/illustrations/tools/inapto.svg.js +4 -0
  210. package/dist/assets/illustrations/tools/insurance.svg.js +4 -0
  211. package/dist/assets/illustrations/tools/land-appreciation.svg.js +4 -0
  212. package/dist/assets/illustrations/tools/lockdown.svg.js +4 -0
  213. package/dist/assets/illustrations/tools/map.svg.js +4 -0
  214. package/dist/assets/illustrations/tools/pasture.svg.js +4 -0
  215. package/dist/assets/illustrations/tools/rating-2.svg.js +4 -0
  216. package/dist/assets/illustrations/tools/rating.svg.js +4 -0
  217. package/dist/assets/illustrations/tools/recurrence.svg.js +4 -0
  218. package/dist/assets/illustrations/tools/refrigerators.svg.js +4 -0
  219. package/dist/assets/illustrations/tools/settings.svg.js +4 -0
  220. package/dist/assets/illustrations/tools/socio-environmental-analysis.svg.js +4 -0
  221. package/dist/assets/illustrations/tools/soil-use.svg.js +4 -0
  222. package/dist/assets/illustrations/tools/storm.svg.js +4 -0
  223. package/dist/assets/illustrations/tools/territory-details.svg.js +4 -0
  224. package/dist/assets/illustrations/tools/timeline.svg.js +4 -0
  225. package/dist/at-components1.css +1 -0
  226. package/dist/composables/useBootstrapWrapper.js +7 -0
  227. package/dist/index.css +1 -3
  228. package/dist/index.js +68 -16654
  229. package/package.json +15 -6
@@ -0,0 +1,51 @@
1
+ import i from "./SingleUpload.vue2.js";
2
+ import { resolveComponent as t, createElementBlock as r, openBlock as o, createVNode as n, createElementVNode as d, createBlock as c } from "vue";
3
+ /* empty css */
4
+ import u from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const m = { class: "at-uploader-single" }, g = {
6
+ key: 1,
7
+ class: "at-uploader-status-container at-uploader-loading-input-container variant"
8
+ };
9
+ function f(e, v, $, h, T, U) {
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", g, [
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
+ title: e.progress < 100 ? e.$props.loadingText : e.$props.completeText,
42
+ onUpdateProgress: e.handleUpdateProgressOnParent
43
+ }, null, 8, ["file", "handle-remove-file", "interval", "title", "onUpdateProgress"])
44
+ ]))
45
+ ])
46
+ ]);
47
+ }
48
+ const x = /* @__PURE__ */ u(i, [["render", f], ["__scopeId", "data-v-12e8d525"]]);
49
+ export {
50
+ x as default
51
+ };
@@ -0,0 +1,156 @@
1
+ import { defineComponent as g, ref as c } from "vue";
2
+ import m from "../../ProgressBar/ProgressBar.vue.js";
3
+ import v from "../UploaderHeader/UploaderHeader.vue.js";
4
+ import T from "../UploaderInfoProgress/UploaderInfoProgress.vue.js";
5
+ import q from "../UploaderInput/UploaderInput.vue.js";
6
+ const I = g({
7
+ name: "SingleUpload",
8
+ components: {
9
+ UploaderInfoProgress: T,
10
+ AtProgressBar: m,
11
+ UploaderHeader: v,
12
+ UploaderInput: q
13
+ },
14
+ props: {
15
+ warningTextUpload: {
16
+ type: String,
17
+ required: !1,
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 = c(null), s = c(e.uploadProgress), f = (t) => {
106
+ if (t.preventDefault(), t.dataTransfer) {
107
+ const a = t.dataTransfer.files, o = d(Array.from(a));
108
+ o.length && (n.value = o[0], l("updateFile", n.value));
109
+ }
110
+ }, d = (t) => {
111
+ const a = [], o = t.filter((r) => {
112
+ const i = y(r), u = p(r);
113
+ return i || a.push({
114
+ file: r,
115
+ type: "unsupported_type",
116
+ message: `O tipo (${r.type}) do arquivo ${r.name} não é suportado. `
117
+ }), u || a.push({
118
+ file: r,
119
+ type: "exceeded_file_size",
120
+ message: `O tamanho do arquivo ${r.name} excedeu o limite permitido. `
121
+ }), i && u;
122
+ });
123
+ return a.length && (console.warn(a.map((r) => r.message).join(`
124
+ `)), l("uploadError", a)), o;
125
+ }, p = (t) => e.maxFileSize ? t.size < e.maxFileSize : !0, y = (t) => {
126
+ if (!e.acceptTypes.length && (!e.acceptTypesInput || e.acceptTypesInput === "*"))
127
+ return !0;
128
+ if (e.acceptTypes.length)
129
+ return e.acceptTypes.map((i) => i.toLowerCase()).includes(t.type.toLowerCase());
130
+ const a = t.name.split(".").pop();
131
+ return e.acceptTypesInput.split(",").some((r) => r.includes(a || ""));
132
+ };
133
+ return {
134
+ handleDrop: f,
135
+ handleFileUpload: async (t) => {
136
+ const a = t.target.files;
137
+ if (!a) return;
138
+ const o = d(Array.from(a));
139
+ o.length && (n.value = o[0], l("updateFile", n.value));
140
+ },
141
+ handleRemove: () => {
142
+ n.value = null, s.value = 0, l("updateFile", null), l("updateProgress", 0);
143
+ },
144
+ handleUpdateProgressOnParent: (t) => {
145
+ s.value = t, l("updateProgress", s.value);
146
+ },
147
+ getAcceptedFiles: d,
148
+ isSizeAccepted: p,
149
+ file: n,
150
+ progress: s
151
+ };
152
+ }
153
+ });
154
+ export {
155
+ I as default
156
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Upload.vue.d.ts","sourceRoot":"","sources":["../../src/Upload/Upload.vue"],"names":[],"mappings":"AAyLA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;;;;;;2BAgBV,MAAM;;;;;;2BAMN,MAAM;;;;;;2BAMN,MAAM;;;;;;2BAMN,OAAO;;;;;;2BAMP,MAAM;;;;;;;;;;;2BAaN,MAAM;;;;;;2BAMN,MAAM;;;;;;2BAMN,MAAM;;;;;;2BAMN,MAAM;;;;;;2BAMN,MAAM;;;;;;2BAMN,MAAM;;;cAGV,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;2BAWd,MAAM;;;;;;2BAMN,MAAM;;;;;;2BAMN,MAAM;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlClB,wBAgHC"}
@@ -0,0 +1,57 @@
1
+ import l from "./Upload.vue2.js";
2
+ import { resolveComponent as r, createElementBlock as s, openBlock as o, createBlock as a } from "vue";
3
+ /* empty css */
4
+ import d from "../_virtual/_plugin-vue_export-helper.js";
5
+ const u = { class: "at-uploader-container" };
6
+ function m(e, t, $, g, v, c) {
7
+ const n = r("SingleUpload"), i = r("MultipleUpload");
8
+ return o(), s("div", u, [
9
+ e.$props.multipleSelect ? (o(), a(i, {
10
+ key: 1,
11
+ "complete-text": e.$props.completeText,
12
+ "loading-text": e.$props.loadingText,
13
+ "progress-interval": e.$props.progressInterval,
14
+ "warning-text-upload": e.$props.warningTextUpload,
15
+ "multiple-select": e.$props.multipleSelect,
16
+ "accept-types": e.$props.acceptTypes,
17
+ "accept-types-input": e.$props.acceptTypesInput,
18
+ "max-file-size": e.$props.maxFileSize,
19
+ "max-files": e.$props.maxFiles,
20
+ "max-total-size": e.$props.maxTotalSize,
21
+ "interactive-text-button": e.$props.interactiveTextButton,
22
+ "interactive-text-download-name": e.$props.interactiveTextDownloadName,
23
+ "interactive-texthref": e.$props.interactiveTexthref,
24
+ "upload-progress": e.$props.uploadProgress,
25
+ "warning-function": e.$props.warningFunction,
26
+ "upload-interaction-text": e.$props.uploadInteractionText,
27
+ "upload-text": e.$props.uploadText,
28
+ onUpdateFile: t[3] || (t[3] = (p) => e.$emit("updateFile", p)),
29
+ onUpdateProgress: t[4] || (t[4] = (p) => e.$emit("updateProgress", p)),
30
+ onUploadError: t[5] || (t[5] = (p) => e.$emit("uploadError", p))
31
+ }, null, 8, ["complete-text", "loading-text", "progress-interval", "warning-text-upload", "multiple-select", "accept-types", "accept-types-input", "max-file-size", "max-files", "max-total-size", "interactive-text-button", "interactive-text-download-name", "interactive-texthref", "upload-progress", "warning-function", "upload-interaction-text", "upload-text"])) : (o(), a(n, {
32
+ key: 0,
33
+ "complete-text": e.$props.completeText,
34
+ "loading-text": e.$props.loadingText,
35
+ "progress-interval": e.$props.progressInterval,
36
+ "warning-text-upload": e.$props.warningTextUpload,
37
+ "multiple-select": e.$props.multipleSelect,
38
+ "accept-types": e.$props.acceptTypes,
39
+ "accept-types-input": e.$props.acceptTypesInput,
40
+ "max-file-size": e.$props.maxFileSize,
41
+ "interactive-text-button": e.$props.interactiveTextButton,
42
+ "interactive-text-download-name": e.$props.interactiveTextDownloadName,
43
+ "interactive-texthref": e.$props.interactiveTexthref,
44
+ "upload-progress": e.$props.uploadProgress,
45
+ "warning-function": e.$props.warningFunction,
46
+ "upload-interaction-text": e.$props.uploadInteractionText,
47
+ "upload-text": e.$props.uploadText,
48
+ onUpdateFile: t[0] || (t[0] = (p) => e.$emit("updateFile", p)),
49
+ onUpdateProgress: t[1] || (t[1] = (p) => e.$emit("updateProgress", p)),
50
+ onUploadError: t[2] || (t[2] = (p) => e.$emit("uploadError", p))
51
+ }, null, 8, ["complete-text", "loading-text", "progress-interval", "warning-text-upload", "multiple-select", "accept-types", "accept-types-input", "max-file-size", "interactive-text-button", "interactive-text-download-name", "interactive-texthref", "upload-progress", "warning-function", "upload-interaction-text", "upload-text"]))
52
+ ]);
53
+ }
54
+ const y = /* @__PURE__ */ d(l, [["render", m], ["__scopeId", "data-v-00a46a1f"]]);
55
+ export {
56
+ y as default
57
+ };
@@ -0,0 +1,118 @@
1
+ import { defineComponent as t } from "vue";
2
+ import r from "./MultipleUpload/MultipleUpload.vue.js";
3
+ import a from "./SingleUpload/SingleUpload.vue.js";
4
+ const d = t({
5
+ name: "Upload",
6
+ components: {
7
+ SingleUpload: a,
8
+ MultipleUpload: r
9
+ },
10
+ props: {
11
+ warningTextUpload: {
12
+ type: String,
13
+ required: !1,
14
+ default: "Texto de aviso sobre o upload",
15
+ validator: (e) => typeof e == "string"
16
+ },
17
+ uploadText: {
18
+ type: String,
19
+ required: !1,
20
+ default: "Importe seu arquivo aqui",
21
+ validator: (e) => typeof e == "string"
22
+ },
23
+ uploadInteractionText: {
24
+ type: String,
25
+ required: !1,
26
+ default: "Arraste ou clique para fazer upload do arquivo",
27
+ validator: (e) => typeof e == "string"
28
+ },
29
+ multipleSelect: {
30
+ type: Boolean,
31
+ required: !1,
32
+ default: !1,
33
+ validator: (e) => typeof e == "boolean"
34
+ },
35
+ interactiveTextButton: {
36
+ type: String,
37
+ required: !1,
38
+ default: "",
39
+ validator: (e) => typeof e == "string"
40
+ },
41
+ warningFunction: {
42
+ type: Function,
43
+ required: !1,
44
+ default: () => {
45
+ console.warn("This is a warning");
46
+ }
47
+ },
48
+ interactiveTexthref: {
49
+ type: String,
50
+ required: !1,
51
+ default: "",
52
+ validator: (e) => typeof e == "string"
53
+ },
54
+ interactiveTextDownloadName: {
55
+ type: String,
56
+ required: !1,
57
+ default: "",
58
+ validator: (e) => typeof e == "string"
59
+ },
60
+ uploadProgress: {
61
+ type: Number,
62
+ required: !1,
63
+ default: 0,
64
+ validator: (e) => typeof e == "number"
65
+ },
66
+ progressInterval: {
67
+ type: Number,
68
+ required: !1,
69
+ default: 1e3,
70
+ validator: (e) => typeof e == "number"
71
+ },
72
+ loadingText: {
73
+ type: String,
74
+ required: !1,
75
+ default: "Estamos analisando o arquivo, em breve, retornaremos com os resultados.",
76
+ validator: (e) => typeof e == "string"
77
+ },
78
+ completeText: {
79
+ type: String,
80
+ required: !1,
81
+ default: "O upload foi concluído!",
82
+ validator: (e) => typeof e == "string"
83
+ },
84
+ acceptTypes: {
85
+ type: Array,
86
+ default: () => []
87
+ },
88
+ acceptTypesInput: {
89
+ type: String,
90
+ default: "*"
91
+ },
92
+ maxFileSize: {
93
+ type: Number,
94
+ required: !1,
95
+ default: void 0,
96
+ validator: (e) => typeof e == "number"
97
+ },
98
+ maxTotalSize: {
99
+ type: Number,
100
+ required: !1,
101
+ default: void 0,
102
+ validator: (e) => typeof e == "number"
103
+ },
104
+ maxFiles: {
105
+ type: Number,
106
+ required: !1,
107
+ default: void 0,
108
+ validator: (e) => typeof e == "number"
109
+ }
110
+ },
111
+ emits: ["updateProgress", "updateFile", "uploadError"],
112
+ setup() {
113
+ return {};
114
+ }
115
+ });
116
+ export {
117
+ d as default
118
+ };
@@ -0,0 +1,30 @@
1
+ import i from "./UploaderHeader.vue2.js";
2
+ import { resolveComponent as s, createElementBlock as o, openBlock as r, createVNode as c, createElementVNode as l, createTextVNode as d, createCommentVNode as m, toDisplayString as n } from "vue";
3
+ /* empty css */
4
+ import u from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const f = { class: "at-uploader-warning" }, $ = { class: "at-uploader-warning-text" }, v = ["href", "download"];
6
+ function g(e, t, h, w, x, _) {
7
+ const a = s("AtCircleExclamationRegularIcon");
8
+ return r(), o("div", f, [
9
+ c(a, {
10
+ style: { width: "22px", height: "22px" },
11
+ color: "var(--at-primary-color-1)"
12
+ }),
13
+ l("p", $, [
14
+ d(n(e.$props.warningTextUpload) + " ", 1),
15
+ e.$props.interactiveTextButton !== "" ? (r(), o("a", {
16
+ key: 0,
17
+ href: e.$props.interactiveTexthref,
18
+ download: e.$props.interactiveTextDownloadName,
19
+ class: "at-uploader-interactive-text",
20
+ onClick: t[0] || (t[0] = (p) => {
21
+ e.$props.interactiveTexthref === "" && p.preventDefault(), e.$props.warningFunction && e.$props.warningFunction();
22
+ })
23
+ }, n(e.$props.interactiveTextButton), 9, v)) : m("", !0)
24
+ ])
25
+ ]);
26
+ }
27
+ const y = /* @__PURE__ */ u(i, [["render", g], ["__scopeId", "data-v-dabe17b3"]]);
28
+ export {
29
+ y as default
30
+ };
@@ -0,0 +1,51 @@
1
+ import { AtCircleExclamationRegularIcon as t } from "@agrotools1/at-icons";
2
+ import { defineComponent as r } from "vue";
3
+ const i = r({
4
+ test: {
5
+ globals: !0,
6
+ environment: "jsdom"
7
+ },
8
+ name: "UploaderHeader",
9
+ components: {
10
+ AtCircleExclamationRegularIcon: 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
+ interactiveTextButton: {
20
+ type: String,
21
+ required: !1,
22
+ default: "",
23
+ validator: (e) => typeof e == "string"
24
+ },
25
+ interactiveTexthref: {
26
+ type: String,
27
+ required: !1,
28
+ default: "",
29
+ validator: (e) => typeof e == "string"
30
+ },
31
+ interactiveTextDownloadName: {
32
+ type: String,
33
+ required: !1,
34
+ default: "",
35
+ validator: (e) => typeof e == "string"
36
+ },
37
+ warningFunction: {
38
+ type: Function,
39
+ required: !1,
40
+ default: () => {
41
+ console.warn("This is a warning");
42
+ }
43
+ }
44
+ },
45
+ setup() {
46
+ return {};
47
+ }
48
+ });
49
+ export {
50
+ i as default
51
+ };
@@ -0,0 +1,31 @@
1
+ import s from "./UploaderInfoProgress.vue2.js";
2
+ import { resolveComponent as i, createElementBlock as t, openBlock as e, createVNode as r } from "vue";
3
+ /* empty css */
4
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const l = {
6
+ key: 0,
7
+ class: "at-uploader-loading-container"
8
+ }, p = {
9
+ key: 1,
10
+ class: "at-uploader-complete-container"
11
+ };
12
+ function c(n, d, _, m, f, u) {
13
+ const o = i("AtIllustration");
14
+ return n.$props.progress < 100 ? (e(), t("div", l, [
15
+ r(o, {
16
+ illustration: "filteringUpload",
17
+ width: 48,
18
+ height: 48
19
+ })
20
+ ])) : (e(), t("div", p, [
21
+ r(o, {
22
+ illustration: "fileBackup",
23
+ width: 48,
24
+ height: 48
25
+ })
26
+ ]));
27
+ }
28
+ const v = /* @__PURE__ */ a(s, [["render", c], ["__scopeId", "data-v-b8774e2b"]]);
29
+ export {
30
+ v as default
31
+ };
@@ -0,0 +1,34 @@
1
+ import { defineComponent as o } from "vue";
2
+ import r from "../../Illustration/Illustration.vue.js";
3
+ const n = o({
4
+ name: "UploaderInfoProgress",
5
+ components: {
6
+ AtIllustration: r
7
+ },
8
+ props: {
9
+ loadingText: {
10
+ type: String,
11
+ required: !1,
12
+ default: "Estamos analisando o arquivo, em breve, retornaremos com os resultados.",
13
+ validator: (e) => typeof e == "string"
14
+ },
15
+ completeText: {
16
+ type: String,
17
+ required: !1,
18
+ default: "O upload foi concluído!",
19
+ validator: (e) => typeof e == "string"
20
+ },
21
+ progress: {
22
+ type: Number,
23
+ required: !0,
24
+ validator: (e) => typeof e == "number"
25
+ }
26
+ },
27
+ emits: ["handleRemove", "handleUpdateProgressOnParent"],
28
+ setup() {
29
+ return {};
30
+ }
31
+ });
32
+ export {
33
+ n as default
34
+ };
@@ -0,0 +1,63 @@
1
+ import f from "./UploaderInput.vue2.js";
2
+ import { resolveComponent as a, createElementBlock as m, openBlock as c, withModifiers as n, normalizeClass as $, createElementVNode as p, createVNode as r, withCtx as i, createTextVNode as s, toDisplayString as d } from "vue";
3
+ /* empty css */
4
+ import h from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const g = ["for"], I = ["id", "multiple", "accept"], v = { class: "at-upload-input-file-container" }, w = { class: "at-uploader-input-file-label pointer" };
6
+ function A(e, t, _, C, D, b) {
7
+ const u = a("AtIllustration"), l = a("AtParagraph");
8
+ return c(), m("label", {
9
+ ref: "dropAreaElem",
10
+ for: `inputFile-${e.uid}`,
11
+ class: $(e.dropAreaClasses),
12
+ onDragover: t[1] || (t[1] = n(() => {
13
+ }, ["prevent"])),
14
+ onDragenter: t[2] || (t[2] = n(() => {
15
+ }, ["prevent"])),
16
+ onDrop: t[3] || (t[3] = (o) => e.$props.handleDrop(o))
17
+ }, [
18
+ p("input", {
19
+ id: `inputFile-${e.uid}`,
20
+ ref: "fileInputRef",
21
+ class: "w-100 h-100 at-uploader-input",
22
+ multiple: e.$props.multipleSelect,
23
+ type: "file",
24
+ label: "",
25
+ accept: e.$props.acceptTypesInput,
26
+ onChange: t[0] || (t[0] = async (o) => {
27
+ await e.$props.handleFileUpload(o), e.resetFileInput();
28
+ })
29
+ }, null, 40, I),
30
+ p("div", v, [
31
+ r(u, {
32
+ illustration: "cloudUpload",
33
+ height: 48,
34
+ width: 48
35
+ }),
36
+ p("span", w, [
37
+ r(l, {
38
+ size: "p1",
39
+ weight: "bold",
40
+ class: "at-uploader-text"
41
+ }, {
42
+ default: i(() => [
43
+ s(d(e.$props.uploadText), 1)
44
+ ]),
45
+ _: 1
46
+ }),
47
+ r(l, {
48
+ size: "p2",
49
+ class: "at-uploader-interaction-text"
50
+ }, {
51
+ default: i(() => [
52
+ s(d(e.$props.uploadInteractionText), 1)
53
+ ]),
54
+ _: 1
55
+ })
56
+ ])
57
+ ])
58
+ ], 42, g);
59
+ }
60
+ const E = /* @__PURE__ */ h(f, [["render", A], ["__scopeId", "data-v-1497878e"]]);
61
+ export {
62
+ E as default
63
+ };
@@ -0,0 +1,63 @@
1
+ import { defineComponent as p, ref as r, getCurrentInstance as l, onMounted as i } from "vue";
2
+ import d from "../../Illustration/Illustration.vue.js";
3
+ import { AtTipograph as s } from "../../Tipograph/index.js";
4
+ const g = p({
5
+ test: {
6
+ globals: !0,
7
+ environment: "jsdom"
8
+ },
9
+ name: "UploaderInput",
10
+ components: {
11
+ AtIllustration: d,
12
+ AtParagraph: s.Paragraph
13
+ },
14
+ props: {
15
+ uploadText: {
16
+ type: String,
17
+ required: !1,
18
+ default: "Importe seu arquivo aqui",
19
+ validator: (e) => typeof e == "string"
20
+ },
21
+ uploadInteractionText: {
22
+ type: String,
23
+ required: !0,
24
+ default: "Arraste ou clique para fazer upload do arquivo",
25
+ validator: (e) => typeof e == "string"
26
+ },
27
+ multipleSelect: {
28
+ type: Boolean,
29
+ required: !1,
30
+ default: !1,
31
+ validator: (e) => typeof e == "boolean"
32
+ },
33
+ handleDrop: {
34
+ type: Function,
35
+ required: !0
36
+ },
37
+ handleFileUpload: {
38
+ type: Function,
39
+ required: !0
40
+ },
41
+ acceptTypes: {
42
+ type: Array,
43
+ default: () => []
44
+ },
45
+ acceptTypesInput: {
46
+ type: String,
47
+ default: "*"
48
+ }
49
+ },
50
+ setup() {
51
+ const e = r(), t = r(["at-uploader-input-container"]), a = r(null), o = l(), n = o ? o.uid : Math.random().toString(36).substr(2, 9);
52
+ i(() => {
53
+ e.value.ondragover = () => t.value = ["at-uploader-input-container", "dragging"], e.value.ondrop = () => t.value = ["at-uploader-input-container"];
54
+ });
55
+ function u() {
56
+ a.value && (a.value.value = "");
57
+ }
58
+ return { dropAreaElem: e, dropAreaClasses: t, resetFileInput: u, fileInputRef: a, uid: n };
59
+ }
60
+ });
61
+ export {
62
+ g as default
63
+ };
@@ -0,0 +1,9 @@
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
7
+ export {
8
+ s as default
9
+ };