@quoreadmin/ui 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/dist/index.js +110 -85433
  2. package/dist/index10.js +55 -0
  3. package/dist/index101.js +213 -0
  4. package/dist/index103.js +78 -0
  5. package/dist/index105.js +136 -0
  6. package/dist/index107.js +216 -0
  7. package/dist/index109.js +134 -0
  8. package/dist/index11.js +183 -0
  9. package/dist/index111.js +154 -0
  10. package/dist/index113.js +44 -0
  11. package/dist/index115.js +78 -0
  12. package/dist/index117.js +25 -0
  13. package/dist/index119.js +84 -0
  14. package/dist/index12.js +74 -0
  15. package/dist/index121.js +16 -0
  16. package/dist/index123.js +82 -0
  17. package/dist/index125.js +134 -0
  18. package/dist/index127.js +56 -0
  19. package/dist/index129.js +37 -0
  20. package/dist/index13.js +32 -0
  21. package/dist/index131.js +65 -0
  22. package/dist/index133.js +815 -0
  23. package/dist/index135.js +277 -0
  24. package/dist/index137.js +350 -0
  25. package/dist/index139.js +31 -0
  26. package/dist/index14.js +190 -0
  27. package/dist/index141.js +89 -0
  28. package/dist/index143.js +93 -0
  29. package/dist/index145.js +116 -0
  30. package/dist/index147.js +389 -0
  31. package/dist/index149.js +44 -0
  32. package/dist/index15.js +138 -0
  33. package/dist/index151.js +210 -0
  34. package/dist/index154.js +115 -0
  35. package/dist/index155.js +497 -0
  36. package/dist/index156.js +5524 -0
  37. package/dist/index157.js +93 -0
  38. package/dist/index158.js +863 -0
  39. package/dist/index159.js +40 -0
  40. package/dist/index16.js +318 -0
  41. package/dist/index160.js +282 -0
  42. package/dist/index161.js +152 -0
  43. package/dist/index162.js +1201 -0
  44. package/dist/index163.js +774 -0
  45. package/dist/index164.js +1310 -0
  46. package/dist/index165.js +278 -0
  47. package/dist/index166.js +108 -0
  48. package/dist/index167.js +4 -0
  49. package/dist/index168.js +1378 -0
  50. package/dist/index17.js +25 -0
  51. package/dist/index170.js +20 -0
  52. package/dist/index171.js +20 -0
  53. package/dist/index172.js +20 -0
  54. package/dist/index173.js +20 -0
  55. package/dist/index174.js +27 -0
  56. package/dist/index175.js +761 -0
  57. package/dist/index176.js +831 -0
  58. package/dist/index177.js +1236 -0
  59. package/dist/index178.js +11279 -0
  60. package/dist/index179.js +38 -0
  61. package/dist/index18.js +48 -0
  62. package/dist/index180.js +117 -0
  63. package/dist/index181.js +46 -0
  64. package/dist/index182.js +1192 -0
  65. package/dist/index184.js +5940 -0
  66. package/dist/index185.js +209 -0
  67. package/dist/index186.js +37 -0
  68. package/dist/index187.js +20 -0
  69. package/dist/index188.js +80 -0
  70. package/dist/index189.js +255 -0
  71. package/dist/index19.js +53 -0
  72. package/dist/index190.js +13686 -0
  73. package/dist/index191.js +29 -0
  74. package/dist/index192.js +65 -0
  75. package/dist/index193.js +240 -0
  76. package/dist/index194.js +310 -0
  77. package/dist/index195.js +290 -0
  78. package/dist/index196.js +35 -0
  79. package/dist/index197.js +118 -0
  80. package/dist/index198.js +38 -0
  81. package/dist/index199.js +28 -0
  82. package/dist/index2.js +86 -0
  83. package/dist/index20.js +35 -0
  84. package/dist/index200.js +38 -0
  85. package/dist/index201.js +11 -0
  86. package/dist/index202.js +21 -0
  87. package/dist/index203.js +12 -0
  88. package/dist/index204.js +12 -0
  89. package/dist/index205.js +53 -0
  90. package/dist/index206.js +45 -0
  91. package/dist/index207.js +6 -0
  92. package/dist/index208.js +41 -0
  93. package/dist/index209.js +23 -0
  94. package/dist/index21.js +68 -0
  95. package/dist/index210.js +90 -0
  96. package/dist/index211.js +409 -0
  97. package/dist/index212.js +24 -0
  98. package/dist/index213.js +163 -0
  99. package/dist/index214.js +22 -0
  100. package/dist/index215.js +22 -0
  101. package/dist/index216.js +24 -0
  102. package/dist/index217.js +201 -0
  103. package/dist/index218.js +72 -0
  104. package/dist/index219.js +36 -0
  105. package/dist/index22.js +176 -0
  106. package/dist/index220.js +42 -0
  107. package/dist/index221.js +129 -0
  108. package/dist/index222.js +40 -0
  109. package/dist/index223.js +82 -0
  110. package/dist/index224.js +22 -0
  111. package/dist/index225.js +22 -0
  112. package/dist/index226.js +22 -0
  113. package/dist/index227.js +22 -0
  114. package/dist/index228.js +163 -0
  115. package/dist/index229.js +230 -0
  116. package/dist/index23.js +14 -0
  117. package/dist/index230.js +39 -0
  118. package/dist/index231.js +12 -0
  119. package/dist/index232.js +24 -0
  120. package/dist/index233.js +24 -0
  121. package/dist/index234.js +22 -0
  122. package/dist/index235.js +838 -0
  123. package/dist/index236.js +704 -0
  124. package/dist/index237.js +178 -0
  125. package/dist/index238.js +24 -0
  126. package/dist/index239.js +22 -0
  127. package/dist/index24.js +43 -0
  128. package/dist/index240.js +22 -0
  129. package/dist/index241.js +5 -0
  130. package/dist/index242.js +189 -0
  131. package/dist/index243.js +135 -0
  132. package/dist/index244.js +1225 -0
  133. package/dist/index245.js +22 -0
  134. package/dist/index246.js +24 -0
  135. package/dist/index247.js +24 -0
  136. package/dist/index248.js +31 -0
  137. package/dist/index249.js +22 -0
  138. package/dist/index25.js +123 -0
  139. package/dist/index250.js +22 -0
  140. package/dist/index251.js +4 -0
  141. package/dist/index252.js +4 -0
  142. package/dist/index253.js +3634 -0
  143. package/dist/index254.js +57 -0
  144. package/dist/index255.js +79 -0
  145. package/dist/index256.js +54 -0
  146. package/dist/index257.js +217 -0
  147. package/dist/index258.js +12 -0
  148. package/dist/index259.js +59 -0
  149. package/dist/index26.js +29 -0
  150. package/dist/index260.js +63 -0
  151. package/dist/index261.js +56 -0
  152. package/dist/index262.js +77 -0
  153. package/dist/index263.js +725 -0
  154. package/dist/index264.js +41 -0
  155. package/dist/index265.js +66 -0
  156. package/dist/index266.js +13 -0
  157. package/dist/index267.js +707 -0
  158. package/dist/index268.js +822 -0
  159. package/dist/index269.js +255 -0
  160. package/dist/index27.js +163 -0
  161. package/dist/index270.js +10 -0
  162. package/dist/index271.js +140 -0
  163. package/dist/index272.js +85 -0
  164. package/dist/index273.js +5 -0
  165. package/dist/index274.js +29 -0
  166. package/dist/index275.js +56 -0
  167. package/dist/index276.js +81 -0
  168. package/dist/index277.js +28 -0
  169. package/dist/index278.js +24 -0
  170. package/dist/index279.js +24 -0
  171. package/dist/index28.js +286 -0
  172. package/dist/index280.js +18 -0
  173. package/dist/index281.js +19 -0
  174. package/dist/index282.js +25 -0
  175. package/dist/index283.js +4 -0
  176. package/dist/index284.js +237 -0
  177. package/dist/index285.js +8 -0
  178. package/dist/index286.js +136 -0
  179. package/dist/index287.js +70 -0
  180. package/dist/index288.js +89 -0
  181. package/dist/index289.js +31 -0
  182. package/dist/index29.js +69 -0
  183. package/dist/index290.js +11 -0
  184. package/dist/index291.js +77 -0
  185. package/dist/index292.js +6 -0
  186. package/dist/index293.js +4 -0
  187. package/dist/index294.js +85 -0
  188. package/dist/index295.js +56 -0
  189. package/dist/index296.js +8 -0
  190. package/dist/index297.js +7 -0
  191. package/dist/index298.js +181 -0
  192. package/dist/index299.js +65 -0
  193. package/dist/index3.js +69 -0
  194. package/dist/index30.js +183 -0
  195. package/dist/index300.js +77 -0
  196. package/dist/index301.js +81 -0
  197. package/dist/index302.js +24 -0
  198. package/dist/index303.js +937 -0
  199. package/dist/index304.js +24 -0
  200. package/dist/index305.js +22 -0
  201. package/dist/index306.js +22 -0
  202. package/dist/index307.js +71 -0
  203. package/dist/index308.js +21 -0
  204. package/dist/index309.js +21 -0
  205. package/dist/index31.js +44 -0
  206. package/dist/index310.js +24 -0
  207. package/dist/index311.js +24 -0
  208. package/dist/index312.js +65 -0
  209. package/dist/index313.js +1520 -0
  210. package/dist/index314.js +388 -0
  211. package/dist/index315.js +2733 -0
  212. package/dist/index316.js +88 -0
  213. package/dist/index317.js +3772 -0
  214. package/dist/index318.js +62 -0
  215. package/dist/index319.js +17 -0
  216. package/dist/index32.js +55 -0
  217. package/dist/index320.js +86 -0
  218. package/dist/index321.js +204 -0
  219. package/dist/index322.js +248 -0
  220. package/dist/index323.js +11 -0
  221. package/dist/index324.js +15 -0
  222. package/dist/index325.js +57 -0
  223. package/dist/index326.js +14 -0
  224. package/dist/index327.js +16 -0
  225. package/dist/index328.js +60 -0
  226. package/dist/index329.js +54 -0
  227. package/dist/index33.js +38 -0
  228. package/dist/index330.js +33 -0
  229. package/dist/index331.js +4 -0
  230. package/dist/index332.js +7 -0
  231. package/dist/index333.js +4 -0
  232. package/dist/index334.js +25 -0
  233. package/dist/index335.js +43 -0
  234. package/dist/index336.js +4 -0
  235. package/dist/index337.js +13 -0
  236. package/dist/index338.js +22 -0
  237. package/dist/index339.js +19 -0
  238. package/dist/index34.js +35 -0
  239. package/dist/index340.js +12 -0
  240. package/dist/index341.js +12 -0
  241. package/dist/index342.js +4 -0
  242. package/dist/index343.js +11 -0
  243. package/dist/index344.js +12 -0
  244. package/dist/index345.js +16 -0
  245. package/dist/index346.js +39 -0
  246. package/dist/index347.js +23 -0
  247. package/dist/index348.js +58 -0
  248. package/dist/index349.js +31 -0
  249. package/dist/index35.js +19 -0
  250. package/dist/index350.js +9 -0
  251. package/dist/index351.js +54 -0
  252. package/dist/index352.js +8 -0
  253. package/dist/index353.js +14 -0
  254. package/dist/index354.js +9 -0
  255. package/dist/index355.js +30 -0
  256. package/dist/index356.js +4 -0
  257. package/dist/index357.js +72 -0
  258. package/dist/index358.js +169 -0
  259. package/dist/index359.js +22 -0
  260. package/dist/index36.js +47 -0
  261. package/dist/index360.js +22 -0
  262. package/dist/index361.js +66 -0
  263. package/dist/index362.js +39 -0
  264. package/dist/index363.js +33 -0
  265. package/dist/index364.js +13 -0
  266. package/dist/index365.js +6 -0
  267. package/dist/index366.js +6 -0
  268. package/dist/index367.js +15 -0
  269. package/dist/index368.js +9 -0
  270. package/dist/index369.js +14 -0
  271. package/dist/index37.js +42 -0
  272. package/dist/index370.js +7 -0
  273. package/dist/index371.js +35 -0
  274. package/dist/index372.js +33 -0
  275. package/dist/index373.js +30 -0
  276. package/dist/index374.js +63 -0
  277. package/dist/index375.js +19 -0
  278. package/dist/index376.js +103 -0
  279. package/dist/index377.js +93 -0
  280. package/dist/index378.js +100 -0
  281. package/dist/index379.js +5 -0
  282. package/dist/index38.js +32 -0
  283. package/dist/index380.js +4 -0
  284. package/dist/index381.js +4 -0
  285. package/dist/index382.js +19 -0
  286. package/dist/index383.js +15 -0
  287. package/dist/index384.js +8 -0
  288. package/dist/index385.js +34 -0
  289. package/dist/index39.js +39 -0
  290. package/dist/index4.js +23 -0
  291. package/dist/index40.js +44 -0
  292. package/dist/index41.js +1075 -0
  293. package/dist/index42.js +339 -0
  294. package/dist/index43.js +159 -0
  295. package/dist/index44.js +22 -0
  296. package/dist/index45.js +42 -0
  297. package/dist/index46.js +72 -0
  298. package/dist/index47.js +65 -0
  299. package/dist/index48.js +184 -0
  300. package/dist/index49.js +88 -0
  301. package/dist/index5.js +19 -0
  302. package/dist/index50.js +209 -0
  303. package/dist/index51.js +71 -0
  304. package/dist/index52.js +22 -0
  305. package/dist/index53.js +13 -0
  306. package/dist/index54.js +9 -0
  307. package/dist/index55.js +213 -0
  308. package/dist/index56.js +15 -0
  309. package/dist/index57.js +187 -0
  310. package/dist/index58.js +79 -0
  311. package/dist/index6.js +21 -0
  312. package/dist/index60.js +9 -0
  313. package/dist/index61.js +65 -0
  314. package/dist/index63.js +44 -0
  315. package/dist/index65.js +16 -0
  316. package/dist/index67.js +30 -0
  317. package/dist/index69.js +141 -0
  318. package/dist/index7.js +76 -0
  319. package/dist/index71.js +78 -0
  320. package/dist/index73.js +62 -0
  321. package/dist/index74.js +105 -0
  322. package/dist/index76.js +217 -0
  323. package/dist/index78.js +108 -0
  324. package/dist/index8.js +31 -0
  325. package/dist/index80.js +36 -0
  326. package/dist/index81.js +140 -0
  327. package/dist/index83.js +141 -0
  328. package/dist/index85.js +292 -0
  329. package/dist/index87.js +29 -0
  330. package/dist/index89.js +45 -0
  331. package/dist/index9.js +36 -0
  332. package/dist/index91.js +117 -0
  333. package/dist/index93.js +29 -0
  334. package/dist/index94.js +34 -0
  335. package/dist/index96.js +138 -0
  336. package/dist/index97.js +10 -0
  337. package/dist/index99.js +39 -0
  338. package/package.json +3 -4
  339. package/dist/index.umd.cjs +0 -1322
