@usssa/component-library 1.0.0-alpha.2 → 1.0.0-alpha.200

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 (139) hide show
  1. package/README.md +8 -5
  2. package/package.json +24 -8
  3. package/src/assets/logo.svg +19 -0
  4. package/src/assets/no-result.svg +25 -0
  5. package/src/assets/quasar-logo-vertical.svg +15 -0
  6. package/src/assets/upload-illustration.svg +48 -0
  7. package/src/components/ComponentLink.vue +26 -0
  8. package/src/components/core/UAvatar.vue +210 -0
  9. package/src/components/core/UAvatarGroup.vue +129 -0
  10. package/src/components/core/UBadgeStd.vue +96 -0
  11. package/src/components/core/UBannerStd.vue +184 -0
  12. package/src/components/core/UBreadCrumbs.vue +171 -0
  13. package/src/components/core/UBtnIcon.vue +160 -0
  14. package/src/components/core/UBtnStd.vue +134 -0
  15. package/src/components/core/UBtnToggle.vue +73 -0
  16. package/src/components/core/UCheckboxStd.vue +101 -0
  17. package/src/components/core/UChip.vue +274 -0
  18. package/src/components/core/UDate.vue +581 -0
  19. package/src/components/core/UDialogStd.vue +614 -0
  20. package/src/components/core/UDrawer/UDrawer.vue +471 -0
  21. package/src/components/core/UDrawer/UDrawerMenuItem.vue +124 -0
  22. package/src/components/core/UExpansionStd.vue +266 -0
  23. package/src/components/core/UInnerLoader.vue +69 -0
  24. package/src/components/core/UInputAddressLookup.vue +484 -0
  25. package/src/components/core/UInputPhoneStd.vue +303 -0
  26. package/src/components/core/UInputTextStd.vue +308 -0
  27. package/src/components/core/UInputTypeahead.vue +44 -0
  28. package/src/components/core/UInputTypeaheadAdvanceSearch.vue +134 -0
  29. package/src/components/core/UMenuButtonStd.vue +280 -0
  30. package/src/components/core/UMenuDropdown.vue +80 -0
  31. package/src/components/core/UMenuDropdownAdvancedSearch.vue +306 -0
  32. package/src/components/core/UMenuItem.vue +183 -0
  33. package/src/components/core/UMenuSearch.vue +73 -0
  34. package/src/components/core/UModal.vue +660 -0
  35. package/src/components/core/UMultiSelectStd.vue +699 -0
  36. package/src/components/core/UPagination.vue +156 -0
  37. package/src/components/core/URadioBtn.vue +139 -0
  38. package/src/components/core/URadioStd.vue +71 -0
  39. package/src/components/core/USelectStd.vue +564 -0
  40. package/src/components/core/USheet.vue +349 -0
  41. package/src/components/core/UStepper/UProgress.vue +157 -0
  42. package/src/components/core/UStepper/UStepper.vue +211 -0
  43. package/src/components/core/UTabBtnStd.vue +181 -0
  44. package/src/components/core/UTable/UTable.vue +1984 -0
  45. package/src/components/core/UTable/UTd.vue +63 -0
  46. package/src/components/core/UTable/UTh.vue +48 -0
  47. package/src/components/core/UTable/UTr.vue +20 -0
  48. package/src/components/core/UTableStd.vue +1449 -0
  49. package/src/components/core/UTabsStd.vue +140 -0
  50. package/src/components/core/UToggleStd.vue +164 -0
  51. package/src/components/core/UToolbar/UCustomMenuIcon.vue +58 -0
  52. package/src/components/core/UToolbar/UToolbar.vue +226 -0
  53. package/src/components/core/UTooltip.vue +78 -0
  54. package/src/components/core/UTypeahead.vue +890 -0
  55. package/src/components/core/UUploader.vue +644 -0
  56. package/src/components/index.js +91 -0
  57. package/src/composables/useNotify.js +79 -0
  58. package/src/composables/useOverlayLoader.js +23 -0
  59. package/src/composables/useScreenType.js +30 -0
  60. package/src/css/app.sass +168 -0
  61. package/src/css/colors.sass +103 -0
  62. package/src/css/media.sass +1 -0
  63. package/src/css/quasar.variables.sass +150 -0
  64. package/src/css/typography.sass +0 -0
  65. package/src/css/vars/colors.variables.sass +113 -0
  66. package/src/utils/data.ts +170 -0
  67. package/dist/spa/assets/Avatar.45667392.js +0 -9
  68. package/dist/spa/assets/AvatarGroup.99557443.js +0 -9
  69. package/dist/spa/assets/AvatarGroup.bb4cd03a.css +0 -1
  70. package/dist/spa/assets/BadgeStd.ee4129c5.js +0 -6
  71. package/dist/spa/assets/BannerPage.6c6a98c4.js +0 -10
  72. package/dist/spa/assets/BannerPage.d195fcac.css +0 -1
  73. package/dist/spa/assets/BtnIcon.89e50d2e.css +0 -1
  74. package/dist/spa/assets/BtnIcon.934f8c5b.js +0 -10
  75. package/dist/spa/assets/BtnStd.95fc4510.js +0 -11
  76. package/dist/spa/assets/CheckBox.3c204a4b.css +0 -1
  77. package/dist/spa/assets/CheckBox.fbc0bd1a.js +0 -7
  78. package/dist/spa/assets/Chip.49ffc857.js +0 -11
  79. package/dist/spa/assets/Chip.74acaa33.css +0 -1
  80. package/dist/spa/assets/ComponentBase.1ae19b7e.js +0 -1
  81. package/dist/spa/assets/ErrorNotFound.6cccfaee.js +0 -1
  82. package/dist/spa/assets/IndexPage.17d09b76.js +0 -1
  83. package/dist/spa/assets/InputText.19c0d7d1.css +0 -1
  84. package/dist/spa/assets/InputText.3fcd97a4.js +0 -20
  85. package/dist/spa/assets/KFOkCnqEu92Fr1MmgVxIIzQ.34e9582c.woff +0 -0
  86. package/dist/spa/assets/KFOlCnqEu92Fr1MmEU9fBBc-.9ce7f3ac.woff +0 -0
  87. package/dist/spa/assets/KFOlCnqEu92Fr1MmSU5fBBc-.bf14c7d7.woff +0 -0
  88. package/dist/spa/assets/KFOlCnqEu92Fr1MmWUlfBBc-.e0fd57c0.woff +0 -0
  89. package/dist/spa/assets/KFOlCnqEu92Fr1MmYUtfBBc-.f6537e32.woff +0 -0
  90. package/dist/spa/assets/KFOmCnqEu92Fr1Mu4mxM.f2abf7fb.woff +0 -0
  91. package/dist/spa/assets/MainLayout.912bb0f8.js +0 -1
  92. package/dist/spa/assets/MultiSelectStd.644b108c.js +0 -17
  93. package/dist/spa/assets/MultiSelectStd.c7af49eb.css +0 -1
  94. package/dist/spa/assets/QAvatar.5940a79e.js +0 -1
  95. package/dist/spa/assets/QCheckbox.48b43f7d.js +0 -1
  96. package/dist/spa/assets/QPage.ca395ec4.js +0 -1
  97. package/dist/spa/assets/QRadio.0a7f5e2c.js +0 -1
  98. package/dist/spa/assets/QResizeObserver.30c3566c.js +0 -1
  99. package/dist/spa/assets/QSelect.a40eb786.js +0 -1
  100. package/dist/spa/assets/QTabs.72f2507e.js +0 -1
  101. package/dist/spa/assets/QToggle.376c48be.js +0 -1
  102. package/dist/spa/assets/QTooltip.5aa8e325.js +0 -1
  103. package/dist/spa/assets/Radio.0ac35288.js +0 -7
  104. package/dist/spa/assets/Radio.aca54a89.css +0 -1
  105. package/dist/spa/assets/SelectStd.5c6891db.css +0 -1
  106. package/dist/spa/assets/SelectStd.daf1def9.js +0 -16
  107. package/dist/spa/assets/TabButtonPage.20e871dd.js +0 -7
  108. package/dist/spa/assets/TabButtonPage.36ce9f9c.css +0 -1
  109. package/dist/spa/assets/TabsPage.9b94ff39.css +0 -1
  110. package/dist/spa/assets/TabsPage.b92cccee.js +0 -9
  111. package/dist/spa/assets/TogglePage.8129b631.css +0 -1
  112. package/dist/spa/assets/TogglePage.ba6e325c.js +0 -9
  113. package/dist/spa/assets/UAvatar.dda7e478.js +0 -1
  114. package/dist/spa/assets/UAvatar.ea8daa38.css +0 -1
  115. package/dist/spa/assets/UBadgeStd.3965db9a.css +0 -1
  116. package/dist/spa/assets/UBadgeStd.e165ee05.js +0 -1
  117. package/dist/spa/assets/UBtnStd.979ec4e8.js +0 -1
  118. package/dist/spa/assets/UBtnStd.bdd4f5e5.css +0 -1
  119. package/dist/spa/assets/UTooltip.d2e04d0c.js +0 -1
  120. package/dist/spa/assets/UTooltip.efa029a7.css +0 -1
  121. package/dist/spa/assets/dom.e9d4ad51.js +0 -1
  122. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.fd84f88b.woff +0 -0
  123. package/dist/spa/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.4a4dbc62.woff2 +0 -0
  124. package/dist/spa/assets/format.41663636.js +0 -1
  125. package/dist/spa/assets/index.43c62a18.js +0 -21
  126. package/dist/spa/assets/index.4fbd73cf.css +0 -5
  127. package/dist/spa/assets/option-sizes.10cc02d3.js +0 -1
  128. package/dist/spa/assets/render.e67ff27a.js +0 -1
  129. package/dist/spa/assets/tooltip.7c0d0774.js +0 -8
  130. package/dist/spa/assets/touch.9135741d.js +0 -1
  131. package/dist/spa/assets/use-checkbox.44a623c0.js +0 -1
  132. package/dist/spa/favicon.ico +0 -0
  133. package/dist/spa/icons/caret-down.svg +0 -5
  134. package/dist/spa/icons/circle-xmark.svg +0 -6
  135. package/dist/spa/icons/favicon-128x128.png +0 -0
  136. package/dist/spa/icons/favicon-16x16.png +0 -0
  137. package/dist/spa/icons/favicon-32x32.png +0 -0
  138. package/dist/spa/icons/favicon-96x96.png +0 -0
  139. package/dist/spa/index.html +0 -3
