@agrotools1/at-components 0.6.26 → 0.6.29
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.
- package/README.md +7 -7
- package/dist/Accordion/Accordion.d.ts +4 -4
- package/dist/Accordion/Accordion.vue.js +4 -4
- package/dist/Accordion/Accordion.vue3.js +2 -2
- package/dist/Accordion/index.d.ts +1 -1
- package/dist/Avatar/Avatar.d.ts +4 -4
- package/dist/Avatar/Avatar.vue.js +1 -1
- package/dist/Avatar/Avatar.vue3.js +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Button/Button.d.ts +4 -4
- package/dist/Button/Button.vue.js +1 -1
- package/dist/Button/Button.vue3.js +2 -2
- package/dist/Button/index.d.ts +1 -1
- package/dist/CardWithInsights/CardWithInsights.vue.js +6 -6
- package/dist/CardWithInsights/CardWithInsights.vue4.js +2 -2
- package/dist/CardWithInsights/index.d.ts +1 -1
- package/dist/Checkbox/Checkbox.d.ts +9 -8
- package/dist/Checkbox/Checkbox.vue.js +1 -1
- package/dist/Checkbox/img/checkmarck.svg.js +1 -1
- package/dist/Checkbox/index.d.ts +1 -1
- package/dist/Chips/index.d.ts +1 -1
- package/dist/ColorPicker/ColorPicker.Saturation.d.ts +8 -8
- package/dist/ColorPicker/ColorPicker.Saturation.vue.js +10 -10
- package/dist/ColorPicker/ColorPicker.Saturation.vue3.js +2 -2
- package/dist/ColorPicker/ColorPicker.vue.js +4 -4
- package/dist/ColorPicker/index.d.ts +1 -1
- package/dist/DataTable/Column/Column.d.ts +4 -3
- package/dist/DataTable/Column/Column.vue.js +6 -6
- package/dist/DataTable/Column/Column.vue3.js +2 -2
- package/dist/DataTable/Column/imgs/filter.svg.js +1 -1
- package/dist/DataTable/Counters/Counters.d.ts +6 -6
- package/dist/DataTable/Counters/Counters.vue.js +1 -1
- package/dist/DataTable/Counters/imgs/close.svg.js +1 -1
- package/dist/DataTable/DataTable.d.ts +9 -8
- package/dist/DataTable/DataTable.vue.js +5 -5
- package/dist/DataTable/index.d.ts +37 -37
- package/dist/DatePicker/DatePicker.d.ts +22 -21
- package/dist/DatePicker/DatePicker.scss.js +2 -2
- package/dist/DatePicker/DatePicker.vue.js +5 -5
- package/dist/DatePicker/DatePicker.vue2.js +89 -85
- package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.d.ts +6 -6
- package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.helper.d.ts +2 -1
- package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.vue.js +3 -3
- package/dist/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +2 -2
- package/dist/DatePicker/DatePickerHeader/DatePickerHeader.scss.js +2 -2
- package/dist/DatePicker/DatePickerHeader/DatePickerHeader.vue.js +4 -4
- package/dist/DatePicker/DatePickerListSelector/DatePickerListSelector.d.ts +5 -5
- package/dist/DatePicker/DatePickerListSelector/DatePickerListSelector.vue.js +5 -5
- package/dist/DatePicker/DatePickerTime/DatePickerTime.d.ts +7 -6
- package/dist/DatePicker/DatePickerTime/DatePickerTime.scss.js +2 -2
- package/dist/DatePicker/DatePickerTime/DatePickerTime.vue.js +8 -8
- package/dist/DatePicker/index.d.ts +2 -2
- package/dist/Dropdown/Checklist/Dropdown.Checklist.d.ts +13 -12
- package/dist/Dropdown/Checklist/Dropdown.Checklist.vue.js +20 -20
- package/dist/Dropdown/Checklist/draggable.d.ts +2 -1
- package/dist/Dropdown/Dropdown.core.d.ts +9 -8
- package/dist/Dropdown/Dropdown.core.vue.js +2 -2
- package/dist/Dropdown/Dropdown.types.d.ts +1 -1
- package/dist/Dropdown/DropdownContent/DropdownContent.d.ts +1 -1
- package/dist/Faq/Faq.vue.js +5 -5
- package/dist/Faq/FaqItem/FaqItem.d.ts +5 -4
- package/dist/Faq/FaqItem/FaqItem.vue.js +1 -1
- package/dist/Faq/FaqItem/index.d.ts +1 -1
- package/dist/Faq/index.d.ts +1 -1
- package/dist/Filter/components/Filter.types.d.ts +2 -1
- package/dist/Filter/components/Filter.vue.js +19 -19
- package/dist/Filter/index.d.ts +4 -3
- package/dist/Filter/tests/mocks.d.ts +3 -2
- package/dist/Icons/icons.d.ts +1860 -1860
- package/dist/Illustration/Illustration.vue.js +5 -5
- package/dist/Illustration/images/renovabio-illustrations/biomass.svg.js +1 -1
- package/dist/Illustration/images/renovabio-illustrations/volume.svg.js +1 -1
- package/dist/Illustration/images/system-images/add-file.svg.js +1 -1
- package/dist/Illustration/images/system-images/cloud-connection.svg.js +1 -1
- package/dist/Illustration/images/system-images/cloud-download.svg.js +1 -1
- package/dist/Illustration/images/system-images/cloud-upload.svg.js +1 -1
- package/dist/Illustration/images/system-images/corrupted-file.svg.js +1 -1
- package/dist/Illustration/images/system-images/empty-box.svg.js +1 -1
- package/dist/Illustration/images/system-images/empty-folder-2.svg.js +1 -1
- package/dist/Illustration/images/system-images/empty-folder.svg.js +1 -1
- package/dist/Illustration/images/system-images/empty.svg.js +1 -1
- package/dist/Illustration/images/system-images/error-illustration.svg.js +1 -1
- package/dist/Illustration/images/system-images/file-backup-2.svg.js +1 -1
- package/dist/Illustration/images/system-images/file-backup.svg.js +1 -1
- package/dist/Illustration/images/system-images/filtering-upload.svg.js +1 -1
- package/dist/Illustration/images/system-images/flight.svg.js +1 -1
- package/dist/Illustration/images/system-images/fly.svg.js +1 -1
- package/dist/Illustration/images/system-images/movies.svg.js +1 -1
- package/dist/Illustration/images/system-images/multimedia.svg.js +1 -1
- package/dist/Illustration/images/system-images/notification-bell.svg.js +1 -1
- package/dist/Illustration/images/system-images/page-2.svg.js +1 -1
- package/dist/Illustration/images/system-images/page.svg.js +1 -1
- package/dist/Illustration/images/system-images/photos.svg.js +1 -1
- package/dist/Illustration/images/system-images/recycle-bin.svg.js +1 -1
- package/dist/Illustration/images/system-images/rocket-launch.svg.js +1 -1
- package/dist/Illustration/images/system-images/signal.svg.js +1 -1
- package/dist/Illustration/images/system-images/wrong.svg.js +1 -1
- package/dist/Illustration/images/tools-images/advanced-analysis.svg.js +1 -1
- package/dist/Illustration/images/tools-images/agriculture.svg.js +1 -1
- package/dist/Illustration/images/tools-images/alert-center.svg.js +1 -1
- package/dist/Illustration/images/tools-images/area.svg.js +1 -1
- package/dist/Illustration/images/tools-images/at-insights.svg.js +1 -1
- package/dist/Illustration/images/tools-images/conservation-unit.svg.js +1 -1
- package/dist/Illustration/images/tools-images/credit.svg.js +2 -2
- package/dist/Illustration/images/tools-images/deforestation.svg.js +1 -1
- package/dist/Illustration/images/tools-images/distance-proximity-rivers.svg.js +1 -1
- package/dist/Illustration/images/tools-images/estimated-productivity-penalty.svg.js +1 -1
- package/dist/Illustration/images/tools-images/extract.svg.js +1 -1
- package/dist/Illustration/images/tools-images/farm.svg.js +1 -1
- package/dist/Illustration/images/tools-images/geographical-consultation-municipalities.svg.js +1 -1
- package/dist/Illustration/images/tools-images/gix.svg.js +1 -1
- package/dist/Illustration/images/tools-images/insurance.svg.js +1 -1
- package/dist/Illustration/images/tools-images/land-appreciation.svg.js +1 -1
- package/dist/Illustration/images/tools-images/lockdown.svg.js +1 -1
- package/dist/Illustration/images/tools-images/map.svg.js +1 -1
- package/dist/Illustration/images/tools-images/pasture.svg.js +1 -1
- package/dist/Illustration/images/tools-images/rating-2.svg.js +1 -1
- package/dist/Illustration/images/tools-images/rating.svg.js +1 -1
- package/dist/Illustration/images/tools-images/recurrence.svg.js +1 -1
- package/dist/Illustration/images/tools-images/refrigerators.svg.js +1 -1
- package/dist/Illustration/images/tools-images/settings.svg.js +1 -1
- package/dist/Illustration/images/tools-images/socio-environmental-analysis.svg.js +1 -1
- package/dist/Illustration/images/tools-images/soil-use.svg.js +1 -1
- package/dist/Illustration/images/tools-images/storm.svg.js +1 -1
- package/dist/Illustration/images/tools-images/territory-details.svg.js +1 -1
- package/dist/Illustration/images/tools-images/timeline.svg.js +1 -1
- package/dist/Illustration/index.d.ts +1 -1
- package/dist/Input/Input.core.d.ts +356 -355
- package/dist/Input/Input.core.vue.js +6 -6
- package/dist/Input/Input.core.vue3.js +2 -2
- package/dist/Input/imgs/error.svg.js +2 -2
- package/dist/Input/index.d.ts +1695 -1694
- package/dist/Legend/Legend.d.ts +3 -3
- package/dist/Legend/Legend.vue.js +1 -1
- package/dist/Legend/index.d.ts +1 -1
- package/dist/List/components/List.d.ts +9 -9
- package/dist/List/components/List.types.d.ts +2 -1
- package/dist/List/components/List.vue.js +2 -2
- package/dist/List/index.d.ts +4 -3
- package/dist/List/tests/mocks.d.ts +2 -1
- package/dist/Loading/Loading.d.ts +2 -2
- package/dist/Loading/index.d.ts +1 -1
- package/dist/Menu/Menu.d.ts +4 -3
- package/dist/Menu/Menu.vue.js +2 -2
- package/dist/Menu/assets/agrotools.svg.js +1 -1
- package/dist/Menu/assets/at.svg.js +1 -1
- package/dist/Menu/index.d.ts +1 -1
- package/dist/Modal/Modal.d.ts +9 -8
- package/dist/Modal/Modal.vue.js +16 -16
- package/dist/Modal/Modal.vue2.js +4 -2
- package/dist/Modal/Modal.vue3.js +2 -2
- package/dist/Modal/images/cross.svg.js +1 -1
- package/dist/Modal/index.d.ts +1 -1
- package/dist/Notifications/Notification/Notification.d.ts +50 -50
- package/dist/Notifications/Notification/Notification.vue.js +4 -4
- package/dist/Notifications/Notifications.d.ts +9 -9
- package/dist/Notifications/Notifications.vue.js +6 -6
- package/dist/Notifications/Notifications.vue3.js +2 -2
- package/dist/Notifications/index.d.ts +1 -1
- package/dist/Paginator/Paginator.d.ts +7 -7
- package/dist/Paginator/Paginator.vue.js +2 -2
- package/dist/Paginator/imgs/double-left-arrow.svg.js +1 -1
- package/dist/Paginator/imgs/double-right-arrow.svg.js +1 -1
- package/dist/Paginator/imgs/left-arrow.svg.js +1 -1
- package/dist/Paginator/imgs/right-arrow.svg.js +1 -1
- package/dist/Paginator/index.d.ts +1 -1
- package/dist/ProgressBar/ProgressBar.d.ts +4 -3
- package/dist/ProgressBar/ProgressBar.vue.js +2 -2
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/RadioButton/RadioButton.d.ts +3 -3
- package/dist/RadioButton/RadioButton.vue.js +1 -1
- package/dist/RadioButton/RadioButton.vue3.js +2 -2
- package/dist/RadioButton/index.d.ts +1 -1
- package/dist/Search/Search.d.ts +7 -6
- package/dist/Search/Search.vue.js +4 -4
- package/dist/Search/index.d.ts +1 -1
- package/dist/Search/test.mocks.d.ts +2 -1
- package/dist/Search/utils.d.ts +2 -1
- package/dist/Select/Item/Item.d.ts +3 -3
- package/dist/Select/Item/Item.vue.js +16 -16
- package/dist/Select/Multiple/Select.multiple.d.ts +14 -13
- package/dist/Select/Multiple/Select.multiple.vue.js +10 -10
- package/dist/Select/Select.core.d.ts +8 -7
- package/dist/Select/Single/Select.single.d.ts +12 -11
- package/dist/Select/Single/Select.single.vue.js +6 -6
- package/dist/Select/imgs/indicator.svg.js +1 -1
- package/dist/Select/index.d.ts +25 -24
- package/dist/Skeleton/Skeleton.d.ts +2 -2
- package/dist/Skeleton/index.d.ts +1 -1
- package/dist/Stepper/Stepper.vue.js +37 -37
- package/dist/Stepper/Stepper.vue2.js +53 -48
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/TableConfig/TableConfig.d.ts +11 -10
- package/dist/TableConfig/TableConfig.vue.js +2 -2
- package/dist/TableConfig/index.d.ts +1 -1
- package/dist/TableConfig/test/mocks.d.ts +2 -1
- package/dist/Tabs/Tab/Tab.d.ts +4 -4
- package/dist/Tabs/Tab/Tab.vue.js +1 -1
- package/dist/Tabs/Tab/Tab.vue3.js +2 -2
- package/dist/Tabs/Tabs.d.ts +9 -8
- package/dist/Tabs/Tabs.vue.js +7 -7
- package/dist/Tabs/Tabs.vue3.js +2 -2
- package/dist/Tabs/index.d.ts +1 -1
- package/dist/Tag/Tag.d.ts +7 -6
- package/dist/Tag/Tag.vue.js +1 -1
- package/dist/Tag/index.d.ts +1 -1
- package/dist/Tipograph/Paragraph/Paragraph.d.ts +2 -2
- package/dist/Tipograph/Paragraph/Paragraph.vue.js +2 -2
- package/dist/Tipograph/Paragraph/Paragraph.vue3.js +2 -2
- package/dist/Tipograph/Title/Title.d.ts +2 -2
- package/dist/Tipograph/Title/Title.vue.js +2 -2
- package/dist/Tipograph/index.d.ts +4 -4
- package/dist/Toggle/Toggle.d.ts +5 -5
- package/dist/Toggle/Toggle.vue.js +2 -2
- package/dist/Toggle/index.d.ts +1 -1
- package/dist/Tooltip/Tooltip.d.ts +12 -11
- package/dist/Tooltip/Tooltip.vue.js +4 -4
- package/dist/Tooltip/Tooltip.vue2.js +48 -50
- package/dist/Tooltip/Tooltip.vue3.js +2 -2
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Upload/MultipleUpload/MultipleUpload.d.ts +8 -7
- package/dist/Upload/MultipleUpload/MultipleUpload.vue.js +5 -5
- package/dist/Upload/MultipleUpload/MultipleUpload.vue2.js +55 -44
- package/dist/Upload/SingleUpload/SingleUpload.d.ts +6 -5
- package/dist/Upload/SingleUpload/SingleUpload.vue.js +4 -4
- package/dist/Upload/SingleUpload/SingleUpload.vue2.js +45 -34
- package/dist/Upload/Upload.d.ts +4 -3
- package/dist/Upload/Upload.vue.js +1 -1
- package/dist/Upload/UploaderHeader/UploaderHeader.d.ts +2 -2
- package/dist/Upload/UploaderHeader/UploaderHeader.vue.js +1 -1
- package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.d.ts +2 -2
- package/dist/Upload/UploaderInfoProgress/UploaderInfoProgress.vue.js +1 -1
- package/dist/Upload/UploaderInput/UploaderInput.d.ts +6 -5
- package/dist/Upload/UploaderInput/UploaderInput.vue.js +1 -1
- package/dist/Upload/index.d.ts +1 -1
- package/dist/index.d.ts +33 -32
- package/dist/index.js +36 -34
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as x, ref as
|
|
1
|
+
import { defineComponent as x, ref as y, computed as g } from "vue";
|
|
2
2
|
import h from "../../ProgressBar/ProgressBar.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
3
|
+
import T from "../UploaderHeader/UploaderHeader.vue.js";
|
|
4
|
+
import q from "../UploaderInput/UploaderInput.vue.js";
|
|
5
|
+
const P = x({
|
|
6
6
|
name: "MultipleUpload",
|
|
7
7
|
components: {
|
|
8
8
|
AtProgressBar: h,
|
|
9
|
-
UploaderHeader:
|
|
10
|
-
UploaderInput:
|
|
9
|
+
UploaderHeader: T,
|
|
10
|
+
UploaderInput: q
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
13
|
warningTextUpload: {
|
|
@@ -111,52 +111,63 @@ const I = x({
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
emits: ["updateFile", "updateProgress", "uploadError"],
|
|
114
|
-
setup(e, { emit:
|
|
115
|
-
const
|
|
114
|
+
setup(e, { emit: n }) {
|
|
115
|
+
const o = y([]), d = y(e.uploadProgress), v = (t) => {
|
|
116
116
|
if (t.preventDefault(), t.dataTransfer) {
|
|
117
|
-
const a = Array.from(t.dataTransfer.files),
|
|
118
|
-
|
|
117
|
+
const a = Array.from(t.dataTransfer.files), i = u(a);
|
|
118
|
+
i.length && (o.value.push(...i), n("updateFile", o.value));
|
|
119
119
|
}
|
|
120
120
|
}, u = (t) => {
|
|
121
121
|
const a = [];
|
|
122
|
-
if (!
|
|
122
|
+
if (!f(t) || !m(t))
|
|
123
123
|
return [];
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
return
|
|
127
|
-
file:
|
|
124
|
+
const i = t.filter((r) => {
|
|
125
|
+
const l = c(r), s = p(r);
|
|
126
|
+
return l || a.push({
|
|
127
|
+
file: r,
|
|
128
128
|
type: "unsupported_type",
|
|
129
|
-
message: `O tipo (${
|
|
129
|
+
message: `O tipo (${r.type}) do arquivo ${r.name} não é suportado. `
|
|
130
130
|
}), s || a.push({
|
|
131
|
-
file:
|
|
131
|
+
file: r,
|
|
132
132
|
type: "exceeded_file_size",
|
|
133
|
-
message: `O tamanho do arquivo ${
|
|
134
|
-
}),
|
|
133
|
+
message: `O tamanho do arquivo ${r.name} excedeu o limite permitido. `
|
|
134
|
+
}), l && s;
|
|
135
135
|
});
|
|
136
|
-
return a.length && (console.warn(a.map((
|
|
137
|
-
`)),
|
|
138
|
-
}, p = (t) => e.maxFileSize ? t.size < e.maxFileSize : !0,
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
return a.length && (console.warn(a.map((r) => r.message).join(`
|
|
137
|
+
`)), n("uploadError", a)), i;
|
|
138
|
+
}, p = (t) => e.maxFileSize ? t.size < e.maxFileSize : !0, c = (t) => {
|
|
139
|
+
if (!e.acceptTypes.length && (!e.acceptTypesInput || e.acceptTypesInput === "*"))
|
|
140
|
+
return !0;
|
|
141
|
+
if (e.acceptTypes.length)
|
|
142
|
+
return e.acceptTypes.map(
|
|
143
|
+
(l) => l.toLowerCase()
|
|
144
|
+
).includes(t.type.toLowerCase());
|
|
145
|
+
const a = t.name.split(".").pop();
|
|
146
|
+
return e.acceptTypesInput.split(",").some(
|
|
147
|
+
(r) => r.includes(a || "")
|
|
148
|
+
);
|
|
149
|
+
}, f = (t) => {
|
|
150
|
+
const a = [], i = t.length + o.value.length;
|
|
151
|
+
return e.maxFiles && i > e.maxFiles ? (a.push({
|
|
141
152
|
file: t[0],
|
|
142
153
|
type: "exceeded_file_length",
|
|
143
154
|
message: `O tamanho limite de arquivos foi excedido (${e.maxFiles})`
|
|
144
|
-
}), console.warn(a.map((
|
|
145
|
-
`)),
|
|
155
|
+
}), console.warn(a.map((r) => r.message).join(`
|
|
156
|
+
`)), n("uploadError", a), !1) : !0;
|
|
146
157
|
}, m = (t) => {
|
|
147
|
-
const a = [],
|
|
148
|
-
(
|
|
158
|
+
const a = [], i = o.value.reduce(
|
|
159
|
+
(l, s) => l + s.size,
|
|
149
160
|
0
|
|
150
|
-
),
|
|
151
|
-
(
|
|
161
|
+
), r = t.reduce(
|
|
162
|
+
(l, s) => l + s.size,
|
|
152
163
|
0
|
|
153
164
|
);
|
|
154
|
-
return e.maxTotalSize &&
|
|
165
|
+
return e.maxTotalSize && r + i > e.maxTotalSize ? (a.push({
|
|
155
166
|
file: t[0],
|
|
156
167
|
type: "exceeded_total_size",
|
|
157
168
|
message: `A soma de tamanho dos arquivos foi excedida, máximo permitido: ${e.maxTotalSize} B `
|
|
158
|
-
}), console.warn(a.map((
|
|
159
|
-
`)),
|
|
169
|
+
}), console.warn(a.map((l) => l.message).join(`
|
|
170
|
+
`)), n("uploadError", a), !1) : !0;
|
|
160
171
|
};
|
|
161
172
|
return {
|
|
162
173
|
handleDrop: v,
|
|
@@ -164,28 +175,28 @@ const I = x({
|
|
|
164
175
|
const a = t.target.files;
|
|
165
176
|
if (!a)
|
|
166
177
|
return;
|
|
167
|
-
const
|
|
168
|
-
|
|
178
|
+
const i = u(Array.from(a));
|
|
179
|
+
i.length && (o.value.push(...i), n("updateFile", o.value));
|
|
169
180
|
},
|
|
170
181
|
handleRemove: (t) => {
|
|
171
|
-
const a =
|
|
172
|
-
a !== -1 && (
|
|
182
|
+
const a = o.value.indexOf(t);
|
|
183
|
+
a !== -1 && (o.value.splice(a, 1), o.value.length === 0 && (d.value = 0, n("updateProgress", 0)), n("updateFile", o.value));
|
|
173
184
|
},
|
|
174
185
|
handleUpdateProgressOnParent: (t) => {
|
|
175
|
-
d.value = t,
|
|
186
|
+
d.value = t, n("updateProgress", d.value);
|
|
176
187
|
},
|
|
177
188
|
getAcceptedFiles: u,
|
|
178
189
|
isMaxTotalFilesSizeInRange: m,
|
|
179
|
-
isMaxFilesInRange:
|
|
180
|
-
isTypeAccepted:
|
|
190
|
+
isMaxFilesInRange: f,
|
|
191
|
+
isTypeAccepted: c,
|
|
181
192
|
isSizeAccepted: p,
|
|
182
|
-
files:
|
|
193
|
+
files: o,
|
|
183
194
|
progress: d,
|
|
184
|
-
inputStyle:
|
|
185
|
-
uploaderContainerStyle:
|
|
195
|
+
inputStyle: g(() => o.value.length > 0 ? { height: "256px", width: "256px" } : { width: "100%" }),
|
|
196
|
+
uploaderContainerStyle: g(() => o.value.length <= 0 ? { width: "100%", padding: "0px" } : {})
|
|
186
197
|
};
|
|
187
198
|
}
|
|
188
199
|
});
|
|
189
200
|
export {
|
|
190
|
-
|
|
201
|
+
P as default
|
|
191
202
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
4
|
warningTextUpload: {
|
|
4
5
|
type: StringConstructor;
|
|
5
6
|
required: false;
|
|
@@ -92,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
93
|
handleUpdateProgressOnParent: (newValue: number) => void;
|
|
93
94
|
getAcceptedFiles: (files: File[]) => File[];
|
|
94
95
|
isSizeAccepted: (file: File) => boolean;
|
|
95
|
-
file: import(
|
|
96
|
+
file: import('vue').Ref<{
|
|
96
97
|
readonly lastModified: number;
|
|
97
98
|
readonly name: string;
|
|
98
99
|
readonly webkitRelativePath: string;
|
|
@@ -103,8 +104,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
103
104
|
stream: () => ReadableStream<Uint8Array>;
|
|
104
105
|
text: () => Promise<string>;
|
|
105
106
|
} | null>;
|
|
106
|
-
progress: import(
|
|
107
|
-
}, unknown, {}, {}, import(
|
|
107
|
+
progress: import('vue').Ref<number>;
|
|
108
|
+
}, 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
109
|
warningTextUpload: {
|
|
109
110
|
type: StringConstructor;
|
|
110
111
|
required: false;
|
|
@@ -7,9 +7,9 @@ const m = { class: "at-uploader-single" }, f = {
|
|
|
7
7
|
class: "at-uploader-status-container at-uploader-loading-input-container"
|
|
8
8
|
};
|
|
9
9
|
function g(e, v, h, $, U, w) {
|
|
10
|
-
const
|
|
10
|
+
const a = t("UploaderHeader"), p = t("UploaderInput"), l = t("UploaderInfoProgress"), s = t("AtProgressBar");
|
|
11
11
|
return o(), r("div", null, [
|
|
12
|
-
n(
|
|
12
|
+
n(a, {
|
|
13
13
|
"warning-text-upload": e.$props.warningTextUpload,
|
|
14
14
|
"interactive-text-button": e.$props.interactiveTextButton,
|
|
15
15
|
"interactive-texthref": e.$props.interactiveTexthref,
|
|
@@ -17,7 +17,7 @@ function g(e, v, h, $, U, w) {
|
|
|
17
17
|
"warning-function": e.$props.warningFunction
|
|
18
18
|
}, null, 8, ["warning-text-upload", "interactive-text-button", "interactive-texthref", "interactive-text-download-name", "warning-function"]),
|
|
19
19
|
d("div", m, [
|
|
20
|
-
e.file === null ? (o(), c(
|
|
20
|
+
e.file === null ? (o(), c(p, {
|
|
21
21
|
key: 0,
|
|
22
22
|
style: { width: "100%" },
|
|
23
23
|
"handle-drop": e.handleDrop,
|
|
@@ -44,7 +44,7 @@ function g(e, v, h, $, U, w) {
|
|
|
44
44
|
])
|
|
45
45
|
]);
|
|
46
46
|
}
|
|
47
|
-
const x = /* @__PURE__ */ u(i, [["render", g], ["__scopeId", "data-v-
|
|
47
|
+
const x = /* @__PURE__ */ u(i, [["render", g], ["__scopeId", "data-v-aba1d251"]]);
|
|
48
48
|
export {
|
|
49
49
|
x as default
|
|
50
50
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as g, ref as
|
|
1
|
+
import { defineComponent as g, ref as c } from "vue";
|
|
2
2
|
import m from "../../ProgressBar/ProgressBar.vue.js";
|
|
3
3
|
import v from "../UploaderHeader/UploaderHeader.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
4
|
+
import T from "../UploaderInfoProgress/UploaderInfoProgress.vue.js";
|
|
5
|
+
import q from "../UploaderInput/UploaderInput.vue.js";
|
|
6
|
+
const I = g({
|
|
7
7
|
name: "SingleUpload",
|
|
8
8
|
components: {
|
|
9
|
-
UploaderInfoProgress:
|
|
9
|
+
UploaderInfoProgress: T,
|
|
10
10
|
AtProgressBar: m,
|
|
11
11
|
UploaderHeader: v,
|
|
12
|
-
UploaderInput:
|
|
12
|
+
UploaderInput: q
|
|
13
13
|
},
|
|
14
14
|
props: {
|
|
15
15
|
warningTextUpload: {
|
|
@@ -102,49 +102,60 @@ const w = g({
|
|
|
102
102
|
},
|
|
103
103
|
emits: ["updateFile", "updateProgress", "uploadError"],
|
|
104
104
|
setup(e, { emit: l }) {
|
|
105
|
-
const
|
|
105
|
+
const n = c(null), s = c(e.uploadProgress), f = (t) => {
|
|
106
106
|
if (t.preventDefault(), t.dataTransfer) {
|
|
107
|
-
const
|
|
108
|
-
|
|
107
|
+
const a = t.dataTransfer.files, o = d(Array.from(a));
|
|
108
|
+
o.length && (n.value = o[0], l("updateFile", n.value));
|
|
109
109
|
}
|
|
110
|
-
},
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
return
|
|
114
|
-
file:
|
|
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
115
|
type: "unsupported_type",
|
|
116
|
-
message: `O tipo (${
|
|
117
|
-
}), u ||
|
|
118
|
-
file:
|
|
116
|
+
message: `O tipo (${r.type}) do arquivo ${r.name} não é suportado. `
|
|
117
|
+
}), u || a.push({
|
|
118
|
+
file: r,
|
|
119
119
|
type: "exceeded_file_size",
|
|
120
|
-
message: `O tamanho do arquivo ${
|
|
121
|
-
}),
|
|
120
|
+
message: `O tamanho do arquivo ${r.name} excedeu o limite permitido. `
|
|
121
|
+
}), i && u;
|
|
122
122
|
});
|
|
123
|
-
return
|
|
124
|
-
`)), l("uploadError",
|
|
125
|
-
},
|
|
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(
|
|
130
|
+
(i) => i.toLowerCase()
|
|
131
|
+
).includes(t.type.toLowerCase());
|
|
132
|
+
const a = t.name.split(".").pop();
|
|
133
|
+
return e.acceptTypesInput.split(",").some(
|
|
134
|
+
(r) => r.includes(a || "")
|
|
135
|
+
);
|
|
136
|
+
};
|
|
126
137
|
return {
|
|
127
|
-
handleDrop:
|
|
138
|
+
handleDrop: f,
|
|
128
139
|
handleFileUpload: async (t) => {
|
|
129
|
-
const
|
|
130
|
-
if (!
|
|
140
|
+
const a = t.target.files;
|
|
141
|
+
if (!a)
|
|
131
142
|
return;
|
|
132
|
-
const
|
|
133
|
-
|
|
143
|
+
const o = d(Array.from(a));
|
|
144
|
+
o.length && (n.value = o[0], l("updateFile", n.value));
|
|
134
145
|
},
|
|
135
146
|
handleRemove: () => {
|
|
136
|
-
|
|
147
|
+
n.value = null, s.value = 0, l("updateFile", null), l("updateProgress", 0);
|
|
137
148
|
},
|
|
138
149
|
handleUpdateProgressOnParent: (t) => {
|
|
139
|
-
|
|
150
|
+
s.value = t, l("updateProgress", s.value);
|
|
140
151
|
},
|
|
141
|
-
getAcceptedFiles:
|
|
142
|
-
isSizeAccepted:
|
|
143
|
-
file:
|
|
144
|
-
progress:
|
|
152
|
+
getAcceptedFiles: d,
|
|
153
|
+
isSizeAccepted: p,
|
|
154
|
+
file: n,
|
|
155
|
+
progress: s
|
|
145
156
|
};
|
|
146
157
|
}
|
|
147
158
|
});
|
|
148
159
|
export {
|
|
149
|
-
|
|
160
|
+
I as default
|
|
150
161
|
};
|
package/dist/Upload/Upload.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
4
|
warningTextUpload: {
|
|
4
5
|
type: StringConstructor;
|
|
5
6
|
required: false;
|
|
@@ -97,7 +98,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
98
|
default: undefined;
|
|
98
99
|
validator: (value: number) => boolean;
|
|
99
100
|
};
|
|
100
|
-
}, {}, unknown, {}, {}, import(
|
|
101
|
+
}, {}, 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<{
|
|
101
102
|
warningTextUpload: {
|
|
102
103
|
type: StringConstructor;
|
|
103
104
|
required: false;
|
|
@@ -51,7 +51,7 @@ function m(e, t, $, g, v, c) {
|
|
|
51
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
52
|
]);
|
|
53
53
|
}
|
|
54
|
-
const y = /* @__PURE__ */ d(l, [["render", m], ["__scopeId", "data-v-
|
|
54
|
+
const y = /* @__PURE__ */ d(l, [["render", m], ["__scopeId", "data-v-9a80204d"]]);
|
|
55
55
|
export {
|
|
56
56
|
y as default
|
|
57
57
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
2
|
warningTextUpload: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: true;
|
|
@@ -28,7 +28,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
required: false;
|
|
29
29
|
default: () => void;
|
|
30
30
|
};
|
|
31
|
-
}, {}, unknown, {}, {}, import(
|
|
31
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
32
32
|
warningTextUpload: {
|
|
33
33
|
type: StringConstructor;
|
|
34
34
|
required: true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
2
|
loadingText: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: false;
|
|
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
required: true;
|
|
17
17
|
validator: (value: number) => boolean;
|
|
18
18
|
};
|
|
19
|
-
}, {}, unknown, {}, {}, import(
|
|
19
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("handleRemove" | "handleUpdateProgressOnParent")[], "handleRemove" | "handleUpdateProgressOnParent", import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
20
|
loadingText: {
|
|
21
21
|
type: StringConstructor;
|
|
22
22
|
required: false;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
4
|
uploadText: {
|
|
4
5
|
type: StringConstructor;
|
|
5
6
|
required: false;
|
|
@@ -35,9 +36,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
36
|
default: string;
|
|
36
37
|
};
|
|
37
38
|
}, {
|
|
38
|
-
dropAreaElem: import(
|
|
39
|
-
dropAreaClasses: import(
|
|
40
|
-
}, unknown, {}, {}, import(
|
|
39
|
+
dropAreaElem: import('vue').Ref<HTMLDivElement | null | undefined>;
|
|
40
|
+
dropAreaClasses: import('vue').Ref<string[]>;
|
|
41
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
41
42
|
uploadText: {
|
|
42
43
|
type: StringConstructor;
|
|
43
44
|
required: false;
|
package/dist/Upload/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './Button';
|
|
4
|
+
export * from './CardWithInsights';
|
|
5
|
+
export * from './Checkbox';
|
|
6
|
+
export * from './ColorPicker';
|
|
7
|
+
export * from './DataTable';
|
|
8
|
+
export * from './DatePicker';
|
|
9
|
+
export * from './Faq';
|
|
10
|
+
export * from './Faq/FaqItem';
|
|
11
|
+
export * from './Filter';
|
|
12
|
+
export * from './Illustration';
|
|
13
|
+
export * from './Input';
|
|
14
|
+
export * from './Legend';
|
|
15
|
+
export * from './List';
|
|
16
|
+
export * from './Loading';
|
|
17
|
+
export * from './Menu';
|
|
18
|
+
export * from './Modal';
|
|
19
|
+
export * from './Notifications';
|
|
20
|
+
export * from './Paginator';
|
|
21
|
+
export * from './ProgressBar';
|
|
22
|
+
export * from './RadioButton';
|
|
23
|
+
export * from './Search';
|
|
24
|
+
export * from './Select';
|
|
25
|
+
export * from './Skeleton';
|
|
26
|
+
export * from './Stepper';
|
|
27
|
+
export * from './TableConfig';
|
|
28
|
+
export * from './Tabs';
|
|
29
|
+
export * from './Tag';
|
|
30
|
+
export * from './Tipograph';
|
|
31
|
+
export * from './Toggle';
|
|
32
|
+
export * from './Tooltip';
|
|
33
|
+
export * from './Upload';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as e } from "./Accordion/Accordion.vue.js";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as r } from "./Avatar/Avatar.vue.js";
|
|
3
3
|
import { default as l } from "./Button/Button.vue.js";
|
|
4
4
|
import { default as s } from "./CardWithInsights/CardWithInsights.vue.js";
|
|
5
5
|
import { default as m } from "./Checkbox/Checkbox.vue.js";
|
|
@@ -9,30 +9,31 @@ import { default as g } from "./DatePicker/DatePicker.vue.js";
|
|
|
9
9
|
import { default as T } from "./Faq/Faq.vue.js";
|
|
10
10
|
import { default as b } from "./Faq/FaqItem/FaqItem.vue.js";
|
|
11
11
|
import { default as C } from "./Filter/components/Filter.vue.js";
|
|
12
|
-
import { default as
|
|
13
|
-
import { AtInput as
|
|
14
|
-
import { default as
|
|
12
|
+
import { default as P } from "./Illustration/Illustration.vue.js";
|
|
13
|
+
import { AtInput as B } from "./Input/index.js";
|
|
14
|
+
import { default as L } from "./Legend/Legend.vue.js";
|
|
15
15
|
import { default as D } from "./List/components/List.vue.js";
|
|
16
16
|
import { default as v } from "./Loading/Loading.vue.js";
|
|
17
17
|
import { default as R } from "./Menu/Menu.vue.js";
|
|
18
18
|
import { default as W } from "./Modal/Modal.vue.js";
|
|
19
19
|
import { default as w } from "./Notifications/Notifications.vue.js";
|
|
20
|
-
import { default as z } from "./
|
|
21
|
-
import { default as G } from "./
|
|
22
|
-
import { default as J } from "./
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { default as Y } from "./
|
|
26
|
-
import { default as _ } from "./
|
|
27
|
-
import { default as tt } from "./
|
|
28
|
-
import { default as et } from "./
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { default as st } from "./
|
|
32
|
-
import { default as mt } from "./
|
|
20
|
+
import { default as z } from "./Paginator/Paginator.vue.js";
|
|
21
|
+
import { default as G } from "./ProgressBar/ProgressBar.vue.js";
|
|
22
|
+
import { default as J } from "./RadioButton/RadioButton.vue.js";
|
|
23
|
+
import { default as O } from "./Search/Search.vue.js";
|
|
24
|
+
import { AtSelect as V } from "./Select/index.js";
|
|
25
|
+
import { default as Y } from "./Skeleton/Skeleton.vue.js";
|
|
26
|
+
import { default as _ } from "./Stepper/Stepper.vue.js";
|
|
27
|
+
import { default as tt } from "./TableConfig/TableConfig.vue.js";
|
|
28
|
+
import { default as et } from "./Tabs/Tabs.vue.js";
|
|
29
|
+
import { default as rt } from "./Tag/Tag.vue.js";
|
|
30
|
+
import { AtTipograph as lt } from "./Tipograph/index.js";
|
|
31
|
+
import { default as st } from "./Toggle/Toggle.vue.js";
|
|
32
|
+
import { default as mt } from "./Tooltip/Tooltip.vue.js";
|
|
33
|
+
import { default as xt } from "./Upload/Upload.vue.js";
|
|
33
34
|
export {
|
|
34
35
|
e as AtAccordion,
|
|
35
|
-
|
|
36
|
+
r as AtAvatar,
|
|
36
37
|
l as AtButton,
|
|
37
38
|
s as AtCardWithInsights,
|
|
38
39
|
m as AtCheckbox,
|
|
@@ -40,27 +41,28 @@ export {
|
|
|
40
41
|
g as AtDatePicker,
|
|
41
42
|
b as AtFaqItem,
|
|
42
43
|
C as AtFilter,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
P as AtIllustration,
|
|
45
|
+
B as AtInput,
|
|
46
|
+
L as AtLegend,
|
|
46
47
|
D as AtList,
|
|
47
48
|
v as AtLoading,
|
|
48
49
|
R as AtMenu,
|
|
49
50
|
W as AtModal,
|
|
50
51
|
w as AtNotifications,
|
|
51
|
-
z as
|
|
52
|
-
G as
|
|
53
|
-
J as
|
|
54
|
-
O as
|
|
55
|
-
V as
|
|
56
|
-
|
|
57
|
-
tt as
|
|
58
|
-
et as
|
|
59
|
-
|
|
60
|
-
lt as
|
|
61
|
-
st as
|
|
52
|
+
z as AtPaginator,
|
|
53
|
+
G as AtProgressBar,
|
|
54
|
+
J as AtRadioButton,
|
|
55
|
+
O as AtSearch,
|
|
56
|
+
V as AtSelect,
|
|
57
|
+
Y as AtSkeleton,
|
|
58
|
+
tt as AtTableConfig,
|
|
59
|
+
et as AtTabs,
|
|
60
|
+
rt as AtTag,
|
|
61
|
+
lt as AtTipograph,
|
|
62
|
+
st as AtToggle,
|
|
63
|
+
mt as AtTooltip,
|
|
62
64
|
x as ColorPicker,
|
|
63
65
|
T as Faq,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
_ as Stepper,
|
|
67
|
+
xt as Upload
|
|
66
68
|
};
|