@@ -0,0 +1,55 @@
1
+ import t from "./index74.js";
2
+ import { resolveComponent as d, createElementBlock as i, openBlock as o, createElementVNode as s, normalizeClass as l, createCommentVNode as a, createBlock as h, toDisplayString as m } from "vue";
3
+ /* empty css */
4
+ import p from "./index60.js";
5
+ const k = { class: "control" }, b = ["id", "value", "checked", "disabled", "name"], f = {
6
+ key: 0,
7
+ class: "checkbox-label"
8
+ };
9
+ function u(e, n, g, C, y, v) {
10
+ const c = d("q-icon");
11
+ return o(), i("div", k, [
12
+ s("label", {
13
+ class: l([
14
+ "checkbox",
15
+ "flex",
16
+ e.toggle ? "items-center" : "items-start",
17
+ { disabled: e.disabled },
18
+ { toggle: e.toggle }
19
+ ])
20
+ }, [
21
+ s("input", {
22
+ id: e.id,
23
+ value: e.value,
24
+ checked: e.isChecked,
25
+ disabled: e.disabled,
26
+ name: e.name,
27
+ class: l([e.size, "checkbox-input flex-shrink-0"]),
28
+ ref: "checkboxElement",
29
+ type: "checkbox",
30
+ onChange: n[0] || (n[0] = (...r) => e.handleChange && e.handleChange(...r))
31
+ }, null, 42, b),
32
+ s("span", {
33
+ class: l([
34
+ "checkbox-display flex flex-shrink-0",
35
+ "items-center justify-center",
36
+ e.size,
37
+ { [`bg-${e.color}`]: e.color && e.isChecked }
38
+ ])
39
+ }, [
40
+ e.isChecked ? (o(), h(c, {
41
+ key: 0,
42
+ icon: e.icon,
43
+ size: "sm",
44
+ color: "white",
45
+ type: ""
46
+ }, null, 8, ["icon"])) : a("", !0)
47
+ ], 2),
48
+ e.label ? (o(), i("span", f, m(e.label), 1)) : a("", !0)
49
+ ], 2)
50
+ ]);
51
+ }
52
+ const q = /* @__PURE__ */ p(t, [["render", u], ["__scopeId", "data-v-fc6ee34f"]]);
53
+ export {
54
+ q as default
55
+ };
@@ -0,0 +1,213 @@
1
+ import { defineComponent as w, ref as B, computed as r } from "vue";
2
+ import { filterData as O } from "./index51.js";
3
+ import { useI18n as D } from "vue-i18n";
4
+ import F from "./index6.js";
5
+ import y from "./index52.js";
6
+ const M = w({
7
+ name: "QGrid",
8
+ components: {
9
+ QBadge: F
10
+ },
11
+ props: {
12
+ /** Pass in an ID unique to the table. */
13
+ id: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ /** Custom CSS classes for active cells */
18
+ activeCellClasses: {
19
+ type: [String, Array, Object],
20
+ default: ""
21
+ },
22
+ cellClasses: {
23
+ type: [String, Array, Object],
24
+ default: ""
25
+ },
26
+ /** Number of columns in the grid (1-15 supported) */
27
+ columns: {
28
+ type: Number,
29
+ default: 4
30
+ },
31
+ disableInternalFiltering: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ /** Exclude certain values from the grid */
36
+ exclude: {
37
+ type: Array,
38
+ default: () => []
39
+ },
40
+ /** Pass data for filter feature */
41
+ filters: {
42
+ type: Array,
43
+ default: () => []
44
+ },
45
+ /** Pass in a function for when filters icon is clicked. */
46
+ filtersAction: {
47
+ type: Function,
48
+ default: () => {
49
+ }
50
+ },
51
+ /** Pass in a count of active filters. */
52
+ filtersCount: {
53
+ type: Number,
54
+ default: 0
55
+ },
56
+ isExpanded: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ /** Data inside of the grid */
61
+ gridData: {
62
+ type: Array,
63
+ default: () => []
64
+ },
65
+ /** If the grid should include the search */
66
+ hasSearch: {
67
+ type: Boolean,
68
+ default: !0
69
+ },
70
+ /** If the loading state is enabled */
71
+ loading: {
72
+ type: Boolean,
73
+ default: !1
74
+ },
75
+ /** Ability to customize the no result message */
76
+ noResultMessage: {
77
+ type: String,
78
+ default: ""
79
+ },
80
+ /** Ability to customize the search placeholder */
81
+ searchPlaceholder: {
82
+ type: String,
83
+ default: ""
84
+ },
85
+ /** Pass in the number of skeleton rows that should show while loading. */
86
+ skeletonRows: {
87
+ type: Number,
88
+ default: 6
89
+ },
90
+ statusClasses: {
91
+ type: Object,
92
+ default: () => ({})
93
+ },
94
+ /** Current search value */
95
+ searchValue: {
96
+ type: String,
97
+ default: ""
98
+ }
99
+ },
100
+ emits: [
101
+ "select-grid-item",
102
+ "filters-updated",
103
+ "close-expanded",
104
+ "update:searchValue"
105
+ ],
106
+ setup(e, { emit: o }) {
107
+ const { t: h } = D(), f = B(""), v = r({
108
+ get: () => e.searchValue,
109
+ set: (t) => o("update:searchValue", t)
110
+ }), i = r(() => {
111
+ if (e.disableInternalFiltering)
112
+ return e.gridData;
113
+ const t = e.filters, s = O(
114
+ e.gridData,
115
+ f.value || v.value,
116
+ t,
117
+ void 0,
118
+ void 0,
119
+ e.exclude
120
+ );
121
+ return o("filters-updated", s), s;
122
+ }), b = r(() => (t, s, n) => {
123
+ const l = [
124
+ "cursor-pointer",
125
+ "truncate",
126
+ "group",
127
+ "cell"
128
+ ];
129
+ if (e.cellClasses && (typeof e.cellClasses == "string" ? l.push(e.cellClasses) : Array.isArray(e.cellClasses) ? l.push(...e.cellClasses) : typeof e.cellClasses == "object" && Object.entries(e.cellClasses).forEach(
130
+ ([a, c]) => {
131
+ c && l.push(a);
132
+ }
133
+ )), t.active && e.activeCellClasses && (typeof e.activeCellClasses == "string" ? l.push(e.activeCellClasses) : Array.isArray(e.activeCellClasses) ? l.push(...e.activeCellClasses) : typeof e.activeCellClasses == "object" && Object.entries(e.activeCellClasses).forEach(
134
+ ([a, c]) => {
135
+ c && l.push(a);
136
+ }
137
+ )), e.statusClasses && t.status) {
138
+ const a = m(
139
+ t.status,
140
+ !!t.active
141
+ );
142
+ a && l.push(a);
143
+ }
144
+ if (t.active && l.push("active"), y.md) {
145
+ const a = C(s);
146
+ Object.entries(a).forEach(
147
+ ([c, u]) => {
148
+ u && l.push(c);
149
+ }
150
+ );
151
+ }
152
+ return e.loading && l.push("bg-gray-10", "animate-shimmer"), n && l.push("no-scale"), l;
153
+ }), A = r(() => e.columns ? `grid-cols-${e.columns}` : ""), S = r(() => i.value.length % e.columns === 0), R = r(() => e.noResultMessage || h("HC_NO_RESULTS_FOUND")), d = r(() => {
154
+ const t = [], s = {};
155
+ return [...Array(e.skeletonRows * e.columns)].forEach(() => {
156
+ t.push(s);
157
+ }), t;
158
+ }), C = (t) => {
159
+ const s = i.value.length ? i.value : d.value, n = Math.ceil(s.length / e.columns), l = Math.floor(t / e.columns), a = l === 0, c = l === n - 1, u = t === s.length - 1, g = l === n - 2, j = t + e.columns >= s.length;
160
+ return {
161
+ "!border-t-[0.09375rem]": a,
162
+ "!border-b-[0.09375rem]": c || j && g,
163
+ "!border-l-[0.09375rem]": t % e.columns === 0,
164
+ "!border-r-[0.09375rem]": t % e.columns === e.columns - 1 || u,
165
+ "!rounded-tl-md": a && t % e.columns === 0,
166
+ "!rounded-tr-md": a && (t % e.columns === e.columns - 1 || u),
167
+ "!rounded-bl-md": c && t % e.columns === 0,
168
+ "!rounded-br-md": u || g && s.length % e.columns !== 0 && t % e.columns === e.columns - 1
169
+ };
170
+ }, m = (t, s) => {
171
+ if (!e.statusClasses || !t || !e.statusClasses[t] || s)
172
+ return "";
173
+ const n = e.statusClasses[t];
174
+ return typeof n == "string" ? n : n.styles;
175
+ };
176
+ return {
177
+ // Refs
178
+ searchBy: f,
179
+ // Computed
180
+ filteredGridData: i,
181
+ getCellClassList: b,
182
+ gridColumnCount: A,
183
+ lastRowWillBeFilled: S,
184
+ noResultsText: R,
185
+ skeletonData: d,
186
+ // Methods
187
+ getCellClasses: C,
188
+ getStatusClass: m,
189
+ getStatusLabel: (t) => {
190
+ if (!e.statusClasses || !t || !e.statusClasses[t])
191
+ return t;
192
+ const s = e.statusClasses[t];
193
+ return typeof s == "string" ? t : s.label || t;
194
+ },
195
+ getTextUtilityClass: (t, s = !1) => {
196
+ if (s || !e.statusClasses || !t || !e.statusClasses[t])
197
+ return "";
198
+ const n = e.statusClasses[t], l = typeof n == "string" ? n : n.styles, a = /(hover:)?(!?text-[a-zA-Z0-9-]+)/g, c = [...l.matchAll(a)];
199
+ return c.length === 0 ? "" : c.map((u) => u[0]).join(" ");
200
+ },
201
+ selectGridItem: (t) => {
202
+ i.value.find((s) => {
203
+ s.active && (s.active = !1);
204
+ }), t.active = !0, o("select-grid-item", t);
205
+ },
206
+ // Composable
207
+ mq: y
208
+ };
209
+ }
210
+ });
211
+ export {
212
+ M as default
213
+ };
@@ -0,0 +1,78 @@
1
+ import { defineComponent as c, onMounted as l, computed as n } from "vue";
2
+ import s from "./index176.js";
3
+ let t = !1;
4
+ const i = "quore-svg-sprite-container";
5
+ function o() {
6
+ if (t || typeof document > "u")
7
+ return;
8
+ if (document.getElementById(i)) {
9
+ t = !0;
10
+ return;
11
+ }
12
+ const e = document.createElement("div");
13
+ e.id = i, e.setAttribute("aria-hidden", "true"), e.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;", e.innerHTML = s, document.body ? document.body.insertBefore(e, document.body.firstChild) : document.addEventListener("DOMContentLoaded", () => {
14
+ document.body.insertBefore(e, document.body.firstChild);
15
+ }), t = !0;
16
+ }
17
+ o();
18
+ const m = c({
19
+ name: "QIcon",
20
+ props: {
21
+ icon: {
22
+ type: String,
23
+ required: !0
24
+ },
25
+ type: {
26
+ type: String,
27
+ default: "outline"
28
+ },
29
+ width: {
30
+ type: Number,
31
+ default: 24,
32
+ required: !1
33
+ },
34
+ height: {
35
+ type: Number,
36
+ default: 24,
37
+ required: !1
38
+ },
39
+ size: {
40
+ type: String,
41
+ // sm, md, lg, xl
42
+ default: ""
43
+ },
44
+ color: {
45
+ type: String,
46
+ // primary, info, success, warning, danger etc...
47
+ default: "inkwell-20"
48
+ },
49
+ inline: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ customClass: {
54
+ type: String,
55
+ default: ""
56
+ },
57
+ customSize: {
58
+ type: Boolean,
59
+ default: !1
60
+ }
61
+ },
62
+ setup(e) {
63
+ l(() => {
64
+ o();
65
+ });
66
+ const d = n(() => {
67
+ const u = e.type === "outline" || e.type === "fill" ? "-" + e.type : "";
68
+ return `#icon-${e.icon}${u}`;
69
+ }), r = n(() => e.customSize && (!!e.width || !!e.height));
70
+ return {
71
+ iconPath: d,
72
+ customizedSize: r
73
+ };
74
+ }
75
+ });
76
+ export {
77
+ m as default
78
+ };
@@ -0,0 +1,136 @@
1
+ import { defineComponent as f, ref as l, computed as o, watch as p } from "vue";
2
+ import C from "./index8.js";
3
+ import b from "./index26.js";
4
+ import S from "./index47.js";
5
+ import v from "./index53.js";
6
+ import n from "./index52.js";
7
+ import { useI18n as A } from "vue-i18n";
8
+ const H = f({
9
+ name: "QIconActionGroup",
10
+ components: {
11
+ QButton: C,
12
+ QIcon: b,
13
+ QTooltip: S
14
+ },
15
+ props: {
16
+ // Pass in a value for the currentState
17
+ currentState: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ // Should the icon action group be disabled
22
+ disabled: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ // This is used in the bottom sheet
27
+ isActionItemBar: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ // For the colorkey showing the meaning of the states
32
+ isColorKey: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ // Boolean or string indicating the state
37
+ // if string it keeps track of which state is loading
38
+ loading: {
39
+ type: [Boolean, String],
40
+ default: !1
41
+ },
42
+ options: {
43
+ type: Array,
44
+ default: () => {
45
+ const { t: e } = A();
46
+ return [
47
+ {
48
+ state: "pass",
49
+ activeClass: "!bg-green-20",
50
+ classes: "hover:!bg-green-20",
51
+ icon: "check-thick",
52
+ mobileIcon: "check",
53
+ idleClass: "!bg-idle-pass",
54
+ loading: "",
55
+ name: e("HC_PASS"),
56
+ statusText: e("HC_PASSED")
57
+ },
58
+ {
59
+ state: "failed",
60
+ activeClass: "!bg-red-30",
61
+ classes: "hover:!bg-red-30 active:!border-red-30",
62
+ icon: "close-thick",
63
+ mobileIcon: "close",
64
+ idleClass: "md:!bg-red-0",
65
+ mobileIdleClass: "!bg-red-30/25",
66
+ loading: "",
67
+ name: e("HC_FAIL"),
68
+ statusText: e("HC_A_TASK_HAS_BEEN_CREATED")
69
+ },
70
+ {
71
+ state: "repaired",
72
+ activeClass: "!bg-orange-20",
73
+ classes: "hover:!bg-orange-20 active:!border-orange-20",
74
+ icon: "minus-thick",
75
+ mobileIcon: "minus",
76
+ idleClass: "!bg-orange-20/25",
77
+ loading: "",
78
+ name: e("HC_REPAIR"),
79
+ statusText: e("HC_TASK_CLOSED")
80
+ },
81
+ {
82
+ state: "N/A",
83
+ activeClass: "!bg-inkwell-0",
84
+ classes: "hover:!bg-inkwell-0 active:!border-inkwell-0",
85
+ icon: "na",
86
+ iconClass: "!p-0",
87
+ iconType: "fill",
88
+ idleClass: "!bg-gray-20",
89
+ loading: "",
90
+ name: e("HC_N/A"),
91
+ statusText: e("HC_N/A"),
92
+ mobileIconClass: "!p-[0.1rem]"
93
+ }
94
+ ];
95
+ }
96
+ },
97
+ showCompletedState: {
98
+ type: Boolean,
99
+ default: !1
100
+ },
101
+ // Show the status text for mobile ex passed, or task closed.
102
+ showStatusText: {
103
+ type: Boolean,
104
+ default: !1
105
+ }
106
+ },
107
+ emits: ["update:state"],
108
+ setup(e, { emit: i }) {
109
+ const { deviceType: r } = v(), t = l(e.currentState), c = l(e.options.length === 1), d = o(() => e.disabled || !!e.loading), u = o(() => e.options.find(
110
+ (a) => a.state === t.value
111
+ )), m = o(() => (r.value !== "desktop" || !n.md) && !e.showCompletedState), g = (a, s) => {
112
+ t.value = t.value === s ? "default" : s, i("update:state", { state: t.value, event: a });
113
+ };
114
+ return p(
115
+ () => e.loading,
116
+ () => {
117
+ e.loading === !1 && (t.value = e.currentState);
118
+ }
119
+ ), {
120
+ // Refs
121
+ selectedState: t,
122
+ singleOption: c,
123
+ // Computed
124
+ isDisabled: d,
125
+ selectedOption: u,
126
+ shouldUseSwipe: m,
127
+ // Methods
128
+ onSetState: g,
129
+ // Composable
130
+ mq: n
131
+ };
132
+ }
133
+ });
134
+ export {
135
+ H as default
136
+ };
@@ -0,0 +1,216 @@
1
+ import { defineComponent as $, ref as a, computed as s, onMounted as Z, onUnmounted as q } from "vue";
2
+ import { useSwipe as K } from "./index155.js";
3
+ import { useI18n as X } from "vue-i18n";
4
+ import J from "./index177.js";
5
+ import Y from "./index6.js";
6
+ import ee from "./index7.js";
7
+ import te from "./index31.js";
8
+ import ne from "./index36.js";
9
+ import ae from "./index47.js";
10
+ import H from "./index52.js";
11
+ import oe from "./index53.js";
12
+ const ge = $({
13
+ name: "ImageGallery",
14
+ components: {
15
+ Galleria: J,
16
+ QBadge: Y,
17
+ QBottomSheet: ee,
18
+ QMenu: te,
19
+ QPdfViewer: ne,
20
+ QTooltip: ae
21
+ },
22
+ props: {
23
+ // Pass in an ID unique to the image gallery.
24
+ id: {
25
+ type: String,
26
+ default: "image-gallery"
27
+ },
28
+ files: {
29
+ type: Array,
30
+ default: () => []
31
+ },
32
+ thumbnailsVisible: {
33
+ type: Number,
34
+ default: 4
35
+ },
36
+ showOnHover: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ showThumbnails: {
41
+ type: Boolean,
42
+ default: !0
43
+ },
44
+ // If the user can remove an image
45
+ showRemove: {
46
+ type: [Boolean, Number],
47
+ default: !1
48
+ },
49
+ baseZIndex: {
50
+ type: Number,
51
+ default: 1e3
52
+ },
53
+ wrap: {
54
+ type: Boolean,
55
+ default: !0
56
+ },
57
+ processing: {
58
+ type: Boolean,
59
+ default: !1
60
+ }
61
+ },
62
+ emits: ["update:model-value", "update:activeIndex", "click:file"],
63
+ setup(g, { emit: x }) {
64
+ const { t: b } = X(), { deviceType: p } = oe(), S = [{ text: b("HC_CANCEL") }], P = /* @__PURE__ */ new Set([
65
+ "doc",
66
+ "eps",
67
+ "mp3",
68
+ "mp4",
69
+ "mov",
70
+ "prt",
71
+ "pdf",
72
+ "ppt",
73
+ "tiff",
74
+ "txt",
75
+ "zip"
76
+ ]), Q = {
77
+ docx: "doc",
78
+ pptx: "ppt",
79
+ tif: "tiff",
80
+ xls: "xsl",
81
+ xlsx: "xsl"
82
+ }, I = a(null), r = s(() => I.value?.offsetWidth), k = a(null), N = a([]), l = a(!1), h = a(null), m = a("0"), v = a(1), O = a(H.md ? 1 : 0.9), t = a(0), C = a(null), R = a(), d = a(!1), F = a(!1), W = s(() => [
83
+ `z-[${g.baseZIndex + 1}]`
84
+ ]), w = s(() => g.files.map((e) => {
85
+ const n = e instanceof File, c = n ? e.name : e.original.url, o = B(
86
+ c.toLowerCase()
87
+ ).replace(/^\./, ""), f = o ? P.has(o) ? o : Q[o] || "txt" : "txt";
88
+ return n ? {
89
+ id: e.lastModified + "-" + e.name.replace(/[\s.]/g, ""),
90
+ originalFile: e,
91
+ name: e.name,
92
+ url: URL.createObjectURL(e),
93
+ type: e.type,
94
+ extension: o,
95
+ icon: f,
96
+ isImage: e.type.startsWith("image") && !e.type.includes("tif")
97
+ } : {
98
+ id: e.id,
99
+ originalFile: e,
100
+ name: e.original.name,
101
+ url: e.original.url,
102
+ type: e.mimetype,
103
+ extension: o,
104
+ icon: f,
105
+ isImage: e.mimetype.startsWith("image") && !e.mimetype.includes("tif")
106
+ };
107
+ })), u = s(() => w.value.filter((e) => e.type.startsWith("image") && !e.type.includes("tif"))), _ = s(() => [
108
+ "rounded-lg relative mx-auto object-cover grow-1 max-h-[74vh]",
109
+ { animated: !M }
110
+ ]), D = s(() => [
111
+ "flex items-center gap-2",
112
+ g.wrap ? "flex-wrap" : "flex-nowrap overflow-x-auto shrink-0",
113
+ { "flex-nowrap overflow-x-auto pt-2 -mt-2 pr-2": p.value !== "desktop" }
114
+ ]), j = s(() => [{
115
+ text: b("HC_DELETE_ATTACHMENT"),
116
+ classes: "!text-red-20",
117
+ event: A
118
+ }]), E = (e) => {
119
+ p.value === "desktop" ? window.open(e.url, "_blank") : window.open(e.url, "_self");
120
+ }, L = (e) => {
121
+ p.value === "desktop" ? E(e) : (C.value = e, F.value = !0);
122
+ }, z = (e) => {
123
+ e.event(), l.value = !1;
124
+ }, G = (e, n) => {
125
+ !l.value && n.isImage ? T(e, n) : !l.value && !n.isImage && L(n);
126
+ }, T = (e, n) => {
127
+ const c = (f) => f.url === n?.url, o = u.value.findIndex(c);
128
+ t.value = o !== -1 ? o : e, d.value = !0;
129
+ }, A = (e = null) => {
130
+ l.value = !1, x(
131
+ "update:model-value",
132
+ e?.originalFile || h.value?.originalFile
133
+ );
134
+ }, y = (e) => {
135
+ const { keyCode: n } = e;
136
+ if (d.value)
137
+ switch (n) {
138
+ // previous - navigate to previous image
139
+ case 37:
140
+ t.value = t.value ? t.value - 1 : u.value.length - 1, x("update:activeIndex", t.value);
141
+ break;
142
+ // next - navigate to next image
143
+ case 39:
144
+ t.value = t.value < u.value.length - 1 ? t.value + 1 : 0, x("update:activeIndex", t.value);
145
+ break;
146
+ // esc - close on escape
147
+ case 27:
148
+ d.value = !1;
149
+ break;
150
+ }
151
+ }, { isSwiping: M, lengthX: i } = K(k, {
152
+ passive: !1,
153
+ onSwipe() {
154
+ const e = Math.abs(i.value);
155
+ r.value && (v.value = 1.1 - e / r.value, m.value = i.value < 0 ? `${e / 4}px` : `-${e / 4}px`);
156
+ },
157
+ onSwipeEnd() {
158
+ const e = t.value <= 0, n = t.value >= u.value.length - 1, c = Math.abs(i.value);
159
+ r.value && c / r.value >= 0.5 ? (i.value < 0 ? t.value = e ? u.value.length - 1 : t.value - 1 : t.value = n ? 0 : t.value + 1, m.value = "0", v.value = 1) : (m.value = "0", v.value = 1);
160
+ }
161
+ }), B = (e) => e.substring(e.lastIndexOf(".")), U = (e, n) => {
162
+ e.preventDefault(), h.value = w.value[n], l.value = !0;
163
+ }, V = () => {
164
+ l.value = !1, h.value = null;
165
+ };
166
+ return Z(() => {
167
+ window.addEventListener("keyup", y);
168
+ }), q(() => {
169
+ window.removeEventListener("keyup", y);
170
+ }), {
171
+ menuActions: S,
172
+ linkActions: j,
173
+ deviceType: p,
174
+ // Ref elements
175
+ container: I,
176
+ containerWidth: r,
177
+ featuredPhoto: k,
178
+ longPressRef: N,
179
+ longPressedHook: l,
180
+ // Animation Refs
181
+ isSwiping: M,
182
+ lengthX: i,
183
+ left: m,
184
+ opacity: v,
185
+ scale: O,
186
+ // Refs
187
+ showCarousel: d,
188
+ showFileViewer: F,
189
+ active: t,
190
+ activeAttachment: C,
191
+ hoveredIndex: R,
192
+ // Computed
193
+ closeIconClasses: W,
194
+ itemClasses: _,
195
+ images: u,
196
+ normalizedFiles: w,
197
+ thumbnailContainerClasses: D,
198
+ // Methods
199
+ downloadDocument: E,
200
+ getExtension: B,
201
+ onAttachmentClick: L,
202
+ onClickMenuLink: z,
203
+ onClickThumbnail: G,
204
+ onOpenCarousel: T,
205
+ onRemoveFile: A,
206
+ onKeyboardNavigation: y,
207
+ onLongPressCallbackHook: U,
208
+ resetHook: V,
209
+ // Composable
210
+ mq: H
211
+ };
212
+ }
213
+ });
214
+ export {
215
+ ge as default
216
+ };