@agrotools1/at-components1 1.1.0 → 1.1.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) 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/{bootstrap-encapsulated.css → bootstrap.css} +2 -2
  227. package/dist/bootstrap.css.map +1 -0
  228. package/dist/composables/useBootstrapWrapper.js +7 -0
  229. package/dist/index.css +3 -1
  230. package/dist/index.js +68 -16654
  231. package/dist/theme.css +1 -0
  232. package/dist/theme.css.map +1 -0
  233. package/package.json +14 -7
  234. package/dist/agrotools-theme.css +0 -5
  235. package/dist/agrotools-theme.css.map +0 -1
  236. package/dist/bootstrap-encapsulated.css.map +0 -1
@@ -0,0 +1,130 @@
1
+ import A from "./DataTable.vue2.js";
2
+ import { resolveComponent as c, createElementBlock as o, openBlock as t, Fragment as d, createElementVNode as i, createCommentVNode as m, mergeProps as P, createBlock as p, withDirectives as $, renderSlot as D, withCtx as T, createVNode as g, renderList as u, normalizeClass as f, withKeys as z, toDisplayString as w, resolveDynamicComponent as k, vShow as E } from "vue";
3
+ /* empty css */
4
+ import K from "../_virtual/_plugin-vue_export-helper.js";
5
+ const V = ["data-align-columns"], _ = ["data-isStick"], L = {
6
+ role: "row",
7
+ class: "thead-row"
8
+ }, U = {
9
+ key: 1,
10
+ role: "rowgroup"
11
+ }, B = ["onmouseenter"], F = ["data-key", "onClick"], I = { class: "td-container" }, N = ["id", "value", "onKeydown"], H = { key: 1 }, R = {
12
+ key: 2,
13
+ class: "item-as-array"
14
+ }, W = { key: 0 }, j = {
15
+ key: 0,
16
+ class: "d-flex flex-column w-100 gap-2"
17
+ }, M = { class: "table-skeleton" }, O = {
18
+ key: 1,
19
+ style: { display: "flex", "justify-content": "flex-end", "margin-top": "16px" }
20
+ };
21
+ function q(e, r, G, J, Q, X) {
22
+ const b = c("AtCheckbox"), v = c("AtColumn"), C = c("AtText"), S = c("AtPaginator");
23
+ return t(), o(d, null, [
24
+ i("table", P(e.$attrs, {
25
+ role: "table",
26
+ class: "table-content",
27
+ "data-align-columns": e.alignColumns
28
+ }), [
29
+ i("thead", {
30
+ role: "rowgroup",
31
+ "data-isStick": e.stickHeader
32
+ }, [
33
+ i("tr", L, [
34
+ e.withSelection ? (t(), p(v, {
35
+ key: 0,
36
+ field: "selection",
37
+ "data-align-columns": "left"
38
+ }, {
39
+ default: T(() => [
40
+ g(b, {
41
+ "model-value": e.withSelectionModel,
42
+ size: "20",
43
+ "onUpdate:modelValue": e.handleWithSelectionChanges
44
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
45
+ ]),
46
+ _: 1
47
+ })) : m("", !0),
48
+ D(e.$slots, "default", {}, void 0, !0)
49
+ ])
50
+ ], 8, _),
51
+ !e.value || !e.value.length ? (t(), p(C, {
52
+ key: 0,
53
+ as: "h6"
54
+ })) : $((t(), o("tbody", U, [
55
+ r[1] || (r[1] = i("tr", { class: "empty-space" }, null, -1)),
56
+ (t(!0), o(d, null, u(e.activeTableData, (a) => (t(), o("tr", {
57
+ key: e.extractKey(a),
58
+ class: f([...e.columnsClasses, "tbody-tr"]),
59
+ role: "row",
60
+ tabindex: "-1",
61
+ onmouseenter: (n) => {
62
+ e.lastHoveredTr = {
63
+ element: n.target,
64
+ item: a
65
+ };
66
+ }
67
+ }, [
68
+ (t(!0), o(d, null, u(e.getEntries(a), ([n, l]) => {
69
+ var h, y;
70
+ return t(), o("td", {
71
+ key: n,
72
+ "data-key": n,
73
+ role: "cell",
74
+ class: f(`tbody-row ${(h = e.withEditableFields) != null && h.includes(n) ? "with-focus" : ""} `),
75
+ "aria-selected": "false",
76
+ onClick: (s) => e.handleTrClick(s, n)
77
+ }, [
78
+ i("div", I, [
79
+ (y = e.withEditableFields) != null && y.includes(n) ? (t(), o("input", {
80
+ key: 0,
81
+ id: n,
82
+ placeholder: "",
83
+ value: l,
84
+ onKeydown: z((s) => e.updateOnKeyDown(s, n), ["enter"])
85
+ }, null, 40, N)) : typeof l == "number" || typeof l == "string" ? (t(), o("span", H, w(l), 1)) : Array.isArray(l) ? (t(), o("div", R, [
86
+ (t(!0), o(d, null, u(l, (s) => (t(), o("div", { key: s }, [
87
+ typeof s == "number" || typeof s == "string" ? (t(), o("span", W, w(s), 1)) : (t(), p(k(typeof s == "function" ? s() : s), { key: 1 }))
88
+ ]))), 128))
89
+ ])) : (t(), p(k(typeof l == "function" ? l() : l), { key: 3 }))
90
+ ])
91
+ ], 10, F);
92
+ }), 128))
93
+ ], 10, B))), 128)),
94
+ r[2] || (r[2] = i("tr", { class: "empty-space" }, null, -1))
95
+ ], 512)), [
96
+ [E, !e.reactiveIsLoading]
97
+ ])
98
+ ], 16, V),
99
+ e.reactiveIsLoading ? (t(), o("div", j, [
100
+ i("div", M, [
101
+ (t(!0), o(d, null, u(e.loadingRowsLength, (a) => (t(), o("div", {
102
+ key: a,
103
+ class: "skeleton-row"
104
+ }, [
105
+ (t(!0), o(d, null, u(e.columns, (n) => (t(), o("div", {
106
+ key: n,
107
+ class: "skeleton-cell"
108
+ }))), 128))
109
+ ]))), 128))
110
+ ])
111
+ ])) : m("", !0),
112
+ e.withPaginator ? (t(), o("div", O, [
113
+ g(S, {
114
+ ref: "paginatorRef",
115
+ "page-size": e.withPaginator.pageSize,
116
+ total: e.withPaginator.total,
117
+ disable: e.disable,
118
+ "disable-without-c-s-s": e.disableWithoutCSS,
119
+ "onUpdate:activePage": r[0] || (r[0] = (a) => {
120
+ var n;
121
+ (n = e.withPaginator) == null || n.onUpdatePage(a);
122
+ })
123
+ }, null, 8, ["page-size", "total", "disable", "disable-without-c-s-s"])
124
+ ])) : m("", !0)
125
+ ], 64);
126
+ }
127
+ const te = /* @__PURE__ */ K(A, [["render", q], ["__scopeId", "data-v-0e56160d"]]);
128
+ export {
129
+ te as default
130
+ };
@@ -0,0 +1,189 @@
1
+ import { defineComponent as L, ref as f, reactive as O, provide as b, readonly as x, inject as B, watch as p, onMounted as P, watchEffect as C, h as R, computed as q } from "vue";
2
+ import N from "../Paginator/Paginator.vue.js";
3
+ import { AtTipograph as V } from "../Tipograph/index.js";
4
+ import F from "./Column/Column.vue.js";
5
+ import D from "../Checkbox/Checkbox.vue.js";
6
+ const W = L({
7
+ name: "AtDataTable",
8
+ components: {
9
+ AtText: V.Title,
10
+ AtColumn: F,
11
+ AtPaginator: N,
12
+ AtCheckbox: D
13
+ },
14
+ inheritAttrs: !1,
15
+ props: {
16
+ value: {
17
+ type: Array,
18
+ required: !0
19
+ },
20
+ withEditableFields: {
21
+ type: Array,
22
+ default: void 0
23
+ },
24
+ withSelection: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ withDefaultSelectedItems: {
29
+ type: Array,
30
+ required: !1,
31
+ default: () => {
32
+ }
33
+ },
34
+ withPaginator: {
35
+ type: Object,
36
+ default: void 0
37
+ },
38
+ keyExtractor: {
39
+ type: Function,
40
+ default: (e) => e.id
41
+ },
42
+ columnsClasses: {
43
+ type: Array,
44
+ default: () => []
45
+ },
46
+ alignColumns: {
47
+ type: String,
48
+ default: "left"
49
+ },
50
+ isLoading: {
51
+ type: Boolean,
52
+ default: !1
53
+ },
54
+ loadingRowsLength: {
55
+ type: Number,
56
+ default: 10
57
+ },
58
+ disable: {
59
+ type: Boolean,
60
+ default: !1
61
+ },
62
+ disableWithoutCSS: {
63
+ type: Boolean,
64
+ default: !1
65
+ },
66
+ stickHeader: {
67
+ type: Boolean,
68
+ default: !1
69
+ }
70
+ },
71
+ emits: {
72
+ "update:selected-items": (e) => Array.isArray(e),
73
+ "update:table-data": (e) => Array.isArray(e),
74
+ "update:table-cell": (e) => typeof e == "object"
75
+ },
76
+ setup(e, r) {
77
+ const i = f(e.value), A = f([...i.value]), m = f(!1), u = f([]), I = f(), v = f(null), d = O([]), g = (t) => {
78
+ d.includes(t) || d.push(t);
79
+ };
80
+ b("columns", {
81
+ columns: x(d),
82
+ updateColumn: g
83
+ }), b("alignColumns", e.alignColumns), b("tableData", i);
84
+ const w = B("columns", {
85
+ columns: d,
86
+ updateColumn: g
87
+ }), k = (t) => Object.entries(t), s = (t) => {
88
+ try {
89
+ return e.keyExtractor(t);
90
+ } catch (n) {
91
+ console.warn("AtDataTable: Não foi possível extrair a key: ", n);
92
+ }
93
+ }, T = (t, n) => {
94
+ var a;
95
+ const o = t.target;
96
+ if ((a = e.withEditableFields) != null && a.includes(n)) {
97
+ const l = o.querySelector("input");
98
+ l == null || l.focus();
99
+ }
100
+ }, y = (t) => {
101
+ u.value = t;
102
+ const n = i.value.length, o = [...e.value].filter((a) => {
103
+ const l = s(a);
104
+ return [...u.value].includes(l);
105
+ });
106
+ if (v.value) {
107
+ const { element: a, item: l } = v.value, c = o.find((h) => s(h) === s(l));
108
+ a.setAttribute("aria-selected", JSON.stringify(!!c));
109
+ }
110
+ n === u.value.length ? m.value = !0 : m.value = !1, r.emit("update:selected-items", Array.from(o));
111
+ }, K = (t, n) => {
112
+ var c;
113
+ const o = t.target, { value: a } = o, l = (c = v.value) == null ? void 0 : c.item;
114
+ l && (l[n] = a, i.value = i.value.map((h) => {
115
+ const j = s(h), E = s(l);
116
+ return j === E ? l : h;
117
+ }), r.emit("update:table-data", i.value), r.emit("update:table-cell", {
118
+ field: n,
119
+ value: a
120
+ }));
121
+ }, S = (t) => {
122
+ m.value = t;
123
+ const n = Array.from(document.querySelectorAll(".table-content tbody tr")), o = (a) => {
124
+ for (const l of n)
125
+ l.setAttribute("aria-selected", JSON.stringify(a));
126
+ };
127
+ t ? (u.value = [...e.value].map((a) => s(a)), y(u.value), o(!0)) : (u.value = [], y(u.value), o(!1));
128
+ };
129
+ return p(
130
+ () => e.withDefaultSelectedItems,
131
+ (t) => {
132
+ t && y(e.withDefaultSelectedItems ?? []);
133
+ }
134
+ ), P(() => {
135
+ e.withDefaultSelectedItems && y([...e.withDefaultSelectedItems]);
136
+ }), C(() => {
137
+ e.withSelection ? i.value = [...e.value].map((t) => ({
138
+ selection: () => R(D, {
139
+ modelValue: u.value,
140
+ "onUpdate:modelValue": (n) => y(n),
141
+ val: s(t),
142
+ size: "20"
143
+ }),
144
+ ...t
145
+ })) : i.value = [...e.value];
146
+ }), C(() => {
147
+ const t = [...d], n = [...i.value].map((o) => {
148
+ const a = {}, l = Object.keys({ ...o });
149
+ for (const c of t)
150
+ l.includes(c) && (a[c] = o[c]);
151
+ return a;
152
+ });
153
+ A.value = n;
154
+ }), p(
155
+ () => [e.isLoading, e.value],
156
+ () => {
157
+ !e.isLoading && e.value.length > 0 && S(m.value);
158
+ },
159
+ {
160
+ flush: "post"
161
+ }
162
+ ), {
163
+ reactiveIsLoading: q(() => e.isLoading),
164
+ withSelectionModel: m,
165
+ handleWithSelectionChanges: S,
166
+ tableData: i,
167
+ activeTableData: A,
168
+ columns: w.columns,
169
+ updateColumn: w.updateColumn,
170
+ internalUpdateColumn: g,
171
+ internalColumns: d,
172
+ lastHoveredTr: v,
173
+ getEntries: k,
174
+ extractKey: s,
175
+ updateOnKeyDown: K,
176
+ handleTrClick: T,
177
+ paginatorRef: I
178
+ };
179
+ },
180
+ methods: {
181
+ setPage(e) {
182
+ var r;
183
+ (r = this.paginatorRef) == null || r.setPage(e);
184
+ }
185
+ }
186
+ });
187
+ export {
188
+ W as default
189
+ };
@@ -0,0 +1,11 @@
1
+ import o from "./Column/Column.vue.js";
2
+ import t from "./Counters/Counters.vue.js";
3
+ import r from "./DataTable.vue.js";
4
+ const p = {
5
+ DataTable: r,
6
+ Column: o,
7
+ Counters: t
8
+ };
9
+ export {
10
+ p as AtDataTable
11
+ };
@@ -0,0 +1,99 @@
1
+ const s = {
2
+ pt: [
3
+ "Janeiro",
4
+ "Fevereiro",
5
+ "Março",
6
+ "Abril",
7
+ "Maio",
8
+ "Junho",
9
+ "Julho",
10
+ "Agosto",
11
+ "Setembro",
12
+ "Outubro",
13
+ "Novembro",
14
+ "Dezembro"
15
+ ],
16
+ en: [
17
+ "January",
18
+ "February",
19
+ "March",
20
+ "April",
21
+ "May",
22
+ "June",
23
+ "July",
24
+ "August",
25
+ "September",
26
+ "October",
27
+ "November",
28
+ "December"
29
+ ],
30
+ es: [
31
+ "Enero",
32
+ "Febrero",
33
+ "Marzo",
34
+ "Abril",
35
+ "Mayo",
36
+ "Junio",
37
+ "Julio",
38
+ "Agosto",
39
+ "Septiembre",
40
+ "Octubre",
41
+ "Noviembre",
42
+ "Diciembre"
43
+ ]
44
+ }, u = {
45
+ pt: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
46
+ en: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
47
+ es: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"]
48
+ }, l = {
49
+ pt: "Salvar",
50
+ en: "Apply",
51
+ es: "Guardar"
52
+ }, d = {
53
+ pt: "Cancelar",
54
+ en: "Cancel",
55
+ es: "Cancelar"
56
+ }, b = {
57
+ pt: {
58
+ date: "Data",
59
+ dateStart: "Data Início",
60
+ dateEnd: "Data Fim"
61
+ },
62
+ en: {
63
+ date: "Date",
64
+ dateStart: "Start Date",
65
+ dateEnd: "End Date"
66
+ },
67
+ es: {
68
+ date: "Fecha",
69
+ dateStart: "Fecha Inicio",
70
+ dateEnd: "Fecha Fin"
71
+ }
72
+ };
73
+ function m() {
74
+ const e = (/* @__PURE__ */ new Date()).toLocaleTimeString();
75
+ return e.includes("AM") || e.includes("PM");
76
+ }
77
+ function S(e) {
78
+ if (!e) return "";
79
+ const a = {
80
+ day: "2-digit",
81
+ month: "2-digit",
82
+ year: "numeric"
83
+ };
84
+ let t = new Date(e).toLocaleString("pt-br", a);
85
+ if (t.toString() === "Invalid Date") {
86
+ const [n, r, o] = String(e).split("/");
87
+ t = (/* @__PURE__ */ new Date(`${o}-${r}-${n}`)).toLocaleString("pt-br", a);
88
+ }
89
+ return t;
90
+ }
91
+ export {
92
+ d as cancelTranslation,
93
+ S as formatToBrDate,
94
+ m as isUsing12HourFormat,
95
+ s as monthTranslationObj,
96
+ b as placeholderTranslation,
97
+ l as saveTranslation,
98
+ u as weekInitialsObject
99
+ };
@@ -0,0 +1,123 @@
1
+ import f from "./DatePicker.vue2.js";
2
+ import { resolveComponent as o, createElementBlock as i, openBlock as a, createElementVNode as m, createVNode as l, withCtx as d, createCommentVNode as t, createBlock as u, createTextVNode as k, toDisplayString as D } from "vue";
3
+ /* empty css */
4
+ import v from "../_virtual/_plugin-vue_export-helper.js";
5
+ const M = { class: "AT-DATEPICKER_container no-select" }, I = { class: "AT-DATEPICKER_core" }, b = {
6
+ key: 0,
7
+ class: "AT-DATEPICKER-callToAction"
8
+ };
9
+ function V(e, r, T, c, E, S) {
10
+ const P = o("AtCoreInput"), g = o("AtDatePickerHeader"), y = o("AtDatePickerCalendar"), A = o("AtDatePickerTime"), s = o("AtDatePickerListSelector"), p = o("AtButton"), C = o("AtDropdown");
11
+ return a(), i("div", M, [
12
+ m("div", null, [
13
+ l(C, {
14
+ id: e.id,
15
+ "is-open": e.displayModal,
16
+ position: e.position,
17
+ "onUpdate:isOpen": e.onOpenedModal
18
+ }, {
19
+ trigger: d(() => [
20
+ l(P, {
21
+ modelValue: e.displayValue,
22
+ "onUpdate:modelValue": r[0] || (r[0] = (n) => e.displayValue = n),
23
+ label: e.label,
24
+ disabled: e.disabled,
25
+ readonly: !0,
26
+ "force-focus": e.displayModal,
27
+ placeholder: e.placeholder,
28
+ cursor: "pointer",
29
+ icon: { name: "AtCalendarRegularIcon" },
30
+ "use-clear-button": e.value.startDate != null || e.value.endDate != null,
31
+ "force-event-clear-button": !0,
32
+ error: e.error,
33
+ onClickOutside: e.checkUnFocus,
34
+ onClearInput: r[1] || (r[1] = (n) => e.$emit("update:value", e.clearValue())),
35
+ onMouseover: r[2] || (r[2] = (n) => e.isInputHovered = n)
36
+ }, null, 8, ["modelValue", "label", "disabled", "force-focus", "placeholder", "use-clear-button", "error", "onClickOutside"])
37
+ ]),
38
+ default: d(() => [
39
+ e.displayModal ? (a(), i("div", {
40
+ key: 0,
41
+ class: "AT-DATEPICKER_modal",
42
+ onClick: r[13] || (r[13] = (...n) => e.keepFocus && e.keepFocus(...n))
43
+ }, [
44
+ l(g, {
45
+ "date-picker-mode": e.datePickerMode,
46
+ "current-month": e.getMonthName(e.currentMonth),
47
+ "current-year": e.currentYear,
48
+ "current-year-range": e.currentYearRange,
49
+ "selected-year": e.selectedMonthYear,
50
+ style: { marginBottom: "16px" },
51
+ onSimpleArrows: r[3] || (r[3] = (n) => e.updateDatePeriod(n, !0)),
52
+ "onUpdate:datePickerMode": r[4] || (r[4] = (n) => e.datePickerMode = n)
53
+ }, null, 8, ["date-picker-mode", "current-month", "current-year", "current-year-range", "selected-year"]),
54
+ m("div", I, [
55
+ e.datePickerMode === "calendar" ? (a(), u(y, {
56
+ key: 0,
57
+ year: e.currentYear,
58
+ month: e.currentMonth,
59
+ "selected-range": e.useConfirmBox ? e.auxValue : e.value,
60
+ "use-range": e.useRange,
61
+ "week-initials": e.weekInitials,
62
+ onIncrementMonth: r[5] || (r[5] = (n) => e.updateDatePeriod(n, !0)),
63
+ onSelected: r[6] || (r[6] = (n) => e.updateValue(n))
64
+ }, null, 8, ["year", "month", "selected-range", "use-range", "week-initials"])) : t("", !0),
65
+ e.useTimeInput && !e.useRange && e.datePickerMode === "calendar" ? (a(), u(A, {
66
+ key: 1,
67
+ date: e.useConfirmBox ? e.auxValue.startDate : e.value.startDate,
68
+ "period12-hour": e.display12HourFormat,
69
+ disabled: e.disabled || !e.value.startDate,
70
+ "set-focus-element": e.setTimeInputFocus,
71
+ "onUpdate:date": r[7] || (r[7] = (n) => e.updateValue({ startDate: n, endDate: n }))
72
+ }, null, 8, ["date", "period12-hour", "disabled", "set-focus-element"])) : t("", !0),
73
+ e.datePickerMode === "monthSelector" ? (a(), u(s, {
74
+ key: 2,
75
+ elements: e.monthList,
76
+ "current-page-value": `${e.currentYear}-${e.currentMonth}`,
77
+ onElementSelected: r[8] || (r[8] = (n) => {
78
+ e.updateMonthYear(n), e.datePickerMode = "calendar";
79
+ })
80
+ }, null, 8, ["elements", "current-page-value"])) : t("", !0),
81
+ e.datePickerMode === "yearSelector" ? (a(), u(s, {
82
+ key: 3,
83
+ elements: e.yearList,
84
+ "current-page-value": String(e.currentYear),
85
+ "current-page-index": e.currentYearPageIndex,
86
+ onUpdateCurrentPageIndex: r[9] || (r[9] = (n) => e.currentYearPageIndex = n),
87
+ onUpdateCurrentSelector: r[10] || (r[10] = (n) => e.currentYearRange = n),
88
+ onElementSelected: r[11] || (r[11] = (n) => {
89
+ e.updateMonthYear(n), e.datePickerMode = "calendar";
90
+ })
91
+ }, null, 8, ["elements", "current-page-value", "current-page-index"])) : t("", !0)
92
+ ]),
93
+ e.useConfirmBox ? (a(), i("div", b, [
94
+ l(p, {
95
+ variant: "secondary",
96
+ onClick: r[12] || (r[12] = (n) => e.updateFocus(!1))
97
+ }, {
98
+ default: d(() => [
99
+ k(D(e.buttonNames.cancel), 1)
100
+ ]),
101
+ _: 1
102
+ }),
103
+ l(p, {
104
+ disabled: !(e.auxValue.startDate && e.auxValue.endDate),
105
+ onClick: e.confirmInput
106
+ }, {
107
+ default: d(() => [
108
+ k(D(e.buttonNames.save), 1)
109
+ ]),
110
+ _: 1
111
+ }, 8, ["disabled", "onClick"])
112
+ ])) : t("", !0)
113
+ ])) : t("", !0)
114
+ ]),
115
+ _: 1
116
+ }, 8, ["id", "is-open", "position", "onUpdate:isOpen"])
117
+ ])
118
+ ]);
119
+ }
120
+ const $ = /* @__PURE__ */ v(f, [["render", V], ["__scopeId", "data-v-8221a943"]]);
121
+ export {
122
+ $ as default
123
+ };