@@ -0,0 +1,1984 @@
1
+ <script setup>
2
+ import { useQuasar } from 'quasar'
3
+ import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
4
+ import { useScreenType } from '../../../composables/useScreenType'
5
+ import UAvatar from '../UAvatar.vue'
6
+ import UBtnStd from '../UBtnStd.vue'
7
+ import UChip from '../UChip.vue'
8
+ import UExpansionStd from '../UExpansionStd.vue'
9
+ import UInnerLoader from '../UInnerLoader.vue'
10
+ import USheet from '../USheet.vue'
11
+ import UTooltip from '../UTooltip.vue'
12
+
13
+ const emit = defineEmits(['onLoadMore'])
14
+
15
+ const columns = defineModel('columns', {
16
+ default: () => [],
17
+ type: Array,
18
+ })
19
+ const filteredRows = defineModel('filteredRows', {
20
+ default: () => [],
21
+ type: Array,
22
+ })
23
+ const loading = defineModel('loading', {
24
+ default: null,
25
+ type: Boolean,
26
+ })
27
+ const moreActionDialogData = defineModel('moreActionDialogData', {
28
+ type: Object,
29
+ default: null,
30
+ })
31
+ const pagination = defineModel('pagination', {
32
+ default: { page: 1, rowsPerPage: 15 },
33
+ type: Object,
34
+ })
35
+ const rows = defineModel('rows', {
36
+ default: () => [],
37
+ type: Array,
38
+ })
39
+ const props = defineProps({
40
+ bordered: {
41
+ type: Boolean,
42
+ default: false,
43
+ },
44
+ closeIconLabel: {
45
+ type: String,
46
+ default: 'Close Icon',
47
+ },
48
+ enableIconToggle: {
49
+ type: Boolean,
50
+ default: false,
51
+ },
52
+ expansion: {
53
+ type: Boolean,
54
+ default: false,
55
+ },
56
+ filter: {
57
+ type: String,
58
+ default: '',
59
+ },
60
+ flat: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ grid: {
65
+ type: Boolean,
66
+ default: false,
67
+ },
68
+ infiniteScroll: {
69
+ type: Boolean,
70
+ default: false,
71
+ },
72
+ infiniteScrollProperty: {
73
+ type: Object,
74
+ default: () => {
75
+ return {
76
+ color: 'primary',
77
+ height: '55rem',
78
+ image: '',
79
+ loading: false,
80
+ noMoreData: false,
81
+ noMoreDataText: 'No more data',
82
+ padding: true,
83
+ size: '1rem',
84
+ type: 'default',
85
+ }
86
+ },
87
+ },
88
+ rowCardHeight: {
89
+ type: Number,
90
+ default: 25,
91
+ },
92
+ rowKey: {
93
+ type: String,
94
+ default: 'name',
95
+ },
96
+ selectMoreOptions: {
97
+ type: String,
98
+ default: 'Select More Options',
99
+ },
100
+ separator: {
101
+ type: String,
102
+ default: 'horizontal',
103
+ },
104
+ showPagination: {
105
+ type: Boolean,
106
+ default: true,
107
+ },
108
+ stickyHeader: {
109
+ type: Boolean,
110
+ default: false,
111
+ },
112
+ title: {
113
+ type: String,
114
+ default: '',
115
+ },
116
+ viewMoreLabel: {
117
+ type: String,
118
+ default: 'View More',
119
+ },
120
+ virtualScroll: {
121
+ type: Boolean,
122
+ default: false,
123
+ },
124
+ })
125
+
126
+ const $q = useQuasar()
127
+ const $screen = useScreenType()
128
+
129
+ const infiniteScrollProp = ref(props.infiniteScrollProperty)
130
+ const isScrollActionActive = ref(false)
131
+ const mobileActionsDialog = ref({})
132
+ const moreActionsDialogs = ref({})
133
+ const infiniteNoMoreShow = ref(false)
134
+ const tableContainer = ref(null)
135
+ const tableDataChip = ref(true) // this is required to show chip
136
+ const tailClass = ref(null)
137
+
138
+ const isDesktop = computed(() => $screen.value.isDesktop)
139
+ const isMobile = computed(() => $screen.value.isMobile)
140
+ const isResponsiveTablet = computed(
141
+ () => $q.screen.width > 600 && $q.screen.width < 768
142
+ )
143
+ const isTablet = computed(() => $screen.value.isTablet)
144
+
145
+ const attachScroll = () => {
146
+ if (props.infiniteScroll && tableContainer.value) {
147
+ tableContainer.value.addEventListener('scroll', handleScroll)
148
+ }
149
+ }
150
+
151
+ // chekcing the menu position after show
152
+ const checkMenuPosition = (id) => {
153
+ const menuElement = document.getElementById(`actionPopupRef-${id}`) // Access the menu by ID
154
+ const buttonElement = document.getElementById(`actionPopupRefBtn-${id}`) // Access the button element
155
+
156
+ if (menuElement && buttonElement) {
157
+ const menuRect = menuElement.getBoundingClientRect() // Menu position
158
+ const buttonRect = buttonElement.getBoundingClientRect() // Button position
159
+
160
+ // Determine if the menu opens above or below
161
+ if (menuRect.top < buttonRect.top) {
162
+ tailClass.value = 'tail-bottom mobile-tail-bottom' // Menu opens below, tail at the bottom
163
+ } else {
164
+ tailClass.value = 'tail-top mobile-tail-top' // Menu opens above, tail at the top
165
+ }
166
+ }
167
+ }
168
+
169
+ const detachScroll = () => {
170
+ if (tableContainer.value) {
171
+ tableContainer.value.removeEventListener('scroll', handleScroll)
172
+ }
173
+ }
174
+
175
+ const filterMethod = (rows, terms, cols, getCellValue) => {
176
+ let updatedRows = []
177
+ rows.forEach((row) => {
178
+ cols.forEach((col) => {
179
+ if (
180
+ col.type === 'text' &&
181
+ row[col.id].toLowerCase().includes(terms.toLowerCase()) &&
182
+ !updatedRows.includes(row)
183
+ ) {
184
+ updatedRows.push(row)
185
+ }
186
+ })
187
+ })
188
+ filteredRows.value = updatedRows
189
+
190
+ return updatedRows
191
+ }
192
+
193
+ const getActionItemColor = (action, row) => {
194
+ if (action.destructive) {
195
+ return 'accent'
196
+ } else {
197
+ return typeof action.color === 'function'
198
+ ? action.color(row)
199
+ : action.color
200
+ ? action.color
201
+ : 'primary'
202
+ }
203
+ }
204
+
205
+ //getting the chip color accroding to value of chip from row
206
+ const getChipColor = (data, value) => {
207
+ const foundObject = data.find((chip) => chip.value === value)
208
+ if (foundObject) {
209
+ return foundObject['color']
210
+ } else {
211
+ return 'neutral-3'
212
+ }
213
+ }
214
+
215
+ // Helper to get the caption for the expansion item (from captionKey if present)
216
+ function getExpansionCaption(row, cols) {
217
+ const col = cols.find(
218
+ (c) => c.captionKey && (typeof c.show === 'undefined' || c.show)
219
+ )
220
+ if (col && row[col.captionKey]) {
221
+ return col.captionKeyTitle
222
+ ? `${col.captionKeyTitle}: ${row[col.captionKey]}`
223
+ : row[col.captionKey]
224
+ }
225
+ return ''
226
+ }
227
+
228
+ // Helper to get the label for the expansion item
229
+ function getExpansionLabel(row, cols) {
230
+ const col = cols.find(
231
+ (c) => (typeof c.show === 'undefined' || c.show) && c.field !== 'action'
232
+ )
233
+ return col ? row[col.field] : row[props.rowKey] || 'Details'
234
+ }
235
+
236
+ const handleItemClick = (action, row) => {
237
+ moreActionsDialogs.value[row.id][0].open = false
238
+ setTimeout(() => {
239
+ moreActionsDialogs.value[row.id].splice(0, 1)
240
+ }, 200)
241
+ return action.handler(row)
242
+ }
243
+
244
+ const handleOpenMobileMoreActions = (id) => {
245
+ const dialogObjMap = {
246
+ [id]: [
247
+ {
248
+ open: true,
249
+ height: 270,
250
+ persistent: true,
251
+ transitionDuration: 500, // ms
252
+ position: 'bottom',
253
+ },
254
+ ],
255
+ }
256
+ moreActionsDialogs.value = dialogObjMap
257
+ }
258
+
259
+ const handleScroll = async () => {
260
+ if (
261
+ !props.infiniteScroll ||
262
+ infiniteScrollProp.value.loading ||
263
+ infiniteScrollProp.value.noMoreData
264
+ )
265
+ return
266
+ const el = tableContainer.value
267
+
268
+ if (!el) return
269
+
270
+ // Only trigger if content is scrollable
271
+ if (el.scrollHeight <= el.clientHeight) return
272
+
273
+ // Only trigger if user is scrolling down
274
+ if (el.scrollTop < infiniteScrollProp.value?.lastScrollTop) {
275
+ infiniteScrollProp.value['lastScrollTop'] = el.scrollTop
276
+ return
277
+ }
278
+ infiniteScrollProp.value.lastScrollTop = el.scrollTop
279
+
280
+ // Calculate distance from bottom
281
+ const distanceFromBottom = el.scrollHeight - (el.scrollTop + el.clientHeight)
282
+
283
+ // Only trigger when at (or very near) the bottom
284
+ if (distanceFromBottom <= 10) {
285
+ const lastRow = rows.value[rows.value.length - 1]
286
+ if (lastRow) {
287
+ emit('onLoadMore', lastRow)
288
+ }
289
+ }
290
+ }
291
+
292
+ // checking for tooltip is content is visible
293
+ const isContentVisible = (field, id, type) => {
294
+ return document.getElementById(`long-${type}-${field}-${id}`)
295
+ }
296
+
297
+ onMounted(() => {
298
+ infiniteNoMoreShow.value = false
299
+ nextTick(() => {
300
+ if (!infiniteScrollProp.value.noMoreData) {
301
+ attachScroll()
302
+ }
303
+ })
304
+ })
305
+
306
+ onBeforeUnmount(() => {
307
+ detachScroll()
308
+ })
309
+
310
+ // Watch for changes in infiniteScroll or tableContainer
311
+ watch(
312
+ () => [props.infiniteScroll, tableContainer.value],
313
+ async ([enabled, el], [oldEnabled, oldEl]) => {
314
+ if (oldEl) oldEl.removeEventListener('scroll', handleScroll)
315
+ await nextTick()
316
+ if (enabled && tableContainer.value) {
317
+ tableContainer.value.addEventListener('scroll', handleScroll)
318
+ }
319
+ }
320
+ )
321
+
322
+ // detach the scrollbar action(onLoadMore) when noMoreData occur
323
+ watch(
324
+ () => infiniteScrollProp.value,
325
+ (newValue) => {
326
+ // Reset state when conditions change
327
+ if (!newValue) {
328
+ isScrollActionActive.value = false
329
+ return
330
+ }
331
+
332
+ // Handle active states
333
+ if (newValue.loading || newValue.noMoreData) {
334
+ isScrollActionActive.value = true
335
+
336
+ if (newValue.noMoreData) {
337
+ infiniteNoMoreShow.value = true
338
+ setTimeout(() => {
339
+ infiniteNoMoreShow.value = false
340
+ detachScroll()
341
+
342
+ // Reset scroll active state after timeout
343
+ if (!infiniteScrollProp.value?.loading) {
344
+ isScrollActionActive.value = false
345
+ }
346
+ }, 5000)
347
+ }
348
+ }
349
+ // Reset when neither loading nor noMoreData
350
+ else {
351
+ isScrollActionActive.value = false
352
+ }
353
+ },
354
+ { immediate: true, deep: true }
355
+ )
356
+
357
+ watch(
358
+ moreActionDialogData,
359
+ (newData) => {
360
+ if (newData && newData.showDialog) {
361
+ const dialogObjMap = {
362
+ [newData.row.id]: [
363
+ {
364
+ open: true,
365
+ height: 270,
366
+ persistent: true,
367
+ transitionDuration: 500, // ms
368
+ position: 'bottom',
369
+ },
370
+ ],
371
+ }
372
+ mobileActionsDialog.value = dialogObjMap
373
+ } else {
374
+ mobileActionsDialog.value = []
375
+ }
376
+ },
377
+ { immediate: true }
378
+ )
379
+ </script>
380
+
381
+ <template>
382
+ <component
383
+ v-bind="
384
+ infiniteScroll
385
+ ? {
386
+ style: `overflow-y: auto; height: ${infiniteScrollProperty.height};`,
387
+ }
388
+ : {}
389
+ "
390
+ :class="[
391
+ infiniteScroll && 'u-table-infinite-scroll-container ',
392
+ grid && infiniteScroll && infiniteScrollProperty.padding ? 'q-pa-ba' : '',
393
+ ]"
394
+ :is="infiniteScroll ? 'div' : 'fragment'"
395
+ ref="tableContainer"
396
+ >
397
+ <q-table
398
+ v-bind="$attrs"
399
+ v-model:pagination="pagination"
400
+ :class="`u-table${virtualScroll ? ' u-virtualscroll-table' : ''}${
401
+ grid ? ' u-virtualscroll-grid-table' : ''
402
+ }${stickyHeader ? ' u-sticky-table-header' : ''}${
403
+ showPagination && pagination.rowsPerPage < 50
404
+ ? ' force-auto-height-table'
405
+ : ''
406
+ }${
407
+ !isDesktop ? (isMobile ? ' grid-card-mobile' : ' grid-card-tablet') : ''
408
+ }`"
409
+ :bordered="bordered"
410
+ :columns="columns"
411
+ :filter="filter"
412
+ :filter-method="filterMethod"
413
+ :flat="flat"
414
+ :grid="grid"
415
+ hide-pagination
416
+ :loading="loading"
417
+ :row-key="rowKey"
418
+ :rows="rows"
419
+ :rows-per-page-options="[0]"
420
+ :separator="separator"
421
+ :title="title"
422
+ :virtual-scroll="!grid && virtualScroll"
423
+ :virtual-scroll-item-size="48"
424
+ :virtual-scroll-sticky-size-start="48"
425
+ >
426
+ <template
427
+ v-for="(_, slotName, index) in $slots"
428
+ v-slot:[slotName]="scope"
429
+ :key="index"
430
+ >
431
+ <slot v-bind="{ ...scope }" :name="slotName" />
432
+ </template>
433
+ <template v-slot:item="props">
434
+ <div
435
+ v-if="expansion == false"
436
+ class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
437
+ :style="props.selected ? 'transform: scale(0.95);' : ''"
438
+ >
439
+ <q-card bordered flat>
440
+ <q-list
441
+ dense
442
+ :style="{
443
+ 'min-height': `${rowCardHeight}rem`,
444
+ overflowX: 'hidden',
445
+ }"
446
+ >
447
+ <template v-for="(col, __k) in props.cols" :key="__k">
448
+ <q-item
449
+ v-if="
450
+ typeof col.show === 'undefined' ||
451
+ col.show ||
452
+ col.field === 'action'
453
+ "
454
+ :class="col.doubleSpan ? 'mobile-centered-col' : ''"
455
+ >
456
+ <q-item-section
457
+ v-if="
458
+ typeof col.show === 'undefined' ||
459
+ col.show ||
460
+ col.field === 'action'
461
+ "
462
+ >
463
+ <q-item-label> {{ col.label }}</q-item-label>
464
+ </q-item-section>
465
+ <q-item-section
466
+ v-if="
467
+ typeof col.show === 'undefined' ||
468
+ col.show ||
469
+ col.field === 'action'
470
+ "
471
+ side
472
+ >
473
+ <template
474
+ v-if="col.type === 'icon' && props.row[col.field]"
475
+ >
476
+ <q-icon
477
+ :class="props.row[col.field]"
478
+ :alt="props.row.ariaLabel"
479
+ :aria-label="props.row.ariaLabel"
480
+ :color="props?.row?.iconColor ?? 'primary'"
481
+ size="1.5rem"
482
+ />
483
+ </template>
484
+ <template
485
+ v-if="col.chipValues && col.chipValues.length > 0"
486
+ >
487
+ <UChip
488
+ v-model="tableDataChip"
489
+ class="u-table-chip"
490
+ :anchor="col.anchor"
491
+ avatarLabel=""
492
+ :chipLabel="props.row[col.field].toString()"
493
+ :dense="isMobile || isTablet ? true : col.denseChip"
494
+ :is-show-tooltip="col.showChipTooltip"
495
+ :offset="col.offset"
496
+ :removable="false"
497
+ :type="
498
+ getChipColor(col.chipValues, props.row[col.field])
499
+ "
500
+ />
501
+ </template>
502
+
503
+ <template v-else>
504
+ <div class="flex justify-center items-center no-wrap">
505
+ <div
506
+ class="flex justify-center items-center no-wrap"
507
+ v-if="col.avatarKey"
508
+ >
509
+ <UChip
510
+ v-if="
511
+ !isDesktop &&
512
+ col.showAlignedChip &&
513
+ typeof col.showAlignedChip === 'function' &&
514
+ col.showAlignedChip(props.row)
515
+ "
516
+ v-model="tableDataChip"
517
+ :class="[
518
+ expansion ? 'q-ma-none' : 'q-mr-xs',
519
+ col.showAlignedChip(props.row).class,
520
+ ]"
521
+ :avatarLabel="
522
+ col.showAlignedChip(props.row).avatarLabel
523
+ "
524
+ :chipLabel="
525
+ col.showAlignedChip(props.row).chipLabel
526
+ "
527
+ :dense="col.showAlignedChip(props.row).dense"
528
+ :removable="
529
+ col.showAlignedChip(props.row).removable
530
+ "
531
+ :type="col.showAlignedChip(props.row).type"
532
+ />
533
+ <div
534
+ v-if="
535
+ props.row[col.avatarKey] &&
536
+ typeof props.row[col.avatarKey] === 'object'
537
+ "
538
+ class="table-data-avatar"
539
+ >
540
+ <UAvatar
541
+ v-if="
542
+ props.row[col.avatarKey]?.type === 'initials'
543
+ "
544
+ :indicatorColor="
545
+ typeof col.indicatorColor === 'function' &&
546
+ col.indicatorColor(props.row)
547
+ ? col.indicatorColor(props.row)
548
+ : ''
549
+ "
550
+ :indicatorIcon="
551
+ typeof col.indicatorIcon === 'function' &&
552
+ col.indicatorIcon(props.row)
553
+ ? col.indicatorIcon(props.row)
554
+ : ''
555
+ "
556
+ :name="`${props.row[col.avatarKey]?.value}`"
557
+ :showIndicator="col.showIndicator"
558
+ size="lg"
559
+ />
560
+ <UAvatar
561
+ v-else-if="
562
+ props.row[col.avatarKey]?.type === 'image'
563
+ "
564
+ :image="`${props.row[col.avatarKey]?.value}`"
565
+ :indicatorColor="
566
+ typeof col.indicatorColor === 'function' &&
567
+ col.indicatorColor(props.row)
568
+ ? col.indicatorColor(props.row)
569
+ : ''
570
+ "
571
+ :indicatorIcon="
572
+ typeof col.indicatorIcon === 'function' &&
573
+ col.indicatorIcon(props.row)
574
+ ? col.indicatorIcon(props.row)
575
+ : ''
576
+ "
577
+ :name="
578
+ props.row[col.avatarKey]?.name ??
579
+ props.row[col.avatarKey]?.value
580
+ "
581
+ :showIndicator="col.showIndicator"
582
+ size="lg"
583
+ />
584
+ </div>
585
+ <div v-else class="table-data-avatar">
586
+ <UAvatar
587
+ :image="`${props.row[col.avatarKey]}`"
588
+ :indicatorColor="
589
+ typeof col.indicatorColor === 'function' &&
590
+ col.indicatorColor(props.row)
591
+ ? col.indicatorColor(props.row)
592
+ : ''
593
+ "
594
+ :indicatorIcon="
595
+ typeof col.indicatorIcon === 'function' &&
596
+ col.indicatorIcon(props.row)
597
+ ? col.indicatorIcon(props.row)
598
+ : ''
599
+ "
600
+ :name="`${props.row[col.avatarKey]}`"
601
+ :showIndicator="col.showIndicator"
602
+ size="lg"
603
+ />
604
+ </div>
605
+ </div>
606
+
607
+ <q-item-label v-if="col.type !== 'icon'" caption>
608
+ <span
609
+ :class="[
610
+ col.value ? 'long-text-content' : '',
611
+ col.noEllipsis ? 'no-ellipsis-content' : '',
612
+ col.doubleSpan && col.noEllipsis
613
+ ? 'full-width-text-content'
614
+ : '',
615
+ !isResponsiveTablet &&
616
+ isTablet &&
617
+ col.classes &&
618
+ col.classes.length > 0 &&
619
+ col.classes[0] === 'no-wrap-text'
620
+ ? 'tablet-event-text'
621
+ : '',
622
+ typeof col.combineColoumn === 'function' &&
623
+ col.combineColoumn(props.row)
624
+ ? 'combine-col-small-device-wrapper'
625
+ : '',
626
+ ]"
627
+ :id="`long-content-${col.field}-${props.row.id}`"
628
+ >
629
+ {{ col.value }}
630
+ <template
631
+ v-if="
632
+ typeof col.combineColoumn === 'function' &&
633
+ col.combineColoumn(props.row)
634
+ "
635
+ >
636
+ <template
637
+ v-for="(
638
+ combineCol, colKey
639
+ ) in col.combineColoumn(props.row)"
640
+ :key="colKey"
641
+ >
642
+ <q-icon
643
+ v-if="combineCol.icon"
644
+ :class="combineCol.icon"
645
+ :alt="combineCol.ariaLabel"
646
+ :aria-label="combineCol.ariaLabel"
647
+ :color="combineCol?.iconColor ?? 'primary'"
648
+ :key="colKey"
649
+ size="1rem"
650
+ />
651
+ <div v-else>
652
+ {{ props.row[combineCol.key] }}
653
+ </div>
654
+ </template>
655
+ </template>
656
+ </span>
657
+ <UTooltip
658
+ v-if="
659
+ col.value &&
660
+ col.value.length > 12 &&
661
+ isContentVisible(
662
+ col.field,
663
+ props.row.id,
664
+ 'content'
665
+ )
666
+ "
667
+ anchor="bottom middle"
668
+ :description="col.value"
669
+ :offset="[10, 40]"
670
+ self="bottom middle"
671
+ :target="`#long-content-${col.field}-${props.row.id}`"
672
+ />
673
+ <div
674
+ v-if="col.captionKey"
675
+ class="td-caption mobile-primary-caption text-body-sm"
676
+ :id="`long-caption-${col.field}-${props.row.id}`"
677
+ >
678
+ <template v-if="col.captionKeyTitle">
679
+ {{ col.captionKeyTitle }}:
680
+ </template>
681
+ {{ props.row[col.captionKey] }}
682
+ </div>
683
+ <UTooltip
684
+ v-if="
685
+ props.row[col.captionKey] &&
686
+ props.row[col.captionKey].length > 12 &&
687
+ isContentVisible(
688
+ col.field,
689
+ props.row.id,
690
+ 'caption'
691
+ )
692
+ "
693
+ anchor="bottom middle"
694
+ :description="props.row[col.captionKey]"
695
+ :offset="[10, 40]"
696
+ self="bottom middle"
697
+ :target="`#long-caption-${col.field}-${props.row.id}`"
698
+ />
699
+ </q-item-label>
700
+ </div>
701
+ </template>
702
+ <template v-if="col.actions && col.actions.length === 1">
703
+ <template v-for="(action, key) in col.actions" :key="key">
704
+ <UBtnStd
705
+ v-if="
706
+ typeof action.hide === 'function'
707
+ ? !action.hide(props.row)
708
+ : true
709
+ "
710
+ :color="
711
+ typeof action.color === 'function'
712
+ ? action.color(props.row)
713
+ : action.color
714
+ "
715
+ :disable="
716
+ typeof action.disable === 'function' &&
717
+ action.disable(props.row)
718
+ "
719
+ :flat="
720
+ typeof action.flat === 'function'
721
+ ? action.flat(props.row)
722
+ : action.flat
723
+ "
724
+ full-width
725
+ :key="key"
726
+ :label="
727
+ typeof action.label === 'function'
728
+ ? action.label(props.row)
729
+ : action.label
730
+ "
731
+ :leftIcon="
732
+ typeof action.icon === 'function'
733
+ ? action.icon(props.row)
734
+ : action.icon
735
+ "
736
+ :loading="
737
+ typeof action.loading === 'function'
738
+ ? action.loading(props.row)
739
+ : action.loading
740
+ "
741
+ :outline="
742
+ typeof action.outline === 'function'
743
+ ? action.outline(props.row)
744
+ : action.outline
745
+ "
746
+ :size="action.size"
747
+ @on-click="action.handler(props.row)"
748
+ >
749
+ <template #tooltip>
750
+ <UTooltip
751
+ v-if="
752
+ typeof action.tooltip === 'function'
753
+ ? action.tooltip(props.row)
754
+ : action.tooltip
755
+ "
756
+ :anchor="action.anchor"
757
+ :description="
758
+ typeof action.tooltip === 'function'
759
+ ? action.tooltip(props.row)
760
+ : action.tooltip
761
+ "
762
+ :offset="action.offset ? action.offset : [10, 40]"
763
+ :self="action.anchor"
764
+ />
765
+ </template>
766
+ </UBtnStd>
767
+ </template>
768
+ </template>
769
+ <template v-if="col.actions && col.actions.length > 1">
770
+ <q-dialog
771
+ v-if="
772
+ isTablet &&
773
+ moreActionDialogData &&
774
+ moreActionDialogData.showDialog[props.row.id]
775
+ "
776
+ v-model="moreActionDialogData.showDialog[props.row.id]"
777
+ class="more-action-popup"
778
+ persistent
779
+ >
780
+ <q-card
781
+ class="more-action-popup-wrapper confirmation-dialog-wrapper q-px-ba q-py-ba"
782
+ >
783
+ <q-card-section>
784
+ <div class="content-wrapper text-center">
785
+ <div
786
+ class="q-pb-ba flex justify-center items-center"
787
+ >
788
+ <div
789
+ :class="`remove-icon-wrapper ${
790
+ moreActionDialogData.row.iconColor ===
791
+ 'accent'
792
+ ? 'icon-bg-accent'
793
+ : 'icon-bg-primary'
794
+ }`"
795
+ >
796
+ <q-icon
797
+ :class="`${moreActionDialogData.row.icon} ${
798
+ moreActionDialogData.row.iconColor ===
799
+ 'accent'
800
+ ? 'icon-text-accent'
801
+ : 'icon-text-primary'
802
+ }`"
803
+ alt="confirmation icon"
804
+ aria-label="confirmation icon"
805
+ size="1.5rem"
806
+ />
807
+ </div>
808
+ </div>
809
+
810
+ <div
811
+ class="text-heading-xxs primary-content-text q-pb-xxs"
812
+ >
813
+ {{ moreActionDialogData.row.title }}
814
+ </div>
815
+ <div
816
+ v-if="moreActionDialogData.row.description"
817
+ class="text-body-sm secondary-content-text q-pb-xs"
818
+ >
819
+ {{ moreActionDialogData.row.description }}
820
+ </div>
821
+ </div>
822
+ <!-- <p class="hidden-scope-value">{{ scope.value }}</p> -->
823
+ </q-card-section>
824
+
825
+ <q-card-actions align="right">
826
+ <UBtnStd
827
+ v-if="moreActionDialogData.secondaryAction"
828
+ :color="
829
+ moreActionDialogData.secondaryAction.color
830
+ "
831
+ :disable="
832
+ moreActionDialogData.secondaryAction.disable
833
+ "
834
+ :flat="moreActionDialogData.secondaryAction.flat"
835
+ :label="
836
+ moreActionDialogData.secondaryAction.label
837
+ "
838
+ :loading="
839
+ moreActionDialogData.secondaryAction.loading
840
+ "
841
+ :outline="
842
+ moreActionDialogData.secondaryAction.outline
843
+ "
844
+ :size="moreActionDialogData.secondaryAction.size"
845
+ @on-click="
846
+ moreActionDialogData.secondaryAction.handler(
847
+ props.row
848
+ )
849
+ "
850
+ />
851
+ <UBtnStd
852
+ v-if="moreActionDialogData.primaryAction"
853
+ class="confirm-primary-action"
854
+ :color="moreActionDialogData.primaryAction.color"
855
+ :disable="
856
+ moreActionDialogData.primaryAction.disable
857
+ "
858
+ :flat="moreActionDialogData.primaryAction.flat"
859
+ :label="moreActionDialogData.primaryAction.label"
860
+ :loading="
861
+ moreActionDialogData.primaryAction.loading
862
+ "
863
+ :outline="
864
+ moreActionDialogData.primaryAction.outline
865
+ "
866
+ :size="moreActionDialogData.primaryAction.size"
867
+ @on-click="
868
+ moreActionDialogData.primaryAction.handler(
869
+ props.row
870
+ )
871
+ "
872
+ />
873
+ </q-card-actions>
874
+ </q-card>
875
+ </q-dialog>
876
+
877
+ <UBtnStd
878
+ v-if="!isMobile"
879
+ color="primary"
880
+ full-width
881
+ :id="`actionPopupRefBtn-${props.row.id}`"
882
+ :label="viewMoreLabel"
883
+ outline
884
+ >
885
+ <template #menu>
886
+ <q-menu
887
+ class="more-action-popup"
888
+ auto-close
889
+ fit
890
+ :id="`actionPopupRef-${props.row.id}`"
891
+ :offset="[10, 20]"
892
+ transition-hide="jump-up"
893
+ transition-show="jump-down"
894
+ @show="checkMenuPosition(props.row.id)"
895
+ >
896
+ <div :class="tailClass" />
897
+ <div
898
+ class="q-pt-ba q-px-ba q-pb-none text-heading-xxs text-dark"
899
+ >
900
+ Select More Options
901
+ </div>
902
+ <q-list class="grid-more-action">
903
+ <template v-for="(action, __i) in col.actions">
904
+ <q-item
905
+ v-if="
906
+ typeof action.hide === 'function'
907
+ ? !action.hide(props.row)
908
+ : true
909
+ "
910
+ class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
911
+ :aria-label="
912
+ typeof action.label === 'function'
913
+ ? action.label(props.row)
914
+ : action.label
915
+ "
916
+ clickable
917
+ :key="__i"
918
+ tabindex="-1"
919
+ @click="action.handler(props.row)"
920
+ >
921
+ <q-item-section class="q-pr-xs" avatar>
922
+ <q-icon
923
+ v-if="
924
+ typeof action.icon === 'function'
925
+ ? action.icon(props.row)
926
+ : action.icon
927
+ "
928
+ :class="`${
929
+ typeof action.icon === 'function'
930
+ ? action.icon(props.row)
931
+ : action.icon
932
+ } text-${getActionItemColor(
933
+ action,
934
+ props.row
935
+ )}`"
936
+ size="1.5rem"
937
+ tabindex="-1"
938
+ />
939
+ </q-item-section>
940
+ <q-item-section
941
+ :class="`text-caption-lg text-${getActionItemColor(
942
+ action,
943
+ props.row
944
+ )}`"
945
+ tabindex="0"
946
+ >
947
+ {{
948
+ typeof action.label === 'function'
949
+ ? action.label(props.row)
950
+ : action.label
951
+ }}
952
+ </q-item-section>
953
+ </q-item>
954
+ </template>
955
+ </q-list>
956
+ </q-menu>
957
+ </template>
958
+ </UBtnStd>
959
+ <template v-if="isMobile">
960
+ <UBtnStd
961
+ color="primary"
962
+ full-width
963
+ :id="`view-more-actions-${props.row['id']}`"
964
+ :label="viewMoreLabel"
965
+ outline
966
+ @on-click="
967
+ handleOpenMobileMoreActions(props.row['id'])
968
+ "
969
+ />
970
+ <USheet
971
+ v-if="
972
+ moreActionDialogData &&
973
+ moreActionDialogData.showDialog[props.row.id]
974
+ "
975
+ v-model:dialogs="mobileActionsDialog[props.row['id']]"
976
+ :close-icon-label="closeIconLabel"
977
+ :heading="moreActionDialogData.row.title"
978
+ :is-left-icon="false"
979
+ :show-action-buttons="true"
980
+ >
981
+ <template #content>
982
+ <q-card
983
+ class="more-action-popup-wrapper confirmation-dialog-wrapper mobile-confirmation-dialog q-px-ba q-py-ba"
984
+ >
985
+ <q-card-section>
986
+ <div class="content-wrapper text-center">
987
+ <div
988
+ class="q-pb-ba flex justify-center items-center"
989
+ >
990
+ <div
991
+ :class="`remove-icon-wrapper ${
992
+ moreActionDialogData.row.iconColor ===
993
+ 'accent'
994
+ ? 'icon-bg-accent'
995
+ : 'icon-bg-primary'
996
+ }`"
997
+ >
998
+ <q-icon
999
+ :class="`${
1000
+ moreActionDialogData.row.icon
1001
+ } ${
1002
+ moreActionDialogData.row.iconColor ===
1003
+ 'accent'
1004
+ ? 'icon-text-accent'
1005
+ : 'icon-text-primary'
1006
+ }`"
1007
+ alt="confirmation icon"
1008
+ aria-label="confirmation icon"
1009
+ size="1.5rem"
1010
+ />
1011
+ </div>
1012
+ </div>
1013
+
1014
+ <div
1015
+ class="text-heading-xxs primary-content-text q-pb-xxs"
1016
+ >
1017
+ {{ moreActionDialogData.row.title }}
1018
+ </div>
1019
+ <div
1020
+ v-if="moreActionDialogData.row.description"
1021
+ class="text-body-sm secondary-content-text q-pb-xs"
1022
+ >
1023
+ {{ moreActionDialogData.row.description }}
1024
+ </div>
1025
+ </div>
1026
+ </q-card-section>
1027
+ </q-card>
1028
+ </template>
1029
+ <template
1030
+ v-if="
1031
+ moreActionDialogData &&
1032
+ moreActionDialogData.showDialog[props.row.id] &&
1033
+ moreActionDialogData.secondaryAction
1034
+ "
1035
+ #action_primary_one
1036
+ >
1037
+ <UBtnStd
1038
+ :color="
1039
+ moreActionDialogData.secondaryAction.color
1040
+ "
1041
+ :disable="
1042
+ moreActionDialogData.secondaryAction.disable
1043
+ "
1044
+ :flat="moreActionDialogData.secondaryAction.flat"
1045
+ :label="
1046
+ moreActionDialogData.secondaryAction.label
1047
+ "
1048
+ :loading="
1049
+ moreActionDialogData.secondaryAction.loading
1050
+ "
1051
+ :outline="
1052
+ moreActionDialogData.secondaryAction.outline
1053
+ "
1054
+ :size="moreActionDialogData.secondaryAction.size"
1055
+ @on-click="
1056
+ moreActionDialogData.secondaryAction.handler(
1057
+ props.row
1058
+ )
1059
+ "
1060
+ />
1061
+ </template>
1062
+ <template
1063
+ v-if="
1064
+ moreActionDialogData &&
1065
+ moreActionDialogData.showDialog[props.row.id] &&
1066
+ moreActionDialogData.primaryAction
1067
+ "
1068
+ #action_primary_two
1069
+ >
1070
+ <UBtnStd
1071
+ class="confirm-primary-action"
1072
+ :color="moreActionDialogData.primaryAction.color"
1073
+ :disable="
1074
+ moreActionDialogData.primaryAction.disable
1075
+ "
1076
+ :flat="moreActionDialogData.primaryAction.flat"
1077
+ :label="moreActionDialogData.primaryAction.label"
1078
+ :loading="
1079
+ moreActionDialogData.primaryAction.loading
1080
+ "
1081
+ :outline="
1082
+ moreActionDialogData.primaryAction.outline
1083
+ "
1084
+ :size="moreActionDialogData.primaryAction.size"
1085
+ @on-click="
1086
+ moreActionDialogData.primaryAction.handler(
1087
+ props.row
1088
+ )
1089
+ "
1090
+ />
1091
+ </template>
1092
+ </USheet>
1093
+ <USheet
1094
+ v-model:dialogs="moreActionsDialogs[props.row['id']]"
1095
+ :close-icon-label="closeIconLabel"
1096
+ :heading="selectMoreOptions"
1097
+ :is-left-icon="false"
1098
+ :show-action-buttons="false"
1099
+ >
1100
+ <template #content>
1101
+ <q-list class="mobile-grid-more-action">
1102
+ <template v-for="(action, __i) in col.actions">
1103
+ <q-item
1104
+ v-if="
1105
+ typeof action.hide === 'function'
1106
+ ? !action.hide(props.row)
1107
+ : true
1108
+ "
1109
+ class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
1110
+ :aria-label="
1111
+ typeof action.label === 'function'
1112
+ ? action.label(props.row)
1113
+ : action.label
1114
+ "
1115
+ clickable
1116
+ :key="__i"
1117
+ tabindex="-1"
1118
+ @click="handleItemClick(action, props.row)"
1119
+ >
1120
+ <q-item-section class="q-pr-xs" avatar>
1121
+ <q-icon
1122
+ v-if="
1123
+ typeof action.icon === 'function'
1124
+ ? action.icon(props.row)
1125
+ : action.icon
1126
+ "
1127
+ :class="`${
1128
+ typeof action.icon === 'function'
1129
+ ? action.icon(props.row)
1130
+ : action.icon
1131
+ } text-${getActionItemColor(
1132
+ action,
1133
+ props.row
1134
+ )}`"
1135
+ size="1.5rem"
1136
+ tabindex="-1"
1137
+ />
1138
+ </q-item-section>
1139
+ <q-item-section
1140
+ :class="`text-caption-lg text-${getActionItemColor(
1141
+ action,
1142
+ props.row
1143
+ )}`"
1144
+ tabindex="0"
1145
+ >
1146
+ {{
1147
+ typeof action.label === 'function'
1148
+ ? action.label(props.row)
1149
+ : action.label
1150
+ }}
1151
+ </q-item-section>
1152
+ </q-item>
1153
+ </template>
1154
+ </q-list>
1155
+ </template>
1156
+ </USheet>
1157
+ </template>
1158
+ </template>
1159
+ </q-item-section>
1160
+ </q-item>
1161
+ </template>
1162
+ </q-list>
1163
+ </q-card>
1164
+ </div>
1165
+ <UExpansionStd
1166
+ v-else
1167
+ class="q-mb-sm u-expansion-table"
1168
+ :caption="getExpansionCaption(props.row, props.cols)"
1169
+ :enableIconToggle="enableIconToggle"
1170
+ :label="getExpansionLabel(props.row, props.cols)"
1171
+ :props="props"
1172
+ :rowCardHeight="rowCardHeight"
1173
+ >
1174
+ <template #avatar>
1175
+ <template v-if="props.cols">
1176
+ <template v-for="(col, _colInd) in props.cols" :key="_colInd">
1177
+ <template v-if="col.avatarKey && col.isPrimary">
1178
+ <UChip
1179
+ v-if="
1180
+ !isDesktop &&
1181
+ col.showAlignedChip &&
1182
+ typeof col.showAlignedChip === 'function' &&
1183
+ col.showAlignedChip(props.row)
1184
+ "
1185
+ v-model="tableDataChip"
1186
+ :class="[
1187
+ expansion ? 'q-ma-none' : 'q-mr-xs',
1188
+ col.showAlignedChip(props.row).class,
1189
+ ]"
1190
+ :avatarLabel="col.showAlignedChip(props.row).avatarLabel"
1191
+ :chipLabel="col.showAlignedChip(props.row).chipLabel"
1192
+ :dense="col.showAlignedChip(props.row).dense"
1193
+ :removable="col.showAlignedChip(props.row).removable"
1194
+ :type="col.showAlignedChip(props.row).type"
1195
+ />
1196
+ <div
1197
+ v-if="
1198
+ props.row[col.avatarKey] &&
1199
+ typeof props.row[col.avatarKey] === 'object'
1200
+ "
1201
+ class="table-data-avatar"
1202
+ >
1203
+ <UAvatar
1204
+ v-if="props.row[col.avatarKey]?.type === 'initials'"
1205
+ :indicatorColor="
1206
+ typeof col.indicatorColor === 'function' &&
1207
+ col.indicatorColor(props.row)
1208
+ ? col.indicatorColor(props.row)
1209
+ : ''
1210
+ "
1211
+ :indicatorIcon="
1212
+ typeof col.indicatorIcon === 'function' &&
1213
+ col.indicatorIcon(props.row)
1214
+ ? col.indicatorIcon(props.row)
1215
+ : ''
1216
+ "
1217
+ :name="`${props.row[col.avatarKey]?.value}`"
1218
+ :showIndicator="col.showIndicator"
1219
+ size="lg"
1220
+ />
1221
+ <UAvatar
1222
+ v-else-if="props.row[col.avatarKey]?.type === 'image'"
1223
+ :image="`${props.row[col.avatarKey]?.value}`"
1224
+ :indicatorColor="
1225
+ typeof col.indicatorColor === 'function' &&
1226
+ col.indicatorColor(props.row)
1227
+ ? col.indicatorColor(props.row)
1228
+ : ''
1229
+ "
1230
+ :indicatorIcon="
1231
+ typeof col.indicatorIcon === 'function' &&
1232
+ col.indicatorIcon(props.row)
1233
+ ? col.indicatorIcon(props.row)
1234
+ : ''
1235
+ "
1236
+ :name="
1237
+ props.row[col.avatarKey]?.name ??
1238
+ props.row[col.avatarKey]?.value
1239
+ "
1240
+ :showIndicator="col.showIndicator"
1241
+ size="lg"
1242
+ />
1243
+ </div>
1244
+ <div v-else class="table-data-avatar">
1245
+ <UAvatar
1246
+ :image="`${props.row[col.avatarKey]}`"
1247
+ :indicatorColor="
1248
+ typeof col.indicatorColor === 'function' &&
1249
+ col.indicatorColor(props.row)
1250
+ ? col.indicatorColor(props.row)
1251
+ : ''
1252
+ "
1253
+ :indicatorIcon="
1254
+ typeof col.indicatorIcon === 'function' &&
1255
+ col.indicatorIcon(props.row)
1256
+ ? col.indicatorIcon(props.row)
1257
+ : ''
1258
+ "
1259
+ :name="`${props.row[col.avatarKey]}`"
1260
+ :showIndicator="col.showIndicator"
1261
+ size="lg"
1262
+ />
1263
+ </div>
1264
+ </template>
1265
+ </template>
1266
+ </template>
1267
+ </template>
1268
+
1269
+ <template #body>
1270
+ <div class="u-expansion-body">
1271
+ <template v-for="(col, _indB) in props.cols" :key="_indB">
1272
+ <!-- Skip the primary column -->
1273
+ <template
1274
+ v-if="
1275
+ !col.isPrimary &&
1276
+ (typeof col.show === 'undefined' || col.show) &&
1277
+ col.field !== 'action'
1278
+ "
1279
+ >
1280
+ <div class="col-12 col-sm-6">
1281
+ <!-- Label -->
1282
+ <div class="text-caption text-description">
1283
+ {{ col.label }}
1284
+ </div>
1285
+ <!-- Content -->
1286
+ <div class="flex items-center">
1287
+ <!-- Avatar (if present) -->
1288
+ <template v-if="col.avatarKey">
1289
+ <UChip
1290
+ v-if="
1291
+ !isDesktop &&
1292
+ col.showAlignedChip &&
1293
+ typeof col.showAlignedChip === 'function' &&
1294
+ col.showAlignedChip(props.row)
1295
+ "
1296
+ v-model="tableDataChip"
1297
+ :class="[
1298
+ expansion ? 'q-ma-none' : 'q-mr-xs',
1299
+ col.showAlignedChip(props.row).class,
1300
+ ]"
1301
+ :avatarLabel="
1302
+ col.showAlignedChip(props.row).avatarLabel
1303
+ "
1304
+ :chipLabel="col.showAlignedChip(props.row).chipLabel"
1305
+ :dense="col.showAlignedChip(props.row).dense"
1306
+ :removable="col.showAlignedChip(props.row).removable"
1307
+ :type="col.showAlignedChip(props.row).type"
1308
+ />
1309
+ <div
1310
+ v-if="
1311
+ props.row[col.avatarKey] &&
1312
+ typeof props.row[col.avatarKey] === 'object'
1313
+ "
1314
+ class="table-data-avatar"
1315
+ >
1316
+ <UAvatar
1317
+ v-if="props.row[col.avatarKey]?.type === 'initials'"
1318
+ :indicatorColor="
1319
+ typeof col.indicatorColor === 'function' &&
1320
+ col.indicatorColor(props.row)
1321
+ ? col.indicatorColor(props.row)
1322
+ : ''
1323
+ "
1324
+ :indicatorIcon="
1325
+ typeof col.indicatorIcon === 'function' &&
1326
+ col.indicatorIcon(props.row)
1327
+ ? col.indicatorIcon(props.row)
1328
+ : ''
1329
+ "
1330
+ :name="`${props.row[col.avatarKey]?.value}`"
1331
+ :showIndicator="col.showIndicator"
1332
+ size="md"
1333
+ />
1334
+ <UAvatar
1335
+ v-else-if="
1336
+ props.row[col.avatarKey]?.type === 'image'
1337
+ "
1338
+ :image="`${props.row[col.avatarKey]?.value}`"
1339
+ :indicatorColor="
1340
+ typeof col.indicatorColor === 'function' &&
1341
+ col.indicatorColor(props.row)
1342
+ ? col.indicatorColor(props.row)
1343
+ : ''
1344
+ "
1345
+ :indicatorIcon="
1346
+ typeof col.indicatorIcon === 'function' &&
1347
+ col.indicatorIcon(props.row)
1348
+ ? col.indicatorIcon(props.row)
1349
+ : ''
1350
+ "
1351
+ :name="
1352
+ props.row[col.avatarKey]?.name ??
1353
+ props.row[col.avatarKey]?.value
1354
+ "
1355
+ :showIndicator="col.showIndicator"
1356
+ size="md"
1357
+ />
1358
+ <span
1359
+ :class="[
1360
+ col.value ? 'long-text-content' : '',
1361
+ col.noEllipsis ? 'no-ellipsis-content' : '',
1362
+ col.doubleSpan && col.noEllipsis
1363
+ ? 'full-width-text-content'
1364
+ : '',
1365
+ !isResponsiveTablet &&
1366
+ isTablet &&
1367
+ col.classes &&
1368
+ col.classes.length > 0 &&
1369
+ col.classes[0] === 'no-wrap-text'
1370
+ ? 'tablet-event-text'
1371
+ : '',
1372
+ typeof col.combineColoumn === 'function' &&
1373
+ col.combineColoumn(props.row)
1374
+ ? 'combine-col-small-device-wrapper'
1375
+ : '',
1376
+ ]"
1377
+ :id="`long-content-${col.field}-${props.row.id}`"
1378
+ >
1379
+ {{ col.value }}
1380
+ <template
1381
+ v-if="
1382
+ typeof col.combineColoumn === 'function' &&
1383
+ col.combineColoumn(props.row)
1384
+ "
1385
+ >
1386
+ <template
1387
+ v-for="(
1388
+ combineCol, colKey
1389
+ ) in col.combineColoumn(props.row)"
1390
+ :key="colKey"
1391
+ >
1392
+ <q-icon
1393
+ v-if="combineCol.icon"
1394
+ :class="combineCol.icon"
1395
+ :alt="combineCol.ariaLabel"
1396
+ :aria-label="combineCol.ariaLabel"
1397
+ :color="combineCol?.iconColor ?? 'primary'"
1398
+ :key="colKey"
1399
+ size="1rem"
1400
+ />
1401
+ <div v-else>
1402
+ {{ props.row[combineCol.key] }}
1403
+ </div>
1404
+ </template>
1405
+ </template>
1406
+ </span>
1407
+ <UTooltip
1408
+ v-if="
1409
+ col.value &&
1410
+ col.value.length > 12 &&
1411
+ isContentVisible(
1412
+ col.field,
1413
+ props.row.id,
1414
+ 'content'
1415
+ )
1416
+ "
1417
+ anchor="bottom middle"
1418
+ :description="col.value"
1419
+ :offset="[10, 40]"
1420
+ self="bottom middle"
1421
+ :target="`#long-content-${col.field}-${props.row.id}`"
1422
+ />
1423
+ </div>
1424
+ <div v-else class="table-data-avatar">
1425
+ <UAvatar
1426
+ :image="`${props.row[col.avatarKey]}`"
1427
+ :indicatorColor="
1428
+ typeof col.indicatorColor === 'function' &&
1429
+ col.indicatorColor(props.row)
1430
+ ? col.indicatorColor(props.row)
1431
+ : ''
1432
+ "
1433
+ :indicatorIcon="
1434
+ typeof col.indicatorIcon === 'function' &&
1435
+ col.indicatorIcon(props.row)
1436
+ ? col.indicatorIcon(props.row)
1437
+ : ''
1438
+ "
1439
+ :name="`${props.row[col.avatarKey]}`"
1440
+ :showIndicator="col.showIndicator"
1441
+ size="lg"
1442
+ />
1443
+ </div>
1444
+ </template>
1445
+ <!-- Chip -->
1446
+ <UChip
1447
+ v-else-if="col.chipValues && col.chipValues.length > 0"
1448
+ v-model="tableDataChip"
1449
+ class="u-table-chip"
1450
+ :anchor="col.anchor"
1451
+ avatarLabel=""
1452
+ :chipLabel="props.row[col.field]?.toString()"
1453
+ :dense="isMobile || isTablet ? true : col.denseChip"
1454
+ :is-show-tooltip="col.showChipTooltip"
1455
+ :offset="col.offset"
1456
+ :removable="false"
1457
+ :type="
1458
+ getChipColor(col.chipValues, props.row[col.field])
1459
+ "
1460
+ />
1461
+ <!-- Icon -->
1462
+ <q-icon
1463
+ v-else-if="col.type === 'icon' && props.row[col.field]"
1464
+ :class="props.row[col.field]"
1465
+ :alt="props.row.ariaLabel"
1466
+ :aria-label="props.row.ariaLabel"
1467
+ :color="props?.row?.iconColor ?? 'primary'"
1468
+ size="1.5rem"
1469
+ />
1470
+ <!-- Text -->
1471
+ <span v-else class="text-body-sm">
1472
+ {{ props.row[col.field] }}
1473
+ </span>
1474
+ </div>
1475
+ <!-- Caption (if any) -->
1476
+ <div
1477
+ v-if="col.captionKey"
1478
+ class="td-caption mobile-primary-caption text-body-sm"
1479
+ >
1480
+ <template v-if="col.captionKeyTitle">
1481
+ {{ col.captionKeyTitle }}:
1482
+ </template>
1483
+ {{ props.row[col.captionKey] }}
1484
+ </div>
1485
+ </div>
1486
+ </template>
1487
+ </template>
1488
+ </div>
1489
+ <!-- Actions Footer -->
1490
+ </template>
1491
+ <template #footer>
1492
+ <div class="row">
1493
+ <template v-for="(col, _indF) in props.cols" :key="_indF">
1494
+ <template v-if="col.actions && col.actions.length">
1495
+ <!-- Single Action -->
1496
+ <template v-if="col.actions.length === 1">
1497
+ <template v-for="(action, key) in col.actions" :key="key">
1498
+ <UBtnStd
1499
+ v-if="
1500
+ typeof action.hide === 'function'
1501
+ ? !action.hide(props.row)
1502
+ : true
1503
+ "
1504
+ class="full-width"
1505
+ :color="
1506
+ typeof action.color === 'function'
1507
+ ? action.color(props.row)
1508
+ : action.color
1509
+ "
1510
+ :disable="
1511
+ typeof action.disable === 'function' &&
1512
+ action.disable(props.row)
1513
+ "
1514
+ :flat="
1515
+ typeof action.flat === 'function'
1516
+ ? action.flat(props.row)
1517
+ : action.flat
1518
+ "
1519
+ :label="
1520
+ typeof action.label === 'function'
1521
+ ? action.label(props.row)
1522
+ : action.label
1523
+ "
1524
+ :leftIcon="
1525
+ typeof action.icon === 'function'
1526
+ ? action.icon(props.row)
1527
+ : action.icon
1528
+ "
1529
+ :loading="
1530
+ typeof action.loading === 'function'
1531
+ ? action.loading(props.row)
1532
+ : action.loading
1533
+ "
1534
+ :outline="
1535
+ typeof action.outline === 'function'
1536
+ ? action.outline(props.row)
1537
+ : action.outline
1538
+ "
1539
+ :size="action.size"
1540
+ @on-click="action.handler(props.row)"
1541
+ >
1542
+ <template #tooltip>
1543
+ <UTooltip
1544
+ v-if="
1545
+ typeof action.tooltip === 'function'
1546
+ ? action.tooltip(props.row)
1547
+ : action.tooltip
1548
+ "
1549
+ :anchor="action.anchor"
1550
+ :description="
1551
+ typeof action.tooltip === 'function'
1552
+ ? action.tooltip(props.row)
1553
+ : action.tooltip
1554
+ "
1555
+ :offset="action.offset ? action.offset : [10, 40]"
1556
+ :self="action.anchor"
1557
+ />
1558
+ </template>
1559
+ </UBtnStd>
1560
+ </template>
1561
+ </template>
1562
+ <!-- Multiple Actions -->
1563
+ <template v-else-if="col.actions.length > 1">
1564
+ <q-dialog
1565
+ v-if="
1566
+ isTablet &&
1567
+ moreActionDialogData &&
1568
+ moreActionDialogData.showDialog[props.row.id]
1569
+ "
1570
+ v-model="moreActionDialogData.showDialog[props.row.id]"
1571
+ class="more-action-popup"
1572
+ persistent
1573
+ >
1574
+ <q-card
1575
+ class="more-action-popup-wrapper confirmation-dialog-wrapper q-px-ba q-py-ba"
1576
+ >
1577
+ <q-card-section>
1578
+ <div class="content-wrapper text-center">
1579
+ <div
1580
+ class="q-pb-ba flex justify-center items-center"
1581
+ >
1582
+ <div
1583
+ :class="`remove-icon-wrapper ${
1584
+ moreActionDialogData.row.iconColor ===
1585
+ 'accent'
1586
+ ? 'icon-bg-accent'
1587
+ : 'icon-bg-primary'
1588
+ }`"
1589
+ >
1590
+ <q-icon
1591
+ :class="`${moreActionDialogData.row.icon} ${
1592
+ moreActionDialogData.row.iconColor ===
1593
+ 'accent'
1594
+ ? 'icon-text-accent'
1595
+ : 'icon-text-primary'
1596
+ }`"
1597
+ alt="confirmation icon"
1598
+ aria-label="confirmation icon"
1599
+ size="1.5rem"
1600
+ />
1601
+ </div>
1602
+ </div>
1603
+
1604
+ <div
1605
+ class="text-heading-xxs primary-content-text q-pb-xxs"
1606
+ >
1607
+ {{ moreActionDialogData.row.title }}
1608
+ </div>
1609
+ <div
1610
+ v-if="moreActionDialogData.row.description"
1611
+ class="text-body-sm secondary-content-text q-pb-xs"
1612
+ >
1613
+ {{ moreActionDialogData.row.description }}
1614
+ </div>
1615
+ </div>
1616
+ <!-- <p class="hidden-scope-value">{{ scope.value }}</p> -->
1617
+ </q-card-section>
1618
+
1619
+ <q-card-actions align="right">
1620
+ <UBtnStd
1621
+ v-if="moreActionDialogData.secondaryAction"
1622
+ :color="moreActionDialogData.secondaryAction.color"
1623
+ :disable="
1624
+ moreActionDialogData.secondaryAction.disable
1625
+ "
1626
+ :flat="moreActionDialogData.secondaryAction.flat"
1627
+ :label="moreActionDialogData.secondaryAction.label"
1628
+ :loading="
1629
+ moreActionDialogData.secondaryAction.loading
1630
+ "
1631
+ :outline="
1632
+ moreActionDialogData.secondaryAction.outline
1633
+ "
1634
+ :size="moreActionDialogData.secondaryAction.size"
1635
+ @on-click="
1636
+ moreActionDialogData.secondaryAction.handler(
1637
+ props.row
1638
+ )
1639
+ "
1640
+ />
1641
+ <UBtnStd
1642
+ v-if="moreActionDialogData.primaryAction"
1643
+ class="confirm-primary-action"
1644
+ :color="moreActionDialogData.primaryAction.color"
1645
+ :disable="
1646
+ moreActionDialogData.primaryAction.disable
1647
+ "
1648
+ :flat="moreActionDialogData.primaryAction.flat"
1649
+ :label="moreActionDialogData.primaryAction.label"
1650
+ :loading="
1651
+ moreActionDialogData.primaryAction.loading
1652
+ "
1653
+ :outline="
1654
+ moreActionDialogData.primaryAction.outline
1655
+ "
1656
+ :size="moreActionDialogData.primaryAction.size"
1657
+ @on-click="
1658
+ moreActionDialogData.primaryAction.handler(
1659
+ props.row
1660
+ )
1661
+ "
1662
+ />
1663
+ </q-card-actions>
1664
+ </q-card>
1665
+ </q-dialog>
1666
+
1667
+ <UBtnStd
1668
+ v-if="!isMobile"
1669
+ class="full-width"
1670
+ color="primary"
1671
+ full-width
1672
+ :id="`actionPopupRefBtn-${props.row.id}`"
1673
+ :label="viewMoreLabel"
1674
+ outline
1675
+ >
1676
+ <template #menu>
1677
+ <q-menu
1678
+ class="more-action-popup"
1679
+ auto-close
1680
+ fit
1681
+ :id="`actionPopupRef-${props.row.id}`"
1682
+ :offset="[10, 20]"
1683
+ transition-hide="jump-up"
1684
+ transition-show="jump-down"
1685
+ @show="checkMenuPosition(props.row.id)"
1686
+ >
1687
+ <div :class="tailClass" />
1688
+ <div
1689
+ class="q-pt-ba q-px-ba q-pb-none text-heading-xxs text-dark"
1690
+ >
1691
+ Select More Options
1692
+ </div>
1693
+ <q-list class="grid-more-action">
1694
+ <template v-for="(action, __i) in col.actions">
1695
+ <q-item
1696
+ v-if="
1697
+ typeof action.hide === 'function'
1698
+ ? !action.hide(props.row)
1699
+ : true
1700
+ "
1701
+ class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
1702
+ :aria-label="
1703
+ typeof action.label === 'function'
1704
+ ? action.label(props.row)
1705
+ : action.label
1706
+ "
1707
+ clickable
1708
+ :key="__i"
1709
+ tabindex="-1"
1710
+ @click="action.handler(props.row)"
1711
+ >
1712
+ <q-item-section class="q-pr-xs" avatar>
1713
+ <q-icon
1714
+ v-if="
1715
+ typeof action.icon === 'function'
1716
+ ? action.icon(props.row)
1717
+ : action.icon
1718
+ "
1719
+ :class="`${
1720
+ typeof action.icon === 'function'
1721
+ ? action.icon(props.row)
1722
+ : action.icon
1723
+ } text-${getActionItemColor(
1724
+ action,
1725
+ props.row
1726
+ )}`"
1727
+ size="1.5rem"
1728
+ tabindex="-1"
1729
+ />
1730
+ </q-item-section>
1731
+ <q-item-section
1732
+ :class="`text-caption-lg text-${getActionItemColor(
1733
+ action,
1734
+ props.row
1735
+ )}`"
1736
+ tabindex="0"
1737
+ >
1738
+ {{
1739
+ typeof action.label === 'function'
1740
+ ? action.label(props.row)
1741
+ : action.label
1742
+ }}
1743
+ </q-item-section>
1744
+ </q-item>
1745
+ </template>
1746
+ </q-list>
1747
+ </q-menu>
1748
+ </template>
1749
+ </UBtnStd>
1750
+ <template v-if="isMobile">
1751
+ <UBtnStd
1752
+ color="primary"
1753
+ full-width
1754
+ :id="`view-more-actions-${props.row['id']}`"
1755
+ :label="viewMoreLabel"
1756
+ class="full-width"
1757
+ outline
1758
+ @on-click="handleOpenMobileMoreActions(props.row['id'])"
1759
+ />
1760
+ <USheet
1761
+ v-if="
1762
+ moreActionDialogData &&
1763
+ moreActionDialogData.showDialog[props.row.id]
1764
+ "
1765
+ v-model:dialogs="mobileActionsDialog[props.row['id']]"
1766
+ :close-icon-label="closeIconLabel"
1767
+ :heading="moreActionDialogData.row.title"
1768
+ :is-left-icon="false"
1769
+ :show-action-buttons="true"
1770
+ >
1771
+ <template #content>
1772
+ <q-card
1773
+ class="more-action-popup-wrapper confirmation-dialog-wrapper mobile-confirmation-dialog q-px-ba q-py-ba"
1774
+ >
1775
+ <q-card-section>
1776
+ <div class="content-wrapper text-center">
1777
+ <div
1778
+ class="q-pb-ba flex justify-center items-center"
1779
+ >
1780
+ <div
1781
+ :class="`remove-icon-wrapper ${
1782
+ moreActionDialogData.row.iconColor ===
1783
+ 'accent'
1784
+ ? 'icon-bg-accent'
1785
+ : 'icon-bg-primary'
1786
+ }`"
1787
+ >
1788
+ <q-icon
1789
+ :class="`${
1790
+ moreActionDialogData.row.icon
1791
+ } ${
1792
+ moreActionDialogData.row.iconColor ===
1793
+ 'accent'
1794
+ ? 'icon-text-accent'
1795
+ : 'icon-text-primary'
1796
+ }`"
1797
+ alt="confirmation icon"
1798
+ aria-label="confirmation icon"
1799
+ size="1.5rem"
1800
+ />
1801
+ </div>
1802
+ </div>
1803
+
1804
+ <div
1805
+ class="text-heading-xxs primary-content-text q-pb-xxs"
1806
+ >
1807
+ {{ moreActionDialogData.row.title }}
1808
+ </div>
1809
+ <div
1810
+ v-if="moreActionDialogData.row.description"
1811
+ class="text-body-sm secondary-content-text q-pb-xs"
1812
+ >
1813
+ {{ moreActionDialogData.row.description }}
1814
+ </div>
1815
+ </div>
1816
+ </q-card-section>
1817
+ </q-card>
1818
+ </template>
1819
+ <template
1820
+ v-if="
1821
+ moreActionDialogData &&
1822
+ moreActionDialogData.showDialog[props.row.id] &&
1823
+ moreActionDialogData.secondaryAction
1824
+ "
1825
+ #action_primary_one
1826
+ >
1827
+ <UBtnStd
1828
+ :color="moreActionDialogData.secondaryAction.color"
1829
+ :disable="
1830
+ moreActionDialogData.secondaryAction.disable
1831
+ "
1832
+ :flat="moreActionDialogData.secondaryAction.flat"
1833
+ :label="moreActionDialogData.secondaryAction.label"
1834
+ :loading="
1835
+ moreActionDialogData.secondaryAction.loading
1836
+ "
1837
+ :outline="
1838
+ moreActionDialogData.secondaryAction.outline
1839
+ "
1840
+ :size="moreActionDialogData.secondaryAction.size"
1841
+ @on-click="
1842
+ moreActionDialogData.secondaryAction.handler(
1843
+ props.row
1844
+ )
1845
+ "
1846
+ />
1847
+ </template>
1848
+ <template
1849
+ v-if="
1850
+ moreActionDialogData &&
1851
+ moreActionDialogData.showDialog[props.row.id] &&
1852
+ moreActionDialogData.primaryAction
1853
+ "
1854
+ #action_primary_two
1855
+ >
1856
+ <UBtnStd
1857
+ class="confirm-primary-action"
1858
+ :color="moreActionDialogData.primaryAction.color"
1859
+ :disable="
1860
+ moreActionDialogData.primaryAction.disable
1861
+ "
1862
+ :flat="moreActionDialogData.primaryAction.flat"
1863
+ :label="moreActionDialogData.primaryAction.label"
1864
+ :loading="
1865
+ moreActionDialogData.primaryAction.loading
1866
+ "
1867
+ :outline="
1868
+ moreActionDialogData.primaryAction.outline
1869
+ "
1870
+ :size="moreActionDialogData.primaryAction.size"
1871
+ @on-click="
1872
+ moreActionDialogData.primaryAction.handler(
1873
+ props.row
1874
+ )
1875
+ "
1876
+ />
1877
+ </template>
1878
+ </USheet>
1879
+ <USheet
1880
+ v-model:dialogs="moreActionsDialogs[props.row['id']]"
1881
+ :close-icon-label="closeIconLabel"
1882
+ :heading="selectMoreOptions"
1883
+ :is-left-icon="false"
1884
+ :show-action-buttons="false"
1885
+ >
1886
+ <template #content>
1887
+ <q-list class="mobile-grid-more-action">
1888
+ <template v-for="(action, __i) in col.actions">
1889
+ <q-item
1890
+ v-if="
1891
+ typeof action.hide === 'function'
1892
+ ? !action.hide(props.row)
1893
+ : true
1894
+ "
1895
+ class="q-px-sm q-py-ba bg-neutral-2 q-mb-xs"
1896
+ :aria-label="
1897
+ typeof action.label === 'function'
1898
+ ? action.label(props.row)
1899
+ : action.label
1900
+ "
1901
+ clickable
1902
+ :key="__i"
1903
+ tabindex="-1"
1904
+ @click="handleItemClick(action, props.row)"
1905
+ >
1906
+ <q-item-section class="q-pr-xs" avatar>
1907
+ <q-icon
1908
+ v-if="
1909
+ typeof action.icon === 'function'
1910
+ ? action.icon(props.row)
1911
+ : action.icon
1912
+ "
1913
+ :class="`${
1914
+ typeof action.icon === 'function'
1915
+ ? action.icon(props.row)
1916
+ : action.icon
1917
+ } text-${getActionItemColor(
1918
+ action,
1919
+ props.row
1920
+ )}`"
1921
+ size="1.5rem"
1922
+ tabindex="-1"
1923
+ />
1924
+ </q-item-section>
1925
+ <q-item-section
1926
+ :class="`text-caption-lg text-${getActionItemColor(
1927
+ action,
1928
+ props.row
1929
+ )}`"
1930
+ tabindex="0"
1931
+ >
1932
+ {{
1933
+ typeof action.label === 'function'
1934
+ ? action.label(props.row)
1935
+ : action.label
1936
+ }}
1937
+ </q-item-section>
1938
+ </q-item>
1939
+ </template>
1940
+ </q-list>
1941
+ </template>
1942
+ </USheet>
1943
+ </template>
1944
+ </template>
1945
+ </template>
1946
+ </template>
1947
+ </div>
1948
+ </template>
1949
+ </UExpansionStd>
1950
+ </template>
1951
+
1952
+ <template v-if="infiniteScroll && isScrollActionActive" #bottom>
1953
+ <div
1954
+ v-if="infiniteScrollProp.loading"
1955
+ :class="`relative-position full-width row justify-center ${
1956
+ grid ? `q-mt-ms q-mb-xs` : `q-py-lg`
1957
+ }`"
1958
+ >
1959
+ <UInnerLoader
1960
+ v-if="infiniteScrollProp.type == 'default'"
1961
+ image="/images/logo.svg"
1962
+ :loading="infiniteScrollProp.loading"
1963
+ :loading-message="infiniteScrollProp.loadingMessage"
1964
+ :spinner-color="infiniteScrollProp.color"
1965
+ :spinner-size="infiniteScrollProp.size"
1966
+ />
1967
+ <q-spinner
1968
+ v-if="infiniteScrollProp.type == 'spinner'"
1969
+ :color="infiniteScrollProp.color"
1970
+ :size="infiniteScrollProp.size"
1971
+ />
1972
+ </div>
1973
+ <div
1974
+ v-if="infiniteScrollProp?.noMoreData && infiniteNoMoreShow"
1975
+ :class="`row full-width justify-center text-accent q-gutter-sm ${
1976
+ grid ? `q-mt-xs q-mb-ba` : `q-py-lg`
1977
+ }`"
1978
+ >
1979
+ <span>{{ infiniteScrollProp.noMoreDataText }}</span>
1980
+ </div>
1981
+ </template>
1982
+ </q-table>
1983
+ </component>
1984
+ </template>